[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <157996865709.8036.5145089242955353200.stgit@buzz>
Date: Sat, 25 Jan 2020 19:10:57 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: [PATCH 1/2] perf report: apply --cpu filter before
--switch-on/--switch-off
If report focus on particular cpus then event switch should see only them.
Perf script/trace/top already works in this way.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Fixes: ef4b1a539f4b ("perf report: Add --switch-on/--switch-off events")
---
tools/perf/builtin-report.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index de988589d99b..f03120c641c0 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -258,6 +258,9 @@ static int process_sample_event(struct perf_tool *tool,
return 0;
}
+ if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap))
+ return 0;
+
if (evswitch__discard(&rep->evswitch, evsel))
return 0;
@@ -270,9 +273,6 @@ static int process_sample_event(struct perf_tool *tool,
if (symbol_conf.hide_unresolved && al.sym == NULL)
goto out_put;
- if (rep->cpu_list && !test_bit(sample->cpu, rep->cpu_bitmap))
- goto out_put;
-
if (sort__mode == SORT_MODE__BRANCH) {
/*
* A non-synthesized event might not have a branch stack if
Powered by blists - more mailing lists