lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/7 v6] perf/core: Add a callback to perf events
From
Date
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.

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.



\
 
 \ /
  Last update: 2009-11-18 10:33    [W:0.073 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site