public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf report: apply --cpu filter before --switch-on/--switch-off
@ 2020-01-25 16:10 Konstantin Khlebnikov
  2020-01-25 16:10 ` [PATCH 2/2] perf evswitch: Add --switch-on-delay/--switch-off-delay Konstantin Khlebnikov
  0 siblings, 1 reply; 3+ messages in thread
From: Konstantin Khlebnikov @ 2020-01-25 16:10 UTC (permalink / raw)
  To: linux-kernel, Arnaldo Carvalho de Melo

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@yandex-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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-25 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-25 16:10 [PATCH 1/2] perf report: apply --cpu filter before --switch-on/--switch-off Konstantin Khlebnikov
2020-01-25 16:10 ` [PATCH 2/2] perf evswitch: Add --switch-on-delay/--switch-off-delay Konstantin Khlebnikov
2020-01-25 16:18   ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox