725 } 726 VerifyOopClosure verify; 727 iframe->oops_interpreted_do(&verify, NULL, &rm, false); 728 callee_size_of_parameters = mh->size_of_parameters(); 729 callee_max_locals = mh->max_locals(); 730 is_top_frame = false; 731 } 732 } 733 #endif /* !PRODUCT */ 734 735 736 return bt; 737 JRT_END 738 739 740 int Deoptimization::deoptimize_dependents() { 741 Threads::deoptimized_wrt_marked_nmethods(); 742 return 0; 743 } 744 745 746 #ifdef COMPILER2 747 bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArray<ScopeValue*>* objects, TRAPS) { 748 Handle pending_exception(thread->pending_exception()); 749 const char* exception_file = thread->exception_file(); 750 int exception_line = thread->exception_line(); 751 thread->clear_pending_exception(); 752 753 for (int i = 0; i < objects->length(); i++) { 754 assert(objects->at(i)->is_object(), "invalid debug information"); 755 ObjectValue* sv = (ObjectValue*) objects->at(i); 756 757 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()())); 758 oop obj = NULL; 759 760 if (k->oop_is_instance()) { 761 InstanceKlass* ik = InstanceKlass::cast(k()); 762 obj = ik->allocate_instance(CHECK_(false)); 763 } else if (k->oop_is_typeArray()) { 764 TypeArrayKlass* ak = TypeArrayKlass::cast(k()); 1794 decoded_state = trap_state_set_recompiled(decoded_state, recomp_flag); 1795 // If the state re-encodes properly, format it symbolically. 1796 // Because this routine is used for debugging and diagnostics, 1797 // be robust even if the state is a strange value. 1798 size_t len; 1799 if (decoded_state != trap_state) { 1800 // Random buggy state that doesn't decode?? 1801 len = jio_snprintf(buf, buflen, "#%d", trap_state); 1802 } else { 1803 len = jio_snprintf(buf, buflen, "%s%s", 1804 trap_reason_name(reason), 1805 recomp_flag ? " recompiled" : ""); 1806 } 1807 if (len >= buflen) 1808 buf[buflen-1] = '\0'; 1809 return buf; 1810 } 1811 1812 1813 //--------------------------------statics-------------------------------------- 1814 Deoptimization::DeoptAction Deoptimization::_unloaded_action 1815 = Deoptimization::Action_reinterpret; 1816 const char* Deoptimization::_trap_reason_name[Reason_LIMIT] = { 1817 // Note: Keep this in sync. with enum DeoptReason. 1818 "none", 1819 "null_check", 1820 "null_assert", 1821 "range_check", 1822 "class_check", 1823 "array_check", 1824 "intrinsic", 1825 "bimorphic", 1826 "unloaded", 1827 "uninitialized", 1828 "unreached", 1829 "unhandled", 1830 "constraint", 1831 "div0_check", 1832 "age", 1833 "predicate", 1834 "loop_limit_check", 1835 "speculate_class_check", | 725 } 726 VerifyOopClosure verify; 727 iframe->oops_interpreted_do(&verify, NULL, &rm, false); 728 callee_size_of_parameters = mh->size_of_parameters(); 729 callee_max_locals = mh->max_locals(); 730 is_top_frame = false; 731 } 732 } 733 #endif /* !PRODUCT */ 734 735 736 return bt; 737 JRT_END 738 739 740 int Deoptimization::deoptimize_dependents() { 741 Threads::deoptimized_wrt_marked_nmethods(); 742 return 0; 743 } 744 745 Deoptimization::DeoptAction Deoptimization::_unloaded_action 746 = Deoptimization::Action_reinterpret; 747 748 #ifdef COMPILER2 749 bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArray<ScopeValue*>* objects, TRAPS) { 750 Handle pending_exception(thread->pending_exception()); 751 const char* exception_file = thread->exception_file(); 752 int exception_line = thread->exception_line(); 753 thread->clear_pending_exception(); 754 755 for (int i = 0; i < objects->length(); i++) { 756 assert(objects->at(i)->is_object(), "invalid debug information"); 757 ObjectValue* sv = (ObjectValue*) objects->at(i); 758 759 KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()())); 760 oop obj = NULL; 761 762 if (k->oop_is_instance()) { 763 InstanceKlass* ik = InstanceKlass::cast(k()); 764 obj = ik->allocate_instance(CHECK_(false)); 765 } else if (k->oop_is_typeArray()) { 766 TypeArrayKlass* ak = TypeArrayKlass::cast(k()); 1796 decoded_state = trap_state_set_recompiled(decoded_state, recomp_flag); 1797 // If the state re-encodes properly, format it symbolically. 1798 // Because this routine is used for debugging and diagnostics, 1799 // be robust even if the state is a strange value. 1800 size_t len; 1801 if (decoded_state != trap_state) { 1802 // Random buggy state that doesn't decode?? 1803 len = jio_snprintf(buf, buflen, "#%d", trap_state); 1804 } else { 1805 len = jio_snprintf(buf, buflen, "%s%s", 1806 trap_reason_name(reason), 1807 recomp_flag ? " recompiled" : ""); 1808 } 1809 if (len >= buflen) 1810 buf[buflen-1] = '\0'; 1811 return buf; 1812 } 1813 1814 1815 //--------------------------------statics-------------------------------------- 1816 const char* Deoptimization::_trap_reason_name[Reason_LIMIT] = { 1817 // Note: Keep this in sync. with enum DeoptReason. 1818 "none", 1819 "null_check", 1820 "null_assert", 1821 "range_check", 1822 "class_check", 1823 "array_check", 1824 "intrinsic", 1825 "bimorphic", 1826 "unloaded", 1827 "uninitialized", 1828 "unreached", 1829 "unhandled", 1830 "constraint", 1831 "div0_check", 1832 "age", 1833 "predicate", 1834 "loop_limit_check", 1835 "speculate_class_check", |