Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread qemu-devel
Penned by Paolo Bonzini on 20130321  3:25.51, we have:
| Il 21/03/2013 08:53, qemu-de...@email.fries.net ha scritto:
|  load averages:  6.74,  6.23,  5.17leveno.fries.net 
02:42:23
|  201 processes: 200 idle, 1 on processor
|  CPU0 states:  0.4% user,  0.0% nice, 33.3% system, 37.1% interrupt, 29.1% 
idle
|  CPU1 states:  0.2% user,  0.0% nice, 64.5% system,  0.0% interrupt, 35.3% 
idle
|  Memory: Real: 359M/907M act/tot Free: 80M Cache: 46M Swap: 1076M/4095M
|  Seconds to delay: 
|PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
|  19820 todd  -50 1116M   38M sleep/1   biowait   2:54 14.75% cc1
|  
|  todd@leveno/pE ~???239$ ps awwwx | grep cc1
|  19820 pz  D+  2:49.61 
/usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/cc1 -fpreprocessed 
/home/todd/.ccache/tmp/translate.tmp.leveno.fries.net.1478.i -quiet -dumpbase 
translate.tmp.leveno.fries.net.1478.i -m32 -auxbase-strip 
/home/todd/.ccache/6/2/648c89832d69fca8ff8953cca44f28-1086936.o.tmp.leveno.fries.net.1478
 -g -O2 -Wstrict-prototypes -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-Wno-redundant-decls -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition -fPIE 
-fno-strict-aliasing -fno-gcse -fstack-protector-all -o 
/home/todd/.tmp/cc1YGXzU.s
|  
|  Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/specs
|  Target: i386-unknown-openbsd5.3
|  Configured with: OpenBSD/i386 system compiler
|  Thread model: posix
|  gcc version 4.2.1 20070719 
|  
| 
| That's an older GCC than the one I was using.  For you it may be
| -fno-var-tracking.

Still no joy:

  PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
21212 todd  -5   20 1142M  118M sleep/0   - 1:03 37.30% cc1

cc -I. -I/home/todd/git/sw/3rdParty/qemu 
-I/home/todd/git/sw/3rdParty/qemu/include -I/home/todd/git/sw/3rdParty/qemu/tcg 
-I/home/todd/git/sw/3rdParty/qemu/tcg/i386  -fPIE -DPIE -m32 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-fno-strict-aliasing -I/usr/local/include -I/usr/X11R6/include 
-Wno-redundant-decls -DTIME_MAX=INT_MAX -fno-gcse -fno-var-tracking  
-fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition  
-I/usr/local/include/libpng -I/usr/X11R6/include/pixman-1 -DHAS_AUDIO 
-DHAS_AUDIO_CHOICE  -I/home/todd/git/sw/3rdParty/qemu/target-i386 -Itarget-i386 
-I.. -I/home/todd/git/sw/3rdParty/qemu/target-i386 -DNEED_CPU_H 
-I/home/todd/git/sw/3rdParty/qemu/include -pthread 
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
-I/usr/local/include -MMD -MP -MT target-i386/kvm-stub.o -MF 
target-i386/kvm-stub.d -O2 -D_FORTIFY_SOURCE=2 -g  -c -o target-i386/kvm-stub.o 
/home/todd/git/sw/3rdParty/qemu/target-i386/kvm-stub.c


| 
| Paolo

-- 
Todd Fries .. t...@fries.net

 
|\  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC\  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com\  1.866.792.3418 (FAX)
| PO Box 16169, Oklahoma City, OK 73113  \  sip:freedae...@ekiga.net
| ..in support of free software solutions. \  sip:4052279...@ekiga.net
 \
 
  37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
