lkml.org 
[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Perf: event wakeup discards sched_waking events
On Thu, Jan 10, 2019 at 12:45:27PM -0500, Mathieu Desnoyers wrote:

> static void perf_pending_event(struct irq_work *entry)
> {
> struct perf_event *event = container_of(entry,
> struct perf_event, pending);
> int rctx;
>
> rctx = perf_swevent_get_recursion_context();
> /*
> * If we 'fail' here, that's OK, it means recursion is already disabled
> * and we won't recurse 'further'.
> */
>
> if (event->pending_disable) {
> event->pending_disable = 0;
> perf_event_disable_local(event);
> }
>
> if (event->pending_wakeup) {
> event->pending_wakeup = 0;
> perf_event_wakeup(event);
> }
>
> if (rctx >= 0)
> perf_swevent_put_recursion_context(rctx);
> }
>
> One side-effect of perf_event_wakeup() is to generate a sched_waking
> event. But I suspect it won't be traced by perf because it is invoked before
> putting the recursion context.
>
> Is there a reason why the wakeup is done before putting the recursion
> context ?

d525211f9d1b ("perf: Fix irq_work 'tail' recursion")

If we were to allow perf_event_wakeup() to generate its tracepoint, we'd
be back to square #1, no?

\
 
 \ /
  Last update: 2019-01-14 14:11    [W:0.098 / U:6.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site