diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-12-06 03:40:00 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-08 15:11:44 +0100 |
commit | 8b96f0119818964e4944fd1c423bf6770027d3ac (patch) | |
tree | 02b5ec86d2fe45d6935d63913b997989f9339bf4 /include/linux/ftrace.h | |
parent | decbec3838d10ecd7aabdb4c0e05aac0e5f5dc0c (diff) | |
download | linux-8b96f0119818964e4944fd1c423bf6770027d3ac.tar.gz linux-8b96f0119818964e4944fd1c423bf6770027d3ac.tar.bz2 linux-8b96f0119818964e4944fd1c423bf6770027d3ac.zip |
tracing/function-graph-tracer: introduce __notrace_funcgraph to filter special functions
Impact: trace more functions
When the function graph tracer is configured, three more files are not
traced to prevent only four functions to be traced. And this impacts the
normal function tracer too.
arch/x86/kernel/process_64/32.c:
I had crashes when I let this file traced. After some debugging, I saw
that the "current" task point was changed inside__swtich_to(), ie:
"write_pda(pcurrent, next_p);" inside process_64.c Since the tracer store
the original return address of the function inside current, we had
crashes. Only __switch_to() has to be excluded from tracing.
kernel/module.c and kernel/extable.c:
Because of a function used internally by the function graph tracer:
__kernel_text_address()
To let the other functions inside these files to be traced, this patch
introduces the __notrace_funcgraph function prefix which is __notrace if
function graph tracer is configured and nothing if not.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace.h')
-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 b9b4d0a22d10..449fa8e9e34f 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -369,6 +369,14 @@ struct ftrace_graph_ret { }; #ifdef CONFIG_FUNCTION_GRAPH_TRACER + +/* + * Sometimes we don't want to trace a function with the function + * graph tracer but we want them to keep traced by the usual function + * tracer if the function graph tracer is not configured. + */ +#define __notrace_funcgraph notrace + #define FTRACE_RETFUNC_DEPTH 50 #define FTRACE_RETSTACK_ALLOC_SIZE 32 /* Type of the callback handlers for tracing function graph*/ @@ -394,6 +402,9 @@ static inline int task_curr_ret_stack(struct task_struct *t) return t->curr_ret_stack; } #else + +#define __notrace_funcgraph + static inline void ftrace_graph_init_task(struct task_struct *t) { } static inline void ftrace_graph_exit_task(struct task_struct *t) { } |