RFR: 8365053: Refresh hotspot precompiled.hpp with headers based on current frequency [v10]
Francesco Andreuzzi
duke at openjdk.org
Mon Aug 11 14:53:17 UTC 2025
On Fri, 8 Aug 2025 22:11:32 GMT, Francesco Andreuzzi <duke at 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
Some results:
| Features | Time1 (s) | Time2 (s) | Change (s) |
|---------------------------------|----------|----------|-------------|
| epsilongc | 490.77 | 489.50 | 1.27 |
| epsilongc cds | 546.27 | 537.91 | 8.36 |
| epsilongc compiler1 | 547.87 | 539.86 | 8.01 |
| epsilongc compiler2 | 785.18 | 735.13 | 50.05 |
| g1gc | 682.44 | 666.40 | 16.04 |
| epsilongc services | 510.22 | 504.68 | 5.54 |
| epsilongc services jfr | 675.49 | 636.87 | 38.62 |
| epsilongc jni-check | 499.53 | 493.72 | 5.81 |
| epsilongc compiler1 jvmci | 589.74 | 591.32 | -1.58 |
| epsilongc compiler2 jvmci | 852.46 | 806.35 | 46.11 |
| epsilongc services jvmti | 567.67 | 561.73 | 5.94 |
| epsilongc link-time-opt | 535.96 | 526.00 | 9.97 |
| epsilongc management | 508.63 | 504.53 | 4.10 |
| epsilongc opt-size | 507.03 | 498.58 | 8.45 |
| parallelgc | 525.78 | 517.38 | 8.40 |
| serialgc | 512.59 | 511.88 | 0.71 |
| shenandoahgc | 739.44 | 722.72 | 16.72 |
| zgc | 681.20 | 672.28 | 8.92 |
- `Time1` is the time (sys+user) it takes to complete `make -h hotspot` with the precompiled headers in be25d3413b432b56e9789eae55920f1862008911 (>=400 includes in a `custom` build)
- `Time2`: same as `Time1`, with the precompiled headers having >=400 includes in a `custom` build with all features in the first column
So, the third column measures how much we improve by taking new precompiled headers due to a specific features. I'd say the following are worth keeping behind an include guard:
- `cds`
- `compiler1`
- `compiler2`
- `g1gc`
- `services`
- `jfr` ==> `services` (#26723)
- `jni-check`
- `link-time-opt`
- `opt-size`
- `parallelgc`
- `shenandoahgc`
- `zgc`
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26681#issuecomment-3175208900
More information about the hotspot-dev
mailing list