Re: [PATCH] perf: Set filters before mmaping events

From: Ingo Molnar
Date: Wed Mar 02 2011 - 03:49:44 EST



* Frederic Weisbecker <fweisbec@xxxxxxxxx> wrote:

> We currently set the filters after we mmap the events, this is a
> race that let undesired events record themselves in the buffer before
> we had the time to set the filters.
>
> So set the filters before they can be recorded. That also librarizes
> the filters setting so that filtering can be done more easily
> from other tools than perf record later.
>
> (PS: This should fix most of the bugs Ingo has reported
> about filters that weren't working with perf).

Nice!

Mind pulling Steve's filter-enhancements branch and sending a pull request for the
whole thing? Steve's branch was:

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git tip/perf/filter

( Or your fixes could be applied to Steve's branch as well - whichever direction you
guys prefer - the important thing is to have filtering tested and validated as a
whole. )

Thanks,

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