8153026: Change logging tag 'verboseverification' to 'verification'
authorrprotacio
Tue, 05 Apr 2016 09:42:27 -0400
changeset 37261 659ed5b20b48
parent 37260 664b7520c44b
child 37262 e7b7bc691d7d
8153026: Change logging tag 'verboseverification' to 'verification' Summary: Changed UL tag to 'verification' Reviewed-by: hseigel, lfoltan
hotspot/src/share/vm/classfile/verifier.cpp
hotspot/src/share/vm/logging/logTag.hpp
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java
hotspot/test/runtime/logging/VerboseVerificationTest.java
hotspot/test/runtime/logging/VerificationTest.java
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Tue Apr 05 13:55:31 2016 +0200
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Tue Apr 05 09:42:27 2016 -0400
@@ -177,7 +177,7 @@
     if (can_failover && !HAS_PENDING_EXCEPTION &&
         (exception_name == vmSymbols::java_lang_VerifyError() ||
          exception_name == vmSymbols::java_lang_ClassFormatError())) {
-      log_info(verboseverification)("Fail over class verification to old verifier for: %s", klassName);
+      log_info(verification)("Fail over class verification to old verifier for: %s", klassName);
       log_info(classinit)("Fail over class verification to old verifier for: %s", klassName);
       exception_name = inference_verify(
         klass, message_buffer, message_buffer_len, THREAD);
@@ -193,8 +193,8 @@
   if (log_is_enabled(Info, classinit)){
     log_end_verification(Log(classinit)::info_stream(), klassName, exception_name, THREAD);
   }
-  if (log_is_enabled(Info, verboseverification)){
-    log_end_verification(Log(verboseverification)::info_stream(), klassName, exception_name, THREAD);
+  if (log_is_enabled(Info, verification)){
+    log_end_verification(Log(verification)::info_stream(), klassName, exception_name, THREAD);
   }
 
   if (HAS_PENDING_EXCEPTION) {
@@ -268,7 +268,7 @@
   }
 
   ResourceMark rm(THREAD);
-  log_info(verboseverification)("Verifying class %s with old format", klass->external_name());
+  log_info(verification)("Verifying class %s with old format", klass->external_name());
 
   jclass cls = (jclass) JNIHandles::make_local(env, klass->java_mirror());
   jint result;
@@ -580,7 +580,7 @@
 }
 
 void ClassVerifier::verify_class(TRAPS) {
-  log_info(verboseverification)("Verifying class %s with new format", _klass->external_name());
+  log_info(verification)("Verifying class %s with new format", _klass->external_name());
 
   Array<Method*>* methods = _klass->methods();
   int num_methods = methods->length();
@@ -600,7 +600,7 @@
   }
 
   if (was_recursively_verified()){
-    log_info(verboseverification)("Recursive verification detected for: %s", _klass->external_name());
+    log_info(verification)("Recursive verification detected for: %s", _klass->external_name());
     log_info(classinit)("Recursive verification detected for: %s",
                         _klass->external_name());
   }
@@ -609,7 +609,7 @@
 void ClassVerifier::verify_method(const methodHandle& m, TRAPS) {
   HandleMark hm(THREAD);
   _method = m;   // initialize _method
-  log_info(verboseverification)("Verifying method %s", m->name_and_sig_as_C_string());
+  log_info(verification)("Verifying method %s", m->name_and_sig_as_C_string());
 
 // For clang, the only good constant format string is a literal constant format string.
 #define bad_type_msg "Bad type on operand stack in %s"
@@ -656,9 +656,9 @@
   StackMapTable stackmap_table(&reader, &current_frame, max_locals, max_stack,
                                code_data, code_length, CHECK_VERIFY(this));
 
-  if (log_is_enabled(Info, verboseverification)) {
+  if (log_is_enabled(Info, verification)) {
     ResourceMark rm(THREAD);
-    stackmap_table.print_on(Log(verboseverification)::info_stream());
+    stackmap_table.print_on(Log(verification)::info_stream());
   }
 
   RawBytecodeStream bcs(m);
@@ -698,10 +698,10 @@
       VerificationType type, type2;
       VerificationType atype;
 
-      if (log_is_enabled(Info, verboseverification)) {
+      if (log_is_enabled(Info, verification)) {
         ResourceMark rm(THREAD);
-        current_frame.print_on(Log(verboseverification)::info_stream());
-        log_info(verboseverification)("offset = %d,  opcode = %s", bci, Bytecodes::name(opcode));
+        current_frame.print_on(Log(verification)::info_stream());
+        log_info(verification)("offset = %d,  opcode = %s", bci, Bytecodes::name(opcode));
       }
 
       // Make sure wide instruction is in correct format
@@ -2522,9 +2522,9 @@
             verify_error(ErrorContext::bad_code(bci),
               "Bad <init> method call from after the start of a try block");
             return;
-          } else if (log_is_enabled(Info, verboseverification)) {
+          } else if (log_is_enabled(Info, verification)) {
             ResourceMark rm(THREAD);
-            log_info(verboseverification)("Survived call to ends_in_athrow(): %s",
+            log_info(verification)("Survived call to ends_in_athrow(): %s",
                                           current_class()->name()->as_C_string());
           }
         }
--- a/hotspot/src/share/vm/logging/logTag.hpp	Tue Apr 05 13:55:31 2016 +0200
+++ b/hotspot/src/share/vm/logging/logTag.hpp	Tue Apr 05 09:42:27 2016 -0400
@@ -96,7 +96,7 @@
   LOG_TAG(thread) \
   LOG_TAG(tlab) \
   LOG_TAG(time) \
-  LOG_TAG(verboseverification) \
+  LOG_TAG(verification) \
   LOG_TAG(verify) \
   LOG_TAG(vmoperation) \
   LOG_TAG(vtables) \
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Apr 05 13:55:31 2016 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Apr 05 09:42:27 2016 -0400
@@ -433,7 +433,7 @@
   { "TraceStartupTime",           "-Xlog:startuptime" },
   { "TraceVMOperation",           "-Xlog:vmoperation=debug" },
   { "PrintVtables",               "-Xlog:vtables=debug" },
-  { "VerboseVerification",        "-Xlog:verboseverification" },
+  { "VerboseVerification",        "-Xlog:verification" },
   { NULL, NULL }
 };
 #endif //PRODUCT
--- a/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java	Tue Apr 05 13:55:31 2016 +0200
+++ b/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java	Tue Apr 05 09:42:27 2016 -0400
@@ -57,7 +57,7 @@
             exec("TraceStartupTime", "-Xlog:startuptime");
             exec("TraceVMOperation", "-Xlog:vmoperation=debug");
             exec("PrintVtables", "-Xlog:vtables=debug");
-            exec("VerboseVerification", "-Xlog:verboseverification");
+            exec("VerboseVerification", "-Xlog:verification");
         }
     };
 }
--- a/hotspot/test/runtime/logging/VerboseVerificationTest.java	Tue Apr 05 13:55:31 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 8150083
- * @summary verboseverification=info output should have output from the code
- * @library /testlibrary
- * @modules java.base/sun.misc
- *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
- * @run driver VerboseVerificationTest
- */
-
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
-
-public class VerboseVerificationTest {
-    static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldContain("[verboseverification]");
-        output.shouldContain("Verifying class VerboseVerificationTest$InternalClass with new format");
-        output.shouldContain("Verifying method VerboseVerificationTest$InternalClass.<init>()V");
-        output.shouldContain("End class verification for: VerboseVerificationTest$InternalClass");
-        output.shouldHaveExitValue(0);
-    }
-
-    static void analyzeOutputOff(ProcessBuilder pb) throws Exception {
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldNotContain("[verboseverification]");
-        output.shouldHaveExitValue(0);
-    }
-
-    public static void main(String[] args) throws Exception {
-        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:verboseverification=info",
-                                                                  InternalClass.class.getName());
-        analyzeOutputOn(pb);
-
-        pb = ProcessTools.createJavaProcessBuilder("-Xlog:verboseverification=off",
-                                                   InternalClass.class.getName());
-        analyzeOutputOff(pb);
-    }
-
-    public static class InternalClass {
-        public static void main(String[] args) throws Exception {
-            System.out.println("VerboseVerificationTest");
-        }
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/logging/VerificationTest.java	Tue Apr 05 09:42:27 2016 -0400
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8150083
+ * @summary verification=info output should have output from the code
+ * @library /testlibrary
+ * @modules java.base/sun.misc
+ *          java.management
+ * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
+ * @run driver VerificationTest
+ */
+
+import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.ProcessTools;
+
+public class VerificationTest {
+    static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldContain("[verification]");
+        output.shouldContain("Verifying class VerificationTest$InternalClass with new format");
+        output.shouldContain("Verifying method VerificationTest$InternalClass.<init>()V");
+        output.shouldContain("End class verification for: VerificationTest$InternalClass");
+        output.shouldHaveExitValue(0);
+    }
+
+    static void analyzeOutputOff(ProcessBuilder pb) throws Exception {
+        OutputAnalyzer output = new OutputAnalyzer(pb.start());
+        output.shouldNotContain("[verification]");
+        output.shouldHaveExitValue(0);
+    }
+
+    public static void main(String[] args) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:verification=info",
+                                                                  InternalClass.class.getName());
+        analyzeOutputOn(pb);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xlog:verification=off",
+                                                   InternalClass.class.getName());
+        analyzeOutputOff(pb);
+    }
+
+    public static class InternalClass {
+        public static void main(String[] args) throws Exception {
+            System.out.println("VerificationTest");
+        }
+    }
+}