[13] RFR (S): 8223171: Redundant nmethod dependencies for effectively final methods

dean.long at oracle.com dean.long at oracle.com
Thu May 2 02:30:16 UTC 2019


Yes, that's exactly what I had in mind :-)

dl

On 5/1/19 3:15 PM, Vladimir Ivanov wrote:
>
>> Can you also add check_unique_method(ctxk, uniqm) to the version of 
>> assert_unique_concrete_method that takes a Method*?
>
> Like this?
>   http://cr.openjdk.java.net/~vlivanov/8223171/webrev.02/
>
> Best regards,
> Vladimir Ivanov
>
>> On 5/1/19 9:52 AM, Vladimir Ivanov wrote:
>>>
>>>> Does this allow us to assert !uniqm->can_be_statically_bound() in 
>>>> Dependencies::assert_unique_concrete_method?
>>>
>>> In general, no. It doesn't hold for final methods: dependency is 
>>> still needed when context is broad enough, since an overriding 
>>> method can be loaded in a different part of the hierarchy (under the 
>>> same context class).
>>>
>>> In case of the adjusted checks it's safe, since context == method 
>>> holder when actual_receiver->is_final() == true.
>>>
>>>    if (!callee->is_final_method() && !callee->is_private() && 
>>> !actual_receiver->is_final()) {
>>> dependencies()->assert_unique_concrete_method(actual_receiver, 
>>> cha_monomorphic_target);
>>>     }
>>>
>>> I refactored the patch a bit:
>>>   http://cr.openjdk.java.net/~vlivanov/8223171/webrev.01/
>>>
>>>>> Moreover, C2 does add dependencies for private methods.
>>>
>>> I take it back. Earlier checks handle private methods. Only methods 
>>> on final classes get redundant dependencies.
>>>
>>> Best regards,
>>> Vladimir Ivanov
>>



More information about the hotspot-compiler-dev mailing list