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

Tom Rodriguez never at openjdk.org
Fri Dec 15 17:27:56 UTC 2023


On Thu, 7 Dec 2023 02:56:57 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> 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
>
> src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java line 506:
> 
>> 504:     static class KlassWeakReference extends WeakReference<ResolvedJavaType> {
>> 505: 
>> 506:         private final Long klassPointer;
> 
> I assume this is `Long` instead of `long` to avoid boxing in `expungeStaleEntries`?

There's autoboxing in a more few places and I wanted to avoid having multiple copies of the box live so I promoted it to Long on entry to fromMetaspace.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16981#discussion_r1428239226


More information about the hotspot-compiler-dev mailing list