RFR: 8365053: Refresh hotspot precompiled.hpp with headers based on current frequency [v10]

Francesco Andreuzzi duke at openjdk.org
Tue Aug 12 00:54:14 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

I'm starting to think the high variability is a quirk of my environment. I ran the builds in a virtualized machine and I'm probably experiencing erratic behavior under high load. 

I re-ran each combination fewer times (3, should still be enough to get an idea), and I'm observing more reasonable results:

| Feature                  | Baseline `precompiled.hpp`  | Updated `precompiled.hpp`           |
|----------------------------|-----------------|-----------------|
| epsilongc                  | 458.88 +/- 0.35 | 459.69 +/- 0.34 |
| epsilongc cds              | 501.63 +/- 0.35 | 501.58 +/- 0.57 |
| epsilongc compiler1        | 505.66 +/- 0.61 | 505.06 +/- 0.51 |
| epsilongc compiler2        | 725.91 +/- 0.41 | 692.25 +/- 0.40 |
| g1gc                       | 630.73 +/- 0.02 | 624.24 +/- 0.35 |
| epsilongc services jfr     | 625.54 +/- 1.45 | 592.37 +/- 1.00 |
| epsilongc jni-check        | 461.19 +/- 0.14 | 461.79 +/- 0.89 |
| epsilongc compiler1 jvmci  | 541.31 +/- 0.42 | 540.31 +/- 0.70 |
| epsilongc compiler2 jvmci  | 758.13 +/- 0.71 | 724.80 +/- 0.21 |
| epsilongc services jvmti   | 499.64 +/- 0.18 | 499.69 +/- 0.52 |
| epsilongc management       | 450.82 +/- 0.62 | 451.38 +/- 0.59 |
| epsilongc opt-size         | 446.44 +/- 0.56 | 446.16 +/- 0.12 |
| parallelgc                 | 467.23 +/- 0.19 | 466.89 +/- 0.41 |
| serialgc                   | 454.17 +/- 0.40 | 454.22 +/- 0.12 |
| epsilongc services         | 453.82 +/- 0.21 | 453.59 +/- 0.51 |
| shenandoahgc               | 658.17 +/- 0.50 | 647.44 +/- 0.40 |

[This](https://github.com/fandreuz/jdk-stuff/blob/master/script) is the script I used.

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

PR Comment: https://git.openjdk.org/jdk/pull/26681#issuecomment-3177333952


More information about the hotspot-dev mailing list