diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-12-02 00:20:39 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-02 09:47:48 +0100 |
commit | 48d68b20d00865035b8b65e69af343d0f53fac9d (patch) | |
tree | eca27c0cf9486ae83c7e3193709abae099d1f019 /arch/x86/kernel/Makefile | |
parent | 222658e08f72cd539d01f3aabdc258c596f487e2 (diff) | |
download | op-kernel-dev-48d68b20d00865035b8b65e69af343d0f53fac9d.zip op-kernel-dev-48d68b20d00865035b8b65e69af343d0f53fac9d.tar.gz |
tracing/function-graph-tracer: support for x86-64
Impact: extend and enable the function graph tracer to 64-bit x86
This patch implements the support for function graph tracer under x86-64.
Both static and dynamic tracing are supported.
This causes some small CPP conditional asm on arch/x86/kernel/ftrace.c I
wanted to use probe_kernel_read/write to make the return address
saving/patching code more generic but it causes tracing recursion.
That would be perhaps useful to implement a notrace version of these
function for other archs ports.
Note that arch/x86/process_64.c is not traced, as in X86-32. I first
thought __switch_to() was responsible of crashes during tracing because I
believed current task were changed inside but that's actually not the
case (actually yes, but not the "current" pointer).
So I will have to investigate to find the functions that harm here, to
enable tracing of the other functions inside (but there is no issue at
this time, while process_64.c stays out of -pg flags).
A little possible race condition is fixed inside this patch too. When the
tracer allocate a return stack dynamically, the current depth is not
initialized before but after. An interrupt could occur at this time and,
after seeing that the return stack is allocated, the tracer could try to
trace it with a random uninitialized depth. It's a prevention, even if I
hadn't problems with it.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/Makefile')
-rw-r--r-- | arch/x86/kernel/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 64939a0..d274425 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -17,6 +17,7 @@ endif ifdef CONFIG_FUNCTION_GRAPH_TRACER # Don't trace __switch_to() but let it for function tracer CFLAGS_REMOVE_process_32.o = -pg +CFLAGS_REMOVE_process_64.o = -pg endif # |