From: Eric Dumazet <dada1@cosmosbay.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: Andi Kleen <andi@firstfloor.org>,
Robert Richter <robert.richter@amd.com>,
oprofile-list@lists.sf.net, Ingo Molnar <mingo@elte.hu>,
Jiri Kosina <jkosina@suse.cz>, Jiri Benc <jbenc@suse.cz>,
Vilem Marsik <vmarsik@suse.cz>,
Pekka Enberg <penberg@cs.helsinki.fi>,
linux-kernel@vger.kernel.org
Subject: Re: Oprofile : need to adjust PC by 16 bytes
Date: Fri, 14 Nov 2008 18:21:21 +0100 [thread overview]
Message-ID: <491DB391.2040701@cosmosbay.com> (raw)
In-Reply-To: <18717.44751.459961.277998@harpo.it.uu.se>
Mikael Pettersson a écrit :
> Eric Dumazet writes:
> > Very strange results on my Intel E5450 CPU
> >
> > I found that I have to bias regs->ip by 16 bytes in order to have
> > correct profiling.
> >
> > Does it rings a bell to anyone ?
>
> The term is "skid". All OO processors are susceptible to it,
> as was known already to the Alpha "continous profiling"
> performance counter folks.
Cool. Maybe this can explain the other bug I have with oprofile.
>
> And no, blindly subtracting 16 from IP is not a fix.
Who mentioned a fix ? I am only giving more fuel to Intel guys so they
hopefully can give us a working oprofile.
>
> >
> > opcontrol --version
> > opcontrol: oprofile 0.9.4 compiled on Nov 3 2008 06:45:57
> >
> > Thank you
> >
> > diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
> > index 3f1b81a..051fb16 100644
> > --- a/arch/x86/oprofile/op_model_ppro.c
> > +++ b/arch/x86/oprofile/op_model_ppro.c
> > @@ -131,7 +131,9 @@ static int ppro_check_ctrs(struct pt_regs * const regs,
> > continue;
> > rdmsrl(msrs->counters[i].addr, val);
> > if (CTR_OVERFLOWED(val)) {
> > + regs->ip -= 0x10;
> > oprofile_add_sample(regs, i);
> > + regs->ip += 0x10;
> > wrmsrl(msrs->counters[i].addr, -reset_value[i]);
> > }
> > }
> >
> > --
next prev parent reply other threads:[~2008-11-14 17:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 20:57 Oprofile [still] doesn't work on 2.6.28-rc4 on certain CPU Jiri Kosina
2008-11-13 21:24 ` Ingo Molnar
2008-11-13 21:27 ` Jiri Kosina
2008-11-13 21:37 ` Ingo Molnar
2008-11-13 21:49 ` Eric Dumazet
2008-11-14 15:25 ` Oprofile : need to adjust PC by 16 bytes Eric Dumazet
2008-11-14 15:59 ` Andi Kleen
2008-11-14 16:02 ` Eric Dumazet
2008-11-14 17:01 ` Mikael Pettersson
2008-11-14 17:21 ` Eric Dumazet [this message]
2008-11-14 17:50 ` Andi Kleen
2008-11-15 16:30 ` Eric Dumazet
2008-11-15 18:36 ` Andi Kleen
2008-11-17 15:02 ` stephane eranian
2008-11-17 15:16 ` Eric Dumazet
2008-11-17 15:24 ` Andi Kleen
2008-11-14 10:09 ` Oprofile [still] doesn't work on 2.6.28-rc4 on certain CPU Robert Richter
2008-11-14 11:12 ` Jiri Kosina
2008-11-13 21:33 ` Maynard Johnson
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=491DB391.2040701@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=andi@firstfloor.org \
--cc=jbenc@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sf.net \
--cc=penberg@cs.helsinki.fi \
--cc=robert.richter@amd.com \
--cc=vmarsik@suse.cz \
/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