[llvm] [memprof][NFC] Free symbolizer memory eagerly (PR #75849)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 18 13:28:00 PST 2023
================
@@ -344,7 +344,7 @@ Error RawMemProfReader::initialize(std::unique_ptr<MemoryBuffer> DataBuffer) {
Object, std::move(Context), /*UntagAddresses=*/false);
if (!SOFOr)
return report(SOFOr.takeError(), FileName);
- Symbolizer = std::move(SOFOr.get());
+ auto Symbolizer = std::move(SOFOr.get());
----------------
snehasish wrote:
I wonder if it makes a difference to the peak memory usage if we move L343-L347 after the readRawRawProfile call. That would mean that we initialize the Symbolizer after we free the raw profile data buffer.
https://github.com/llvm/llvm-project/pull/75849
More information about the llvm-commits
mailing list