aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-12-02 23:50:02 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-03 02:56:23 -0500
commit14a866c567e040ccf6240d68b083dd1dbbde63e6 (patch)
tree4e8d62ecc345d44e7cd45f973ffb931070637532 /include/linux/ftrace.h
parentbb4304c71c97bf727ec43cd2f195c2c237c27fd3 (diff)
ftrace: add ftrace_graph_stop()
Impact: new ftrace_graph_stop function While developing more features of function graph, I hit a bug that caused the WARN_ON to trigger in the prepare_ftrace_return function. Well, it was hard for me to find out that was happening because the bug would not print, it would just cause a hard lockup or reboot. The reason is that it is not safe to call printk from this function. Looking further, I also found that it calls unregister_ftrace_graph, which grabs a mutex and calls kstop machine. This would definitely lock the box up if it were to trigger. This patch adds a fast and safe ftrace_graph_stop() which will stop the function tracer. Then it is safe to call the WARN ON. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index afba918c623c..58ca1c3a3f4d 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -376,6 +376,8 @@ typedef void (*trace_func_graph_ent_t)(struct ftrace_graph_ent *); /* entry */
376extern int register_ftrace_graph(trace_func_graph_ret_t retfunc, 376extern int register_ftrace_graph(trace_func_graph_ret_t retfunc,
377 trace_func_graph_ent_t entryfunc); 377 trace_func_graph_ent_t entryfunc);
378 378
379extern void ftrace_graph_stop(void);
380
379/* The current handlers in use */ 381/* The current handlers in use */
380extern trace_func_graph_ret_t ftrace_graph_return; 382extern trace_func_graph_ret_t ftrace_graph_return;
381extern trace_func_graph_ent_t ftrace_graph_entry; 383extern trace_func_graph_ent_t ftrace_graph_entry;