Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JAYHg-0003AY-Kh for qemu-devel@nongnu.org; Thu, 03 Jan 2008 17:11:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JAYHg-0003A1-17 for qemu-devel@nongnu.org; Thu, 03 Jan 2008 17:11:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JAYHf-00039r-I6 for qemu-devel@nongnu.org; Thu, 03 Jan 2008 17:11:27 -0500 Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JAYHf-0005vn-2y for qemu-devel@nongnu.org; Thu, 03 Jan 2008 17:11:27 -0500 From: Clemens Kolbitsch Subject: Re: [Qemu-devel] performance monitor References: <200801032136.27558.clemens.kol@gmx.at> <200801032238.03458.clemens.kol@gmx.at> <200801032207.08448.paul@codesourcery.com> In-Reply-To: <200801032207.08448.paul@codesourcery.com> MIME-Version: 1.0 Content-Disposition: inline Date: Thu, 3 Jan 2008 23:11:24 +0100 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200801032311.24715.clemens.kol@gmx.at> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thursday 03 January 2008 23:07:07 you wrote: > > Does anyone have an idea on how I can measure performance in qemu to a > > somewhat accurate level? I have modified qemu (the memory handling) and > > the linux kernel and want to find out the penalty this introduced... does > > anyone have any comments / ideas on this? > > Short answer is you probably can't. And even if you can I won't believe > tyour results unless you've verified them on real hardware :-) > > With the exception of some very small embedded cores, Modern CPUs have > complex out of order execution pipelines and multi-level cache hierarchies. > It's common for performance to be dominated by these secondary factors > rather than raw instruction throughput. > > Exactly what features dominate performance is very application specific. > Determining which factor dominates is unlikely to be something qemu can > help with. > > However if e.g. you know that for your application there's a good > correlation was between performance and L2 cache misses you could > instrument qemu to and a L1/L2 cache model. The overhead will be fairly > severe (easily 10x slower), and completely screw up any realtime > measurements. However it would produce some useful cache use statistics > that you could use to guesstimate actual performance. This is similar to > how cachegrind works. Obviously if your application isn't cache bound then > these figures will be meaningless. Well, the measuring I had in mind partly concentrats on TLB misses, page faults, etc. (in addition to the cycle measuring). guess i'll have to implement something for myself in qemu :-/ But thanks a lot for helping me out!