aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_functions_graph.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-12-23 19:43:25 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-26 04:42:14 -0500
commit412d0bb553c0227191f1bfd06100f561600bff22 (patch)
treefc6d2d1d430eed5ea1e4125d2962a6ff32e6265b /kernel/trace/trace_functions_graph.c
parent5250d329e38cdf7580faeb9c53c17d3588d7d19c (diff)
tracing/function-graph-tracer: strip ending newlines on comments
Impact: tracer output improvement Ending newlines are appended automatically on comments by the function graph tracer because the newline needs to be placed after the "*/" comment characters. So if the user puts an ending newline, we want to strip it. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r--kernel/trace/trace_functions_graph.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index 4bf39fcae97a..bc7d90850be5 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -592,6 +592,12 @@ print_graph_comment(struct print_entry *trace, struct trace_seq *s,
592 if (ent->flags & TRACE_FLAG_CONT) 592 if (ent->flags & TRACE_FLAG_CONT)
593 trace_seq_print_cont(s, iter); 593 trace_seq_print_cont(s, iter);
594 594
595 /* Strip ending newline */
596 if (s->buffer[s->len - 1] == '\n') {
597 s->buffer[s->len - 1] = '\0';
598 s->len--;
599 }
600
595 ret = trace_seq_printf(s, " */\n"); 601 ret = trace_seq_printf(s, " */\n");
596 if (!ret) 602 if (!ret)
597 return TRACE_TYPE_PARTIAL_LINE; 603 return TRACE_TYPE_PARTIAL_LINE;