Re: [PATCH 2/2] perf: Walk through the relevant events only

From: Peter Zijlstra
Date: Fri Mar 05 2010 - 04:39:53 EST


On Fri, 2010-03-05 at 08:00 +0100, Frederic Weisbecker wrote:
> Each time a trace event triggers, we walk through the entire
> list of events from the active contexts to find the perf events
> that match the current one.
>
> This is wasteful. To solve this, we maintain a per cpu list of
> the active perf events for each running trace events and we
> directly commit to these.

Right, so this seems a little trace specific. I once thought about using
a hash table to do this for all software events. It also keeps it all
nicely inside perf_event.[ch].



--
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/