22
22
#include " OmptCallback.h"
23
23
#include " OmptConnector.h"
24
24
25
+ #undef DEBUG_PREFIX
26
+ #define DEBUG_PREFIX " OMPT"
27
+
25
28
using namespace llvm ::omp::target::ompt;
26
29
27
30
// Define OMPT callback functions (bound to actual callbacks later on)
@@ -64,10 +67,10 @@ ompt_function_lookup_t llvm::omp::target::ompt::lookupCallbackByName = nullptr;
64
67
int llvm::omp::target::ompt::initializeLibrary (ompt_function_lookup_t lookup,
65
68
int initial_device_num,
66
69
ompt_data_t *tool_data) {
67
- DP (" OMPT: Executing initializeLibrary (libomp)\n " );
70
+ DP (" Executing initializeLibrary (libomp)\n " );
68
71
#define bindOmptFunctionName (OmptFunction, DestinationFunction ) \
69
72
DestinationFunction = (OmptFunction##_t)lookup (#OmptFunction); \
70
- DP (" OMPT: initializeLibrary (libomp) bound %s=%p\n " , #DestinationFunction, \
73
+ DP (" initializeLibrary (libomp) bound %s=%p\n " , #DestinationFunction, \
71
74
((void *)(uint64_t )DestinationFunction));
72
75
73
76
bindOmptFunctionName (ompt_get_callback, lookupCallbackByCode);
@@ -87,15 +90,15 @@ int llvm::omp::target::ompt::initializeLibrary(ompt_function_lookup_t lookup,
87
90
}
88
91
89
92
void llvm::omp::target::ompt::finalizeLibrary (ompt_data_t *data) {
90
- DP (" OMPT: Executing finalizeLibrary (libomp)\n " );
93
+ DP (" Executing finalizeLibrary (libomp)\n " );
91
94
// Before disabling OMPT, call the (plugin) finalizations that were registered
92
95
// with this library
93
96
LibraryFinalizer->finalize ();
94
97
delete LibraryFinalizer;
95
98
}
96
99
97
100
void llvm::omp::target::ompt::connectLibrary () {
98
- DP (" OMPT: Entering connectLibrary (libomp)\n " );
101
+ DP (" Entering connectLibrary (libomp)\n " );
99
102
// Connect with libomp
100
103
static OmptLibraryConnectorTy LibompConnector (" libomp" );
101
104
static ompt_start_tool_result_t OmptResult;
@@ -118,13 +121,13 @@ void llvm::omp::target::ompt::connectLibrary() {
118
121
FOREACH_OMPT_EMI_EVENT (bindOmptCallback)
119
122
#undef bindOmptCallback
120
123
121
- DP (" OMPT: Exiting connectLibrary (libomp)\n " );
124
+ DP (" Exiting connectLibrary (libomp)\n " );
122
125
}
123
126
124
127
extern " C" {
125
128
// / Used for connecting libomptarget with a plugin
126
129
void ompt_libomptarget_connect (ompt_start_tool_result_t *result) {
127
- DP (" OMPT: Enter ompt_libomptarget_connect\n " );
130
+ DP (" Enter ompt_libomptarget_connect\n " );
128
131
if (result && LibraryFinalizer) {
129
132
// Cache each fini function, so that they can be invoked on exit
130
133
LibraryFinalizer->registerRtl (result->finalize );
@@ -134,7 +137,7 @@ void ompt_libomptarget_connect(ompt_start_tool_result_t *result) {
134
137
result->initialize (lookupCallbackByName,
135
138
/* initial_device_num */ 0 , /* tool_data */ nullptr );
136
139
}
137
- DP (" OMPT: Leave ompt_libomptarget_connect\n " );
140
+ DP (" Leave ompt_libomptarget_connect\n " );
138
141
}
139
142
}
140
143
#else
0 commit comments