< prev index next >

src/share/vm/runtime/deoptimization.cpp

Print this page
rev 9019 : [mq]: format.patch

@@ -51,12 +51,10 @@
 #include "runtime/vframeArray.hpp"
 #include "runtime/vframe_hp.hpp"
 #include "utilities/events.hpp"
 #include "utilities/xmlstream.hpp"
 
-PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
 bool DeoptimizationMarker::_is_active = false;
 
 Deoptimization::UnrollBlock::UnrollBlock(int  size_of_deoptimized_frame,
                                          int  caller_adjustment,
                                          int  caller_actual_parameters,

@@ -110,11 +108,11 @@
   ttyLocker ttyl;
   tty->print_cr("UnrollBlock");
   tty->print_cr("  size_of_deoptimized_frame = %d", _size_of_deoptimized_frame);
   tty->print(   "  frame_sizes: ");
   for (int index = 0; index < number_of_frames(); index++) {
-    tty->print("%d ", frame_sizes()[index]);
+    tty->print(INTX_FORMAT " ", frame_sizes()[index]);
   }
   tty->cr();
 }
 
 

@@ -204,22 +202,22 @@
         assert(result == NULL || result->is_oop(), "must be oop");
         return_value = Handle(thread, result);
         assert(Universe::heap()->is_in_or_null(result), "must be heap pointer");
         if (TraceDeoptimization) {
           ttyLocker ttyl;
-          tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, (void *)result, thread);
+          tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, p2i(result), p2i(thread));
         }
       }
       if (objects != NULL) {
         JRT_BLOCK
           realloc_failures = realloc_objects(thread, &deoptee, objects, THREAD);
         JRT_END
         reassign_fields(&deoptee, &map, objects, realloc_failures);
 #ifndef PRODUCT
         if (TraceDeoptimization) {
           ttyLocker ttyl;
-          tty->print_cr("REALLOC OBJECTS in thread " INTPTR_FORMAT, thread);
+          tty->print_cr("REALLOC OBJECTS in thread " INTPTR_FORMAT, p2i(thread));
           print_objects(objects, realloc_failures);
         }
 #endif
       }
       if (save_oop_result) {

@@ -243,17 +241,17 @@
             for (int j = 0; j < monitors->length(); j++) {
               MonitorInfo* mi = monitors->at(j);
               if (mi->eliminated()) {
                 if (first) {
                   first = false;
-                  tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, thread);
+                  tty->print_cr("RELOCK OBJECTS in thread " INTPTR_FORMAT, p2i(thread));
                 }
                 if (mi->owner_is_scalar_replaced()) {
                   Klass* k = java_lang_Class::as_Klass(mi->owner_klass());
                   tty->print_cr("     failed reallocation for klass %s", k->external_name());
                 } else {
-                  tty->print_cr("     object <" INTPTR_FORMAT "> locked", (void *)mi->owner());
+                  tty->print_cr("     object <" INTPTR_FORMAT "> locked", p2i(mi->owner()));
                 }
               }
             }
           }
 #endif

@@ -548,15 +546,16 @@
   vframeArray* array = thread->vframe_array_head();
 
 #ifndef PRODUCT
   if (TraceDeoptimization) {
     ttyLocker ttyl;
-    tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d", thread, array, exec_mode);
+    tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d",
+                  p2i(thread), p2i(array), exec_mode);
   }
 #endif
   Events::log(thread, "DEOPT UNPACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT " mode %d",
-              stub_frame.pc(), stub_frame.sp(), exec_mode);
+              p2i(stub_frame.pc()), p2i(stub_frame.sp()), exec_mode);
 
   UnrollBlock* info = array->unroll_block();
 
   // Unpack the interpreter frames and any adapter frame (c2 only) we might create.
   array->unpack_to_stack(stub_frame, exec_mode, info->caller_actual_parameters());

@@ -688,11 +687,11 @@
         tty->print_cr("  callee_size_of_parameters = %d", callee_size_of_parameters);
         tty->print_cr("  callee_max_locals = %d", callee_max_locals);
         tty->print_cr("  top_frame_expression_stack_adjustment = %d", top_frame_expression_stack_adjustment);
         tty->print_cr("  exec_mode = %d", exec_mode);
         tty->print_cr("  cur_invoke_parameter_size = %d", cur_invoke_parameter_size);
