aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/time_64.c
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-07-11 12:53:43 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-13 04:21:29 -0400
commit3927fa9e4b5d5f346d12aa0531744daef106ebd3 (patch)
tree9696065bbbc8e0a6cd019ecd6be0b3c21884105e /arch/x86/kernel/time_64.c
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>
Diffstat (limited to 'arch/x86/kernel/time_64.c')
-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)
34 of flags from PUSHF 34 of flags from PUSHF
35 Eflags always has bits 22 and up cleared unlike kernel addresses. */ 35 Eflags always has bits 22 and up cleared unlike kernel addresses. */
36 if (!user_mode(regs) && in_lock_functions(pc)) { 36 if (!user_mode(regs) && in_lock_functions(pc)) {
37#ifdef CONFIG_FRAME_POINTER
38 return *(unsigned long *)(regs->bp + sizeof(long));
39#else
37 unsigned long *sp = (unsigned long *)regs->sp; 40 unsigned long *sp = (unsigned long *)regs->sp;
38 if (sp[0] >> 22) 41 if (sp[0] >> 22)
39 return sp[0]; 42 return sp[0];
40 if (sp[1] >> 22) 43 if (sp[1] >> 22)
41 return sp[1]; 44 return sp[1];
45#endif
42 } 46 }
43 return pc; 47 return pc;
44} 48}