RFR: 8296440: Remove Method* handling from cleanup_inline_caches_impl [v2]

Coleen Phillimore coleenp at openjdk.org
Mon Mar 27 17:23:03 UTC 2023


On Tue, 21 Mar 2023 17:11:30 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> src/hotspot/share/classfile/classLoaderData.cpp line 791:
>> 
>>> 789: 
>>> 790: bool ClassLoaderData::handles_contain(oop obj) {
>>> 791:   return _handles.contains(obj);
>> 
>> This might need to be protected by a metaspace_lock.
>
> I though it was not needed.
> Looks like `ChunkedHandleList` supports unsynchronized reading. We might not see all the handles recently added without locking but we are guaranteed to see the handles that were added by resolving the call we are checking.

I think you're right that it isn't needed.

>> src/hotspot/share/runtime/sharedRuntime.cpp line 1418:
>> 
>>> 1416:         return; // `to` is reachable by iterating parents of `from`
>>> 1417:       }
>>> 1418:     }
>> 
>> I'd be happier if this part was a function in ClassLoaderData or refactored from record_dependency (along with the constains function).  Since it's similar code.
>
> You are right. I've done the refactoring. Please let me know what you think.

I like the refactoring.  Thank you.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12802#discussion_r1149572982
PR Review Comment: https://git.openjdk.org/jdk/pull/12802#discussion_r1149569709


More information about the hotspot-dev mailing list