|Version 2 (modified by MikolajKonarski, 4 years ago)|
The analysis of the semantics of +RTS -s and the list of needed new events
A sample output of +RTS -s, annotated with new require events. More concrete proposals will follow.
237,179,528 bytes allocated in the heap
An event for memory allocation and freeing memory via GC.
52,785,584 bytes copied during GC
An event for copying during GC.
17,272,336 bytes maximum residency (5 sample(s))
An and event for that ("only checked during major garbage collections").
6,493,328 bytes maximum slop
An event for slop, probably emitted rarely, also.
45 MB total memory in use
Can probably be calculated from allocation and deallocation.
(0 MB lost due to fragmentation)
No idea, TODO.
Tot time (elapsed) Avg pause Max pause Gen 0 448 colls, 0 par 0.04s 0.04s 0.0001s 0.0016s Gen 1 5 colls, 0 par 0.07s 0.07s 0.0149s 0.0386s
Split the current GC events into generations and into seq/par (if RequestParGC is not enough to tell seq/par). We don't want to report the CPU time, only the elapsed time, and that's fine.
Parallel GC work balance: 1.00 (6391526 / 6375794, ideal 2)
This is quite convoluted: total words copied during parallel GCs divided by the average over all parallel GCs of maximal number of words copied by any thread in a single par GC.Revents needed: the events added above suffice, but quite a bit of extra state will have to be maintained when reading the events. Perhaps +RTS -s could be modified to make this figure simpler?
To be continued.