RFR: 8367320: Sort cpu/x86 includes
Francesco Andreuzzi
duke at openjdk.org
Wed Sep 10 10:10:49 UTC 2025
On Wed, 10 Sep 2025 09:33:28 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Sort includes in `cpu/x86` using `SortIncludes.java`. I'm also removing a couple unnecessary ones.
>>
>> Passes `tier1` and `tier2`.
>
> src/hotspot/cpu/x86/continuationEntry_x86.inline.hpp line 29:
>
>> 27:
>> 28: #include "oops/method.inline.hpp"
>> 29: #include "runtime/continuationEntry.hpp"
>
> I believe this is the "corresponding .hpp" in "All .inline.hpp files should include their corresponding .hpp file as the first include line..." from the style-guide, so should be kept at the top.
I see. There's already a `continuationEntry_x86.hpp` in `cpu/x86`, maybe the `#include "runtime/continuationEntry.hpp"` should go there instead, and `continuationEntry_x86.inline.hpp` should include `continuationEntry_x86.hpp`?
This would solve the problem without requiring changes in `SortIncludes.java`, which is not very flexible in terms of the relation between the names of the `.hpp` file and the corresponding `.inline.hpp` :
String nonInlineHpp = pathString.replace(".inline.hpp", ".hpp");
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27189#discussion_r2336257257
More information about the hotspot-dev
mailing list