Processor Counter Monitor
|
Example of using CPU counters: implements a performance counter monitoring utility for Intel Core, Offcore events. More...
#include <iostream>
#include <unistd.h>
#include <signal.h>
#include <sys/time.h>
#include <math.h>
#include <iomanip>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <assert.h>
#include <bitset>
#include "cpucounters.h"
#include "utils.h"
#include <vector>
Classes | |
struct | CoreEvent |
Macros | |
#define | HACK_TO_REMOVE_DUPLICATE_ERROR |
#define | PCM_DELAY_DEFAULT 1.0 |
#define | PCM_DELAY_MIN 0.015 |
#define | PCM_CALIBRATION_INTERVAL 50 |
#define | MAX_CORES 4096 |
#define | EVENT_SIZE 256 |
Functions | |
void | build_event (const char *argv, EventSelectRegister *reg, int idx) |
int | pcm_c_build_core_event (uint8_t idx, const char *argv) |
int | pcm_c_init () |
void | pcm_c_start () |
void | pcm_c_stop () |
uint64_t | pcm_c_get_cycles (uint32_t core_id) |
uint64_t | pcm_c_get_instr (uint32_t core_id) |
uint64_t | pcm_c_get_core_event (uint32_t core_id, uint32_t event_id) |
void | print_usage (const string progname) |
template<class StateType > | |
void | print_custom_stats (const StateType &BeforeState, const StateType &AfterState, bool csv, uint64 txn_rate) |
bool | match (const char *subtoken, const char *name, int *result) |
int | main (int argc, char *argv[]) |
Variables | |
struct CoreEvent | events [4] |
SystemCounterState | SysBeforeState |
SystemCounterState | SysAfterState |
std::vector< CoreCounterState > | BeforeState |
std::vector< CoreCounterState > | AfterState |
std::vector< SocketCounterState > | DummySocketStates |
EventSelectRegister | regs [PERF_MAX_COUNTERS] |
PCM::ExtendedCustomCoreEventDescription | conf |
Example of using CPU counters: implements a performance counter monitoring utility for Intel Core, Offcore events.