From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Arjan van de Ven <arjan@infradead.org>
Subject: [PATCH -tip] Tracing/fastboot: Only trace non-module initcalls
Date: Fri, 03 Oct 2008 15:39:21 +0200 [thread overview]
Message-ID: <48E62089.7050006@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]
At this time, only built-in initcalls interest us.
We can't really produce a relevant graph if we include
the modules initcall too.
I had good results after this patch (see svg in attachment).
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
include/linux/ftrace.h | 2 ++
init/main.c | 1 +
kernel/trace/trace_boot.c | 11 ++++++++---
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index ed53265..5812dba 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -225,9 +225,11 @@ struct boot_trace {
#ifdef CONFIG_BOOT_TRACER
extern void trace_boot(struct boot_trace *it, initcall_t fn);
extern void start_boot_trace(void);
+extern void stop_boot_trace(void);
#else
static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
static inline void start_boot_trace(void) { }
+static inline void stop_boot_trace(void) { }
#endif
diff --git a/init/main.c b/init/main.c
index 47d621a..2e5c37e 100644
--- a/init/main.c
+++ b/init/main.c
@@ -976,6 +976,7 @@ static int __init kernel_init(void * unused)
* we're essentially up and running. Get rid of the
* initmem segments and start the user-mode stuff..
*/
+ stop_boot_trace();
init_post();
return 0;
}
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index b9dc2c0..a7efe35 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -22,11 +22,16 @@ void start_boot_trace(void)
trace_boot_enabled = 1;
}
-void stop_boot_trace(struct trace_array *tr)
+void stop_boot_trace(void)
{
trace_boot_enabled = 0;
}
+void reset_boot_trace(struct trace_array *tr)
+{
+ stop_boot_trace();
+}
+
static void boot_trace_init(struct trace_array *tr)
{
int cpu;
@@ -43,7 +48,7 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
if (tr->ctrl)
start_boot_trace();
else
- stop_boot_trace(tr);
+ stop_boot_trace();
}
static enum print_line_t initcall_print_line(struct trace_iterator *iter)
@@ -81,7 +86,7 @@ struct tracer boot_tracer __read_mostly =
{
.name = "initcall",
.init = boot_trace_init,
- .reset = stop_boot_trace,
+ .reset = reset_boot_trace,
.ctrl_update = boot_trace_ctrl_update,
.print_line = initcall_print_line,
};
[-- Attachment #2: boot.svg --]
[-- Type: image/svg+xml, Size: 2534 bytes --]
next reply other threads:[~2008-10-03 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-03 13:39 Frederic Weisbecker [this message]
2008-10-03 15:07 ` [PATCH -tip] Tracing/fastboot: Only trace non-module initcalls Ingo Molnar
2008-10-03 17:43 ` Alan Jenkins
2008-10-03 17:59 ` Frédéric Weisbecker
2008-10-03 18:07 ` Frédéric Weisbecker
2008-10-03 19:50 ` Alan Jenkins
2008-10-04 19:05 ` Frédéric Weisbecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48E62089.7050006@gmail.com \
--to=fweisbec@gmail.com \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.