[MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead
authorLang Hames <lhames@gmail.com>
Fri, 21 Nov 2014 01:57:09 +0000 (01:57 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 21 Nov 2014 01:57:09 +0000 (01:57 +0000)
now that the old JIT has been removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222494 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 02350b6a950ce8f6829690521482a5a3fda4dbeb..cef3aa27d5cedbadca28ed374ab613d7a0190ae0 100644 (file)
@@ -59,16 +59,6 @@ public:
   JITEventListener() {}
   virtual ~JITEventListener();
 
   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.
   /// NotifyObjectEmitted - Called after an object has been successfully
   /// emitted to memory.  NotifyFunctionEmitted will not be called for
   /// individual functions in the object.
index ec9414750bd0242cb71ea701c315eb98c0b928c7..b23ca88baf1a7f0188f962a39bcf9e2c2cfc823a 100644 (file)
@@ -57,8 +57,6 @@ public:
   ~IntelJITEventListener() {
   }
 
   ~IntelJITEventListener() {
   }
 
-  virtual void NotifyFreeingMachineCode(void *OldPtr);
-
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
@@ -97,14 +95,6 @@ static iJIT_Method_Load FunctionDescToIntelJITFormat(
   return Result;
 }
 
   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();
 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();
index 1fd24f12f40cd96d5de6707459077ca35dcc1895..5a8ccb66e529ab82478dd832aabf3348ebb30062 100644 (file)
@@ -49,8 +49,6 @@ public:
 
   ~OProfileJITEventListener();
 
 
   ~OProfileJITEventListener();
 
-  virtual void NotifyFreeingMachineCode(void *OldPtr);
-
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
   virtual void NotifyObjectEmitted(const ObjectImage &Obj);
 
   virtual void NotifyFreeingObject(const ObjectImage &Obj);
@@ -77,16 +75,6 @@ OProfileJITEventListener::~OProfileJITEventListener() {
   }
 }
 
   }
 }
 
-// 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;
 void OProfileJITEventListener::NotifyObjectEmitted(const ObjectImage &Obj) {
   if (!Wrapper.isAgentAvailable()) {
     return;