RFR: 8366671: Refactor Thread::SpinAcquire and Thread::SpinRelease [v4]
Kim Barrett
kbarrett at openjdk.org
Mon Nov 17 22:52:21 UTC 2025
On Mon, 17 Nov 2025 11:56:19 GMT, Anton Artemov <aartemov at openjdk.org> wrote:
>> 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 the two includes above that are redundant and can be removed. This one cannot, it breaks builds.
Include of "atomicAccess.hpp" seems unnecessary, as there are no (direct) uses here.
"globalDefinitions.hpp" should not be removed, under the "Include What You Use" guidance
(which hasn't yet made it into the Style Guide - https://bugs.openjdk.org/browse/JDK-8252896).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28264#discussion_r2535663096
More information about the hotspot-dev
mailing list