RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v4]

Anton Artemov aartemov at openjdk.org
Mon Nov 17 11:59:33 UTC 2025


On Fri, 14 Nov 2025 18:47:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8366671: Fixed build problem.
>
> src/hotspot/share/runtime/objectMonitor.hpp line 36:
> 
>> 34: #include "utilities/checkedCast.hpp"
>> 35: #include "utilities/globalDefinitions.hpp"
>> 36: #include "utilities/spinCriticalSection.hpp"
> 
> Include shouldn't be needed here.

Correct, it was needed here in the presence of a Functor-derived inner class, but not it is not needed.

> test/hotspot/gtest/jfr/test_adaptiveSampler.cpp line 43:
> 
>> 41: #include "runtime/atomicAccess.hpp"
>> 42: #include "utilities/globalDefinitions.hpp"
>> 43: #include "utilities/spinCriticalSection.hpp"
> 
> Why is this include needed here?

For the same reason why `jfrSpinlockHelper.hpp` was included. 

It looks like two includes above that are redundant and can be removed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2533778511
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2533783383


More information about the hotspot-dev mailing list