RFR: JDK-8145442: Add an option to verify remembered sets for G1

Mikael Gerdin mikael.gerdin at oracle.com
Mon Dec 21 14:11:18 UTC 2015


Hi Poonam,

On 2015-12-15 22:32, Poonam Bajaj Parhar wrote:
> Hello,
>
> Please review these changes that add a diagnostic VM option
> 'G1VerifyRSetsAfterEvacuationPause' that when turned on enables the
> verification of Rem Sets of heap regions.
>
> Bug: JDK-8145442: Add an option to verify remembered sets for G1
> Webrev: http://cr.openjdk.java.net/~poonam/8145442/webrev.00/

I have some general comments on the structure of the code:

First of all, I would prefer if we could avoid adding yet another 
command line flag.
I think it would be preferable to either use VerifyRememberedSets which 
already exists or to use the code you've proposed adding under 8072725 
with a "remset" verification subset (and deprecating VerifyRememberedSets).

Having RSet verification only post-gc and not before does not appeal to 
me, since it's quite possible that we can have missing write barriers in 
compiled code leading to missing remembered set entries as well.

Folding this into the VerifyBefore/After code would allow users to select
-XX:+VerifyAfterGC -XX:VerifySubSet=remset
to get the behavior you are suggesting in this webrev.


I like Jon's suggestion of moving all the remset verification to a 
VerifyRemSetClosure which can be aggregated in the VerifyLiveClosure if 
full verification is enabled.

So, given that I've asked for re-use of the VerifyBefore/After code I 
would suggest some changes in
HeapRegion::verify(VerifyOption vo, bool* failures)
to make the code select either the VerifyLiveClosure or the 
VerifyRemSetClosure depending on the level of verification.

The BOT verification near the end of ::verify could be conditionalized 
on VerifySubSet=bot or something similar.

/Mikael

> Testing: JPRT, GCBasher
>
> Thanks,
> Poonam
>




More information about the hotspot-gc-dev mailing list