summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-06-25 02:04:04 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-06-25 02:04:04 +0000
commitdf5a7daff9c7664bff8b713e8ed5155319bc6041 (patch)
treed0a7b2a265916b1e0e36ef6423b56749d3429c9a /tools/lli
parentb6c29d55123f6b8c3f9e4d56e4be653a1fd2a472 (diff)
downloadllvm-df5a7daff9c7664bff8b713e8ed5155319bc6041.tar.gz
llvm-df5a7daff9c7664bff8b713e8ed5155319bc6041.tar.bz2
llvm-df5a7daff9c7664bff8b713e8ed5155319bc6041.tar.xz
Add a JITEventListener interface that gets called back when a new function is
emitted or the machine code for a function is freed. Chris mentioned that we may also want a notification when a stub is emitted, but that'll be a future change. I intend to use this to tell oprofile where functions are emitted and what lines correspond to what addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index afd3c5a71f..25536746da 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -18,9 +18,10 @@
#include "llvm/Type.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
-#include "llvm/ExecutionEngine/JIT.h"
-#include "llvm/ExecutionEngine/Interpreter.h"
#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/ExecutionEngine/Interpreter.h"
+#include "llvm/ExecutionEngine/JIT.h"
+#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
@@ -149,6 +150,8 @@ int main(int argc, char **argv, char * const *envp) {
exit(1);
}
+ EE->RegisterJITEventListener(createMacOSJITEventListener());
+
if (NoLazyCompilation)
EE->DisableLazyCompilation();