aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h13
-rw-r--r--include/linux/sched.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 449fa8e9e34f..11cac81eed08 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -401,6 +401,16 @@ static inline int task_curr_ret_stack(struct task_struct *t)
401{ 401{
402 return t->curr_ret_stack; 402 return t->curr_ret_stack;
403} 403}
404
405static inline void pause_graph_tracing(void)
406{
407 atomic_inc(&current->tracing_graph_pause);
408}
409
410static inline void unpause_graph_tracing(void)
411{
412 atomic_dec(&current->tracing_graph_pause);
413}
404#else 414#else
405 415
406#define __notrace_funcgraph 416#define __notrace_funcgraph
@@ -412,6 +422,9 @@ static inline int task_curr_ret_stack(struct task_struct *tsk)
412{ 422{
413 return -1; 423 return -1;
414} 424}
425
426static inline void pause_graph_tracing(void) { }
427static inline void unpause_graph_tracing(void) { }
415#endif 428#endif
416 429
417#ifdef CONFIG_TRACING 430#ifdef CONFIG_TRACING
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4c152e0acc9e..4b81fc5f7731 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1379,6 +1379,8 @@ struct task_struct {
1379 * because of depth overrun. 1379 * because of depth overrun.
1380 */ 1380 */
1381 atomic_t trace_overrun; 1381 atomic_t trace_overrun;
1382 /* Pause for the tracing */
1383 atomic_t tracing_graph_pause;
1382#endif 1384#endif
1383#ifdef CONFIG_TRACING 1385#ifdef CONFIG_TRACING
1384 /* state flags for use by tracers */ 1386 /* state flags for use by tracers */