I want to inspect what is causing my program to use more memory than I expected. It seems gperftool is deprecated in favor of abseil's tcmalloc and the new go-based pprof.
Is there a recommended workflow for inspecting what function etc is using the memory, like HeapProfilerStart() or env HEAPPROFILE=/tmp/mybin.hprof in gperftools, some flag, /heapz, etc? It seems to that I can call absl::MallocExtension::SnapshotCurrent(), but it returns tcmalloc::Profile -- is there a way to convert it to profile.proto which I assume is what the new pprof needs?
I want to inspect what is causing my program to use more memory than I expected. It seems gperftool is deprecated in favor of abseil's tcmalloc and the new go-based pprof.
Is there a recommended workflow for inspecting what function etc is using the memory, like
HeapProfilerStart()orenv HEAPPROFILE=/tmp/mybin.hprofin gperftools, some flag, /heapz, etc? It seems to that I can callabsl::MallocExtension::SnapshotCurrent(), but it returnstcmalloc::Profile-- is there a way to convert it to profile.proto which I assume is what the new pprof needs?