PAPI  5.4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
multiplex1.c File Reference
Include dependency graph for multiplex1.c:

Go to the source code of this file.

Macros

#define TOTAL_EVENTS   6
 
#define CPP_TEST_FAIL(string, retval)   test_fail(__FILE__, __LINE__, string, retval)
 

Functions

void init_papi (int *out_events, int *len)
 
int case1 ()
 
int case2 ()
 
int case3 ()
 
int case4 ()
 
int case5 ()
 
int main (int argc, char **argv)
 

Variables

int solaris_preset_PAPI_events [TOTAL_EVENTS]
 
int power6_preset_PAPI_events [TOTAL_EVENTS]
 
int preset_PAPI_events [TOTAL_EVENTS]
 
static int PAPI_events [TOTAL_EVENTS] = { 0, }
 
static int PAPI_events_len = 0
 

Macro Definition Documentation

#define CPP_TEST_FAIL (   string,
  retval 
)    test_fail(__FILE__, __LINE__, string, retval)

Definition at line 30 of file multiplex1.c.

#define TOTAL_EVENTS   6

Definition at line 16 of file multiplex1.c.

Function Documentation

int case1 ( void  )

Definition at line 90 of file multiplex1.c.

91 {
92  int retval, i, EventSet = PAPI_NULL;
93  long long values[2];
94 
95  PAPI_events_len = 2;
97 
98  retval = PAPI_create_eventset( &EventSet );
99  if ( retval != PAPI_OK )
100  CPP_TEST_FAIL( "PAPI_create_eventset", retval );
101 
102  for ( i = 0; i < PAPI_events_len; i++ ) {
103  char out[PAPI_MAX_STR_LEN];
104 
105  retval = PAPI_add_event( EventSet, PAPI_events[i] );
106  if ( retval != PAPI_OK )
107  CPP_TEST_FAIL( "PAPI_add_event", retval );
109  if ( !TESTS_QUIET )
110  printf( "Added %s\n", out );
111  }
112 
113  do_stuff( );
114 
115  if ( PAPI_start( EventSet ) != PAPI_OK )
116  CPP_TEST_FAIL( "PAPI_start", retval );
117 
118  do_stuff( );
119 
120  retval = PAPI_stop( EventSet, values );
121  if ( retval != PAPI_OK )
122  CPP_TEST_FAIL( "PAPI_stop", retval );
123 
124  if ( !TESTS_QUIET ) {
125  test_print_event_header( "case1:", EventSet );
126  printf( TAB2, "case1:", values[0], values[1] );
127  }
128  retval = PAPI_cleanup_eventset( EventSet ); /* JT */
129  if ( retval != PAPI_OK )
130  CPP_TEST_FAIL( "PAPI_cleanup_eventset", retval );
131 
132  PAPI_shutdown( );
133  return ( SUCCESS );
134 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2258
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1622
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_NULL
Definition: papi.h:290
void do_stuff(void)
Definition: do_loops.c:249
int EventSet
Definition: data_range.c:25
static int PAPI_events_len
Definition: multiplex1.c:28
return PAPI_OK
Definition: linux-nvml.c:458
#define SUCCESS
Definition: test_utils.h:5
#define printf
Definition: papi_test.h:125
void init_papi(int *out_events, int *len)
Definition: multiplex1.c:33
int TESTS_QUIET
Definition: test_utils.c:11
int i
Definition: fileop.c:140
void PAPI_shutdown(void)
Definition: papi.c:4400
#define TAB2
Definition: papi_test.h:113
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2834
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1424
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
unsigned int PAPI_events[EVENTSLEN]
Definition: derived.c:20
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
void test_print_event_header(char *call, int evset)
Definition: test_utils.c:645
int PAPI_start(int EventSet)
Definition: papi.c:2053
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

int case2 ( void  )

Definition at line 139 of file multiplex1.c.

140 {
141  int retval, i, EventSet = PAPI_NULL;
142  long long values[2];
143 
144  PAPI_events_len = 2;
146 
147  retval = PAPI_create_eventset( &EventSet );
148  if ( retval != PAPI_OK )
149  CPP_TEST_FAIL( "PAPI_create_eventset", retval );
150 
151  /* In Component PAPI, EventSets must be assigned a component index
152  before you can fiddle with their internals.
153  0 is always the cpu component */
154  retval = PAPI_assign_eventset_component( EventSet, 0 );
155  if ( retval != PAPI_OK )
156  CPP_TEST_FAIL( "PAPI_assign_eventset_component", retval );
157 
158  retval = PAPI_set_multiplex( EventSet );
159  if ( retval == PAPI_ENOSUPP) {
160  test_skip(__FILE__, __LINE__, "Multiplex not supported", 1);
161  }
162  else if ( retval != PAPI_OK )
163  CPP_TEST_FAIL( "PAPI_set_multiplex", retval );
164 
165  for ( i = 0; i < PAPI_events_len; i++ ) {
166  char out[PAPI_MAX_STR_LEN];
167 
168  retval = PAPI_add_event( EventSet, PAPI_events[i] );
169  if ( retval != PAPI_OK )
170  CPP_TEST_FAIL( "PAPI_add_event", retval );
172  if ( !TESTS_QUIET )
173  printf( "Added %s\n", out );
174  }
175 
176  do_stuff( );
177 
178  if ( PAPI_start( EventSet ) != PAPI_OK )
179  CPP_TEST_FAIL( "PAPI_start", retval );
180 
181  do_stuff( );
182 
183  retval = PAPI_stop( EventSet, values );
184  if ( retval != PAPI_OK )
185  CPP_TEST_FAIL( "PAPI_stop", retval );
186 
187  if ( !TESTS_QUIET ) {
188  test_print_event_header( "case2:", EventSet );
189  printf( TAB2, "case2:", values[0], values[1] );
190  }
191 
192  retval = PAPI_cleanup_eventset( EventSet );
193  if ( retval != PAPI_OK )
194  CPP_TEST_FAIL( "PAPI_cleanup_eventset", retval );
195 
196  PAPI_shutdown( );
197  return ( SUCCESS );
198 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2258
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1622
void test_skip(char *file, int line, char *call, int retval)
Definition: test_utils.c:614
#define PAPI_ENOSUPP
Definition: papi.h:269
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_NULL
Definition: papi.h:290
void do_stuff(void)
Definition: do_loops.c:249
int EventSet
Definition: data_range.c:25
static int PAPI_events_len
Definition: multiplex1.c:28
return PAPI_OK
Definition: linux-nvml.c:458
#define SUCCESS
Definition: test_utils.h:5
#define printf
Definition: papi_test.h:125
void init_papi(int *out_events, int *len)
Definition: multiplex1.c:33
int TESTS_QUIET
Definition: test_utils.c:11
int i
Definition: fileop.c:140
void PAPI_shutdown(void)
Definition: papi.c:4400
#define TAB2
Definition: papi_test.h:113
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2834
int PAPI_assign_eventset_component(int EventSet, int cidx)
Definition: papi.c:1485
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1424
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
unsigned int PAPI_events[EVENTSLEN]
Definition: derived.c:20
int PAPI_set_multiplex(int EventSet)
Definition: papi.c:3277
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
void test_print_event_header(char *call, int evset)
Definition: test_utils.c:645
int PAPI_start(int EventSet)
Definition: papi.c:2053
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

int case3 ( void  )

Definition at line 203 of file multiplex1.c.

204 {
205  int retval, i, EventSet = PAPI_NULL;
206  long long values[2];
207 
208  PAPI_events_len = 2;
210 
211  retval = PAPI_create_eventset( &EventSet );
212  if ( retval != PAPI_OK )
213  CPP_TEST_FAIL( "PAPI_create_eventset", retval );
214 
215  for ( i = 0; i < PAPI_events_len; i++ ) {
216  char out[PAPI_MAX_STR_LEN];
217 
218  retval = PAPI_add_event( EventSet, PAPI_events[i] );
219  if ( retval != PAPI_OK )
220  CPP_TEST_FAIL( "PAPI_add_event", retval );
222  if ( !TESTS_QUIET )
223  printf( "Added %s\n", out );
224  }
225 
226  retval = PAPI_set_multiplex( EventSet );
227  if ( retval == PAPI_ENOSUPP) {
228  test_skip(__FILE__, __LINE__, "Multiplex not supported", 1);
229  } else if ( retval != PAPI_OK )
230  CPP_TEST_FAIL( "PAPI_set_multiplex", retval );
231 
232  do_stuff( );
233 
234  if ( PAPI_start( EventSet ) != PAPI_OK )
235  CPP_TEST_FAIL( "PAPI_start", retval );
236 
237  do_stuff( );
238 
239  retval = PAPI_stop( EventSet, values );
240  if ( retval != PAPI_OK )
241  CPP_TEST_FAIL( "PAPI_stop", retval );
242 
243  if ( !TESTS_QUIET ) {
244  test_print_event_header( "case3:", EventSet );
245  printf( TAB2, "case3:", values[0], values[1] );
246  }
247 
248  retval = PAPI_cleanup_eventset( EventSet ); /* JT */
249  if ( retval != PAPI_OK )
250  CPP_TEST_FAIL( "PAPI_cleanup_eventset", retval );
251 
252  PAPI_shutdown( );
253  return ( SUCCESS );
254 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2258
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1622
void test_skip(char *file, int line, char *call, int retval)
Definition: test_utils.c:614
#define PAPI_ENOSUPP
Definition: papi.h:269
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_NULL
Definition: papi.h:290
void do_stuff(void)
Definition: do_loops.c:249
int EventSet
Definition: data_range.c:25
static int PAPI_events_len
Definition: multiplex1.c:28
return PAPI_OK
Definition: linux-nvml.c:458
#define SUCCESS
Definition: test_utils.h:5
#define printf
Definition: papi_test.h:125
void init_papi(int *out_events, int *len)
Definition: multiplex1.c:33
int TESTS_QUIET
Definition: test_utils.c:11
int i
Definition: fileop.c:140
void PAPI_shutdown(void)
Definition: papi.c:4400
#define TAB2
Definition: papi_test.h:113
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2834
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1424
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
unsigned int PAPI_events[EVENTSLEN]
Definition: derived.c:20
int PAPI_set_multiplex(int EventSet)
Definition: papi.c:3277
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
void test_print_event_header(char *call, int evset)
Definition: test_utils.c:645
int PAPI_start(int EventSet)
Definition: papi.c:2053
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

int case4 ( void  )

Definition at line 262 of file multiplex1.c.

263 {
264  int retval, i, EventSet = PAPI_NULL;
265  long long values[4];
266  char out[PAPI_MAX_STR_LEN];
267 
268  PAPI_events_len = 2;
270 
271  retval = PAPI_create_eventset( &EventSet );
272  if ( retval != PAPI_OK )
273  CPP_TEST_FAIL( "PAPI_create_eventset", retval );
274 
275  i = 0;
276  retval = PAPI_add_event( EventSet, PAPI_events[i] );
277  if ( retval != PAPI_OK )
278  CPP_TEST_FAIL( "PAPI_add_event", retval );
280  printf( "Added %s\n", out );
281 
282  retval = PAPI_set_multiplex( EventSet );
283  if ( retval == PAPI_ENOSUPP) {
284  test_skip(__FILE__, __LINE__, "Multiplex not supported", 1);
285  }
286  else if ( retval != PAPI_OK )
287  CPP_TEST_FAIL( "PAPI_set_multiplex", retval );
288 
289  i = 1;
290  retval = PAPI_add_event( EventSet, PAPI_events[i] );
291  if ( retval != PAPI_OK )
292  CPP_TEST_FAIL( "PAPI_add_event", retval );
294  printf( "Added %s\n", out );
295 
296  do_stuff( );
297 
298  if ( PAPI_start( EventSet ) != PAPI_OK )
299  CPP_TEST_FAIL( "PAPI_start", retval );
300 
301  do_stuff( );
302 
303  retval = PAPI_stop( EventSet, values );
304  if ( retval != PAPI_OK )
305  CPP_TEST_FAIL( "PAPI_stop", retval );
306 
307  if ( !TESTS_QUIET ) {
308  test_print_event_header( "case4:", EventSet );
309  printf( TAB2, "case4:", values[0], values[1] );
310  }
311 
312  retval = PAPI_cleanup_eventset( EventSet ); /* JT */
313  if ( retval != PAPI_OK )
314  CPP_TEST_FAIL( "PAPI_cleanup_eventset", retval );
315 
316  PAPI_shutdown( );
317  return ( SUCCESS );
318 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2258
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1622
void test_skip(char *file, int line, char *call, int retval)
Definition: test_utils.c:614
#define PAPI_ENOSUPP
Definition: papi.h:269
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_NULL
Definition: papi.h:290
void do_stuff(void)
Definition: do_loops.c:249
int EventSet
Definition: data_range.c:25
static int PAPI_events_len
Definition: multiplex1.c:28
return PAPI_OK
Definition: linux-nvml.c:458
#define SUCCESS
Definition: test_utils.h:5
#define printf
Definition: papi_test.h:125
void init_papi(int *out_events, int *len)
Definition: multiplex1.c:33
int TESTS_QUIET
Definition: test_utils.c:11
int i
Definition: fileop.c:140
void PAPI_shutdown(void)
Definition: papi.c:4400
#define TAB2
Definition: papi_test.h:113
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2834
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1424
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
unsigned int PAPI_events[EVENTSLEN]
Definition: derived.c:20
int PAPI_set_multiplex(int EventSet)
Definition: papi.c:3277
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
void test_print_event_header(char *call, int evset)
Definition: test_utils.c:645
int PAPI_start(int EventSet)
Definition: papi.c:2053
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

int case5 ( )

Definition at line 324 of file multiplex1.c.

325 {
326  int retval, i, j, EventSet = PAPI_NULL;
327  long long start_values[4] = { 0,0,0,0 }, values[4] = {0,0,0,0};
328  char out[PAPI_MAX_STR_LEN];
329 
330  PAPI_events_len = 2;
332 
333  retval = PAPI_create_eventset( &EventSet );
334  if ( retval != PAPI_OK )
335  CPP_TEST_FAIL( "PAPI_create_eventset", retval );
336 
337  /* In Component PAPI, EventSets must be assigned a component index
338  before you can fiddle with their internals.
339  0 is always the cpu component */
340 
341  retval = PAPI_assign_eventset_component( EventSet, 0 );
342  if ( retval != PAPI_OK )
343  CPP_TEST_FAIL( "PAPI_assign_eventset_component", retval );
344 
345  retval = PAPI_set_multiplex( EventSet );
346  if ( retval == PAPI_ENOSUPP) {
347  test_skip(__FILE__, __LINE__, "Multiplex not supported", 1);
348  }
349  else if ( retval != PAPI_OK )
350  CPP_TEST_FAIL( "PAPI_set_multiplex", retval );
351 
352  /* Add 2 events... */
353 
354  i = 0;
355  retval = PAPI_add_event( EventSet, PAPI_events[i] );
356  if ( retval != PAPI_OK )
357  CPP_TEST_FAIL( "PAPI_add_event", retval );
359  printf( "Added %s\n", out );
360  i++;
361  retval = PAPI_add_event( EventSet, PAPI_events[i] );
362  if ( retval != PAPI_OK )
363  CPP_TEST_FAIL( "PAPI_add_event", retval );
365  printf( "Added %s\n", out );
366  i++;
367 
368  do_stuff( );
369 
370  retval = PAPI_start( EventSet );
371  if ( retval != PAPI_OK )
372  CPP_TEST_FAIL( "PAPI_start", retval );
373 
374  retval = PAPI_read( EventSet, start_values );
375  if ( retval != PAPI_OK )
376  CPP_TEST_FAIL( "PAPI_read", retval );
377 
378  do_stuff( );
379 
380  retval = PAPI_stop( EventSet, values );
381  if ( retval != PAPI_OK )
382  CPP_TEST_FAIL( "PAPI_stop", retval );
383 
384  for (j=0;j<i;j++)
385  {
386  printf("read @start counter[%d]: %lld\n", j, start_values[j]);
387  printf("read @stop counter[%d]: %lld\n", j, values[j]);
388  printf("difference counter[%d]: %lld\n ", j, values[j]-start_values[j]);
389  if (values[j]-start_values[j] < 0LL)
390  CPP_TEST_FAIL( "Difference in start and stop resulted in negative value!", 0 );
391  }
392 
393  retval = PAPI_cleanup_eventset( EventSet ); /* JT */
394  if ( retval != PAPI_OK )
395  CPP_TEST_FAIL( "PAPI_cleanup_eventset", retval );
396 
397  PAPI_shutdown( );
398  return ( SUCCESS );
399 }
int PAPI_stop(int EventSet, long long *values)
Definition: papi.c:2258
int PAPI_add_event(int EventSet, int EventCode)
Definition: papi.c:1622
void test_skip(char *file, int line, char *call, int retval)
Definition: test_utils.c:614
#define PAPI_ENOSUPP
Definition: papi.h:269
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_NULL
Definition: papi.h:290
void do_stuff(void)
Definition: do_loops.c:249
int EventSet
Definition: data_range.c:25
static int PAPI_events_len
Definition: multiplex1.c:28
return PAPI_OK
Definition: linux-nvml.c:458
#define SUCCESS
Definition: test_utils.h:5
#define printf
Definition: papi_test.h:125
void init_papi(int *out_events, int *len)
Definition: multiplex1.c:33
int i
Definition: fileop.c:140
void PAPI_shutdown(void)
Definition: papi.c:4400
int PAPI_cleanup_eventset(int EventSet)
Definition: papi.c:2834
int PAPI_assign_eventset_component(int EventSet, int cidx)
Definition: papi.c:1485
int PAPI_create_eventset(int *EventSet)
Definition: papi.c:1424
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
unsigned int PAPI_events[EVENTSLEN]
Definition: derived.c:20
int PAPI_set_multiplex(int EventSet)
Definition: papi.c:3277
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
int PAPI_read(int EventSet, long long *values)
Definition: papi.c:2503
int PAPI_start(int EventSet)
Definition: papi.c:2053
long j
Definition: iozone.c:19135
static long long values[NUM_EVENTS]
Definition: init_fini.c:10
ssize_t retval
Definition: libasync.c:338

Here is the call graph for this function:

Here is the caller graph for this function:

void init_papi ( int out_events,
int len 
)

Definition at line 33 of file multiplex1.c.

34 {
35  int retval;
36  int i, real_len = 0;
37  int *in_events = preset_PAPI_events;
38  const PAPI_hw_info_t *hw_info;
39 
40  /* Initialize the library */
42  if ( retval != PAPI_VER_CURRENT )
43  CPP_TEST_FAIL( "PAPI_library_init", retval );
44 
45  hw_info = PAPI_get_hardware_info( );
46  if ( hw_info == NULL )
47  test_fail( __FILE__, __LINE__, "PAPI_get_hardware_info", 2 );
48 
49  if ( strstr( hw_info->model_string, "UltraSPARC" ) ) {
50  in_events = solaris_preset_PAPI_events;
51  }
52 
53  if ( strcmp( hw_info->model_string, "POWER6" ) == 0 ) {
54  in_events = power6_preset_PAPI_events;
55  retval = PAPI_set_domain( PAPI_DOM_ALL );
56  if ( retval != PAPI_OK )
57  CPP_TEST_FAIL( "PAPI_set_domain", retval );
58  }
59 
60  retval = PAPI_multiplex_init( );
61  if ( retval == PAPI_ENOSUPP) {
62  test_skip(__FILE__, __LINE__, "Multiplex not supported", 1);
63  }
64  else if ( retval != PAPI_OK )
65  CPP_TEST_FAIL( "PAPI_multiplex_init", retval );
66 
67  for ( i = 0; in_events[i] != 0; i++ ) {
68  char out[PAPI_MAX_STR_LEN];
69  /* query and set up the right instruction to monitor */
70  retval = PAPI_query_event( in_events[i] );
71  if ( retval == PAPI_OK ) {
72  out_events[real_len++] = in_events[i];
73  PAPI_event_code_to_name( in_events[i], out );
74  if ( real_len == *len )
75  break;
76  } else {
77  PAPI_event_code_to_name( in_events[i], out );
78  if ( !TESTS_QUIET )
79  printf( "%s does not exist\n", out );
80  }
81  }
82  if ( real_len < 1 )
83  CPP_TEST_FAIL( "No counters available", 0 );
84  *len = real_len;
85 }
Hardware info structure.
Definition: papi.h:777
int preset_PAPI_events[TOTAL_EVENTS]
Definition: multiplex1.c:24
void test_skip(char *file, int line, char *call, int retval)
Definition: test_utils.c:614
#define PAPI_ENOSUPP
Definition: papi.h:269
#define CPP_TEST_FAIL(string, retval)
Definition: multiplex1.c:30
#define PAPI_DOM_ALL
Definition: papi.h:301
return PAPI_OK
Definition: linux-nvml.c:458
int power6_preset_PAPI_events[TOTAL_EVENTS]
Definition: multiplex1.c:21
#define printf
Definition: papi_test.h:125
int TESTS_QUIET
Definition: test_utils.c:11
test_fail(__FILE__, __LINE__,"PAPI_library_init", retval)
int PAPI_library_init(int version)
Definition: papi.c:497
int i
Definition: fileop.c:140
int solaris_preset_PAPI_events[TOTAL_EVENTS]
Definition: multiplex1.c:18
int PAPI_event_code_to_name(int EventCode, char *out)
Definition: papi.c:926
goto out
Definition: pscanf.h:20
int PAPI_query_event(int EventCode)
Definition: papi.c:698
int PAPI_multiplex_init(void)
Definition: papi.c:2926
#define PAPI_MAX_STR_LEN
Definition: papi.h:463
int PAPI_set_domain(int domain)
Definition: papi.c:5614
char model_string[PAPI_MAX_STR_LEN]
Definition: papi.h:787
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
Definition: papi.c:6111
ssize_t retval
Definition: libasync.c:338
#define PAPI_VER_CURRENT
Definition: papi.h:223
static const PAPI_hw_info_t * hw_info
Definition: byte_profile.c:23

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 402 of file multiplex1.c.

403 {
404 
405  tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
406 
407  printf
408  ( "case1: Does PAPI_multiplex_init() not break regular operation?\n" );
409  case1( );
410 
411  printf( "\ncase2: Does setmpx/add work?\n" );
412  case2( );
413 
414  printf( "\ncase3: Does add/setmpx work?\n" );
415  case3( );
416 
417  printf( "\ncase4: Does add/setmpx/add work?\n" );
418  case4( );
419 
420  printf( "\ncase5: Does setmpx/add/add/start/read work?\n" );
421  case5( );
422 
423  test_pass( __FILE__, NULL, 0 );
424  exit( 0 );
425 }
int case5()
Definition: multiplex1.c:324
tests_quiet(argc, argv)
int case1()
Definition: multiplex1.c:90
#define printf
Definition: papi_test.h:125
test_pass(__FILE__, NULL, 0)
int int argc
Definition: iozone.c:1609
int case2()
Definition: multiplex1.c:139
char ** argv
Definition: iozone.c:1610
int case3()
Definition: multiplex1.c:203
void exit()
int case4()
Definition: multiplex1.c:262

Here is the call graph for this function:

Variable Documentation

int PAPI_events[TOTAL_EVENTS] = { 0, }
static

Definition at line 27 of file multiplex1.c.

int PAPI_events_len = 0
static

Definition at line 28 of file multiplex1.c.

int power6_preset_PAPI_events[TOTAL_EVENTS]
Initial value:
= {
}
#define PAPI_L1_DCM
#define PAPI_TOT_CYC
#define PAPI_L1_ICM
#define PAPI_FP_INS

Definition at line 21 of file multiplex1.c.

int preset_PAPI_events[TOTAL_EVENTS]
Initial value:
= {
}
#define PAPI_L1_DCM
#define PAPI_TOT_INS
#define PAPI_TOT_CYC
#define PAPI_L1_ICM
#define PAPI_FP_INS

Definition at line 24 of file multiplex1.c.

int solaris_preset_PAPI_events[TOTAL_EVENTS]
Initial value:
= {
}
#define PAPI_L2_TCM
#define PAPI_BR_MSP
#define PAPI_TOT_CYC
#define PAPI_L1_ICM

Definition at line 18 of file multiplex1.c.