RFR: 8329858: G1: Make G1VerifyLiveAndRemSetClosure stateless [v2]

Stefan Karlsson stefank at openjdk.org
Tue Apr 9 06:56:20 UTC 2024


> In [JDK-8329570](https://bugs.openjdk.org/browse/JDK-8329570): 'G1: Excessive is_obj_dead_cond calls in verification' we moved the verification of the containing object so that it was done only once. We left the repeated null-check because of concerns that moving it would introduce the risk that someone in the future would miss calling `set_containing_obj` or calling it with a null object.
> 
> I propose that we restructure the code to make the closure's state const and remove the set_containing_obj function so that we can feel confident that we don't hit such a bug in the future.
> 
> The patch also combines the failures from verification of the oops with failures from checking the containing objects. I had a version that kept these two separate, but I don't see why we would want that. Tell me if you'd want me to reintroduce this separation.

Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:

  Review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/18677/files
  - new: https://git.openjdk.org/jdk/pull/18677/files/2a009216..d18d240c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18677&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18677&range=00-01

  Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18677.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18677/head:pull/18677

PR: https://git.openjdk.org/jdk/pull/18677


More information about the hotspot-gc-dev mailing list