lkml.org 
[lkml]   [2010]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/4] tracing: graph output support for preemptirqsoff/preemptoff tracers
Date
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


\
 
 \ /
  Last update: 2010-02-22 13:59    [from the cache]
©2003-2011 Jasper Spaans