Open ahdyt opened 4 months ago
What is wrong with the standard memory profiler?
The standard memory profiler only catch the last stack/gc/action, for an item that is already GCed it's not showed. I would like to keep every action and if it's GCed the diagram shows GCed.
Illustration:
The svg file only shows the last visit url /example memory usage, rather than capturing entire actions(visit url /, visit url /high-computation, visit url /example).
I'm not planning to add memory profiling to fgprof, but I think what you're looking for is a simple subtraction: alloc profile - heap inuse profile
, that would show you the allocations since the start of the process that have since been GC'ed. The heap inuse profile shows you what remains after the most recent GC.
That being said, I don't know why such a profile would be useful.
Alright, I will search how to do the substraction of initial alloc and inuse heap.
This kind of profiling maybe good for catching any possibilities of memory leak or GC leftovers, especially in Go map struct.
I don't think you need this kind of analysis for understanding memory leaks. You just need to watch if the heap inuse profile
is increasing in size. I've described this in more detail here: https://www.datadoghq.com/blog/go-memory-metrics/
Hi there, first of all, thank you for this good package, it helps me profling cpu better than have to run go tool pprof multiple times. I was just wondering if this will also support memory/heap profiling?