Feature #13576
Add mdb ::linkerset command
Start date:
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
With the addition of linker sets in #10851 (and their use in bhyve and likely other parts of the system), it would be useful to have an MDB dcmd to make examining them more ergonomic.
Currently, iterating the items in a linker set requires something similar to (from Joshua M. Clulow):
> __start_set_sysinit_set::array "struct sysinit" 0t19 | ::eval "*.::print struct sysinit" { func = vmm_stat_register data = VCPU_TOTAL_RUNTIME } { func = vmm_stat_register data = VCPU_NMI_COUNT } ...
It would be far nicer for a dcmd that worked along the lines of:
> ::linkerset NAME ITEMSIZE ITEMCOUNT sysinit_set 0x10 20 > ::linkerset sysinit_set 0xffffffffc018d0c0 0xffffffffc018d140 0xffffffffc018d1c0 0xffffffffc018fcc0 0xffffffffc018fd40 ... > ::linkerset sysinit_set | ::print struct sysinit { func = vmm_stat_register data = VCPU_TOTAL_RUNTIME } { func = vmm_stat_register data = VCPU_NMI_COUNT } ...