RFR: 8264732: Clean up LinkResolver::vtable_index_of_interface_method() [v2]
Vladimir Ivanov
vlivanov at openjdk.java.net
Tue Apr 6 13:41:52 UTC 2021
On Mon, 5 Apr 2021 19:09:21 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Vladimir Ivanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert jvmciCompilerToVM.cpp change.
>
> src/hotspot/share/jvmci/jvmciCompilerToVM.cpp line 731:
>
>> 729: C2V_VMENTRY_0(jint, getVtableIndexForInterfaceMethod, (JNIEnv* env, jobject, jobject jvmci_type, jobject jvmci_method))
>> 730: Klass* klass = JVMCIENV->asKlass(jvmci_type);
>> 731: Method* method = JVMCIENV->asMethod(jvmci_method);
>
> The reason that resolved_method was a methodHandle is in case of redefinition, we need to know if code is referring to this version of the method so that it's not deallocated. It's enough for one of the callers to create a methodHandle but passing the methodHandle will guarantee it. I'm not sure why you needed to make this change.
I refactored `getVtableIndexForInterfaceMethod` and kept the handle in place while dereferencing it when passing into `vtable_index_of_interface_method`. Does it look better now?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3346
More information about the hotspot-runtime-dev
mailing list