From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54924 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFuKL-0008F4-Ek for qemu-devel@nongnu.org; Tue, 09 Nov 2010 14:57:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFuKJ-00062I-IX for qemu-devel@nongnu.org; Tue, 09 Nov 2010 14:57:56 -0500 Received: from csl.cornell.edu ([128.84.224.10]:1550 helo=vlsi.csl.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFuKJ-0005yz-FU for qemu-devel@nongnu.org; Tue, 09 Nov 2010 14:57:55 -0500 Date: Tue, 9 Nov 2010 14:57:38 -0500 (EST) From: Vince Weaver Subject: Re: [Qemu-devel] [patch] performance counters from inside of Qemu In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1597469294-1289332663=:7306" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1597469294-1289332663=:7306 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by vlsi.csl.cornell.edu id oA9Jvcj7004345 On Sat, 6 Nov 2010, Stefan Hajnoczi wrote: > On Thu, Nov 4, 2010 at 7:20 PM, Vince Weaver wr= ote: > > This is mostly a proof of concept, I'm not sure if anyone is interest= ed in > > this. =A0It could in theory be useful for tracking down performance p= roblems > > from iside of Qemu using existing tools. >=20 > This patch handles uniprocessor guests only? yes; I typically only runs Qemu in uniprocessor mode so I hadn't thought=20 about CMP support. In theory it shouldn't require too many changes to th= e=20 actual MSR code because the kernel handles saving/restoring the counter=20 values on context switch, but it would involve separate per-core simulate= d=20 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= =20 and somehow missed it at the time. That patch seems to export a para-virtualized counter interface. While=20 useful, it would require code changes for external tools, and it also=20 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 --8323329-1597469294-1289332663=:7306--