aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-10-27 00:03:05 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-10-27 00:03:05 +0000
commit7a9034c4db248fe8b8cb82762881b51b221988d3 (patch)
tree730343fa9578d5b2ea0637b4cf330070aab8c0f7 /lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
parentf2becca90b832cc02345fba063b9b439b2be33ad (diff)
Automatically do the equivalent of freeMachineCodeForFunction(F) when F is
being destroyed. This allows users to run global optimizations like globaldce even after some functions have been jitted. This patch also removes the Function* parameter to JITEventListener::NotifyFreeingMachineCode() since it can cause that to be called when the Function is partially destroyed. This change will be even more helpful later when I think we'll want to allow machine code to actually outlive its Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp')
-rw-r--r--lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
index 00c4af7ac2..d05ab4d555 100644
--- a/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
+++ b/lib/ExecutionEngine/JIT/OProfileJITEventListener.cpp
@@ -147,13 +147,13 @@ void OProfileJITEventListener::NotifyFunctionEmitted(
}
}
-// Removes the to-be-deleted function from the symbol table.
-void OProfileJITEventListener::NotifyFreeingMachineCode(
- const Function &F, void *FnStart) {
+// Removes the being-deleted function from the symbol table.
+void OProfileJITEventListener::NotifyFreeingMachineCode(void *FnStart) {
assert(FnStart && "Invalid function pointer");
if (op_unload_native_code(Agent, reinterpret_cast<uint64_t>(FnStart)) == -1) {
- DEBUG(errs() << "Failed to tell OProfile about unload of native function "
- << F.getName() << " at " << FnStart << "\n");
+ DEBUG(errs()
+ << "Failed to tell OProfile about unload of native function at "
+ << FnStart << "\n");
}
}