Example of using CPU counters: implements a performance counter monitoring utility with raw events interface.
More...
|
void | print_usage (const string &progname) |
|
PCM::RawEventConfig | initCoreConfig () |
|
void | printEvent (const std::string &pmuName, const bool fixed, const PCM::RawEventConfig &config) |
|
void | lowerCase (std::string &str) |
|
bool | addEvent (PCM::RawPMUConfigs &curPMUConfigs, string eventStr) |
|
bool | addEvents (std::vector< PCM::RawPMUConfigs > &PMUConfigs, string fn) |
|
int | getPrintOffsetIdx (const std::string &value) |
|
void | printNewLine (const CsvOutputType outputType) |
|
void | printRowBeginCSV (const std::string &EventName, const CoreCounterState &BeforeState, const CoreCounterState &AfterState, PCM *m) |
|
void | printRowBeginJson (const std::string &EventName, const CoreCounterState &BeforeState, const CoreCounterState &AfterState, PCM *m) |
|
void | printRowBegin (const std::string &EventName, const CoreCounterState &BeforeState, const CoreCounterState &AfterState, PCM *m, const CsvOutputType outputType, PrintOffset &printOffset) |
|
template<class MetricFunc > |
void | printRow (const std::string &EventName, MetricFunc metricFunc, const std::vector< CoreCounterState > &BeforeState, const std::vector< CoreCounterState > &AfterState, PCM *m, const CsvOutputType outputType, PrintOffset &printOffset) |
|
uint64 | nullFixedMetricFunc (const uint32, const ServerUncoreCounterState &, const ServerUncoreCounterState &) |
|
std::string | getMSREventString (const uint64 &index, const std::string &type, const PCM::MSRType &msrType) |
|
void | printTransposed (const PCM::RawPMUConfigs &curPMUConfigs, PCM *m, vector< CoreCounterState > &BeforeState, vector< CoreCounterState > &AfterState, vector< ServerUncoreCounterState > &BeforeUncoreState, vector< ServerUncoreCounterState > &AfterUncoreState, vector< SocketCounterState > &BeforeSocketState, vector< SocketCounterState > &AfterSocketState, const CsvOutputType outputType, const bool &isLastGroup) |
|
void | print (const PCM::RawPMUConfigs &curPMUConfigs, PCM *m, vector< CoreCounterState > &BeforeState, vector< CoreCounterState > &AfterState, vector< ServerUncoreCounterState > &BeforeUncoreState, vector< ServerUncoreCounterState > &AfterUncoreState, vector< SocketCounterState > &BeforeSocketState, vector< SocketCounterState > &AfterSocketState, const CsvOutputType outputType) |
|
void | printAll (const PCM::RawPMUConfigs &curPMUConfigs, PCM *m, vector< CoreCounterState > &BeforeState, vector< CoreCounterState > &AfterState, vector< ServerUncoreCounterState > &BeforeUncoreState, vector< ServerUncoreCounterState > &AfterUncoreState, vector< SocketCounterState > &BeforeSocketState, vector< SocketCounterState > &AfterSocketState, std::vector< PCM::RawPMUConfigs > &PMUConfigs, const bool &isLastGroup) |
|
int | main (int argc, char *argv[]) |
|
|
bool | verbose = false |
|
double | defaultDelay = 1.0 |
|
bool | show_partial_core_output = false |
|
bitset< MAX_CORES > | ycores |
|
bool | flushLine = false |
|
bool | transpose = false |
|
bool | extendPrintout = false |
|
bool | singleHeader = false |
|
std::string | separator = "," |
|
const std::string | jsonSeparator = "\":" |
|
bool | sampleSeparator = false |
|
bool | outputToJson = false |
|
std::vector< PrintOffset > | printOffsets |
|
std::vector< std::string > | printedBlocks |
|
const char * | fixedCoreEventNames [] = { "InstructionsRetired" , "Cycles", "RefCycles", "TopDownSlots" } |
|
const char * | topdownEventNames [] = { "PERF_METRICS.FRONTEND_BOUND" , "PERF_METRICS.BAD_SPECULATION", "PERF_METRICS.BACKEND_BOUND", "PERF_METRICS.RETIRING" } |
|
constexpr uint32 | PerfMetricsConfig = 2 |
|
constexpr uint64 | PerfMetricsMask = 1ULL |
|
constexpr uint64 | maxPerfMetricsValue = 255ULL |
|
Example of using CPU counters: implements a performance counter monitoring utility with raw events interface.