lkml.org 
[lkml]   [2022]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: About perf tool set exclude_guest = 1 on guest environment
Hello,

On Mon, Jan 17, 2022 at 8:05 PM Eric Lin <eric.lin@sifive.com> wrote:
>
> Hi all,
>
> Currently, I run the perf command 'perf record -e branches:u ls' and
> 'perf record -e branches ls'. It will set exclude_guest = 1 as below:
>
> # perf record -e branches:u ls
> # perf evlist -v
> branches:u: .., exclude_kernel: 1, exclude_hv: 1,, exclude_guest: 1, ..
>
> # perf record -e branches ls
> # perf evlist -v
> branches: ..., exclude_guest: 1, ...
>
> As I understand it, set exclude_guest =1 will not include guest counting.
> May I ask if I run the above commands as a guest user, should the
> architecture implementation ignore this exclude_guest flags and still
> make perf can count guest events in Linux kernel?

So do you want to run the command in the host?
Then you can use both 'H' and 'G' modifiers like

# perf record -e branches:HG ls

or (for user-mode only)

# perf record -e branches:uHG ls

Thanks,
Namhyung

\
 
 \ /
  Last update: 2022-01-19 06:03    [W:0.081 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site