summaryrefslogtreecommitdiff
path: root/kernel/trace
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 22:43:11 +0200
commit4e491d14f2506b218d678935c25a7027b79178b1 (patch)
treec61c3ca40fe85f8556c579e50e0cb563ffcd06da /kernel/trace
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/trace')
-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,
int ret;
int save_ftrace_enabled = ftrace_enabled;
int save_tracer_enabled = tracer_enabled;
+ char *func_name;
/* The ftrace test PASSED */
printk(KERN_CONT "PASSED\n");
@@ -142,9 +143,15 @@ int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
return ret;
}
+ /*
+ * Some archs *cough*PowerPC*cough* add charachters to the
+ * start of the function names. We simply put a '*' to
+ * accomodate them.
+ */
+ func_name = "*" STR(DYN_FTRACE_TEST_NAME);
+
/* filter only on our function */
- ftrace_set_filter(STR(DYN_FTRACE_TEST_NAME),
- sizeof(STR(DYN_FTRACE_TEST_NAME)), 1);
+ ftrace_set_filter(func_name, strlen(func_name), 1);
/* enable tracing */
tr->ctrl = 1;