RFR: 8364372: [Leyden] Set UseAOTCodeLoadThread ergonomically
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. ------------- Commit messages: - 8364372: [Leyden] Set UseAOTCodeLoadThread ergonomically Changes: https://git.openjdk.org/leyden/pull/89/files Webrev: https://webrevs.openjdk.org/?repo=leyden&pr=89&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364372 Stats: 6 lines in 3 files changed: 1 ins; 3 del; 2 mod Patch: https://git.openjdk.org/leyden/pull/89.diff Fetch: git fetch https://git.openjdk.org/leyden.git pull/89/head:pull/89 PR: https://git.openjdk.org/leyden/pull/89
On Wed, 30 Jul 2025 21:15:03 GMT, Ashutosh Mehra <asmehra@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
On Wed, 30 Jul 2025 21:15:03 GMT, Ashutosh Mehra <asmehra@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.
This makes sense, thanks. Address Vladimir's comments, and we are good to go. ------------- PR Review: https://git.openjdk.org/leyden/pull/89#pullrequestreview-3075117474
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.
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision: Review comments Signed-off-by: Ashutosh Mehra <asmehra@redhat.com> ------------- Changes: - all: https://git.openjdk.org/leyden/pull/89/files - new: https://git.openjdk.org/leyden/pull/89/files/42e044f2..894a675b Webrevs: - full: https://webrevs.openjdk.org/?repo=leyden&pr=89&range=01 - incr: https://webrevs.openjdk.org/?repo=leyden&pr=89&range=00-01 Stats: 4 lines in 2 files changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.org/leyden/pull/89.diff Fetch: git fetch https://git.openjdk.org/leyden.git pull/89/head:pull/89 PR: https://git.openjdk.org/leyden/pull/89
On Thu, 31 Jul 2025 14:01:38 GMT, Ashutosh Mehra <asmehra@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.
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
Review comments
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
I also wonder why we set `AOTReplayTraining` to true in assembly phase in `cdsConfig.cpp`? https://github.com/openjdk/leyden/blob/392fbbb1859cd71521cb915b601a65cf59ba4... Isn't replay training only required in a production run? ------------- PR Comment: https://git.openjdk.org/leyden/pull/89#issuecomment-3140098164
On Thu, 31 Jul 2025 14:01:53 GMT, Ashutosh Mehra <asmehra@openjdk.org> wrote:
I also wonder why we set `AOTReplayTraining` to true in assembly phase in `cdsConfig.cpp`?
https://github.com/openjdk/leyden/blob/392fbbb1859cd71521cb915b601a65cf59ba4...
Isn't replay training only required in a production run?
We need to "replay" training to compile AOT code which will use its data during assembly phase. ------------- PR Comment: https://git.openjdk.org/leyden/pull/89#issuecomment-3141686340
On Thu, 31 Jul 2025 14:01:38 GMT, Ashutosh Mehra <asmehra@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.
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
Review comments
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
@vnkozlov I have addressed your comments. Please review. ------------- PR Comment: https://git.openjdk.org/leyden/pull/89#issuecomment-3140958090
On Thu, 31 Jul 2025 14:01:38 GMT, Ashutosh Mehra <asmehra@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.
Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
Review comments
Signed-off-by: Ashutosh Mehra <asmehra@redhat.com>
Good. ------------- Marked as reviewed by kvn (Committer). PR Review: https://git.openjdk.org/leyden/pull/89#pullrequestreview-3077203615
On Wed, 30 Jul 2025 21:15:03 GMT, Ashutosh Mehra <asmehra@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.
This pull request has now been integrated. Changeset: 09ac488f Author: Ashutosh Mehra <asmehra@openjdk.org> URL: https://git.openjdk.org/leyden/commit/09ac488f9e1edfc3dc4d37cc338bd5dc5fe14d... Stats: 9 lines in 3 files changed: 4 ins; 3 del; 2 mod 8364372: [Leyden] Set UseAOTCodeLoadThread ergonomically Reviewed-by: kvn ------------- PR: https://git.openjdk.org/leyden/pull/89
participants (3)
-
Aleksey Shipilev
-
Ashutosh Mehra
-
Vladimir Kozlov