From: Frederic Weisbecker <fweisbec@gmail.com>
To: mingo@elte.hu
Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org
Subject: [PATCH -tip 3/3] Tracing/ftrace: Adapt boot tracer to the new type of print_line
Date: Fri, 26 Sep 2008 17:49:39 +0200 [thread overview]
Message-ID: <48DD0493.2050901@gmail.com> (raw)
Adapt the boot tracer to the new type of the print_line callback.
If it doesn't handle a type, it relays to next output functions.
It will let this tracer to accept sched, stack or print entries.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index d5c9e2e..d1260b6 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -45,21 +45,25 @@ static void boot_trace_ctrl_update(struct trace_array *tr)
stop_boot_trace(tr);
}
-static int initcall_print_line(struct trace_iterator *iter)
+static enum print_line_t initcall_print_line(struct trace_iterator *iter)
{
- int ret = 0;
+ int ret;
struct trace_entry *entry = iter->ent;
struct boot_trace *it = &entry->field.initcall;
struct trace_seq *s = &iter->seq;
- if (iter->ent->type == TRACE_BOOT)
+ if (iter->ent->type == TRACE_BOOT) {
ret = trace_seq_printf(s, "%pF called from %i "
"returned %d after %lld msecs\n",
it->func, it->caller, it->result,
it->duration);
- if (ret)
- return 1;
- return 0;
+ if (ret)
+ return TRACE_TYPE_HANDLED;
+ else
+ return TRACE_TYPE_PARTIAL_LINE;
+ }
+
+ return TRACE_TYPE_UNHANDLED;
}
struct tracer boot_tracer __read_mostly =
reply other threads:[~2008-09-26 15:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48DD0493.2050901@gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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.