From: Mikael Pettersson <mikpe@it.uu.se>
To: Eric Dumazet <dada1@cosmosbay.com>
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:01:03 +0100 [thread overview]
Message-ID: <18717.44751.459961.277998@harpo.it.uu.se> (raw)
In-Reply-To: <491D987F.1000301@cosmosbay.com>
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.
And no, blindly subtracting 16 from IP is not a fix.
>
> 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]);
> }
> }
>
> --
> 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/
>
next prev parent reply other threads:[~2008-11-14 17:01 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 [this message]
2008-11-14 17:21 ` Eric Dumazet
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=18717.44751.459961.277998@harpo.it.uu.se \
--to=mikpe@it.uu.se \
--cc=andi@firstfloor.org \
--cc=dada1@cosmosbay.com \
--cc=jbenc@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®