aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-02-06 12:30:44 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-09 06:37:27 -0500
commitb91facc367366b3f71375f337eb5997ec9ab4e69 (patch)
tree1f7c8914f493080cadcfdec23b33d9a5936fe98b /kernel/trace/trace.h
parent1dfba05d0f1a9b4245bb242a7c17fe448811a520 (diff)
tracing/function-graph-tracer: handle the leaf functions from trace_pipe
When one cats the trace file, the leaf functions are printed without brackets: function(); whereas in the trace_pipe file we'll see the following: function() { } This is because the ring_buffer handling is not the same between those two files. On the trace file, when an entry is printed, the iterator advanced and then we can check the next entry. There is no iterator with trace_pipe, the current entry to print has been peeked and not consumed. So checking the next entry will still return the current one while we don't consume it. This patch introduces a new value for the output callbacks to ask the tracing core to not consume the current entry after printing it. We need it because we will have to consume the current entry ourself to check the next one. Now the trace_pipe is able to handle well the leaf functions. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 1ecfb9d2b365..7b0518adf6d7 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -63,13 +63,13 @@ struct ftrace_entry {
63 63
64/* Function call entry */ 64/* Function call entry */
65struct ftrace_graph_ent_entry { 65struct ftrace_graph_ent_entry {
66 struct trace_entry ent; 66 struct trace_entry ent;
67 struct ftrace_graph_ent graph_ent; 67 struct ftrace_graph_ent graph_ent;
68}; 68};
69 69
70/* Function return entry */ 70/* Function return entry */
71struct ftrace_graph_ret_entry { 71struct ftrace_graph_ret_entry {
72 struct trace_entry ent; 72 struct trace_entry ent;
73 struct ftrace_graph_ret ret; 73 struct ftrace_graph_ret ret;
74}; 74};
75extern struct tracer boot_tracer; 75extern struct tracer boot_tracer;
@@ -309,7 +309,8 @@ extern void __ftrace_bad_type(void);
309enum print_line_t { 309enum print_line_t {
310 TRACE_TYPE_PARTIAL_LINE = 0, /* Retry after flushing the seq */ 310 TRACE_TYPE_PARTIAL_LINE = 0, /* Retry after flushing the seq */
311 TRACE_TYPE_HANDLED = 1, 311 TRACE_TYPE_HANDLED = 1,
312 TRACE_TYPE_UNHANDLED = 2 /* Relay to other output functions */ 312 TRACE_TYPE_UNHANDLED = 2, /* Relay to other output functions */
313 TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */
313}; 314};
314 315
315 316