Processor Counter Monitor
Public Member Functions | Friends | List of all members
ServerPCICFGUncore Class Reference

Object to access uncore counters in a socket/processor with microarchitecture codename SandyBridge-EP (Jaketown) or Ivytown-EP or Ivytown-EX. More...

#include <cpucounters.h>

Public Member Functions

 ServerPCICFGUncore (uint32 socket_, const PCM *pcm)
 Initialize access data structures. More...
 
void program ()
 Program performance counters (disables programming power counters)
 
uint64 getImcReads ()
 Get the number of integrated controller reads (in cache lines)
 
uint64 getImcReadsForController (uint32 controller)
 Get the number of integrated controller reads for given controller (in cache lines) More...
 
uint64 getImcReadsForChannels (uint32 beginChannel, uint32 endChannel)
 Get the number of integrated controller reads for given channels (in cache lines) More...
 
uint64 getImcWrites ()
 Get the number of integrated controller writes (in cache lines)
 
uint64 getPMMReads ()
 Get the number of PMM memory reads (in cache lines)
 
uint64 getPMMWrites ()
 Get the number of PMM memory writes (in cache lines)
 
uint64 getEdcReads ()
 Get the number of cache lines read by EDC (embedded DRAM controller)
 
uint64 getEdcWrites ()
 Get the number of cache lines written by EDC (embedded DRAM controller)
 
uint64 getIncomingDataFlits (uint32 port)
 Get the number of incoming data flits to the socket through a port. More...
 
uint64 getOutgoingFlits (uint32 port)
 Get the number of outgoing data and non-data or idle flits (depending on the architecture) from the socket through a port. More...
 
void program_power_metrics (int mc_profile)
 Program power counters (disables programming performance counters) More...
 
void programServerUncoreMemoryMetrics (int rankA=-1, int rankB=-1, bool PMM=false)
 Program memory counters (disables programming performance counters) More...
 
uint64 getQPIClocks (uint32 port)
 Get number of QPI LL clocks on a QPI port. More...
 
uint64 getQPIL0pTxCycles (uint32 port)
 Get number cycles on a QPI port when the link was in a power saving half-lane mode. More...
 
uint64 getUPIL0TxCycles (uint32 port)
 Get number cycles on a UPI port when the link was in a L0 mode (fully active) More...
 
uint64 getQPIL1Cycles (uint32 port)
 Get number cycles on a QPI port when the link was in a power saving shutdown mode. More...
 
uint64 getDRAMClocks (uint32 channel)
 Get number DRAM channel cycles. More...
 
uint64 getMCDRAMClocks (uint32 channel)
 Get number MCDRAM channel cycles. More...
 
uint64 getMCCounter (uint32 channel, uint32 counter)
 Direct read of memory controller PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
uint64 getEDCCounter (uint32 channel, uint32 counter)
 Direct read of embedded DRAM memory controller PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
uint64 getQPILLCounter (uint32 port, uint32 counter)
 Direct read of QPI LL PMU counter (counter meaning depends on the programming: power/performance/etc) More...
 
uint64 getM2MCounter (uint32 box, uint32 counter)
 Direct read of M2M counter. More...
 
void freezeCounters ()
 Freezes event counting.
 
void unfreezeCounters ()
 Unfreezes event counting.
 
uint64 computeQPISpeed (const uint32 ref_core, const int cpumodel)
 Measures/computes the maximum theoretical QPI link bandwidth speed in GByte/seconds.
 
void enableJKTWorkaround (bool enable)
 Enable correct counting of various LLC events (with memory access perf penalty)
 
size_t getNumQPIPorts () const
 Returns the number of detected QPI ports.
 
uint64 getQPILinkSpeed (const uint32 linkNr) const
 Returns the speed of the QPI link.
 
void reportQPISpeed () const
 Print QPI Speeds.
 
uint32 getNumMC () const
 Returns the number of detected integrated memory controllers.
 
size_t getNumMCChannels () const
 Returns the total number of detected memory channels on all integrated memory controllers.
 
size_t getNumMCChannels (const uint32 controller) const
 Returns the total number of detected memory channels on given integrated memory controller. More...
 
size_t getNumEDCChannels () const
 Returns the total number of detected memory channels on all embedded DRAM controllers (EDC)
 

Friends

class PCM
 

Detailed Description

Object to access uncore counters in a socket/processor with microarchitecture codename SandyBridge-EP (Jaketown) or Ivytown-EP or Ivytown-EX.

