38 #ifndef PERF_COUNTER_H
39 #define PERF_COUNTER_H
43 #include <unordered_map>
45 #ifdef THREADSAFE_COUNTER
48 #endif // THREADSAFE_COUNTER
67 #ifdef THREADSAFE_COUNTER
70 #endif // THREADSAFE_COUNTER
102 (*this)[
"accesses"] =
ACCESS;
103 (*this)[
"numa_transfers"] =
NUMA;
104 (*this)[
"mpi_transfers"] =
MPI;
105 (*this)[
"file_loads"] =
FILE;
106 (*this)[
"local_hits"] =
HIT;
108 (*this)[
"local_misses"] =
MISS;
130 #ifdef THREADSAFE_COUNTER
131 std::lock_guard<threads::Mutex> lock(
m_mutex[type]);
132 #endif // THREADSAFE_COUNTER
void inc(CounterType type)
static const unsigned int NATIVE_COUNTER_SIZE
static const NameToCounterMap NAME_TO_COUNTER
static CounterType name2type(const char *name)
unsigned long m_counter[NATIVE_COUNTER_SIZE]
threads::Mutex m_mutex[NATIVE_COUNTER_SIZE]