From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LjZN3-0004b4-JK for qemu-devel@nongnu.org; Tue, 17 Mar 2009 09:30:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LjZMy-0004Zd-Hd for qemu-devel@nongnu.org; Tue, 17 Mar 2009 09:30:16 -0400 Received: from [199.232.76.173] (port=54587 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LjZMy-0004ZQ-C2 for qemu-devel@nongnu.org; Tue, 17 Mar 2009 09:30:12 -0400 Received: from mail-fx0-f169.google.com ([209.85.220.169]:59926) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LjZMy-0003Rw-2j for qemu-devel@nongnu.org; Tue, 17 Mar 2009 09:30:12 -0400 Received: by fxm17 with SMTP id 17so41172fxm.34 for ; Tue, 17 Mar 2009 06:30:10 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 17 Mar 2009 14:30:09 +0100 Message-ID: <761ea48b0903170630s6b7274e7u63e30035dcea9c3c@mail.gmail.com> Subject: Re: [Qemu-devel] branches are expensive From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 On Tue, Mar 17, 2009 at 12:05 PM, Steffen Liebergeld wrote: > > 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. This raises a few questions: 1. are you talking of qemu system or qemu user (I guess the former)? 2. how did you measure executed host instructions? 3. what is your host processor? My experience on TB for qemu user is about x7 code *size* expansion on a x86_64 (though svn qemu is probably higher as I have a few specific tunings). Laurent