RFR: 8371131: Cleanup Thread parameter in CollectedHeap TLAB methods
Joel Sikström
jsikstro at openjdk.org
Mon Nov 3 09:57:39 UTC 2025
On Mon, 3 Nov 2025 09:49:02 GMT, Joel Sikström <jsikstro at openjdk.org> wrote:
> Hello,
>
> The last usage of the the Thread parameter that is passed to `CollectedHeap::{tlab_capacity, tlab_used, unsafe_max_tlab_alloc}` was removed in [JDK-8370345](https://bugs.openjdk.org/browse/JDK-8370345). Following this we should remove the Thread parameter completely from CollectedHeap and all GCs that derive from it.
>
> Testing:
> * Running through tier1-2
src/hotspot/share/gc/shared/threadLocalAllocBuffer.inline.hpp line 57:
> 55: // Compute the size for the new TLAB.
> 56: // The "last" tlab may be smaller to reduce fragmentation.
> 57: // unsafe_max_tlab_alloc is just a hint.
I suggest we remove this comment as it is misleading since not all GCs take the `available_size` calculated here as a hint, but an unconditional size.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28107#discussion_r2485894298
More information about the hotspot-gc-dev
mailing list