[llvm] 94bbc18 - [ORC] Add some debug logging to EPCDynamicLibrarySearchGenerator.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 09:41:01 PDT 2024
Author: Lang Hames
Date: 2024-03-25T11:40:52-05:00
New Revision: 94bbc18bb6469b29dc471c4af879c2ee64d62180
URL: https://github.com/llvm/llvm-project/commit/94bbc18bb6469b29dc471c4af879c2ee64d62180
DIFF: https://github.com/llvm/llvm-project/commit/94bbc18bb6469b29dc471c4af879c2ee64d62180.diff
LOG: [ORC] Add some debug logging to EPCDynamicLibrarySearchGenerator.
Coding my way home: 8.98112N, 79.52094W
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp b/llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
index 88cc3b04fb6425..ec2187bad0f2c7 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
@@ -7,8 +7,11 @@
//===----------------------------------------------------------------------===//
#include "llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h"
+#include "llvm/ExecutionEngine/Orc/DebugUtils.h"
#include "llvm/Support/Error.h"
+#define DEBUG_TYPE "orc"
+
namespace llvm {
namespace orc {
@@ -31,6 +34,11 @@ Error EPCDynamicLibrarySearchGenerator::tryToGenerate(
if (Symbols.empty())
return Error::success();
+ LLVM_DEBUG({
+ dbgs() << "EPCDynamicLibrarySearchGenerator trying to generate "
+ << Symbols << "\n";
+ });
+
SymbolLookupSet LookupSymbols;
for (auto &KV : Symbols) {
@@ -44,8 +52,12 @@ Error EPCDynamicLibrarySearchGenerator::tryToGenerate(
// Copy-capture LookupSymbols, since LookupRequest keeps a reference.
EPC.lookupSymbolsAsync(Request, [this, &JD, LS = std::move(LS),
LookupSymbols](auto Result) mutable {
- if (!Result)
+ if (!Result) {
+ LLVM_DEBUG({
+ dbgs() << "EPCDynamicLibrarySearchGenerator lookup failed due to error";
+ });
return LS.continueLookup(Result.takeError());
+ }
assert(Result->size() == 1 && "Results for more than one library returned");
assert(Result->front().size() == LookupSymbols.size() &&
@@ -59,6 +71,11 @@ Error EPCDynamicLibrarySearchGenerator::tryToGenerate(
++ResultI;
}
+ LLVM_DEBUG({
+ dbgs() << "EPCDynamicLibrarySearchGenerator lookup returned "
+ << NewSymbols << "\n";
+ });
+
// If there were no resolved symbols bail out.
if (NewSymbols.empty())
return LS.continueLookup(Error::success());
More information about the llvm-commits
mailing list