kernel-shark: Handle traces with sched_wakeup but not sched_waking

If sched_wakeup or sched_wakeup_new is avaiable but sched_waking is not,
then define_wakeup_event() returns true even though waking_event_ptr is

Change find_wakeup_event() to avoid overwriting the output parameter on
error so that the define_wakeup_event() returns true iff
*waking_event_ptr is non-null.


Fixes: b39499d (kernel-shark: Speed-up the sched_events plugin)
Signed-off-by: John Keeping <>
Signed-off-by: Yordan Karadzhov (VMware) <>
1 file changed