LLVM  13.0.0git
IntelJITEventListener.cpp
Go to the documentation of this file.
1 //===-- IntelJITEventListener.cpp - Tell Intel profiler about JITed code --===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines a JITEventListener object to tell Intel(R) VTune(TM)
10 // Amplifier XE 2011 about JITted functions.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "IntelJITEventsWrapper.h"
15 #include "ittnotify.h"
16 #include "llvm-c/ExecutionEngine.h"
17 #include "llvm/ADT/DenseMap.h"
19 #include "llvm/Config/config.h"
23 #include "llvm/IR/DebugInfo.h"
24 #include "llvm/IR/Function.h"
25 #include "llvm/IR/Metadata.h"
26 #include "llvm/IR/ValueHandle.h"
27 #include "llvm/Object/ObjectFile.h"
28 #include "llvm/Object/SymbolSize.h"
29 #include "llvm/Support/Debug.h"
30 #include "llvm/Support/Errno.h"
32 
33 using namespace llvm;
34 using namespace llvm::object;
35 
36 #define DEBUG_TYPE "amplifier-jit-event-listener"
37 
38 namespace {
39 
40 class IntelIttnotifyInfo {
41  std::string ModuleName;
42  std::vector<std::string> SectionNamesVector;
43  std::vector<__itt_section_info> SectionInfoVector;
44  __itt_module_object *ModuleObject;
45  IntelJITEventsWrapper &WrapperRef;
46 
47 public:
48  IntelIttnotifyInfo(IntelJITEventsWrapper &Wrapper)
49  : ModuleObject(NULL), WrapperRef(Wrapper){};
50  ~IntelIttnotifyInfo() { delete ModuleObject; };
51 
52  void setModuleName(const char *Name) { ModuleName = std::string(Name); }
53 
54  const char *getModuleName() { return ModuleName.c_str(); }
55 
56  void setModuleObject(__itt_module_object *ModuleObj) {
57  ModuleObject = ModuleObj;
58  }
59 
60  __itt_module_object *getModuleObject() { return ModuleObject; }
61 
62  __itt_section_info *getSectionInfoVectorBegin() {
63  if (SectionInfoVector.size())
64  return &SectionInfoVector[0];
65  return NULL;
66  }
67 
68  void reportSection(llvm::IttEventType EventType, const char *SectionName,
69  unsigned int SectionSize) {
70  WrapperRef.iJitIttNotifyInfo(EventType, SectionName, SectionSize);
71  }
72 
73  int fillSectionInformation(const ObjectFile &Obj,
75 
76  int SectionCounter = 0;
77 
78  for (auto &Section : Obj.sections()) {
79  uint64_t SectionLoadAddr = L.getSectionLoadAddress(Section);
80  if (SectionLoadAddr) {
81  object::ELFSectionRef ElfSection(Section);
82 
83  __itt_section_info SectionInfo;
84  memset(&SectionInfo, 0, sizeof(SectionInfo));
85  SectionInfo.start_addr = reinterpret_cast<void *>(SectionLoadAddr);
86  SectionInfo.file_offset = ElfSection.getOffset();
87  SectionInfo.flags = ElfSection.getFlags();
88 
90  auto SectionNameOrError = ElfSection.getName();
91  if (SectionNameOrError)
92  SectionName = *SectionNameOrError;
93 
94  SectionNamesVector.push_back(SectionName.str());
95  SectionInfo.size = ElfSection.getSize();
96  reportSection(llvm::LoadBinarySection, SectionName.str().c_str(),
97  SectionInfo.size);
98 
99  if (ElfSection.isBSS()) {
100  SectionInfo.type = itt_section_type_bss;
101  } else if (ElfSection.isData()) {
102  SectionInfo.type = itt_section_type_data;
103  } else if (ElfSection.isText()) {
104  SectionInfo.type = itt_section_type_text;
105  }
106  SectionInfoVector.push_back(SectionInfo);
107  ++SectionCounter;
108  }
109  }
110  // Hereinafter: don't change SectionNamesVector content to avoid vector
111  // reallocation - reallocation invalidates all the references, pointers, and
112  // iterators referring to the elements in the sequence.
113  for (int I = 0; I < SectionCounter; ++I) {
114  SectionInfoVector[I].name = SectionNamesVector[I].c_str();
115  }
116  return SectionCounter;
117  }
118 };
119 
120 class IntelJITEventListener : public JITEventListener {
121  typedef DenseMap<void*, unsigned int> MethodIDMap;
122 
123  std::unique_ptr<IntelJITEventsWrapper> Wrapper;
124  MethodIDMap MethodIDs;
125 
126  typedef SmallVector<const void *, 64> MethodAddressVector;
128 
129  ObjectMap LoadedObjectMap;
130  std::map<ObjectKey, OwningBinary<ObjectFile>> DebugObjects;
131 
132  std::map<ObjectKey, std::unique_ptr<IntelIttnotifyInfo>> KeyToIttnotify;
133 
134 public:
135  IntelJITEventListener(IntelJITEventsWrapper* libraryWrapper) {
136  Wrapper.reset(libraryWrapper);
137  }
138 
139  ~IntelJITEventListener() {
140  }
141 
142  void notifyObjectLoaded(ObjectKey Key, const ObjectFile &Obj,
143  const RuntimeDyld::LoadedObjectInfo &L) override;
144 
145  void notifyFreeingObject(ObjectKey Key) override;
146 };
147 
148 static LineNumberInfo DILineInfoToIntelJITFormat(uintptr_t StartAddress,
149  uintptr_t Address,
150  DILineInfo Line) {
151  LineNumberInfo Result;
152 
153  Result.Offset = Address - StartAddress;
154  Result.LineNumber = Line.Line;
155 
156  return Result;
157 }
158 
159 static iJIT_Method_Load FunctionDescToIntelJITFormat(
161  const char* FnName,
162  uintptr_t FnStart,
163  size_t FnSize) {
164  iJIT_Method_Load Result;
165  memset(&Result, 0, sizeof(iJIT_Method_Load));
166 
167  Result.method_id = Wrapper.iJIT_GetNewMethodID();
168  Result.method_name = const_cast<char*>(FnName);
169  Result.method_load_address = reinterpret_cast<void*>(FnStart);
170  Result.method_size = FnSize;
171 
172  Result.class_id = 0;
173  Result.class_file_name = NULL;
174  Result.user_data = NULL;
175  Result.user_data_size = 0;
176  Result.env = iJDE_JittingAPI;
177 
178  return Result;
179 }
180 
181 int getBackwardCompatibilityMode() {
182 
183  char *BackwardCompatibilityEnv = getenv("INTEL_JIT_BACKWARD_COMPATIBILITY");
184  int BackwardCompatibilityMode = 0;
185  if (BackwardCompatibilityEnv) {
186  StringRef(BackwardCompatibilityEnv)
187  .getAsInteger(10, BackwardCompatibilityMode);
188  }
189  return BackwardCompatibilityMode;
190 }
191 
192 void IntelJITEventListener::notifyObjectLoaded(
193  ObjectKey Key, const ObjectFile &Obj,
195 
196  int BackwardCompatibilityMode = getBackwardCompatibilityMode();
197  if (BackwardCompatibilityMode == 0) {
198  if (Obj.isELF()) {
199  std::unique_ptr<IntelIttnotifyInfo> ModuleIttnotify =
200  std::make_unique<IntelIttnotifyInfo>(*Wrapper);
201  ModuleIttnotify->setModuleName(
202  StringRef(llvm::utohexstr(
203  MD5Hash(Obj.getMemoryBufferRef().getBuffer()), true))
204  .str()
205  .c_str());
206 
207  __itt_module_object *ModuleObject = new __itt_module_object();
208  ModuleObject->module_name = ModuleIttnotify->getModuleName();
209  ModuleObject->module_size = Obj.getMemoryBufferRef().getBufferSize();
210  Wrapper->iJitIttNotifyInfo(llvm::LoadBinaryModule,
211  ModuleObject->module_name,
212  ModuleObject->module_size);
213  ModuleObject->module_type = __itt_module_type_elf;
214  ModuleObject->section_number =
215  ModuleIttnotify->fillSectionInformation(Obj, L);
216  ModuleObject->module_buffer =
217  (void *)const_cast<char *>(Obj.getMemoryBufferRef().getBufferStart());
218  ModuleObject->module_id =
219  __itt_id_make((void *)&(*ModuleObject), ModuleObject->module_size);
220  ModuleObject->section_array =
221  ModuleIttnotify->getSectionInfoVectorBegin();
222  ModuleIttnotify->setModuleObject(ModuleObject);
223 
224  __itt_module_load_with_sections(ModuleObject);
225 
226  KeyToIttnotify[Key] = std::move(ModuleIttnotify);
227  }
228  } else if (BackwardCompatibilityMode == 1) {
229 
230  OwningBinary<ObjectFile> DebugObjOwner = L.getObjectForDebug(Obj);
231  const ObjectFile *DebugObj = DebugObjOwner.getBinary();
232  if (!DebugObj)
233  return;
234 
235  // Get the address of the object image for use as a unique identifier
236  const void *ObjData = DebugObj->getData().data();
237  std::unique_ptr<DIContext> Context = DWARFContext::create(*DebugObj);
238  MethodAddressVector Functions;
239 
240  // Use symbol info to iterate functions in the object.
241  for (const std::pair<SymbolRef, uint64_t> &P :
242  computeSymbolSizes(*DebugObj)) {
243  SymbolRef Sym = P.first;
244  std::vector<LineNumberInfo> LineInfo;
245  std::string SourceFileName;
246 
247  Expected<SymbolRef::Type> SymTypeOrErr = Sym.getType();
248  if (!SymTypeOrErr) {
249  // TODO: Actually report errors helpfully.
250  consumeError(SymTypeOrErr.takeError());
251  continue;
252  }
253  SymbolRef::Type SymType = *SymTypeOrErr;
254  if (SymType != SymbolRef::ST_Function)
255  continue;
256 
258  if (!Name) {
259  // TODO: Actually report errors helpfully.
260  consumeError(Name.takeError());
261  continue;
262  }
263 
264  Expected<uint64_t> AddrOrErr = Sym.getAddress();
265  if (!AddrOrErr) {
266  // TODO: Actually report errors helpfully.
267  consumeError(AddrOrErr.takeError());
268  continue;
269  }
270  uint64_t Addr = *AddrOrErr;
271  uint64_t Size = P.second;
272 
273  auto SecOrErr = Sym.getSection();
274  if (!SecOrErr) {
275  // TODO: Actually report errors helpfully.
276  consumeError(SecOrErr.takeError());
277  continue;
278  }
279  object::section_iterator Sec = *SecOrErr;
280  if (Sec == Obj.section_end())
281  continue;
282  uint64_t Index = Sec->getIndex();
283 
284  // Record this address in a local vector
285  Functions.push_back((void *)Addr);
286 
287  // Build the function loaded notification message
288  iJIT_Method_Load FunctionMessage =
289  FunctionDescToIntelJITFormat(*Wrapper, Name->data(), Addr, Size);
290  DILineInfoTable Lines =
291  Context->getLineInfoForAddressRange({Addr, Index}, Size);
292  DILineInfoTable::iterator Begin = Lines.begin();
293  DILineInfoTable::iterator End = Lines.end();
294  for (DILineInfoTable::iterator It = Begin; It != End; ++It) {
295  LineInfo.push_back(
296  DILineInfoToIntelJITFormat((uintptr_t)Addr, It->first, It->second));
297  }
298  if (LineInfo.size() == 0) {
299  FunctionMessage.source_file_name = 0;
300  FunctionMessage.line_number_size = 0;
301  FunctionMessage.line_number_table = 0;
302  } else {
303  // Source line information for the address range is provided as
304  // a code offset for the start of the corresponding sub-range and
305  // a source line. JIT API treats offsets in LineNumberInfo structures
306  // as the end of the corresponding code region. The start of the code
307  // is taken from the previous element. Need to shift the elements.
308 
309  LineNumberInfo last = LineInfo.back();
310  last.Offset = FunctionMessage.method_size;
311  LineInfo.push_back(last);
312  for (size_t i = LineInfo.size() - 2; i > 0; --i)
313  LineInfo[i].LineNumber = LineInfo[i - 1].LineNumber;
314 
315  SourceFileName = Lines.front().second.FileName;
316  FunctionMessage.source_file_name =
317  const_cast<char *>(SourceFileName.c_str());
318  FunctionMessage.line_number_size = LineInfo.size();
319  FunctionMessage.line_number_table = &*LineInfo.begin();
320  }
321 
323  &FunctionMessage);
324  MethodIDs[(void *)Addr] = FunctionMessage.method_id;
325  }
326 
327  // To support object unload notification, we need to keep a list of
328  // registered function addresses for each loaded object. We will
329  // use the MethodIDs map to get the registered ID for each function.
330  LoadedObjectMap[ObjData] = Functions;
331  DebugObjects[Key] = std::move(DebugObjOwner);
332  }
333 }
334 
335 void IntelJITEventListener::notifyFreeingObject(ObjectKey Key) {
336 
337  int BackwardCompatibilityMode = getBackwardCompatibilityMode();
338  if (BackwardCompatibilityMode == 0) {
339  if (KeyToIttnotify.find(Key) == KeyToIttnotify.end())
340  return;
341  __itt_module_unload_with_sections(KeyToIttnotify[Key]->getModuleObject());
342  Wrapper->iJitIttNotifyInfo(
344  KeyToIttnotify[Key]->getModuleObject()->module_name,
345  KeyToIttnotify[Key]->getModuleObject()->module_size);
346  KeyToIttnotify.erase(Key);
347  } else if (BackwardCompatibilityMode == 1) {
348  // This object may not have been registered with the listener. If it wasn't,
349  // bail out.
350  if (DebugObjects.find(Key) == DebugObjects.end())
351  return;
352 
353  // Get the address of the object image for use as a unique identifier
354  const ObjectFile &DebugObj = *DebugObjects[Key].getBinary();
355  const void *ObjData = DebugObj.getData().data();
356 
357  // Get the object's function list from LoadedObjectMap
358  ObjectMap::iterator OI = LoadedObjectMap.find(ObjData);
359  if (OI == LoadedObjectMap.end())
360  return;
361  MethodAddressVector &Functions = OI->second;
362 
363  // Walk the function list, unregistering each function
364  for (MethodAddressVector::iterator FI = Functions.begin(),
365  FE = Functions.end();
366  FI != FE; ++FI) {
367  void *FnStart = const_cast<void *>(*FI);
368  MethodIDMap::iterator MI = MethodIDs.find(FnStart);
369  if (MI != MethodIDs.end()) {
371  &MI->second);
372  MethodIDs.erase(MI);
373  }
374  }
375 
376  // Erase the object from LoadedObjectMap
377  LoadedObjectMap.erase(OI);
378  DebugObjects.erase(Key);
379  }
380 }
381 
382 } // anonymous namespace.
383 
384 namespace llvm {
386  return new IntelJITEventListener(new IntelJITEventsWrapper);
387 }
388 
389 // for testing
391  IntelJITEventsWrapper* TestImpl) {
392  return new IntelJITEventListener(TestImpl);
393 }
394 
395 } // namespace llvm
396 
398 {
400 }
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
i
i
Definition: README.txt:29
llvm::RuntimeDyld::LoadedObjectInfo::getSectionLoadAddress
uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const override
Obtain the Load Address of a section by SectionRef.
Definition: RuntimeDyld.cpp:1263
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:100
llvm::MemoryBufferRef::getBufferStart
const char * getBufferStart() const
Definition: MemoryBufferRef.h:35
llvm
This class represents lattice values for constants.
Definition: AllocatorList.h:23
llvm::object::SectionRef::isData
bool isData() const
Whether this section contains data, not instructions.
Definition: ObjectFile.h:479
llvm::COFF::SectionSize
@ SectionSize
Definition: COFF.h:61
Metadata.h
_iJIT_Method_Load::line_number_table
pLineNumberInfo line_number_table
Definition: jitprofiling.h:196
llvm::object::SectionRef::getSize
uint64_t getSize() const
Definition: ObjectFile.h:455
llvm::RuntimeDyld::LoadedObjectInfo::getObjectForDebug
virtual object::OwningBinary< object::ObjectFile > getObjectForDebug(const object::ObjectFile &Obj) const =0
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
Wrapper
amdgpu aa AMDGPU Address space based Alias Analysis Wrapper
Definition: AMDGPUAliasAnalysis.cpp:30
llvm::object::OwningBinary::getBinary
T * getBinary()
Definition: Binary.h:226
DWARFContext.h
llvm::object::SectionRef::getName
Expected< StringRef > getName() const
Definition: ObjectFile.h:443
DenseMap.h
llvm::object::SectionRef::isBSS
bool isBSS() const
Whether this section contains BSS uninitialized data.
Definition: ObjectFile.h:483
SymbolSize.h
llvm::MemoryBufferRef::getBufferSize
size_t getBufferSize() const
Definition: MemoryBufferRef.h:37
llvm::object::ELFSectionRef
Definition: ELFObjectFile.h:101
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:1006
iJDE_JittingAPI
@ iJDE_JittingAPI
Definition: jitprofiling.h:121
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
IntelJITEventsWrapper.h
llvm::object
Definition: ObjectFileTransformer.h:18
llvm::object::Binary::getMemoryBufferRef
MemoryBufferRef getMemoryBufferRef() const
Definition: Binary.cpp:44
llvm::object::ObjectFile::section_end
virtual section_iterator section_end() const =0
iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED
@ iJVM_EVENT_TYPE_METHOD_LOAD_FINISHED
Definition: jitprofiling.h:42
llvm::AMDGPU::PALMD::Key
Key
PAL metadata keys.
Definition: AMDGPUMetadata.h:471
llvm::object::ELFSectionRef::getFlags
uint64_t getFlags() const
Definition: ELFObjectFile.h:115
llvm::AMDGPU::ElfNote::SectionName
const char SectionName[]
Definition: AMDGPUPTNote.h:24
llvm::StringRef::str
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Definition: StringRef.h:248
llvm::DWARFContext::create
static std::unique_ptr< DWARFContext > create(const object::ObjectFile &Obj, const LoadedObjectInfo *L=nullptr, std::string DWPName="", std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler)
Definition: DWARFContext.cpp:1955
llvm::StringRef::getAsInteger
std::enable_if_t< std::numeric_limits< T >::is_signed, bool > getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
Definition: StringRef.h:511
llvm::UnloadBinaryModule
@ UnloadBinaryModule
Definition: IntelJITEventsWrapper.h:27
llvm::IttEventType
IttEventType
Definition: IntelJITEventsWrapper.h:24
LLVMCreateIntelJITEventListener
LLVMJITEventListenerRef LLVMCreateIntelJITEventListener(void)
Definition: IntelJITEventListener.cpp:397
llvm::LoadBinaryModule
@ LoadBinaryModule
Definition: IntelJITEventsWrapper.h:25
llvm::object::ELFSectionRef::getOffset
uint64_t getOffset() const
Definition: ELFObjectFile.h:119
_iJIT_Method_Load
Definition: jitprofiling.h:174
llvm::DILineInfo::Line
uint32_t Line
Definition: DIContext.h:40
llvm::object::SymbolRef::getSection
Expected< section_iterator > getSection() const
Get section this symbol is defined in reference to.
Definition: ObjectFile.h:406
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
_LineNumberInfo
Definition: jitprofiling.h:164
llvm::object::SymbolRef::ST_Function
@ ST_Function
Definition: ObjectFile.h:173
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:80
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::DenseMap
Definition: DenseMap.h:714
DebugInfo.h
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::DILineInfo
A format-neutral container for source line information.
Definition: DIContext.h:31
llvm::HighlightColor::Address
@ Address
_iJIT_Method_Load::source_file_name
char * source_file_name
Definition: jitprofiling.h:205
ObjectFile.h
llvm::object::Binary::isELF
bool isELF() const
Definition: Binary.h:120
llvm::object::content_iterator
Definition: SymbolicFile.h:68
llvm::MemoryBufferRef::getBuffer
StringRef getBuffer() const
Definition: MemoryBufferRef.h:32
_iJIT_Method_Load::method_id
unsigned int method_id
Definition: jitprofiling.h:177
llvm::JITEventListener
JITEventListener - Abstract interface for use by the JIT to notify clients about significant events d...
Definition: JITEventListener.h:41
llvm::wrap
LLVMAttributeRef wrap(Attribute Attr)
Definition: Attributes.h:224
_iJIT_Method_Load::line_number_size
unsigned int line_number_size
Definition: jitprofiling.h:193
llvm::IntelJITEventsWrapper::iJitIttNotifyInfo
int iJitIttNotifyInfo(IttEventType EventType, const char *Name, unsigned int Size)
Definition: IntelJITEventsWrapper.h:79
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:57
llvm::object::ObjectFile
This class is the base class for all object file types.
Definition: ObjectFile.h:225
llvm::LoadBinarySection
@ LoadBinarySection
Definition: IntelJITEventsWrapper.h:26
ValueHandle.h
llvm::object::SectionRef::isText
bool isText() const
Whether this section contains instructions.
Definition: ObjectFile.h:475
DIContext.h
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::object::SymbolRef::Type
Type
Definition: ObjectFile.h:168
llvm::object::OwningBinary
Definition: RuntimeDyld.h:36
llvm::RuntimeDyld::LoadedObjectInfo
Information about the loaded object.
Definition: RuntimeDyld.h:70
llvm::SectionName
Definition: DWARFSection.h:20
llvm::JITEventListener::createIntelJITEventListener
static JITEventListener * createIntelJITEventListener()
Definition: JITEventListener.h:75
Function.h
ExecutionEngine.h
llvm::object::computeSymbolSizes
std::vector< std::pair< SymbolRef, uint64_t > > computeSymbolSizes(const ObjectFile &O)
Definition: SymbolSize.cpp:46
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:557
llvm::object::SymbolRef::getType
Expected< SymbolRef::Type > getType() const
Definition: ObjectFile.h:410
llvm::SmallVectorImpl::iterator
typename SuperClass::iterator iterator
Definition: SmallVector.h:562
llvm::object::ObjectFile::sections
section_iterator_range sections() const
Definition: ObjectFile.h:319
llvm::StringRef::data
const LLVM_NODISCARD char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
Definition: StringRef.h:152
_LineNumberInfo::Offset
unsigned int Offset
Definition: jitprofiling.h:167
llvm::object::SymbolRef
This is a value type class that represents a single symbol in the list of symbols in the object file.
Definition: ObjectFile.h:164
llvm::object::Binary::getData
StringRef getData() const
Definition: Binary.cpp:40
iJVM_EVENT_TYPE_METHOD_UNLOAD_START
@ iJVM_EVENT_TYPE_METHOD_UNLOAD_START
Definition: jitprofiling.h:48
raw_ostream.h
llvm::object::SymbolRef::getName
Expected< StringRef > getName() const
Definition: ObjectFile.h:386
MachineFunction.h
LLVMJITEventListenerRef
struct LLVMOpaqueJITEventListener * LLVMJITEventListenerRef
Definition: Types.h:163
_iJIT_Method_Load::method_size
unsigned int method_size
Definition: jitprofiling.h:190
Errno.h
llvm::object::SymbolRef::getAddress
Expected< uint64_t > getAddress() const
Returns the symbol virtual address (i.e.
Definition: ObjectFile.h:390
Debug.h
llvm::IntelJITEventsWrapper
Definition: IntelJITEventsWrapper.h:31
JITEventListener.h
llvm::MD5Hash
uint64_t MD5Hash(StringRef Str)
Helper to compute and return lower 64 bits of the given string's MD5 hash.
Definition: MD5.h:109