HomeFreeBSD

tslog: Annotate some early boot functions

Description

tslog: Annotate some early boot functions

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.

Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D40325

Details