RFR: 8205679: Remove unused ThreadLocalAllocBuffer::undo_allocate()

Per Liden per.liden at oracle.com
Wed Jun 27 08:53:50 UTC 2018


Hi Aleksey,

Thanks for reviewing.

On 06/26/2018 06:09 PM, Aleksey Shipilev wrote:
> On 06/26/2018 12:45 PM, Per Liden wrote:
>> After JDK-8205676, the function ThreadLocalAllocBuffer::undo_allocate() is unused and can be removed.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8205679
>> Webrev: http://cr.openjdk.java.net/~pliden/8205679/webrev.0
> 
> The patch looks good, but the method itself looks generic enough to keep around. At some point,
> Shenandoah may switch to using this instead of PLABs.

We typically don't leave unused code around (as it tends to rot 
quickly), unless we know it will be used in the near/mid-term future. 
So, I guess the question is, are you already using this in the 
shanandoah repo, or will soon-ish? [1] If not I'd prefer to remove it. 
The hg history will preserve it, so it's trivial to bring it back if you 
find that you really do needed it in the future.

cheers,
Per

[1] Btw, if you do, will you not also have potentially bad interactions 
with the JEP 331: Low-Overhead Heap Profiling, which is the reason ZGC 
isn't using the TLAB anymore?



More information about the hotspot-gc-dev mailing list