Request for review: 8004076: Move _max_locals and _size_of_parameters to ConstMethod for better sharing

Jiangli Zhou jiangli.zhou at oracle.com
Sun Dec 9 21:53:24 PST 2012


Hi John,

Here is the updated webrev with Address constant change in where it's 
appropriate:

   http://cr.openjdk.java.net/~jiangli/8004076/webrev.01/.

I'm also double checking with jprt and runthese tests.

Thanks,
Jiangli

On 12/07/2012 02:52 PM, Jiangli Zhou wrote:
> Hi John,
>
> Thanks a lot for the review and suggestion. I'll add Address constants 
> where it's feasible.
>
> Jiangli
>
> On 12/07/2012 02:40 PM, John Rose wrote:
>> On Dec 7, 2012, at 1:45 PM, Jiangli Zhou wrote:
>>
>>> Could I have another reviewer for the change? Either official or 
>>> non-official reviewer is okay.
>>
>> I have a comment on this one.  (And you can use me as a reviewer.)
>>
>> In the sparc code, I would prefer to see the Address constants kept 
>> around, because they make the code easier to read.
>>
>> -  const Address size_of_parameters(G5_method, 
>> Method::size_of_parameters_offset());
>> -  const Address size_of_locals    (G5_method, 
>> Method::size_of_locals_offset());
>> +  const Register G3_constMethod = Glocals_size;
>> +  const Address size_of_parameters(G3_ConstMethod, 
>> ConstMethod::size_of_parameters_offset());
>> +  const Address size_of_locals   
>>  (G3_ConstMethod, ConstMethod::size_of_locals_offset());
>>    const Address constMethod       (G5_method, Method::const_offset());
>>    int rounded_vm_local_words = round_to( 
>> frame::interpreter_frame_vm_local_words, WordsPerLong );
>> @@ -511,7 +509,8 @@
>>    // Lscratch can't be used as a temporary because the call_stub uses
>>    // it to assert that the stack frame was setup correctly.
>> +  __ ld_ptr( constMethod, G3_constMethod );
>> -  __ lduh( size_of_parameters, Glocals_size);
>>
>> Maybe the details make it difficult, but I think it's possible in 
>> most places.
>>
>> As a side effect, using a fixed register (like G3) for the 
>> ConstMethod will make debugging easier.
>>
>> Same comment for x86/64.
>>
>> This may be more difficult to do on x86/32, since there are fewer 
>> temp registers.  But that's an oddball case.
>>
>> Thanks,
>> — John
>

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


More information about the hotspot-runtime-dev mailing list