Go to the source code of this file.
◆ NUM_EVENTS
◆ __attribute__() [1/2]
__attribute__ |
( |
(constructor) |
| ) |
|
Definition at line 12 of file init_fini.c.
12 {
13
16 fprintf(
stderr,
"PAPI_library_init version mismatch\n");
17 exit(1);
18 }
19 else {
20 fprintf(
stderr,
"appio: PAPI library initialized\n");
21 }
22
23
25 fprintf(
stderr,
"Error creating event set\n");
26 exit(2);
27 }
28
30 int e;
31 int event_code;
35 fprintf(
stderr,
"Error getting code for %s\n",
names[e]);
36 exit(2);
37 }
40 fprintf(
stderr,
"Error adding %s to event set\n",
names[e]);
41 exit(2);
42 }
43 }
44
45
46 fprintf(
stderr,
"appio: starting PAPI counters; main program will follow\n");
48 fprintf(
stderr,
"Error in PAPI_start\n");
49 exit(1);
50 }
51 return;
52}
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
initialize the PAPI library.
Start counting hardware events in an event set.
static const char * names[NUM_EVENTS]
◆ __attribute__() [2/2]
__attribute__ |
( |
(destructor) |
| ) |
|
Definition at line 54 of file init_fini.c.
54 {
55 int e;
56
58 fprintf(
stderr,
"Error in PAPI_stop_counters\n");
59 }
60 fprintf(
stderr,
"\nappio: PAPI counts (for pid=%6d)\n"
61 "appio: ----------------------------\n", (int)getpid());
64 return;
65}
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
◆ EventSet
◆ names
const char* names[NUM_EVENTS] = {"READ_CALLS", "READ_BYTES","READ_USEC","WRITE_CALLS","WRITE_BYTES","WRITE_USEC"} |
|
static |
◆ values