Update GHC.Stats docs
ClosedPublic

Authored by osa1 on May 25 2018, 6:56 AM.

Details

Summary

Make it clear that max_live_bytes is updated after a major GC whereas
live_bytes is updated after all GCs (including minor collections) and
considers data in uncollected generations as live.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
osa1 created this revision.May 25 2018, 6:56 AM
bgamari accepted this revision.May 27 2018, 10:12 AM

Looks reasonable to me.

This revision is now accepted and ready to land.May 27 2018, 10:12 AM
This revision was automatically updated to reflect the committed changes.
simonmar added inline comments.May 28 2018, 3:56 AM
includes/RtsAPI.h
131–132

Might also be good to say something like "if the previous GC was a major GC, then this is an accurate measure of the current live data."

You can track actual live data by using this value after a major GC, and ignoring it at other times. On the other hand, this figure is a useful measure of how large the old generation has grown, so that we can see how large it gets before we collect it. So while it seems like a slightly odd statistic, in practice I've found it quite useful.