Yeppp!
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Enumerations | Functions

Data Structures

struct  YepEnergyCounter
 Energy counter state. More...
 

Enumerations

enum  YepEnergyCounterType {
  YepEnergyCounterTypeRaplPackageEnergy = 1, YepEnergyCounterTypeRaplPowerPlane0Energy = 2, YepEnergyCounterTypeRaplPowerPlane1Energy = 3, YepEnergyCounterTypeRaplDRAMEnergy = 4,
  YepEnergyCounterTypeRaplPackagePower = 5, YepEnergyCounterTypeRaplPowerPlane0Power = 6, YepEnergyCounterTypeRaplPowerPlane1Power = 7, YepEnergyCounterTypeRaplDRAMPower = 8
}
 Energy counter type. More...
 

Functions

enum YepStatus yepLibrary_GetEnergyCounterAcquire (enum YepEnergyCounterType type, struct YepEnergyCounter *state)
 Initializes the specified energy counter and starts energy measurements. More...
 
enum YepStatus yepLibrary_GetEnergyCounterRelease (struct YepEnergyCounter *state, Yep64f *measurement)
 Stops the energy counter, releases the system resources associated with the energy counter, and reads the counter measurement. More...
 

Detailed Description


Data Structure Documentation

struct YepEnergyCounter

Data Fields

Yep64u state [6]
 

Enumeration Type Documentation

Energy counter type.

See Also
yepLibrary_GetEnergyCounterAcquire
Enumerator
YepEnergyCounterTypeRaplPackageEnergy 

Intel RAPL per-package energy counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the energy (in Joules) consumed by all chips in the CPU package.

YepEnergyCounterTypeRaplPowerPlane0Energy 

Intel RAPL power plane 0 energy counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the energy (in Joules) consumed by power plane 0 (includes CPU cores and caches).

YepEnergyCounterTypeRaplPowerPlane1Energy 

Intel RAPL power plane 1 energy counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the energy (in Joules) consumed by power plane 1 (includes GPU cores).

YepEnergyCounterTypeRaplDRAMEnergy 

Intel RAPL DRAM energy counter.

This counter is supported on Intel Sandy Bridge E processors, and estimates the energy (in Joules) consumed by DRAM modules. Motherboard support is required to use this counter.

YepEnergyCounterTypeRaplPackagePower 

Intel RAPL per-package power counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the average power (in Watts) consumed by all chips in the CPU package. This counter is implemented as a combination of RAPL per-package energy counter and system timer.

YepEnergyCounterTypeRaplPowerPlane0Power 

Intel RAPL power plane 0 power counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the average power (in Watts) consumed by power plane 0 (includes CPU cores and caches). This counter is implemented as a combination of RAPL power plane 0 energy counter and system timer.

YepEnergyCounterTypeRaplPowerPlane1Power 

Intel RAPL power plane 1 power counter.

This counter is supported on Intel Sandy Bridge and Ivy Bridge processors, and estimates the average power (in Watts) consumed by power plane 1 (includes GPU cores). This counter is implemented as a combination of RAPL power plane 1 energy counter and system timer.

YepEnergyCounterTypeRaplDRAMPower 

Intel RAPL DRAM power counter.

This counter is supported on Intel Sandy Bridge E processors, and estimates the average power (in Watts) consumed by DRAM modules. This counter is implemented as a combination of RAPL DRAM energy counter and system timer. Motherboard support is required to use this counter.

Function Documentation

enum YepStatus yepLibrary_GetEnergyCounterAcquire ( enum YepEnergyCounterType  type,
struct YepEnergyCounter state 
)

Initializes the specified energy counter and starts energy measurements.

Parameters
[in]typeThe type of the energy counter to initialize.
[out]stateThe state variable corresponding to the initialized energy counter. If the function fails, the value of the state variable is not changed. It is recommended to initialize the state variables to all zeroes before calling this function.
Return values
YepStatusOkThe energy counter successfully initialized and its state is store to the variable pointed by state parameter.
YepStatusNullPointerThe state pointer is null.
YepStatusInvalidArgumentThe type parameter does not specify a valid energy counter type.
YepStatusUnsupportedHardwareThe hardware does not support the requested energy counter type.
YepStatusUnsupportedSoftwareThe operating system does not provide access to the specified energy counter.
YepStatusSystemErrorAn attempt to read the energy counter or release the OS resources failed inside the OS kernel.
YepStatusAccessDeniedThe user does not possess the required access rights to read the energy counter.
See Also
yepLibrary_GetEnergyCounterRelease
enum YepStatus yepLibrary_GetEnergyCounterRelease ( struct YepEnergyCounter state,
Yep64f measurement 
)

Stops the energy counter, releases the system resources associated with the energy counter, and reads the counter measurement.

Parameters
[in,out]statePointer to a variable with the state of the energy counter saved by yepLibrary_GetEnergyCounterAcquire. The energy counter should be released only once, and the function zeroes out the state variable.
[out]measurementPointer to a variable where the number of cycles elapsed will be stored. The pointer can be the same as state pointer.
Return values
YepStatusOkThe energy counter measurement is saved to the variable pointed by measurement parameter, and the system resources are successfully released.
YepStatusNullPointerEither the state pointer or the measurement pointer is null.
YepStatusInvalidStateThe state variable does not specify a valid state of the energy counter. This can happen if the state variable was not initialized, or it was released previously.
YepStatusUnsupportedHardwareThe hardware does not support the requested energy counter type.
YepStatusUnsupportedSoftwareThe operating system does not provide access to the specified energy counter.
YepStatusSystemErrorAn attempt to read the energy counter or release the OS resources failed inside the OS kernel.
YepStatusAccessDeniedThe user does not possess the required access rights to read the energy counter.
See Also
yepLibrary_GetEnergyCounterAcquire