#5846: Add GHC.Stats.gcStatsEnabled
------------------------------+---------------------------------------------
 Reporter:  tibbe             |          Owner:                   
     Type:  feature request   |         Status:  new              
 Priority:  normal            |      Component:  libraries (other)
  Version:  7.4.1             |       Keywords:                   
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple 
  Failure:  None/Unknown      |       Testcase:                   
Blockedby:                    |       Blocking:                   
  Related:                    |  
------------------------------+---------------------------------------------
 It would be nice if `GHC.Stats` exported a new, top-level constant,
 `gcStatsEnabled :: Bool`, that's set to `True` if the program was run with
 `RTS -T` or equivalent. In addition we could consider throwing an
 exception if `getGCStats` was called when `gcStatsEnabled = False`. This
 would let programs check if GC stats collection is enabled and still do
 something reasonable if they're not. This would be useful in the `ekg`
 package.

 Open question: could the value of `+RTS -T` change at runtime? If so,
 perhaps we instead want `getGCStatsEnabled :: IO Bool`.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to