26{
34
35
36 const int eventlist[] = {
43#if 0
84#endif
85 0
86 };
87
89
93
95 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
96 }
97
100
101
104 for ( j = 0; j < 2; j++ ) {
106
119 break;
120 } else {
122 "PAPI_get_hardware_info",
124 }
125
132 if (!
TESTS_QUIET) printf(
"Unknown Write policy " );
133 } else {
134 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info",
136 }
137
144 if (!
TESTS_QUIET) printf(
"Unknown Replacement policy " );
145 } else {
146 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info",
148 }
149
156 if (!
TESTS_QUIET) printf(
"Read Write Allocate " );
158 if (!
TESTS_QUIET) printf(
"Unknown Allocate policy " );
159 } else {
160 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info",
162 }
163
165 printf( "Cache:\n" );
166 if ( L[
i].cache[j].
type ) {
167 printf( " Total size: %dKB\n"
168 " Line size: %dB\n"
169 " Number of Lines: %d\n"
170 " Associativity: %d\n\n",
171 ( L[
i].cache[j].size ) >> 10,
172 L[
i].cache[j].line_size,
173 L[
i].cache[j].num_lines,
174 L[
i].cache[j].associativity );
175 }
176 }
177 }
178 }
179
180 for (
i = 0; eventlist[
i] != 0;
i++ ) {
182 continue;
184 continue;
185
188
190 printf( "\nEvent: %s\nShort: %s\nLong: %s\n\n",
193 printf( " Bytes\t\tCold\t\tWarm\tPercent\n" );
194 }
195
198
199 for ( j = 512; j <= 16 * ( 1024 * 1024 ); j = j * 2 ) {
202
205
207
212
214
217
222 (
float ) ( (
values[0] !=0 ) ?
223 values[0] : 1 ) * 100.0 ) );
224 }
225 }
226
229
233 }
234
237
239
240 return 0;
241}
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Convert a numeric hardware event code to a name.
Get the event's name and description info.
get information about the system hardware
initialize the PAPI library.
Read hardware counters from an event set.
removes a hardware event from a PAPI event set.
Reset the hardware event counts in an event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
void do_misses(int n, int bytes)
static long long values[NUM_EVENTS]
#define PAPI_MH_TYPE_DATA
#define PAPI_MH_CACHE_REPLACEMENT_POLICY(a)
#define PAPI_MH_TYPE_RW_ALLOC
#define PAPI_MH_TYPE_PSEUDO_LRU
#define PAPI_MH_CACHE_TYPE(a)
#define PAPI_MH_TYPE_WR_ALLOC
#define PAPI_MH_TYPE_RD_ALLOC
#define PAPI_MH_CACHE_ALLOCATION_POLICY(a)
#define PAPI_MH_TYPE_INST
#define PAPI_MH_TYPE_UNKNOWN
#define PAPI_MH_TYPE_VECTOR
#define PAPI_MH_TYPE_EMPTY
#define PAPI_MH_TYPE_TRACE
#define PAPI_MH_TYPE_UNIFIED
#define PAPI_MH_CACHE_WRITE_POLICY(a)
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
char short_descr[PAPI_MIN_STR_LEN]
char symbol[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]
PAPI_mh_info_t mem_hierarchy
PAPI_mh_level_t level[PAPI_MAX_MEM_HIERARCHY_LEVELS]