[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPqJEFqJpnq1TF-ZA7Worsy2Yx6au-KHBPkCN0cSnQuyGbwsfw@mail.gmail.com>
Date: Thu, 20 Jan 2022 21:35:59 +0800
From: Eric Lin <eric.lin@...ive.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Yao Jin <yao.jin@...ux.intel.com>,
Greentime Hu <greentime.hu@...ive.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Vincent Chen <vincent.chen@...ive.com>
Subject: Re: About perf tool set exclude_guest = 1 on guest environment
Hi Namhyung,
On Wed, Jan 19, 2022 at 1:02 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> Hello,
>
> On Mon, Jan 17, 2022 at 8:05 PM Eric Lin <eric.lin@...ive.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
>
Actually, I want to run the commands in the guest.
But when I run the commands "perf record -e branches:u ls" and "perf
record -e branches ls", it will set exclude_guet = 1.
According to the documentation[1] exclude_guest definition, it should
not count guest events.
So, if I run these commands as a guest user can I get the profile data?
[1] https://man7.org/linux/man-pages/man2/perf_event_open.2.html
Thanks,
Eric Lin
> Thanks,
> Namhyung
Powered by blists - more mailing lists