Skip to content

Generalise Profiling Heap Traversal code from Retainer profiler

This series aims is to generalise and clean-up the heap traversal code currently in the retainer profiler for use in new profiling mode. See #16788 (closed)

As always see individual commit messages for details. Note: Click the [...] button next to the commit's subject to see the full message.

@osa1 "rts: retainer: simplify pop() control flow" has the cleanup I originally wanted to do in !1116 (closed). This time I think I got it right but I'm still planning on adding some tests.

TODO:

  • cleanup references to retainer profiler specific stuff in comments
  • rename functions as appropriate
  • move code to new TraverseHeap.c file
  • add some tests (the profiling code doesn't have any!) There is at least a test which runs retainer profiling on a simple program. That'll have to do for now since I don't know how to construct a more controlled test case with all sorts of different heap-objects. I'd like to cover all the different closure types used in the code. Anybody have any ideas how to do that? I added a simple test to the my other PR which passes !1433 (54c5ed46).
Edited by Daniel Gröber (dxld)

Merge request reports