Go to the source code of this file.
◆ instr_driver()
| void instr_driver |
( |
char * |
papi_event_name, |
|
|
hw_desc_t * |
hw_desc, |
|
|
char * |
outdir |
|
) |
| |
Definition at line 1308 of file instructions.c.
1309{
1312 FILE* ofp_papi;
1313 const char *sufx = ".instr";
1314 char *papiFileName;
1315
1316 (void)hw_desc;
1317
1318 int l = strlen(outdir)+strlen(papi_event_name)+strlen(sufx);
1319 if (NULL == (papiFileName = (char *)calloc( 1+l, sizeof(char)))) {
1320 return;
1321 }
1322 if (l != (sprintf(papiFileName, "%s%s%s", outdir, papi_event_name, sufx))) {
1323 goto error0;
1324 }
1325 if (NULL == (ofp_papi = fopen(papiFileName,"w"))) {
1326 fprintf(
stderr,
"Failed to open file %s.\n", papiFileName);
1327 goto error0;
1328 }
1329
1332 goto error1;
1333 }
1334
1337 goto error1;
1338 }
1339
1341
1343
1346 goto error1;
1347 }
1350 goto error1;
1351 }
1352
1353error1:
1355error0:
1356 free(papiFileName);
1357 return;
1358}
add PAPI preset or native hardware event by name to an EventSet
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
void instr_test(int EventSet, FILE *fp)
int fclose(FILE *__stream)