diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-12-04 17:51:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-05 08:47:44 -0500 |
commit | 21a8c466f99063eeb8567318b4e305eda9015408 (patch) | |
tree | bc15ed9d28a4f1a52d390ceca6893d84de50a232 /include | |
parent | 77d683f3e0258d522c5506e7b5fd05c9411184d9 (diff) |
tracing/ftrace: provide the macro task_curr_ret_stack()
Impact: cleanup
As suggested by Steven Rostedt, this patch provide a new macro
task_curr_ret_stack() to move the cpp conditionnal CONFIG into
the linux/ftrace.h headers.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index b295d3106bfe..b9b4d0a22d10 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
9 | #include <linux/kallsyms.h> | 9 | #include <linux/kallsyms.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/sched.h> | ||
11 | 12 | ||
12 | #ifdef CONFIG_FUNCTION_TRACER | 13 | #ifdef CONFIG_FUNCTION_TRACER |
13 | 14 | ||
@@ -387,9 +388,19 @@ extern void unregister_ftrace_graph(void); | |||
387 | 388 | ||
388 | extern void ftrace_graph_init_task(struct task_struct *t); | 389 | extern void ftrace_graph_init_task(struct task_struct *t); |
389 | extern void ftrace_graph_exit_task(struct task_struct *t); | 390 | extern void ftrace_graph_exit_task(struct task_struct *t); |
391 | |||
392 | static inline int task_curr_ret_stack(struct task_struct *t) | ||
393 | { | ||
394 | return t->curr_ret_stack; | ||
395 | } | ||
390 | #else | 396 | #else |
391 | static inline void ftrace_graph_init_task(struct task_struct *t) { } | 397 | static inline void ftrace_graph_init_task(struct task_struct *t) { } |
392 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } | 398 | static inline void ftrace_graph_exit_task(struct task_struct *t) { } |
399 | |||
400 | static inline int task_curr_ret_stack(struct task_struct *tsk) | ||
401 | { | ||
402 | return -1; | ||
403 | } | ||
393 | #endif | 404 | #endif |
394 | 405 | ||
395 | #ifdef CONFIG_TRACING | 406 | #ifdef CONFIG_TRACING |