[9] RFR(XS): 8153292: AllocateInstancePrefetchLines>AllocatePrefetchLines can trigger out-of-heap prefetching

Zoltán Majó zoltan.majo at oracle.com
Wed Apr 20 15:01:18 UTC 2016


Hi,


please review the patch for 8153292.

https://bugs.openjdk.java.net/browse/JDK-8153292


Problem: To avoid out-of-heap accesses by instructions prefetching data, 
TLABs have a reserved area. The size of that area is supposed to be 
large enough to accommodate possible prefetching.

The amount of prefetched data is controlled separately for instance and 
array allocations (by the AllocateInstancePrefetchLines and 
AllocatePrefetchLines flags). The size of the reserved area in the TLAB 
is, however, determined only based on AllocatePrefetchLines. As a 
result, AllocateInstancePrefetchLines > AllocatePrefetchLines can 
trigger out-of-heap memory accesses.


Solution: Set the size of the reserved TLAB area to the MAX of both flags.

Webrev:
http://cr.openjdk.java.net/~zmajo/8153292/webrev.00/

Testing:
- JPRT;
- local testing on a solaris_sparc machine.

Thank you!

Best regards,


Zoltan



More information about the hotspot-compiler-dev mailing list