aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/dumpstack.h
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2010-03-17 12:07:16 +0200
committerIngo Molnar <mingo@elte.hu>2010-04-02 19:30:03 +0200
commit257ef9d21f1b008a6c7425544b36641c4325a922 (patch)
tree4ffda980fe6a93acd24efcc04cd10e130caae4c1 /arch/x86/kernel/dumpstack.h
parentperf, x86: Fix AMD hotplug & constraint initialization (diff)
downloadlinux-dev-257ef9d21f1b008a6c7425544b36641c4325a922.tar.xz
linux-dev-257ef9d21f1b008a6c7425544b36641c4325a922.zip
perf, x86: Fix callgraphs of 32-bit processes on 64-bit kernels
When profiling a 32-bit process on a 64-bit kernel, callgraph tracing stopped after the first function, because it has seen a garbage memory address (tried to interpret the frame pointer, and return address as a 64-bit pointer). Fix this by using a struct stack_frame with 32-bit pointers when the TIF_IA32 flag is set. Note that TIF_IA32 flag must be used, and not is_compat_task(), because the latter is only set when the 32-bit process is executing a syscall, which may not always be the case (when tracing page fault events for example). Signed-off-by: Török Edwin <edwintorok@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Paul Mackerras <paulus@samba.org> Cc: x86@kernel.org Cc: linux-kernel@vger.kernel.org LKML-Reference: <1268820436-13145-1-git-send-email-edwintorok@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to '')
-rw-r--r--arch/x86/kernel/dumpstack.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h
index 29e5f7c845b2..e39e77168a37 100644
--- a/arch/x86/kernel/dumpstack.h
+++ b/arch/x86/kernel/dumpstack.h
@@ -30,6 +30,11 @@ struct stack_frame {
unsigned long return_address;
};
+struct stack_frame_ia32 {
+ u32 next_frame;
+ u32 return_address;
+};
+
static inline unsigned long rewind_frame_pointer(int n)
{
struct stack_frame *frame;