hotspot/src/share/vm/opto/runtime.cpp
changeset 13521 97a23be06f4e
parent 12985 b8e776b87b52
child 13728 882756847a04
equal deleted inserted replaced
13520:a1ba7784ef54 13521:97a23be06f4e
   878     intptr_t* count_p = (intptr_t*)(((byte*)(data)) + in_bytes(CounterData::count_offset()));
   878     intptr_t* count_p = (intptr_t*)(((byte*)(data)) + in_bytes(CounterData::count_offset()));
   879     *count_p += DataLayout::counter_increment;
   879     *count_p += DataLayout::counter_increment;
   880   }
   880   }
   881 JRT_END
   881 JRT_END
   882 
   882 
   883 //-----------------------------------------------------------------------------
       
   884 // implicit exception support.
       
   885 
       
   886 static void report_null_exception_in_code_cache(address exception_pc) {
       
   887   ResourceMark rm;
       
   888   CodeBlob* n = CodeCache::find_blob(exception_pc);
       
   889   if (n != NULL) {
       
   890     tty->print_cr("#");
       
   891     tty->print_cr("# HotSpot Runtime Error, null exception in generated code");
       
   892     tty->print_cr("#");
       
   893     tty->print_cr("# pc where exception happened = " INTPTR_FORMAT, exception_pc);
       
   894 
       
   895     if (n->is_nmethod()) {
       
   896       methodOop method = ((nmethod*)n)->method();
       
   897       tty->print_cr("# Method where it happened %s.%s ", Klass::cast(method->method_holder())->name()->as_C_string(), method->name()->as_C_string());
       
   898       tty->print_cr("#");
       
   899       if (ShowMessageBoxOnError && UpdateHotSpotCompilerFileOnError &&
       
   900           CompilerOracle::has_command_file()) {
       
   901         const char* title    = "HotSpot Runtime Error";
       
   902         const char* question = "Do you want to exclude compilation of this method in future runs?";
       
   903         if (os::message_box(title, question)) {
       
   904           CompilerOracle::append_comment_to_file("");
       
   905           CompilerOracle::append_comment_to_file("Null exception in compiled code resulted in the following exclude");
       
   906           CompilerOracle::append_comment_to_file("");
       
   907           CompilerOracle::append_exclude_to_file(method);
       
   908           tty->print_cr("#");
       
   909           tty->print_cr("# %s has been updated to exclude the specified method", CompileCommandFile);
       
   910           tty->print_cr("#");
       
   911         }
       
   912       }
       
   913       fatal("Implicit null exception happened in compiled method");
       
   914     } else {
       
   915       n->print();
       
   916       fatal("Implicit null exception happened in generated stub");
       
   917     }
       
   918   }
       
   919   fatal("Implicit null exception at wrong place");
       
   920 }
       
   921 
       
   922 
       
   923 //-------------------------------------------------------------------------------------
   883 //-------------------------------------------------------------------------------------
   924 // register policy
   884 // register policy
   925 
   885 
   926 bool OptoRuntime::is_callee_saved_register(MachRegisterNumbers reg) {
   886 bool OptoRuntime::is_callee_saved_register(MachRegisterNumbers reg) {
   927   assert(reg >= 0 && reg < _last_Mach_Reg, "must be a machine register");
   887   assert(reg >= 0 && reg < _last_Mach_Reg, "must be a machine register");