public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: 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 17:02:57 +0100	[thread overview]
Message-ID: <491DA131.1060209@cosmosbay.com> (raw)
In-Reply-To: <20081114155904.GJ3810@one.firstfloor.org>

Andi Kleen a écrit :
> On Fri, Nov 14, 2008 at 04:25:51PM +0100, Eric Dumazet wrote:
>> 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.
> 
> Can you expand a bit how you determined if the profile is right or wrong?
> 
> -Andi
> 
> 

opannotate -a vmlinux > FILE

And check results.

With the patch I get :

c041d270 <dst_release>: /* dst_release total:  16523  1.2978 */
   252  0.0198 :c041d270:       push   %ebp
   654  0.0514 :c041d271:       test   %eax,%eax
               :c041d273:       mov    %esp,%ebp
    47  0.0037 :c041d275:       mov    %eax,%edx
    42  0.0033 :c041d277:       je     c041d289 <dst_release+0x19>
               :c041d279:       mov    $0xffffffff,%eax
     3 2.4e-04 :c041d27e:       lock xadd %eax,0x80(%edx)
 14766  1.1598 :c041d286:       dec    %eax
     1 7.9e-05 :c041d287:       js     c041d28b <dst_release+0x1b>
    53  0.0042 :c041d289:       pop    %ebp
   705  0.0554 :c041d28a:       ret
               :c041d28b:       mov    $0x10e,%edx
               :c041d290:       mov    $0xc0561ed5,%eax
               :c041d295:       call   c022d1a0 <warn_on_slowpath>
               :c041d29a:       pop    %ebp
               :c041d29b:       ret
               :c041d29c:       lea    0x0(%esi),%esi

This results please me : The cost is right after the "lock xadd" as expected.

Without patch, all addresses were off by 16 bytes.

On dst_release() it was on the call on warn_on_slowpath(),
and I am pretty sure it is not possible at all this WARN_ON is hit




  reply	other threads:[~2008-11-14 16:03 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 [this message]
2008-11-14 17:01           ` Mikael Pettersson
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=491DA131.1060209@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=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