The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	mingo@elte.hu, Lin Ming <ming.m.lin@intel.com>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [BUG] perf_event: inst_retired:any_p:c=16:i=1 is not equivalent to cpu_clk_unhalted:thread_p
Date: Tue, 18 Jan 2011 19:36:33 +0100	[thread overview]
Message-ID: <1295375793.30950.1056.camel@laptop> (raw)
In-Reply-To: <AANLkTinVc=VRo+2=M3x5HEoF__SOJn7kBk7Ek0R94TG9@mail.gmail.com>

On Tue, 2011-01-18 at 19:05 +0100, Stephane Eranian wrote:
> Peter,
> 
> commit 7639dae0ca11038286bbbcda05f2bef601c1eb8d
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date:   Tue Dec 14 21:26:40 2010 +0100
> 
>     perf, x86: Provide a PEBS capable cycle event
> 
> 
> 
> Even with the transformation cmask=16:invert=1, you are not quite
> counting the same thing.
> 
> inst_retired:any_p:c=16:i=1  is different from cpu_clk_unhalted:thread_p
> 
> Simply because, I think, this form of inst_retired counts in HALTED state.

Drad it does indeed:

# perf stat -a -e cycles:p -e cycles sleep 1

 Performance counter stats for 'sleep 1':

        61,634,870 cycles                  
        26,703,249 cycles                  

        1.000860820  seconds time elapsed


> This automatic transformation would be "okay" in per-thread mode, but
> not in system-wide mode. It should not be done under the cover. I would
> rather have this option at the user level.

Agreed, since its not identical it had best be done in userspace, too
bad :/ I'll revert this patch.

  reply	other threads:[~2011-01-18 18:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 18:05 [BUG] perf_event: inst_retired:any_p:c=16:i=1 is not equivalent to cpu_clk_unhalted:thread_p Stephane Eranian
2011-01-18 18:36 ` Peter Zijlstra [this message]
2011-01-18 20:26   ` Stephane Eranian

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=1295375793.30950.1056.camel@laptop \
    --to=peterz@infradead.org \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    /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