RFR: 8365512: Replace -Xcomp with -Xmixed for AOT assembly phase

Aleksey Shipilev shade at openjdk.org
Thu Aug 14 11:28:18 UTC 2025


On Wed, 13 Aug 2025 20:03:43 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> When debugging AOT code generation in Leyden repo I noticed that AOT JIT compilations are serial with -Xcomp even so we create a lot of compiler threads to speed up. It is because -Xcomp enforce blocking compilation and only one thread submits AOT compilations. Also -Xcomp triggers a lot more other, not AOT, compilations which we don't need during assembly phase.
> 
> I suggest to replace -Xcomp with -Xmixed for AOT assembly phase.
> 
> I want to push it into mainline first because in mainline we don't even do AOT compilation yet.
> 
> This should speed up AOT testing with -Xcomp.
> 
> Tested tier1-6,8,10 (-rt)

This looks reasonable. I think the comment needs to be more explicit what and why we are doing this thing.

src/hotspot/share/cds/cdsConfig.cpp line 652:

> 650:         // -Xcomp triggers blocking compilation for all called methods,
> 651:         // but during AOT assembly phase we should AOT compile in parallel
> 652:         // (and not blocking) only methods collected during training run.

Suggestion:

        // Improve testing time with AOT and -Xcomp.
        // AOT assembly phase compiles methods collected during training run
        // with blocking compilation requests. There is no reason to compile the rest
        // of the core/infrastructure methods with aggressive/blocking compilation.

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

PR Review: https://git.openjdk.org/jdk/pull/26767#pullrequestreview-3120206347
PR Review Comment: https://git.openjdk.org/jdk/pull/26767#discussion_r2276353587


More information about the hotspot-runtime-dev mailing list