* [PATCH] libtraceevent/sched_switch: Do not have sched_switch plugin complain about target_cpu
@ 2021-09-09 20:06 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-09-09 20:06 UTC (permalink / raw)
To: Linux Trace Devel
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Older kernels did not have "target_cpu" as a field for wake up events. Do
not complain if it doesn't exist.
Fixes: 159f118588 ("libtraceevent: Do not print message if wakeup success field is missing")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
plugins/plugin_sched_switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-09 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 20:06 [PATCH] libtraceevent/sched_switch: Do not have sched_switch plugin complain about target_cpu Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).