PAPI 7.1.0.0
Loading...
Searching...
No Matches
papi_native_avail.c File Reference
Include dependency graph for papi_native_avail.c:

Go to the source code of this file.

Data Structures

struct  command_flags_t
 

Macros

#define EVT_LINE   80
 
#define EVT_LINE_BUF_SIZE   4096
 

Functions

static void print_help (char **argv)
 
static int no_str_arg (char *arg)
 
static void parse_args (int argc, char **argv, command_flags_t *f)
 
static void space_pad (char *str, int spaces)
 
static void check_event (PAPI_event_info_t *info)
 
static int format_event_output (PAPI_event_info_t *info, int offset)
 
static void print_event_output (int val_flag)
 
static int parse_event_qualifiers (PAPI_event_info_t *info)
 
int main (int argc, char **argv)
 

Variables

unsigned int event_available = 0
 
unsigned int event_output_buffer_size = 0
 
char * event_output_buffer = NULL
 

Macro Definition Documentation

◆ EVT_LINE

#define EVT_LINE   80

Definition at line 59 of file papi_native_avail.c.

◆ EVT_LINE_BUF_SIZE

#define EVT_LINE_BUF_SIZE   4096

Definition at line 60 of file papi_native_avail.c.

Function Documentation

◆ check_event()

static void check_event ( PAPI_event_info_t info)
static

Definition at line 205 of file papi_native_avail.c.

206{
207 int EventSet = PAPI_NULL;
208
209 // if this event has already passed the check test, no need to try this one again
210 if (event_available) {
211 return;
212 }
213
217 event_available = 1;
218 } // else printf("********** PAPI_add_named_event( %s ) failed: event could not be added \n", info->symbol);
220 printf("********** Call to destroy eventset failed when trying to check event '%s' **********\n", info->symbol);
221 }
222 }
223
224 return;
225}
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
removes a named hardware event from a PAPI event set.
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_NULL
Definition: f90papi.h:78
static int EventSet
Definition: init_fini.c:8
unsigned int event_available
char symbol[PAPI_HUGE_STR_LEN]
Definition: papi.h:960
Here is the caller graph for this function:

◆ format_event_output()

static int format_event_output ( PAPI_event_info_t info,
int  offset 
)
static

Definition at line 228 of file papi_native_avail.c.

