From: Jiri Olsa <jolsa@redhat.com>
To: mingo@elte.hu, rostedt@goodmis.org, fweisbec@gmail.com
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 3/4] tracing: graph output support for preemptirqsoff/preemptoff tracers
Date: Mon, 22 Feb 2010 13:57:01 +0100 [thread overview]
Message-ID: <1266843422-18288-4-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1266843422-18288-1-git-send-email-jolsa@redhat.com>
hi,
adding support for graph output for preemptirqsoff/preemptoff tracers.
wbr,
jirka
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
kernel/trace/trace_irqsoff.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c
index f3f43fc..15e05c9 100644
--- a/kernel/trace/trace_irqsoff.c
+++ b/kernel/trace/trace_irqsoff.c
@@ -58,12 +58,12 @@ irq_trace(void)
# define irq_trace() (0)
#endif
-#define TRACE_IRQSOFF_GRAPH 1
+#define TRACE_DISPLAY_GRAPH 1
static struct tracer_opt trace_opts[] = {
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* display latency trace as call graph */
- { TRACER_OPT(irqsoff-graph, TRACE_IRQSOFF_GRAPH) },
+ { TRACER_OPT(display-graph, TRACE_DISPLAY_GRAPH) },
#endif
{ } /* Empty entry */
};
@@ -73,7 +73,7 @@ static struct tracer_flags tracer_flags = {
.opts = trace_opts,
};
-#define is_graph() (tracer_flags.val & TRACE_IRQSOFF_GRAPH)
+#define is_graph() (tracer_flags.val & TRACE_DISPLAY_GRAPH)
/*
* Sequence count - we record it when starting a measurement and
@@ -133,7 +133,7 @@ static int irqsoff_set_flag(u32 old_flags, u32 bit, int set)
{
int cpu;
- if (!(bit & TRACE_IRQSOFF_GRAPH))
+ if (!(bit & TRACE_DISPLAY_GRAPH))
return -EINVAL;
if (!(is_graph() ^ set))
@@ -550,8 +550,8 @@ static struct tracer irqsoff_tracer __read_mostly =
.reset = irqsoff_tracer_reset,
.start = irqsoff_tracer_start,
.stop = irqsoff_tracer_stop,
- .flags = &tracer_flags,
.print_max = 1,
+ .flags = &tracer_flags,
.set_flag = irqsoff_set_flag,
#ifdef CONFIG_FTRACE_SELFTEST
.selftest = trace_selftest_startup_irqsoff,
@@ -583,9 +583,15 @@ static struct tracer preemptoff_tracer __read_mostly =
.start = irqsoff_tracer_start,
.stop = irqsoff_tracer_stop,
.print_max = 1,
+ .flags = &tracer_flags,
+ .set_flag = irqsoff_set_flag,
#ifdef CONFIG_FTRACE_SELFTEST
.selftest = trace_selftest_startup_preemptoff,
#endif
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+ .open = irqsoff_trace_open,
+ .close = irqsoff_trace_close,
+#endif
};
# define register_preemptoff(trace) register_tracer(&trace)
#else
@@ -611,9 +617,15 @@ static struct tracer preemptirqsoff_tracer __read_mostly =
.start = irqsoff_tracer_start,
.stop = irqsoff_tracer_stop,
.print_max = 1,
+ .flags = &tracer_flags,
+ .set_flag = irqsoff_set_flag,
#ifdef CONFIG_FTRACE_SELFTEST
.selftest = trace_selftest_startup_preemptirqsoff,
#endif
+#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+ .open = irqsoff_trace_open,
+ .close = irqsoff_trace_close,
+#endif
};
# define register_preemptirqsoff(trace) register_tracer(&trace)
--
1.6.6
next prev parent reply other threads:[~2010-02-22 12:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 12:56 [PATCH 0/4] tracing: function graph output for preempt/irqs-off tracers Jiri Olsa
2010-02-22 12:56 ` [PATCH 1/4] tracing: adding ftrace events for graph tracer Jiri Olsa
2010-03-08 19:29 ` Steven Rostedt
2010-03-09 15:15 ` Jiri Olsa
2010-02-22 12:57 ` [PATCH 2/4] tracing: graph output support for irqsoff tracer Jiri Olsa
2010-02-22 12:57 ` Jiri Olsa [this message]
2010-02-22 12:57 ` [PATCH 4/4] tracing: raw output for graph tracer Jiri Olsa
2010-03-08 7:07 ` [PATCH 0/4] tracing: function graph output for preempt/irqs-off tracers Jiri Olsa
2010-03-08 15:11 ` Steven Rostedt
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=1266843422-18288-4-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).