RFR: 6899049: G1: Clean up code in ptrQueue.[ch]pp and ptrQueue.inline.hpp
Kim Barrett
kim.barrett at oracle.com
Sat Oct 31 00:04:44 UTC 2015
Please review this cleanup of various issues in ptrQueue and related
classes, e.g. ObjPtrQueue, DirtyCardQueue, and the associated XxxSet
classes. This is in preparation for some structural improvements.
Remove unused DirtyCardQueue::set_buf() and PtrQueue::index_to_byte_index().
Renamed PtrQueue::_perm to _permanent, to match reader function.
Changed iteration over PtrQueue buffer to use element indexing rather
than bytes converted to elements on each iteration. For SATB buffer
filtering, directly use pointer-based iteration.
Fixed index types for byte_index_to_index to be size_t rather than
int, eliminating the need for a bunch of conversion casts.
In PtrQueue, use sizeof(void*) rather than oopSize for byte
adjustments. This class shouldn't know anything about oops.
More restrictive access to various members, including non-public
constructor and destructor for PtrQueue and PtrQueueSet base classes.
In queue constructors, fixed type of associated set to match the queue
type, e.g. DirtyCardQueue requires a DirtyCardQueueSet rather than
just any old PtrQueueSet.
debug_only => DEBUG_ONLY.
CR:
https://bugs.openjdk.java.net/browse/JDK-6899049
Webrev:
http://cr.openjdk.java.net/~kbarrett/6899049/webrev.00/
Testing:
JPRT, Aurora ad hoc GC/Runtime Nightly
More information about the hotspot-gc-dev
mailing list