hotspot/src/share/vm/utilities/exceptions.cpp
changeset 47103 a993ec29ec75
parent 46968 9119841280f4
equal deleted inserted replaced
47098:e704f55561c3 47103:a993ec29ec75
    85            "need to increase java_thread_min_stack_allowed calculation");
    85            "need to increase java_thread_min_stack_allowed calculation");
    86   }
    86   }
    87 #endif // ASSERT
    87 #endif // ASSERT
    88 
    88 
    89   if (thread->is_VM_thread()
    89   if (thread->is_VM_thread()
    90       || !thread->can_call_java()
    90       || !thread->can_call_java()) {
    91       || DumpSharedSpaces ) {
       
    92     // We do not care what kind of exception we get for the vm-thread or a thread which
    91     // We do not care what kind of exception we get for the vm-thread or a thread which
    93     // is compiling.  We just install a dummy exception object
    92     // is compiling.  We just install a dummy exception object
    94     //
       
    95     // We also cannot throw a proper exception when dumping, because we cannot run
       
    96     // Java bytecodes now. A dummy exception will suffice.
       
    97     thread->set_pending_exception(Universe::vm_exception(), file, line);
    93     thread->set_pending_exception(Universe::vm_exception(), file, line);
    98     return true;
    94     return true;
    99   }
    95   }
   100 
    96 
   101   return false;
    97   return false;
   112     }
   108     }
   113     ShouldNotReachHere();
   109     ShouldNotReachHere();
   114   }
   110   }
   115 
   111 
   116   if (thread->is_VM_thread()
   112   if (thread->is_VM_thread()
   117       || !thread->can_call_java()
   113       || !thread->can_call_java()) {
   118       || DumpSharedSpaces ) {
       
   119     // We do not care what kind of exception we get for the vm-thread or a thread which
   114     // We do not care what kind of exception we get for the vm-thread or a thread which
   120     // is compiling.  We just install a dummy exception object
   115     // is compiling.  We just install a dummy exception object
   121     //
       
   122     // We also cannot throw a proper exception when dumping, because we cannot run
       
   123     // Java bytecodes now. A dummy exception will suffice.
       
   124     thread->set_pending_exception(Universe::vm_exception(), file, line);
   116     thread->set_pending_exception(Universe::vm_exception(), file, line);
   125     return true;
   117     return true;
   126   }
   118   }
   127   return false;
   119   return false;
   128 }
   120 }