Processor Counter Monitor
|
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 | getHALocalRequests () |
Get the number of requests to home agent (BDX/HSX only) | |
uint64 | getHARequests () |
Get the number of local requests to home agent (BDX/HSX only) | |
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 (const ServerUncoreMemoryMetrics &metrics, const int rankA=-1, const int rankB=-1) |
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 | getM3UPICounter (uint32 port, uint32 counter) |
Direct read of M3UPI 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 |
Object to access uncore counters in a socket/processor with microarchitecture codename SandyBridge-EP (Jaketown) or Ivytown-EP or Ivytown-EX.
pcm::ServerPCICFGUncore::ServerPCICFGUncore | ( | uint32 | socket_, |
const PCM * | pcm | ||
) |
Initialize access data structures.
socket_ | socket id |
pcm | pointer to PCM instance |
References getNumMC(), getNumMCChannels(), getNumQPIPorts(), and pcm::PCM::useLinuxPerfForUncore().
uint64 pcm::ServerPCICFGUncore::getDRAMClocks | ( | uint32 | channel | ) |
Get number DRAM channel cycles.
channel | channel number |
uint64 pcm::ServerPCICFGUncore::getEDCCounter | ( | uint32 | channel, |
uint32 | counter | ||
) |
Direct read of embedded DRAM memory controller PMU counter (counter meaning depends on the programming: power/performance/etc)
channel | channel number |
counter | counter number |
uint64 pcm::ServerPCICFGUncore::getImcReadsForChannels | ( | uint32 | beginChannel, |
uint32 | endChannel | ||
) |
Get the number of integrated controller reads for given channels (in cache lines)
beginChannel | first channel in the range |
endChannel | last channel + 1: the range is [beginChannel, endChannel). endChannel is not included. |
References getMCCounter().
Referenced by getImcReads(), and getImcReadsForController().
uint64 pcm::ServerPCICFGUncore::getImcReadsForController | ( | uint32 | controller | ) |
Get the number of integrated controller reads for given controller (in cache lines)
controller | controller ID/number |
References getImcReadsForChannels().
uint64 pcm::ServerPCICFGUncore::getIncomingDataFlits | ( | uint32 | port | ) |
Get the number of incoming data flits to the socket through a port.
port | QPI port id |
uint64 pcm::ServerPCICFGUncore::getM2MCounter | ( | uint32 | box, |
uint32 | counter | ||
) |
Direct read of M2M counter.
box | box ID/number |
counter | counter number |
uint64 pcm::ServerPCICFGUncore::getM3UPICounter | ( | uint32 | port, |
uint32 | counter | ||
) |
Direct read of M3UPI PMU counter (counter meaning depends on the programming: power/performance/etc)
port | port number |
counter | counter number |
uint64 pcm::ServerPCICFGUncore::getMCCounter | ( | uint32 | channel, |
uint32 | counter | ||
) |
Direct read of memory controller PMU counter (counter meaning depends on the programming: power/performance/etc)
channel | channel number |
counter | counter number |
Referenced by getImcReadsForChannels().
uint64 pcm::ServerPCICFGUncore::getMCDRAMClocks | ( | uint32 | channel | ) |
Get number MCDRAM channel cycles.
channel | channel number |
size_t pcm::ServerPCICFGUncore::getNumMCChannels | ( | const uint32 | controller | ) | const |
Returns the total number of detected memory channels on given integrated memory controller.
controller | controller number |
uint64 pcm::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.
port | QPI port id |
References getQPILLCounter().
uint64 pcm::ServerPCICFGUncore::getQPIClocks | ( | uint32 | port | ) |
Get number of QPI LL clocks on a QPI port.
port | QPI port number |
References getQPILLCounter().
uint64 pcm::ServerPCICFGUncore::getQPIL0pTxCycles | ( | uint32 | port | ) |
Get number cycles on a QPI port when the link was in a power saving half-lane mode.
port | QPI port number |
References getQPILLCounter().
uint64 pcm::ServerPCICFGUncore::getQPIL1Cycles | ( | uint32 | port | ) |
Get number cycles on a QPI port when the link was in a power saving shutdown mode.
port | QPI port number |
References getQPILLCounter().
uint64 pcm::ServerPCICFGUncore::getQPILLCounter | ( | uint32 | port, |
uint32 | counter | ||
) |
Direct read of QPI LL PMU counter (counter meaning depends on the programming: power/performance/etc)
port | port number |
counter | counter number |
Referenced by getOutgoingFlits(), getQPIClocks(), getQPIL0pTxCycles(), getQPIL1Cycles(), and getUPIL0TxCycles().
uint64 pcm::ServerPCICFGUncore::getUPIL0TxCycles | ( | uint32 | port | ) |
Get number cycles on a UPI port when the link was in a L0 mode (fully active)
port | UPI port number |
References getQPILLCounter().
void pcm::ServerPCICFGUncore::program_power_metrics | ( | int | mc_profile | ) |
Program power counters (disables programming performance counters)
mc_profile | memory controller measurement profile. See description of profiles in pcm-power.cpp |
void pcm::ServerPCICFGUncore::programServerUncoreMemoryMetrics | ( | const ServerUncoreMemoryMetrics & | metrics, |
const int | rankA = -1 , |
||
const int | rankB = -1 |
||
) |
Program memory counters (disables programming performance counters)
rankA | count DIMM rank1 statistics (disables memory channel monitoring) |
rankB | count DIMM rank2 statistics (disables memory channel monitoring) metrics metric set (see the ServerUncoreMemoryMetrics enum) |
References pcm::PCM::getInstance().