229{
230 unsigned int i, j = 0;
231 char event_line_buffer[EVT_LINE_BUF_SIZE];
232 char event_line_units[100];
233
234 /* indent by offset */
235 if ( offset ) {
236 // this one is used for event qualifiers
237 sprintf(event_line_buffer, "| %-73s|\n", info->symbol);
238 }
239 else {
240 // this one is used for new events
241 sprintf(event_line_buffer, "| %-73s%4s|\n", info->symbol, "<-->");
242 }
243
244 while ( j <= strlen( info->long_descr ) ) {
245 // The event_line_buffer is used to collect an event or mask name and its description.
246 // The description will be folded to keep the length of output lines reasonable. So this
247 // buffer may contain multiple lines of print output. Check to make sure there is room
248 // for another line of print output. If there is not enough room for another output line
249 // just exit the loop and truncate the description field (the buffer is big enough this
250 // should not happen).
251 if ((EVT_LINE_BUF_SIZE - strlen(event_line_buffer)) < EVT_LINE) {
252 printf ("Event or mask description has been truncated.\n");
253 break;
254 }
255
256 // get amount of description that will fit in an output line
257 i = EVT_LINE - 12 - 2;
258 // start of a description line
259 strcat(event_line_buffer,"| " );
260 // if we need to copy less than what fits in this line, move it and exit loop
261 if (i > strlen(&info->long_descr[j])) {
262 strcat( event_line_buffer, &info->long_descr[j]);
263 space_pad( event_line_buffer, i - strlen(&info->long_descr[j]));
264 strcat( event_line_buffer, "|\n" );
265 break;
266 }
267
268 // move what will fit into the line then loop back to do the rest in a new line
269 int k = strlen(event_line_buffer);
270 strncat( event_line_buffer, &info->long_descr[j], i );
271 event_line_buffer[k+i] = '\0';
272 strcat( event_line_buffer, "|\n" );
273
274 // bump index past what we copied
275 j += i;
276 }
277
278 // also show the units for this event if a unit name has been set
279 event_line_units[0] = '\0';
280 if (info->units[0] != 0) {
281 sprintf(event_line_units, "| Units: %-66s|\n", info->units );
282 }
283
284 // get the amount of used space in the output buffer
285 int out_buf_used = 0;
286 if ((event_output_buffer_size > 0) && (event_output_buffer != NULL)) {
287 out_buf_used = strlen(event_output_buffer);
288 }
289
290 // if this will not fit in output buffer, make it bigger
291 if (event_output_buffer_size < out_buf_used + strlen(event_line_buffer) + strlen(event_line_units) + 1) {
292 if (event_output_buffer_size == 0) {
295 } else {
298 }
299 }
300
301 // make sure we got the memory we asked for
302 if (event_output_buffer == NULL) {
303 fprintf(stderr,"Error! Allocation of output buffer memory failed.\n");
304 return errno;
305 }
306
307 strcat(event_output_buffer, event_line_buffer);
308 strcat(event_output_buffer, event_line_units);
309
310 return 0;
311}
int i
int errno
FILE * stderr
#define EVT_LINE_BUF_SIZE
#define EVT_LINE
char * event_output_buffer
unsigned int event_output_buffer_size
static void space_pad(char *str, int spaces)
char units[PAPI_MIN_STR_LEN]
Definition: papi.h:969
char long_descr[PAPI_HUGE_STR_LEN]
Definition: papi.h:963
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 408 of file papi_native_avail.c.

