RFR (S): 7080389: G1: refactor marking code in evacuation pause copy closures
John Cuthbertson
john.cuthbertson at oracle.com
Thu Aug 18 18:17:59 UTC 2011
Hi Everyone,
Can I have a couple of volunteers review these refactoring changes to
the marking code used during evacuation pauses (both initial mark pauses
and regular evacuation pauses when marking is active) - the change can
be found at http://cr.openjdk.java.net/~johnc/7080389/webrev.0/.
The refactoring changes fix an issue that was seen with the code changes
for 6486945.
During an initial mark pause, during root scanning, one thread had
successfully forwarded an object and had started to copy it. While the
object was being copied to its new location, another thread saw that the
object had been forwarded and, after checking that the new location was
unmarked, successfully marked the new location. The first thread would
finish the copying, see that the new location was marked and skip the
mark. The situation I ran into was that I was attempting to obtain the
size of the new object just after it was marked (by the thread doing the
marking) and the old object had not yet been fully copied to its new
location.
With these refactoring changes, the thread that successfully forwards an
object in the collection set will mark the forwardee after copying -
allowing me to safely obtain it's size.
Testing: several runs of the GC test suite with a marking threshold of
10 and 20%, Kitchensink, and jprt.
Thanks,
JohnC
More information about the hotspot-gc-dev
mailing list