Memory Profiler


As Julia continues to mature and we build ever more complicated towers of code, it becomes increasingly important for us to ensure that good tools are available for developers to figure out what on earth is going on inside of their programs. To this end, I have spent some time recently instrumenting the garbage collector to track allocations and provide them for analysis in much the same way as our old friend, @profile. The purpose of the tool is to track allocations and frees to allow the canny developer to figure out where memory “leaks” are (e.g. pieces of memory that are still “live” at the end of the instrumented region) as well as portions of high memory churn (E.g. large amounts of objects being allocated/freed).

You can read the pull request description for a more in-depth look at how it works, but the reason I am posting here is that I could use some help pushing this over the finish line. We need some more user-friendly ways of displaying the memory profiler output to the user, and I do not have as much time to create these nice tools now that the actual internals are solid. Examples of what I envision could be useful here are:

Again, I’m open to other ideas of what could be useful. Anyone who is interested in chipping away at this with me, don’t hesitate to reach out on the PR, or on slack.


Flame graphs as used in ProfileView and should also work, right?

(Super cool btw, thanks!)