Opened 7 years ago

Closed 5 years ago

#1293 closed bug (wontfix)

building via gcc 4.2.x on SPARC/Solaris is very slow

Reported by: mm Owned by: benl
Priority: normal Milestone: 6.10.2
Component: Compiler Version: 6.8.2
Keywords: hangs compilation Cc:
Operating System: Solaris Architecture: sparc
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

../../compiler/ghc-inplace -H16m -O -package-name  haskell-src-1.0.1 -O -Rghc-timing -fgenerics  
-package base -fgenerics -split-objs -hisuf p_hi -hcsuf p_hc -osuf p_o -prof   -c Language/Haskell/Syntax.hs -o Language/Haskell/Syntax.p_o  -ohi Language/Haskell/Syntax.p_hi
^C
<<ghc: 1692957264 bytes, 2394 GCs, 12868709/19559532 avg/max bytes residency (12 samples), 50M in use, 0.00 INIT (0.00 elapsed), 9.28 MUT (9.52 elapsed), 3.22 GC (3.50 elapsed) :ghc>>
make[3]: *** [Language/Haskell/Syntax.p_o] Fehler 1
make[2]: *** [all] Unterbrechung
make[1]: *** [all] Unterbrechung
make: *** [stage1] Unterbrechung

Change History (14)

comment:1 Changed 7 years ago by igloo

  • Milestone set to 6.8

Are you sure it's hung? That file will take a comparatively long time to compile, especially as it's being compiled for profiling. If you are low on memory then it is also likely that that file is causing your machine to swap, and thus taking even longer.

What does the output of free and top -n 1 look like when it has hung?

comment:2 Changed 7 years ago by mm

Thank you,

compiling it now again worked well. Maybe the system really started to swap. Probably this is a non-bug.

mm

comment:3 Changed 7 years ago by simonmar

  • Resolution set to invalid
  • Status changed from new to closed

Submitter confirms we can close.

comment:4 Changed 6 years ago by igloo

  • Milestone changed from 6.8 branch to 6.8.1

comment:5 Changed 6 years ago by maeder

  • Architecture changed from x86 to sparc
  • Operating System changed from Linux to Solaris
  • Resolution invalid deleted
  • severity changed from blocker to normal
  • Status changed from closed to reopened
  • Summary changed from building ghc 6.6.1 hangs on linux-x86 at Language/Haskell/Syntax.hs to building ghc 6.8.3 hangs on sparc solaris at Language/Haskell/Syntax.hs
  • Version changed from 6.6.1 to 6.8.2

compiling this file takes really rather long on my poor machine.

Hardware Architecture: sparc
Operating System: solaris10
Model: Sun Fire 280R
Memory Size (MB): 3072
Processor Speed (MHz): 900

load averages:  1.07,  1.07,  1.06                                 15:03:32
57 processes:  54 sleeping, 2 running, 1 on cpu
CPU states:  0.0% idle, 93.2% user,  6.8% kernel,  0.0% iowait,  0.0% swap
Memory: 3072M real, 1617M free, 845M swap in use, 4450M swap free

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
 8273 maeder     1   0   10  554M  541M run   148:17 96.66% cc1

Without profiling it takes already long (about 1 hour)

../../compiler/stage1/ghc-inplace -package-name haskell-src-1.0.1.2 -hide-all-packages -split-objs -i -idist/build/autogen -idist/build -i. -Idist/build -odir dist/build -hidir dist/build -stubdir dist/build -package base-3.0.2.0 -package pretty-1.0.0.0 -package array-0.1.0.0 -package haskell98-1.0.1.0 -O -XCPP -idist/build  -H16m -O -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc -O -Rghc-timing -fgenerics -c Language/Haskell/Syntax.hs -o dist/build/Language/Haskell/Syntax.o  -ohi dist/build/Language/Haskell/Syntax.hi
<<ghc: 3161523500 bytes, 5142 GCs, 18526044/40419328 avg/max bytes residency (25 samples), 106M in use, 0.00 INIT (0.00 elapsed), 39.27 MUT (12245.73 elapsed), 22.81 GC (23.44 elapsed) :ghc>>

Can't this be changed, somehow?

comment:6 Changed 6 years ago by Isaac Dupree

seeing cc1, maybe related to something I found here: http://hackage.haskell.org/trac/ghc/ticket/2002#comment:12 , namely that GCC can't, performance-wise, deal with everything that GHC can generate. Is the time mostly spent in GHC or GCC? and are you having any trouble with amount of RAM/swap memory it uses, or just the amount of CPU-ish time spent?

comment:7 Changed 6 years ago by maeder

It's just the CPU time spent by gcc.

comment:8 Changed 6 years ago by maeder

The files are rather big:

       15051 Jun 13 12:30 /tmp/ghc8219_0/ghc8219_0.hscpp
    10497049 Jun 13 12:31 /tmp/ghc8219_0/ghc8219_0.p_hc
    15187968 Jun 13 15:50 /tmp/ghc8219_0/ghc8219_0.raw_s

comment:9 Changed 6 years ago by igloo

  • Milestone changed from 6.8.1 to 6.10.1

comment:10 Changed 6 years ago by igloo

  • Milestone changed from 6.10.1 to 6.10.2

comment:11 Changed 5 years ago by benl

  • Owner set to benl
  • Status changed from reopened to new

Current plan is to fix the SPARC native code generator and avoid GCC entirely.

comment:12 Changed 5 years ago by benl

  • Status changed from new to assigned

comment:13 Changed 5 years ago by duncan

Note also that using gcc-4.0.x or 4.1.x instead of 4.2.x avoids the massive compile times. See Building/Solaris.

comment:14 Changed 5 years ago by benl

  • Resolution set to wontfix
  • Status changed from assigned to closed
  • Summary changed from building ghc 6.8.3 hangs on sparc solaris at Language/Haskell/Syntax.hs to building via gcc 4.2.x on SPARC/Solaris is very slow
Note: See TracTickets for help on using tickets.