diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-09-09 16:06:56 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-09-09 16:32:45 -0400 |
commit | 4a31090a8a36137935e36885092aeda5a70a931a (patch) | |
tree | 90150e07faa6b40d58444bbcccb5db954d2a8da6 | |
parent | b05247a88750a934530173b8b35dd3463fa203bf (diff) | |
download | libtraceevent-4a31090a8a36137935e36885092aeda5a70a931a.tar.gz |
libtraceevent/sched_switch: Do not have sched_switch plugin complain about target_cpu
Older kernels did not have "target_cpu" as a field for wake up events. Do
not complain if it doesn't exist.
Link: https://lore.kernel.org/linux-trace-devel/20210909160656.21f27793@gandalf.local.home
Fixes: 159f118588 ("libtraceevent: Do not print message if wakeup success field is missing")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | plugins/plugin_sched_switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/plugin_sched_switch.c b/plugins/plugin_sched_switch.c index 73145ff..8752cae 100644 --- a/plugins/plugin_sched_switch.c +++ b/plugins/plugin_sched_switch.c @@ -73,7 +73,7 @@ static int sched_wakeup_handler(struct trace_seq *s, if (tep_get_field_val(s, event, "success", record, &val, 0) == 0) trace_seq_printf(s, " success=%lld", val); - if (tep_get_field_val(s, event, "target_cpu", record, &val, 1) == 0) + if (tep_get_field_val(s, event, "target_cpu", record, &val, 0) == 0) trace_seq_printf(s, " CPU:%03llu", val); return 0; |