qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Robert Foley <robert.foley@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Robert Henry <robhenry@microsoft.com>,
	Aaron Lindsay <aaron@os.amperecomputing.com>,
	"Emilio G. Cota" <cota@braap.org>,
	Peter Puhov <peter.puhov@linaro.org>,
	"Chenqun \(kuhn\)" <kuhn.chenqun@huawei.com>
Subject: Re: [PATCH v1 8/9] plugins: new hwprofile plugin
Date: Wed, 03 Jun 2020 18:23:28 +0100	[thread overview]
Message-ID: <87lfl45ai7.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA-kPZoumxfLgjxPfCPDmPgsAFCjB-zdicsiGeqSOPOH7Q@mail.gmail.com>


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


  reply	other threads:[~2020-06-03 17:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 15:46 [PATCH v1 0/9] plugins/next (bug fixes, hwprofile, lockstep) Alex Bennée
2020-06-02 15:46 ` [PATCH v1 1/9] plugins: new lockstep plugin for debugging TCG changes Alex Bennée
2020-06-02 15:46 ` [PATCH v1 2/9] qemu-plugin.h: add missing include <stddef.h> to define size_t Alex Bennée
2020-06-02 15:46 ` [PATCH v1 3/9] scripts/clean-includes: Mark 'qemu/qemu-plugin.h' as special header Alex Bennée
2020-06-02 15:46 ` [PATCH v1 4/9] tests/plugin: correctly honour io_count Alex Bennée
2020-06-02 17:07   ` Philippe Mathieu-Daudé
2020-06-02 15:46 ` [PATCH v1 5/9] cputlb: ensure we re-fill the TLB if it has reset Alex Bennée
2020-06-02 16:34   ` Richard Henderson
2020-06-02 16:56     ` Alex Bennée
2020-06-02 15:46 ` [PATCH v1 6/9] hw/virtio/pci: include vdev name in registered PCI sections Alex Bennée
2020-06-02 15:59   ` Philippe Mathieu-Daudé
2020-06-04 11:35   ` Michael S. Tsirkin
2020-06-02 15:46 ` [PATCH v1 7/9] plugins: add API to return a name for a IO device Alex Bennée
2020-06-02 16:06   ` Clement Deschamps
2020-06-08  3:45   ` Emilio G. Cota
2020-06-08  6:20     ` Philippe Mathieu-Daudé
2020-06-08  8:06     ` Alex Bennée
2020-06-09  4:09       ` Emilio G. Cota
2020-06-09 11:09         ` Alex Bennée
2020-06-10  2:32           ` Emilio G. Cota
2020-06-02 15:46 ` [PATCH v1 8/9] plugins: new hwprofile plugin Alex Bennée
2020-06-02 19:16   ` Robert Foley
2020-06-03 11:43     ` Alex Bennée
2020-06-03 15:42       ` Robert Foley
2020-06-03 17:26         ` Alex Bennée
2020-06-03 15:48   ` Peter Maydell
2020-06-03 17:23     ` Alex Bennée [this message]
2020-06-02 15:46 ` [PATCH v1 9/9] .travis.yml: allow failure for unreliable hosts Alex Bennée
2020-06-03  8:18   ` Philippe Mathieu-Daudé
2020-06-03 12:40     ` Philippe Mathieu-Daudé
2020-06-11 11:20   ` Thomas Huth
2020-06-02 17:03 ` [PATCH v1 0/9] plugins/next (bug fixes, hwprofile, lockstep) no-reply
2020-06-02 19:16 ` no-reply

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=87lfl45ai7.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=aaron@os.amperecomputing.com \
    --cc=cota@braap.org \
    --cc=kuhn.chenqun@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=peter.puhov@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.foley@linaro.org \
    --cc=robhenry@microsoft.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;
as well as URLs for NNTP newsgroup(s).