From: Like Xu <like.xu@linux.intel.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v3] perf parse-events: Set exclude_guest=1 for user-space counting
Date: Wed, 19 Aug 2020 11:05:05 +0800 [thread overview]
Message-ID: <3521b375-6f00-e815-94e5-49eae2a7c989@linux.intel.com> (raw)
In-Reply-To: <b061052d-592d-67d7-045f-481974b0687a@linux.intel.com>
Hi Arnaldo,
On 2020/8/17 10:32, Jin, Yao wrote:
> Hi Arnaldo,
>
> On 8/14/2020 8:47 PM, Arnaldo Carvalho de Melo wrote:
>> Em Fri, Aug 14, 2020 at 09:21:20AM +0800, Jin Yao escreveu:
>>> Currently if we run 'perf record -e cycles:u', exclude_guest=0.
>>>
>>> But it doesn't make sense in most cases that we request for
>>> user-space counting but we also get the guest report.
>>>
>>> Of course, we also need to consider perf kvm usage case that
>>> authorized perf users on the host may only want to count guest
>>> user space events. For example,
>>>
>>> perf kvm --guest record -e cycles:u
>> Ok, probably this works, but what if I want to record guest user samples
>> without using 'perf kvm'?
>>
>> Can we have a 'U' modifier, perhaps, for that?
>>
>> I.e.
>>
>> perf record -e cycles:uU would not set exclude_host not exclude_guest,
>> cycles:u excludes guest user, cycles:U excludes host user, would that be
>> possible?
>>
>> Anyway, I think that with what we have, your patch makes sense, having a
>> way to, without using 'perf kvm' still be able to sample the guest can
>> be done on top. of this.
>>
>> Xu, can we get your Reviewed-by if this addresses your concerns?
My concern is about do not break the perf kvm usages and Yao did it in v3.
Tested-by: Like Xu <like.xu@linux.intel.com>
>>
>> - Arnaldo
>
> Do you suggest we will create a new modifier 'U' as a follow-up patch?
>
> cycles:u - Count host user space but it doesn't count the guest user space
> (exclude_host = 0, exclude_guest = 1, exclude_kernel = 1, exclude_user = 0,
> exclude_hv = 1)
>
> cycles:U - Count the guest user space but it doesn't count the host user
> space (exclude_host = 1, exclude_guest = 0, exclude_kernel = 1,
> exclude_user = 0, exclude_hv = 1)
>
> Is above understanding correct?
Do we really need to support sample guests without using perf kvm?
If it's true, I would prefer "cycles:uG" to cover guest user space
events only, "cycles:kG" to cover guest kernel space events only,
and only host events are sampled without the ":G" modifier by default.
I am not sure if ":G" has been used in perf.
At the very least, this v3 patch may not
block the follow-up patch from Yao (if any).
Thanks,
Like Xu
>
> Thanks
> Jin Yao
next prev parent reply other threads:[~2020-08-19 3:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 1:21 [PATCH v3] perf parse-events: Set exclude_guest=1 for user-space counting Jin Yao
2020-08-14 12:47 ` Arnaldo Carvalho de Melo
2020-08-17 2:32 ` Jin, Yao
2020-08-19 3:05 ` Like Xu [this message]
2020-08-25 7:54 ` Jin, Yao
2020-08-25 16:42 ` 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=3521b375-6f00-e815-94e5-49eae2a7c989@linux.intel.com \
--to=like.xu@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=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.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