summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/mcount.S
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2009-11-16 10:34:15 +0100
committerMichal Simek <monstr@monstr.eu>2009-12-14 08:44:54 +0100
commit4f911b0daf0f7028a4fe792b701a48d10da36d84 (patch)
tree746315895bc446df02b1d7e2c1b70550468cab28 /arch/microblaze/kernel/mcount.S
parenta0d3e66522e8f6119f002cf31e5d92d7ae73b409 (diff)
microblaze: ftrace: Add dynamic function graph tracer
This patch add support for dynamic function graph tracer. There is one my expactation that I can do flush_icache after all code modification. On microblaze is this safer than do flush for every entry. For icache is used name flush but correct should be invalidation - this will be fix in upcomming new cache implementaion and WB support. Signed-off-by: Michal Simek <monstr@monstr.eu>
Diffstat (limited to 'arch/microblaze/kernel/mcount.S')
-rw-r--r--arch/microblaze/kernel/mcount.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/mcount.S b/arch/microblaze/kernel/mcount.S
index 84a19458c74..e7eaa7a8cbd 100644
--- a/arch/microblaze/kernel/mcount.S
+++ b/arch/microblaze/kernel/mcount.S
@@ -97,6 +97,7 @@ ENTRY(ftrace_caller)
nop;
/* MS: HAVE_FUNCTION_TRACE_MCOUNT_TEST end of checking */
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+#ifndef CONFIG_DYNAMIC_FTRACE
lwi r5, r0, ftrace_graph_return;
addik r6, r0, ftrace_stub; /* asm implementation */
cmpu r5, r5, r6; /* ftrace_graph_return != ftrace_stub */
@@ -108,6 +109,11 @@ ENTRY(ftrace_caller)
cmpu r5, r5, r6; /* ftrace_graph_entry != ftrace_graph_entry_stub */
beqid r5, end_graph_tracer;
nop;
+#else /* CONFIG_DYNAMIC_FTRACE */
+NOALIGN_ENTRY(ftrace_call_graph)
+ /* MS: jump over graph function - replaced from C code */
+ bri end_graph_tracer
+#endif /* CONFIG_DYNAMIC_FTRACE */
addik r5, r1, 120; /* MS: load parent addr */
addik r6, r15, 0; /* MS: load current function addr */
bralid r15, prepare_ftrace_return;