http://todd.fries.net/pgp.txt



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread Wei-Ren Chen
 Still no joy:
 
   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
 21212 todd  -5   20 1142M  118M sleep/0   - 1:03 37.30% cc1
 
 cc -I. -I/home/todd/git/sw/3rdParty/qemu 
 -I/home/todd/git/sw/3rdParty/qemu/include 
 -I/home/todd/git/sw/3rdParty/qemu/tcg 
 -I/home/todd/git/sw/3rdParty/qemu/tcg/i386  -fPIE -DPIE -m32 -D_GNU_SOURCE 
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
 -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
 -fno-strict-aliasing -I/usr/local/include -I/usr/X11R6/include 
 -Wno-redundant-decls -DTIME_MAX=INT_MAX -fno-gcse -fno-var-tracking  
 -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
 -Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition  
 -I/usr/local/include/libpng -I/usr/X11R6/include/pixman-1 -DHAS_AUDIO 
 -DHAS_AUDIO_CHOICE  -I/home/todd/git/sw/3rdParty/qemu/target-i386 
 -Itarget-i386 -I.. -I/home/todd/git/sw/3rdParty/qemu/target-i386 -DNEED_CPU_H 
 -I/home/todd/git/sw/3rdParty/qemu/include -pthread 
 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
 -I/usr/local/include -MMD -MP -MT target-i386/kvm-stub.o -MF 
 target-i386/kvm-stub.d -O2 -D_FORTIFY_SOURCE=2 -g  -c -o 
 target-i386/kvm-stub.o /home/todd/git/sw/3rdParty/qemu/target-i386/kvm-stub.c

  Is it possible to update your GCC, or try to use clang?

HTH,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread Paolo Bonzini
Il 22/03/2013 08:08, qemu-de...@email.fries.net ha scritto:
 Penned by Paolo Bonzini on 20130321  3:25.51, we have:
 | Il 21/03/2013 08:53, qemu-de...@email.fries.net ha scritto:
 |  load averages:  6.74,  6.23,  5.17leveno.fries.net 
 02:42:23
 |  201 processes: 200 idle, 1 on processor
 |  CPU0 states:  0.4% user,  0.0% nice, 33.3% system, 37.1% interrupt, 29.1% 
 idle
 |  CPU1 states:  0.2% user,  0.0% nice, 64.5% system,  0.0% interrupt, 35.3% 
 idle
 |  Memory: Real: 359M/907M act/tot Free: 80M Cache: 46M Swap: 1076M/4095M
 |  Seconds to delay: 
 |PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU 
 COMMAND
 |  19820 todd  -50 1116M   38M sleep/1   biowait   2:54 14.75% cc1
 |  
 |  todd@leveno/pE ~???239$ ps awwwx | grep cc1
 |  19820 pz  D+  2:49.61 
 /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/cc1 -fpreprocessed 
 /home/todd/.ccache/tmp/translate.tmp.leveno.fries.net.1478.i -quiet -dumpbase 
 translate.tmp.leveno.fries.net.1478.i -m32 -auxbase-strip 
 /home/todd/.ccache/6/2/648c89832d69fca8ff8953cca44f28-1086936.o.tmp.leveno.fries.net.1478
  -g -O2 -Wstrict-prototypes -Wall -Wundef -Wwrite-strings 
 -Wmissing-prototypes -Wno-redundant-decls -Wendif-labels 
 -Wmissing-include-dirs -Wnested-externs -Wformat-security -Wformat-y2k 
 -Winit-self -Wold-style-definition -fPIE -fno-strict-aliasing -fno-gcse 
 -fstack-protector-all -o /home/todd/.tmp/cc1YGXzU.s
 |  
 |  Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/specs
 |  Target: i386-unknown-openbsd5.3
 |  Configured with: OpenBSD/i386 system compiler
 |  Thread model: posix
 |  gcc version 4.2.1 20070719 
 |  
 | 
 | That's an older GCC than the one I was using.  For you it may be
 | -fno-var-tracking.
 
 Still no joy:
 
   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
 21212 todd  -5   20 1142M  118M sleep/0   - 1:03 37.30% cc1
 
 cc -I. -I/home/todd/git/sw/3rdParty/qemu 
 -I/home/todd/git/sw/3rdParty/qemu/include 
 -I/home/todd/git/sw/3rdParty/qemu/tcg 
 -I/home/todd/git/sw/3rdParty/qemu/tcg/i386  -fPIE -DPIE -m32 -D_GNU_SOURCE 
 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
 -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
 -fno-strict-aliasing -I/usr/local/include -I/usr/X11R6/include 
 -Wno-redundant-decls -DTIME_MAX=INT_MAX -fno-gcse -fno-var-tracking  
 -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
 -Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition  
 -I/usr/local/include/libpng -I/usr/X11R6/include/pixman-1 -DHAS_AUDIO 
 -DHAS_AUDIO_CHOICE  -I/home/todd/git/sw/3rdParty/qemu/target-i386 
 -Itarget-i386 -I.. -I/home/todd/git/sw/3rdParty/qemu/target-i386 -DNEED_CPU_H 
 -I/home/todd/git/sw/3rdParty/qemu/include -pthread 
 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
 -I/usr/local/include -MMD -MP -MT target-i386/kvm-stub!
 .o -MF tar
