[GHC] #14998: Sort out the strictness mess for exceptions
GHC
ghc-devs at haskell.org
Mon Apr 9 09:20:34 UTC 2018
#14998: Sort out the strictness mess for exceptions
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.3
Component: Compiler | Version: 8.2.2
Resolution: | Keywords: Exceptions
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by sgraf):
This is already reproducible for hello world. For the following program:
{{{#!hs
main = mapM_ (\_ -> putStrLn "hi") [0..10000]
}}}
we have this `+RTS -s` output under `-O2` (first HEAD, second with bangs
removed in GHC.IO):
{{{
9,491,968 bytes allocated in the heap
15,504 bytes copied during GC
44,576 bytes maximum residency (2 sample(s))
29,152 bytes maximum slop
0 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max
pause
Gen 0 8 colls, 0 par 0.000s 0.000s 0.0000s
0.0000s
Gen 1 2 colls, 0 par 0.000s 0.000s 0.0002s
0.0002s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.005s ( 0.005s elapsed)
GC time 0.000s ( 0.000s elapsed)
EXIT time 0.000s ( 0.000s elapsed)
Total time 0.006s ( 0.006s elapsed)
%GC time 0.0% (0.0% elapsed)
Alloc rate 1,932,804,477 bytes per MUT second
Productivity 89.2% of total user, 89.5% of total elapsed
}}}
{{{
10,132,096 bytes allocated in the heap
16,360 bytes copied during GC
44,576 bytes maximum residency (2 sample(s))
29,152 bytes maximum slop
0 MB total memory in use (0 MB lost due to fragmentation)
Tot time (elapsed) Avg pause Max
pause
Gen 0 8 colls, 0 par 0.000s 0.000s 0.0000s
0.0000s
Gen 1 2 colls, 0 par 0.000s 0.000s 0.0002s
0.0003s
INIT time 0.000s ( 0.000s elapsed)
MUT time 0.007s ( 0.007s elapsed)
GC time 0.001s ( 0.001s elapsed)
EXIT time 0.000s ( 0.000s elapsed)
Total time 0.007s ( 0.007s elapsed)
%GC time 0.0% (0.0% elapsed)
Alloc rate 1,516,022,826 bytes per MUT second
Productivity 89.6% of total user, 89.8% of total elapsed
}}}
So, the working set is affected, too, which I think is a necessary
condition for a space leak.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14998#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list