LEFT | RIGHT |
1 //===-- OProfileJITEventListener.cpp - Tell OProfile about JITted code ----===// | 1 //===-- OProfileJITEventListener.cpp - Tell OProfile about JITted code ----===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file defines a JITEventListener object that calls into OProfile to tell | 10 // This file defines a JITEventListener object that calls into OProfile to tell |
11 // it about JITted functions. For now, we only record function names and sizes, | 11 // it about JITted functions. For now, we only record function names and sizes, |
12 // but eventually we'll also record line number information. | 12 // but eventually we'll also record line number information. |
13 // | 13 // |
14 // See http://oprofile.sourceforge.net/doc/devel/jit-interface.html for the | 14 // See http://oprofile.sourceforge.net/doc/devel/jit-interface.html for the |
15 // definition of the interface we're using. | 15 // definition of the interface we're using. |
16 // | 16 // |
17 //===----------------------------------------------------------------------===// | 17 //===----------------------------------------------------------------------===// |
18 | 18 |
19 #define DEBUG_TYPE "oprofile-jit-event-listener" | 19 #define DEBUG_TYPE "oprofile-jit-event-listener" |
20 #include "llvm/Function.h" | 20 #include "llvm/Function.h" |
21 #include "llvm/Analysis/DebugInfo.h" | 21 #include "llvm/Analysis/DebugInfo.h" |
| 22 #include "llvm/CodeGen/MachineFunction.h" |
22 #include "llvm/ExecutionEngine/JITEventListener.h" | 23 #include "llvm/ExecutionEngine/JITEventListener.h" |
23 #include "llvm/Support/Debug.h" | 24 #include "llvm/Support/Debug.h" |
24 #include "llvm/System/Errno.h" | 25 #include "llvm/System/Errno.h" |
25 #include "llvm/Config/config.h" | 26 #include "llvm/Config/config.h" |
26 #include <stddef.h> | 27 #include <stddef.h> |
27 using namespace llvm; | 28 using namespace llvm; |
28 | 29 |
29 #if USE_OPROFILE | 30 #if USE_OPROFILE |
30 | 31 |
31 #include <opagent.h> | 32 #include <opagent.h> |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 168 |
168 namespace llvm { | 169 namespace llvm { |
169 // By defining this to return NULL, we can let clients call it unconditionally, | 170 // By defining this to return NULL, we can let clients call it unconditionally, |
170 // even if they haven't configured with the OProfile libraries. | 171 // even if they haven't configured with the OProfile libraries. |
171 JITEventListener *createOProfileJITEventListener() { | 172 JITEventListener *createOProfileJITEventListener() { |
172 return NULL; | 173 return NULL; |
173 } | 174 } |
174 } // namespace llvm | 175 } // namespace llvm |
175 | 176 |
176 #endif // USE_OPROFILE | 177 #endif // USE_OPROFILE |
LEFT | RIGHT |