diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine/OProfileJIT')
| -rw-r--r-- | llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp b/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp index 6f0825fb38d..21af6b585c4 100644 --- a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp +++ b/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp @@ -40,7 +40,7 @@ class OProfileJITEventListener : public JITEventListener { std::unique_ptr<OProfileWrapper> Wrapper; void initialize(); - std::map<const char*, OwningBinary<ObjectFile>> DebugObjects; + std::map<ObjectKey, OwningBinary<ObjectFile>> DebugObjects; public: OProfileJITEventListener(std::unique_ptr<OProfileWrapper> LibraryWrapper) @@ -50,10 +50,10 @@ public: ~OProfileJITEventListener(); - void NotifyObjectEmitted(const ObjectFile &Obj, - const RuntimeDyld::LoadedObjectInfo &L) override; + void notifyObjectLoaded(ObjectKey Key, const ObjectFile &Obj, + const RuntimeDyld::LoadedObjectInfo &L) override; - void NotifyFreeingObject(const ObjectFile &Obj) override; + void notifyFreeingObject(ObjectKey Key) override; }; void OProfileJITEventListener::initialize() { @@ -78,9 +78,9 @@ OProfileJITEventListener::~OProfileJITEventListener() { } } -void OProfileJITEventListener::NotifyObjectEmitted( - const ObjectFile &Obj, - const RuntimeDyld::LoadedObjectInfo &L) { +void OProfileJITEventListener::notifyObjectLoaded( + ObjectKey Key, const ObjectFile &Obj, + const RuntimeDyld::LoadedObjectInfo &L) { if (!Wrapper->isAgentAvailable()) { return; } @@ -137,18 +137,18 @@ void OProfileJITEventListener::NotifyObjectEmitted( } } - DebugObjects[Obj.getData().data()] = std::move(DebugObjOwner); + DebugObjects[Key] = std::move(DebugObjOwner); } -void OProfileJITEventListener::NotifyFreeingObject(const ObjectFile &Obj) { +void OProfileJITEventListener::notifyFreeingObject(ObjectKey Key) { if (Wrapper->isAgentAvailable()) { // If there was no agent registered when the original object was loaded then // we won't have created a debug object for it, so bail out. - if (DebugObjects.find(Obj.getData().data()) == DebugObjects.end()) + if (DebugObjects.find(Key) == DebugObjects.end()) return; - const ObjectFile &DebugObj = *DebugObjects[Obj.getData().data()].getBinary(); + const ObjectFile &DebugObj = *DebugObjects[Key].getBinary(); // Use symbol info to iterate functions in the object. for (symbol_iterator I = DebugObj.symbol_begin(), @@ -171,7 +171,7 @@ void OProfileJITEventListener::NotifyFreeingObject(const ObjectFile &Obj) { } } - DebugObjects.erase(Obj.getData().data()); + DebugObjects.erase(Key); } } // anonymous namespace. |

