diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-14 15:58:35 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-14 15:58:35 +0200 |
commit | 6712e299b7dc78aa4971b85e803435ee6d49a9dd (patch) | |
tree | b3d17a2d068737ec07727b28e93c7d374c27721b /kernel/trace/ftrace.c | |
parent | ec1bb60bbff0386c3ec25360e7a8c72f467a6ff1 (diff) | |
parent | b2613e370dbeb69edbff989382fa54f2395aa471 (diff) |
Merge branch 'tracing/ftrace' into auto-ftrace-next
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 0f271c45cd0..4231a3dc224 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1602,6 +1602,23 @@ core_initcall(ftrace_dynamic_init); #endif /* CONFIG_DYNAMIC_FTRACE */ /** + * ftrace_kill_atomic - kill ftrace from critical sections + * + * This function should be used by panic code. It stops ftrace + * but in a not so nice way. If you need to simply kill ftrace + * from a non-atomic section, use ftrace_kill. + */ +void ftrace_kill_atomic(void) +{ + ftrace_disabled = 1; + ftrace_enabled = 0; +#ifdef CONFIG_DYNAMIC_FTRACE + ftraced_suspend = -1; +#endif + clear_ftrace_function(); +} + +/** * ftrace_kill - totally shutdown ftrace * * This is a safety measure. If something was detected that seems |