On Fri, 8 Aug 2025 22:11:32 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: > > - magic number: 400 > - inline > > The latest version fails for me. I'm guessing because we exclude shenandoah > > by default for OracleJDK builds so having those headers in precompiled.hpp > > messes things up. I think we need to be careful with headers that are part > > of optional features. > > The last commit > ([be25d34](https://github.com/openjdk/jdk/commit/be25d3413b432b56e9789eae55920f1862008911)) > should fix the problem. I made a build with the following configuration: > > ``` > ./configure \ > --with-toolchain-type=clang \ > --disable-jvm-feature-shenandoahgc \ > --disable-jvm-feature-zero \ > --disable-jvm-feature-zgc \ > --disable-jvm-feature-g1gc \ > --disable-jvm-feature-parallelgc \ > --disable-jvm-feature-epsilongc > ``` > > and then I ran the script on this build to extract the [inclusions > count](https://github.com/user-attachments/files/21692915/inclusions_count.txt). > This could be included in the README file attached to this PR. Other optional features include cds, c1, jfr, and jvmci, so files from those directories also ought to be excluded. The (current) list of optional features is here: https://github.com/openjdk/jdk/blame/022e29a77533aacabd56820d00ecffa9646a8362/make/autoconf/jvm-features.m4#L47-L49 cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check \ jvmci jvmti link-time-opt management minimal opt-size parallelgc \ serialgc services shenandoahgc vm-structs zero zgc \ Not all of these have their own directories. Even where they do, the feature name and directory name aren't always the same. (The compiler1 feature and the c1 directory being an obvious example.) I didn't spot any files for other optional features in the latest list, other than the ones called out in the first sentence of this comment. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26681#issuecomment-3173072518