Display heap snapshot as a flame graph
Flamegraphs offer a nice graphical way to visualise retention/heap size information. This is something that Java apparently has. See: https://perfetto.dev/docs/data-sources/java-heap-profiler
Formally, we do a breadth first traversal of the heap starting from the GC roots. For each closure, this provides the shortest retainer stack, which we then annotate with the size of the closure.
I have some very rough work on the wip/bfs-flamegraph
branch