Re: [PATCH 1/2] perf: Enable wakeup_events logic for all events
From: Peter Zijlstra
Date: Thu May 30 2013 - 07:03:08 EST
On Thu, May 30, 2013 at 11:53:06AM +0200, Jiri Olsa wrote:
> Currently the perf_events_attr::wakeup_events logic is
> checked only for regular samples.
>
> If we have an event that produce only auxiliary events
> (MMAP|COMM|EXIT|FORK), the poll call does not follow
> the perf_events_attr wakeup_events setup and reports
> no data.
>
> Fixing this by moving the perf_events_attr::wakeup_events
> checking logic into the function and calling it from
> perf_output_end. This way any output event is checked
> properly.
>
So something like this came up before and ISTR doing a patch similar to
what you propose but ended up not going with it because... uhm...
I have vague memories about people (possibly me) wanting wake_events to
mean samples. Like get me a wakeup every 20 samples. With your patch the
side-band events now also count towards 'events'.
I think the most common use of wake_events is people setting it to 1 and
have perf generate a SIGfoo for every sample so they can do magic in
their userspace signal handler. This is popular for interpreters.
It would be unfortunate to get SIGfoos for side-band chatter.
Makes sense?
--
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/