[9] RFR (M): 8086053: Address inconsistencies regarding ZeroTLAB

Zoltán Majó zoltan.majo at oracle.com
Mon Jan 11 13:11:03 UTC 2016

Hi Tobias,

On 01/11/2016 09:48 AM, Tobias Hartmann wrote:
> Hi Zoltan,
> looks good to me.

thank you for the feedback!

> Do you think it would make sense to add a regression test running with flag combinations like -XX:-UseTLAB and -XX:+ZeroTLAB to catch the missing initialization?

Yes, that is a good idea. I added a test that launches the VM with all 
flag combinations and also with different GCs. I did the same what the 
test does to reproduce the original failure.

Here is the updated webrev:

The newly added test passes on all supported platforms.

Thank you and best regards,


> Best,
> Tobias
> On 08.01.2016 12:06, Zoltán Majó wrote:
>> Hi,
>> please review the patch for 8086053.
>> https://bugs.openjdk.java.net/browse/JDK-8086053
>> Problem: With ZeroTLAB enabled, the GC is supposed to zero-fill newly allocated TLAB regions. With ZeroTLAB disabled, the interpreter and compiled code should assume the responsibility to zero-fill newly allocated regions.
>> Currently, the handling of the ZeroTLAB flag shows some inconsistencies between the GC and the compilers. These inconsistencies lead to newly allocated regions not being filled with zeros.
>> Solution: Address the following:
>> - With -XX:+FastTLABRefill, C1-compiled code refills the TLAB without notifying the GC. As a result, the newly allocated TLAB is not initialized with zero. Add TLAB initialization code to C1.
>> - With -XX:+ZeroTLAB, the C2 compiler skips zero-initialization of newly allocated objects/arrays even if TLAB allocation is disabled. Add stricter conditions to C2 on when to skip filling objects/arrays with zero.
>> Webrev:
>> http://cr.openjdk.java.net/~zmajo/8086053/webrev.00/
>> Testing:
>> - local testing (linux_x86_64) of failing test case with -XX:+UseG1GC and -XX:+UseSerialGC;
>> - JPRT;
>> - all hotspot tests on all platforms affected by the change using all combinations of +/-UseTLAB and +/-ZeroTLAB.
>> Thank you and best regards,
>> Zoltan

More information about the hotspot-compiler-dev mailing list