All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>
Cc: 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,
	stephane eranian <eranian@googlemail.com>
Subject: Re: [PATCH 4/4][RFC] perf_counter: Allow sharing of output channels
Date: Wed, 19 Aug 2009 13:07:37 +0200	[thread overview]
Message-ID: <1250680057.7583.341.camel@twins> (raw)
In-Reply-To: <20090819105818.GB21150@elte.hu>

On Wed, 2009-08-19 at 12:58 +0200, Ingo Molnar wrote:
> * Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> 
> > Provide the ability to configure a counter to send its output to
> > another (already existing) counter's output stream.
> > 
> > [ compile tested only ]
> 
> very nice!
> 
> two comments:
> 
> > Index: linux-2.6/include/linux/perf_counter.h
> > ===================================================================
> > --- linux-2.6.orig/include/linux/perf_counter.h
> > +++ linux-2.6/include/linux/perf_counter.h
> > @@ -216,6 +216,7 @@ struct perf_counter_attr {
> >  #define PERF_COUNTER_IOC_REFRESH	_IO ('$', 2)
> >  #define PERF_COUNTER_IOC_RESET		_IO ('$', 3)
> >  #define PERF_COUNTER_IOC_PERIOD		_IOW('$', 4, u64)
> > +#define PERF_COUNTER_IOC_SET_OUTPUT	_IO ('$', 5)
> 
> Time to add a new sys_perf_counter_chattr() syscall and deprecate 
> the ioctls?

Could do I guess.. in order to support things like refresh and reset we
need a few new offset fields in the attr struct, but that's doable.

> > @@ -415,6 +416,9 @@ enum perf_callchain_context {
> >  	PERF_CONTEXT_MAX		= (__u64)-4095,
> >  };
> >  
> > +#define PERF_FLAG_FD_NO_GROUP	(1U << 0)
> > +#define PERF_FLAG_FD_OUTPUT	(1U << 1)
> 
> Why not extend the size of perf_counter_attr and add an output_fd 
> parameter? Zero would mean no fd (and this is also backwards 
> compatible behavior).
> 
> FD_NO_GROUP is a bit unclean API as it aliases group_fd to two 
> purposes: the real group_fd and this new output_fd. I think we 
> should move output_fd to the attribute structure.

Yeah, the NO_GROUP thing is ugly..

I'll wait for some more comments before reworking this.


  reply	other threads:[~2009-08-19 11:07 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 [this message]
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
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=1250680057.7583.341.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@googlemail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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.