From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ML1ri-00061r-0x for qemu-devel@nongnu.org; Sun, 28 Jun 2009 17:24:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ML1rd-0005qi-BV for qemu-devel@nongnu.org; Sun, 28 Jun 2009 17:24:45 -0400 Received: from [199.232.76.173] (port=47822 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ML1rd-0005qJ-6e for qemu-devel@nongnu.org; Sun, 28 Jun 2009 17:24:41 -0400 Received: from mail-fx0-f209.google.com ([209.85.220.209]:57910) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ML1rc-0005sx-Qt for qemu-devel@nongnu.org; Sun, 28 Jun 2009 17:24:41 -0400 Received: by fxm5 with SMTP id 5so2747718fxm.34 for ; Sun, 28 Jun 2009 14:24:39 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5b31733c0906281119r7ea485b6k81f8e59fd3aa4926@mail.gmail.com> References: <5b31733c0906281119r7ea485b6k81f8e59fd3aa4926@mail.gmail.com> Date: Sun, 28 Jun 2009 23:24:39 +0200 Message-ID: <761ea48b0906281424p5966022erbcb20143c06fd6b3@mail.gmail.com> Subject: Re: OT: TCG SSA, speed, misc (was Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command) From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Filip Navara Cc: Anthony Liguori , ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , Blue Swirl , Avi Kivity On Sun, Jun 28, 2009 at 8:19 PM, Filip Navara wrote: > Doing a profiling run on several ARM demo programs showed that most of > the generated code was doing load/store operations to the machine > registers (in CPU_env). Sample run of FreeRTOS looked like this (OP > counts): > > movi_i32 1603 > ld_i32 1305 > st_i32 1174 > add_i32 530 > ... > > If there could be done something that would allow the guest registers > to be stored in host registers, even if for a temporary amount of time > it would certainly help the guests that I'm dealing with. TCG does a good job for register allocation. The problem you have here is that the ARM translator isn't using tcg_global_mem_new_i32 for ARM registers. Here's an example of number of ops I see when using tcg_global_mem_new_i32: exit_tb 4991 add_i32 7945 st_i32 8257 movi_i32 26812 mov_i32 38369 And with the trunk: exit_tb 4957 add_i32 8165 st_i32 20281 ld_i32 21926 movi_i32 25083 Laurent