Request for review: 8003848: Make ConstMethod::generic_signature_index optional and move Method::_max_stack to ConstMethod

Jiangli Zhou jiangli.zhou at oracle.com
Tue Nov 27 08:06:05 PST 2012


Hi Coleen,

I remember now you suggested moving those fields as well when I proposed 
the change. I'll move max_locals and size_of_parameters into 
constMethod. Would it be okay if I push this as is and work on the other 
two fields on the same time?

Thanks!
Jiangli

On 11/26/2012 07:35 PM, Coleen Phillimore wrote:
>
> Jiangli,
>
> This code looks fine, although I don't like that max_stack is being 
> moved without moving max_locals.   They're usually used together in 
> the same place.   If you moved max_locals and size_of_parameters also 
> with this change into constMethod, I think it would be better.   Also, 
> we want to move these fields anyway for more sharing with CDS.
>
> Thanks,
> Coleen
>
> On 11/26/2012 9:08 PM, serguei.spitsyn at oracle.com wrote:
>> Jiangli,
>>
>> It looks good.
>>
>> Thanks,
>> Serguei
>>
>> On 11/21/12 11:53 AM, Jiangli Zhou wrote:
>>> Hi,
>>>
>>> Please review the following memory reduction change for Method and 
>>> ConstMethod:
>>>
>>>   http://cr.openjdk.java.net/~jiangli/8003848/webrev/
>>>
>>> Majority of java methods do not have generic signature. For those 
>>> methods, ConstMethod::generic_signature_index are always 0. 
>>> ConstMethod::generic_signature_index can be optional and only 
>>> allocated for methods with generic signature.
>>>
>>> The Method class has 2-byte unused due to padding for alignment. 
>>> Method::_max_stack can be moved to ConstMethod after changing 
>>> ConstMethod::generic_signature_index to be optionally allocated. 
>>> This removes an u2 field in Method, and can avoid the 2-byte unused 
>>> space waste due to padding.
>>>
>>> Together, above would save 4-bytes for each java method without 
>>> generic signature.
>>>
>>> Tested with jprt, runthese and vm.quick.testlist. No measurable 
>>> performance difference with the change for specjvm98 and specjbb2005.
>>>
>>> ============================================================================== 
>>>
>>> logs.method_baseline.jbb:
>>>   Benchmark           Samples        Mean     Stdev Geomean Weight
>>>   specjbb2005               3    56252.53    284.79
>>> ============================================================================== 
>>>
>>> logs.method.jbb.1:
>>>   Benchmark           Samples        Mean     Stdev   %Diff P 
>>> Significant
>>>   specjbb2005               3    56350.15    626.79    0.17 
>>> 0.823            *
>>> ============================================================================== 
>>>
>>>
>>> ============================================================================== 
>>>
>>> logs.method_baseline.spec:
>>>   Benchmark           Samples        Mean     Stdev Geomean Weight
>>>   specjvm98                 8      543.39     11.93
>>> ============================================================================== 
>>>
>>> logs.method.spec.1:
>>>   Benchmark           Samples        Mean     Stdev   %Diff P 
>>> Significant
>>>   specjvm98                 8      544.21      9.56    0.15 
>>> 0.881            *
>>> ============================================================================== 
>>>
>>>
>>>
>>> Thanks,
>>> Jiangli
>>
>



More information about the hotspot-runtime-dev mailing list