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
null.

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.

Link: https://lore.kernel.org/linux-trace-devel/20210923140643.3975473-1-john@metanate.com

Fixes: b39499d (kernel-shark: Speed-up the sched_events plugin)
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
1 file changed