409{
410 int i, k;
411 int num_events;
412 int num_cmp_events = 0;
413 int retval;
415 const PAPI_hw_info_t *hwinfo = NULL;
416 command_flags_t flags;
417 int enum_modifier;
418 int numcmp, cid;
419
420 /* Initialize before parsing the input arguments */
422 if ( retval != PAPI_VER_CURRENT ) {
423 fprintf(stderr, "Error! PAPI_library_init\n");
424 return retval;
425 }
426
427 /* Parse the command-line arguments */
428 parse_args( argc, argv, &flags );
429
430 /* Set enum modifier mask */
431 if ( flags.dear )
432 enum_modifier = PAPI_NTV_ENUM_DEAR;
433 else if ( flags.darr )
434 enum_modifier = PAPI_NTV_ENUM_DARR;
435 else if ( flags.iear )
436 enum_modifier = PAPI_NTV_ENUM_IEAR;
437 else if ( flags.iarr )
438 enum_modifier = PAPI_NTV_ENUM_IARR;
439 else if ( flags.opcm )
440 enum_modifier = PAPI_NTV_ENUM_OPCM;
441 else
442 enum_modifier = PAPI_ENUM_EVENTS;
443
445 if ( retval != PAPI_OK ) {
446 fprintf(stderr,"Error! PAPI_set_debug\n");
447 return retval;
448 }
449
450 retval = papi_print_header( "Available native events and hardware information.\n", &hwinfo );
451 if ( retval != PAPI_OK ) {
452 fprintf(stderr,"Error! PAPI_get_hardware_info\n");
453 return 2;
454 }
455
456#if SDE
457 /*
458 The following code will execute if the user wants to list the SDEs in the
459 library (or executable) stored in flags.path. This code will not list the
460 SDEs per se, it will only give an opportunity to the library to register
461 their SDEs, so they can be listed further down.
462 */
463 if ( flags.list_sdes ){
464 char *cmd;
465 FILE *pipe;
466
467 if ( access(flags.path, R_OK) == -1 ){
468 fprintf(stderr,"Error! Unable to read file '%s'.\n",flags.path);
469 goto no_sdes;
470 }
471
472 int len = 5+strlen(flags.path);
473 cmd = (char *)calloc(len, sizeof(char));
474 if( NULL == cmd ) goto no_sdes;
475
476 int l = snprintf(cmd, len, "ldd %s",flags.path);
477 if(l<len-1){
478 free(cmd);
479 goto no_sdes;
480 }
481
482 /* First open all the dependencies of the file we were given */
483 pipe = popen(cmd, "r");
484 if( NULL != pipe ){
485 while( !feof(pipe) ){
486 char *lineptr, *lib_name, *lib_path;
487 size_t n=0;
488 lineptr = lib_name = lib_path = NULL;
489
490 if( getline(&lineptr, &n, pipe) == -1 ){
491 if(lineptr) free(lineptr);
492 break;
493 }
494
495 /* If this line does not give us a path to a library, ignore it. */
496 if( (NULL != strstr(lineptr,"not found")) || (NULL == strstr(lineptr," => ")) ) {
497 goto skip_lib;
498 }
499
500 int status = sscanf(lineptr, "%ms => %ms (%*x)", &lib_name, &lib_path);
501 /* If this line is malformed, ignore it. */
502 if(2 != status){
503 /* According to the man page: "it is necessary to call free()
504 only if the scanf() call successfully read a string." */
505 goto skip_lib;
506 }
507
508 /* Invoke the hook for the dependency we just discovered */
509 invoke_hook_fptr(lib_path);
510
511 if( lib_name ) free(lib_name);
512 if( lib_path ) free(lib_path);
513skip_lib:
514 if(lineptr) free(lineptr);
515 lineptr = NULL;
516 n=0;
517 }
518 pclose(pipe);
519 }
520
521 /* Finally, invoke the hook for the file the user gave us */
522 invoke_hook_fptr(flags.path);
523
524 if( NULL != cmd ) free(cmd);
525 }
526no_sdes:
527#endif //SDE
528
529 /* Do this code if the event name option was specified on the commandline */
530 if ( flags.named ) {
531 if ( PAPI_event_name_to_code( flags.name, &i ) == PAPI_OK ) {
532 if ( PAPI_get_event_info( i, &info ) == PAPI_OK ) {
533 printf( "Event name: %s\n", info.symbol);
534 printf( "Description: %s\n", info.long_descr );
535
536 /* handle the PAPI component-style events which have a component:::event type */
537 char *ptr;
538 if ((ptr=strstr(flags.name, ":::"))) {
539 ptr+=3;
540 /* handle libpfm4-style events which have a pmu::event type event name */
541 } else if ((ptr=strstr(flags.name, "::"))) {
542 ptr+=2;
543 }
544 else {
545 ptr=flags.name;
546 }
547
548 /* if event qualifiers exist but none specified, process all */
549 if ( !strchr( ptr, ':' ) ) {
551 printf( "\nQualifiers: Name -- Description\n" );
552 do {
553 retval = PAPI_get_event_info( i, &info );
554 if ( retval == PAPI_OK ) {
555 if ( parse_event_qualifiers( &info ) ) {
556 printf( " Info: %10s -- %s\n", info.symbol, info.long_descr );
557 }
558 }
559 } while ( PAPI_enum_event( &i, PAPI_NTV_ENUM_UMASKS ) == PAPI_OK );
560 }
561 }
562 }
563 } else {
564 printf("Sorry, an event by the name '%s' could not be found.\n",
565 flags.name);
566 printf("Is it typed correctly?\n\n");
567 exit( 1 );
568 }
569 return 0;
570 }
571
572 // Look at all the events and qualifiers and print the information the user has asked for */
573
574 numcmp = PAPI_num_components( );
575
576 num_events = 0;
577
578 for ( cid = 0; cid < numcmp; cid++ ) {
579 const PAPI_component_info_t *component;
580 component=PAPI_get_component_info(cid);
581
582 /* Skip disabled components */
583 if (component->disabled && component->disabled != PAPI_EDELAY_INIT) continue;
584
585 printf( "===============================================================================\n" );
586 printf( " Native Events in Component: %s\n",component->name);
587 printf( "===============================================================================\n" );
588
589 // show this component has not found any events yet
590 num_cmp_events = 0;
591
592 /* Always ASK FOR the first event */
593 /* Don't just assume it'll be the first numeric value */
594 i = 0 | PAPI_NATIVE_MASK;
595
597
598 if (retval==PAPI_OK) {
599 do {
600 memset( &info, 0, sizeof ( info ) );
601 retval = PAPI_get_event_info( i, &info );
602
603 /* This event may not exist */
604 if ( retval != PAPI_OK ) continue;
605
606 /* Bail if event name doesn't contain include string */
607 if ( flags.include && !strstr( info.symbol, flags.istr ) ) continue;
608
609 /* Bail if event name does contain exclude string */
610 if ( flags.xclude && strstr( info.symbol, flags.xstr ) ) continue;
611
612 // if not the first event in this component, put out a divider
613 if (num_cmp_events) {
614 printf( "--------------------------------------------------------------------------------\n" );
615 }
616
617 /* count only events that are actually processed */
618 num_events++;
619 num_cmp_events++;
620
621 if (flags.check){
622 check_event(&info);
623 }
624
625 format_event_output( &info, 0);
626
627 /* modifier = PAPI_NTV_ENUM_GROUPS returns event codes with a
628 groups id for each group in which this
629 native event lives, in bits 16 - 23 of event code
630 terminating with PAPI_ENOEVNT at the end of the list.
631 */
632
633 /* This is an IBM Power issue */
634 if ( flags.groups ) {
635 k = i;
636 if ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_GROUPS, cid ) == PAPI_OK ) {
637 printf( "Groups: " );
638 do {
639 printf( "%4d", ( ( k & PAPI_NTV_GROUP_AND_MASK ) >>
640 PAPI_NTV_GROUP_SHIFT ) - 1 );
641 } while ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_GROUPS, cid ) ==PAPI_OK );
642 printf( "\n" );
643 }
644 }
645
646 // If the user has asked us to check the events then we need to
647 // walk the list of qualifiers and try to check the event with each one.
648 // Even if the user does not want to display the qualifiers this is necessary
649 // to be able to correctly report which events can be used on this system.
650 //
651 // We also need to walk the list if the user wants to see the qualifiers.
652
653 if (flags.qualifiers || flags.check){
654 k = i;
655 if ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_UMASKS, cid ) == PAPI_OK ) {
656 // clear event string using first mask
657 char first_event_mask_string[PAPI_HUGE_STR_LEN] = "";
658
659 do {
660 retval = PAPI_get_event_info( k, &info );
661 if ( retval == PAPI_OK ) {
662 // if first event mask string not set yet, set it now
663 if (strlen(first_event_mask_string) == 0) {
664 strcpy (first_event_mask_string, info.symbol);
665 }
666
667 if ( flags.check ) {
668 check_event(&info);
669 }
670 // now test if the event qualifiers should be displayed to the user
671 if ( flags.qualifiers ) {
672 if ( parse_event_qualifiers( &info ) )
673 format_event_output( &info, 2);
674 }
675 }
676 } while ( PAPI_enum_cmp_event( &k, PAPI_NTV_ENUM_UMASKS, cid ) == PAPI_OK );
677 // if we are validating events and the event_available flag is not set yet, try a few more combinations
678 if (flags.check && (event_available == 0)) {
679 // try using the event with the first mask defined for the event and the cpu mask
680 // this is a kludge but many of the uncore events require an event specific mask (usually
681 // the first one defined will do) and they all require the cpu mask
682 strcpy (info.symbol, first_event_mask_string);
683 strcat (info.symbol, ":cpu=1");
684 check_event(&info);
685 }
686 if (flags.check && (event_available == 0)) {
687 // an even bigger kludge is that there are 4 snpep_unc_pcu events which require the 'ff' and 'cpu' qualifiers to work correctly.
688 // if nothing else has worked, this code will try those two qualifiers with the current event name to see if it works
689 strcpy (info.symbol, first_event_mask_string);
690 char *wptr = strrchr (info.symbol, ':');
691 if (wptr != NULL) {
692 *wptr = '\0';
693 strcat (info.symbol, ":ff=64:cpu=1");
694 check_event(&info);
695 }
696 }
697 }
698 }
700 } while (PAPI_enum_cmp_event( &i, enum_modifier, cid ) == PAPI_OK );
701 }
702 }
703
704 if (num_cmp_events != 0) {
705 printf( "--------------------------------------------------------------------------------\n" );
706 }
707 printf( "\nTotal events reported: %d\n", num_events );
708
709 if (num_events==0) {
710 printf("\nNo events detected! Check papi_component_avail to find out why.\n");
711 printf("\n");
712 }
713
714
715 return 0;
716}
Enumerate PAPI preset or native events for a given component.
Enumerate PAPI preset or native events.
Convert a name to a numeric hardware event code.
get information about a specific software component
Get the event's name and description info.
initialize the PAPI library.
Get the number of components available on the system.
Set the current debug level for error output from PAPI.
#define PAPI_VER_CURRENT
Definition: f90papi.h:54
#define PAPI_ENUM_EVENTS
Definition: f90papi.h:224
#define PAPI_NTV_GROUP_AND_MASK
Definition: f90papi.h:30
#define PAPI_ENUM_FIRST
Definition: f90papi.h:85
#define PAPI_VERB_ECONT
Definition: f90papi.h:164
#define PAPI_EDELAY_INIT
Definition: f90papi.h:271
#define PAPI_NTV_ENUM_IEAR
Definition: f90papi.h:276
#define PAPI_NTV_ENUM_UMASKS
Definition: f90papi.h:66
#define PAPI_NTV_ENUM_OPCM
Definition: f90papi.h:138
#define PAPI_NTV_GROUP_SHIFT
Definition: f90papi.h:162
#define PAPI_NTV_ENUM_DEAR
Definition: f90papi.h:99
#define PAPI_NTV_ENUM_DARR
Definition: f90papi.h:154
#define PAPI_NTV_ENUM_IARR
Definition: f90papi.h:212
#define PAPI_HUGE_STR_LEN
Definition: f90papi.h:120
static int num_events
#define PAPI_NATIVE_MASK
@ PAPI_NTV_ENUM_GROUPS
Definition: papi.h:514
static int format_event_output(PAPI_event_info_t *info, int offset)
static void print_event_output(int val_flag)
static int parse_event_qualifiers(PAPI_event_info_t *info)
static void check_event(PAPI_event_info_t *info)
static void parse_args(int argc, char **argv, command_flags_t *f)
int papi_print_header(char *prompt, const PAPI_hw_info_t **hwinfo)
Definition: print_header.c:12
char name[PAPI_MAX_STR_LEN]
Definition: papi.h:627
Hardware info structure.
Definition: papi.h:774
int retval
Definition: zero_fork.c:53
Here is the call graph for this function:

