20 #ifndef LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H 21 #define LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H 30 typedef op_agent_t (*op_open_agent_ptr_t)();
31 typedef int (*op_close_agent_ptr_t)(op_agent_t);
32 typedef int (*op_write_native_code_ptr_t)(op_agent_t,
37 typedef int (*op_write_debug_line_info_ptr_t)(op_agent_t,
40 struct debug_line_info const*);
41 typedef int (*op_unload_native_code_ptr_t)(op_agent_t, uint64_t);
44 typedef int (*op_major_version_ptr_t)();
47 typedef bool (*IsOProfileRunningPtrT)();
51 op_open_agent_ptr_t OpenAgentFunc;
52 op_close_agent_ptr_t CloseAgentFunc;
53 op_write_native_code_ptr_t WriteNativeCodeFunc;
54 op_write_debug_line_info_ptr_t WriteDebugLineInfoFunc;
55 op_unload_native_code_ptr_t UnloadNativeCodeFunc;
56 op_major_version_ptr_t MajorVersionFunc;
57 op_major_version_ptr_t MinorVersionFunc;
58 IsOProfileRunningPtrT IsOProfileRunningFunc;
68 op_close_agent_ptr_t CloseAgentImpl,
69 op_write_native_code_ptr_t WriteNativeCodeImpl,
70 op_write_debug_line_info_ptr_t WriteDebugLineInfoImpl,
71 op_unload_native_code_ptr_t UnloadNativeCodeImpl,
72 op_major_version_ptr_t MajorVersionImpl,
73 op_major_version_ptr_t MinorVersionImpl,
74 IsOProfileRunningPtrT MockIsOProfileRunningImpl = 0)
75 : OpenAgentFunc(OpenAgentImpl),
76 CloseAgentFunc(CloseAgentImpl),
77 WriteNativeCodeFunc(WriteNativeCodeImpl),
78 WriteDebugLineInfoFunc(WriteDebugLineInfoImpl),
79 UnloadNativeCodeFunc(UnloadNativeCodeImpl),
80 MajorVersionFunc(MajorVersionImpl),
81 MinorVersionFunc(MinorVersionImpl),
82 IsOProfileRunningFunc(MockIsOProfileRunningImpl),
97 const unsigned int size);
100 struct debug_line_info
const*
info);
117 bool checkForOProfileProcEntry();
119 bool isOProfileRunning();
124 #endif // LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H
This class represents lattice values for constants.
block Block Frequency true
int op_write_debug_line_info(void const *code, size_t num_entries, struct debug_line_info const *info)
OProfileWrapper(op_open_agent_ptr_t OpenAgentImpl, op_close_agent_ptr_t CloseAgentImpl, op_write_native_code_ptr_t WriteNativeCodeImpl, op_write_debug_line_info_ptr_t WriteDebugLineInfoImpl, op_unload_native_code_ptr_t UnloadNativeCodeImpl, op_major_version_ptr_t MajorVersionImpl, op_major_version_ptr_t MinorVersionImpl, IsOProfileRunningPtrT MockIsOProfileRunningImpl=0)
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringRef > StandardNames)
Initialize the set of available library functions based on the specified target triple.
int op_write_native_code(const char *name, uint64_t addr, void const *code, const unsigned int size)
int op_unload_native_code(uint64_t addr)