RFR(xs): 8152120: TLAB compute_size() should not allow any size larger than max_size

Stefan Johansson stefan.johansson at oracle.com
Fri Mar 18 09:30:17 UTC 2016


Hi Sangheon,

On 2016-03-18 06:50, sangheon wrote:
> Hi all,
>
> Could I have a couple of reviews for this change to limit new TLAB size?
>
> ThreadLocalAllocBuffer::compute_size() usually returns a value of 
> 'desired_size() + aligned object size'.
> When ThreadLocalAllocBuffer::desired_size() reaches to the TLAB max 
> size, we don't limit this value to be less than or equal to TLAB max 
> size.
>
> This change is proposing to limit to ThreadLocalAllocBuffer::max_size().
>
> CR: https://bugs.openjdk.java.net/browse/JDK-8152120
> Webrev: http://cr.openjdk.java.net/~sangheki/8152120/webrev.00
Looks good, but there is a MIN3() function that you could use if you like.

Just out of curiosity, is this something you have seen a lot and if so 
for which collectors?

Thanks,
Stefan

> Testing: JPRT
>
> Thanks,
> Sangheon



More information about the hotspot-gc-dev mailing list