RFR: 8202994: Add support for undoing last TLAB allocation

Per Liden per.liden at oracle.com
Fri May 11 11:36:05 UTC 2018


This patch adds ThreadLocalAllocBuffer::undo_allocate() to undo the 
allocation made by the last call to ThreadLocalAllocBuffer::allocate().

In ZGC, when a Java thread relocates an object it can use its current 
TLAB for the new object allocation. However, a relocation can later 
fail, if some other thread won the race to update the forwarding 
information. In those cases, the loosing thread wants to undo its last 
TLAB allocation. This is very similar to the existing 
PLAB::undo_allocation(), which does the same thing but for PLABs.

Bug: https://bugs.openjdk.java.net/browse/JDK-8202994
Webrev: http://cr.openjdk.java.net/~pliden/8202994/webrev.0

/Per


More information about the hotspot-gc-dev mailing list