RFR: 8210753: Make ThreadLocalAllocBuffer::resize() public
jcbeyler at google.com
Fri Sep 14 15:12:48 UTC 2018
I noticed when working on this code that I always disliked the resize
method naming: really what it is doing is calculating the next size for a
given TLAB to be done when the tlab is full. I don't think we'd
automatically want to rename the resize method but it is only called once
currently so changing its name could be done here easily and any reader
would understand that tlab.resize() does not resize; it merely calculates
the next size.
Were you to consider it, I think calculate_next_size would seem to be more
appropriate (and we could remove the comment in the first line of the
method since now it is redundant with the name of the method).
Anyway, whatever you do decide, it looks good to me (not a reviewer though),
On Fri, Sep 14, 2018 at 4:53 AM Per Liden <per.liden at oracle.com> wrote:
> Thanks Erik!
> On 09/14/2018 01:47 PM, Per Liden wrote:
> > Make ThreadLocalAllocBuffer::resize() public to allow a GC to resize
> > TLABs in parallel. With resize() public I propose that we remove
> > ThreadLocalAllocBuffer::resize_all_tlabs() and let
> > CollectedHeap::resize_all_tlabs() iterate over the threads, just like
> > CollectedHeap::ensure_parsability() does.
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8210753
> > Webrev: http://cr.openjdk.java.net/~pliden/8210753/webrev.0
> > /Per
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev