Skip to content

Commit 5e0c325

Browse files
ahunter6acmel
authored andcommitted
perf script: Fix CPU filtering of a script's switch events
CPU filtering was not being applied to a script's switch events. Fixes: 5bf83c2 ("perf script: Add scripting operation process_switch()") Signed-off-by: Adrian Hunter <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Riccardo Mancini <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent a78abde commit 5e0c325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-script.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2473,7 +2473,7 @@ static int process_switch_event(struct perf_tool *tool,
24732473
if (perf_event__process_switch(tool, event, sample, machine) < 0)
24742474
return -1;
24752475

2476-
if (scripting_ops && scripting_ops->process_switch)
2476+
if (scripting_ops && scripting_ops->process_switch && !filter_cpu(sample))
24772477
scripting_ops->process_switch(event, sample, machine);
24782478

24792479
if (!script->show_switch_events)

0 commit comments

Comments
 (0)