RFR: 8321288: [JVMCI] HotSpotJVMCIRuntime doesn't clean up WeakReferences in resolvedJavaTypes [v2]

Tom Rodriguez never at openjdk.org
Mon Dec 11 22:01:58 UTC 2023


> HotSpotJVMCIRuntime.resolvedJavaTypes implements a weak value map but is lacking code to clean out cleared weak references.  In normal mixed execution this isn't likely to get big and generally isolates are shutdown frequently so this doesn't lead to problems.  In Xcomp mode with tests that stress unloading this becomes more problematic.  In the worst case is still doesn't lead to large heaps but does make the idle heap larger than required.
> 
> This PR adds ReferenceQueue based cleaning of reclaimed values.  Testing in the context of a long running isolate shows that they are no longer accumulating.

Tom Rodriguez 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 three additional commits since the last revision:

 - Merge remote-tracking branch 'origin/master' into tkr-clean-weak
 - Comment and types improvements
 - 8321288: [JVMCI] HotSpotJVMCIRuntime doesn't clean up WeakReferences in resolvedJavaTypes

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16981/files
  - new: https://git.openjdk.org/jdk/pull/16981/files/e6a60ed0..34c575a7

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

  Stats: 47685 lines in 697 files changed: 21763 ins; 23717 del; 2205 mod
  Patch: https://git.openjdk.org/jdk/pull/16981.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16981/head:pull/16981

PR: https://git.openjdk.org/jdk/pull/16981


More information about the hotspot-compiler-dev mailing list