< prev index next >

src/hotspot/share/gc/g1/g1EdenRegions.hpp

Print this page
rev 55209 : imported patch 8220089.webrev.1
rev 55212 : imported patch 8220089.webrev.4

*** 37,58 **** volatile size_t _used_bytes; public: G1EdenRegions() : _length(0), _used_bytes(0) { } void add(HeapRegion* hr) { assert(!hr->is_eden(), "should not already be set"); _length++; } ! void clear() { _length = 0; _used_bytes = 0; } uint length() const { return _length; } size_t used_bytes() const { return _used_bytes; } ! void add_used_bytes(size_t used_bytes) { _used_bytes += used_bytes; } }; #endif // SHARE_GC_G1_G1EDENREGIONS_HPP --- 37,67 ---- volatile size_t _used_bytes; public: G1EdenRegions() : _length(0), _used_bytes(0) { } + // Called when a heap region is added to eden region. void add(HeapRegion* hr) { assert(!hr->is_eden(), "should not already be set"); _length++; } ! void clear() { ! _length = 0; ! _used_bytes = 0; ! } + // Returns actual number of heap regions tagged as eden. + // I.e. retained heap region is also included. uint length() const { return _length; } + // Sum of used bytes of all eden regions except used bytes of a retained region. size_t used_bytes() const { return _used_bytes; } ! // Called when the mutator region retires. ! // Exclude used bytes of a retained region. ! void add_used_bytes(HeapRegion* alloc_region, size_t used_bytes) { _used_bytes += used_bytes; } }; #endif // SHARE_GC_G1_G1EDENREGIONS_HPP
< prev index next >