lkml.org 
[lkml]   [2004]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/11] oprofile: i386 support for stack trace sampling
Greg Banks <gnb@melbourne.sgi.com> wrote:
>
> oprofile i386 arch updates, including some internal
> API changes and support for stack trace sampling.

It needs this to compile and link on x86_64. No idea if it works...

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

25-akpm/arch/i386/oprofile/backtrace.c | 8 +++++++-
25-akpm/arch/x86_64/oprofile/Makefile | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)

diff -puN arch/x86_64/oprofile/Makefile~oprofile-i386-support-for-stack-trace-sampling-fix arch/x86_64/oprofile/Makefile
--- 25/arch/x86_64/oprofile/Makefile~oprofile-i386-support-for-stack-trace-sampling-fix 2004-11-10 22:59:02.000000000 -0800
+++ 25-akpm/arch/x86_64/oprofile/Makefile 2004-11-10 22:59:09.000000000 -0800
@@ -11,7 +11,7 @@ DRIVER_OBJS = $(addprefix ../../../drive
oprofilefs.o oprofile_stats.o \
timer_int.o )

-OPROFILE-y := init.o
+OPROFILE-y := init.o backtrace.o
OPROFILE-$(CONFIG_X86_LOCAL_APIC) += nmi_int.o op_model_athlon.o op_model_p4.o \
op_model_ppro.o
OPROFILE-$(CONFIG_X86_IO_APIC) += nmi_timer_int.o
diff -puN arch/i386/oprofile/backtrace.c~oprofile-i386-support-for-stack-trace-sampling-fix arch/i386/oprofile/backtrace.c
--- 25/arch/i386/oprofile/backtrace.c~oprofile-i386-support-for-stack-trace-sampling-fix 2004-11-10 23:00:43.000000000 -0800
+++ 25-akpm/arch/i386/oprofile/backtrace.c 2004-11-10 23:05:54.008203048 -0800
@@ -96,7 +96,13 @@ static int valid_kernel_stack(struct fra
void
x86_backtrace(struct pt_regs * const regs, unsigned int depth)
{
- struct frame_head * head = (struct frame_head *)regs->ebp;
+ struct frame_head *head;
+
+#ifdef CONFIG_X86_64
+ head = (struct frame_head *)regs->rbp;
+#else
+ head = (struct frame_head *)regs->ebp;
+#endif

if (!user_mode(regs)) {
while (depth-- && valid_kernel_stack(head, regs))
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.031 / U:1.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site