◆ no_str_arg()

static int no_str_arg ( char *  arg)
static

Definition at line 106 of file papi_native_avail.c.

107{
108 return ( ( arg == NULL ) || ( strlen( arg ) == 0 ) || ( arg[0] == '-' ) );
109}
Here is the caller graph for this function:

◆ parse_args()

static void parse_args ( int  argc,
char **  argv,
command_flags_t f 
)
static

Definition at line 112 of file papi_native_avail.c.

113{
114 int i;
115
116 /* Look for all currently defined commands */
117 memset( f, 0, sizeof ( command_flags_t ) );
118 f->qualifiers = 1;
119 f->groups = 1;
120
121 for ( i = 1; i < argc; i++ ) {
122 if ( !strcmp( argv[i], "--darr" ) )
123 f->darr = 1;
124 else if ( !strcmp( argv[i], "--dear" ) )
125 f->dear = 1;
126 else if ( !strcmp( argv[i], "--iarr" ) )
127 f->iarr = 1;
128 else if ( !strcmp( argv[i], "--iear" ) )
129 f->iear = 1;
130 else if ( !strcmp( argv[i], "--opcm" ) )
131 f->opcm = 1;
132 else if ( !strcmp( argv[i], "--noqual" ) )
133 f->qualifiers = 0;
134 else if ( !strcmp( argv[i], "--nogroups" ) )
135 f->groups = 0;
136 else if ( !strcmp( argv[i], "-e" ) ) {
137 f->named = 1;
138 i++;
139 if ( i < argc )
140 f->name = argv[i];
141 if ( no_str_arg( f->name ) ) {
142 printf( "Invalid argument for -e\n");
143 exit(1);
144 }
145 }
146#if SDE
147 else if ( !strcmp( argv[i], "-sde" ) ) {
148 f->list_sdes = 1;
149 i++;
150 if ( i < argc )
151 f->path = argv[i];
152 if ( no_str_arg( f->path ) ) {
153 printf( "Invalid argument for -sde\n");
154 exit(1);
155 }
156 }
157#endif
158 else if ( !strcmp( argv[i], "-i" ) ) {
159 f->include = 1;
160 i++;
161 if ( i < argc )
162 f->istr = argv[i];
163 if ( no_str_arg( f->istr ) ) {
164 printf( "Invalid argument for -i\n");
165 exit(1);
166 }
167 } else if ( !strcmp( argv[i], "-x" ) ) {
168 f->xclude = 1;
169 i++;
170 if ( i < argc )
171 f->xstr = argv[i];
172 if ( no_str_arg( f->xstr ) ) {
173 printf( "Invalid argument for -x\n");
174 exit(1);
175 }
176 } else if ( strstr( argv[i], "-h" ) ) {
177 f->help = 1;
178 } else if ( !strcmp( argv[i], "-c" ) || !strcmp( argv[i], "--check" ) ) {
179 f->check = 1;
180 } else {
181 printf( "%s is not supported\n", argv[i] );
182 exit(1);
183 }
184 }
185
186 /* if help requested, print and bail */
187 if ( f->help ) {
188 print_help( argv);
189 exit( 1 );
190 }
191}
double f(double a)
Definition: cpi.c:23
static void print_help(void)
Definition: papi_cost.c:85
static int no_str_arg(char *arg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_event_qualifiers()

static int parse_event_qualifiers ( PAPI_event_info_t info)
static

Definition at line 344 of file papi_native_avail.c.

345{
346 char *pmask,*ptr;
347
348 /* handle the PAPI component-style events which have a component:::event type */
349 if ((ptr=strstr(info->symbol, ":::"))) {
350 ptr+=3;
351 /* handle libpfm4-style events which have a pmu::event type event name */
352 } else if ((ptr=strstr(info->symbol, "::"))) {
353 ptr+=2;
354 }
355 else {
356 ptr=info->symbol;
357 }
358
359 if ( ( pmask = strchr( ptr, ':' ) ) == NULL ) {
360 return ( 0 );
361 }
362 memmove( info->symbol, pmask, ( strlen(pmask) + 1 ) * sizeof(char) );
363
364 // The description field contains the event description followed by a tag 'masks:'
365 // and then the mask description (if there was a mask with this event). The following
366 // code isolates the mask description part of this information.
367
368 pmask = strstr( info->long_descr, "masks:" );
369 if ( pmask == NULL ) {
370 info->long_descr[0] = 0;
371 } else {
372 pmask += 6; // bump pointer past 'masks:' identifier in description
373 memmove( info->long_descr, pmask, (strlen(pmask) + 1) * sizeof(char) );
374 }
375 return ( 1 );
376}
Here is the caller graph for this function:

◆ print_event_output()

static void print_event_output ( int  val_flag)
static

Definition at line 314 of file papi_native_avail.c.

315{
316 // first we need to update the available flag at the beginning of the buffer
317 // this needs to reflect if this event name by itself or the event name with one of the qualifiers worked
318 // if none of the combinations worked then we will show the event as not available
319 char *val_flag_ptr = strstr(event_output_buffer, "<-->");
320 if (val_flag_ptr != NULL) {
321 if ((val_flag) && (event_available == 0)) {
322 // event is not available, update the place holder (replace the <--> with <NA>)
323 *(val_flag_ptr+1) = 'N';
324 *(val_flag_ptr+2) = 'A';
325 } else {
326 event_available = 0; // reset this flag for next event
327 // event is available, just remove the place holder (replace the <--> with spaces)
328 *val_flag_ptr = ' ';
329 *(val_flag_ptr+1) = ' ';
330 *(val_flag_ptr+2) = ' ';
331 *(val_flag_ptr+3) = ' ';
332 }
333 }
334
335 // now we can finally send this events output to the user
336 printf( "%s", event_output_buffer);
337// printf( "--------------------------------------------------------------------------------\n" );
338
339 event_output_buffer[0] = '\0'; // start the next event with an empty buffer
340 return;
341}
Here is the caller graph for this function:

◆ print_help()

static void print_help ( char **  argv)
static

Definition at line 81 of file papi_native_avail.c.

82{
83 printf( "This is the PAPI native avail program.\n" );
84 printf( "It provides availability and details about PAPI Native Events.\n" );
85 printf( "Usage: %s [options]\n", argv[0] );
86 printf( "Options:\n\n" );
87 printf( "\nGeneral command options:\n" );
88 printf( "\t-h, --help print this help message\n" );
89 printf( "\t-c, --check attempts to add each event\n");
90 printf( "\t-sde FILE lists SDEs that are registered by the library or executable in FILE\n" );
91 printf( "\t-e EVENTNAME display detailed information about named native event\n" );
92 printf( "\t-i EVENTSTR include only event names that contain EVENTSTR\n" );
93 printf( "\t-x EVENTSTR exclude any event names that contain EVENTSTR\n" );
94 printf( "\t--noqual suppress display of event qualifiers (mask and flag) information\n" );
95 printf( "\nProcessor-specific options:\n");
96 printf( "\t--darr display events supporting Data Address Range Restriction\n" );
97 printf( "\t--dear display Data Event Address Register events only\n" );
98 printf( "\t--iarr display events supporting Instruction Address Range Restriction\n" );
99 printf( "\t--iear display Instruction Event Address Register events only\n" );
100 printf( "\t--opcm display events supporting OpCode Matching\n" );
101 printf( "\t--nogroups suppress display of Event grouping information\n" );
102 printf( "\n" );
103}

◆ space_pad()

static void space_pad ( char *  str,
int  spaces 
)
static

Definition at line 194 of file papi_native_avail.c.

195{
196 while ( spaces-- > 0 )
197 strcat( str, " " );
198}
Here is the caller graph for this function:

Variable Documentation

◆ event_available

unsigned int event_available = 0

Definition at line 200 of file papi_native_avail.c.

◆ event_output_buffer

char* event_output_buffer = NULL

Definition at line 202 of file papi_native_avail.c.

◆ event_output_buffer_size

unsigned int event_output_buffer_size = 0

Definition at line 201 of file papi_native_avail.c.