mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stephane eranian <eranian@googlemail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Robert Richter <robert.richter@amd.com>,
	Paul Mackerras <paulus@samba.org>,
	Andi Kleen <andi@firstfloor.org>,
	Maynard Johnson <mpjohn@us.ibm.com>, Carl Love <cel@us.ibm.com>,
	Corey J Ashford <cjashfor@us.ibm.com>,
	Philip Mucci <mucci@eecs.utk.edu>,
	Dan Terpstra <terpstra@eecs.utk.edu>,
	perfmon2-devel <perfmon2-devel@lists.sourceforge.net>
Subject: Re: comments on Performance Counters for Linux (PCL)
Date: Fri, 29 May 2009 22:49:48 +0200	[thread overview]
Message-ID: <7c86c4470905291349icb3fc03wa87d7e5c1069eaf4@mail.gmail.com> (raw)
In-Reply-To: <1243629142.6645.108.camel@laptop>

On Fri, May 29, 2009 at 10:32 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2009-05-28 at 18:25 +0200, Peter Zijlstra wrote:
>> >   10/ Group event buffer entry
>> >
>> >        This is activated by setting the PERF_RECORD_GROUP in the record_type
>> >        field.  With this bit set, the values of the other members of the
>> >        group are stored sequentially in the buffer. To help figure out which
>> >        value corresponds to which event, the current implementation also
>> >        stores the raw encoding of the event.
>> >
>> >        The event encoding does not help figure out which event the value refers
>> >        to. There can be multiple events with the same code. This does fit the
>> >        API model where events are identified by file descriptors.
>> >
>> >        The file descriptor must be provided and not the raw encoding.
>>
>> OK, sounds sensible.
>
> This can't actually be done, fds can change, and there is no struct
> file* to fd map.

The API must define an order in which values are stored. Otherwise
how would the application figure out what they correspond to in the
group.

Explain to me what you mean by fds can change. Are you thinking
about dup()+close() for instance?

> If the config isn't good enough, the best we could do is something
> unique per instance.
>
Config isn't good enough for sure. For instance, I could be sampling
the same generic PERF_CPU_COUNT_CYCLES twice in the same
group, once at the user level only (exclude_kernel=1), and once at
the kernel level only (exclude_user=1), but the two config values
would be identical.

If there is no backmapping, then you could get by perhaps by having
the API guarantee that values are stored in the order events were
originally chained in the group. If that does not work, then you need
to emit a unique cookie per fd and let the application maintain a mapping
table.

  reply	other threads:[~2009-05-29 20:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-28 14:58 stephane eranian
2009-05-28 16:25 ` Peter Zijlstra
2009-05-28 16:47   ` Peter Zijlstra
2009-05-28 21:06   ` [perfmon2] " Corey Ashford
2009-05-28 21:35     ` Ingo Molnar
2009-05-28 23:24       ` Paul Mackerras
2009-05-29  7:19         ` Ingo Molnar
2009-05-29  8:21           ` Geert Uytterhoeven
2009-05-29 14:42             ` Carl Love
2009-05-30 19:16               ` Ingo Molnar
2009-05-29 10:50         ` stephane eranian
2009-05-29 10:53           ` stephane eranian
2009-05-29  6:51   ` Andi Kleen
2009-05-29  8:19     ` Peter Zijlstra
2009-05-29  8:53       ` Andi Kleen
2009-05-29 16:13         ` [perfmon2] " Luck, Tony
2009-05-29 10:43   ` stephane eranian
2009-05-29 15:02     ` Peter Zijlstra
2009-05-29 15:59       ` stephane eranian
2009-05-29 20:32   ` Peter Zijlstra
2009-05-29 20:49     ` stephane eranian [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-28 14:53 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=7c86c4470905291349icb3fc03wa87d7e5c1069eaf4@mail.gmail.com \
    --to=eranian@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=cel@us.ibm.com \
    --cc=cjashfor@us.ibm.com \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mpjohn@us.ibm.com \
    --cc=mucci@eecs.utk.edu \
    --cc=paulus@samba.org \
    --cc=perfmon2-devel@lists.sourceforge.net \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=terpstra@eecs.utk.edu \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome