RFR: 8276721: G1: Refine G1EvacFailureObjectsSet::iterate

Hamlin Li mli at openjdk.java.net
Tue Nov 9 03:54:46 UTC 2021


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.

-------------

Commit messages:
 - Refine code
 - Initial commit

Changes: https://git.openjdk.java.net/jdk/pull/6303/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6303&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8276721
  Stats: 130 lines in 5 files changed: 69 ins; 24 del; 37 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6303.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6303/head:pull/6303

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



More information about the hotspot-gc-dev mailing list