--- old/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-07-23 16:59:06.330679763 +0200 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2020-07-23 16:59:06.206677872 +0200 @@ -159,6 +159,8 @@ WorkGang* _workers; G1CardTable* _card_table; + Ticks _collection_pause_end; + SoftRefPolicy _soft_ref_policy; static size_t _humongous_object_threshold_in_words; @@ -644,7 +646,9 @@ // the G1OldGCCount_lock in case a Java thread is waiting for a full // GC to happen (e.g., it called System.gc() with // +ExplicitGCInvokesConcurrent). - void increment_old_marking_cycles_completed(bool concurrent); + // liveness_completed should indicate that during that old marking + // cycle the whole heap has actually been examined for live objects. + void increment_old_marking_cycles_completed(bool concurrent, bool liveness_completed); uint old_marking_cycles_completed() { return _old_marking_cycles_completed; @@ -1288,8 +1292,7 @@ // Return the size of reserved memory. Returns different value than max_capacity() when AllocateOldGenAt is used. virtual size_t max_reserved_capacity() const; - virtual jlong millis_since_last_gc(); - + Tickspan time_since_last_collection() const { return Ticks::now() - _collection_pause_end; } // Convenience function to be used in situations where the heap type can be // asserted to be this type.