RFR: 8313421: [JVMCI] avoid locking class loader in CompilerToVM.lookupType [v2]

Doug Simon dnsimon at openjdk.org
Tue Aug 8 13:54:53 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).

Doug Simon 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 two additional commits since the last revision:

 - Merge remote-tracking branch 'openjdk-jdk/master' into JDK-8313421
 - avoid locking class loader in CompilerToVM.lookupType (JDK-8313421)

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/15128/files
  - new: https://git.openjdk.org/jdk/pull/15128/files/c32899db..86b6489a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15128&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15128&range=00-01

  Stats: 17879 lines in 733 files changed: 8386 ins; 4137 del; 5356 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