RFR: 8367320: Sort cpu/x86 includes [v2]

Francesco Andreuzzi duke at openjdk.org
Wed Sep 10 16:12:24 UTC 2025


On Wed, 10 Sep 2025 15:47:59 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Francesco Andreuzzi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   inline stuff
>
> src/hotspot/cpu/x86/continuationHelper_x86.inline.hpp line 29:
> 
>> 27: 
>> 28: #include "runtime/continuationEntry.inline.hpp"
>> 29: #include "runtime/continuationHelper.hpp"
> 
> I think this is another case where the intention was that `continuationHelper.hpp` is the corresponding hpp and should be placed at the top.
> 
> I wonder if the script should/can be revised a bit to recognize this pattern.

I think the style guide should be changed too if we want to make this change:

All .inline.hpp files should include their corresponding .hpp file as
the first include line with a blank line separating it from the rest of the
include lines.


There should be some more details about what constitutes the "corresponding .hpp file". In the case of your [comment above](https://github.com/openjdk/jdk/pull/27189#discussion_r2336167042) in this PR, the `.inline.hpp` file had a clear "corresponding `.hpp` file", namely `continuationEntry_x86.hpp`. 

Should the style guide state something like "the corresponding `.hpp` file for a `inline.hpp` whose name contains some compilation flag-dependent qualifier, is either the `.hpp` file with the qualifier (if present) or the `.hpp` file without the qualifier as a fallback" ?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27189#discussion_r2337246309


More information about the hotspot-dev mailing list