Constructor & Destructor Documentation

ServerPCICFGUncore::ServerPCICFGUncore ( uint32  socket_,
const PCM pcm 
)

Initialize access data structures.

Parameters
socket_socket id
pcmpointer to PCM instance

References getNumMC(), getNumMCChannels(), getNumQPIPorts(), and PCM::useLinuxPerfForUncore().

Member Function Documentation

uint64 ServerPCICFGUncore::getDRAMClocks ( uint32  channel)

Get number DRAM channel cycles.

Parameters
channelchannel number
uint64 ServerPCICFGUncore::getEDCCounter ( uint32  channel,
uint32  counter 
)

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

Parameters
channelchannel number
countercounter number
uint64 ServerPCICFGUncore::getImcReadsForChannels ( uint32  beginChannel,
uint32  endChannel 
)

Get the number of integrated controller reads for given channels (in cache lines)

Parameters
beginChannelfirst channel in the range
endChannellast channel + 1: the range is [beginChannel, endChannel). endChannel is not included.

References getMCCounter().

Referenced by getImcReads(), and getImcReadsForController().

uint64 ServerPCICFGUncore::getImcReadsForController ( uint32  controller)

Get the number of integrated controller reads for given controller (in cache lines)

Parameters
controllercontroller ID/number

References getImcReadsForChannels().

uint64 ServerPCICFGUncore::getIncomingDataFlits ( uint32  port)

Get the number of incoming data flits to the socket through a port.

Parameters
portQPI port id
uint64 ServerPCICFGUncore::getM2MCounter ( uint32  box,
uint32  counter 
)

Direct read of M2M counter.

Parameters
boxbox ID/number
countercounter number
uint64 ServerPCICFGUncore::getMCCounter ( uint32  channel,
uint32  counter 
)

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

Parameters
channelchannel number
countercounter number

Referenced by getImcReadsForChannels(), getImcWrites(), getPMMReads(), and getPMMWrites().

uint64 ServerPCICFGUncore::getMCDRAMClocks ( uint32  channel)

Get number MCDRAM channel cycles.

Parameters
channelchannel number
size_t ServerPCICFGUncore::getNumMCChannels ( const uint32  controller) const

Returns the total number of detected memory channels on given integrated memory controller.

Parameters
controllercontroller number
uint64 ServerPCICFGUncore::getOutgoingFlits ( uint32  port)

Get the number of outgoing data and non-data or idle flits (depending on the architecture) from the socket through a port.

Parameters
portQPI port id

References getQPILLCounter().

uint64 ServerPCICFGUncore::getQPIClocks ( uint32  port)

Get number of QPI LL clocks on a QPI port.

Parameters
portQPI port number

References getQPILLCounter().

Referenced by computeQPISpeed().

uint64 ServerPCICFGUncore::getQPIL0pTxCycles ( uint32  port)

Get number cycles on a QPI port when the link was in a power saving half-lane mode.

Parameters
portQPI port number

References getQPILLCounter().

uint64 ServerPCICFGUncore::getQPIL1Cycles ( uint32  port)

Get number cycles on a QPI port when the link was in a power saving shutdown mode.

Parameters
portQPI port number

References getQPILLCounter().

uint64 ServerPCICFGUncore::getQPILLCounter ( uint32  port,
uint32  counter 
)

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

Parameters
portport number
countercounter number

Referenced by getOutgoingFlits(), getQPIClocks(), getQPIL0pTxCycles(), getQPIL1Cycles(), and getUPIL0TxCycles().

uint64 ServerPCICFGUncore::getUPIL0TxCycles ( uint32  port)

Get number cycles on a UPI port when the link was in a L0 mode (fully active)

Parameters
portUPI port number

References getQPILLCounter().

void ServerPCICFGUncore::program_power_metrics ( int  mc_profile)

Program power counters (disables programming performance counters)

Parameters
mc_profilememory controller measurement profile. See description of profiles in pcm-power.cpp

References PCM::getInstance().

void ServerPCICFGUncore::programServerUncoreMemoryMetrics ( int  rankA = -1,
int  rankB = -1,
bool  PMM = false 
)

Program memory counters (disables programming performance counters)

Parameters
rankAcount DIMM rank1 statistics (disables memory channel monitoring)
rankBcount DIMM rank2 statistics (disables memory channel monitoring)
PMMmonitor PMM bandwidth instead of partial writes

References PCM::getCPUBrandString(), and PCM::getInstance().


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