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

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 10:14:46 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)
----------------
gulfemsavrun wrote:

The current limitation of the correlator is that it only supports correlating with a single file. When we have the support of correlating with multiple files, it should be easy to reuse that to support to correlate with multiple build IDs.

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


More information about the llvm-commits mailing list