RFR: 8365512: Replace -Xcomp with -Xmixed for AOT assembly phase
    Vladimir Kozlov 
    kvn at openjdk.org
       
    Thu Aug 14 13:24:21 UTC 2025
    
    
  
On Thu, 14 Aug 2025 11:25:27 GMT, Aleksey Shipilev <shade 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)
>
> 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.
Thank you @shipilev for looking on this.
> with blocking compilation requests.
AOT compilation requests are not blocking. We submit bunch of requests for the same compilation level and only then wait when  queues are empty.
With -Xcomp we wait each compilation request. 
So I want to use "with non-blocking compilation requests. ". There rest of suggested comment is fine.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26767#discussion_r2276622448
    
    
More information about the hotspot-runtime-dev
mailing list