aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2010-04-02 13:01:22 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-04-27 12:36:53 -0400
commit62b915f1060996a8e1f69be50e3b8e9e43b710cb (patch)
tree26741f065b30b67022d680c3bc2afbda319638e1 /kernel/trace/trace.c
parentd7a8d9e907cc294ec7a4a7046d1886375fbcc82e (diff)
tracing: Add graph output support for irqsoff tracer
Add function graph output to irqsoff tracer. The graph output is enabled by setting new 'display-graph' trace option. Signed-off-by: Jiri Olsa <jolsa@redhat.com> LKML-Reference: <1270227683-14631-4-git-send-email-jolsa@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 7b516c7ef9a0..8b9ba41ec146 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1808,7 +1808,7 @@ static void print_func_help_header(struct seq_file *m)
1808} 1808}
1809 1809
1810 1810
1811static void 1811void
1812print_trace_header(struct seq_file *m, struct trace_iterator *iter) 1812print_trace_header(struct seq_file *m, struct trace_iterator *iter)
1813{ 1813{
1814 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK); 1814 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
@@ -2017,7 +2017,7 @@ static enum print_line_t print_bin_fmt(struct trace_iterator *iter)
2017 return event ? event->binary(iter, 0) : TRACE_TYPE_HANDLED; 2017 return event ? event->binary(iter, 0) : TRACE_TYPE_HANDLED;
2018} 2018}
2019 2019
2020static int trace_empty(struct trace_iterator *iter) 2020int trace_empty(struct trace_iterator *iter)
2021{ 2021{
2022 int cpu; 2022 int cpu;
2023 2023
@@ -2084,6 +2084,23 @@ static enum print_line_t print_trace_line(struct trace_iterator *iter)
2084 return print_trace_fmt(iter); 2084 return print_trace_fmt(iter);
2085} 2085}
2086 2086
2087void trace_default_header(struct seq_file *m)
2088{
2089 struct trace_iterator *iter = m->private;
2090
2091 if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
2092 /* print nothing if the buffers are empty */
2093 if (trace_empty(iter))
2094 return;
2095 print_trace_header(m, iter);
2096 if (!(trace_flags & TRACE_ITER_VERBOSE))
2097 print_lat_help_header(m);
2098 } else {
2099 if (!(trace_flags & TRACE_ITER_VERBOSE))
2100 print_func_help_header(m);
2101 }
2102}
2103
2087static int s_show(struct seq_file *m, void *v) 2104static int s_show(struct seq_file *m, void *v)
2088{ 2105{
2089 struct trace_iterator *iter = v; 2106 struct trace_iterator *iter = v;
@@ -2096,17 +2113,9 @@ static int s_show(struct seq_file *m, void *v)
2096 } 2113 }
2097 if (iter->trace && iter->trace->print_header) 2114 if (iter->trace && iter->trace->print_header)
2098 iter->trace->print_header(m); 2115 iter->trace->print_header(m);
2099 else if (iter->iter_flags & TRACE_FILE_LAT_FMT) { 2116 else
2100 /* print nothing if the buffers are empty */ 2117 trace_default_header(m);
2101 if (trace_empty(iter)) 2118
2102 return 0;
2103 print_trace_header(m, iter);
2104 if (!(trace_flags & TRACE_ITER_VERBOSE))
2105 print_lat_help_header(m);
2106 } else {
2107 if (!(trace_flags & TRACE_ITER_VERBOSE))
2108 print_func_help_header(m);
2109 }
2110 } else if (iter->leftover) { 2119 } else if (iter->leftover) {
2111 /* 2120 /*
2112 * If we filled the seq_file buffer earlier, we 2121 * If we filled the seq_file buffer earlier, we