[llvm] r222494 - [MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead

Lang Hames lhames at gmail.com
Thu Nov 20 17:57:09 PST 2014


Author: lhames
Date: Thu Nov 20 19:57:09 2014
New Revision: 222494

URL: http://llvm.org/viewvc/llvm-project?rev=222494&view=rev
Log:
[MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead
now that the old JIT has been removed.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h
    llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
    llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp

Modified: llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h?rev=222494&r1=222493&r2=222494&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/JITEventListener.h Thu Nov 20 19:57:09 2014
@@ -59,16 +59,6 @@ public:
   JITEventListener() {}
   virtual ~JITEventListener();
 
-  /// NotifyFreeingMachineCode - Called from freeMachineCodeForFunction(), after
-  /// the global mapping is removed, but before the machine code is returned to
-  /// the allocator.
-  ///
-  /// OldPtr is the address of the machine code and will be the same as the Code
-  /// parameter to a previous NotifyFunctionEmitted call.  The Function passed
-  /// to NotifyFunctionEmitted may have been destroyed by the time of the
-  /// matching NotifyFreeingMachineCode call.
-  virtual void NotifyFreeingMachineCode(void *) {}
-
   /// NotifyObjectEmitted - Called after an object has been successfully
   /// emitted to memory.  NotifyFunctionEmitted will not be called for
   /// individual functions in the object.

Modified: llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp?rev=222494&r1=222493&r2=222494&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp Thu Nov 20 19:57:09 2014
@@ -57,8 +57,6 @@ public:
   ~IntelJITEventListener() {
   }
 
-  virtual void NotifyFreeingMachineCode(void *OldPtr);
-
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
@@ -97,14 +95,6 @@ static iJIT_Method_Load FunctionDescToIn
   return Result;
 }
 
-void IntelJITEventListener::NotifyFreeingMachineCode(void *FnStart) {
-  MethodIDMap::iterator I = MethodIDs.find(FnStart);
-  if (I != MethodIDs.end()) {
-    Wrapper->iJIT_NotifyEvent(iJVM_EVENT_TYPE_METHOD_UNLOAD_START, &I->second);
-    MethodIDs.erase(I);
-  }
-}
-
 void IntelJITEventListener::NotifyObjectEmitted(const ObjectImage &Obj) {
   // Get the address of the object image for use as a unique identifier
   const void* ObjData = Obj.getData().data();

Modified: llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp?rev=222494&r1=222493&r2=222494&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp Thu Nov 20 19:57:09 2014
@@ -49,8 +49,6 @@ public:
 
   ~OProfileJITEventListener();
 
-  virtual void NotifyFreeingMachineCode(void *OldPtr);
-
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
@@ -77,16 +75,6 @@ OProfileJITEventListener::~OProfileJITEv
   }
 }
 
-// Removes the being-deleted function from the symbol table.
-void OProfileJITEventListener::NotifyFreeingMachineCode(void *FnStart) {
-  assert(FnStart && "Invalid function pointer");
-  if (Wrapper.op_unload_native_code(reinterpret_cast<uint64_t>(FnStart)) == -1) {
-    DEBUG(dbgs()
-          << "Failed to tell OProfile about unload of native function at "
-          << FnStart << "\n");
-  }
-}
-
 void OProfileJITEventListener::NotifyObjectEmitted(const ObjectImage &Obj) {
   if (!Wrapper.isAgentAvailable()) {
     return;





More information about the llvm-commits mailing list