All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support
Date: Fri, 26 Oct 2012 12:23:36 +0200	[thread overview]
Message-ID: <20121026102336.GA1067@krava.brq.redhat.com> (raw)
In-Reply-To: <1351242885.16863.0.camel@twins>

On Fri, Oct 26, 2012 at 11:14:45AM +0200, Peter Zijlstra wrote:
> On Fri, 2012-10-26 at 10:29 +0900, Namhyung Kim wrote:
> > Hi Jiri,
> > 
> > On Sat, 20 Oct 2012 16:33:08 +0200, Jiri Olsa wrote:
> > > hi,
> > > adding support to read sample values through the PERF_SAMPLE_READ
> > > sample type. It's now possible to specify 'S' modifier for an event
> > > and get its sample value by PERF_SAMPLE_READ.
> > 
> > I have a question.  What's an actual impact of specifying 'S' modifiere
> > to a non-group event or even only a (non-leader) member of a group?  For
> > instance, 'cycles:S' or '{branches,branch-misses:S}'.
> 
> I would hope a syntax error from the parser ;-)

yeaa.. no ;)

$ ./perf record -e '{cycles:S,cache-misses}' ls
...
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.011 MB perf.data (~476 samples) ]

$ ./perf report
non matching sample_type

> 
> I haven't actually looked at the implementation, but I understood it to
> be a group modifier, not an event modifier.

we might want to be able to use PERF_SAMPLE_READ for single event
same as for groups

the difference between single event and group 'S' modifier:

  $ ./perf record -e 'cycles:S' ls
  - records 'cycles' samples and read period value via PERF_SAMPLE_READ

  $ ./perf record -e '{cycles,cache-misses}:S'
  - samples just on 'cycles' samples and read both period values
   (cycles and cache-misses) via PERF_SAMPLE_READ group format

  $ ./perf record -e '{cycles,cache-misses}:S,instructions' ls
  $ ./perf record -e '{cycles:S,cache-misses},instructions' ls
  $ ./perf record -e 'cycles:S,instructions' ls
  - non matching sample_type

hm, thats the unique sample_type issue again ;) Once we set
PERF_SAMPLE_READ for event or group, we need to set it for
all other events in session, otherwise the report fails

sooo, it looks like:
  - global record '-S' option instead, setting PERF_SAMPLE_READ sample type
    globaly for all events
  - and ':S' group modifier to enable sampling only on leader
    with group format reading for the rest of the group
  - ':S' group modifier alone would imply -S

How about that?

thanks,
jirka

  reply	other threads:[~2012-10-26 10:24 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-20 14:33 [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support Jiri Olsa
2012-10-20 14:33 ` [PATCH 01/11] perf: Add PERF_EVENT_IOC_ID ioctl to return event ID Jiri Olsa
2012-10-20 14:33 ` [PATCH 02/11] perf: Do not get values from disabled counters in group format read Jiri Olsa
2012-10-23 16:13   ` Peter Zijlstra
2012-10-23 16:50     ` Jiri Olsa
2012-10-24 12:01       ` Peter Zijlstra
2012-10-24 12:14         ` Jiri Olsa
2012-10-24 12:32           ` Peter Zijlstra
2012-10-24 16:03           ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 03/11] perf tool: Use PERF_EVENT_IOC_ID perf ioctl to read event id Jiri Olsa
2012-10-22  7:57   ` Namhyung Kim
2012-10-22  8:40     ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 04/11] perf tool: Add support for parsing PERF_SAMPLE_READ sample type Jiri Olsa
2012-10-22  8:56   ` Namhyung Kim
2012-10-20 14:33 ` [PATCH 05/11] perf tool: Fix event ID retrieval for group format read case Jiri Olsa
2012-10-20 14:33 ` [PATCH 06/11] perf tool: Add perf_evlist__id2sid function to get event ID related data Jiri Olsa
2012-10-20 14:33 ` [PATCH 07/11] perf tool: Add PERF_SAMPLE_READ sample related processing Jiri Olsa
2012-10-20 14:33 ` [PATCH 08/11] perf tool: Add 'S' event/group modifier to read sample value Jiri Olsa
2012-10-20 14:33 ` [PATCH 09/11] perf test: Add parse events tests for leader sampling Jiri Olsa
2012-10-22  8:58   ` Namhyung Kim
2012-10-22  9:12     ` Jiri Olsa
2012-10-20 14:33 ` [PATCH 10/11] perf tool: Display period values for all group members Jiri Olsa
2012-10-20 14:33 ` [PATCH 11/11] perf record: Fix mmap error output condition Jiri Olsa
2012-10-30 12:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2012-10-21 16:38 ` [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support Ingo Molnar
2012-10-22  8:09   ` Jiri Olsa
2012-10-22  8:51     ` Namhyung Kim
2012-10-22  9:15       ` Jiri Olsa
2012-10-22  7:32 ` Namhyung Kim
2012-10-22  7:53   ` Jiri Olsa
2012-10-22  8:53     ` Namhyung Kim
2012-10-22  9:06       ` Jiri Olsa
2012-10-26  1:29 ` Namhyung Kim
2012-10-26  9:14   ` Peter Zijlstra
2012-10-26 10:23     ` Jiri Olsa [this message]
2012-10-26 15:39       ` Namhyung Kim
2012-10-26 16:14         ` David Ahern
2012-10-26 16:25           ` Namhyung Kim
2012-10-26 16:47             ` David Ahern
2012-10-26 17:00         ` Arnaldo Carvalho de Melo
2013-02-04 12:32 Jiri Olsa
2013-02-06  4:59 ` Namhyung Kim

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=20121026102336.GA1067@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /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.