comparison src/share/vm/opto/callnode.cpp @ 17980:0bf37f737702

8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9 Summary: make compiled code bang the stack by the worst case size of the interpreter frame at deoptimization points. Reviewed-by: twisti, kvn
author roland
date Tue, 01 Apr 2014 09:36:49 +0200
parents 78bbf4d43a14
children 52b4284cb496 411e30e5fbb8
comparison
equal deleted inserted replaced
17978:ad51f24671c2 17980:0bf37f737702
605 jvms->set_scloff(jvms->scloff() + delta); 605 jvms->set_scloff(jvms->scloff() + delta);
606 jvms->set_endoff(jvms->endoff() + delta); 606 jvms->set_endoff(jvms->endoff() + delta);
607 } 607 }
608 } 608 }
609 609
610 // Mirror the stack size calculation in the deopt code
611 // How much stack space would we need at this point in the program in
612 // case of deoptimization?
613 int JVMState::interpreter_frame_size() const {
614 const JVMState* jvms = this;
615 int size = 0;
616 int callee_parameters = 0;
617 int callee_locals = 0;
618 int extra_args = method()->max_stack() - stk_size();
619
620 while (jvms != NULL) {
621 int locks = jvms->nof_monitors();
622 int temps = jvms->stk_size();
623 bool is_top_frame = (jvms == this);
624 ciMethod* method = jvms->method();
625
626 int frame_size = BytesPerWord * Interpreter::size_activation(method->max_stack(),
627 temps + callee_parameters,
628 extra_args,
629 locks,
630 callee_parameters,
631 callee_locals,
632 is_top_frame);
633 size += frame_size;
634
635 callee_parameters = method->size_of_parameters();
636 callee_locals = method->max_locals();
637 extra_args = 0;
638 jvms = jvms->caller();
639 }
640 return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord;
641 }
642
610 //============================================================================= 643 //=============================================================================
611 uint CallNode::cmp( const Node &n ) const 644 uint CallNode::cmp( const Node &n ) const
612 { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; } 645 { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; }
613 #ifndef PRODUCT 646 #ifndef PRODUCT
614 void CallNode::dump_req(outputStream *st) const { 647 void CallNode::dump_req(outputStream *st) const {