From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: [PATCH 1/2] perf report: apply --cpu filter before --switch-on/--switch-off
Date: Sat, 25 Jan 2020 19:10:57 +0300 [thread overview]
Message-ID: <157996865709.8036.5145089242955353200.stgit@buzz> (raw)
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
next reply other threads:[~2020-01-25 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-25 16:10 Konstantin Khlebnikov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=157996865709.8036.5145089242955353200.stgit@buzz \
--to=khlebnikov@yandex-team.ru \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).