|
| static char * | _local_strlcpy (char *dst, const char *src, size_t size) |
| |
| static long long | read_powercap_value (int index) |
| |
| static int | write_powercap_value (int index, long long value) |
| |
| static int | _powercap_init_thread (hwd_context_t *ctx) |
| |
| static int | _powercap_init_component (int cidx) |
| |
| static int | _powercap_init_control_state (hwd_control_state_t *ctl) |
| |
| static int | _powercap_start (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _powercap_stop (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _powercap_shutdown_thread (hwd_context_t *ctx) |
| |
| static int | _powercap_read (hwd_context_t *ctx, hwd_control_state_t *ctl, long long **events, int flags) |
| |
| static int | _powercap_write (hwd_context_t *ctx, hwd_control_state_t *ctl, long long *values) |
| |
| static int | _powercap_shutdown_component (void) |
| |
| static int | _powercap_ctl (hwd_context_t *ctx, int code, _papi_int_option_t *option) |
| |
| static int | _powercap_update_control_state (hwd_control_state_t *ctl, NativeInfo_t *native, int count, hwd_context_t *ctx) |
| |
| static int | _powercap_set_domain (hwd_control_state_t *ctl, int domain) |
| |
| static int | _powercap_reset (hwd_context_t *ctx, hwd_control_state_t *ctl) |
| |
| static int | _powercap_ntv_enum_events (unsigned int *EventCode, int modifier) |
| |
| static int | _powercap_ntv_code_to_name (unsigned int EventCode, char *name, int len) |
| |
| static int | _powercap_ntv_code_to_descr (unsigned int EventCode, char *name, int len) |
| |
| static int | _powercap_ntv_code_to_info (unsigned int EventCode, PAPI_event_info_t *info) |
| |
|
| static char | read_buff [PAPI_MAX_STR_LEN] |
| |
| static char | write_buff [PAPI_MAX_STR_LEN] |
| |
| static int | num_events =0 |
| |
| static int | pkg_events [PKG_NUM_EVENTS] = {PKG_ENERGY, PKG_MAX_ENERGY_RANGE, PKG_MAX_POWER_A, PKG_POWER_LIMIT_A, PKG_TIME_WINDOW_A, PKG_MAX_POWER_B, PKG_POWER_LIMIT_B, PKG_TIME_WINDOW_B, PKG_ENABLED, PKG_NAME} |
| |
| static char * | pkg_event_names [PKG_NUM_EVENTS] = {"ENERGY_UJ", "MAX_ENERGY_RANGE_UJ", "MAX_POWER_A_UW", "POWER_LIMIT_A_UW", "TIME_WINDOW_A_US", "MAX_POWER_B_UW", "POWER_LIMIT_B_UW", "TIME_WINDOW_B", "ENABLED", "NAME"} |
| |
| static char * | pkg_sys_names [PKG_NUM_EVENTS] = {"energy_uj", "max_energy_range_uj", "constraint_0_max_power_uw", "constraint_0_power_limit_uw", "constraint_0_time_window_us", "constraint_1_max_power_uw", "constraint_1_power_limit_uw", "constraint_1_time_window_us", "enabled", "name"} |
| |
| static mode_t | pkg_sys_flags [PKG_NUM_EVENTS] = {O_RDONLY, O_RDONLY, O_RDONLY, O_RDWR, O_RDONLY, O_RDONLY, O_RDWR, O_RDONLY, O_RDONLY, O_RDONLY} |
| |
| static int | component_events [COMPONENT_NUM_EVENTS] = {COMPONENT_ENERGY, COMPONENT_MAX_ENERGY_RANGE, COMPONENT_MAX_POWER_A, COMPONENT_POWER_LIMIT_A, COMPONENT_TIME_WINDOW_A, COMPONENT_ENABLED, COMPONENT_NAME} |
| |
| static char * | component_event_names [COMPONENT_NUM_EVENTS] = {"ENERGY_UJ", "MAX_ENERGY_RANGE_UJ", "MAX_POWER_A_UW", "POWER_LIMIT_A_UW", "TIME_WINDOW_A_US", "ENABLED", "NAME"} |
| |
| static char * | component_sys_names [COMPONENT_NUM_EVENTS] = {"energy_uj", "max_energy_range_uj", "constraint_0_max_power_uw", "constraint_0_power_limit_uw", "constraint_0_time_window_us", "enabled", "name"} |
| |
| static mode_t | component_sys_flags [COMPONENT_NUM_EVENTS] = {O_RDONLY, O_RDONLY, O_RDONLY, O_RDWR, O_RDONLY, O_RDONLY, O_RDONLY} |
| |
| static _powercap_native_event_entry_t | powercap_ntv_events [(2 *(PKG_NUM_EVENTS+(3 *COMPONENT_NUM_EVENTS)))] |
| |
| static int | event_fds [POWERCAP_MAX_COUNTERS] |
| |
| papi_vector_t | _powercap_vector |
| |
- Author
- Philip Vaccaro
To work, the powercap kernel module must be loaded.
Definition in file linux-powercap.c.