RFR(trivial): 8217318: Unneeded handleization in InstanceKlass::restore_unshareable_info
Claes Redestad
claes.redestad at oracle.com
Fri Jan 18 07:16:27 UTC 2019
On 2019-01-17 20:26, coleen.phillimore at oracle.com wrote:
> This looks good.
Thanks!
> I'd suggest a comment why methodHandle isn't needed for the place
> where you removed it but that would look strange:
> methodHandle isn't needed here, even though it can safepoint, because
> this class can't be redefined because it's not added to the dictionary
> yet.
+ // No need for a methodHandle here since methods not yet added
+ // to SystemDictionary can't be redefined.
?
/Claes
>
> Thanks,
> Coleen
>
> On 1/17/19 9:50 AM, Claes Redestad wrote:
>> Hi,
>>
>> a trivial(?) cleanup/optimization to avoid unneeded methodHandles when
>> loading methods from a CDS archive.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8217318
>> Patch:
>>
>> diff -r 91ab128a65a3 src/hotspot/share/oops/instanceKlass.cpp
>> --- a/src/hotspot/share/oops/instanceKlass.cpp Wed Jan 16 10:16:08
>> 2019 +0100
>> +++ b/src/hotspot/share/oops/instanceKlass.cpp Thu Jan 17 15:29:03
>> 2019 +0100
>> @@ -2375,8 +2375,7 @@
>> Array<Method*>* methods = this->methods();
>> int num_methods = methods->length();
>> for (int index2 = 0; index2 < num_methods; ++index2) {
>> - methodHandle m(THREAD, methods->at(index2));
>> - m->restore_unshareable_info(CHECK);
>> + methods->at(index2)->restore_unshareable_info(CHECK);
>> }
>> if (JvmtiExport::has_redefined_a_class()) {
>> // Reinitialize vtable because RedefineClasses may have changed
>> some
>>
>> Testing: tier1-3 (completed)
>>
>> Thanks!
>>
>> /Claes
>
More information about the hotspot-runtime-dev
mailing list