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

Christian Thalinger christian.thalinger at oracle.com
Thu Mar 21 16:43:37 PDT 2013


On Mar 21, 2013, at 3:10 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:

> http://cr.openjdk.java.net/~roland/8010460/webrev.00/
> 
> Method::max_stack() accounts for extra slots for JSR 292 extra arguments. Some platforms (sparc) load ConstMethod::max_stack_offset() directly and so doesn't take the extra slots into account. On sparc it's possible that the appendix argument to a call ends up in the space reserved for the register window. 

Grep'ing for extra_stack_words shows a couple more occurrences:

cpu/sparc/vm/cppInterpreter_sparc.cpp
1062:                         //6815692//Method::extra_stack_words() +  // extra push slots for MH adapters

cpu/sparc/vm/templateInterpreter_sparc.cpp
502:    //6815692//Method::extra_stack_words() +       // extra push slots for MH adapters
1553:                   //6815692//+ Method::extra_stack_words()

cpu/x86/vm/cppInterpreter_x86.cpp
542:    const int extra_stack = 0; //6815692//Method::extra_stack_words();

share/vm/oops/method.cpp
396:int Method::extra_stack_words() {

share/vm/oops/method.hpp
635:  static int extra_stack_words();  // = extra_stack_entries() * Interpreter::stackElementSize()

Especially the second one in templateInterpreter_sparc.cpp.

-- Chris

> 
> Roland.



More information about the hotspot-compiler-dev mailing list