[PATCH] D148301: [memprof] Print out profile build ids in the error message.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 14 05:22:31 PDT 2023


tejohnson added inline comments.


================
Comment at: llvm/lib/ProfileData/RawMemProfReader.cpp:203
+        make_error<StringError>(ErrorMessage,
+                                inconvertibleErrorCode()),"");
+  }
----------------
Should we pass the Path instead of "" for the report() Context parameter? If not useful, probably document the constant "" parameter.


================
Comment at: llvm/lib/ProfileData/RawMemProfReader.cpp:541
+  // Use a set + vector since a profile file may contain multiple raw profile
+  // dumps, each with segment information. We want them unique and in order they
+  // were stored in the profile.
----------------
Why do we need them in the order they were stored?


================
Comment at: llvm/lib/ProfileData/RawMemProfReader.cpp:553
+      const std::string Id = getBuildIdString(Entry);
+      if(BuildIdsSet.contains(Id)) continue;
+      BuildIds.push_back(Id);
----------------
formatting seems off - run through clang format.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148301/new/

https://reviews.llvm.org/D148301



More information about the llvm-commits mailing list