Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AJZWu-0004uS-6B for qemu-devel@nongnu.org; Tue, 11 Nov 2003 09:30:04 -0500 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AJZVF-0003uc-FM for qemu-devel@nongnu.org; Tue, 11 Nov 2003 09:28:52 -0500 Received: from [130.235.20.3] (helo=nic.lth.se) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AJZJI-00005C-5y for qemu-devel@nongnu.org; Tue, 11 Nov 2003 09:16:00 -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 hABDEX94028857 for ; Tue, 11 Nov 2003 14:14:34 +0100 (MET) Date: Tue, 11 Nov 2003 14:14:33 +0100 From: Johan Rydberg Message-Id: <20031111141433.0cc62077.jrydberg@night.trouble.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Basic block statistics Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, I hacked QEMU to dump some statistics regarding the length of the basic blocks with respect of their length. I booted the Debian image suppblied by Leigh Dyer til the login prompt. It seems that the avg basic block length is ~ 5 insns. This seems as a reasonable number for C code. What is a bit supprising to me is that only ~ 0.3 % of these blocks has internal loops (the CTI insn at the end has the first insn in the BB as target). If you treat basic blocks that has just includes a single insn with a rep/repz prefix, the amount of basic blocks that contain loops increases to ~ 2.38 %. 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? -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/