1326:703065c670fa | 1338:15bbd3f505c0 |
---|---|
221 | 221 |
222 //============================================================================= | 222 //============================================================================= |
223 JVMState::JVMState(ciMethod* method, JVMState* caller) { | 223 JVMState::JVMState(ciMethod* method, JVMState* caller) { |
224 assert(method != NULL, "must be valid call site"); | 224 assert(method != NULL, "must be valid call site"); |
225 _method = method; | 225 _method = method; |
226 _reexecute = Reexecute_Undefined; | |
226 debug_only(_bci = -99); // random garbage value | 227 debug_only(_bci = -99); // random garbage value |
227 debug_only(_map = (SafePointNode*)-1); | 228 debug_only(_map = (SafePointNode*)-1); |
228 _caller = caller; | 229 _caller = caller; |
229 _depth = 1 + (caller == NULL ? 0 : caller->depth()); | 230 _depth = 1 + (caller == NULL ? 0 : caller->depth()); |
230 _locoff = TypeFunc::Parms; | 231 _locoff = TypeFunc::Parms; |
235 _sp = 0; | 236 _sp = 0; |
236 } | 237 } |
237 JVMState::JVMState(int stack_size) { | 238 JVMState::JVMState(int stack_size) { |
238 _method = NULL; | 239 _method = NULL; |
239 _bci = InvocationEntryBci; | 240 _bci = InvocationEntryBci; |
241 _reexecute = Reexecute_Undefined; | |
240 debug_only(_map = (SafePointNode*)-1); | 242 debug_only(_map = (SafePointNode*)-1); |
241 _caller = NULL; | 243 _caller = NULL; |
242 _depth = 1; | 244 _depth = 1; |
243 _locoff = TypeFunc::Parms; | 245 _locoff = TypeFunc::Parms; |
244 _stkoff = _locoff; | 246 _stkoff = _locoff; |
267 const JVMState* q = that; | 269 const JVMState* q = that; |
268 for (;;) { | 270 for (;;) { |
269 if (p->_method != q->_method) return false; | 271 if (p->_method != q->_method) return false; |
270 if (p->_method == NULL) return true; // bci is irrelevant | 272 if (p->_method == NULL) return true; // bci is irrelevant |
271 if (p->_bci != q->_bci) return false; | 273 if (p->_bci != q->_bci) return false; |
274 if (p->_reexecute != q->_reexecute) return false; | |
272 p = p->caller(); | 275 p = p->caller(); |
273 q = q->caller(); | 276 q = q->caller(); |
274 if (p == q) return true; | 277 if (p == q) return true; |
275 assert(p != NULL && q != NULL, "depth check ensures we don't run off end"); | 278 assert(p != NULL && q != NULL, "depth check ensures we don't run off end"); |
276 } | 279 } |
488 } | 491 } |
489 } | 492 } |
490 if (!printed) | 493 if (!printed) |
491 _method->print_short_name(st); | 494 _method->print_short_name(st); |
492 st->print(" @ bci:%d",_bci); | 495 st->print(" @ bci:%d",_bci); |
496 st->print(" reexecute:%s", _reexecute==Reexecute_True?"true":"false"); | |
493 } else { | 497 } else { |
494 st->print(" runtime stub"); | 498 st->print(" runtime stub"); |
495 } | 499 } |
496 if (caller() != NULL) caller()->dump_spec(st); | 500 if (caller() != NULL) caller()->dump_spec(st); |
497 } | 501 } |
507 ex->dump(1); | 511 ex->dump(1); |
508 } | 512 } |
509 } | 513 } |
510 _map->dump(2); | 514 _map->dump(2); |
511 } | 515 } |
512 st->print("JVMS depth=%d loc=%d stk=%d mon=%d scalar=%d end=%d mondepth=%d sp=%d bci=%d method=", | 516 st->print("JVMS depth=%d loc=%d stk=%d mon=%d scalar=%d end=%d mondepth=%d sp=%d bci=%d reexecute=%s method=", |
513 depth(), locoff(), stkoff(), monoff(), scloff(), endoff(), monitor_depth(), sp(), bci()); | 517 depth(), locoff(), stkoff(), monoff(), scloff(), endoff(), monitor_depth(), sp(), bci(), should_reexecute()?"true":"false"); |
514 if (_method == NULL) { | 518 if (_method == NULL) { |
515 st->print_cr("(none)"); | 519 st->print_cr("(none)"); |
516 } else { | 520 } else { |
517 _method->print_name(st); | 521 _method->print_name(st); |
518 st->cr(); | 522 st->cr(); |
535 | 539 |
536 //--------------------------clone_shallow-------------------------------------- | 540 //--------------------------clone_shallow-------------------------------------- |
537 JVMState* JVMState::clone_shallow(Compile* C) const { | 541 JVMState* JVMState::clone_shallow(Compile* C) const { |
538 JVMState* n = has_method() ? new (C) JVMState(_method, _caller) : new (C) JVMState(0); | 542 JVMState* n = has_method() ? new (C) JVMState(_method, _caller) : new (C) JVMState(0); |
539 n->set_bci(_bci); | 543 n->set_bci(_bci); |
544 n->_reexecute = _reexecute; | |
540 n->set_locoff(_locoff); | 545 n->set_locoff(_locoff); |
541 n->set_stkoff(_stkoff); | 546 n->set_stkoff(_stkoff); |
542 n->set_monoff(_monoff); | 547 n->set_monoff(_monoff); |
543 n->set_scloff(_scloff); | 548 n->set_scloff(_scloff); |
544 n->set_endoff(_endoff); | 549 n->set_endoff(_endoff); |