On Tue, 12 Aug 2025 11:32:42 GMT, Francesco Andreuzzi <d...@openjdk.org> wrote:

>> In this PR I propose to refresh the included headers in hotspot 
>> `precompiled.hpp`. The current set of precompiled headers was refreshed in 
>> 2018, 7 years ago. I repeated the same operations and measurements after 
>> refreshing the set of precompiled headers according to the current usage 
>> frequency.
>> 
>> These are the results I observed. Depending on the platform, the improvement 
>> is between 10 and 20% in terms of total work (user+sys). The results are in 
>> seconds.
>> 
>> 
>> linux-x64 GCC
>> master      real 81.39 user 3352.15 sys 287.49
>> JDK-8365053 real 81.94 user 3030.24 sys 295.82
>> 
>> linux-x64 Clang
>> master      real 43.44 user 2082.93 sys 130.70
>> JDK-8365053 real 38.44 user 1723.80 sys 117.68
>> 
>> linux-aarch64 GCC
>> master      real 1188.08 user 2015.22 sys 175.53
>> JDK-8365053 real 1019.85 user 1667.45 sys 171.86
>> 
>> linux-aarch64 clang
>> master      real 981.77 user 1645.05 sys 118.60
>> JDK-8365053 real 791.96 user 1262.92 sys 101.50
>
> Francesco Andreuzzi has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - conditional includes
>  - variants

I have a few questions/comments.

There are now a bunch of unconditional includes for JVM features which can be 
disabled. With the exception of CDS, in the rest of the codebase we have been 
very careful to always guard these includes when using them outside their own 
sub-components. 

I understand that these are generated includes, but I think we can curate the 
list some manually.

Currently `c1/c1_globals.hpp` `jvmci/jvmci_globals.hpp` and 
`opto/c2_globals.hpp` are included which are optional features, 
`compiler/compiler_globals.hpp` (which is also included) should be used 
instead. Same goes for `gc/serial/serial_globals.hpp` and 
`gc/shared/gc_globals.hpp`.

In addition to those globals files we have all the JFR and CDS includes which 
are unguarded.

I am not sure I understand completely what goes into the list of conditional 
includes here. I understand that there might be duplicates across the different 
conditional includes, but now there are also includes which are duplicated in 
the unconditional includes. So is it a list of all includes which are 
beneficial when building with just that feature, or is it suppose to be a list 
of extra includes which are beneficial if that feature is enabled. Or are those 
lists something else?

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

PR Review: https://git.openjdk.org/jdk/pull/26681#pullrequestreview-3135090453

Reply via email to