Page MenuHomeFreeBSD

Annotate some early boot functions with tslog
ClosedPublic

Authored by cperciva on May 30 2023, 3:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 23 2024, 4:21 PM
Unknown Object (File)
Sep 14 2024, 11:56 PM
Unknown Object (File)
Sep 5 2024, 1:18 PM
Unknown Object (File)
Sep 3 2024, 8:20 AM
Unknown Object (File)
Sep 3 2024, 8:19 AM
Unknown Object (File)
Sep 3 2024, 8:19 AM
Unknown Object (File)
Sep 3 2024, 7:49 AM
Unknown Object (File)
Sep 2 2024, 1:25 AM

Details

Summary

Booting an amd64 kernel on Firecracker with 1 CPU and 128 MB of RAM,
hammer_time takes roughly 2740 us:

  • 55 us in xen_pvh_parse_preload_data
    • 20 us in boot_parse_cmdline_delim
    • 20 us in boot_env_to_howto
  • 15 us in identify_hypervisor
  • 1320 us in link_elf_reloc
    • 1310 us in relocate_file1 handling ef->rela
  • 25 us in init_param1
  • 30 us in dpcpu_init
  • 355 us in initializecpu
    • 255 us in initializecpu calling load_cr4
  • 425 us in getmemsize
    • 280 us in pmap_bootstrap
      • 205 us in create_pagetables
  • 10 us in init_param2
  • 25 us in pci_early_quirks
  • 60 us in cninit
  • 90 us in kdb_init
  • 105 us in msgbufinit
  • 20 us in fpuinit
  • 205 us elsewhere in hammer_time

Some of these are unavoidable (e.g. identify_hypervisor uses CPUID and
load_cr4 loads the CR4 register, both of which trap to the hypervisor)
but others may deserve attention.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable