Merge
authorrprotacio
Fri, 25 Mar 2016 01:20:14 +0000
changeset 37191 bb9fe1419618
parent 37189 3cda05a8c3f2 (current diff)
parent 37190 09d719d466a6 (diff)
child 37193 c42522f25d53
Merge
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp	Fri Mar 25 01:20:14 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -461,8 +461,6 @@
 
 #endif //PRODUCT
 
-static int max_objArray_print_length = 4;
-
 void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
   assert(obj->is_objArray(), "must be objArray");
   st->print("a ");
@@ -470,16 +468,6 @@
   int len = objArrayOop(obj)->length();
   st->print("[%d] ", len);
   obj->print_address_on(st);
-  if (NOT_PRODUCT(PrintOopAddress ||) PrintMiscellaneous && (WizardMode || Verbose)) {
-    st->print("{");
-    for (int i = 0; i < len; i++) {
-      if (i > max_objArray_print_length) {
-        st->print("..."); break;
-      }
-      st->print(" " INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i));
-    }
-    st->print(" }");
-  }
 }
 
 const char* ObjArrayKlass::internal_name() const {
--- a/hotspot/src/share/vm/oops/oop.cpp	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/src/share/vm/oops/oop.cpp	Fri Mar 25 01:20:14 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,9 +44,8 @@
 }
 
 void oopDesc::print_address_on(outputStream* st) const {
-  if (PrintOopAddress) {
-    st->print("{" INTPTR_FORMAT "}", p2i(this));
-  }
+  st->print("{" INTPTR_FORMAT "}", p2i(this));
+
 }
 
 void oopDesc::print()         { print_on(tty);         }
@@ -76,7 +75,7 @@
     st->print("NULL");
   } else if (java_lang_String::is_instance(obj)) {
     java_lang_String::print(obj, st);
-    if (PrintOopAddress) print_address_on(st);
+    print_address_on(st);
   } else {
     klass()->oop_print_value_on(obj, st);
   }
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri Mar 25 01:20:14 2016 +0000
@@ -385,6 +385,7 @@
   { "JNIDetachReleasesMonitors",     JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "UseAltSigs",                    JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "SegmentedHeapDumpThreshold",    JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
+  { "PrintOopAddress",               JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
 
 #ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
   { "dep > obs",                    JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
--- a/hotspot/src/share/vm/runtime/globals.hpp	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Fri Mar 25 01:20:14 2016 +0000
@@ -951,9 +951,6 @@
   notproduct(bool, PrintMallocFree, false,                                  \
           "Trace calls to C heap malloc/free allocation")                   \
                                                                             \
-  product(bool, PrintOopAddress, false,                                     \
-          "Always print the location of the oop")                           \
-                                                                            \
   notproduct(bool, VerifyCodeCache, false,                                  \
           "Verify code cache on memory allocation/deallocation")            \
                                                                             \
--- a/hotspot/src/share/vm/utilities/exceptions.cpp	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/src/share/vm/utilities/exceptions.cpp	Fri Mar 25 01:20:14 2016 +0000
@@ -508,12 +508,13 @@
   ResourceMark rm;
   Symbol* message = java_lang_Throwable::detail_message(exception());
   if (message != NULL) {
-    log_info(exceptions)("Exception <%s: %s> (" INTPTR_FORMAT ")\n thrown in %s",
+    log_info(exceptions)("Exception <%s: %s>\n thrown in %s",
                          exception->print_value_string(),
-                         message->as_C_string(), p2i(exception()), tempst.as_string());
+                         message->as_C_string(),
+                         tempst.as_string());
   } else {
-    log_info(exceptions)("Exception <%s> (" INTPTR_FORMAT ")\n thrown in %s",
+    log_info(exceptions)("Exception <%s>\n thrown in %s",
                          exception->print_value_string(),
-                         p2i(exception()), tempst.as_string());
+                         tempst.as_string());
   }
 }
--- a/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java	Fri Mar 25 01:20:14 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-Xlog:exceptions=info", "NoClassFound");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldContain("<a 'java/lang/ClassNotFoundException': NoClassFound>");
+        output.shouldContain("<a 'java/lang/ClassNotFoundException'").shouldContain(": NoClassFound>");
         output.shouldNotContain("<a 'java/lang/ClassNotFoundException'>");
         output.shouldHaveExitValue(1);
     }
--- a/hotspot/test/runtime/logging/ExceptionsTest.java	Thu Mar 24 23:42:46 2016 +0000
+++ b/hotspot/test/runtime/logging/ExceptionsTest.java	Fri Mar 25 01:20:14 2016 +0000
@@ -45,7 +45,7 @@
 
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldContain("<a 'java/lang/RuntimeException': Test exception 1 for logging>");
+        output.shouldContain("<a 'java/lang/RuntimeException'").shouldContain(": Test exception 1 for logging>");
         output.shouldContain(" thrown in interpreter method ");
         output.shouldHaveExitValue(0);
     }