Skip to contentSkip to conversation

tracing/fastboot: document the need of initcall_debug

PATCH In review Li Zefan 3 participants 7 messages Jun 29, 2009 Tracing

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 tracing/fastboot: document the need of initcall_debug

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

---
 kernel/trace/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/trace/Kconfig +3 -3
index f7d9a4e..860c712 100644
@@ -226,13 +226,13 @@ config BOOT_TRACER
 	  the timings of the initcalls and traces key events and the identity
 	  of tasks that can cause boot delays, such as context-switches.
 
-	  Its aim is to be parsed by the /scripts/bootgraph.pl tool to
+	  Its aim is to be parsed by the scripts/bootgraph.pl tool to
 	  produce pretty graphics about boot inefficiencies, giving a visual
 	  representation of the delays during initcalls - but the raw
 	  /debug/tracing/trace text output is readable too.
 
-	  You must pass in ftrace=initcall to the kernel command line
-	  to enable this on bootup.
+	  You must pass in initcall_debug and ftrace=initcall to the kernel
+	  command line to enable this on bootup.
 
 config TRACE_BRANCH_PROFILING
 	bool
Signature · 1 line
1.5.4.rc3
#1 lore raw
Quoted 2 lines · Li Zefan

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

I think both should be auto-enabled if BOOT_TRACER is enabled, for ease of use - agreed?

Ingo

author
#2 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 2 lines · Li Zefan

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

I think both should be auto-enabled if BOOT_TRACER is enabled, for ease of use - agreed?

If both are auto-enabled, we'll always do boot tracing. But we want BOOT_TRACER to be enabled and only enable boot tracing when it's needed.

But maybe we can make ftrace=initcall implies initcall_debug=1?

#3 lore raw
Quoted 6 lines · Li Zefan
Quoted 5 lines · Ingo Molnar
Quoted 2 lines · Li Zefan

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

Quoted 8 lines
Quoted 2 lines

I think both should be auto-enabled if BOOT_TRACER is enabled, for ease of use - agreed?

If both are auto-enabled, we'll always do boot tracing. But we want BOOT_TRACER to be enabled and only enable boot tracing when it's needed.

But maybe we can make ftrace=initcall implies initcall_debug=1?

That's reasonable indeed.

Ingo

#4 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Li Zefan
Quoted 7 lines · Ingo Molnar
Quoted 2 lines · Li Zefan

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

I think both should be auto-enabled if BOOT_TRACER is enabled, for ease of use - agreed?

If both are auto-enabled, we'll always do boot tracing. But we want BOOT_TRACER to be enabled and only enable boot tracing when it's needed.

Quoted 5 lines
Quoted 1 line

But maybe we can make ftrace=initcall implies initcall_debug=1?

That's reasonable indeed.

Ingo

Yeah.

Although I wonder if this tracer is still useful. It was first written to debug fastboot, to get more than the initcall_debug output, ie: the scheduling events but now I guess the latter is not useful anymore. And using initcall_debug already does the job of printing the initcall events.

What do you think?

#5 lore raw
Quoted 25 lines · Frederic Weisbecker
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Li Zefan
Quoted 7 lines · Ingo Molnar
Quoted 2 lines · Li Zefan

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

I think both should be auto-enabled if BOOT_TRACER is enabled, for ease of use - agreed?

If both are auto-enabled, we'll always do boot tracing. But we want BOOT_TRACER to be enabled and only enable boot tracing when it's needed.

Quoted 5 lines
Quoted 1 line

But maybe we can make ftrace=initcall implies initcall_debug=1?

That's reasonable indeed.

Ingo

Yeah.

Quoted 7 lines

Although I wonder if this tracer is still useful. It was first written to debug fastboot, to get more than the initcall_debug output, ie: the scheduling events but now I guess the latter is not useful anymore. And using initcall_debug already does the job of printing the initcall events.

What do you think?

Arjan is/was a frequent user of it. I think some neat stuff came out of it: the trace can be fed into sysprof/ftrace and can be visualized.

If we remove it we should first provide a replacement perfcounters feature for it. Something like a special sw counter that 'buffers' its events and so can be enabled during early bootup by the kernel, and disabled once init is executed. If user-space creates a counter on that event then it gets to read all the boot-time events in a stream.

Or something like that. That would integrate the boot tracer functionality into perfcounters tooling. We could do a 'perf report' display of boot delays for example, and other neat stuff. Sounds extremely useful and more usable than the boot tracer because this special 'boot delays' event would always be there and can be used by the regular 'perf' tooling to inspect bootup properties.

Ingo

#6 lore raw

[tip:tracing/urgent] tracing/fastboot: Document the need of initcall_debug

In reply to Li Zefan
Commit-ID:  238a24f626628cb16a3015f332d649f08246ca89
Gitweb:     http://git.kernel.org/tip/238a24f626628cb16a3015f332d649f08246ca89
Author:     Li Zefan <[email protected]>
AuthorDate: Mon, 29 Jun 2009 15:55:10 +0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 29 Jun 2009 10:22:10 +0200

tracing/fastboot: Document the need of initcall_debug

To use boot tracer, one should pass initcall_debug as well as ftrace=initcall to the command line.

Cc Frederic Weisbecker <[email protected]>
Cc Steven Rostedt <[email protected]>

LKML-Reference: <[email protected]>

---
 kernel/trace/Kconfig |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
kernel/trace/Kconfig +3 -3
index 1551f47..019f380 100644
@@ -226,13 +226,13 @@ config BOOT_TRACER
 	  the timings of the initcalls and traces key events and the identity
 	  of tasks that can cause boot delays, such as context-switches.
 
-	  Its aim is to be parsed by the /scripts/bootgraph.pl tool to
+	  Its aim is to be parsed by the scripts/bootgraph.pl tool to
 	  produce pretty graphics about boot inefficiencies, giving a visual
 	  representation of the delays during initcalls - but the raw
 	  /debug/tracing/trace text output is readable too.
 
-	  You must pass in ftrace=initcall to the kernel command line
-	  to enable this on bootup.
+	  You must pass in initcall_debug and ftrace=initcall to the kernel
+	  command line to enable this on bootup.
 
 config TRACE_BRANCH_PROFILING
 	bool