public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Stephane Eranian <eranian@google.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Julia Lawall <julia@diku.dk>, Tom Zanussi <tzanussi@gmail.com>,
	linux-kernel@vger.kernel.org,
	Matt Fleming <matt@console-pimps.org>
Subject: Re: [RFC PATCHv3] perf tools: add event grouping capability to "perf stat"
Date: Fri, 26 Nov 2010 11:22:00 -0800	[thread overview]
Message-ID: <4CF008D8.2020609@linux.vnet.ibm.com> (raw)
In-Reply-To: <1290666760.2072.539.camel@laptop>

On 11/24/2010 10:32 PM, Peter Zijlstra wrote:
> On Wed, 2010-11-24 at 17:54 -0800, Corey Ashford wrote:
>> Add the ability to create multiple event groups, each with their own leader
>> using the existing "-e<event>[,<event>  ...] [-e<event>[,<event>]]"
>> syntax.  Each additional -e switch creates a new group, and each event
>> listed within a -e switch is within that group.
>>
>> Changes since v1:
>> - Because of a flub, v2 did not contain the changes I had intended to make,
>> and instead, v2 had the same patch contents as v1.
>> - When perf stat is not supplied any events on the command line, put
>> each default event in its own group.
>
> I like this, but could you also extend this to perf-record? its a bit
> odd to diverge between the two.
>
> Using Stephane's latest syntax changes you could actually do something
> like:
>
> perf record -e task-clock:freq=1000,cycles:period=0
>
> Which would create a group with 1 sampling counter and a counting
> counter (at which point we should probably start flipping
> PERF_SAMPLE_READ).

Yes, that would be useful.

>
> Matt was working on supporting that (although not through cmdline
> syntax) and teaching perf-report to cope with such output.

I did briefly consider adding this capability to perf record, but I knew 
it would be a lot more complicated.

This perf stat capability is something we added to an internal version, 
and have been using it for more than 6 months.   It's quite helpful for 
verifying that the kernel code for an arch is implemented correctly.

As an alternative approach, how about if instead of changing the 
existing syntax to perf stat, I instead add a -g/--group option which 
takes groups of events?

That way we won't really be diverging perf record and perf stat; we'll 
just have a feature that can at some point later in time be added to 
perf record when all of the details are worked out.

- Corey

      parent reply	other threads:[~2010-11-26 19:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25  1:54 [RFC PATCHv3] perf tools: add event grouping capability to "perf stat" Corey Ashford
2010-11-25  6:32 ` Peter Zijlstra
2010-11-25  7:46   ` Frederic Weisbecker
2010-11-25  8:00     ` Peter Zijlstra
2010-11-25  8:10       ` Frederic Weisbecker
2010-11-25  9:16     ` Stephane Eranian
2010-11-25 13:19   ` Stephane Eranian
2010-11-25 13:19   ` Stephane Eranian
2010-11-25 13:22     ` Stephane Eranian
2010-11-25 14:02     ` Peter Zijlstra
2010-11-25 14:07       ` Stephane Eranian
2010-11-25 14:12         ` Peter Zijlstra
2010-11-25 14:18           ` Stephane Eranian
2010-11-25 14:22             ` Peter Zijlstra
2010-11-25 15:10               ` Lin Ming
2010-11-25 15:15                 ` Peter Zijlstra
2010-11-25 15:19                   ` Lin Ming
2010-11-25 16:49             ` Arnaldo Carvalho de Melo
2010-11-26 19:22   ` Corey Ashford [this message]

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=4CF008D8.2020609@linux.vnet.ibm.com \
    --to=cjashfor@linux.vnet.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tzanussi@gmail.com \
    /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