Review Request (S) 8005994: Method annotations are allocated unnecessarily during class file parsing

Coleen Phillimore coleen.phillimore at oracle.com
Tue Jan 15 07:30:15 PST 2013


Stefan, This change looks good.   How much footprint does this save?

On 01/15/2013 10:09 AM, Stefan Karlsson wrote:
> On 01/15/2013 02:38 PM, Vitaly Davidovich wrote:
>>
>> Looks good Stefan.
>>
>
> Thanks, Vitaly.
>
>> The annotation creation code in classFileParser is really asking for 
>> a macro or helper function that does the checks and construction.
>>
>
> I agree. Does anyone in the runtime team have any opinions on this?

Yes, I do.   The method annotations (and class ones too but not so much) 
are a problem for cleaning up metadata on class file parsing failure.  I 
am working on adding these to the inlined tables in ConstMethod, which 
is another messy area.

Coleen

>
> thanks,
> StefanK
>
>> Thanks
>>
>> Sent from my phone
>>
>> On Jan 15, 2013 7:27 AM, "Stefan Karlsson" 
>> <stefan.karlsson at oracle.com <mailto:stefan.karlsson at oracle.com>> wrote:
>>
>>     http://cr.openjdk.java.net/~stefank/8005994/webrev.00/
>>     <http://cr.openjdk.java.net/%7Estefank/8005994/webrev.00/>
>>
>>     HotSpot unnecessarily allocates annotations arrays when they are
>>     not needed. This memory regression was introduced when the
>>     annotation data structures were changed in the Permgen Removal
>>     project.
>>
>>     This fix:
>>     1) reintroduces the old null checks
>>     2) adds a null check before creating the newly introduced method
>>     type annotations.
>>     3) adds a missing null check where the type annotations are used,
>>     since they now can be null.
>>
>>     Testing:
>>     jprt, jdk_lang and type annotations tests
>>
>>     thanks,
>>     StefanK
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20130115/11cfd876/attachment.html 


More information about the hotspot-runtime-dev mailing list