Request for review: 7168280: Eliminate the generic signature index slot from field array for field without generic signature
Jiangli Zhou
jiangli.zhou at oracle.com
Fri May 11 13:53:55 PDT 2012
Hi Dean,
Good catch! Thanks for the comments.
Jiangli
On 05/11/2012 01:38 PM, Dean Long wrote:
> I think this breaks InternalFieldStream. The loop in
> init_generic_signature_start_slot() will start at java_fields_count()
> instead of 0, so it won't decrement "length" for any Java fields with
> a generic signature, resulting in scanning too many elements.
>
> dl
>
> On 5/11/2012 12:02 PM, Jiangli Zhou wrote:
>> Hi,
>>
>> The field array is an array of 7-shorts [access, name index, sig
>> index, initval index, low offset, high offset, generic signature
>> index]. Most fields don't have generic signature attribute, in that
>> case the generic signature index in the field array is 0 and unused.
>> For all classes in rt.jar, there are total about 28973 fields. From
>> which 27466 fields do not have generic signature and only 1507 fields
>> have generic signature.
>>
>> Following is a webrev that eliminates the unused generic signature
>> index slot from field array. For field without generic signature, the
>> field data is 6-shorts. For field with generic signature, it is still
>> 7-shorts of data. A new flag is added in the field access flag to
>> indicate if the field has the extra short for generic signature index.
>>
>> http://cr.openjdk.java.net/~jiangli/7168280/webrev.00/
>>
>> Thanks,
>>
>> Jiangli
More information about the hotspot-runtime-dev
mailing list