Discussion:
[PATCH] tracing/fastboot: document the need of initcall_debug
Li Zefan
2009-06-29 07:55:10 UTC
Permalink
To use boot tracer, one should pass initcall_debug as well as
ftrace=initcall to the command line.

Signed-off-by: Li Zefan <***@cn.fujitsu.com>
---
kernel/trace/Kconfig | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index f7d9a4e..860c712 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -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
--
1.5.4.rc3
Ingo Molnar
2009-06-29 08:21:52 UTC
Permalink
Post by 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
Li Zefan
2009-06-29 09:01:56 UTC
Permalink
Post by Ingo Molnar
Post by 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?
Ingo Molnar
2009-06-29 09:14:22 UTC
Permalink
Post by Li Zefan
Post by Ingo Molnar
Post by 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?
That's reasonable indeed.

Ingo
Frederic Weisbecker
2009-06-29 11:19:02 UTC
Permalink
Post by Ingo Molnar
Post by Li Zefan
Post by Ingo Molnar
Post by 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?
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?
Ingo Molnar
2009-06-29 19:39:18 UTC
Permalink
Post by Ingo Molnar
Post by Li Zefan
Post by Ingo Molnar
Post by 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?
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?
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

tip-bot for Li Zefan
2009-06-29 08:24:31 UTC
Permalink
Commit-ID: 238a24f626628cb16a3015f332d649f08246ca89
Gitweb: http://git.kernel.org/tip/238a24f626628cb16a3015f332d649f08246ca89
Author: Li Zefan <***@cn.fujitsu.com>
AuthorDate: Mon, 29 Jun 2009 15:55:10 +0800
Committer: Ingo Molnar <***@elte.hu>
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.

Signed-off-by: Li Zefan <***@cn.fujitsu.com>
Cc: Frederic Weisbecker <***@gmail.com>
Cc: Steven Rostedt <***@goodmis.org>
LKML-Reference: <***@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <***@elte.hu>


---
kernel/trace/Kconfig | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 1551f47..019f380 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -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
Loading...