[llvm] [memprof] Add Version2 of the indexed MemProf format (PR #89100)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 11:44:09 PDT 2024
================
@@ -1502,14 +1524,44 @@ IndexedInstrProfReader::getMemProfRecord(const uint64_t FuncNameHash) {
return *FrIter;
};
- memprof::MemProfRecord Record(*Iter, IdToFrameCallback);
+ // Setup a callback to convert call stack ids to call stacks using the on-disk
+ // hash table.
+ std::optional<memprof::CallStackId> LastUnmappedCSId;
+ auto CSIdToCallStackCallback = [&](memprof::CallStackId CSId) {
+ llvm::SmallVector<memprof::Frame> Frames;
+ auto CSIter = MemProfCallStackTable->find(CSId);
+ if (CSIter == MemProfCallStackTable->end()) {
+ LastUnmappedFrameId = CSId;
----------------
teresajohnson wrote:
This triggers an error about frame ids. Can you emit an error specific to call stacks ids?
https://github.com/llvm/llvm-project/pull/89100
More information about the llvm-commits
mailing list