

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))
_
