hotspot/src/share/vm/utilities/exceptions.cpp
changeset 41070 496463b4e206
parent 37248 11a660dbbb8e
child 46271 979ebd346ecf
equal deleted inserted replaced
40931:d4d2a4a0e023 41070:496463b4e206
    78   // adequate stack space.
    78   // adequate stack space.
    79   // This can happen with stress testing a large value of StackShadowPages
    79   // This can happen with stress testing a large value of StackShadowPages
    80   if (h_exception()->klass() == SystemDictionary::StackOverflowError_klass()) {
    80   if (h_exception()->klass() == SystemDictionary::StackOverflowError_klass()) {
    81     InstanceKlass* ik = InstanceKlass::cast(h_exception->klass());
    81     InstanceKlass* ik = InstanceKlass::cast(h_exception->klass());
    82     assert(ik->is_initialized(),
    82     assert(ik->is_initialized(),
    83            "need to increase min_stack_allowed calculation");
    83            "need to increase java_thread_min_stack_allowed calculation");
    84   }
    84   }
    85 #endif // ASSERT
    85 #endif // ASSERT
    86 
    86 
    87   if (thread->is_VM_thread()
    87   if (thread->is_VM_thread()
    88       || !thread->can_call_java()
    88       || !thread->can_call_java()
   225   Handle exception;
   225   Handle exception;
   226   if (!THREAD->has_pending_exception()) {
   226   if (!THREAD->has_pending_exception()) {
   227     Klass* k = SystemDictionary::StackOverflowError_klass();
   227     Klass* k = SystemDictionary::StackOverflowError_klass();
   228     oop e = InstanceKlass::cast(k)->allocate_instance(CHECK);
   228     oop e = InstanceKlass::cast(k)->allocate_instance(CHECK);
   229     exception = Handle(THREAD, e);  // fill_in_stack trace does gc
   229     exception = Handle(THREAD, e);  // fill_in_stack trace does gc
   230     assert(InstanceKlass::cast(k)->is_initialized(), "need to increase min_stack_allowed calculation");
   230     assert(InstanceKlass::cast(k)->is_initialized(), "need to increase java_thread_min_stack_allowed calculation");
   231     if (StackTraceInThrowable) {
   231     if (StackTraceInThrowable) {
   232       java_lang_Throwable::fill_in_stack_trace(exception, method());
   232       java_lang_Throwable::fill_in_stack_trace(exception, method());
   233     }
   233     }
   234     // Increment counter for hs_err file reporting
   234     // Increment counter for hs_err file reporting
   235     Atomic::inc(&Exceptions::_stack_overflow_errors);
   235     Atomic::inc(&Exceptions::_stack_overflow_errors);