71{
72 (void) argv;
73 (void) argc;
74 int retval,cid,powercap_cid=-1,numcmp;
77 int code;
81 int r;
82
85
86
88
89
93
94 if ( !
TESTS_QUIET ) printf(
"Trying all powercap events\n" );
95
97
98 for( cid=0; cid<numcmp; cid++ ) {
99
101 test_fail( __FILE__, __LINE__,
"PAPI_get_component_info failed\n", 0 );
102
103 if ( strstr( cmpinfo->
name,
"powercap" ) ) {
104 powercap_cid=cid;
105 if ( !
TESTS_QUIET ) printf(
"Found powercap component at cid %d\n",powercap_cid );
108 printf( "powercap component disabled: %s\n",
110 }
111 test_skip( __FILE__,__LINE__,
"powercap component disabled",0 );
112 }
113 break;
114 }
115 }
116
117
118 if ( cid==numcmp )
119 test_skip( __FILE__,__LINE__,
"No powercap component found\n",0 );
120
121
123 test_skip( __FILE__,__LINE__,
"No counters in the powercap component\n",0 );
124
125
129
130
131 printf( "\nThis test may take a few minutes to complete.\n\n" );
137 test_fail( __FILE__, __LINE__,
"Error from PAPI_event_code_to_name",
retval );
138
142
145
147
149 break;
150
151
155
156
158
159
163
165 printf( "\n" );
166 printf( "%-50s%4.6f %s\n",
168 }
169
170
174
176 }
177
178
182
184
185 return 0;
186}
static const char * event_names[2]
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Enumerate PAPI preset or native events for a given component.
Convert a numeric hardware event code to a name.
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.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
#define PAPI_HUGE_STR_LEN
static long long values[NUM_EVENTS]
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char units[MAX_EVENTS][BUFSIZ]
char name[PAPI_MAX_STR_LEN]
char disabled_reason[PAPI_HUGE_STR_LEN]
char units[PAPI_MIN_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]