Processor Counter Monitor
Public Types | Public Member Functions | Friends | List of all members
pcm::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 Types

enum  EventPosition {
  READ =0, WRITE =1, READ_RANK_A =0, WRITE_RANK_A =1,
  READ_RANK_B =2, WRITE_RANK_B =3, PARTIAL =2, PMM_READ =2,
  PMM_WRITE =3, PMM_MM_MISS_CLEAN =2, PMM_MM_MISS_DIRTY =3, NM_HIT =0,
  M2M_CLOCKTICKS =1
}
 

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
 

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()

pcm::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::PCM::useLinuxPerfForUncore().

Member Function Documentation

◆ getDRAMClocks()

uint64 pcm::ServerPCICFGUncore::getDRAMClocks ( uint32  channel)

Get number DRAM channel cycles.

Parameters
channelchannel number

◆ getEDCCounter()

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)

Parameters
channelchannel number
countercounter number

◆ getImcReadsForChannels()

uint64 pcm::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().

◆ getImcReadsForController()

uint64 pcm::ServerPCICFGUncore::getImcReadsForController ( uint32  controller)

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

Parameters
controllercontroller ID/number

References getImcReadsForChannels().

◆ getIncomingDataFlits()

uint64 pcm::ServerPCICFGUncore::getIncomingDataFlits ( uint32  port)

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

Parameters
portQPI port id

◆ getM2MCounter()

uint64 pcm::ServerPCICFGUncore::getM2MCounter ( uint32  box,
uint32  counter 
)

Direct read of M2M counter.

Parameters
boxbox ID/number
countercounter number

◆ getM3UPICounter()

uint64 pcm::ServerPCICFGUncore::getM3UPICounter ( uint32  port,
uint32  counter 
)

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

Parameters
portport number
countercounter number

◆ getMCCounter()

uint64 pcm::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().

◆ getMCDRAMClocks()

uint64 pcm::ServerPCICFGUncore::getMCDRAMClocks ( uint32  channel)

Get number MCDRAM channel cycles.

Parameters
channelchannel number

◆ getNumMCChannels()

size_t pcm::ServerPCICFGUncore::getNumMCChannels ( const uint32  controller) const

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

Parameters
controllercontroller number

◆ getOutgoingFlits()

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.

Parameters
portQPI port id

References getQPILLCounter().

◆ getQPIClocks()

uint64 pcm::ServerPCICFGUncore::getQPIClocks ( uint32  port)

Get number of QPI LL clocks on a QPI port.

Parameters
portQPI port number

References getQPILLCounter().

◆ getQPIL0pTxCycles()

uint64 pcm::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().

◆ getQPIL1Cycles()

uint64 pcm::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().

◆ 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)

Parameters
portport number
countercounter number

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

◆ getUPIL0TxCycles()

uint64 pcm::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().

◆ program_power_metrics()

void pcm::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

◆ programServerUncoreMemoryMetrics()

void pcm::ServerPCICFGUncore::programServerUncoreMemoryMetrics ( const ServerUncoreMemoryMetrics &  metrics,
const int  rankA = -1,
const int  rankB = -1 
)

Program memory counters (disables programming performance counters)

Parameters
rankAcount DIMM rank1 statistics (disables memory channel monitoring)
rankBcount DIMM rank2 statistics (disables memory channel monitoring) metrics metric set (see the ServerUncoreMemoryMetrics enum)

References pcm::PCM::getInstance().


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