tracing/function-graph-tracer: append the tracing_graph_flag
Impact: Provide a way to pause the function graph tracer As suggested by Steven Rostedt, the previous patch that prevented from spinlock function tracing shouldn't use the raw_spinlock to fix it. It's much better to follow lockdep with normal spinlock, so this patch adds a new flag for each task to make the function graph tracer able to be paused. We also can send an ftrace_printk whithout worrying of the irrelevant traced spinlock during insertion. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
8e1b82e086
commit
380c4b1411
@ -401,6 +401,16 @@ static inline int task_curr_ret_stack(struct task_struct *t)
|
||||
{
|
||||
return t->curr_ret_stack;
|
||||
}
|
||||
|
||||
static inline void pause_graph_tracing(void)
|
||||
{
|
||||
atomic_inc(¤t->tracing_graph_pause);
|
||||
}
|
||||
|
||||
static inline void unpause_graph_tracing(void)
|
||||
{
|
||||
atomic_dec(¤t->tracing_graph_pause);
|
||||
}
|
||||
#else
|
||||
|
||||
#define __notrace_funcgraph
|
||||
@ -412,6 +422,9 @@ static inline int task_curr_ret_stack(struct task_struct *tsk)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void pause_graph_tracing(void) { }
|
||||
static inline void unpause_graph_tracing(void) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TRACING
|
||||
|
Reference in New Issue
Block a user