mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8184281: -Xlog:startuptime does not include call to initPhase2
Remove "+module" and improve message Reviewed-by: alanb, gtriantafill
This commit is contained in:
parent
b84db08380
commit
30580af958
2 changed files with 2 additions and 21 deletions
|
@ -3412,7 +3412,7 @@ static void call_initPhase1(TRAPS) {
|
||||||
//
|
//
|
||||||
// After phase 2, The VM will begin search classes from -Xbootclasspath/a.
|
// After phase 2, The VM will begin search classes from -Xbootclasspath/a.
|
||||||
static void call_initPhase2(TRAPS) {
|
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);
|
Klass* klass = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_System(), true, CHECK);
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ public class StartupTimeTest {
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldMatch("(Genesis, [0-9]+.[0-9]+ secs)");
|
output.shouldMatch("(Genesis, [0-9]+.[0-9]+ secs)");
|
||||||
output.shouldMatch("(Start VMThread, [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.shouldMatch("(Create VM, [0-9]+.[0-9]+ secs)");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -49,18 +50,6 @@ public class StartupTimeTest {
|
||||||
output.shouldHaveExitValue(0);
|
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 {
|
public static void main(String[] args) throws Exception {
|
||||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime",
|
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime",
|
||||||
InnerClass.class.getName());
|
InnerClass.class.getName());
|
||||||
|
@ -69,14 +58,6 @@ public class StartupTimeTest {
|
||||||
pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime=off",
|
pb = ProcessTools.createJavaProcessBuilder("-Xlog:startuptime=off",
|
||||||
InnerClass.class.getName());
|
InnerClass.class.getName());
|
||||||
analyzeOutputOff(pb);
|
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 {
|
public static class InnerClass {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue