[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 8/9] plugins: new hwprofile plugin
From: |
Alex Bennée |
Subject: |
Re: [PATCH v1 8/9] plugins: new hwprofile plugin |
Date: |
Wed, 03 Jun 2020 18:23:28 +0100 |
User-agent: |
mu4e 1.5.1; emacs 28.0.50 |
Peter Maydell <peter.maydell@linaro.org> writes:
> On Tue, 2 Jun 2020 at 16:54, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>> This is a plugin intended to help with profiling access to various
>> bits of system hardware. It only really makes sense for system
>> emulation.
>>
>> It takes advantage of the recently exposed helper API that allows us
>> to see the device name (memory region name) associated with a device.
>
> This feels like we've let the plugin API get slightly more
> access to QEMU's internals than is ideal. Whether an area
> of memory happens to be an IO memory region or a memory-backed
> one (or whether a device is implemented with one region or
> three, or what names we happened to assign them) is kind of
> a QEMU internal implementation detail.
I'm not so sure it's that much of an implementation detail.
The distinction is between plain RAM and everything else. The details of
the everything else is opaque but the name we pass is public information
(you can get it from "info mtree -o") and you can certainly infer useful
stuff from it. For example the virtio-pci-notify areas are regions of
access that will trap on a real hypervisor so allow us to measure how
many vmexits some software might cause.
At the moment I do make up names for regions that get re-generated due
to "reasons" (I never quite understood what the region code was doing
under the hood). Maybe we should only export names of devices the user
has explicitly tagged with -device foo,id=bar?
What should we do about the offset? Most devices export several regions
and there is no reason why those regions should all be together in the
memory map. Does just exposing a physical address make sense here?
--
Alex Bennée
Re: [PATCH v1 0/9] plugins/next (bug fixes, hwprofile, lockstep), no-reply, 2020/06/02
Re: [PATCH v1 0/9] plugins/next (bug fixes, hwprofile, lockstep), no-reply, 2020/06/02