# HG changeset patch # User hseigel # Date 1499909047 14400 # Node ID 72c739e058d47f22252a927d8b81ad0b94beefb7 # Parent a0aef4e7599bdffcc4181817e5aadea542346694 8184281: -Xlog:startuptime does not include call to initPhase2 Summary: Remove "+module" and improve message Reviewed-by: alanb, gtriantafill diff -r a0aef4e7599b -r 72c739e058d4 hotspot/src/share/vm/runtime/thread.cpp --- 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); diff -r a0aef4e7599b -r 72c739e058d4 hotspot/test/runtime/logging/StartupTimeTest.java --- 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 {