libtraceevent/sched_switch: Do not have sched_switch plugin complain about target_cpu
PATCH 1/1 libtraceevent/sched_switch: Do not have sched_switch plugin complain about target_cpu
From: "Steven Rostedt (VMware)" <[email protected]>
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) <[email protected]>
--- plugins/plugin_sched_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
plugins/plugin_sched_switch.c +1 -1
@@ -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 ;
Signature · 1 line
2.31.1