From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkGWa-0005Kl-Q2 for qemu-devel@nongnu.org; Thu, 19 Mar 2009 07:35:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkGWW-0005J0-RP for qemu-devel@nongnu.org; Thu, 19 Mar 2009 07:35:00 -0400 Received: from [199.232.76.173] (port=34715 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkGWW-0005Ix-Mv for qemu-devel@nongnu.org; Thu, 19 Mar 2009 07:34:56 -0400 Received: from mx20.gnu.org ([199.232.41.8]:55610) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LkGWW-0001Q0-FL for qemu-devel@nongnu.org; Thu, 19 Mar 2009 07:34:56 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkGWU-0003Ij-7b for qemu-devel@nongnu.org; Thu, 19 Mar 2009 07:34:54 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: branches are expensive Date: Thu, 19 Mar 2009 11:34:49 +0000 References: <200903171251.41148.paul@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903191134.50404.paul@codesourcery.com> 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 Cc: Steffen Liebergeld > I've tested Qemu 0.10.0 and with i386-softmmu on a i386 host I get the > following numbers: > direct jump count 70%, 2 jumps 54% > > For completeness I tested qemu-system-arm on a i386 host as well: > direct jump count 44%, 2 jumps 37% > > So it looks like the chaining on ARM targets is not as effective as on i386 > targets (regardless of the guest, I used the same guest setup, compiled for > different architectures, on all tests). Do you have any ideas why this is > the case? A couple of likely reasons: - ARM uses 1k pages, i386 uses 4k pages, so there's greater probability of spanning a page boundary. - ARM has conditional execution, so code will tend to have less conditional branches. The number of function calls (in particular function returns, which are indirect branches) is likely to be about the same, so the proportion of direct jumps is less. Paul