Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AJa1L-0004ex-UD for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:01:31 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AJa0o-0004YY-CJ for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:01:29 -0500 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AJa0o-0004YN-36 for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:00:58 -0500 Received: from [130.235.20.3] (helo=nic.lth.se) by mx20.gnu.org with esmtp (Exim 4.24) id 1AJYor-0007Ir-Cy for qemu-devel@nongnu.org; Tue, 11 Nov 2003 08:44:33 -0500 Received: from bushwacker (h55x405.delphi.afb.lu.se [130.235.189.22]) by nic.lth.se (8.12.10/8.12.10) with SMTP id hABDiQ94029530 for ; Tue, 11 Nov 2003 14:44:26 +0100 (MET) Date: Tue, 11 Nov 2003 14:44:26 +0100 From: Johan Rydberg Subject: Re: [Qemu-devel] Basic block statistics Message-Id: <20031111144426.08e186da.jrydberg@night.trouble.net> In-Reply-To: <20031111141433.0cc62077.jrydberg@night.trouble.net> References: <20031111141433.0cc62077.jrydberg@night.trouble.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Johan Rydberg wrote: (Yes, I did) : I have yet not figured out a way to alter QEMU to see how much of : the execution time these blocks consume. Say that the ~2.38% of : the blocks consume 10% of the time, it might be worth doing extra : optmizations on then. Fabrice, do you know how I could hack QEMU : to get this kind of information? I disabled chaining and counted each invoking of basic blocks, and maintained a separate counter for those blocks that contain internal loops. Booting the Debian image to the login prompt gave that the blocks with internal loops stod for 33.7% of all invoked blocks. Can anyone verify this? (by hacking QEMU yourself, both verifying the numbers and that I collect the statistics correctly) It should not take more than 20 minutes all together. Assume that the values are correct. Then optimization of the blocks that contain loops could result in a rather huge performance boost. You could for example try to move register stores and loads out of the it and just work with host registers in the actual loop. -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/