src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp

changeset 9806
758c07667682
parent 7535
7ae4e26cb1e0
parent 9793
7386b3a385ac
     1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Tue Feb 04 17:38:01 2020 +0800
     1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp	Tue Feb 04 18:13:14 2020 +0800
     1.3 @@ -148,6 +148,9 @@
     1.4    // Used to keep track of limit of sweep for the space
     1.5    HeapWord* _sweep_limit;
     1.6  
     1.7 +  // Stable value of used().
     1.8 +  size_t _used_stable;
     1.9 +
    1.10    // Support for compacting cms
    1.11    HeapWord* cross_threshold(HeapWord* start, HeapWord* end);
    1.12    HeapWord* forward(oop q, size_t size, CompactPoint* cp, HeapWord* compact_top);
    1.13 @@ -343,6 +346,17 @@
    1.14    // which overestimates the region by returning the entire
    1.15    // committed region (this is safe, but inefficient).
    1.16  
    1.17 +  // Returns monotonically increasing stable used space bytes for CMS.
    1.18 +  // This is required for jstat and other memory monitoring tools
    1.19 +  // that might otherwise see inconsistent used space values during a garbage
    1.20 +  // collection, promotion or allocation into compactibleFreeListSpace.
    1.21 +  // The value returned by this function might be smaller than the
    1.22 +  // actual value.
    1.23 +  size_t used_stable() const;
    1.24 +  // Recalculate and cache the current stable used() value. Only to be called
    1.25 +  // in places where we can be sure that the result is stable.
    1.26 +  void recalculate_used_stable();
    1.27 +
    1.28    // Returns a subregion of the space containing all the objects in
    1.29    // the space.
    1.30    MemRegion used_region() const {

mercurial