PAPI 7.1.0.0
Loading...
Searching...
No Matches
icache.c File Reference
Include dependency graph for icache.c:

Go to the source code of this file.

Functions

void i_cache_driver (char *papi_event_name, int junk, hw_desc_t *hw_desc, char *outdir, int show_progress)
 

Function Documentation

◆ i_cache_driver()

void i_cache_driver ( char *  papi_event_name,
int  junk,
hw_desc_t hw_desc,
char *  outdir,
int  show_progress 
)

Definition at line 13 of file icache.c.

14{
15 // Open output file.
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 // Close output file.
41 fclose(ofp_papi);
42 free(papiFileName);
43
44 return;
45}
void seq_driver(FILE *ofp_papi, char *papi_event_name, int init, int show_progress)
FILE * stderr
int fclose(FILE *__stream)
Here is the call graph for this function:
Here is the caller graph for this function: