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

Francesco Andreuzzi duke at openjdk.org
Thu Aug 7 20:00:14 UTC 2025


On Thu, 7 Aug 2025 17:32:35 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Also, maybe check in the generation script as well? I think a subfolder here would be fine: https://github.com/openjdk/jdk/tree/master/src/utils. It would be nice if the output of that script could be simply piped into `precompiled.hpp`, so we can use it later without extra work.
> 
> We can, technically, hook it up a similar way SortIncludes.java is currently done, but I think it is unnecessary at this point. In a perfect world we would not be needing precompiled headers. In less ideal world, having a jtreg test that warns us that a new popular header appeared, or that older header is not as popular anymore, would be handy. Again, this is something out of scope for this PR.

I'll add the generation script, it looks like something that could be useful at some point in the future. I think there should be a human curator though, because the process is not completely automatic. For example, when the threshold is set to 50 I get this compilation error:

/jdk/src/hotspot/share/compiler/compilerEvent.cpp:59:36: error: redefinition of 'phase_names' with a different type: 'GrowableArray<const char *> *' vs 'const char *[100]'
static GrowableArray<const char*>* phase_names = nullptr;
                                   ^
/jdk/src/hotspot/share/opto/phasetype.hpp:147:20: note: previous definition is here
static const char* phase_names[] = {


It could happen with any threshold, even 130 as the codebase evolves.

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

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


More information about the hotspot-dev mailing list