< prev index next >
src/hotspot/share/runtime/perfData.hpp
Print this page
rev 55659 : 8225776: Branch profiling for G1's write post-barrier in C2.
@@ -25,10 +25,11 @@
#ifndef SHARE_RUNTIME_PERFDATA_HPP
#define SHARE_RUNTIME_PERFDATA_HPP
#include "memory/allocation.hpp"
#include "runtime/perfMemory.hpp"
+#include "runtime/atomic.hpp"
#include "runtime/timer.hpp"
template <typename T> class GrowableArray;
/* jvmstat global and subsystem counter name space - enumeration value
@@ -424,12 +425,14 @@
void sample();
public:
inline void inc() { (*(jlong*)_valuep)++; }
inline void inc(jlong val) { (*(jlong*)_valuep) += val; }
+ inline void atomic_inc() { Atomic::inc((jlong*)_valuep); }
inline void dec(jlong val) { inc(-val); }
inline void add(jlong val) { (*(jlong*)_valuep) += val; }
+ inline void atomic_add(jlong val) { Atomic::add(val, (jlong*)_valuep); }
void clear_sample_helper() { _sample_helper = NULL; }
};
/*
* The PerfLongCounter class, and its alias PerfCounter, implement
< prev index next >