get-i386/kvm-stub.d -O2 -D_FORTIFY_SOURCE=2 -g  -c -o target-i386/kvm-stub.o 
/home/todd/git/sw/3rdParty/qemu/target-i386/kvm-stub.c

Please try -fmem-report or -ftime-report and see where the time is spent.

Alternatively, just compile with -O1 or even -O0.

Paolo




Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread qemu-devel
Penned by ? (Wei-Ren Chen) on 20130322  2:30.14, we have:
|  Still no joy:
|  
|PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
|  21212 todd  -5   20 1142M  118M sleep/0   - 1:03 37.30% cc1
|  
|  cc -I. -I/home/todd/git/sw/3rdParty/qemu 
-I/home/todd/git/sw/3rdParty/qemu/include -I/home/todd/git/sw/3rdParty/qemu/tcg 
-I/home/todd/git/sw/3rdParty/qemu/tcg/i386  -fPIE -DPIE -m32 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-fno-strict-aliasing -I/usr/local/include -I/usr/X11R6/include 
-Wno-redundant-decls -DTIME_MAX=INT_MAX -fno-gcse -fno-var-tracking  
-fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition  
-I/usr/local/include/libpng -I/usr/X11R6/include/pixman-1 -DHAS_AUDIO 
-DHAS_AUDIO_CHOICE  -I/home/todd/git/sw/3rdParty/qemu/target-i386 -Itarget-i386 
-I.. -I/home/todd/git/sw/3rdParty/qemu/target-i386 -DNEED_CPU_H 
-I/home/todd/git/sw/3rdParty/qemu/include -pthread 
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
-I/usr/local/include -MMD -MP -MT target-i386/kvm-stub.o -MF 
target-i386/kvm-stub.d -O2 -D_FORTIFY_SOURCE=2 -g  -c -o target-i386/kvm-stub.o 
/home/todd/git/sw/3rdParty/qemu/target-i386/kvm-stub.c
| 
|   Is it possible to update your GCC, or try to use clang?

OpenBSD is using the latest gcc that is not GPLv3 for license reasons for the
base os.

In ports there are newer versions of gcc for programs that require it to build,
and clang is available also.

It doesn't make sense to switch compilers because this does build, so I will
either find time to take a stab at moving things out of translate.c or deal
with the excessive memory this file takes to build per softmmu target before
I try using a compiler that is not what any other OpenBSD user is going to
be running qemu with.

Thanks,
-- 
Todd Fries .. t...@fries.net

 
|\  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC\  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com\  1.866.792.3418 (FAX)
| PO Box 16169, Oklahoma City, OK 73113  \  sip:freedae...@ekiga.net
| ..in support of free software solutions. \  sip:4052279...@ekiga.net
 \
 
  37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
http://todd.fries.net/pgp.txt



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-22 Thread Peter Maydell
On 22 March 2013 15:19,  qemu-de...@email.fries.net wrote:
 It doesn't make sense to switch compilers because this does build, so I will
 either find time to take a stab at moving things out of translate.c

