From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=32840 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzDEe-0001Ni-Ns for qemu-devel@nongnu.org; Mon, 14 Mar 2011 15:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzDEb-0002RM-C1 for qemu-devel@nongnu.org; Mon, 14 Mar 2011 15:15:19 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:43013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzDEb-0002RE-8z for qemu-devel@nongnu.org; Mon, 14 Mar 2011 15:15:17 -0400 Received: by vws17 with SMTP id 17so3022466vws.4 for ; Mon, 14 Mar 2011 12:15:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20110220165637.GK18619@volta.aurel32.net> <4D621DE8.60506@redhat.com> From: Blue Swirl Date: Mon, 14 Mar 2011 21:14:55 +0200 Message-ID: Subject: Re: [Qemu-devel] Re: qemu-0.14.0 doesn't compile on ppc32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Peter Maydell , Alexander Graf , qemu-devel@nongnu.org, Paolo Bonzini , nello martuscielli , Aurelien Jarno On Mon, Mar 14, 2011 at 12:33 PM, Stefan Hajnoczi wrot= e: > On Mon, Mar 14, 2011 at 10:23 AM, Peter Maydell > wrote: >> On 21 February 2011 08:10, Paolo Bonzini wrote: >>> On 02/20/2011 06:32 PM, Peter Maydell wrote: >>>> Some of qemu's code does seem to trigger rather excessive memory >>>> use by gcc; for instance we've had problems with memory usage >>>> building for ARM with gcc of target-sparc/translate.c wanting >>>> gigabytes of RAM with some compiler flags: >>>> https://bugs.launchpad.net/gcc-linaro/+bug/714921 >>>> >>>> I suspect it's all those large switch statements... >>> >>> It's on my todo list to report it to GCC, since this memory-hog behavio= r is >>> a GCC regression. >> >> We've been working on this in Linaro, and the following two patches >> have been posted upstream: >> >> =C2=A0 =C2=A0http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00193.html >> =C2=A0 =C2=A0http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00255.html >> >> so you can probably cross that item off your todo list :-) > > Interesting. =C2=A0Alexander Graf and I recently hit an out of memory whe= n > building translate.o on ppc64 host. =C2=A0It was solved by adding more RA= M > to the box but this patch looks nice too ;). Maybe the switch blocks should be rearranged, or inline attribute removed from the functions. Are the nested switch and if statements optimal from performance point of view or could there be a faster and less memory hungry version?