[llvm] [MemProf] Add v4 which contains CalleeGuids to CallSiteInfo. (PR #137394)
Snehasish Kumar via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 11:17:15 PDT 2025
================
@@ -216,6 +265,46 @@ static IndexedMemProfRecord deserializeV3(const MemProfSchema &Schema,
return Record;
}
+static IndexedMemProfRecord deserializeV4(const MemProfSchema &Schema,
+ const unsigned char *Ptr) {
+ using namespace support;
+
+ IndexedMemProfRecord Record;
+
+ // Read the meminfo nodes.
+ const uint64_t NumNodes =
+ endian::readNext<uint64_t, llvm::endianness::little>(Ptr);
+ Record.AllocSites.reserve(NumNodes);
+ for (uint64_t I = 0; I < NumNodes; I++) {
+ IndexedAllocationInfo Node;
+ Node.CSId =
+ endian::readNext<LinearCallStackId, llvm::endianness::little>(Ptr);
+ Node.Info.deserialize(Schema, Ptr);
+ Ptr += PortableMemInfoBlock::serializedSize(Schema);
----------------
snehasish wrote:
Thanks for the suggestion. Also made the change to v3 and submitted it early.
https://github.com/llvm/llvm-project/pull/137394
More information about the llvm-commits
mailing list