mi_startup: Instrument the bubblesort with TSLOG
The bubblesort of SYSINITs is currently responsible for 7% of the kernel boot time when booting a 1 CPU / 128 MB VM under Firecracker. It needs to be replaced with a faster sort, but until that happens at least instrumenting it with TSLOG makes it show up in flamecharts.
This commit is contained in:
parent
f3546eacf0
commit
40b2870545
@ -255,6 +255,7 @@ mi_startup(void)
|
||||
* Perform a bubble sort of the system initialization objects by
|
||||
* their subsystem (primary key) and order (secondary key).
|
||||
*/
|
||||
TSENTER2("bubblesort");
|
||||
for (sipp = sysinit; sipp < sysinit_end; sipp++) {
|
||||
for (xipp = sipp + 1; xipp < sysinit_end; xipp++) {
|
||||
if ((*sipp)->subsystem < (*xipp)->subsystem ||
|
||||
@ -266,6 +267,7 @@ mi_startup(void)
|
||||
*xipp = save;
|
||||
}
|
||||
}
|
||||
TSEXIT2("bubblesort");
|
||||
|
||||
last = SI_SUB_COPYRIGHT;
|
||||
#if defined(VERBOSE_SYSINIT)
|
||||
|
Loading…
Reference in New Issue
Block a user