[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091119154349.GA4967@nowhere>
Date: Thu, 19 Nov 2009 16:43:56 +0100
From: Frederic Weisbecker <fweisbec@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
Li Zefan <lizf@...fujitsu.com>,
Prasad <prasad@...ux.vnet.ibm.com>,
Alan Stern <stern@...land.harvard.edu>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Jan Kiszka <jan.kiszka@....de>,
Jiri Slaby <jirislaby@...il.com>, Avi Kivity <avi@...hat.com>,
Paul Mackerras <paulus@...ba.org>,
Mike Galbraith <efault@....de>,
Masami Hiramatsu <mhiramat@...hat.com>,
Paul Mundt <lethal@...ux-sh.org>,
Arjan van de Ven <arjan@...ux.intel.com>
Subject: Re: [PATCH 3/7 v6] perf/core: Add a callback to perf events
On Wed, Nov 18, 2009 at 10:31:09AM +0100, Peter Zijlstra wrote:
> On Wed, 2009-11-18 at 01:18 +0100, Frederic Weisbecker wrote:
> > On Tue, Nov 17, 2009 at 12:28:53PM +0100, Peter Zijlstra wrote:
> > > On Sun, 2009-11-08 at 16:28 +0100, Frederic Weisbecker wrote:
> > > > A simple callback in a perf event can be used for multiple purposes.
> > > > For example it is useful for triggered based events like hardware
> > > > breakpoints that need a callback to dispatch a triggered breakpoint
> > > > event.
> > > >
> > > > v2: Simplify a bit the callback attribution as suggested by Paul
> > > > Mackerras
> > >
> > > Yuck! So we add an opaque callback without semantics nor usage.
> >
> >
> > Yeah, this is intended for events that need to be able to trigger
> > events to different channels. In the case of hw-breakpoints, it's
> > either perf buffer, ptrace, etc...
> >
> > Should I add some comments about it?
>
> At the very least.. describe its semantics and preferably rename the
> thing.
May be "event_triggered"?
> Currently I've no clue what it does and why, your description above
> about multiple channels does not at all help me understand how this
> function pointer is used to make that happen.
>
We need it for hardware breakpoints because if we register a breakpoint
for perf syscall use, we need to dispatch the event to perf. But if we
register it for ptrace, or any in-kernel uses, we need to dispatch the
event somewhere else and then we need another callback.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists