RFR: 8258255: Move PtrQueue active flag to SATBMarkQueue
Thomas Schatzl
tschatzl at openjdk.java.net
Thu Dec 17 15:11:58 UTC 2020
On Thu, 17 Dec 2020 13:17:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to the PtrQueue hierarchy, moving the support for
> "active" queues and qset to SATBMarkQueue[Set], which is the only user of
> this feature. Other classes derived from PtrQueue[Set] currently work
> around or ignore this feature. This change removes it from consideration
> entirely for those other classes.
>
> Testing:
> mach5 tier1
> local (linux-x64) hotspot:tier1 with -XX:+UseShenandoahGC
>
> In the process of doing this refactoring I noticed that some of the
> vmStructs support around PtrQueue[Set] didn't get moved from G1 to shared,
> and the G1 parts are incomplete. Filed JDK-8258581 to address that.
Apart from that request with the comment, lgtm.
src/hotspot/share/gc/shared/satbMarkQueue.hpp line 106:
> 104: size_t _process_completed_buffers_threshold;
> 105: size_t _buffer_enqueue_threshold;
> 106: // SATB is only active during marking. Enqueuing is not done when inactive.
I would prefer to avoid the double-negation in the second sentence.
src/hotspot/share/gc/shared/satbMarkQueue.hpp line 155:
> 153: // When active, add obj to queue by calling enqueue_known_active.
> 154: void enqueue(SATBMarkQueue& queue, oop obj) {
> 155: if (queue.is_active()) enqueue_known_active(queue, obj);
Maybe something for a different CR and probably pre-existing: `enqueue()` in some contexts is already called with `queue.is_active() == true`. I.e. this check is superfluous, particularly when called for object arrays.
-------------
Marked as reviewed by tschatzl (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1820
More information about the hotspot-gc-dev
mailing list