Note that we've had problems with several different target-*/translate.c;
I think the problem is simply that gcc inlines a lot of the functions
of the main decoder loop and then finds that the resulting enormous
function triggers problems with optimisation passes that were accidentally
written to be O(n^2) in memory or CPU usage. So you may find you need
to restructure more than one target's translate.c code.

-- PMM



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-21 Thread qemu-devel
Penned by Paolo Bonzini on 20130316  3:14.29, we have:
| Il 15/03/2013 20:21, Todd T. Fries ha scritto:
|PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
|  28818 todd  640 1142M   53M onproc/0  - 2:01 17.24% cc1
|  
|  For systems with lower limits on user process memory, this prevents things
|  from building.
|  
|  For systems with less physical ram, this presents lots of swapping just to
|  build the source files.
|  
|  Is there any hints or hope of breaking translate.c up into a smaller file?
| 
| It's a GCC bug.  We have worked around it in recent versions of QEMU;
| what version are you trying to compile?
| 
| You can compile that file with -O2 -fno-gcse.
| 
| Paolo

I don't note a huge improvement:

load averages:  6.74,  6.23,  5.17leveno.fries.net 02:42:23
201 processes: 200 idle, 1 on processor
CPU0 states:  0.4% user,  0.0% nice, 33.3% system, 37.1% interrupt, 29.1% idle
CPU1 states:  0.2% user,  0.0% nice, 64.5% system,  0.0% interrupt, 35.3% idle
Memory: Real: 359M/907M act/tot Free: 80M Cache: 46M Swap: 1076M/4095M
Seconds to delay: 
  PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
19820 todd  -50 1116M   38M sleep/1   biowait   2:54 14.75% cc1

todd@leveno/pE ~?239$ ps awwwx | grep cc1
19820 pz  D+  2:49.61 /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/cc1 
-fpreprocessed /home/todd/.ccache/tmp/translate.tmp.leveno.fries.net.1478.i 
-quiet -dumpbase translate.tmp.leveno.fries.net.1478.i -m32 -auxbase-strip 
/home/todd/.ccache/6/2/648c89832d69fca8ff8953cca44f28-1086936.o.tmp.leveno.fries.net.1478
 -g -O2 -Wstrict-prototypes -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-Wno-redundant-decls -Wendif-labels -Wmissing-include-dirs -Wnested-externs 
-Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition -fPIE 
-fno-strict-aliasing -fno-gcse -fstack-protector-all -o 
/home/todd/.tmp/cc1YGXzU.s

Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/specs
Target: i386-unknown-openbsd5.3
Configured with: OpenBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719 
-- 
Todd Fries .. t...@fries.net

 
|\  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC\  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com\  1.866.792.3418 (FAX)
| PO Box 16169, Oklahoma City, OK 73113  \  sip:freedae...@ekiga.net
| ..in support of free software solutions. \  sip:4052279...@ekiga.net
 \
 
  37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
http://todd.fries.net/pgp.txt



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-21 Thread Paolo Bonzini
Il 21/03/2013 08:53, qemu-de...@email.fries.net ha scritto:
 load averages:  6.74,  6.23,  5.17leveno.fries.net 
 02:42:23
 201 processes: 200 idle, 1 on processor
 CPU0 states:  0.4% user,  0.0% nice, 33.3% system, 37.1% interrupt, 29.1% idle
 CPU1 states:  0.2% user,  0.0% nice, 64.5% system,  0.0% interrupt, 35.3% idle
 Memory: Real: 359M/907M act/tot Free: 80M Cache: 46M Swap: 1076M/4095M
 Seconds to delay: 
   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
 19820 todd  -50 1116M   38M sleep/1   biowait   2:54 14.75% cc1
 
 todd@leveno/pE ~�239$ ps awwwx | grep cc1
 19820 pz  D+  2:49.61 /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/cc1 
 -fpreprocessed /home/todd/.ccache/tmp/translate.tmp.leveno.fries.net.1478.i 
 -quiet -dumpbase translate.tmp.leveno.fries.net.1478.i -m32 -auxbase-strip 
 /home/todd/.ccache/6/2/648c89832d69fca8ff8953cca44f28-1086936.o.tmp.leveno.fries.net.1478
  -g -O2 -Wstrict-prototypes -Wall -Wundef -Wwrite-strings 
 -Wmissing-prototypes -Wno-redundant-decls -Wendif-labels 
 -Wmissing-include-dirs -Wnested-externs -Wformat-security -Wformat-y2k 
 -Winit-self -Wold-style-definition -fPIE -fno-strict-aliasing -fno-gcse 
 -fstack-protector-all -o /home/todd/.tmp/cc1YGXzU.s
 
 Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd5.3/4.2.1/specs
 Target: i386-unknown-openbsd5.3
 Configured with: OpenBSD/i386 system compiler
 Thread model: posix
 gcc version 4.2.1 20070719 
 

