Integrated: 8302760: Improve liveness/remembered set verification for G1
Thomas Schatzl
tschatzl at openjdk.org
Wed Feb 22 16:15:41 UTC 2023
On Mon, 20 Feb 2023 12:48:25 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this refactoring/cleanup of the liveness/remembered set verification code for G1?
>
> Here is an overview of the changes
> - previously liveness and remembered set verification could be done separately. Thismade the code a bit more complicated than necessary; now that remembered set verification always follows liveness verification, the code can assume that and do some minor cleanup. I kept the remembered verification a separate closure (`VerifyRemSetClosure`) because the additional boiler plate code is negligible compared to the other duplication that would have been needed around failure count tracking.
> - factored out liveness and remembered set verification from `HeapRegion::verify`, and heavily cleaned up the resulting `HeapRegion::verify_liveness_and_remembered_set`. This includes some removal of code duplication wrt to the failure count tracking.
> - factored out a special `G1VerificationClosure::is_oop_safe` method that adds more checking of the `Klass`; I hesitated to put this into `Universe::is_oop` as this is much more extensive checking (and I wanted implicit error reporting :))
> - CollectedHeap::is_oop() should use `klass_raw` because otherwise it will immediately assert on oops with garbage Klass values (the new code will just return `false` as expected).
> - some special `oopDesc::print_name_on()` which does not crash on bad oops, similar to existing related debugging helpers.
>
> Thanks,
> Thomas
This pull request has now been integrated.
Changeset: 5d7e7e28
Author: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/5d7e7e28b1d96b3bf387104f6c98da022aed76d5
Stats: 340 lines in 9 files changed: 120 ins; 151 del; 69 mod
8302760: Improve liveness/remembered set verification for G1
Reviewed-by: kbarrett, iwalulya
-------------
PR: https://git.openjdk.org/jdk/pull/12660
More information about the hotspot-gc-dev
mailing list