82{
88 int numcmp, cid;
89
90
93 fprintf(
stderr,
"Error! PAPI_library_init\n");
95 }
96
98
101 fprintf(
stderr,
"Error! PAPI_set_debug\n");
103 }
104
106 "hardware information.\n", &hwinfo );
108 fprintf(
stderr,
"Error! PAPI_get_hardware_info\n");
109 return 2;
110 }
111
112
114
115 printf("Compiled-in components:\n");
116 for ( cid = 0; cid < numcmp; cid++ ) {
118
120
123 }
126 }
127
129 printf(
" %-23s Version:\t\t\t%s\n",
" ", cmpinfo->
version );
130 printf(
" %-23s Number of native events:\t%d\n",
" ", cmpinfo->
num_native_events);
131 printf(
" %-23s Number of preset events:\t%d\n",
" ", cmpinfo->
num_preset_events);
132 printf("\n");
133 }
134 }
135
136 printf("\nActive components:\n");
138
139 for ( cid = 0; cid < numcmp; cid++ ) {
142
144 printf( " %-23s Native: %d, Preset: %d, Counters: %d\n",
146
147 int pmus=0;
150 }
151
152 if (pmus) {
153 printf( " %-23s PMUs supported: ", " ");
154 int line_len = 48, name_len;
157
159
160 if ((line_len + 2 + name_len) > 130) {
161 printf("\n %-23s ", " ");
162 line_len = 48;
163 }
164
165
166 if (line_len > 48) {
167 printf(", ");
168 line_len += 2;
169 }
171 line_len += name_len;
172 }
173
174 printf("\n");
175 }
176
177 printf("\n");
178
180 printf(
" %-23s Version:\t\t\t%s\n",
" ", cmpinfo->
version );
182 printf("\n");
183 }
184 }
185
186
187 printf
188 ( "\n--------------------------------------------------------------------------------\n" );
189
190 return 0;
191}
get information about a specific software component
initialize the PAPI library.
Get the number of components available on the system.
Set the current debug level for error output from PAPI.
static void force_cmp_init(int cid)
static void parse_args(int argc, char **argv, command_flags_t *f)
char description[PAPI_MAX_STR_LEN]
unsigned int fast_counter_read
char name[PAPI_MAX_STR_LEN]
char disabled_reason[PAPI_HUGE_STR_LEN]
char version[PAPI_MIN_STR_LEN]
char * pmu_names[PAPI_PMU_MAX]