RFR: 8358693: [leyden] Bootstrapping circularity leads to never starting preload threads
Aleksey Shipilev
shade at openjdk.org
Thu Jun 5 13:02:18 UTC 2025
On Thu, 5 Jun 2025 12:33:00 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> This relates to [JDK-8358690](https://bugs.openjdk.org/browse/JDK-8358690), but we want to make sure Leyden preload runs until we have a fuller fix.
>
> Additional testing:
> - [x] Ad-hoc perf tests
> - [ ] Linux x86_64 server fastdebug, `runtime/cds`
You can clearly see it in `-Xlog:jit+thread=debug`:
# Before
[0.016s][debug][jit,thread] Added initial compiler thread C2 CompilerThread0
[0.016s][debug][jit,thread] Added initial compiler thread C1 CompilerThread0
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread1 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread2 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread3 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread4 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread5 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread6 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread7 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.026s][debug][jit,thread] Added compiler thread C2 CompilerThread8 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.027s][debug][jit,thread] Added compiler thread C2 CompilerThread9 (free memory: 62377MB, available non-profiled code cache: 115MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread1 (free memory: 62377MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread2 (free memory: 62377MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread3 (free memory: 62377MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread4 (free memory: 62377MB, available profiled code cache: 116MB)
# After
[0.015s][debug][jit,thread] Added initial compiler thread C2 CompilerThread0
[0.015s][debug][jit,thread] Added initial compiler thread C1 CompilerThread0
[0.016s][debug][jit,thread] Added initial compiler thread C1 AOT code caching CompilerThread
[0.016s][debug][jit,thread] Added initial compiler thread C2 AOT code caching CompilerThread
[0.026s][debug][jit,thread] Added compiler thread C1 CompilerThread1 (free memory: 62495MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread2 (free memory: 62495MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread3 (free memory: 62495MB, available profiled code cache: 116MB)
[0.027s][debug][jit,thread] Added compiler thread C1 CompilerThread4 (free memory: 62495MB, available profiled code cache: 116MB)
The bug regressed premain as we ported up JDK-8354887 from mainline.
* | commit be24c2646c8c9e6009f52b891cf058d915f22072 <------ SLOW
| | Author: Vladimir Kozlov <vladimir.kozlov at oracle.com>
| | Date: Wed May 28 16:43:31 2025 -0700
| |
| | Port JDK-8354887 from mainline
| |
* | commit 31bf3be94f26f983ade75369d4c257b06dbb2010 <------ FAST
|| Merge: ab4d18e2d15 2595fcc7cc4
| | Author: Vladimir Kozlov <vladimir.kozlov at oracle.com>
| | Date: Wed May 28 08:12:57 2025 -0700
| |
| | Merge 8356192
See:
Benchmark 1: build/linux-x86_64-server-release/images/jdk/bin/java -Xms64m -Xmx1g -XX:+UseSerialGC -cp JavacBenchApp.jar -XX:AOTCache=app.aot JavacBenchApp 50
# at be24c2646c8c9e6009f52b891cf058d915f22072 + this fix
Time (mean ± σ): 316.2 ms ± 2.1 ms [User: 655.8 ms, System: 105.6 ms]
Range (min … max): 312.3 ms … 320.8 ms 30 runs
# at be24c2646c8c9e6009f52b891cf058d915f22072
Time (mean ± σ): 365.4 ms ± 5.0 ms [User: 894.8 ms, System: 131.4 ms]
Range (min … max): 355.9 ms … 374.4 ms 30 runs
# at 31bf3be94f26f983ade75369d4c257b06dbb2010
Time (mean ± σ): 321.8 ms ± 4.8 ms [User: 657.1 ms, System: 101.6 ms]
Range (min … max): 316.0 ms … 335.2 ms 30 runs
The effect on current premain is less pronounced, because I think there are more regressions. I am chasing those down as well.
-------------
PR Comment: https://git.openjdk.org/leyden/pull/75#issuecomment-2944196111
More information about the leyden-dev
mailing list