Go to the source code of this file.
|
| int | vendorp1_init_pre (void) |
| |
| int | vendorp1_init (void) |
| |
| int | vendorp1_shutdown (void) |
| |
| int | vendorp1_ctx_open (unsigned int *events_id, int num_events, vendorp_ctx_t *ctx) |
| |
| int | vendorp1_ctx_start (vendorp_ctx_t ctx) |
| |
| int | vendorp1_ctx_read (vendorp_ctx_t ctx, long long **counters) |
| |
| int | vendorp1_ctx_stop (vendorp_ctx_t ctx) |
| |
| int | vendorp1_ctx_reset (vendorp_ctx_t ctx) |
| |
| int | vendorp1_ctx_close (vendorp_ctx_t ctx) |
| |
| int | vendorp1_evt_enum (unsigned int *event_code, int modifier) |
| |
| int | vendorp1_evt_code_to_name (unsigned int event_code, char *name, int len) |
| |
| int | vendorp1_evt_code_to_descr (unsigned int event_code, char *descr, int len) |
| |
| int | vendorp1_evt_code_to_info (unsigned int event_code, PAPI_event_info_t *info) |
| |
| int | vendorp1_evt_name_to_code (const char *name, unsigned int *event_code) |
| |
◆ vendorp1_ctx_close()
| int vendorp1_ctx_close |
( |
vendorp_ctx_t |
ctx | ) |
|
Definition at line 215 of file vendor_profiler_v1.c.
216{
217 int papi_errno;
218
220
223 goto fn_fail;
224 }
225
226 ctx->state &= ~TEMPL_CTX_OPENED;
227
230 goto fn_fail;
231 }
232
234
235 fn_exit:
237 return papi_errno;
238 fn_fail:
239 goto fn_exit;
240
241}
inline_static int _papi_hwi_lock(int lck)
inline_static int _papi_hwi_unlock(int lck)
static int finalize_ctx(vendorp_ctx_t ctx)
static int close_ctx(vendorp_ctx_t ctx)
◆ vendorp1_ctx_open()
| int vendorp1_ctx_open |
( |
unsigned int * |
events_id, |
|
|
int |
num_events, |
|
|
vendorp_ctx_t * |
ctx |
|
) |
| |
Definition at line 132 of file vendor_profiler_v1.c.
133{
134 int papi_errno;
135
137 if (NULL == *ctx) {
139 }
140
142
145 goto fn_fail;
146 }
147
150 goto fn_fail;
151 }
152
154
155 fn_exit:
157 return papi_errno;
158 fn_fail:
161 goto fn_exit;
162}
#define papi_calloc(a, b)
static int init_ctx(unsigned int *events_id, int num_events, vendorp_ctx_t ctx)
static int open_ctx(vendorp_ctx_t ctx)
◆ vendorp1_ctx_read()
| int vendorp1_ctx_read |
( |
vendorp_ctx_t |
ctx, |
|
|
long long ** |
counters |
|
) |
| |
Definition at line 172 of file vendor_profiler_v1.c.
173{
174 int papi_errno;
175
177 for (
i = 0;
i < ctx->num_events; ++
i) {
181 return papi_errno;
182 }
183
185 ctx->counters[
i] = (
long long) 0;
187 ctx->counters[
i] = (
long long) 42;
190 ctx->counters[
i] = (ctx->counters[
i]) ? ctx->counters[
i] * 2 : 2;
191 } else {
192 ctx->counters[
i] = (ctx->counters[
i]) ? ctx->counters[
i] + 1 : 1;
193 }
194 }
195 }
196 *counters = ctx->counters;
198}
static int evt_id_to_info(uint32_t event_id, event_info_t *info)
static ntv_event_table_t * ntv_table_p
◆ vendorp1_ctx_reset()
| int vendorp1_ctx_reset |
( |
vendorp_ctx_t |
ctx | ) |
|
Definition at line 208 of file vendor_profiler_v1.c.
209{
210 memset(ctx->counters, 0, sizeof(ctx->counters) * ctx->num_events);
212}
◆ vendorp1_ctx_start()
| int vendorp1_ctx_start |
( |
vendorp_ctx_t |
ctx | ) |
|
◆ vendorp1_ctx_stop()
| int vendorp1_ctx_stop |
( |
vendorp_ctx_t |
ctx | ) |
|
◆ vendorp1_evt_code_to_descr()
| int vendorp1_evt_code_to_descr |
( |
unsigned int |
event_code, |
|
|
char * |
descr, |
|
|
int |
len |
|
) |
| |
Definition at line 329 of file vendor_profiler_v1.c.
330{
331 int papi_errno;
332
336 return papi_errno;
337 }
338
341}
◆ vendorp1_evt_code_to_info()
Definition at line 344 of file vendor_profiler_v1.c.
345{
346 int papi_errno;
347
351 return papi_errno;
352 }
353
354 switch (code_info.
flags) {
355 case 0:
358 break;
360 sprintf(info->
symbol,
"%s:device=%i:function=%s",
365 break;
367 {
372 }
375 sprintf(info->
long_descr,
"%s masks:Device qualifier [%s]",
377 break;
378 }
380 sprintf(info->
symbol,
"%s:function=%s",
383 sprintf(info->
long_descr,
"%s masks:Mandatory function qualifier (exp,sum)",
385 break;
386 default:
388 }
389
390 return papi_errno;
391}
static nvmlDevice_t * devices
device_table_t * device_table_p
char symbol[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]
◆ vendorp1_evt_code_to_name()
| int vendorp1_evt_code_to_name |
( |
unsigned int |
event_code, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
Definition at line 294 of file vendor_profiler_v1.c.
295{
296 int papi_errno;
297
301 return papi_errno;
302 }
303
304 switch (info.
flags) {
306 snprintf(
name, len,
"%s:device=%i:function=%s",
309 break;
311 snprintf(
name, len,
"%s:device=%i",
314 break;
316 snprintf(
name, len,
"%s:function=%s",
319 break;
320 default:
322 }
323
325 return papi_errno;
326}
◆ vendorp1_evt_enum()
| int vendorp1_evt_enum |
( |
unsigned int * |
event_code, |
|
|
int |
modifier |
|
) |
| |
Definition at line 244 of file vendor_profiler_v1.c.
245{
246 int papi_errno;
247
251 return papi_errno;
252 }
253
254 switch(modifier) {
258 }
264 break;
268 break;
269 }
272 break;
274 if (info.
flags == 0) {
277 break;
278 }
282 break;
283 }
285 break;
286 default:
288 }
289
290 return papi_errno;
291}
#define PAPI_NTV_ENUM_UMASKS
static int evt_id_create(event_info_t *info, uint32_t *event_id)
◆ vendorp1_evt_name_to_code()
| int vendorp1_evt_name_to_code |
( |
const char * |
name, |
|
|
unsigned int * |
event_code |
|
) |
| |
Definition at line 394 of file vendor_profiler_v1.c.
395{
396 int papi_errno;
397
401 return papi_errno;
402 }
403
404 int device;
407 return papi_errno;
408 }
409
410 int opcode = 0;
413 return papi_errno;
414 }
415
420 break;
421 }
422 }
423
432 return papi_errno;
433 }
434 } else {
441 return papi_errno;
442 }
443 }
444
446
447 return papi_errno;
448}
static int evt_name_to_basename(const char *name, char *base, int len)
static int evt_name_to_opcode(const char *name, int *opcode)
static int evt_name_to_device(const char *name, int *device)
◆ vendorp1_init()
| int vendorp1_init |
( |
void |
| ) |
|
Definition at line 93 of file vendor_profiler_v1.c.
94{
95 int papi_errno;
96
99 return papi_errno;
100 }
101
104 goto fn_fail;
105 }
106
108
109 fn_exit:
110 return papi_errno;
111 fn_fail:
114 goto fn_exit;
115}
static int unload_profiler_v1_symbols(void)
static ntv_event_table_t ntv_table
static int finalize_event_table(void)
static int initialize_event_table(void)
static int load_profiler_v1_symbols(void)
◆ vendorp1_init_pre()
| int vendorp1_init_pre |
( |
void |
| ) |
|
◆ vendorp1_shutdown()
| int vendorp1_shutdown |
( |
void |
| ) |
|