RFR: 8365053: Refresh hotspot precompiled.hpp with headers based on current frequency [v3]
Francesco Andreuzzi
duke at openjdk.org
Fri Aug 8 11:39:12 UTC 2025
On Fri, 8 Aug 2025 06:23:43 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Francesco Andreuzzi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> script. update
>
> src/utils/PrecompiledHeaders/PrecompiledHeaders.java line 70:
>
>> 68: // Count inclusion times for each header
>> 69: Map<String, Integer> occurrences = new HashMap<>();
>> 70: try (Stream<Path> paths = Files.walk(hotspotPath)) {
>
> I think walking the source tree is the wrong approach to gathering the data
> about include counts. I think better is to do a build and then look at the
> files <builddir>/hotspot/variant-server/libjvm/objs/*.d. From that one can build
> a completely accurate count of the transitive inclusions.
I followed this hint, the latest version of the script checks the `.d` files.
Two observations:
- The magic number is now `2460` (more includes are taken into account, which makes sense)
- There is much less wiggle room, 2461 includes nothing, 2459 includes too much
- Runtime does not seem to be affected negatively or positively
If anybody is interested, this file contains the inclusion count for each source file: [inclusions_count.txt](https://github.com/user-attachments/files/21682561/inclusions_count.txt)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26681#discussion_r2262707516
More information about the hotspot-dev
mailing list