-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hooked GDB to JITEventListener, cleaned jitlayers GDB interface #28407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! That does clean things up.
src/jitlayers.cpp
Outdated
@@ -70,6 +71,9 @@ using namespace llvm; | |||
#include "julia_assert.h" | |||
|
|||
RTDyldMemoryManager* createRTDyldMemoryManager(void); | |||
using namespace llvm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need these new namespaces?
src/jitlayers.cpp
Outdated
@@ -54,7 +54,8 @@ namespace llvm { | |||
#include <llvm/IR/DataLayout.h> | |||
#include <llvm/Support/DynamicLibrary.h> | |||
|
|||
|
|||
#include <llvm/ExecutionEngine/ExecutionEngine.h> | |||
#include <llvm/ExecutionEngine/JITEventListener.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these includes necessary?
32da9af
to
49bfbfa
Compare
Sorry, I forgot them there. At CI an error very similar to #28379 appeared, I hope that after rebase they will pass. |
6d55c8e
to
aa8a558
Compare
Bump! CI now passes |
src/jitlayers.cpp
Outdated
@@ -402,10 +336,9 @@ void JuliaOJIT::DebugObjectRegistrar::registerObject(RTDyldObjHandleT H, const O | |||
std::move(NewBuffer)); | |||
} | |||
else { | |||
NotifyGDB(SavedObject); | |||
JIT.NotifyFinalizer(*(SavedObject.getBinary()), *LO); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
src/jitlayers.cpp
Outdated
@@ -70,6 +69,7 @@ using namespace llvm; | |||
#include "julia_assert.h" | |||
|
|||
RTDyldMemoryManager* createRTDyldMemoryManager(void); | |||
using namespace llvm::object; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it I get a compilation error : Owning Binary not declared in this scope
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using the namespace can you prefix the names? If it is a lot more than a handful place the namespace is ok, but I suspect it is only in one or two places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah effectively it can be more convenient :D
8d229b9
to
ff2b0ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Should this be backported? |
After #27466 we can hook GDB Listener to JITEventListener.
cc @vtjnash @vchuravy