Skip to contentSkip to conversation

tracing/function-graph-tracer: provide a selftest for the function graph tracer

PATCH Applied Frederic Weisbecker 2 participants 2 messages Feb 7, 2009 – Feb 9, 2009 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 2/5 tracing/function-graph-tracer: provide a selftest for the function graph tracer

Making more easy to do a basic regression test for this tracer.

Cc Arnaldo Carvalho de Melo <[email protected]>
---
 kernel/trace/trace.h                 |    2 +
 kernel/trace/trace_functions_graph.c |    3 ++
 kernel/trace/trace_selftest.c        |   50 ++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 0 deletions(-)
kernel/trace/trace.h +2 -0
index f2742fb..cb8a84b 100644
@@ -501,6 +501,8 @@ extern int DYN_FTRACE_TEST_NAME(void);
 #ifdef CONFIG_FTRACE_STARTUP_TEST
 extern int trace_selftest_startup_function(struct tracer *trace,
 					   struct trace_array *tr);
+extern int trace_selftest_startup_function_graph(struct tracer *trace,
+						 struct trace_array *tr);
 extern int trace_selftest_startup_irqsoff(struct tracer *trace,
 					  struct trace_array *tr);
 extern int trace_selftest_startup_preemptoff(struct tracer *trace,
kernel/trace/trace_functions_graph.c +3 -0
index 222f97d..88f8d9d 100644
@@ -750,6 +750,9 @@ static struct tracer graph_trace __read_mostly = {
 	.print_line	= print_graph_function,
 	.print_header	= print_graph_headers,
 	.flags		= &tracer_flags,
+#ifdef CONFIG_FTRACE_SELFTEST
+	.selftest	= trace_selftest_startup_function_graph,
+#endif
 };
 
 static __init int init_graph_trace(void)
kernel/trace/trace_selftest.c +50 -0

62 lines not on this page · raw message

Signature · 1 line
1.6.1
Applied
#1 lore raw
Quoted 9 lines · Frederic Weisbecker

Making more easy to do a basic regression test for this tracer.

Cc Arnaldo Carvalho de Melo <[email protected]>
---
 kernel/trace/trace.h                 |    2 +
 kernel/trace/trace_functions_graph.c |    3 ++
 kernel/trace/trace_selftest.c        |   50 ++++++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 0 deletions(-)

Applied to tip/tracing/ftrace, thanks Frederic!

Ingo