void vm_exit_during_initialization(symbolHandle ex, const char* message) { ResourceMark rm; vm_notify_during_shutdown(ex->as_C_string(), message); // Failure during initialization, we don't want to dump core vm_abort(false); }
// Placeholder objects represent classes currently being loaded. // All threads examining the placeholder table must hold the // SystemDictionary_lock, so we don't need special precautions // on store ordering here. void PlaceholderTable::add_entry(int index, unsigned int hash, symbolHandle class_name, Handle class_loader, bool havesupername, symbolHandle supername){ assert_locked_or_safepoint(SystemDictionary_lock); assert(!class_name.is_null(), "adding NULL obj"); // Both readers and writers are locked so it's safe to just // create the placeholder and insert it in the list without a membar. PlaceholderEntry* entry = new_entry(hash, class_name(), class_loader(), havesupername, supername()); add_entry(index, entry); }
symbolOop SymbolTable::lookup(symbolHandle sym, int begin, int end, TRAPS) { char* buffer; int index, len; unsigned int hashValue; char* name; { debug_only(No_Safepoint_Verifier nsv;) name = (char*)sym->base() + begin; len = end - begin; hashValue = hash_symbol(name, len); index = the_table()->hash_to_index(hashValue); symbolOop s = the_table()->lookup(index, name, len, hashValue); // Found if (s != NULL) return s; }
bool Exceptions::special_exception(Thread* thread, const char* file, int line, symbolHandle h_name, const char* message) { // bootstrapping check if (!Universe::is_fully_initialized()) { if (h_name.is_null()) { // atleast an informative message. vm_exit_during_initialization("Exception", message); } else { vm_exit_during_initialization(h_name, message); } ShouldNotReachHere(); } if (thread->is_VM_thread() || thread->is_Compiler_thread() ) { // We do not care what kind of exception we get for the vm-thread or a thread which // is compiling. We just install a dummy exception object thread->set_pending_exception(Universe::vm_exception(), file, line); return true; } return false; }
void vm_exit_during_initialization(symbolHandle ex, const char* message) { ResourceMark rm; vm_notify_during_shutdown(ex->as_C_string(), message); vm_abort(false); }