Hello,<div><br></div><div>I&#39;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&#39;s coming from isn&#39;t easy.  In the short term I plan to inject (current-memory-use) based logging all over the code I&#39;m optimizing, but would like to develop and contribute something more generic and re-usable if there&#39;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&#39;m trying to learn more about Racket&#39;s 3m garbage collector so I can instrument it.  I&#39;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&#39;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&#39;m crazy and point out something obviously simpler I&#39;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>