RFR: 8364359: Sort share/cds includes
Aleksey Shipilev
shade at openjdk.org
Wed Jul 30 17:13:55 UTC 2025
On Wed, 30 Jul 2025 16:53:20 GMT, Francesco Andreuzzi <duke at openjdk.org> wrote:
> This PR sorts the includes in `hotspot/share/cds` using `SortIncludes.java`. I'm also adding the directory to `TestIncludesAreSorted`.
>
> Passes tier1.
src/hotspot/share/cds/filemap.cpp line 80:
> 78:
> 79: #include <errno.h>
> 80: #include <sys/stat.h>
This looks off. Is this auto-generated order?
The Style Guide (https://github.com/openjdk/jdk/blob/master/doc/hotspot-style.md) says:
- Put conditional inclusions (#if ...) at the end of the section of HotSpot include lines.
This also applies to macro-expanded includes of platform dependent files.
- Put system includes in a section after the HotSpot include lines with a blank line
separating the two sections.
```
So maybe there is a bug in the include sorter?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26561#discussion_r2243365449
More information about the hotspot-runtime-dev
mailing list