tracing: Add stack_tracer_disable/enable() functions

There are certain parts of the kernel that cannot let stack tracing
proceed (namely in RCU), because the stack tracer uses RCU, and parts of RCU
internals cannot handle having RCU read side locks taken.

Add stack_tracer_disable() and stack_tracer_enable() functions to let RCU
stop stack tracing on the current CPU when it is in those critical sections.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (VMware)
2017-04-06 12:26:20 -04:00
parent 252babcd52
commit 5367278cb7
2 changed files with 38 additions and 0 deletions

View File

@@ -286,6 +286,12 @@ int
stack_trace_sysctl(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos);
void stack_tracer_disable(void);
void stack_tracer_enable(void);
#else
static inline void stack_tracer_disable(void) { }
static inline void stack_tracer_enable(void) { }
#endif
struct ftrace_func_command {