RFR (S): 8202018: Move card table clear before enqueuing pending references

Thomas Schatzl thomas.schatzl at oracle.com
Thu Apr 19 18:48:06 UTC 2018


Hi all,

  can I have reviews for this small change in preparation of "JDK-
8202017: Merge Reference Enqueuing phase with phase 3 of Reference
processing"?

So to be able to merge reference enqueuing with reference processing,
we need to make sure that the card marks of reference enqueuing are not
overwritten by card table clearing.

Card table clearing wipes data that the previous scan rs and update rs
phases have written to the card table to do duplicate card in
remembered sets detection.
Investigation of the code shows that since both scan rs and update rs
have already finished at the point of reference processing, we can
simply do the card table clearing before reference processing too -
otherwise it would at worst hide an existing bug as only scan rs and
update rs actually add to the list of regions' card tables to clear.

Looking at the code, doing the change, and testing all showed that this
seems fine.

CR:
https://bugs.openjdk.java.net/browse/JDK-8202018
Webrev:
http://cr.openjdk.java.net/~tschatzl/8202018/webrev/
Testing:
hs-tier1-4 with and without VerifyCTCleanup enabled (as it is a develop
flag and would give issues with the product, I temporarily
unconditionally enabled it via code)

Thanks,
  Thomas




More information about the hotspot-gc-dev mailing list