before patch boot with --bootchart, "TLS initialization"
is not output
...
disk read (real mode): 50.71ms, (+50.71ms)
.init functions: 89.20ms, (+5.48ms)
SMP launched: 90.56ms, (+1.36ms)
VFS initialized: 95.76ms, (+5.20ms)
...
after patch,
...
disk read (real mode): 50.71ms, (+50.71ms)
TLS initialization: 83.72ms, (+33.01ms)
.init functions: 89.20ms, (+5.48ms)
SMP launched: 90.56ms, (+1.36ms)
VFS initialized: 95.76ms, (+5.20ms)
...
Signed-off-by: Wang Yu <
yuw...@linux.alibaba.com>
---
include/osv/boot.hh | 4 ++--
loader.cc | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/osv/boot.hh b/include/osv/boot.hh
index eb97cc9..ec5301c 100644
--- a/include/osv/boot.hh
+++ b/include/osv/boot.hh
@@ -15,13 +15,13 @@ public:
void print_chart();
time_element arrays[16];
friend void arch_setup_free_memory();
-private:
// Can we keep it at 0 and let the initial two users increment it? No, we
// cannot. The reason is that the code that *parses* those fields run
// relatively late (the code that takes the measure is so early it cannot
// call this one directly. Therefore, the measurements would appear in the
// middle of the list, and we want to preserve order.
- int _event = 2;
+ int _event = 3;
+private:
void print_one_time(int index);
double to_msec(u64 time);
diff --git a/loader.cc b/loader.cc
index f6cbd4d..0d97151 100644
--- a/loader.cc
+++ b/loader.cc
@@ -109,6 +109,7 @@ void premain()
}
setup_tls(inittab);
+ boot_time._event=2;
boot_time.event("TLS initialization");
for (auto init = inittab.start; init < inittab.start + inittab.count; ++init) {
(*init)();
--
1.8.3.1