On Sat, 6 Nov 2010, Stefan Hajnoczi wrote:
> On Thu, Nov 4, 2010 at 7:20 PM, Vince Weaver <vi...@csl.cornell.edu> wrote: > > This is mostly a proof of concept, I'm not sure if anyone is interested in > > this. It could in theory be useful for tracking down performance problems > > from iside of Qemu using existing tools. > > This patch handles uniprocessor guests only? yes; I typically only runs Qemu in uniprocessor mode so I hadn't thought about CMP support. In theory it shouldn't require too many changes to the actual MSR code because the kernel handles saving/restoring the counter values on context switch, but it would involve separate per-core simulated instruction counters. Hmmm. > There was a patch series a few months back by Yanmin Zhang to > implement a paravirt perf interface. The subject line was "para virt > interface of perf to support kvm guest os statistics collection in > guest os". It might be interesting to follow that up if you haven't > seen it already. Thanks for pointing that out! I had been looking for something like that and somehow missed it at the time. That patch seems to export a para-virtualized counter interface. While useful, it would require code changes for external tools, and it also wouldn't allow for tools that program raw events into the counters (as opposed to the handful of predefined kernel perf-events ones). Thanks for the feedback. Vince