aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
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.c
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.c')
-rw-r--r--kernel/trace/trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 93040f1bef13..5b1e9a9e9906 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2468,8 +2468,8 @@ waitagain:
2468 iter->seq.len = len; 2468 iter->seq.len = len;
2469 break; 2469 break;
2470 } 2470 }
2471 2471 if (ret != TRACE_TYPE_NO_CONSUME)
2472 trace_consume(iter); 2472 trace_consume(iter);
2473 2473
2474 if (iter->seq.len >= cnt) 2474 if (iter->seq.len >= cnt)
2475 break; 2475 break;