That's an older GCC than the one I was using.  For you it may be
-fno-var-tracking.

Paolo



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-19 Thread qemu-devel
Penned by Paolo Bonzini on 20130316  3:14.29, we have:
| Il 15/03/2013 20:21, Todd T. Fries ha scritto:
|PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
|  28818 todd  640 1142M   53M onproc/0  - 2:01 17.24% cc1
|  
|  For systems with lower limits on user process memory, this prevents things
|  from building.
|  
|  For systems with less physical ram, this presents lots of swapping just to
|  build the source files.
|  
|  Is there any hints or hope of breaking translate.c up into a smaller file?
| 
| It's a GCC bug.  We have worked around it in recent versions of QEMU;
| what version are you trying to compile?

I'm using bisect to find a runtime behavior bug (OpenBSD/amd64 current's 
cd53.iso segv's in
userland) that showed up since 1.4.0 release.  So understandably I'm building 
lots of versions
and not able to stick with current for the duration of the bisection.

| You can compile that file with -O2 -fno-gcse.

Awesome, I'll just do a global -fno-gcse and hope that doesn't effect the 
runtime bug I've
encountered to speed my compile times ;-)

Thanks,
-- 
Todd Fries .. t...@fries.net

 
|\  1.636.410.0632 (voice)
| Free Daemon Consulting, LLC\  1.405.227.9094 (voice)
| http://FreeDaemonConsulting.com\  1.866.792.3418 (FAX)
| PO Box 16169, Oklahoma City, OK 73113  \  sip:freedae...@ekiga.net
| ..in support of free software solutions. \  sip:4052279...@ekiga.net
 \
 
  37E7 D3EB 74D0 8D66 A68D  B866 0326 204E 3F42 004A
http://todd.fries.net/pgp.txt



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-19 Thread Andreas Färber
Am 15.03.2013 20:21, schrieb Todd T. Fries:
 Is there any hints or hope of breaking translate.c up into a smaller file?

You don't specify which version you're talking about (git?) and don't
mention which translate.c file either.

The longest-building one I am aware of was target-ppc/translate.c, and I
have just recently split some code out of it to reduce its size.

But this is an Open Source project, so you too can look at the code and
make suggestions of how to split, e.g., target-ppc/translate_init.c off
from target-ppc/translate.c or even better send patches for improvement.

Short of that, you can configure with --target-list= to only build the
targets you actually need.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



Re: [Qemu-devel] large memory requirements for translate.c a barrier

2013-03-16 Thread Paolo Bonzini
Il 15/03/2013 20:21, Todd T. Fries ha scritto:
   PID USERNAME PRI NICE  SIZE   RES STATE WAIT  TIMECPU COMMAND
 28818 todd  640 1142M   53M onproc/0  - 2:01 17.24% cc1
 
 For systems with lower limits on user process memory, this prevents things
 from building.
 
 For systems with less physical ram, this presents lots of swapping just to
 build the source files.
 
 Is there any hints or hope of breaking translate.c up into a smaller file?

It's a GCC bug.  We have worked around it in recent versions of QEMU;
what version are you trying to compile?

You can compile that file with -O2 -fno-gcse.

Paolo