[10] RFR(L): 8132547: [AOT] support invokedynamic instructions

dean.long at oracle.com dean.long at oracle.com
Tue Oct 17 20:41:41 UTC 2017


Comment below...


On 10/17/17 11:15 AM, Vladimir Kozlov wrote:
>>>  Why removing !result->is_anonymous() check is not enough?:
>>>
>>>  if (InstanceKlass::should_store_fingerprint()) {
>>> result->store_fingerprint(stream->compute_fingerprint());
>>>
>>
>> Because InstanceKlass::should_store_fingerprint() will return false 
>> for an anonymous class.
>
> should_store_fingerprint() only checks flags. Do you mean it to return 
> 'true' during execution too for anonymous classes? But next code will 
> recalculate fingerprint for all classes!!! when you need compute only 
> for anonymous:
>
> +  if (result->has_stored_fingerprint()) {
> + result->store_fingerprint(stream->compute_fingerprint());
>    }
>

It should be for anonymous only (in AOT mode), unless I'm missing something:

1982 bool InstanceKlass::has_stored_fingerprint() const {
1983 #if INCLUDE_AOT
1984 return should_store_fingerprint(is_anonymous()) || is_shared();
1985 #else
1986   return false;
1987 #endif
1988 }

1960 bool InstanceKlass::should_store_fingerprint(bool is_anonymous) { 
[...]1971 if (UseAOT && is_anonymous) {
1972 // (3) We are using AOT code from a shared library and see an 
anonymous class
1973 return true;
1974 } dl

> Thanks,
> Vladimir

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20171017/6c0d1cbc/attachment.html>


More information about the hotspot-compiler-dev mailing list