aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-05-14 23:49:44 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-23 16:43:11 -0400
commit4e491d14f2506b218d678935c25a7027b79178b1 (patch)
treec61c3ca40fe85f8556c579e50e0cb563ffcd06da /kernel
parente0eca07badc023a675a61906020b397da20f07c3 (diff)
ftrace: support for PowerPC
This patch adds full support for ftrace for PowerPC (both 64 and 32 bit). This includes dynamic tracing and function filtering. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-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;