From: Andrew Morton <akpm@osdl.org>
To: Greg Banks <gnb@melbourne.sgi.com>
Cc: oprofile-list@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/11] oprofile: i386 support for stack trace sampling
Date: Wed, 10 Nov 2004 23:03:47 -0800 [thread overview]
Message-ID: <20041110230347.7138f9d1.akpm@osdl.org> (raw)
In-Reply-To: <1099996693.1985.785.camel@hole.melbourne.sgi.com>
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))
_
next prev parent reply other threads:[~2004-11-11 7:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-09 10:38 Greg Banks
2004-11-11 7:03 ` Andrew Morton [this message]
2004-11-11 7:26 ` Greg Banks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041110230347.7138f9d1.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=gnb@melbourne.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oprofile-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®