359 int num_cmp_events = 0;
370 fprintf(stderr,
"Error! PAPI_library_init\n");
380 else if ( flags.
darr )
382 else if ( flags.
iear )
384 else if ( flags.
iarr )
386 else if ( flags.
opcm )
393 fprintf(stderr,
"Error! PAPI_set_debug\n");
399 fprintf(stderr,
"Error! PAPI_get_hardware_info\n");
407 printf(
"Event name: %s\n", info.
symbol);
408 printf(
"Description: %s\n", info.
long_descr );
412 if ((ptr=strstr(flags.
name,
":::"))) {
415 }
else if ((ptr=strstr(flags.
name,
"::"))) {
423 if ( !strchr( ptr,
':' ) ) {
425 printf(
"\nQualifiers: Name -- Description\n" );
438 printf(
"Sorry, an event by the name '%s' could not be found.\n",
440 printf(
"Is it typed correctly?\n\n");
452 for ( cid = 0; cid < numcmp; cid++ ) {
459 printf(
"===============================================================================\n" );
460 printf(
" Native Events in Component: %s\n",component->
name);
461 printf(
"===============================================================================\n" );
474 memset( &info, 0,
sizeof ( info ) );
487 if (num_cmp_events) {
488 printf(
"--------------------------------------------------------------------------------\n" );
511 printf(
"Groups: " );
537 if (strlen(first_event_mask_string) == 0) {
538 strcpy (first_event_mask_string, info.
symbol);
556 strcpy (info.
symbol, first_event_mask_string);
557 strcat (info.
symbol,
":cpu=1");
563 strcpy (info.
symbol, first_event_mask_string);
564 char *wptr = strrchr (info.
symbol,
':');
567 strcat (info.
symbol,
":ff=64:cpu=1");
578 if (num_cmp_events != 0) {
579 printf(
"--------------------------------------------------------------------------------\n" );
581 printf(
"\nTotal events reported: %d\n",
num_events );
584 printf(
"\nNo events detected! Check papi_component_avail to find out why.\n");
static void check_event(PAPI_event_info_t *info)
const PAPI_component_info_t * PAPI_get_component_info(int cidx)
static void parse_args(int argc, char **argv, command_flags_t *f)
int PAPI_num_components(void)
int PAPI_enum_event(int *EventCode, int modifier)
char long_descr[PAPI_HUGE_STR_LEN]
int PAPI_event_name_to_code(const char *in, int *out)
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
static int parse_event_qualifiers(PAPI_event_info_t *info)
int PAPI_library_init(int version)
#define PAPI_NTV_GROUP_SHIFT
char symbol[PAPI_HUGE_STR_LEN]
#define PAPI_HUGE_STR_LEN
char name[PAPI_MAX_STR_LEN]
int PAPI_enum_cmp_event(int *EventCode, int modifier, int cidx)
unsigned int event_available
#define PAPI_NTV_GROUP_AND_MASK
static void print_event_output(int val_flag)
int PAPI_set_debug(int level)
static int format_event_output(PAPI_event_info_t *info, int offset)