Re: [RFC PATCH 5/5] perf: Implement perf_output_addr()

From: Peter Zijlstra
Date: Wed May 19 2010 - 12:34:33 EST


On Wed, 2010-05-19 at 12:27 -0400, Steven Rostedt wrote:

> OK, so I would let them evaluate separately. If they do have two
> different results, then that's fine, because the view of an event could
> possible be different. The &bar may change in the two instances, but how
> much does that matter? Which version of &bar is correct anyway?

Right, can do, but again, that sucks for filters -- I'm starting to
think we never should have accepted that stuff.

> How do you handle the multiple readers then? The call to record the
> event copies to each buffer that is registered for that event?

Yeah, each perf_event has its own buffer (usually) so we simply generate
multiple events, one for each buffer. The readers, task A and B will get
wakeups once in a while to empty the buffer.

> If more than one buffer is attached to an event, you could also work to
> directly write to one, and then copy directly from that buffer to the
> others.

Yeah, I mentioned this a few emails back, but since you need the keep
the commit open until you've copied it the code can get quite ugly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/