]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: use frame pointer information on x86_64 profile_pc
authorGlauber Costa <gcosta@redhat.com>
Fri, 11 Jul 2008 16:53:43 +0000 (13:53 -0300)
committerIngo Molnar <mingo@elte.hu>
Mon, 13 Oct 2008 08:21:29 +0000 (10:21 +0200)
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/time_64.c

index e3d49c553af22aec7c773006b7018325dccb6ec0..7fd995edb762561cc5271b29db439389325be626 100644 (file)
@@ -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;
 }