RFR: 8224167: Refactor PtrQueue completed buffer processing
Kim Barrett
kim.barrett at oracle.com
Mon May 20 21:15:38 UTC 2019
Please review this change to how PtrQueue handles completed (full)
buffers. The code has been refactored to have a new virtual function
(handle_completed_buffer) that is applicable to and implemented by all
derived classes. This replaces a pair of virtual functions that were
each only relevant to one derived class (should_enqueue_buffer and
mut_process_buffer). This allowed some configuration parameters that
were only applicable to G1 dirty card handling to be moved from
PtrQueueSet to G1DirtyCardQueueSet.
Some related cleanup work:
PtrQueue::set_capacity has been removed. The one place it was being
called instead inlines the relevant code and comments it as the
bootstrapping kludge that it is; see JDK-8221361.
Added some utility functions.
PtrQueueSet::_n_completed_buffers declared volatile, since it has
racy reads outside the lock.
Shenandoah is affected by this refactoring, and has been updated
accordingly, but I've only very lightly tested it.
CR:
https://bugs.openjdk.java.net/browse/JDK-8224167
Webrev:
http://cr.openjdk.java.net/~kbarrett/8224167/open.00/
Testing:
mach5 tier1-5
Local (linux-x64) hs-tier1 with shenandoah included.
More information about the hotspot-gc-dev
mailing list