Hello,<div><br></div><div>I'm optimizing some code and have used gc-info logging to correlate substantial application pauses with GC occurrences. This make sense. The obvious solution is to allocate less memory, but tracking down where it's coming from isn't easy. In the short term I plan to inject (current-memory-use) based logging all over the code I'm optimizing, but would like to develop and contribute something more generic and re-usable if there's interest in it.</div>
<div><br></div><div>My ideal goal is to add logging that reveals which code is allocating memory (how often, how much), and also, for each GC pass, the origin(s) and final resting place of what was collected.<br><div><br>
</div><div>So now I'm trying to learn more about Racket's 3m garbage collector so I can instrument it. I've scoured the guide and reference, but found nothing that gets into the details of the runtime/collector interaction and in which code files that lives. Before I start grepping through the source and trying to piece it all together on my own, I figured I'd ask. Some pointers in the right direction, even vague hints of where to start, would be awesome :) Even a description of the build process - where xform comes into play - would be infinitely helpful.</div>
<div><br></div><div>Please also feel free to tell me I'm crazy and point out something obviously simpler I'm missing. I just want faster code with fewer, shorter GC pauses - I have no vested interest in how it happens, but would love to contribute a useful tool if that makes sense.</div>
<div><br></div><div>Regards,</div><div>Nick</div></div>