[llvm] [memprof] Compute CallStackId when deserializing IndexedAllocationInfo (PR #86421)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 14:08:06 PDT 2024


================
@@ -53,6 +53,7 @@ IndexedMemProfRecord::deserialize(const MemProfSchema &Schema,
           endian::readNext<FrameId, llvm::endianness::little, unaligned>(Ptr);
       Node.CallStack.push_back(Id);
     }
+    Node.CSId = hashCallStack(Node.CallStack);
----------------
kazutakahirata wrote:

Yes.  As we transition from the current version to the next, we will most likely have two deserializers, say `IndexedMemProfRecord::deserializeOld` and `IndexedMemProfRecord::deserializeNew`.  The new one will obtain `CSId` directly from the disk.

https://github.com/llvm/llvm-project/pull/86421


More information about the llvm-commits mailing list