615 const uint mdo_last_branch_taken_count = 0; 616 #endif 617 618 switch (istate->msg()) { 619 case initialize: { 620 if (initialized++) ShouldNotReachHere(); // Only one initialize call. 621 _compiling = (UseCompiler || CountCompiledCalls); 622 #ifdef VM_JVMTI 623 _jvmti_interp_events = JvmtiExport::can_post_interpreter_events(); 624 #endif 625 return; 626 } 627 break; 628 case method_entry: { 629 THREAD->set_do_not_unlock(); 630 // count invocations 631 assert(initialized, "Interpreter not initialized"); 632 if (_compiling) { 633 MethodCounters* mcs; 634 GET_METHOD_COUNTERS(mcs); 635 if (ProfileInterpreter) { 636 METHOD->increment_interpreter_invocation_count(THREAD); 637 } 638 mcs->invocation_counter()->increment(); 639 if (mcs->invocation_counter()->reached_InvocationLimit(mcs->backedge_counter())) { 640 CALL_VM((void)InterpreterRuntime::frequency_counter_overflow(THREAD, NULL), handle_exception); 641 // We no longer retry on a counter overflow. 642 } 643 // Get or create profile data. Check for pending (async) exceptions. 644 BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception); 645 SAFEPOINT; 646 } 647 648 if ((istate->_stack_base - istate->_stack_limit) != istate->method()->max_stack() + 1) { 649 // initialize 650 os::breakpoint(); 651 } 652 653 #ifdef HACK 654 { 655 ResourceMark rm; 656 char *method_name = istate->method()->name_and_sig_as_C_string(); 657 if (strstr(method_name, "runThese$TestRunner.run()V") != NULL) { | 615 const uint mdo_last_branch_taken_count = 0; 616 #endif 617 618 switch (istate->msg()) { 619 case initialize: { 620 if (initialized++) ShouldNotReachHere(); // Only one initialize call. 621 _compiling = (UseCompiler || CountCompiledCalls); 622 #ifdef VM_JVMTI 623 _jvmti_interp_events = JvmtiExport::can_post_interpreter_events(); 624 #endif 625 return; 626 } 627 break; 628 case method_entry: { 629 THREAD->set_do_not_unlock(); 630 // count invocations 631 assert(initialized, "Interpreter not initialized"); 632 if (_compiling) { 633 MethodCounters* mcs; 634 GET_METHOD_COUNTERS(mcs); 635 #if COMPILER2_OR_JVMCI 636 if (ProfileInterpreter) { 637 METHOD->increment_interpreter_invocation_count(THREAD); 638 } 639 #endif 640 mcs->invocation_counter()->increment(); 641 if (mcs->invocation_counter()->reached_InvocationLimit(mcs->backedge_counter())) { 642 CALL_VM((void)InterpreterRuntime::frequency_counter_overflow(THREAD, NULL), handle_exception); 643 // We no longer retry on a counter overflow. 644 } 645 // Get or create profile data. Check for pending (async) exceptions. 646 BI_PROFILE_GET_OR_CREATE_METHOD_DATA(handle_exception); 647 SAFEPOINT; 648 } 649 650 if ((istate->_stack_base - istate->_stack_limit) != istate->method()->max_stack() + 1) { 651 // initialize 652 os::breakpoint(); 653 } 654 655 #ifdef HACK 656 { 657 ResourceMark rm; 658 char *method_name = istate->method()->name_and_sig_as_C_string(); 659 if (strstr(method_name, "runThese$TestRunner.run()V") != NULL) { |