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

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jan 11 08:48:40 UTC 2016


Hi Zoltan,

looks good to me. 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?

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