8201527: Bump default value of G1RefProcDrainInterval
authortschatzl
Wed, 18 Apr 2018 19:00:32 +0200
changeset 49819 3cdebcdc8ec0
parent 49818 e57e6addb978
child 49820 663f5d90f0e8
8201527: Bump default value of G1RefProcDrainInterval Summary: Due to high startup cost of marking, lower the frequency of draining the mark stack generated by reference processing. Reviewed-by: sangheki, sjohanss
src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
src/hotspot/share/gc/g1/g1_globals.hpp
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Wed Apr 18 12:06:53 2018 -0400
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Wed Apr 18 19:00:32 2018 +0200
@@ -1413,14 +1413,13 @@
 class G1CMKeepAliveAndDrainClosure : public OopClosure {
   G1ConcurrentMark* _cm;
   G1CMTask*         _task;
-  int               _ref_counter_limit;
-  int               _ref_counter;
+  uint              _ref_counter_limit;
+  uint              _ref_counter;
   bool              _is_serial;
 public:
   G1CMKeepAliveAndDrainClosure(G1ConcurrentMark* cm, G1CMTask* task, bool is_serial) :
     _cm(cm), _task(task), _is_serial(is_serial),
     _ref_counter_limit(G1RefProcDrainInterval) {
-    assert(_ref_counter_limit > 0, "sanity");
     assert(!_is_serial || _task->worker_id() == 0, "only task 0 for serial code");
     _ref_counter = _ref_counter_limit;
   }
--- a/src/hotspot/share/gc/g1/g1_globals.hpp	Wed Apr 18 12:06:53 2018 -0400
+++ b/src/hotspot/share/gc/g1/g1_globals.hpp	Wed Apr 18 19:00:32 2018 +0200
@@ -74,7 +74,7 @@
           "in milliseconds.")                                               \
           range(1.0, DBL_MAX)                                               \
                                                                             \
-  product(int, G1RefProcDrainInterval, 10,                                  \
+  product(uint, G1RefProcDrainInterval, 1000,                               \
           "The number of discovered reference objects to process before "   \
           "draining concurrent marking work queues.")                       \
           range(1, INT_MAX)                                                 \