diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index cf6dcc51375e7d6ba9fab2ab2a8e78f2c7cbfad4..7e06df4715edf3f5e5bb2b7d13389fad9b3a9b69 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -2354,7 +2354,7 @@ static int process_switch_event(struct perf_tool *tool, if (perf_event__process_switch(tool, event, sample, machine) < 0) return -1; - if (scripting_ops && scripting_ops->process_switch) + if (scripting_ops && scripting_ops->process_switch && !filter_cpu(sample)) scripting_ops->process_switch(event, sample, machine); if (!script->show_switch_events)