From: Adrian Hunter <adrian.hunter@intel.com>
To: Andi Kleen <ak@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>, Leo Yan <leo.yan@linaro.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [PATCH V2 5/6] perf kvm report: Add guest_code support
Date: Mon, 23 May 2022 20:56:23 +0300 [thread overview]
Message-ID: <46470b7f-377b-5192-60c6-8dac2fdd196e@intel.com> (raw)
In-Reply-To: <2ff19ce9-98e3-7867-9762-ffae049f1d9b@linux.intel.com>
On 23/05/22 18:54, Andi Kleen wrote:
>
> On 5/17/2022 6:10 AM, Adrian Hunter wrote:
>> Add an option to indicate that guest code can be found in the hypervisor
>> process
>
> Sorry for harping on this, but is it correct that this assumes that the code is still at the original location at decode time?
No, at decode time, the code is found in the hypervisor dso.
>
> If yes we need some warnings for this, something like:
>
> This only works when the code is still available in the riginal memory location at decode time. This is typically the case for kernel code (unless modules are unloaded).
In this scenario, the VM does not have a kernel.
Note, there is an existing method to trace a guest kernel as described here:
https://www.man7.org/linux/man-pages/man1/perf-intel-pt.1.html#TRACING_VIRTUAL_MACHINES
For user programs it only works as long as there is no memory pressure which might cause the memory to be reused.
In this scenario, there are also no user programs in the VM, only functions from the hypervisor.
For dynamically generated (JITed) code it might be rather unreliable unless the hypervisor is SIGSTOPed during decoding.
>
next prev parent reply other threads:[~2022-05-23 18:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 13:10 [PATCH V2 0/6] perf intel-pt: Add support for tracing KVM test programs Adrian Hunter
2022-05-17 13:10 ` [PATCH V2 1/6] perf tools: Add machine to machines back pointer Adrian Hunter
2022-05-17 13:10 ` [PATCH V2 2/6] perf tools: Factor out thread__set_guest_comm() Adrian Hunter
2022-05-17 13:10 ` [PATCH V2 3/6] perf tools: Add guest_code support Adrian Hunter
2022-05-17 13:10 ` [PATCH V2 4/6] perf script: " Adrian Hunter
2022-05-17 13:10 ` [PATCH V2 5/6] perf kvm report: " Adrian Hunter
2022-05-23 15:54 ` Andi Kleen
2022-05-23 17:56 ` Adrian Hunter [this message]
2022-05-17 13:10 ` [PATCH V2 6/6] perf intel-pt: " Adrian Hunter
2022-05-23 13:19 ` [PATCH V2 0/6] perf intel-pt: Add support for tracing KVM test programs 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=46470b7f-377b-5192-60c6-8dac2fdd196e@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
/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