lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf parse-events: Set exclude_guest for user-space counting
Date
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
\
 
 \ /
  Last update: 2020-08-12 09:01    [W:0.087 / U:6.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site