diff src/share/vm/runtime/deoptimization.cpp @ 7154:5d0bb7d52783

changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author Doug Simon <doug.simon@oracle.com>
date Wed, 12 Dec 2012 21:36:40 +0100
parents a818db37b7be
children 291ffc492eb6 8a3efb8c831d
line wrap: on
line diff
--- a/src/share/vm/runtime/deoptimization.cpp	Wed Dec 12 15:46:11 2012 +0100
+++ b/src/share/vm/runtime/deoptimization.cpp	Wed Dec 12 21:36:40 2012 +0100
@@ -1310,8 +1310,8 @@
       if (thread->graal_deopt_info() != NULL) {
         oop deopt_info = thread->graal_deopt_info();
         if (java_lang_String::is_instance(deopt_info)) {
-          char buf[1024];
-          java_lang_String::as_utf8_string(deopt_info, buf, 1024);
+          char buf[O_BUFLEN];
+          java_lang_String::as_utf8_string(deopt_info, buf, O_BUFLEN);
           tty->print_cr("deopt info: %s", buf);
         } else {
           tty->print_cr("deopt info:");
@@ -1856,40 +1856,24 @@
 Deoptimization::DeoptAction Deoptimization::_unloaded_action
   = Deoptimization::Action_reinterpret;
 const char* Deoptimization::_trap_reason_name[Reason_LIMIT] = {
-#ifdef GRAAL
+  // Note:  Keep this in sync. with enum DeoptReason.
   "none",
   "null_check",
+  "null_assert" GRAAL_ONLY("|unreached0"),
   "range_check",
   "class_check",
   "array_check",
+  "intrinsic" GRAAL_ONLY("|type_checked_inlining"),
+  "bimorphic" GRAAL_ONLY("|optimized_type_check"),
+  "unloaded",
+  "uninitialized" GRAAL_ONLY("|unresolved"),
   "unreached",
-  "type_checked_inlining",
-  "optimized_type_check",
-  "not_compiled_exception_handler",
-  "unresolved",
-  "jsr_mismatch",
-  "div0_check",
-  "constraint"
-#else
-  // Note:  Keep this in sync. with enum DeoptReason.
-  "none",
-  "null_check",
-  "null_assert",
-  "range_check",
-  "class_check",
-  "array_check",
-  "intrinsic",
-  "bimorphic",
-  "unloaded",
-  "uninitialized",
-  "unreached",
-  "unhandled",
+  "unhandled" GRAAL_ONLY("|not_compiled_exception_handler"),
   "constraint",
   "div0_check",
-  "age",
+  "age" GRAAL_ONLY("|jsr_mismatch"),
   "predicate",
   "loop_limit_check"
-#endif
 };
 const char* Deoptimization::_trap_action_name[Action_LIMIT] = {
   // Note:  Keep this in sync. with enum DeoptAction.