# HG changeset patch # User tschatzl # Date 1524070832 -7200 # Node ID 3cdebcdc8ec0c73b9583f1f1860fedddf4e765f4 # Parent e57e6addb97880cc8c338ed20a5ed77e5aaeb790 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 diff -r e57e6addb978 -r 3cdebcdc8ec0 src/hotspot/share/gc/g1/g1ConcurrentMark.cpp --- 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; } diff -r e57e6addb978 -r 3cdebcdc8ec0 src/hotspot/share/gc/g1/g1_globals.hpp --- 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) \