Re: Performance monitoring units and KVM

Avi Kivity
2008-01-31T16:37:16Z

Markus Armbruster wrote:
> As far as OProfile is concerned: we can make it work with whatever
> kind of virtual PMU we want, without a complete CPU fake. It just
> needs to be able to detect our virtual PMU.
>
>

Well, if the virtual PMU happens to match exactly the physical
architectural PMU, that saves us the bother of specifying and
documenting it, porting oprofile, and explaining to users that VTune
doesn't work.

>>> * OProfile user space needs to be taught where do find each guest's
>>> debug info. This one seems too horrible to contemplate. NFS exports on each guest
>>> and mounts on the host? With fuse sshfs?
>>>
>
> OProfile searches for debug info in a couple of places in the
> filesystem. Perhaps we could teach it to take a guest root directory
> parameter, and search a guest's debuginfo below that. How the
> debuginfo gets there is then the user's problem (NFS mount, fetch &
> unpack rpms, ...).
>
>

unionfs can help here.

>
> However, there are uses for collecting a guest's data on the guest as
> well. Say you run some very low-overhead, system-wide sampling
> continuously on the host, and let guests subscribe to it (no root on
> host required). Kind of like a very limited virtual PMU that doesn't
> give you many choices on how to sample.
>
>

You're describing the architectural PMU again: guest-wide profiling
without access to the rest of the system.

> If we need this capability anyway, we can just as well start with it,
> because it seems easier than collecting everything on the host.
>
>

I believe that PMU passthrough is the easiest, followed by emulating the
architectural PMU where it doesn't exist.

--
error compiling committee.c: too many arguments to function