Finding hot allocation sites with bpftrace

So, last time I said I was hooked, and that I wrote an allocation profiler. That’s true! And it was comparatively easy. Starting from the baseline of SpiderMonkey which sleeps before exit from the last blog post, the profiler looks like this: BEGIN { printf("Attaching probes for %s", str($1)) } uprobe:$1:cpp:"*gcprobes::CreateObject*" { // 7 frames as the hook is ususally quite deep, so we want //…