GHC 8.2 GC time stats going negative

Harendra Kumar harendra.kumar at gmail.com
Thu Nov 9 17:33:16 UTC 2017


Hi,

I am trying to use the mutator_cpu_ns and mutator_elapsed_ns from GHC 8.2
RTSStats structure retrieved using getRTSStats API documented here -
https://hackage.haskell.org/package/base-4.10.0.0/docs/GHC-Stats.html .

I am seeing that the values of these stats retrieved about 30 ms later are
lower than the values retrieved earlier. Sometimes even after 100 ms the
values decrease from the previous ones. However, as the time duration
between two calls increase this becomes less and less likely.

Is this an expected behavior or am I using it incorrectly? If it is
expected, why does it happen, what is the underlying mechanism that makes
it happen?

Thanks,
harendra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20171109/9a953f0f/attachment.html>


More information about the ghc-devs mailing list