|
30 | 30 | #include "runtime/atomic.hpp"
|
31 | 31 |
|
32 | 32 | inline void G1EvacStats::add_direct_allocated(size_t value) {
|
33 |
| - Atomic::add(&_direct_allocated, value); |
| 33 | + Atomic::add(&_direct_allocated, value, memory_order_relaxed); |
34 | 34 | }
|
35 | 35 |
|
36 | 36 | inline void G1EvacStats::add_num_plab_filled(size_t value) {
|
37 |
| - Atomic::add(&_num_plab_filled, value); |
| 37 | + Atomic::add(&_num_plab_filled, value, memory_order_relaxed); |
38 | 38 | }
|
39 | 39 |
|
40 | 40 | inline void G1EvacStats::add_num_direct_allocated(size_t value) {
|
41 |
| - Atomic::add(&_num_direct_allocated, value); |
| 41 | + Atomic::add(&_num_direct_allocated, value, memory_order_relaxed); |
42 | 42 | }
|
43 | 43 |
|
44 | 44 | inline void G1EvacStats::add_region_end_waste(size_t value) {
|
45 |
| - Atomic::add(&_region_end_waste, value); |
46 |
| - Atomic::inc(&_regions_filled); |
| 45 | + Atomic::add(&_region_end_waste, value, memory_order_relaxed); |
| 46 | + Atomic::inc(&_regions_filled, memory_order_relaxed); |
47 | 47 | }
|
48 | 48 |
|
49 | 49 | inline void G1EvacStats::add_failure_used_and_waste(size_t used, size_t waste) {
|
50 |
| - Atomic::add(&_failure_used, used); |
51 |
| - Atomic::add(&_failure_waste, waste); |
| 50 | + Atomic::add(&_failure_used, used, memory_order_relaxed); |
| 51 | + Atomic::add(&_failure_waste, waste, memory_order_relaxed); |
52 | 52 | }
|
53 | 53 |
|
54 | 54 | #endif // SHARE_GC_G1_G1EVACSTATS_INLINE_HPP
|
0 commit comments