Go to the source code of this file.
|
| static int | read_sysfs_file (long long *counts) |
| |
| static int | _micpower_init_thread (hwd_context_t *ctx) |
| |
| static int | _micpower_init_component (int cidx) |
| |
| static int | _micpower_init_control_state (hwd_control_state_t *ctl) |
| |
| static int | _micpower_start (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _micpower_read (hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags) |
| |
| static int | _micpower_stop (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _micpower_shutdown_thread (hwd_context_t *ctx) |
| |
| static int | _micpower_shutdown_component () |
| |
| static int | _micpower_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option) |
| |
| static int | _micpower_update_control_state (hwd_control_state_t *ptr, NativeInfo_t *native, int count, hwd_context_t *ctx) |
| |
| static int | _micpower_set_domain (hwd_control_state_t *cntl, int domain) |
| |
| static int | _micpower_reset (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _micpower_ntv_enum_events (unsigned int *EventCode, int modifier) |
| |
| static int | _micpower_ntv_code_to_name (unsigned int EventCode, char *name, int len) |
| |
| static int | _micpower_ntv_code_to_descr (unsigned int EventCode, char *name, int len) |
| |
| static int | _micpower_ntv_code_to_info (unsigned int EventCode, PAPI_event_info_t *info) |
| |
◆ INVALID_RESULT
| #define INVALID_RESULT -1000000L |
◆ MICPOWER_NUMBER_OF_NATIVE_EVENTS
| #define MICPOWER_NUMBER_OF_NATIVE_EVENTS 16 |
◆ REFRESH_LAT
| #define REFRESH_LAT 50000 |
◆ _micpower_ctl()
Definition at line 323 of file linux-micpower.c.
324{
325 ( void ) ctx;
326 ( void ) code;
327 ( void ) option;
328
330}
◆ _micpower_init_component()
| static int _micpower_init_component |
( |
int |
cidx | ) |
|
|
static |
Definition at line 193 of file linux-micpower.c.
194{
198
200
201
202 if ( 0 != access( "/sys/class/micras/power", R_OK ) ) {
206 goto fn_fail;
207 }
208
209
210
213
214
216
217 fn_exit:
220 fn_fail:
221 goto fn_exit;
222}
struct papi_vectors * _papi_hwd[]
papi_vector_t _micpower_vector
static int is_initialized
#define MICPOWER_NUMBER_OF_NATIVE_EVENTS
char disabled_reason[PAPI_HUGE_STR_LEN]
PAPI_component_info_t cmp_info
◆ _micpower_init_control_state()
Definition at line 232 of file linux-micpower.c.
233{
236
238
239
241
243}
get real time counter value in microseconds
static int read_sysfs_file(long long *counts)
long long counts[MICPOWER_MAX_COUNTERS]
◆ _micpower_init_thread()
◆ _micpower_ntv_code_to_descr()
| static int _micpower_ntv_code_to_descr |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 440 of file linux-micpower.c.
441{
443
447 }
449}
static MICPOWER_native_event_entry_t _micpower_native_events[]
#define PAPI_NATIVE_AND_MASK
◆ _micpower_ntv_code_to_info()
Definition at line 452 of file linux-micpower.c.
453{
454
456
458
463
465}
char units[PAPI_MIN_STR_LEN]
char name[PAPI_MAX_STR_LEN]
char description[PAPI_MAX_STR_LEN]
char units[PAPI_MIN_STR_LEN]
char symbol[PAPI_HUGE_STR_LEN]
char long_descr[PAPI_HUGE_STR_LEN]
◆ _micpower_ntv_code_to_name()
| static int _micpower_ntv_code_to_name |
( |
unsigned int |
EventCode, |
|
|
char * |
name, |
|
|
int |
len |
|
) |
| |
|
static |
◆ _micpower_ntv_enum_events()
| static int _micpower_ntv_enum_events |
( |
unsigned int * |
EventCode, |
|
|
int |
modifier |
|
) |
| |
|
static |
Definition at line 386 of file linux-micpower.c.
387{
388
389 int index;
390
391 switch ( modifier ) {
392
394
397 }
398 *EventCode = 0;
399
401
402
404
406
408 *EventCode = *EventCode + 1;
410 } else {
412 }
413 break;
414
415 default:
417 }
419}
◆ _micpower_read()
Definition at line 255 of file linux-micpower.c.
257{
258 (void) flags;
259 (void) ctx;
261
264
265
266
267
271 }
272
273
275
277}
char events[MAX_EVENTS][BUFSIZ]
◆ _micpower_reset()
Definition at line 373 of file linux-micpower.c.
374{
375 ( void ) ctx;
376 ( void ) ctl;
377
379}
◆ _micpower_set_domain()
◆ _micpower_shutdown_component()
| static int _micpower_shutdown_component |
( |
| ) |
|
|
static |
◆ _micpower_shutdown_thread()
◆ _micpower_start()
Definition at line 246 of file linux-micpower.c.
247{
248 ( void ) ctx;
249 ( void ) ctl;
250
252}
◆ _micpower_stop()
◆ _micpower_update_control_state()
Definition at line 334 of file linux-micpower.c.
337{
339 ( void ) ctx;
340 ( void ) ptr;
341
345 }
347}
MICPOWER_register_t resources
◆ read_sysfs_file()
Definition at line 152 of file linux-micpower.c.
153{
157 fp = fopen(
"/sys/class/micras/power",
"r" );
159 return 0;
160
163 }
165 retval&= fscanf(
fp,
"%lld %lld %lld", &counts[
i], &counts[
i+1], &counts[
i+2] );
166 }
167
170}
#define MICPOWER_MAX_COUNTERS
int fclose(FILE *__stream)
◆ _micpower_native_events
◆ _micpower_vector
◆ is_initialized
◆ num_events