All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu,
	paulus@samba.org, cjashfor@linux.vnet.ibm.com,
	fweisbec@gmail.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, andi@firstfloor.org, drepper@gmail.com,
	eranian@google.com
Subject: Re: [PATCHv3 0/3] perf tool: Add new event group management
Date: Mon, 02 Jul 2012 23:20:34 +0900	[thread overview]
Message-ID: <1341238834.1476.50.camel@leonhard> (raw)
In-Reply-To: <20120702133341.GD967@krava.redhat.com>

2012-07-02 (월), 15:33 +0200, Jiri Olsa:
> On Mon, Jul 02, 2012 at 10:11:02PM +0900, Namhyung Kim wrote:
> > 2012-07-02 (월), 12:15 +0200, Jiri Olsa:
> > > On Mon, Jul 02, 2012 at 10:53:44AM +0900, Namhyung Kim wrote:
> > > > Just a question, is there a way to know about the grouping at perf
> > > > report time?
> > > 
> > > nope, AFAIK only ID and perf_event_attr is stored for event
> > > grouping is known only for record time
> > > 
> > 
> > I heard that Arnaldo (or Stephane) wanted to make perf report
> > group-aware or such so that it can show related events together. But to
> > do that, it seems we need to change the data file format first, right?
> > 
> > Any idea?
> 
> The next change I'm working on is to record and report
> PERF_FORMAT_GROUP related data. Here's commit comment
> from my next patchset:
> 
> ---
> perf, tool: Enable sampling on specified event group leader
> 
> Adding the functionality to the group modifier event syntax.
> Allowing user to select leader event inside the group using
> event index (command line event position in the group).
> 
> Following example selects e2 as leader:
>   -e '{e1,e2,e3,e4}:2'
> 
> The selected event becomes group leader and is the only one
> doing samples.
> 
> The rest of the events in the group are being read on each leader
> event sample by PERF_SAMPLE_READ sample type processing.
> 
> Following example:
>   perf record -e {cycles,faults}:1 ls
> 
>   - creates a group with 'cycles' and 'faults' events
>   - 'cycles' event is group leader and has sampling enabled
>   - 'faults' event is read each time 'cycles' sample,
>     the 'faults' count is attached to the 'cycles sample
>     via PERF_SAMPLE_READ sample type.
> ---
> 
> The report does not need any new metadata about grouping, because
> the samples are generated/stored only from the group leader. The
> other events data are read from the PERF_FORMAT_GROUP leader sample
> data.
> 
> So no data file format change for my next changes, but I'm not sure
> this is the report change you mean.
> 

What I said is just displaying cycles and faults events in above example
on the same screen/table like:

 (Overhead)
cycles  faults  Command      Shared object              Symbol
......  ......  .......  .................  ..................
92.98%  60.13%  noploop  noploop            [.] main
 3.21%   5.42%  noploop  [kernel.kallsyms]  [k] __lock_acquire
 1.16%  13.13%  noploop  libc-2.11.1.so     [.] _int_malloc
 0.97%   0.33%  noploop  [kernel.kallsyms]  [k] clear_page_c
...

We could pass such information to perf report explicitly, But I guess it
'd better if perf report did it for me automagically by detecting group
relations.


-- 
Regards,
Namhyung Kim



  reply	other threads:[~2012-07-02 14:20 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-29  9:08 [PATCHv3 0/3] perf tool: Add new event group management Jiri Olsa
2012-06-29  9:08 ` [PATCH 1/3] perf, tool: Add support to parse event group syntax Jiri Olsa
2012-06-29  9:08 ` [PATCH 2/3] perf, tool: Enable grouping logic for parsed events Jiri Olsa
2012-06-29 16:47   ` Arnaldo Carvalho de Melo
2012-06-29 16:53     ` Jiri Olsa
2012-07-02  2:13   ` Namhyung Kim
2012-07-02 10:10     ` Jiri Olsa
2012-07-03  0:58       ` Namhyung Kim
2012-07-04 17:34         ` Jiri Olsa
2012-07-05  0:45           ` Namhyung Kim
2012-07-05 16:05           ` Peter Zijlstra
2012-07-05 16:43             ` Arnaldo Carvalho de Melo
2012-06-29  9:08 ` [PATCH 3/3] perf, test: Add automated tests for event group parsing Jiri Olsa
2012-07-02  1:53 ` [PATCHv3 0/3] perf tool: Add new event group management Namhyung Kim
2012-07-02 10:15   ` Jiri Olsa
2012-07-02 13:11     ` Namhyung Kim
2012-07-02 13:33       ` Jiri Olsa
2012-07-02 14:20         ` Namhyung Kim [this message]
2012-07-03  0:50           ` Namhyung Kim
2012-07-03  1:04             ` Arnaldo Carvalho de Melo
2012-07-05 16:15         ` Stephane Eranian
2012-07-05 16:44           ` Arnaldo Carvalho de Melo
2012-07-06  1:06             ` Stephane Eranian
2012-07-06  1:32           ` Ulrich Drepper
2012-07-06  1:42             ` Stephane Eranian
2012-07-09 11:05               ` Jiri Olsa
2012-07-09 11:15                 ` Peter Zijlstra
2012-07-17  7:15                 ` Stephane Eranian
2012-07-17 15:47                   ` Andi Kleen
2012-07-18 10:21                   ` Jiri Olsa
2012-07-18 12:34                     ` Ulrich Drepper
2012-07-18 20:06                       ` Jiri Olsa
2012-07-05 16:09       ` Stephane Eranian
2012-07-02  2:25 ` David Ahern
2012-07-02 10:07   ` Jiri Olsa
2012-07-02 10:19 ` Peter Zijlstra

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=1341238834.1476.50.camel@leonhard \
    --to=namhyung@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=drepper@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.