[llvm] [MemProf] Print full context hash when reporting hinted bytes (PR #114465)

Snehasish Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 1 16:07:56 PDT 2024


================
@@ -256,11 +291,14 @@ bool CallStackTrie::buildAndAttachMIBMetadata(CallBase *CI) {
   if (hasSingleAllocType(Alloc->AllocTypes)) {
     addAllocTypeAttribute(Ctx, CI, (AllocationType)Alloc->AllocTypes);
     if (MemProfReportHintedSizes) {
-      assert(Alloc->TotalSize);
-      errs() << "Total size for allocation with location hash " << AllocStackId
-             << " and single alloc type "
-             << getAllocTypeAttributeString((AllocationType)Alloc->AllocTypes)
-             << ": " << Alloc->TotalSize << "\n";
+      std::vector<ContextTotalSize> ContextSizeInfo;
+      collectContextSizeInfo(Alloc, ContextSizeInfo);
+      for (const auto &Info : ContextSizeInfo) {
----------------
snehasish wrote:

Structured binding here too?

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


More information about the llvm-commits mailing list