[10] RFR(L): 8132547: [AOT] support invokedynamic instructions
dean.long at oracle.com
dean.long at oracle.com
Wed Oct 18 01:36:50 UTC 2017
On 10/17/17 3:30 PM, Vladimir Kozlov wrote:
>
> On 10/17/17 1:41 PM, dean.long at oracle.com wrote:
>> 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();
>
> I mean should_store_fingerprint() will return true for all klasses in
> CDS too. So you recalculating them.
>
I see what you mean now. New webrev:
http://cr.openjdk.java.net/~dlong/8132547//hs.3/
dl
> Vladimir
>
>> 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
>>
More information about the hotspot-compiler-dev
mailing list