RFR: 8268458: Add verification type for evacuation failures

Thomas Schatzl tschatzl at openjdk.java.net
Mon Jun 14 13:00:12 UTC 2021


On Fri, 11 Jun 2021 12:23:30 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

> Hi all,
> 
>   can I have reviews for this change that adds a new verification type (argument for `-XX:VerifyGCType` for G1) that only enables verification after an evacuation failure?
> 
> The reasons is that time and time again we have issues with evacuation failure as it's by far not tested as much as regular collection, and reproducing issues then is often hampered by that there is no way to just verify after verification failure. Enabling it just for all young collections is possible, but typically does not help much.
> 
> Fwiw, this change requires a small semantics change in how the current `VerifyGCType` is compared to the one stored as active (i.e. in `G1HeapVerifier::_enabled_verification_types`). Since the situations that can be enabled are not distinct any more (any young gc can have an evacuation failure), the existing check for a given set bit in `G1HeapVerifier::should_verify()` does not work any more.
> 
> This also means that the previous assumption that `G1VerifyType::G1VerifyAll` is not the same as all flags enabled can not be checked any more. I do not think this is any loss in functionality (see the gtests for removed checks).
> 
> The same functionality could also have been implemented by injecting all of the young gen type bits into the existing `type` on evacuation failure at the cost of remembering that the user selected evacuation failures for evacuation somewhere else. Not sure if that would be simpler. 
> 
> Testing: tier1-2 (still running), updated test
> 
> Thanks,
>   Thomas

This change helped a lot with JDK-8267073.

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

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


More information about the hotspot-gc-dev mailing list