RFR: 8313421: [JVMCI] avoid locking class loader in CompilerToVM.lookupType
Doug Simon
dnsimon at openjdk.org
Thu Aug 3 08:34:49 UTC 2023
This PR removes the need to lock the system class loader when converting Class instances for boot and platform classes to ResolvedJavaType objects. Not only is the system class loader a suboptimal loader for resolving these classes but locking it can cause deadlock in some JDK tests (e.g. `test/jdk/java/lang/System/LoggerFinder/`) when run with `-Xcomp`. For example, a thread that holds the system class loader lock and triggers a blocking compilation will deadlock with the compiler thread servicing the compilation if the compilation requires calling `CompilerToVM.lookupType` (which most compilations do).
-------------
Commit messages:
- avoid locking class loader in CompilerToVM.lookupType (JDK-8313421)
Changes: https://git.openjdk.org/jdk/pull/15128/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15128&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8313421
Stats: 93 lines in 8 files changed: 41 ins; 19 del; 33 mod
Patch: https://git.openjdk.org/jdk/pull/15128.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15128/head:pull/15128
PR: https://git.openjdk.org/jdk/pull/15128
More information about the hotspot-compiler-dev
mailing list