RFR: 8363584: Sort share/utilities includes [v4]
Kim Barrett
kbarrett at openjdk.org
Thu Jul 24 22:59:12 UTC 2025
On Thu, 24 Jul 2025 09:43:50 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:
>> This PR sorts the includes in hotspot/share/utilities using test/hotspot/jtreg/sources/SortIncludes.java. I'm also adding the directory to TestIncludesAreSorted.java.
>>
>> Passes tier1 tests and GHA.
>
> Francesco Andreuzzi has updated the pull request incrementally with one additional commit since the last revision:
>
> more sorting
src/hotspot/share/utilities/globalDefinitions.hpp line 29:
> 27:
> 28: // Get constants like JVM_T_CHAR and JVM_SIGNATURE_INT, before pulling in <jvm.h>.
> 29: #include "classfile_constants.h"
This include may no longer be needed, since `jvm.h` includes `jvm_constants.h`, which
includes `classfile_constants.h`. (As it should. Presumably it didn't used to and there was
an include-order problem as a result.) But that doesn't need to be addressed in this PR.
It can be dealt with in a new followup issue, and just stick to the sorting problems here.
https://bugs.openjdk.org/browse/JDK-8364087
src/hotspot/share/utilities/vmError.cpp line 41:
> 39: #if INCLUDE_JVMCI
> 40: #include "jvmci/jvmci.hpp"
> 41: #endif
These changes shouldn't be made. Conditional includes go at the end.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26428#discussion_r2229575525
PR Review Comment: https://git.openjdk.org/jdk/pull/26428#discussion_r2229739204
More information about the hotspot-dev
mailing list