[GHC] #1984: weird performance drop with -O2 on x86

GHC trac at galois.com
Tue Feb 19 05:25:45 EST 2008


#1984: weird performance drop with -O2 on x86
----------------------------+-----------------------------------------------
 Reporter:  guest           |          Owner:            
     Type:  bug             |         Status:  reopened  
 Priority:  normal          |      Milestone:  6.8 branch
Component:  Runtime System  |        Version:  6.8.2     
 Severity:  normal          |     Resolution:            
 Keywords:                  |     Difficulty:  Unknown   
 Testcase:                  |   Architecture:  x86       
       Os:  Linux           |  
----------------------------+-----------------------------------------------
Changes (by simonmar):

  * status:  closed => reopened
  * component:  Compiler => Runtime System
  * resolution:  duplicate =>

Comment:

 Actually I lied - there was more to this than I thought.  With -O turned
 on, the main thread was only allocating in forkIO, and it turned out that
 the fork primitive (and primitives in general) don't check the context
 switch flag, so we ended up creating lots of threads but not running any
 of them, so they didn't get a chance to die and the heap filled up with
 runnable threads causing GC to take a long time.

 I have a fix for this in my tree, will commit in due course.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1984#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list