mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: eranian@gmail.com
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4][RFC] perf_counter: Allow sharing of output channels
Date: Thu, 20 Aug 2009 12:28:00 +0200	[thread overview]
Message-ID: <20090820102800.GD29093@elte.hu> (raw)
In-Reply-To: <7c86c4470908200313l112a8ff6q836d618d7ce6fcc8@mail.gmail.com>


* stephane eranian <eranian@googlemail.com> wrote:

> On Wed, Aug 19, 2009 at 2:56 PM, Peter Zijlstra<a.p.zijlstra@chello.nl> wrote:
> > On Wed, 2009-08-19 at 22:36 +1000, Paul Mackerras wrote:
> >> Peter Zijlstra writes:
> >>
> >> > Provide the ability to configure a counter to send 
> >> > its output to another (already existing) counter's 
> >> > output stream.
> >>
> >> What sort of thing might this be useful for?
> >
> > Some people complained that its tedious to mmap() for 
> > every counter and would like to share the mmap() 
> > output buffer between counters.
> >
> 
> > This saves on address space and mlock budget and I 
> > guess fd management logic.
>
> Interesting to see, you seem to have changed your mind 
> on this. I recall pointing this out in my early 
> comments.

Btw., did we strongly oppose the notion? The mmap output 
buffers were always multi-event in essence - just by 
virtue of the automatic events such as task creation, 
mmap, etc.

> But anyway, here are some more comments:
> 
>    - how does this work with the remapped counts?
>      Probably only see the count for the target, i.e., 
>      output, event

if you want to recover the momentary index for RDPC you 
need to mmap the counter(s) you are interested in, to get 
to the header->index value.

So you can create these counters with 1 pages only (one 
is the header) - and then remap the output to the primary 
counter's output buffer.

>    - if samples from multiple events end up in the same 
>      buffer, how do I tell them apart, i.e., how do I 
>      know sample X came from event A, sample X from 
>      event B? This may be useful to detect patterns.

Via PERF_SAMPLE_ID. That saves the counter ID into the 
event so it can be demultiplexed later on.

	Ingo

  parent reply	other threads:[~2009-08-20 10:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  9:18 [PATCH 0/4] perf counter bits Peter Zijlstra
2009-08-19  9:18 ` [PATCH 1/4] perf_counter: Default to higher paranoia level Peter Zijlstra
2009-08-19 14:07   ` Peter Zijlstra
2009-08-19 16:04     ` Frederic Weisbecker
2009-08-20 12:00     ` Peter Zijlstra
2009-08-21 14:21       ` Ingo Molnar
2009-08-24  7:29         ` Peter Zijlstra
2009-08-24  7:37           ` Ingo Molnar
2009-08-19  9:18 ` [PATCH 2/4] perf_counter: powerpc: Support the anonymized kernel callchain bits Peter Zijlstra
2009-08-19 13:30   ` [tip:perfcounters/core] perf_counter: powerpc: Support the anonimized " tip-bot for Peter Zijlstra
2009-08-19  9:18 ` [PATCH 3/4] perf tools: Check perf.data owner Peter Zijlstra
2009-08-19 13:32   ` [tip:perfcounters/core] " tip-bot for Peter Zijlstra
2009-08-19  9:18 ` [PATCH 4/4][RFC] perf_counter: Allow sharing of output channels Peter Zijlstra
2009-08-19 10:58   ` Ingo Molnar
2009-08-19 11:07     ` Peter Zijlstra
2009-08-19 12:41     ` Paul Mackerras
2009-08-19 12:36   ` Paul Mackerras
2009-08-19 12:56     ` Ingo Molnar
2009-08-19 12:56     ` Peter Zijlstra
2009-08-19 13:00       ` Ingo Molnar
2009-08-20 10:13       ` stephane eranian
2009-08-20 10:24         ` Peter Zijlstra
2009-08-20 10:28         ` Ingo Molnar [this message]
2009-08-19 16:19   ` Frederic Weisbecker
2009-08-19 16:24     ` Peter Zijlstra
2009-08-19 16:27       ` Frederic Weisbecker
2009-08-25  7:39   ` [tip:perfcounters/core] " tip-bot for 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=20090820102800.GD29093@elte.hu \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome