Get the latest tech news

Go allocation probe


The profiling tools in go will tell you where allocations happened in the code, but won't record the type of the allocation. I suspected that in the code I was looking at, some specific types were causing a lot of allocation but that those allocations were spread over many locations.

Equal func(unsafe.Pointer, unsafe.Pointer) bool // GCData stores the GC type data for the garbage collector. When we find the right module it gives us a pointer to where the type name would be loaded in memory, which we then have to map back to a different data section. Really we should also unset@typ when these functions return, but uretprobes don't work in go programs, probably due to stack-growing shenanigans.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Allocation Probe

Allocation Probe