My go program consume large memory. I want to know which type of object consumes a lot of memory.
I have tried pprof to analyze heap, it shows which method consumes a lot of memory. But a lot of goroutines have the same traceback that contains this method, each of these goroutines process different type object, I couldn't find which type of object consumes a lot of memory.
There is golang.org/x/debug/cmd/viewcore to view core dumps (can be dumped using gcore).
It is not the same and I kinda agree that WriteHeapDump can be helpful in some cases. But these dumps completely useless in current state since there's not a single tool that can produce human-readable information from heap dumps AFAIK.