RFR: 8377442: More fixes to ThreadLocalAllocBuffer after JDK-8377179 [v2]

Thomas Schatzl tschatzl at openjdk.org
Tue Feb 10 14:36:40 UTC 2026


On Tue, 10 Feb 2026 10:05:04 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Hi all,
>> 
>>   please review these additional changes to TLAB code after @kimbarret's comments.
>> 
>> Some typos, some improvements to const'ness, one really embarassing new race added (and fixed).
>> 
>> Testing: gha
>> 
>> Thanks,
>>   Thomas
>
> Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp

src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp line 467:

> 465:   HeapWord* start = AtomicAccess::load(&_start);
> 466:   HeapWord* top = AtomicAccess::load(&_top);
> 467:   // If there has been a race when retrieving _top and _start return 0.

Suggestion:

  // If there has been a race when retrieving _top and _start, return 0.

src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp line 467:

> 465:   HeapWord* start = AtomicAccess::load(&_start);
> 466:   HeapWord* top = AtomicAccess::load(&_top);
> 467:   // If there has been a race when retrieving _top and _start return 0.

Suggestion:

  // If there has been a race when retrieving _top and _start, return 0.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29626#discussion_r2788310091
PR Review Comment: https://git.openjdk.org/jdk/pull/29626#discussion_r2788317737


More information about the hotspot-dev mailing list