G1EvacStats uses atomic operations like:
Atomic::add(&_direct_allocated, value);
This causes the default barriers to be used:
// Returns updated value.
template<typename D, typename I>
inline static D add(D volatile* dest, I add_value,
atomic_memory_order order = memory_order_conservative);
Since these are stats, we can use memory_order_relaxed and get a tiny improvement for gathering stats. (I doubt it would show on benchmarks, this is a paper-cut issue.)
Atomic::add(&_direct_allocated, value);
This causes the default barriers to be used:
// Returns updated value.
template<typename D, typename I>
inline static D add(D volatile* dest, I add_value,
atomic_memory_order order = memory_order_conservative);
Since these are stats, we can use memory_order_relaxed and get a tiny improvement for gathering stats. (I doubt it would show on benchmarks, this is a paper-cut issue.)
- links to
-
Commit(master) openjdk/jdk/2ca136a7
-
Review(master) openjdk/jdk/20529