RFR: 8214201: Make PtrQueueSet completed buffer list private

Kim Barrett kim.barrett at oracle.com
Sun Dec 2 06:44:07 UTC 2018


Please review this refactoring of PtrQueueSet and its derivations to
make the data members for the completed buffer list private (rather
than protected), and clean up the associated API.  This also merges
some otherwise nearly duplicated code from DirtyCardQueueSet and
SATBMarkQueueSet into PtrQueueSet.

Moved DirtyCardQueueSet::get_completed_buffer() to PtrQueueSet, and
changed SATBMarkQueueSet to use it too, rather than having its own
inline near copy.  Note that get_completed_buffer clears the
_process_completed_buffers flag when the list becomes empty, as needed
for the SATB case; the DCQS case doesn't care.  Also take care to NULL
out the next field of the returned buffer; currently no code cares,
but in the future we might add asserts when enqueuing or freeing.

Added PtrQueueSet::abandon_completed_buffers().  Changed SATB and DC
queue sets to use it rather than duplicate code.

Made some more naming updates for consistent nomenclature.  We now
consistently use "completed_buffer" rather than "complete_buffer" or
"completed".
- enqueue_complete_buffer() => enqueue_completed_buffer()
- _process_completed => _process_completed_buffers
- set_process_completed() => set_process_completed_buffers()
(Note: Already had process_completed_buffers()).

CR:
https://bugs.openjdk.java.net/browse/JDK-8214201

Webrev:
http://cr.openjdk.java.net/~kbarrett/8214201/open.00/

Testing:
mach5 tier1-5.




More information about the hotspot-gc-dev mailing list