[llvm] [Memprof] Fixes memory leak in MemInfoBlock histogram. (PR #96834)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 17:24:09 PDT 2024
================
@@ -633,6 +633,8 @@ Error RawMemProfReader::symbolizeAndFilterStackFrames(
// Drop the entries where the callstack is empty.
for (const uint64_t Id : EntriesToErase) {
StackMap.erase(Id);
+ if(CallstackProfileData[Id].AccessHistogramSize > 0)
----------------
snehasish wrote:
No, that makes sense. If we don't free the memory with delete (which is the case in the runtime) then it's not useful. Leaving as it is seems fine.
https://github.com/llvm/llvm-project/pull/96834
More information about the llvm-commits
mailing list