Go to the source code of this file.
◆ add_remove_event()
| static int add_remove_event |
( |
int |
EventSet, |
|
|
int |
evt |
|
) |
| |
|
static |
Definition at line 48 of file papi_event_chooser.c.
56 printf(
"Error removing event.\n" );
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_remove_event(int EventSet, int EventCode)
◆ is_derived()
Definition at line 35 of file papi_event_chooser.c.
37 if ( strlen( info->
derived ) == 0 )
39 else if ( strcmp( info->
derived,
"NOT_DERIVED" ) == 0 )
41 else if ( strcmp( info->
derived,
"DERIVED_CMPD" ) == 0 )
char derived[PAPI_MIN_STR_LEN]
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 193 of file papi_event_chooser.c.
208 fprintf(stderr,
"Error! PAPI_library_init\n");
214 fprintf(stderr,
"Error! PAPI_set_debug\n");
219 "which can be added with given events.\n",
222 fprintf(stderr,
"Error! PAPI_get_hardware_info\n");
228 fprintf( stderr,
"PAPI_create_eventset error\n" );
234 fprintf( stderr,
"Event %s can't be found\n", argv[2] );
239 for(
i = 2;
i < argc;
i++ ) {
242 fprintf( stderr,
"Event %s can't be found\n", argv[
i] );
247 fprintf( stderr,
"Event %s can't be counted with others %d\n",
253 if ( !strcmp(
"NATIVE", argv[1] ) ) {
256 else if ( !strcmp(
"PRESET", argv[1] ) ) {
266 "Usage: papi_event_chooser NATIVE|PRESET evt1 evt2 ... \n" );
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_event_name_to_code(const char *in, int *out)
int PAPI_library_init(int version)
int PAPI_create_eventset(int *EventSet)
static int native(int cidx)
int PAPI_get_event_component(int EventCode)
int PAPI_set_debug(int level)
◆ native()
| static int native |
( |
int |
cidx | ) |
|
|
static |
Definition at line 85 of file papi_event_chooser.c.
98 printf(
"Cannot find first event in component %d\n",
cidx);
111 strchr( info.
symbol,
':' ),
133 printf(
"Groups: " );
142 printf(
"---------------------------------------------" 143 "----------------------------\n" );
147 printf(
"------------------------------------------" 148 "-------------------------------\n" );
149 printf(
"Total events reported: %d\n", j );
static int show_event_info(int evt)
char long_descr[PAPI_HUGE_STR_LEN]
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
#define PAPI_NTV_GROUP_SHIFT
char symbol[PAPI_HUGE_STR_LEN]
int PAPI_enum_cmp_event(int *EventCode, int modifier, int cidx)
static int add_remove_event(int EventSet, int evt)
#define PAPI_NTV_GROUP_AND_MASK
◆ preset()
| static int preset |
( |
void |
| ) |
|
|
static |
Definition at line 155 of file papi_event_chooser.c.
161 printf(
" Name Code " );
162 printf(
"Deriv Description (Note)\n" );
172 printf(
"%-13s%#x %-5s%s",
176 printf(
" (%s)", info.
note );
180 printf(
"Error in PAPI_remove_event\n" );
186 (
"-------------------------------------------------------------------------\n" );
187 printf(
"Total events reported: %d\n", j );
int PAPI_add_event(int EventSet, int EventCode)
int PAPI_remove_event(int EventSet, int EventCode)
int PAPI_enum_event(int *EventCode, int modifier)
char long_descr[PAPI_HUGE_STR_LEN]
static char * is_derived(PAPI_event_info_t *info)
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
char symbol[PAPI_HUGE_STR_LEN]
char note[PAPI_HUGE_STR_LEN]
◆ show_event_info()
| static int show_event_info |
( |
int |
evt | ) |
|
|
static |
Definition at line 63 of file papi_event_chooser.c.
70 printf(
"%s\t%#x\n |%s|\n",
73 for( k = 0; k < ( int ) info.
count; k++ ) {
74 if ( strlen( info.
name[k] ) ) {
75 printf(
" |Register Value[%d]: %#-10x %s|\n",
char long_descr[PAPI_HUGE_STR_LEN]
unsigned int code[PAPI_MAX_INFO_TERMS]
int PAPI_get_event_info(int EventCode, PAPI_event_info_t *info)
char symbol[PAPI_HUGE_STR_LEN]
char name[PAPI_MAX_INFO_TERMS][PAPI_2MAX_STR_LEN]
◆ EventSet
◆ retval