-        tty->print_cr("  Thread = " INTPTR_FORMAT ", thread ID = " UINTX_FORMAT, thread, thread->osthread()->thread_id());
+        tty->print_cr("  Thread = " INTPTR_FORMAT ", thread ID = %d", p2i(thread), thread->osthread()->thread_id());
         tty->print_cr("  Interpreted frames:");
         for (int k = 0; k < cur_array->frames(); k++) {
           vframeArrayElement* el = cur_array->element(k);
           tty->print_cr("    %s (bci %d)", el->method()->name_and_sig_as_C_string(), el->bci());
         }

@@ -964,11 +963,11 @@
   for (int i = 0; i < objects->length(); i++) {
     ObjectValue* sv = (ObjectValue*) objects->at(i);
     KlassHandle k(java_lang_Class::as_Klass(sv->klass()->as_ConstantOopReadValue()->value()()));
     Handle obj = sv->value();
 
-    tty->print("     object <" INTPTR_FORMAT "> of type ", (void *)sv->value()());
+    tty->print("     object <" INTPTR_FORMAT "> of type ", p2i(sv->value()()));
     k->print_value();
     assert(obj.not_null() || realloc_failures, "reallocation was missed");
     if (obj.is_null()) {
       tty->print(" allocation failed");
     } else {

@@ -983,16 +982,16 @@
 }
 #endif
 #endif // COMPILER2
 
 vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk, bool realloc_failures) {
-  Events::log(thread, "DEOPT PACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, fr.pc(), fr.sp());
+  Events::log(thread, "DEOPT PACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, p2i(fr.pc()), p2i(fr.sp()));
 
 #ifndef PRODUCT
   if (TraceDeoptimization) {
     ttyLocker ttyl;
-    tty->print("DEOPT PACKING thread " INTPTR_FORMAT " ", thread);
+    tty->print("DEOPT PACKING thread " INTPTR_FORMAT " ", p2i(thread));
     fr.print_on(tty);
     tty->print_cr("     Virtual frames (innermost first):");
     for (int index = 0; index < chunk->length(); index++) {
       compiledVFrame* vf = chunk->at(index);
       tty->print("       %2d - ", index);

@@ -1033,11 +1032,11 @@
   assert(array->structural_compare(thread, chunk), "just checking");
 
 #ifndef PRODUCT
   if (TraceDeoptimization) {
     ttyLocker ttyl;
-    tty->print_cr("     Created vframeArray " INTPTR_FORMAT, array);
+    tty->print_cr("     Created vframeArray " INTPTR_FORMAT, p2i(array));
   }
 #endif // PRODUCT
 
   return array;
 }

@@ -1295,11 +1294,11 @@
   // before we are done with it.
   nmethodLocker nl(fr.pc());
 
   // Log a message
   Events::log(thread, "Uncommon trap: trap_request=" PTR32_FORMAT " fr.pc=" INTPTR_FORMAT,
-              trap_request, fr.pc());
+              trap_request, p2i(fr.pc()));
 
   {
     ResourceMark rm;
 
     // Revoke biases of any monitors in the frame to ensure we can migrate them

@@ -1329,11 +1328,11 @@
     MethodData* trap_mdo =
       get_method_data(thread, trap_method, create_if_missing);
 
     // Log a message
     Events::log_deopt_message(thread, "Uncommon trap: reason=%s action=%s pc=" INTPTR_FORMAT " method=%s @ %d",
-                              trap_reason_name(reason), trap_action_name(action), fr.pc(),
+                              trap_reason_name(reason), trap_action_name(action), p2i(fr.pc()),
                               trap_method->name_and_sig_as_C_string(), trap_bci);
 
     // Print a bunch of diagnostics, if requested.
     if (TraceDeoptimization || LogCompilation) {
       ResourceMark rm;

@@ -1384,11 +1383,11 @@
       }
       if (TraceDeoptimization) {  // make noise on the tty
         tty->print("Uncommon trap occurred in");
         nm->method()->print_short_name(tty);
         tty->print(" (@" INTPTR_FORMAT ") thread=" UINTX_FORMAT " reason=%s action=%s unloaded_class_index=%d",
-                   fr.pc(),
+                   p2i(fr.pc()),
                    os::current_thread_id(),
                    trap_reason_name(reason),
                    trap_action_name(action),
                    unloaded_class_index);
         if (class_name != NULL) {
< prev index next >