summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-07-11 13:53:43 -0300
committerIngo Molnar <mingo@elte.hu>2008-10-13 10:21:29 +0200
commit3927fa9e4b5d5f346d12aa0531744daef106ebd3 (patch)
tree9696065bbbc8e0a6cd019ecd6be0b3c21884105e
parent097a0788df71b0f3328c70ab5f4e41c27ee66817 (diff)
x86: use frame pointer information on x86_64 profile_pc
Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/time_64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c
index e3d49c553af2..7fd995edb762 100644
--- a/arch/x86/kernel/time_64.c
+++ b/arch/x86/kernel/time_64.c
@@ -34,11 +34,15 @@ unsigned long profile_pc(struct pt_regs *regs)
of flags from PUSHF
Eflags always has bits 22 and up cleared unlike kernel addresses. */
if (!user_mode(regs) && in_lock_functions(pc)) {
+#ifdef CONFIG_FRAME_POINTER
+ return *(unsigned long *)(regs->bp + sizeof(long));
+#else
unsigned long *sp = (unsigned long *)regs->sp;
if (sp[0] >> 22)
return sp[0];
if (sp[1] >> 22)
return sp[1];
+#endif
}
return pc;
}