RFR: 8377179: Improve and document racy use of start/end in ThreadLocalAllocBuffer
Ivan Walulya
iwalulya at openjdk.org
Thu Feb 5 14:40:48 UTC 2026
On Thu, 5 Feb 2026 13:22:08 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Hi all,
>>
>> please review this change that tries to document and streamline the racy use of `ThreadLocalAllocBuffer` internals.
>>
>> Testing: gha
>>
>> Thanks,
>> Thomas
>
> src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp line 127:
>
>> 125: // bytes), and may just incorrectly return 0.
>> 126: // Intented fo external inspection only where accuracy is not 100% required.
>> 127: size_t cooked_used_bytes() const;
>
> Since the doc uses `estimate`, I'd suggest `estimated_used_bytes` as the name.
I agree, `cooked_` might be misunderstood
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29573#discussion_r2769510581
More information about the hotspot-dev
mailing list