Processor Counter Monitor
|
Main CPU counters header. More...
#include "version.h"
#include "types.h"
#include "msr.h"
#include "pci.h"
#include "bw.h"
#include "width_extender.h"
#include "exceptions/unsupported_processor_exception.hpp"
#include <vector>
#include <array>
#include <limits>
#include <string>
#include <memory>
#include <map>
#include <unordered_map>
#include <string.h>
#include <assert.h>
#include <semaphore.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/syscall.h>
#include <unistd.h>
#include "resctrl.h"
Go to the source code of this file.
Macros | |
#define | PCM_API |
#define | NOMINMAX |
#define | PCM_SKL_PATH_CASES |
#define | PCM_GENERATE_METRIC_AVAILABLE_FUNCTION(m) bool is##m() const { return m; } |
Typedefs | |
typedef SimpleCounterState | pcm::PCIeCounterState |
typedef SimpleCounterState | pcm::IIOCounterState |
typedef std::vector< uint64 > | pcm::eventGroup_t |
Enumerations | |
enum | ServerUncoreMemoryMetrics { PartialWrites, Pmem, PmemMemoryMode, PmemMixedMode } |
Functions | |
uint64 | pcm::RDTSC () |
uint64 | pcm::RDTSCP () |
template<class CounterStateType > | |
int32 | pcm::getThermalHeadroom (const CounterStateType &, const CounterStateType &after) |
template<class CounterStateType > | |
double | pcm::getNormalizedQPIL0pTxCycles (uint32 port, const CounterStateType &before, const CounterStateType &after) |
Returns the ratio of QPI cycles in power saving half-lane mode. More... | |
template<class CounterStateType > | |
double | pcm::getNormalizedQPIL1Cycles (uint32 port, const CounterStateType &before, const CounterStateType &after) |
Returns the ratio of QPI cycles in power saving shutdown mode. More... | |
template<class CounterStateType > | |
uint64 | pcm::getDRAMClocks (uint32 channel, const CounterStateType &before, const CounterStateType &after) |
Returns DRAM clock ticks. More... | |
template<class CounterStateType > | |
uint64 | pcm::getMCDRAMClocks (uint32 channel, const CounterStateType &before, const CounterStateType &after) |
Returns MCDRAM clock ticks. More... | |
template<class CounterStateType > | |
uint64 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::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 | pcm::getPCUClocks (const CounterStateType &before, const CounterStateType &after) |
Returns clock ticks of power control unit. More... | |
template<class CounterStateType > | |
uint64 | pcm::getConsumedEnergy (const CounterStateType &before, const CounterStateType &after) |
Returns energy consumed by processor, excluding DRAM (measured in internal units) More... | |
template<class CounterStateType > | |
uint64 | pcm::getDRAMConsumedEnergy (const CounterStateType &before, const CounterStateType &after) |
Returns energy consumed by DRAM (measured in internal units) More... | |
template<class CounterStateType > | |
int64 | pcm::getFreeRunningCounter (const typename CounterStateType::FreeRunningCounterID &counter, const CounterStateType &before, const CounterStateType &after) |
Returns free running counter if it exists, -1 otherwise. More... | |
template<class CounterStateType > | |
uint64 | pcm::getUncoreClocks (const CounterStateType &before, const CounterStateType &after) |
Returns uncore clock ticks. More... | |
template<class CounterStateType > | |
double | pcm::getConsumedJoules (const CounterStateType &before, const CounterStateType &after) |
Returns Joules consumed by processor (excluding DRAM) More... | |
template<class CounterStateType > | |
double | pcm::getDRAMConsumedJoules (const CounterStateType &before, const CounterStateType &after) |
Returns Joules consumed by DRAM. More... | |
template<class CounterStateType > | |
uint64 | pcm::getQPIClocks (uint32 port, const CounterStateType &before, const CounterStateType &after) |
Returns QPI LL clock ticks. More... | |
template<class CounterStateType > | |
uint64 | pcm::getQPIL0pTxCycles (uint32 port, const CounterStateType &before, const CounterStateType &after) |
Returns the number of QPI cycles in power saving half-lane mode. More... | |
template<class CounterStateType > | |
uint64 | pcm::getQPIL1Cycles (uint32 port, const CounterStateType &before, const CounterStateType &after) |
Returns the number of QPI cycles in power saving shutdown mode. More... | |
SystemCounterState | pcm::getSystemCounterState () |
Reads the counter state of the system. More... | |
SocketCounterState | pcm::getSocketCounterState (uint32 socket) |
Reads the counter state of a socket. More... | |
CoreCounterState | pcm::getCoreCounterState (uint32 core) |
Reads the counter state of a (logical) core. More... | |
template<class CounterStateType > | |
double | pcm::getIPC (const CounterStateType &before, const CounterStateType &after) |
Computes average number of retired instructions per core cycle (IPC) More... | |
template<class CounterStateType > | |
uint64 | pcm::getInstructionsRetired (const CounterStateType &before, const CounterStateType &after) |
Computes the number of retired instructions. More... | |
template<class CounterStateType > | |
double | pcm::getExecUsage (const CounterStateType &before, const CounterStateType &after) |
Computes average number of retired instructions per time interval. More... | |
template<class CounterStateType > | |
uint64 | pcm::getInstructionsRetired (const CounterStateType &now) |
Computes the number of retired instructions. More... | |
template<class CounterStateType > | |
uint64 | pcm::getCycles (const CounterStateType &before, const CounterStateType &after) |
Computes the number core clock cycles when signal on a specific core is running (not halted) More... | |
template<class CounterStateType > | |
uint64 | pcm::getRefCycles (const CounterStateType &before, const CounterStateType &after) |
Computes the number of reference clock cycles while clock signal on the core is running. More... | |
template<class CounterStateType > | |
uint64 | pcm::getCycles (const CounterStateType &now) |
Computes the number executed core clock cycles. More... | |
template<class CounterStateType > | |
double | pcm::getCoreIPC (const CounterStateType &before, const CounterStateType &after) |
Computes average number of retired instructions per core cycle for the entire system combining instruction counts from logical cores to corresponding physical cores. More... | |
template<class CounterStateType > | |
double | pcm::getTotalExecUsage (const CounterStateType &before, const CounterStateType &after) |
Computes average number of retired instructions per time interval for the entire system combining instruction counts from logical cores to corresponding physical cores. More... | |
template<class StateType > | |
double | pcm::getAverageFrequencyFromClocks (const int64 clocks, const StateType &before, const StateType &after) |
template<class CounterStateType > | |
double | pcm::getAverageFrequency (const CounterStateType &before, const CounterStateType &after) |
Computes average core frequency also taking Intel Turbo Boost technology into account. More... | |
template<class UncoreStateType > | |
double | pcm::getAverageUncoreFrequency (const UncoreStateType &before, const UncoreStateType &after) |
Computes average uncore frequency. More... | |
template<class CounterStateType > | |
double | pcm::getActiveAverageFrequency (const CounterStateType &before, const CounterStateType &after) |
Computes average core frequency when not in powersaving C0-state (also taking Intel Turbo Boost technology into account) More... | |
template<class CounterStateType > | |
double | pcm::getRelativeFrequency (const CounterStateType &before, const CounterStateType &after) |
Computes average core frequency also taking Intel Turbo Boost technology into account. More... | |
template<class CounterStateType > | |
double | pcm::getActiveRelativeFrequency (const CounterStateType &before, const CounterStateType &after) |
Computes average core frequency when not in powersaving C0-state (also taking Intel Turbo Boost technology into account) More... | |
template<class CounterStateType > | |
double | pcm::getL2CacheHitRatio (const CounterStateType &before, const CounterStateType &after) |
Computes L2 cache hit ratio. More... | |
template<class CounterStateType > | |
double | pcm::getL3CacheHitRatio (const CounterStateType &before, const CounterStateType &after) |
Computes L3 cache hit ratio. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL3CacheMisses (const CounterStateType &before, const CounterStateType &after) |
Computes number of L3 cache misses. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL2CacheMisses (const CounterStateType &before, const CounterStateType &after) |
Computes number of L2 cache misses. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL2CacheHits (const CounterStateType &before, const CounterStateType &after) |
Computes number of L2 cache hits. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL3CacheOccupancy (const CounterStateType &now) |
Computes L3 Cache Occupancy. More... | |
template<class CounterStateType > | |
uint64 | pcm::getLocalMemoryBW (const CounterStateType &before, const CounterStateType &after) |
Computes Local Memory Bandwidth. More... | |
template<class CounterStateType > | |
uint64 | pcm::getRemoteMemoryBW (const CounterStateType &before, const CounterStateType &after) |
Computes Remote Memory Bandwidth. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL3CacheHitsNoSnoop (const CounterStateType &before, const CounterStateType &after) |
Computes number of L3 cache hits where no snooping in sibling L2 caches had to be done. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL3CacheHitsSnoop (const CounterStateType &before, const CounterStateType &after) |
Computes number of L3 cache hits where snooping in sibling L2 caches had to be done. More... | |
template<class CounterStateType > | |
uint64 | pcm::getL3CacheHits (const CounterStateType &before, const CounterStateType &after) |
Computes total number of L3 cache hits. More... | |
template<class CounterStateType > | |
uint64 | pcm::getInvariantTSC (const CounterStateType &before, const CounterStateType &after) |
Computes number of invariant time stamp counter ticks. More... | |
template<class CounterStateType > | |
double | pcm::getCoreCStateResidency (int state, const CounterStateType &before, const CounterStateType &after) |
Computes residency in the core C-state. More... | |
template<class CounterStateType > | |
uint64 | pcm::getCoreCStateResidency (int state, const CounterStateType &now) |
Reads raw residency counter for the core C-state. More... | |
template<class CounterStateType > | |
double | pcm::getPackageCStateResidency (int state, const CounterStateType &before, const CounterStateType &after) |
Computes residency in the package C-state. More... | |
template<class CounterStateType > | |
uint64 | pcm::getPackageCStateResidency (int state, const CounterStateType &now) |
Reads raw residency counter for the package C-state. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesReadFromMC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes read from DRAM memory controllers. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesWrittenToMC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes written to DRAM memory controllers. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesReadFromPMM (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes read from PMM memory. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesWrittenToPMM (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes written to PMM memory. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesReadFromEDC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes read from MCDRAM memory controllers. More... | |
template<class CounterStateType > | |
uint64 | pcm::getBytesWrittenToEDC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes written to MCDRAM memory controllers. More... | |
template<class CounterStateType > | |
uint64 | pcm::getGTRequestBytesFromMC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes of read/write requests from GT engine. More... | |
template<class CounterStateType > | |
uint64 | pcm::getIARequestBytesFromMC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes of read/write requests from all IA. More... | |
template<class CounterStateType > | |
uint64 | pcm::getIORequestBytesFromMC (const CounterStateType &before, const CounterStateType &after) |
Computes number of bytes of read/write requests from all IO sources. More... | |
template<class CounterStateType > | |
uint64 | pcm::getSMICount (const CounterStateType &before, const CounterStateType &after) |
Returns the number of occurred system management interrupts. More... | |
template<class CounterStateType > | |
uint64 | pcm::getNumberOfCustomEvents (int32 eventCounterNr, const CounterStateType &before, const CounterStateType &after) |
Returns the number of occurred custom core events. More... | |
uint64 | pcm::getIncomingQPILinkBytes (uint32 socketNr, uint32 linkNr, const SystemCounterState &before, const SystemCounterState &after) |
Get estimation of QPI data traffic per incoming QPI link. More... | |
double | pcm::getIncomingQPILinkUtilization (uint32 socketNr, uint32 linkNr, const SystemCounterState &before, const SystemCounterState &after) |
Get data utilization of incoming QPI link (0..1) More... | |
double | pcm::getOutgoingQPILinkUtilization (uint32 socketNr, uint32 linkNr, const SystemCounterState &before, const SystemCounterState &after) |
Get utilization of outgoing QPI link (0..1) More... | |
uint64 | pcm::getOutgoingQPILinkBytes (uint32 socketNr, uint32 linkNr, const SystemCounterState &before, const SystemCounterState &after) |
Get estimation of QPI (data+nondata) traffic per outgoing QPI link. More... | |
uint64 | pcm::getAllIncomingQPILinkBytes (const SystemCounterState &before, const SystemCounterState &after) |
Get estimation of total QPI data traffic. More... | |
uint64 | pcm::getAllOutgoingQPILinkBytes (const SystemCounterState &before, const SystemCounterState &after) |
Get estimation of total QPI data+nondata traffic. More... | |
uint64 | pcm::getIncomingQPILinkBytes (uint32 socketNr, uint32 linkNr, const SystemCounterState &now) |
Return current value of the counter of QPI data traffic per incoming QPI link. More... | |
uint64 | pcm::getSocketIncomingQPILinkBytes (uint32 socketNr, const SystemCounterState &now) |
Get estimation of total QPI data traffic for this socket. More... | |
uint64 | pcm::getAllIncomingQPILinkBytes (const SystemCounterState &now) |
Get estimation of Socket QPI data traffic. More... | |
double | pcm::getQPItoMCTrafficRatio (const SystemCounterState &before, const SystemCounterState &after) |
Get QPI data to Memory Controller traffic ratio. More... | |
template<class CounterStateType > | |
double | pcm::getLocalMemoryRequestRatio (const CounterStateType &before, const CounterStateType &after) |
Get local memory access ration measured in home agent. More... | |
template<class CounterType > | |
uint64 | pcm::getNumberOfEvents (const CounterType &before, const CounterType &after) |
Returns the raw count of events. More... | |
template<class CounterStateType > | |
double | pcm::getLLCReadMissLatency (const CounterStateType &before, const CounterStateType &after) |
Returns average last level cache read+prefetch miss latency in ns. | |
template<class CounterStateType > | |
uint64 | pcm::getAllSlots (const CounterStateType &before, const CounterStateType &after) |
template<class CounterStateType > | |
uint64 | pcm::getAllSlotsRaw (const CounterStateType &before, const CounterStateType &after) |
template<class CounterStateType > | |
double | pcm::getBackendBound (const CounterStateType &before, const CounterStateType &after) |
Returns unutilized pipeline slots where no uop was delivered due to lack of back-end resources as range 0..1. | |
template<class CounterStateType > | |
double | pcm::getFrontendBound (const CounterStateType &before, const CounterStateType &after) |
Returns unutilized pipeline slots where Front-end did not deliver a uop while back-end is ready as range 0..1. | |
template<class CounterStateType > | |
double | pcm::getBadSpeculation (const CounterStateType &before, const CounterStateType &after) |
Returns wasted pipeline slots due to incorrect speculation, covering whole penalty: Utilized by uops that do not retire, or Recovery Bubbles (unutilized slots) as range 0..1. | |
template<class CounterStateType > | |
double | pcm::getRetiring (const CounterStateType &before, const CounterStateType &after) |
Returns pipeline slots utilized by uops that eventually retire (commit) | |
template<class CounterStateType > | |
uint64 | pcm::getMSREvent (const uint64 &index, const PCM::MSRType &type, const CounterStateType &before, const CounterStateType &after) |
Main CPU counters header.
Include this header file if you want to access CPU counters (core and uncore - including memory controller chips and QPI)
#define PCM_SKL_PATH_CASES |
double pcm::getActiveAverageFrequency | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average core frequency when not in powersaving C0-state (also taking Intel Turbo Boost technology into account)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getActiveAverageFrequency(), pcm::PCM::getInstance(), and pcm::PCM::getNominalFrequency().
Referenced by pcm::getActiveAverageFrequency().
double pcm::getActiveRelativeFrequency | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average core frequency when not in powersaving C0-state (also taking Intel Turbo Boost technology into account)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getActiveRelativeFrequency(), and pcm::PCM::getInstance().
Referenced by pcm::getActiveRelativeFrequency().
|
inline |
Get estimation of total QPI data traffic.
Returns an estimation of number of data bytes transferred to all sockets over all Intel(r) Quick Path Interconnect links
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::getAllIncomingQPILinkBytes(), pcm::PCM::getInstance(), and pcm::PCM::getNumSockets().
Referenced by pcm::getAllIncomingQPILinkBytes(), and pcm::getQPItoMCTrafficRatio().
|
inline |
Get estimation of Socket QPI data traffic.
Returns an estimation of number of data bytes transferred to all sockets over all Intel(r) Quick Path Interconnect links
now | System CPU counter state |
References pcm::getAllIncomingQPILinkBytes(), pcm::PCM::getInstance(), pcm::PCM::getNumSockets(), and pcm::getSocketIncomingQPILinkBytes().
|
inline |
Get estimation of total QPI data+nondata traffic.
Returns an estimation of number of data and non-data bytes transferred from all sockets over all Intel(r) Quick Path Interconnect links
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::getAllOutgoingQPILinkBytes(), pcm::PCM::getInstance(), and pcm::PCM::getNumSockets().
Referenced by pcm::getAllOutgoingQPILinkBytes().
double pcm::getAverageFrequency | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average core frequency also taking Intel Turbo Boost technology into account.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getAverageFrequency().
Referenced by pcm::getAverageFrequency().
double pcm::getAverageUncoreFrequency | ( | const UncoreStateType & | before, |
const UncoreStateType & | after | ||
) |
Computes average uncore frequency.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getAverageUncoreFrequency(), and pcm::PCM::getInstance().
Referenced by pcm::getAverageUncoreFrequency().
uint64 pcm::getBytesReadFromEDC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes read from MCDRAM memory controllers.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesReadFromEDC(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesReadFromEDC().
uint64 pcm::getBytesReadFromMC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes read from DRAM memory controllers.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesReadFromMC(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesReadFromMC(), and pcm::getQPItoMCTrafficRatio().
uint64 pcm::getBytesReadFromPMM | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes read from PMM memory.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesReadFromPMM(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesReadFromPMM(), and pcm::getQPItoMCTrafficRatio().
uint64 pcm::getBytesWrittenToEDC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes written to MCDRAM memory controllers.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesWrittenToEDC(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesWrittenToEDC().
uint64 pcm::getBytesWrittenToMC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes written to DRAM memory controllers.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesWrittenToMC(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesWrittenToMC(), and pcm::getQPItoMCTrafficRatio().
uint64 pcm::getBytesWrittenToPMM | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes written to PMM memory.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getBytesWrittenToPMM(), and pcm::PCM::getInstance().
Referenced by pcm::getBytesWrittenToPMM(), and pcm::getQPItoMCTrafficRatio().
uint64 pcm::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)
counter | counter number |
cbo | cbo or cha number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getCBOCounter().
Referenced by pcm::getCBOCounter().
uint64 pcm::getConsumedEnergy | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns energy consumed by processor, excluding DRAM (measured in internal units)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getConsumedEnergy().
Referenced by pcm::getConsumedEnergy(), and pcm::getConsumedJoules().
double pcm::getConsumedJoules | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns Joules consumed by processor (excluding DRAM)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getConsumedEnergy(), pcm::getConsumedJoules(), pcm::PCM::getInstance(), and pcm::PCM::getJoulesPerEnergyUnit().
Referenced by pcm::getConsumedJoules().
PCM_API CoreCounterState pcm::getCoreCounterState | ( | uint32 | core | ) |
Reads the counter state of a (logical) core.
Helper function. Uses PCM object to access counters.
core | core id |
References pcm::PCM::getCoreCounterState(), and pcm::PCM::getInstance().
|
inline |
Computes residency in the core C-state.
state | C-state |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getCoreCStateResidency(), pcm::PCM::getInstance(), pcm::getInvariantTSC(), pcm::getRefCycles(), and pcm::PCM::isCoreCStateResidencySupported().
Referenced by pcm::getCoreCStateResidency().
|
inline |
Reads raw residency counter for the core C-state.
state | C-state # |
now | CPU counter state |
References pcm::getCoreCStateResidency().
|
inline |
Computes average number of retired instructions per core cycle for the entire system combining instruction counts from logical cores to corresponding physical cores.
Use this metric to evaluate IPC improvement between SMT(Hyperthreading) on and SMT off.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getCoreIPC(), pcm::PCM::getInstance(), pcm::getIPC(), pcm::PCM::getNumCores(), pcm::PCM::getNumOnlineCores(), and pcm::PCM::getThreadsPerCore().
Referenced by pcm::getCoreIPC().
uint64 pcm::getCycles | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes the number core clock cycles when signal on a specific core is running (not halted)
Returns number of used cycles (halted cyles are not counted). The counter does not advance in the following conditions:
The performance counter for this event counts across performance state transitions using different core clock frequencies
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getCycles().
Referenced by pcm::getCycles().
uint64 pcm::getCycles | ( | const CounterStateType & | now | ) |
Computes the number executed core clock cycles.
Returns number of used cycles (halted cyles are not counted).
now | Current CPU counter state |
References pcm::getCycles().
uint64 pcm::getDRAMClocks | ( | uint32 | channel, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns DRAM clock ticks.
channel | DRAM channel number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getCPUModel(), pcm::getDRAMClocks(), and pcm::PCM::getInstance().
Referenced by pcm::getDRAMClocks().
uint64 pcm::getDRAMConsumedEnergy | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns energy consumed by DRAM (measured in internal units)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getDRAMConsumedEnergy().
Referenced by pcm::getDRAMConsumedEnergy(), and pcm::getDRAMConsumedJoules().
double pcm::getDRAMConsumedJoules | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns Joules consumed by DRAM.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getCPUModel(), pcm::getDRAMConsumedEnergy(), pcm::getDRAMConsumedJoules(), pcm::PCM::getInstance(), and pcm::PCM::getJoulesPerEnergyUnit().
Referenced by pcm::getDRAMConsumedJoules().
uint64 pcm::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)
counter | counter number |
channel | channel number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getEDCCounter(), and pcm::PCM::getInstance().
Referenced by pcm::getEDCCounter().
double pcm::getExecUsage | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average number of retired instructions per time interval.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getExecUsage().
Referenced by pcm::getExecUsage(), and pcm::getTotalExecUsage().
int64 pcm::getFreeRunningCounter | ( | const typename CounterStateType::FreeRunningCounterID & | counter, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns free running counter if it exists, -1 otherwise.
counter | name of the counter |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getFreeRunningCounter().
Referenced by pcm::getFreeRunningCounter().
uint64 pcm::getGTRequestBytesFromMC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes of read/write requests from GT engine.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getGTRequestBytesFromMC(), and pcm::PCM::getInstance().
Referenced by pcm::getGTRequestBytesFromMC().
uint64 pcm::getIARequestBytesFromMC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes of read/write requests from all IA.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getIARequestBytesFromMC(), and pcm::PCM::getInstance().
Referenced by pcm::getIARequestBytesFromMC().
uint64 pcm::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)
counter | counter number |
stack | IIO stack number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getIIOCounter().
Referenced by pcm::getIIOCounter().
|
inline |
Get estimation of QPI data traffic per incoming QPI link.
Returns an estimation of number of data bytes transferred to a socket over Intel(r) Quick Path Interconnect
socketNr | socket identifier |
linkNr | linkNr |
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::getIncomingQPILinkBytes(), and pcm::PCM::getInstance().
Referenced by pcm::getIncomingQPILinkBytes(), and pcm::getIncomingQPILinkUtilization().
|
inline |
Return current value of the counter of QPI data traffic per incoming QPI link.
Returns the number of incoming data bytes to a socket over Intel(r) Quick Path Interconnect
socketNr | socket identifier |
linkNr | linkNr |
now | Current System CPU counter state |
References pcm::getIncomingQPILinkBytes(), and pcm::PCM::getInstance().
|
inline |
Get data utilization of incoming QPI link (0..1)
Returns an estimation of utilization of QPI link by data traffic transferred to a socket over Intel(r) Quick Path Interconnect
socketNr | socket identifier |
linkNr | linkNr |
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::getIncomingQPILinkBytes(), pcm::getIncomingQPILinkUtilization(), pcm::PCM::getInstance(), pcm::getInvariantTSC(), pcm::PCM::getNominalFrequency(), pcm::PCM::getNumOnlineCores(), and pcm::PCM::getQPILinkSpeed().
Referenced by pcm::getIncomingQPILinkUtilization().
uint64 pcm::getInstructionsRetired | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes the number of retired instructions.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getInstructionsRetired().
Referenced by pcm::getInstructionsRetired().
uint64 pcm::getInstructionsRetired | ( | const CounterStateType & | now | ) |
Computes the number of retired instructions.
now | Current CPU counter state |
References pcm::getInstructionsRetired().
uint64 pcm::getInvariantTSC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of invariant time stamp counter ticks.
This counter counts irrespectively of C-, P- or T-states
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getInvariantTSC().
Referenced by pcm::getCoreCStateResidency(), pcm::getIncomingQPILinkUtilization(), pcm::getInvariantTSC(), pcm::getLLCReadMissLatency(), pcm::getOutgoingQPILinkBytes(), pcm::getOutgoingQPILinkUtilization(), and pcm::getPackageCStateResidency().
uint64 pcm::getIORequestBytesFromMC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of bytes of read/write requests from all IO sources.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getIORequestBytesFromMC().
Referenced by pcm::getIORequestBytesFromMC().
double pcm::getIPC | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average number of retired instructions per core cycle (IPC)
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getIPC().
Referenced by pcm::getCoreIPC(), and pcm::getIPC().
uint64 pcm::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)
counter | counter number |
stack | IIO stack number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getIRPCounter().
Referenced by pcm::getIRPCounter().
double pcm::getL2CacheHitRatio | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes L2 cache hit ratio.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getL2CacheHitRatio(), pcm::getL2CacheHits(), and pcm::getL2CacheMisses().
Referenced by pcm::getL2CacheHitRatio().
uint64 pcm::getL2CacheHits | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of L2 cache hits.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getL2CacheHits().
Referenced by pcm::getL2CacheHitRatio(), and pcm::getL2CacheHits().
uint64 pcm::getL2CacheMisses | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of L2 cache misses.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getL2CacheMisses().
Referenced by pcm::getL2CacheHitRatio(), and pcm::getL2CacheMisses().
double pcm::getL3CacheHitRatio | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes L3 cache hit ratio.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getL3CacheHitRatio(), pcm::getL3CacheHits(), and pcm::getL3CacheMisses().
Referenced by pcm::getL3CacheHitRatio().
uint64 pcm::getL3CacheHits | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes total number of L3 cache hits.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getL3CacheHits(), pcm::getL3CacheHitsNoSnoop(), and pcm::getL3CacheHitsSnoop().
Referenced by pcm::getL3CacheHitRatio(), and pcm::getL3CacheHits().
uint64 pcm::getL3CacheHitsNoSnoop | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of L3 cache hits where no snooping in sibling L2 caches had to be done.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getL3CacheHitsNoSnoop().
Referenced by pcm::getL3CacheHits(), and pcm::getL3CacheHitsNoSnoop().
uint64 pcm::getL3CacheHitsSnoop | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of L3 cache hits where snooping in sibling L2 caches had to be done.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getL3CacheHitsSnoop(), and pcm::getL3CacheMisses().
Referenced by pcm::getL3CacheHits(), and pcm::getL3CacheHitsSnoop().
uint64 pcm::getL3CacheMisses | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes number of L3 cache misses.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getL3CacheMisses().
Referenced by pcm::getL3CacheHitRatio(), pcm::getL3CacheHitsSnoop(), and pcm::getL3CacheMisses().
uint64 pcm::getL3CacheOccupancy | ( | const CounterStateType & | now | ) |
Computes L3 Cache Occupancy.
References pcm::PCM::getInstance(), and pcm::getL3CacheOccupancy().
Referenced by pcm::getL3CacheOccupancy().
uint64 pcm::getLocalMemoryBW | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes Local Memory Bandwidth.
References pcm::PCM::getInstance(), and pcm::getLocalMemoryBW().
Referenced by pcm::getLocalMemoryBW(), and pcm::getRemoteMemoryBW().
|
inline |
Get local memory access ration measured in home agent.
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getLocalMemoryRequestRatio().
Referenced by pcm::getLocalMemoryRequestRatio().
uint64 pcm::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)
counter | counter number |
controller | controller number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getM2MCounter().
Referenced by pcm::getM2MCounter().
uint64 pcm::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)
counter | counter number |
port | UPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getM3UPICounter().
Referenced by pcm::getM3UPICounter().
uint64 pcm::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)
counter | counter number |
channel | channel number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getMCCounter().
Referenced by pcm::getMCCounter().
uint64 pcm::getMCDRAMClocks | ( | uint32 | channel, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns MCDRAM clock ticks.
channel | MCDRAM channel number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getMCDRAMClocks().
Referenced by pcm::getMCDRAMClocks().
double pcm::getNormalizedQPIL0pTxCycles | ( | uint32 | port, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns the ratio of QPI cycles in power saving half-lane mode.
port | QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getNormalizedQPIL0pTxCycles(), pcm::getQPIClocks(), and pcm::getQPIL0pTxCycles().
Referenced by pcm::getNormalizedQPIL0pTxCycles().
double pcm::getNormalizedQPIL1Cycles | ( | uint32 | port, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns the ratio of QPI cycles in power saving shutdown mode.
port | QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getNormalizedQPIL1Cycles(), pcm::getQPIClocks(), and pcm::getQPIL1Cycles().
Referenced by pcm::getNormalizedQPIL1Cycles().
uint64 pcm::getNumberOfCustomEvents | ( | int32 | eventCounterNr, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns the number of occurred custom core events.
Read number of events programmed with the CUSTOM_CORE_EVENTS
eventCounterNr | Event/counter number (value from 0 to 3) |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getNumberOfCustomEvents().
Referenced by pcm::getNumberOfCustomEvents().
|
inline |
Returns the raw count of events.
before | counter state before the experiment |
after | counter state after the experiment |
References pcm::getNumberOfEvents().
Referenced by pcm::getNumberOfEvents().
|
inline |
Get estimation of QPI (data+nondata) traffic per outgoing QPI link.
Returns an estimation of number of data bytes transferred from a socket over Intel(r) Quick Path Interconnect
socketNr | socket identifier |
linkNr | linkNr |
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getInvariantTSC(), pcm::PCM::getNominalFrequency(), pcm::PCM::getNumOnlineCores(), pcm::getOutgoingQPILinkBytes(), pcm::getOutgoingQPILinkUtilization(), and pcm::PCM::getQPILinkSpeed().
Referenced by pcm::getOutgoingQPILinkBytes().
|
inline |
Get utilization of outgoing QPI link (0..1)
Returns an estimation of utilization of QPI link by (data+nondata) traffic transferred from a socket over Intel(r) Quick Path Interconnect
socketNr | socket identifier |
linkNr | linkNr |
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getInvariantTSC(), pcm::PCM::getNominalFrequency(), pcm::PCM::getNumOnlineCores(), pcm::getOutgoingQPILinkUtilization(), and pcm::PCM::getQPILinkSpeed().
Referenced by pcm::getOutgoingQPILinkBytes(), and pcm::getOutgoingQPILinkUtilization().
|
inline |
Computes residency in the package C-state.
state | C-state |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::PCM::getInstance(), pcm::getInvariantTSC(), pcm::getPackageCStateResidency(), and pcm::PCM::isPackageCStateResidencySupported().
Referenced by pcm::getPackageCStateResidency().
|
inline |
Reads raw residency counter for the package C-state.
state | C-state # |
now | CPU counter state |
References pcm::getPackageCStateResidency().
uint64 pcm::getPCUClocks | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns clock ticks of power control unit.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getPCUClocks(), and pcm::getPCUCounter().
Referenced by pcm::getPCUClocks().
uint64 pcm::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)
counter | counter number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getPCUCounter().
Referenced by pcm::getPCUClocks(), and pcm::getPCUCounter().
uint64 pcm::getQPIClocks | ( | uint32 | port, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns QPI LL clock ticks.
port | QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getQPIClocks(), and pcm::getXPICounter().
Referenced by pcm::getNormalizedQPIL0pTxCycles(), pcm::getNormalizedQPIL1Cycles(), and pcm::getQPIClocks().
uint64 pcm::getQPIL0pTxCycles | ( | uint32 | port, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns the number of QPI cycles in power saving half-lane mode.
port | QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getQPIL0pTxCycles(), and pcm::getXPICounter().
Referenced by pcm::getNormalizedQPIL0pTxCycles(), and pcm::getQPIL0pTxCycles().
uint64 pcm::getQPIL1Cycles | ( | uint32 | port, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Returns the number of QPI cycles in power saving shutdown mode.
port | QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getQPIL1Cycles(), and pcm::getXPICounter().
Referenced by pcm::getNormalizedQPIL1Cycles(), and pcm::getQPIL1Cycles().
|
inline |
Get QPI data to Memory Controller traffic ratio.
Ideally for NUMA-optmized programs the ratio should be close to 0.
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::getAllIncomingQPILinkBytes(), pcm::getBytesReadFromMC(), pcm::getBytesReadFromPMM(), pcm::getBytesWrittenToMC(), pcm::getBytesWrittenToPMM(), pcm::PCM::getInstance(), and pcm::getQPItoMCTrafficRatio().
Referenced by pcm::getQPItoMCTrafficRatio().
uint64 pcm::getRefCycles | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes the number of reference clock cycles while clock signal on the core is running.
The reference clock operates at a fixed frequency, irrespective of core frequency changes due to performance state transitions. See Intel(r) Software Developer's Manual for more details
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getRefCycles().
Referenced by pcm::getCoreCStateResidency(), and pcm::getRefCycles().
double pcm::getRelativeFrequency | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes average core frequency also taking Intel Turbo Boost technology into account.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getRelativeFrequency().
Referenced by pcm::getRelativeFrequency().
uint64 pcm::getRemoteMemoryBW | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Computes Remote Memory Bandwidth.
References pcm::PCM::getInstance(), pcm::getLocalMemoryBW(), and pcm::getRemoteMemoryBW().
Referenced by pcm::getRemoteMemoryBW().
uint64 pcm::getSMICount | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns the number of occurred system management interrupts.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getSMICount().
Referenced by pcm::getSMICount().
PCM_API SocketCounterState pcm::getSocketCounterState | ( | uint32 | socket | ) |
Reads the counter state of a socket.
Helper function. Uses PCM object to access counters.
socket | socket id |
References pcm::PCM::getInstance(), and pcm::PCM::getSocketCounterState().
|
inline |
Get estimation of total QPI data traffic for this socket.
Returns an estimation of number of bytes transferred to this sockets over all Intel(r) Quick Path Interconnect links on this socket
before | System CPU counter state before the experiment |
after | System CPU counter state after the experiment |
References pcm::PCM::getInstance(), and pcm::getSocketIncomingQPILinkBytes().
Referenced by pcm::getAllIncomingQPILinkBytes(), and pcm::getSocketIncomingQPILinkBytes().
PCM_API SystemCounterState pcm::getSystemCounterState | ( | ) |
Reads the counter state of the system.
Helper function. Uses PCM object to access counters.
System consists of several sockets (CPUs). Socket has a CPU in it. Socket (CPU) consists of several (logical) cores.
References pcm::PCM::getInstance(), and pcm::PCM::getSystemCounterState().
|
inline |
Computes average number of retired instructions per time interval for the entire system combining instruction counts from logical cores to corresponding physical cores.
Use this metric to evaluate cores utilization improvement between SMT(Hyperthreading) on and SMT off.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getExecUsage(), pcm::PCM::getInstance(), pcm::PCM::getNumCores(), pcm::PCM::getNumOnlineCores(), pcm::PCM::getThreadsPerCore(), and pcm::getTotalExecUsage().
Referenced by pcm::getTotalExecUsage().
uint64 pcm::getUBOXCounter | ( | uint32 | counter, |
const CounterStateType & | before, | ||
const CounterStateType & | after | ||
) |
Direct read of UBOX PMU counter (counter meaning depends on the programming: power/performance/etc)
counter | counter number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getUBOXCounter().
Referenced by pcm::getUBOXCounter().
uint64 pcm::getUncoreClocks | ( | const CounterStateType & | before, |
const CounterStateType & | after | ||
) |
Returns uncore clock ticks.
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getUncoreClocks().
Referenced by pcm::getUncoreClocks(), and pcm::PCM::isClientCPU().
uint64 pcm::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)
counter | counter number |
port | UPI/QPI port number |
before | CPU counter state before the experiment |
after | CPU counter state after the experiment |
References pcm::getXPICounter().
Referenced by pcm::getQPIClocks(), pcm::getQPIL0pTxCycles(), pcm::getQPIL1Cycles(), and pcm::getXPICounter().