From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AJaIg-0003XN-Tj for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:19:26 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AJaI9-0003R7-VR for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:19:25 -0500 Received: from [193.252.22.25] (helo=mwinf0604.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJaI4-0003Qs-9A for qemu-devel@nongnu.org; Tue, 11 Nov 2003 10:18:48 -0500 Received: from free.fr (ATuileries-112-1-2-169.w80-14.abo.wanadoo.fr [80.14.188.169]) by mwinf0604.wanadoo.fr (SMTP Server) with ESMTP id 40E1928001B1 for ; Tue, 11 Nov 2003 15:17:23 +0100 (CET) Message-ID: <3FB0EF9D.8040900@free.fr> Date: Tue, 11 Nov 2003 15:18:05 +0100 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] Basic block statistics References: <20031111141433.0cc62077.jrydberg@night.trouble.net> <20031111144426.08e186da.jrydberg@night.trouble.net> In-Reply-To: <20031111144426.08e186da.jrydberg@night.trouble.net> Content-Type: text/plain; charset=us-ascii; format=flowed 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: > 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. I would have done about the same to get the stats :-) I read that wabi was able to optimize these kind of loops, so I guess it is really interesting. > 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. I don't have time yet to optimize QEMU, but I'll think about that. Of course if someone does the patch I will accept it ! Fabrice.