RFR: 8356838: AOT incorrectly sets a cached class's loader type to boot [v3]
Ioi Lam
iklam at openjdk.org
Wed May 14 21:44:38 UTC 2025
> When the AOT training run sees a class `X` loaded by a custom class loader, we should set `X`'s loader type to `unreg`. However, since [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), if the classfile for `X` can also be found under the module path, we will incorrectly set the loader type to `boot`. See `test3()` in the new test code.
>
> The fix is to check for custom class loaders in `ClassLoader::record_result()` before checking the `classpath_index`.
>
> I also cleaned up the code in `ClassLoader::record_result()` and `ClassLoaderExt::record_result_for_builtin_loader()` to reduce redundancy and improve readability.
>
> I added `AOTClassLocationConfig::print()` which can be called inside gdb for debugging purposes.
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- Merge branch 'master' into 8356838-aot-incorrectly-sets-loader-type-to-boot
- @calvinccheung comments
- More clean up
- added tests
- Clean up; removed test code
- step1
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25199/files
- new: https://git.openjdk.org/jdk/pull/25199/files/c419b4a3..471cdafd
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25199&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25199&range=01-02
Stats: 13681 lines in 477 files changed: 6318 ins; 4192 del; 3171 mod
Patch: https://git.openjdk.org/jdk/pull/25199.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25199/head:pull/25199
PR: https://git.openjdk.org/jdk/pull/25199
More information about the hotspot-runtime-dev
mailing list