Processor Counter Monitor
Public Types | Public Member Functions | Friends | List of all members
pcm::ServerUncoreCounterState Class Reference

Server uncore power counter state. More...

#include <cpucounters.h>

Inheritance diagram for pcm::ServerUncoreCounterState:
Inheritance graph
[legend]
Collaboration diagram for pcm::ServerUncoreCounterState:
Collaboration graph
[legend]

Public Types

enum  {
  maxControllers = 4, maxChannels = 12, maxXPILinks = 6, maxCBOs = 128,
  maxIIOStacks = 16, maxCounters = 4
}
 
enum  EventPosition { xPI_TxL0P_POWER_CYCLES = 0, xPI_L1_POWER_CYCLES = 2, xPI_CLOCKTICKS = 3 }
 
enum  FreeRunningCounterID { ImcReads, ImcWrites, PMMReads, PMMWrites }
 

Public Member Functions

int32 getPackageThermalHeadroom () const
 Returns current thermal headroom below TjMax.
 
- Public Member Functions inherited from pcm::UncoreCounterState
 UncoreCounterState (const UncoreCounterState &)=default
 
 UncoreCounterState (UncoreCounterState &&)=default
 
UncoreCounterStateoperator= (UncoreCounterState &&)=default
 
UncoreCounterStateoperator+= (const UncoreCounterState &o)
 

Friends

class PCM
 
template<class CounterStateType >
uint64 getDRAMClocks (uint32 channel, const CounterStateType &before, const CounterStateType &after)
 Returns DRAM clock ticks. More...
 
template<class CounterStateType >
uint64 getMCDRAMClocks (uint32 channel, const CounterStateType &before, const CounterStateType &after)
 Returns MCDRAM clock ticks. More...
 
template<class CounterStateType >
uint64 getMCCounter (uint32 channel, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of memory controller PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getM3UPICounter (uint32 port, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of M3UPI PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getCBOCounter (uint32 cbo, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of CHA or CBO PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getUBOXCounter (uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of UBOX PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getIIOCounter (uint32 stack, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of IIO PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getIRPCounter (uint32 stack, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of IRP PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getXPICounter (uint32 port, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of UPI or QPI PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getM2MCounter (uint32 controller, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of Memory2Mesh controller PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getEDCCounter (uint32 channel, uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of embedded DRAM memory controller counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getPCUCounter (uint32 counter, const CounterStateType &before, const CounterStateType &after)
 Direct read of power control unit PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
template<class CounterStateType >
uint64 getConsumedEnergy (const CounterStateType &before, const CounterStateType &after)
 Returns energy consumed by processor, excluding DRAM (measured in internal units) More...
 
template<class CounterStateType >
uint64 getDRAMConsumedEnergy (const CounterStateType &before, const CounterStateType &after)
 Returns energy consumed by DRAM (measured in internal units) More...
 
template<class CounterStateType >
uint64 getInvariantTSC (const CounterStateType &before, const CounterStateType &after)
 Computes number of invariant time stamp counter ticks. More...
 
template<class CounterStateType >
int64 getFreeRunningCounter (const typename CounterStateType::FreeRunningCounterID &, const CounterStateType &before, const CounterStateType &after)
 Returns free running counter if it exists, -1 otherwise. More...
 
template<class CounterStateType >
double getAverageFrequencyFromClocks (const int64 clocks, const CounterStateType &before, const CounterStateType &after)
 

Additional Inherited Members

- Protected Member Functions inherited from pcm::UncoreCounterState
void readAndAggregate (std::shared_ptr< SafeMsrHandle >)
 
- Protected Attributes inherited from pcm::UncoreCounterState
uint64 UncMCFullWrites
 
uint64 UncMCNormalReads
 
uint64 UncHARequests
 
uint64 UncHALocalRequests
 
uint64 UncPMMWrites
 
uint64 UncPMMReads
 
uint64 UncEDCFullWrites
 
uint64 UncEDCNormalReads
 
uint64 UncMCGTRequests
 
uint64 UncMCIARequests
 
uint64 UncMCIORequests
 
uint64 PackageEnergyStatus
 
uint64 DRAMEnergyStatus
 
uint64 TOROccupancyIAMiss
 
uint64 TORInsertsIAMiss
 
uint64 UncClocks
 
uint64 CStateResidency [PCM::MAX_C_STATE+1]
 

Detailed Description

Server uncore power counter state.

Friends And Related Function Documentation

◆ getCBOCounter

template<class CounterStateType >
uint64 getCBOCounter ( uint32  cbo,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of CHA or CBO PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
cbocbo or cha number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getConsumedEnergy

template<class CounterStateType >
uint64 getConsumedEnergy ( const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Returns energy consumed by processor, excluding DRAM (measured in internal units)

Parameters
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getDRAMClocks

template<class CounterStateType >
uint64 getDRAMClocks ( uint32  channel,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Returns DRAM clock ticks.

Parameters
channelDRAM channel number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getDRAMConsumedEnergy

template<class CounterStateType >
uint64 getDRAMConsumedEnergy ( const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Returns energy consumed by DRAM (measured in internal units)

Parameters
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getEDCCounter

template<class CounterStateType >
uint64 getEDCCounter ( uint32  channel,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of embedded DRAM memory controller counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
channelchannel number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getFreeRunningCounter

template<class CounterStateType >
int64 getFreeRunningCounter ( const typename CounterStateType::FreeRunningCounterID &  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Returns free running counter if it exists, -1 otherwise.

Parameters
countername of the counter
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getIIOCounter

template<class CounterStateType >
uint64 getIIOCounter ( uint32  stack,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of IIO PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
stackIIO stack number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getInvariantTSC

template<class CounterStateType >
uint64 getInvariantTSC ( const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Computes number of invariant time stamp counter ticks.

This counter counts irrespectively of C-, P- or T-states

Parameters
beforeCPU counter state before the experiment
afterCPU counter state after the experiment
Returns
number of time stamp counter ticks

◆ getIRPCounter

template<class CounterStateType >
uint64 getIRPCounter ( uint32  stack,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of IRP PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
stackIIO stack number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getM2MCounter

template<class CounterStateType >
uint64 getM2MCounter ( uint32  controller,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of Memory2Mesh controller PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
controllercontroller number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getM3UPICounter

template<class CounterStateType >
uint64 getM3UPICounter ( uint32  port,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of M3UPI PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
portUPI port number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getMCCounter

template<class CounterStateType >
uint64 getMCCounter ( uint32  channel,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of memory controller PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
channelchannel number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getMCDRAMClocks

template<class CounterStateType >
uint64 getMCDRAMClocks ( uint32  channel,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Returns MCDRAM clock ticks.

Parameters
channelMCDRAM channel number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getPCUCounter

template<class CounterStateType >
uint64 getPCUCounter ( uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of power control unit PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getUBOXCounter

template<class CounterStateType >
uint64 getUBOXCounter ( uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of UBOX PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

◆ getXPICounter

template<class CounterStateType >
uint64 getXPICounter ( uint32  port,
uint32  counter,
const CounterStateType &  before,
const CounterStateType &  after 
)
friend

Direct read of UPI or QPI PMU counter (counter meaning depends on the programming: power/performance/etc)

Parameters
countercounter number
portUPI/QPI port number
beforeCPU counter state before the experiment
afterCPU counter state after the experiment

The documentation for this class was generated from the following file: