From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com
Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com, like.xu@linux.intel.com,
Jin Yao <yao.jin@linux.intel.com>
Subject: [PATCH] perf parse-events: Set exclude_guest for user-space counting
Date: Wed, 12 Aug 2020 14:59:53 +0800 [thread overview]
Message-ID: <20200812065953.22143-1-yao.jin@linux.intel.com> (raw)
Currently if we run 'perf record -e cycles:u', exclude_guest is 0.
But it doesn't make sense that we request for user-space counting
but we also get the guest report.
To keep perf semantics consistent and clear, this patch sets
exclude_guest for user-space counting.
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
---
tools/perf/util/parse-events.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 9f7260e69113..4d809f1fe269 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1794,6 +1794,8 @@ static int get_event_modifier(struct event_modifier *mod, char *str,
if (*str == 'u') {
if (!exclude)
exclude = eu = ek = eh = 1;
+ if (!exclude_GH)
+ eG = 1;
eu = 0;
} else if (*str == 'k') {
if (!exclude)
--
2.17.1
next reply other threads:[~2020-08-12 7:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 6:59 Jin Yao [this message]
2020-08-12 12:15 ` [PATCH] perf parse-events: Set exclude_guest for user-space counting Arnaldo Carvalho de Melo
2020-08-12 12:55 ` Arnaldo Carvalho de Melo
2020-08-13 5:09 ` Jin, Yao
2020-08-12 13:02 ` Like Xu
2020-08-13 3:11 ` Jin, Yao
2020-08-13 6:57 ` Like Xu
2020-08-13 7:08 ` Jin, Yao
2020-08-13 7:21 ` Like Xu
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=20200812065953.22143-1-yao.jin@linux.intel.com \
--to=yao.jin@linux.intel.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=like.xu@linux.intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
/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