Improve fragmentation diagnostics
Currently diagnosing heap fragmentation issues is rather tricky due to the lack of transparency into the heap structure. It would be nice to have eventlog events for the following things:
-
report an eventlog event when we want to free memory the OS but cannot due to fragmentation (see returnMemoryToOS
inBlockAlloc.c
) -
report whenever we allocate/deallocate MBlocks? -
report raw number of allocated MBlocks and allocated blocks (the two numbers that are used to compute the "fragmentation" number currently reported in the EVENT_GC_STATS_GHC
event).
TODO: Reduce factor of 2 while using compacting GC
Edited by Ben Gamari