From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjXau-0000uI-Ll for qemu-devel@nongnu.org; Tue, 17 Mar 2009 07:36:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjXap-0000s8-U9 for qemu-devel@nongnu.org; Tue, 17 Mar 2009 07:36:28 -0400 Received: from [199.232.76.173] (port=42280 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjXap-0000s3-Lf for qemu-devel@nongnu.org; Tue, 17 Mar 2009 07:36:23 -0400 Received: from main.gmane.org ([80.91.229.2]:45781 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LjXal-0006X2-Op for qemu-devel@nongnu.org; Tue, 17 Mar 2009 07:36:21 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LjXak-0005nh-2s for qemu-devel@nongnu.org; Tue, 17 Mar 2009 11:36:18 +0000 Received: from 141.76.6.219 ([141.76.6.219]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Mar 2009 11:36:18 +0000 Received: from usenet by 141.76.6.219 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Mar 2009 11:36:18 +0000 From: Steffen Liebergeld Date: Tue, 17 Mar 2009 11:36:07 +0000 (UTC) Message-ID: References: <49BF86FC.4060206@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: news Subject: [Qemu-devel] Re: branches are expensive 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 Hi Avi, Avi Kivity schrieb: > Steffen Liebergeld wrote: >> Hi, >> >> while measuring the execution of an ARM guest, I encountered that branches are >> extremely expensive in terms of executed host instructions. A single ARM >> branch takes 148 to 152 host instructions. In my setup host and guest use the >> ARM instruction set architecture. >> >> My question is what makes branches so expensive? What code is run when >> executing a branch? Other instructions are translated to 14 to 40 >> instructions. >> > > I'm no tcg guru, but if branches are not chained, you'd need an > expensive lookup to find the next translation block. If branches are > chained they'll probably be much faster. Sure. But how can I get to know how many TBs are chained. Greetings, Steffen