comparison src/share/vm/opto/runtime.cpp @ 6633:a5dd6e3ef9f3

6677625: Move platform specific flags from globals.hpp to globals_<arch>.hpp Reviewed-by: kvn, dholmes, coleenp Contributed-by: Tao Mao <tao.mao@oracle.com>
author twisti
date Mon, 27 Aug 2012 15:17:17 -0700
parents 5142b5110214
children c38f13903fdf da91efe96a93
comparison
equal deleted inserted replaced
6632:a1c7f6472621 6633:a5dd6e3ef9f3
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");