G1 allows explicit remembered set verification via -XX:+VerifyRememberedSets without verifying anything else.
This functionality should be dropped because
- verification via VerifyBefore/During/AfterGC does the same verification as well
- the far longest part of VerifyBefore/During/AfterGC is remembered set/object verification (you can't really do remembered set verification without object verification)
- also, since you can't really do remembered set verification without object verification, this is just duplicate work (and code)
- for VerifyBefore/During/AfterGC we have quite extensive ways to do that verification only in certain situations
- explicit remembered set verification is single threaded, while others is multi-threaded, so much slower then the latter anyway
- due to this split, the code sharing makes the verification code somewhat unclear
Given all that I suggest to remove the explicit remembered set verification there.
This functionality should be dropped because
- verification via VerifyBefore/During/AfterGC does the same verification as well
- the far longest part of VerifyBefore/During/AfterGC is remembered set/object verification (you can't really do remembered set verification without object verification)
- also, since you can't really do remembered set verification without object verification, this is just duplicate work (and code)
- for VerifyBefore/During/AfterGC we have quite extensive ways to do that verification only in certain situations
- explicit remembered set verification is single threaded, while others is multi-threaded, so much slower then the latter anyway
- due to this split, the code sharing makes the verification code somewhat unclear
Given all that I suggest to remove the explicit remembered set verification there.