RFR: 8365053: Refresh hotspot precompiled.hpp with headers based on current frequency [v18]
Aleksey Shipilev
shade at openjdk.org
Wed Aug 27 10:47:48 UTC 2025
On Tue, 26 Aug 2025 22:34:39 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 one additional commit since the last revision:
>
> no executable
Ran the script locally, and noticed that on my Mac this was the difference:
-#include "oops/oopHandle.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "oops/oopHandle.inline.hpp"
Something is a bit off with sorting, I think.
Indeed, this fails:
$ diff --git a/test/hotspot/jtreg/sources/TestIncludesAreSorted.java b/test/hotspot/jtreg/sources/TestIncludesAreSorted.java
index 1a304a44944..287aad01b78 100644
--- a/test/hotspot/jtreg/sources/TestIncludesAreSorted.java
+++ b/test/hotspot/jtreg/sources/TestIncludesAreSorted.java
@@ -58,6 +58,7 @@ public class TestIncludesAreSorted {
"share/metaprogramming",
"share/oops",
"share/opto",
+ "share/precompiled",
"share/services",
"share/utilities"
};
$ CONF=macosx-aarch64-server-fastdebug make images test TEST=sources/
STDERR:
java.lang.RuntimeException: 1 files with unsorted headers found:
/Users/shipilev/Work/shipilev-jdk/src/hotspot/share/precompiled/precompiled.hpp
This is a minor thing, and we can technically deal with it once we sort the includes in `precompiled.hpp` in the constellation of issues that are dedicated to include sorting. But it would also be great to do this right from the get-go.
See if there is anything easy missing in the script?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26681#issuecomment-3227683555
More information about the hotspot-dev
mailing list