Processor Counter Monitor
Classes | Macros | Functions | Variables
pcm-tsx.cpp File Reference

Example of using CPU counters: implements a performance counter monitoring utility for Intel Transactional Synchronization Extensions. 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 "cpucounters.h"
#include "utils.h"
#include <vector>
Include dependency graph for pcm-tsx.cpp:

Classes

struct  TSXEvent
 

Macros

#define PCM_DELAY_DEFAULT   1.0
 
#define PCM_DELAY_MIN   0.015
 
#define TX_CYCLES_POS   (1)
 
#define TX_CYCLES_COMMITED_POS   (2)
 
#define N_HLE_POS   (3)
 
#define N_RTM_POS   (0)
 

Functions

void print_usage (const string &progname)
 
template<class StateType >
void print_basic_stats (const StateType &BeforeState, const StateType &AfterState, bool csv)
 
template<class StateType >
void print_custom_stats (const StateType &BeforeState, const StateType &AfterState, bool csv)
 
int findEvent (const char *name)
 
int main (int argc, char *argv[])
 

Variables

vector< TSXEventeventDefinition
 
const vector< TSXEventsklEventDefinition
 
const vector< TSXEventiclEventDefinition
 
bool supportNHLECountBasicStat = true
 
std::vector< int > events
 

Detailed Description

Example of using CPU counters: implements a performance counter monitoring utility for Intel Transactional Synchronization Extensions.