16 const char *sufx =
".icache";
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");
27 if (l != (sprintf(papiFileName,
"%s%s%s", outdir, papi_event_name, sufx))) {
28 fprintf(
stderr,
"sprintf failed to copy into papiFileName.\n");
32 if (NULL == (ofp_papi = fopen(papiFileName,
"w"))) {
33 fprintf(
stderr,
"Failed to open file %s.\n", papiFileName);
38 seq_driver(ofp_papi, papi_event_name, junk, show_progress);
void i_cache_driver(char *papi_event_name, int junk, hw_desc_t *hw_desc, char *outdir, int show_progress)
void seq_driver(FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
Return codes and api definitions.
int fclose(FILE *__stream)