From 496521924f18d186148e1507b74b9ede231dda3b Mon Sep 17 00:00:00 2001 From: Stefan Johansson Date: Mon, 7 Sep 2020 14:59:46 +0200 Subject: [PATCH 1/2] 8252868: Clean up unused function from G1MMUTracker --- src/hotspot/share/gc/g1/g1MMUTracker.hpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1MMUTracker.hpp b/src/hotspot/share/gc/g1/g1MMUTracker.hpp index 96c3ec5817294..cf35f15dd8784 100644 --- a/src/hotspot/share/gc/g1/g1MMUTracker.hpp +++ b/src/hotspot/share/gc/g1/g1MMUTracker.hpp @@ -62,23 +62,9 @@ class G1MMUTracker: public CHeapObj { return _max_gc_time; } - inline bool now_max_gc(double current_time) { - return when_sec(current_time, max_gc_time()) < 0.00001; - } - inline double when_max_gc_sec(double current_time) { return when_sec(current_time, max_gc_time()); } - - inline jlong when_max_gc_ms(double current_time) { - double when = when_max_gc_sec(current_time); - return (jlong) (when * 1000.0); - } - - inline jlong when_ms(double current_time, double pause_time) { - double when = when_sec(current_time, pause_time); - return (jlong) (when * 1000.0); - } }; class G1MMUTrackerQueueElem { From 30c937e52975ecb2585b9a13c838115e5f683070 Mon Sep 17 00:00:00 2001 From: Stefan Johansson Date: Mon, 7 Sep 2020 16:01:45 +0200 Subject: [PATCH 2/2] Updated comment --- src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp index d297af36b0705..a9e88ac4b90ac 100644 --- a/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp +++ b/src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp @@ -80,7 +80,7 @@ class CMCleanup : public VoidClosure { double G1ConcurrentMarkThread::mmu_delay_end(G1Policy* g1_policy, bool remark) { // There are 3 reasons to use SuspendibleThreadSetJoiner. // 1. To avoid concurrency problem. - // - G1MMUTracker::add_pause(), when_sec() and its variation(when_ms() etc..) can be called + // - G1MMUTracker::add_pause(), when_sec() and when_max_gc_sec() can be called // concurrently from ConcurrentMarkThread and VMThread. // 2. If currently a gc is running, but it has not yet updated the MMU, // we will not forget to consider that pause in the MMU calculation.