aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_selftest.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_selftest.c')
-rw-r--r--kernel/trace/trace_selftest.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index a5f6001c3332..3877dd9102f1 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -123,6 +123,7 @@ int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
123 int ret; 123 int ret;
124 int save_ftrace_enabled = ftrace_enabled; 124 int save_ftrace_enabled = ftrace_enabled;
125 int save_tracer_enabled = tracer_enabled; 125 int save_tracer_enabled = tracer_enabled;
126 char *func_name;
126 127
127 /* The ftrace test PASSED */ 128 /* The ftrace test PASSED */
128 printk(KERN_CONT "PASSED\n"); 129 printk(KERN_CONT "PASSED\n");
@@ -142,9 +143,15 @@ int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
142 return ret; 143 return ret;
143 } 144 }
144 145
146 /*
147 * Some archs *cough*PowerPC*cough* add charachters to the
148 * start of the function names. We simply put a '*' to
149 * accomodate them.
150 */
151 func_name = "*" STR(DYN_FTRACE_TEST_NAME);
152
145 /* filter only on our function */ 153 /* filter only on our function */
146 ftrace_set_filter(STR(DYN_FTRACE_TEST_NAME), 154 ftrace_set_filter(func_name, strlen(func_name), 1);
147 sizeof(STR(DYN_FTRACE_TEST_NAME)), 1);
148 155
149 /* enable tracing */ 156 /* enable tracing */
150 tr->ctrl = 1; 157 tr->ctrl = 1;