[GHC] #7702: Memory Leak in CoreM (CoreWriter)

GHC cvs-ghc at haskell.org
Mon Feb 18 10:27:49 CET 2013


#7702: Memory Leak in CoreM (CoreWriter)
-----------------------------------------+----------------------------------
Reporter:  afarmer                       |          Owner:                  
    Type:  bug                           |         Status:  new             
Priority:  normal                        |      Component:  Compiler        
 Version:  7.6.2                         |       Keywords:                  
      Os:  Unknown/Multiple              |   Architecture:  Unknown/Multiple
 Failure:  Compile-time performance bug  |      Blockedby:                  
Blocking:                                |        Related:                  
-----------------------------------------+----------------------------------
 While running HERMIT on extended examples, we noticed that the CoreWriter
 component of CoreM is building up unevaluated SimplCount expressions.
 Attached is a one line patch to make the field in the CoreWriter record
 strict, which fixes the leak.

 Also attached are heap profiles before and after to verify the fix.
 (You'll notice we have other memory leaks in HERMIT to address, the
 important bit being the big CoreWriter peak is gone in after.pdf.) These
 were generated by running a large number of HERMIT transformations in a
 batch, with HERMIT calling ghc with +RTS -hT -RTS.

 I'm not sure how this affects compilation time or allocation when
 SimplCount is not the VerySimplCount constructor. Would the nofib suite
 answer these questions?

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



More information about the ghc-tickets mailing list