A long outstanding issue with performance metrics is that GHC does not test boot / core libraries. Would it be possible to integrate their benchmarks into performance dashboard?
I have no idea what the eventlog does, if you feel like providing an explanation for outsiders. (Lately, my brain instantly thinks why aren’t traces and spans used whenever I hear the words event or log).
The eventlog is an option in the runtime system that enables logging of events from the runtime system like when new threads are created and also garbage collection events. Futhermore you can manually log things yourself. There are tools to process these logs and visualize timings and memory usage statistics.
The eventlog is a stream of data printed to a location of your choice—usually a file—by the GHC runtime. It’s binary data that can be read by a zoo of different tools that are more-or-less useful for different performance-improvement tasks.
GHC.Stats - allows you to inspect some of the same data from within a running program
ThreadScope features in Simon Marlow’s book Parallel and Concurrent Programming in Haskell, which is probably where I first heard about the eventlog.
The main use case for the eventlog seems to be evaluating the behavior of parallel programs, but it also dumps data about GC events. In particular, it outputs three types of data about heap size. Unfortunately, I can’t find any good explanation about what those data are! The little blurbs I’ve found aren’t very revelatory. My notes so far:
Memory is allocated firstly in the unit of megablocks which is then further divided into blocks. Block-level fragmentation is how much unused space within the allocated megablocks there is. In a fragmented heap there will be many megablocks which are only partially full.
rts/include/rts/Constants.c:
/* The size of a block (2^BLOCK_SHIFT bytes) */
#define BLOCK_SHIFT 12
/* The size of a megablock (2^MBLOCK_SHIFT bytes) */
#define MBLOCK_SHIFT 20
so maybe size in megablocks = amount actually requested from OS, size in blocks = amount actually allocated to data, live size = amount in blocks of live data?