RFR: 8276721: G1: Refine G1EvacFailureObjectsSet::iterate [v3]

Thomas Schatzl tschatzl at openjdk.java.net
Tue Nov 9 10:24:35 UTC 2021

On Tue, 9 Nov 2021 10:13:01 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Currently, G1EvacFailureObjectsSet::iterate(ObjectClosure* closure) is not a const method, but it looks like a const method. It will be a surprise for reader, i.e. you would not expect that an iteration method is destructive, clearing out the set it just iterated over.
>> We should refine it in some way.
> Hamlin Li has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR.

Lgtm apart from the one comment about the comment.

src/hotspot/share/gc/g1/g1EvacFailureObjectsSet.hpp line 77:

> 75:   // Apply the given ObjectClosure to all objects that failed evacuation. Objects
> 76:   // are passed in increasing address order.
> 77:   void process_and_drop(ObjectClosure* closure);

The comment needs some update, something like: "Apply the given ObjectClosure to all objects that failed evacuation and empties the list after processing. Objects are passed in increasing address order."


Marked as reviewed by tschatzl (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6303

More information about the hotspot-gc-dev mailing list