mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
perf script: Fix CPU filtering of a script's switch events
commit5e0c325cdb
upstream. CPU filtering was not being applied to a script's switch events. Fixes:5bf83c29a0
("perf script: Add scripting operation process_switch()") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Riccardo Mancini <rickyman7@gmail.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20211215080636.149562-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fe5838c22b
commit
2c3920c58e
1 changed files with 1 additions and 1 deletions
|
@ -2308,7 +2308,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)
|
||||
|
|
Loading…
Reference in a new issue