14{
15
16 const char *sufx = ".icache";
17 char *papiFileName;
18 FILE *ofp_papi;
19
20 (void)hw_desc;
21
22 int l = strlen(outdir)+strlen(papi_event_name)+strlen(sufx);
23 if (NULL == (papiFileName = (char *)calloc( 1+l, sizeof(char) ))) {
24 fprintf(
stderr,
"Failed to allocate papiFileName.\n");
25 return;
26 }
27 if (l != (sprintf(papiFileName, "%s%s%s", outdir, papi_event_name, sufx))) {
28 fprintf(
stderr,
"sprintf failed to copy into papiFileName.\n");
29 free(papiFileName);
30 return;
31 }
32 if (NULL == (ofp_papi = fopen(papiFileName,"w"))) {
33 fprintf(
stderr,
"Failed to open file %s.\n", papiFileName);
34 free(papiFileName);
35 return;
36 }
37
38 seq_driver(ofp_papi, papi_event_name, junk, show_progress);
39
40
42 free(papiFileName);
43
44 return;
45}
void seq_driver(FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
int fclose(FILE *__stream)