8184281: -Xlog:startuptime does not include call to initPhase2
authorhseigel
Wed, 12 Jul 2017 21:24:07 -0400
changeset 46658 72c739e058d4
parent 46651 a0aef4e7599b
child 46659 2a4cca319443
8184281: -Xlog:startuptime does not include call to initPhase2 Summary: Remove "+module" and improve message Reviewed-by: alanb, gtriantafill
hotspot/src/share/vm/runtime/thread.cpp
hotspot/test/runtime/logging/StartupTimeTest.java
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Jul 12 11:59:51 2017 +0200
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Wed Jul 12 21:24:07 2017 -0400
@@ -3412,7 +3412,7 @@
 //
 //     After phase 2, The VM will begin search classes from -Xbootclasspath/a.
 static void call_initPhase2(TRAPS) {
-  TraceTime timer("Phase2 initialization", TRACETIME_LOG(Info, module, startuptime));
+  TraceTime timer("Initialize module system", TRACETIME_LOG(Info, startuptime));
 
   Klass* klass = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), true, CHECK);
 
--- a/hotspot/test/runtime/logging/StartupTimeTest.java	Wed Jul 12 11:59:51 2017 +0200
+++ b/hotspot/test/runtime/logging/StartupTimeTest.java	Wed Jul 12 21:24:07 2017 -0400
@@ -39,6 +39,7 @@
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldMatch("(Genesis, [0-9]+.[0-9]+ secs)");
         output.shouldMatch("(Start VMThread, [0-9]+.[0-9]+ secs)");
+        output.shouldMatch("(Initialize module system, [0-9]+.[0-9]+ secs)");
         output.shouldMatch("(Create VM, [0-9]+.[0-9]+ secs)");
         output.shouldHaveExitValue(0);
     }
@@ -49,18 +50,6 @@
         output.shouldHaveExitValue(0);
     }
 
-    static void analyzeModulesOutputOn(ProcessBuilder pb) throws Exception {
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldMatch("(Phase2 initialization, [0-9]+.[0-9]+ secs)");
-        output.shouldHaveExitValue(0);
-    }
-
-    static void analyzeModulesOutputOff(ProcessBuilder pb) throws Exception {
-        OutputAnalyzer output = new OutputAnalyzer(pb.start());
-        output.shouldNotContain("[module,startuptime]");
-        output.shouldHaveExitValue(0);
-    }
-
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime",
                                                                   InnerClass.class.getName());
@@ -69,14 +58,6 @@
         pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime=off",
                                                    InnerClass.class.getName());
         analyzeOutputOff(pb);
-
-        pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+module",
-                                                   InnerClass.class.getName());
-        analyzeModulesOutputOn(pb);
-
-        pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime+module=off",
-                                                   InnerClass.class.getName());
-        analyzeModulesOutputOff(pb);
     }
 
     public static class InnerClass {