src/hotspot/share/gc/g1/g1EvacStats.inline.hpp
changeset 59249 29b0d0b61615
parent 53244 9807daeb47c4
equal deleted inserted replaced
59248:e92153ed8bdc 59249:29b0d0b61615
    27 
    27 
    28 #include "gc/g1/g1EvacStats.hpp"
    28 #include "gc/g1/g1EvacStats.hpp"
    29 #include "runtime/atomic.hpp"
    29 #include "runtime/atomic.hpp"
    30 
    30 
    31 inline void G1EvacStats::add_direct_allocated(size_t value) {
    31 inline void G1EvacStats::add_direct_allocated(size_t value) {
    32   Atomic::add(value, &_direct_allocated);
    32   Atomic::add(&_direct_allocated, value);
    33 }
    33 }
    34 
    34 
    35 inline void G1EvacStats::add_region_end_waste(size_t value) {
    35 inline void G1EvacStats::add_region_end_waste(size_t value) {
    36   Atomic::add(value, &_region_end_waste);
    36   Atomic::add(&_region_end_waste, value);
    37   Atomic::inc(&_regions_filled);
    37   Atomic::inc(&_regions_filled);
    38 }
    38 }
    39 
    39 
    40 inline void G1EvacStats::add_failure_used_and_waste(size_t used, size_t waste) {
    40 inline void G1EvacStats::add_failure_used_and_waste(size_t used, size_t waste) {
    41   Atomic::add(used, &_failure_used);
    41   Atomic::add(&_failure_used, used);
    42   Atomic::add(waste, &_failure_waste);
    42   Atomic::add(&_failure_waste, waste);
    43 }
    43 }
    44 
    44 
    45 #endif // SHARE_GC_G1_G1EVACSTATS_INLINE_HPP
    45 #endif // SHARE_GC_G1_G1EVACSTATS_INLINE_HPP