RFR: 8364372: [Leyden] Set UseAOTCodeLoadThread ergonomically
Vladimir Kozlov
kvn at openjdk.org
Wed Jul 30 22:04:12 UTC 2025
On Wed, 30 Jul 2025 21:15:03 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
> Without this fix:
>
> [assembly phase]
> $ java -Xlog:jit+thread=debug -XX:AOTMode=create -XX:AOTCache=jbench.aot -XX:AOTConfiguration=jbench.aotconf -cp JavacBench.jar JavacBench 100
> ...
> [0.317s][debug][jit,thread] Added initial compiler thread C1 AOT code caching CompilerThread
> [0.317s][debug][jit,thread] Added initial compiler thread C2 AOT code caching CompilerThread
> ..
>
> With this fix, these threads are only in the production phase, not in the assembly phase.
src/hotspot/share/cds/cdsConfig.cpp line 798:
> 796: FLAG_SET_ERGO_IF_DEFAULT(AOTReplayTraining, true);
> 797: AOTCodeCache::enable_caching();
> 798: FLAG_SET_ERGO_IF_DEFAULT(UseAOTCodeLoadThread, true);
I think you need to it switch off in other cases if it is specified on command line.
src/hotspot/share/code/aotCodeCache.cpp line 232:
> 230:
> 231: bool AOTCodeCache::is_code_load_thread_on() {
> 232: return UseAOTCodeLoadThread;
Please keep `&& AOTCodeCaching` because it could be disabled on command line.
-------------
PR Review Comment: https://git.openjdk.org/leyden/pull/89#discussion_r2243941872
PR Review Comment: https://git.openjdk.org/leyden/pull/89#discussion_r2243935856
More information about the leyden-dev
mailing list