RFR (XS): 8010460: Interpreter on some platforms loads ConstMethod::_max_stack and misses extra stack slots for JSR 292

John Rose john.r.rose at oracle.com
Thu Mar 28 16:35:31 PDT 2013


On Mar 25, 2013, at 9:09 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:

> Hi Christian,
> 
> Thanks for taking a look at this.
> 
>> cpu/sparc/vm/templateInterpreter_sparc.cpp
>> 502:    //6815692//Method::extra_stack_words() +       // extra push slots for MH adapters
>> 1553:                   //6815692//+ Method::extra_stack_words()
>> 
>> Especially the second one in templateInterpreter_sparc.cpp.
> 
> The second one is misleading because size_activation_helper() is passed Method::max_stack() which accounted for the extra stack slot for the appendix before my change (and still does).
> 
> Other commented Method::extra_stack_words() are not needed either so I'll remove them.

Thanks for fixing this.

Good.  It's time to get rid of the //6815692// stuff.  The extra_stack variables (always zero now) can go away too.

I think extra_stack_words can be deleted, and extra_stack_entries can be made private to Method.

This line of code is redundant in src/cpu/x86/vm/templateInterpreter_x86_{32,64}.cpp:
    const int extra_stack = Method::extra_stack_entries();

Unless it is masking some other bug, this increment can go away with no bad effect.  (I.e., that extra_stack value should be zero also, and the variable removed.)

— John


More information about the hotspot-compiler-dev mailing list