![]() |
LIKWID
|
Classes | |
struct | PowerData |
Power measurement data for start/stop measurements. More... | |
struct | PowerDomain |
Structure describing an RAPL power domain. More... | |
struct | PowerInfo |
Information structure of CPU's power measurement facility. More... | |
struct | TurboBoost |
Information structure of CPU's turbo mode. More... | |
Macros | |
#define | NUM_POWER_DOMAINS 5 |
#define | POWER_DOMAIN_SUPPORT_INFO (1ULL<<4) |
#define | POWER_DOMAIN_SUPPORT_LIMIT (1ULL<<1) |
#define | POWER_DOMAIN_SUPPORT_PERF (1ULL<<3) |
#define | POWER_DOMAIN_SUPPORT_POLICY (1ULL<<2) |
#define | POWER_DOMAIN_SUPPORT_STATUS (1ULL<<0) |
Typedefs | |
typedef PowerData * | PowerData_t |
Pointer for exporting the PowerData data structure. | |
typedef PowerInfo * | PowerInfo_t |
Pointer for exporting the PowerInfo data structure. | |
Enumerations | |
enum | PowerType { PKG = 0, PP0 = 1, PP1 = 2, DRAM = 3, PLATFORM = 4 } |
Enum for all supported RAPL domains. More... | |
Functions | |
const char *power_names[NUM_POWER_DOMAINS] | __attribute__ ((visibility("default"))) |
List of all RAPL domain names. | |
PowerInfo_t | get_powerInfo (void) __attribute__((visibility("default"))) |
Get a pointer to the energy facility information. More... | |
void | power_finalize (void) __attribute__((visibility("default"))) |
Free space of power_unit. | |
double | power_getEnergyUnit (int domain) __attribute__((visibility("default"))) |
Get energy Unit. More... | |
int | power_init (int cpuId) __attribute__((visibility("default"))) |
Initialize energy measurements on specific CPU. More... | |
int | power_limitGet (int cpuId, PowerType domain, double *power, double *time) __attribute__((visibility("default"))) |
Get the values of the limit register of a domain NOT IMPLEMENTED. More... | |
int | power_limitSet (int cpuId, PowerType domain, double power, double time, int doClamping) __attribute__((visibility("default"))) |
Set the values of the limit register of a domain NOT IMPLEMENTED. More... | |
int | power_limitState (int cpuId, PowerType domain) __attribute__((visibility("default"))) |
Get the state of a energy limit, activated or deactivated NOT IMPLEMENTED. More... | |
double | power_printEnergy (const PowerData *data) __attribute__((visibility("default"))) |
Print energy measurements gathered by power_start() and power_stop() More... | |
int | power_read (int cpuId, uint64_t reg, uint32_t *data) __attribute__((visibility("default"))) |
Read the current power value. More... | |
int | power_start (PowerData_t data, int cpuId, PowerType type) __attribute__((visibility("default"))) |
Start energy measurements. More... | |
int | power_stop (PowerData_t data, int cpuId, PowerType type) __attribute__((visibility("default"))) |
Stop energy measurements. More... | |
int | power_tread (int socket_fd, int cpuId, uint64_t reg, uint32_t *data) __attribute__((visibility("default"))) |
Read the current energy value using a specific communication socket. More... | |
Variables | |
PowerInfo | power_info |
Variable holding the global power information structure. | |
#define NUM_POWER_DOMAINS 5 |
Amount of currently supported RAPL domains
#define POWER_DOMAIN_SUPPORT_INFO (1ULL<<4) |
Flag to check in PowerDomain's supportFlag if the info msr registers are available
#define POWER_DOMAIN_SUPPORT_LIMIT (1ULL<<1) |
Flag to check in PowerDomain's supportFlag if the limit msr registers are available
#define POWER_DOMAIN_SUPPORT_PERF (1ULL<<3) |
Flag to check in PowerDomain's supportFlag if the perf msr registers are available
#define POWER_DOMAIN_SUPPORT_POLICY (1ULL<<2) |
Flag to check in PowerDomain's supportFlag if the policy msr registers are available
#define POWER_DOMAIN_SUPPORT_STATUS (1ULL<<0) |
Flag to check in PowerDomain's supportFlag if the status msr registers are available
enum PowerType |
Enum for all supported RAPL domains.
PowerInfo_t get_powerInfo | ( | void | ) |
double power_getEnergyUnit | ( | int | domain | ) |
Get energy Unit.
[in] | domain | RAPL domain ID |
int power_init | ( | int | cpuId | ) |
Initialize energy measurements on specific CPU.
Additionally, it reads basic information about the energy measurements like minimal measurement time.
[in] | cpuId | Initialize energy facility for this CPU |
int power_limitGet | ( | int | cpuId, |
PowerType | domain, | ||
double * | power, | ||
double * | time | ||
) |
Get the values of the limit register of a domain NOT IMPLEMENTED.
[in] | cpuId | CPU ID |
[in] | domain | RAPL domain ID |
[out] | power | Energy limit |
[out] | time | Time limit |
int power_limitSet | ( | int | cpuId, |
PowerType | domain, | ||
double | power, | ||
double | time, | ||
int | doClamping | ||
) |
Set the values of the limit register of a domain NOT IMPLEMENTED.
[in] | cpuId | CPU ID |
[in] | domain | RAPL domain ID |
[in] | power | Energy limit |
[in] | time | Time limit |
[in] | doClamping | Activate clamping (going below OS-requested power level) |
int power_limitState | ( | int | cpuId, |
PowerType | domain | ||
) |
Get the state of a energy limit, activated or deactivated NOT IMPLEMENTED.
[in] | cpuId | CPU ID |
[in] | domain | RAPL domain ID |
double power_printEnergy | ( | const PowerData * | data | ) |
Print energy measurements gathered by power_start() and power_stop()
[in] | data | Data structure holding start and stop values for energy measurements |
int power_read | ( | int | cpuId, |
uint64_t | reg, | ||
uint32_t * | data | ||
) |
Read the current power value.
[in] | cpuId | Read energy facility for this CPU |
[in] | reg | Energy register |
[out] | data | Energy data |
int power_start | ( | PowerData_t | data, |
int | cpuId, | ||
PowerType | type | ||
) |
Start energy measurements.
[in,out] | data | Data structure holding start and stop values for energy measurements |
[in] | cpuId | Start energy facility for this CPU |
[in] | type | Which type should be measured |
int power_stop | ( | PowerData_t | data, |
int | cpuId, | ||
PowerType | type | ||
) |
Stop energy measurements.
[in,out] | data | Data structure holding start and stop values for energy measurements |
[in] | cpuId | Start energy facility for this CPU |
[in] | type | Which type should be measured |
int power_tread | ( | int | socket_fd, |
int | cpuId, | ||
uint64_t | reg, | ||
uint32_t * | data | ||
) |
Read the current energy value using a specific communication socket.
[in] | socket_fd | Communication socket for the read operation |
[in] | cpuId | Read energy facility for this CPU |
[in] | reg | Energy register |
[out] | data | Energy data |