[compiler-rt] [llvm] [InstrProf] Add debuginfod correlation support (PR #106606)

Zequan Wu via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 16:49:10 PDT 2024


================
@@ -113,11 +115,36 @@ InstrProfCorrelator::get(StringRef Filename, ProfCorrelatorKind FileKind) {
     return get(std::move(*BufferOrErr), FileKind);
   }
   if (FileKind == BINARY) {
-    auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename));
-    if (auto Err = BufferOrErr.takeError())
-      return std::move(Err);
+    if (!Filename.empty()) {
+      auto BufferOrErr = errorOrToExpected(MemoryBuffer::getFile(Filename));
+      if (auto Err = BufferOrErr.takeError())
+        return std::move(Err);
+      return get(std::move(*BufferOrErr), FileKind);
+    } else if (BIDFetcher) {
+      if (BIs->size() > 1)
----------------
ZequanWu wrote:

Do you plan to add support for multiple build IDs in a single raw profile in the future? Like a lightweight raw profile contains two build ids, one for main executable and another one for a shared library. Ideally, BIDFetcher should find/download both the executable and shared library and the correlator will match them based on their build IDs.

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


More information about the llvm-commits mailing list