[llvm] [memprof] Add Version2 of the indexed MemProf format (PR #89100)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 13:43:07 PDT 2024
================
@@ -374,6 +385,19 @@ IndexedMemProfRecord makeRecord(
return MR;
}
+IndexedMemProfRecord
+makeRecordV2(std::initializer_list<::llvm::memprof::CallStackId> AllocFrames,
+ std::initializer_list<::llvm::memprof::CallStackId> CallSiteFrames,
+ const MemInfoBlock &Block = MemInfoBlock()) {
+ llvm::memprof::IndexedMemProfRecord MR;
+ for (const auto &CSId : AllocFrames)
+ MR.AllocSites.emplace_back(::llvm::SmallVector<memprof::FrameId>(), CSId,
----------------
kazutakahirata wrote:
We don't populate `IndexedAllocationInfo::CallStack` because we use it only in `Version0` and `Version1`.
https://github.com/llvm/llvm-project/pull/89100
More information about the llvm-commits
mailing list