Strange interaction with `+RTS -h -A100M` (heap profiling and large nursery): collections on Gen 1 but not Gen 0
Summary
I was surprised to see -s
report no nursery collections but several major collections when I used -h
with a large -A
. I thought this might be evidence of a bug somewhere.
Steps to reproduce
I observed this on a server, but this exhibits behavior:
module Main where
import Control.Concurrent
import Control.Monad
main = forever $ do
print "blah"
threadDelay 10
compile and run:
$ ghc -prof -fprof-auto-top -rtsopts foo.hs
$ timeout -s INT 10 ./foo +RTS -s -h -A100M 1>/dev/null
...snip
Tot time (elapsed) Avg pause Max pause
Gen 0 0 colls, 0 par 0.000s 0.000s 0.0000s 0.0000s
Gen 1 24 colls, 0 par 0.020s 0.010s 0.0004s 0.0005s
...snip
(sometimes timeout
doesn't seem to allow -s
output to be printed; the point is to run foo
for 10 seconds)
I initially thought this was also interacting with +RTS -I<sec>
but I'm not sure now.
Omitting either -h
or -A
results in something more familiar, e.g.:
Gen 0 152 colls, 0 par 0.004s 0.004s 0.0000s 0.0001s
Gen 1 14 colls, 0 par 0.004s 0.005s 0.0004s 0.0005s
Environment
GHC 8.6.3 on 64-bit linux