17{
22
24
28
31 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
32
34
37 "This test is intended only for Pentium 4.", 1 );
38 }
39 } else {
41 "This test is intended only for Pentium 4.", 1 );
42 }
43
47
49
50
54
58
60
64
67 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_LD_INS",
69
70
74
78
80
84
87 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_SR_INS",
89
90
93 test_fail( __FILE__, __LINE__,
"PAPI_add_event: PAPI_LST_INS",
retval );
94
98
100
104
105
108 test_fail( __FILE__, __LINE__,
"PAPI_add_event: PAPI_LD_INS",
retval );
109
113
115
119
122 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_LD_INS",
124
125
128 test_fail( __FILE__, __LINE__,
"PAPI_add_event: PAPI_SR_INS",
retval );
129
133
135
139
142 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_SR_INS",
144
147 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_LST_INS",
149
150
153 test_fail( __FILE__, __LINE__,
"PAPI_add_event: PAPI_LD_INS",
retval );
154
157 test_fail( __FILE__, __LINE__,
"PAPI_add_event: PAPI_SR_INS",
retval );
158
162
164
168
171 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_LD_INS",
173
176 test_fail( __FILE__, __LINE__,
"PAPI_remove_event: PAPI_SR_INS",
178
179
180
182 printf( "Pentium 4 Load / Store tests.\n" );
183 printf
184 ( "These PAPI events are counted by setting a tag at the front of the pipeline,\n" );
185 printf
186 ( "and counting tags at the back of the pipeline. All the tags are the same 'color'\n" );
187 printf
188 ( "and can't be distinguished from each other. Therefore, PAPI_LD_INS and PAPI_SR_INS\n" );
189 printf
190 ( "cannot be counted with the other two events, or the answer will always == PAPI_LST_INS.\n" );
191 printf
192 ( "-------------------------------------------------------------------------------------------\n" );
194 printf(
"Default domain is: %d (%s)\n",
tmp,
197 printf(
"Default granularity is: %d (%s)\n",
tmp,
199 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS / 10 );
200 printf
201 ( "-------------------------------------------------------------------------------------------\n" );
202
203 printf
204 ( "Test: 1 2 3 4 5 6\n" );
205 printf( "%s %12lld %12s %12s %12lld %12s %12lld\n", "PAPI_LD_INS: ",
207 "------", (
values[5] )[0] );
208 printf( "%s %12s %12lld %12s %12s %12lld %12lld\n", "PAPI_SR_INS: ",
209 "------", (
values[1] )[0],
"------",
"------",
211 printf( "%s %12s %12s %12lld %12lld %12lld %12s\n", "PAPI_LST_INS:",
213 (
values[4] )[0],
"------" );
214 printf
215 ( "-------------------------------------------------------------------------------------------\n" );
216
217 printf( "Test 1: PAPI_LD_INS only.\n" );
218 printf( "Test 2: PAPI_SR_INS only.\n" );
219 printf( "Test 3: PAPI_LST_INS only.\n" );
220 printf( "Test 4: PAPI_LD_INS and PAPI_LST_INS.\n" );
221 printf( "Test 5: PAPI_SR_INS and PAPI_LST_INS.\n" );
222 printf( "Test 6: PAPI_LD_INS and PAPI_SR_INS.\n" );
223 printf
224 ( "Verification: Values within each column should be the same.\n" );
225 printf( " R3C3 ~= (R1C1 + R2C2) ~= all other entries.\n" );
226 }
227
229
230 return 0;
231
232}
static const PAPI_hw_info_t * hw_info
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
get information about the system hardware
Get PAPI library or event set options.
initialize the PAPI library.
removes a hardware event from a PAPI event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
#define PAPI_VENDOR_INTEL
static long long values[NUM_EVENTS]
int tests_quiet(int argc, char **argv)
char * stringify_all_domains(int domains)
char * stringify_granularity(int granularity)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
long long ** allocate_test_space(int num_tests, int num_events)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)