|
PAPI
5.7.0.0
|
libmsr component More...

Go to the source code of this file.
Data Structures | |
| struct | _libmsr_register_t |
| struct | _libmsr_native_event_entry_t |
| struct | _libmsr_reg_alloc_t |
| struct | _libmsr_control_state_t |
| struct | _libmsr_context_t |
Macros | |
| #define | LIBMSR_MAX_COUNTERS 64 |
| #define | LIBMSR_MAX_PACKAGES 64 |
| #define | CHECK_DL_STATUS(err, str) if( err ) { strncpy( _libmsr_vector.cmp_info.disabled_reason, str, PAPI_MAX_STR_LEN ); return ( PAPI_ENOSUPP ); } |
Functions | |
| static int | libmsr_finalize_msr () |
| static int | libmsr_rapl_init (struct rapl_data **rapl_data, uint64_t **rapl_flags) |
| static int | libmsr_poll_rapl_data () |
| static void | libmsr_set_pkg_rapl_limit (const int socket, struct rapl_limit *limit1, struct rapl_limit *limit2) |
| static void | libmsr_get_pkg_rapl_limit (const int socket, struct rapl_limit *limit1, struct rapl_limit *limit2) |
| static int | libmsr_core_config (uint64_t *coresPerSocket, uint64_t *threadsPerCore, uint64_t *sysSockets, int *HTenabled) |
| static int | libmsr_rapl_storage (struct rapl_data **data, uint64_t **flags) |
| static int | libmsr_get_rapl_power_info (const unsigned socket, struct rapl_power_info *info) |
| static int | _local_linkDynamicLibraries () |
| static char * | _local_strlcpy (char *dst, const char *src, size_t size) |
| void | _local_set_to_defaults () |
| int | _libmsr_init_thread (hwd_context_t *ctx) |
| int | _libmsr_init_component (int cidx) |
| int | _libmsr_init_control_state (hwd_control_state_t *ctl) |
| int | _libmsr_update_control_state (hwd_control_state_t *ctl, NativeInfo_t *native, int count, hwd_context_t *ctx) |
| int | _libmsr_start (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| int | _libmsr_read (hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags) |
| static long long | _local_get_eventval_from_values (_libmsr_control_state_t *control, long long *invalues, int package_num, eventtype_enum eventtype, long long defaultval) |
| int | _libmsr_write (hwd_context_t *ctx, hwd_control_state_t *ctl, long long *values) |
| int | _libmsr_stop (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| int | _libmsr_shutdown_thread (hwd_context_t *ctx) |
| int | _libmsr_shutdown_component (void) |
| int | _libmsr_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option) |
| int | _libmsr_set_domain (hwd_control_state_t *ctl, int domain) |
| int | _libmsr_reset (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| int | _libmsr_ntv_enum_events (unsigned int *EventCode, int modifier) |
| int | _libmsr_ntv_code_to_name (unsigned int EventCode, char *name, int len) |
| int | _libmsr_ntv_code_to_descr (unsigned int EventCode, char *name, int len) |
| int | _libmsr_ntv_code_to_info (unsigned int EventCode, PAPI_event_info_t *info) |
Variables | |
| papi_vector_t | _libmsr_vector |
| static _libmsr_native_event_entry_t * | libmsr_native_events = NULL |
| static int | num_events_global = 0 |
| static int | already_called_libmsr_rapl_initialized_global = 0 |
| static void * | dllib1 = NULL |
| void(* | _dl_non_dynamic_init )(void) |
This PAPI component provides access to libmsr from LLNL (https://github.com/scalability-llnl/libmsr), specifically the RAPL (Running Average Power Level) access in libmsr, which provides energy measurements on modern Intel CPUs.
To work, either msr_safe kernel module from LLNL (https://github.com/scalability-llnl/msr-safe), or the x86 generic MSR driver must be installed (CONFIG_X86_MSR) and the /dev/cpu/?/<msr_safe | msr> files must have read permissions
If /dev/cpu/?/{msr_safe,msr} have appropriate write permissions, you can write to the events PACKAGE_POWER_LIMIT_{1,2} to change the average power (in watts) consumed by the packages/sockets over a certain time window specified by events PKG_TIME_WINDOW_POWER_LIMIT_{1,2} respectively.
Definition in file linux-libmsr.c.
| #define CHECK_DL_STATUS | ( | err, | |
| str | |||
| ) | if( err ) { strncpy( _libmsr_vector.cmp_info.disabled_reason, str, PAPI_MAX_STR_LEN ); return ( PAPI_ENOSUPP ); } |
Definition at line 135 of file linux-libmsr.c.
| #define LIBMSR_MAX_COUNTERS 64 |
Definition at line 76 of file linux-libmsr.c.
| #define LIBMSR_MAX_PACKAGES 64 |
Definition at line 77 of file linux-libmsr.c.
| enum eventtype_enum |
| Enumerator | |
|---|---|
| PKG_ENERGY | |
| PKG_ELAPSED | |
| PKG_DELTA_ENERGY | |
| PKG_WATTS | |
| PKG_POWER_LIMIT_1 | |
| PKG_TIME_WINDOW_POWER_LIMIT_1 | |
| PKG_POWER_LIMIT_2 | |
| PKG_TIME_WINDOW_POWER_LIMIT_2 | |
| NUM_OF_EVENTTYPES | |
Definition at line 45 of file linux-libmsr.c.
| int _libmsr_ctl | ( | hwd_context_t * | ctx, |
| int | code, | ||
| _papi_int_option_t * | option | ||
| ) |
Definition at line 680 of file linux-libmsr.c.
| int _libmsr_init_component | ( | int | cidx | ) |
Definition at line 215 of file linux-libmsr.c.

| int _libmsr_init_control_state | ( | hwd_control_state_t * | ctl | ) |
Definition at line 416 of file linux-libmsr.c.
| int _libmsr_init_thread | ( | hwd_context_t * | ctx | ) |
Definition at line 205 of file linux-libmsr.c.
| int _libmsr_ntv_code_to_descr | ( | unsigned int | EventCode, |
| char * | name, | ||
| int | len | ||
| ) |
Definition at line 772 of file linux-libmsr.c.

| int _libmsr_ntv_code_to_info | ( | unsigned int | EventCode, |
| PAPI_event_info_t * | info | ||
| ) |
Definition at line 785 of file linux-libmsr.c.

| int _libmsr_ntv_code_to_name | ( | unsigned int | EventCode, |
| char * | name, | ||
| int | len | ||
| ) |
Definition at line 759 of file linux-libmsr.c.

| int _libmsr_ntv_enum_events | ( | unsigned int * | EventCode, |
| int | modifier | ||
| ) |
Definition at line 726 of file linux-libmsr.c.
| int _libmsr_read | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl, | ||
| long long ** | events, | ||
| int | flags | ||
| ) |
Definition at line 469 of file linux-libmsr.c.

| int _libmsr_reset | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
Definition at line 713 of file linux-libmsr.c.
| int _libmsr_set_domain | ( | hwd_control_state_t * | ctl, |
| int | domain | ||
| ) |
Definition at line 701 of file linux-libmsr.c.
| int _libmsr_shutdown_component | ( | void | ) |
Definition at line 658 of file linux-libmsr.c.

| int _libmsr_shutdown_thread | ( | hwd_context_t * | ctx | ) |
Definition at line 647 of file linux-libmsr.c.
| int _libmsr_start | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
Definition at line 454 of file linux-libmsr.c.

| int _libmsr_stop | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl | ||
| ) |
| int _libmsr_update_control_state | ( | hwd_control_state_t * | ctl, |
| NativeInfo_t * | native, | ||
| int | count, | ||
| hwd_context_t * | ctx | ||
| ) |
Definition at line 432 of file linux-libmsr.c.
| int _libmsr_write | ( | hwd_context_t * | ctx, |
| hwd_control_state_t * | ctl, | ||
| long long * | values | ||
| ) |
Definition at line 567 of file linux-libmsr.c.

|
static |
Definition at line 553 of file linux-libmsr.c.

|
static |
Definition at line 136 of file linux-libmsr.c.

| void _local_set_to_defaults | ( | ) |
Definition at line 178 of file linux-libmsr.c.


|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void(* _dl_non_dynamic_init) (void) |
Definition at line 110 of file linux-libmsr.c.
| papi_vector_t _libmsr_vector |
Definition at line 97 of file linux-libmsr.c.
|
static |
Definition at line 101 of file linux-libmsr.c.
|
static |
Definition at line 109 of file linux-libmsr.c.
|
static |
Definition at line 99 of file linux-libmsr.c.
|
static |
Definition at line 100 of file linux-libmsr.c.