mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization
Reviewed-by: thartmann
This commit is contained in:
parent
89d8e788f5
commit
d0ec59a9fb
6 changed files with 23 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -80,6 +80,15 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
|
||||||
FLAG_SET_DEFAULT(EnableJVMCI, true);
|
FLAG_SET_DEFAULT(EnableJVMCI, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!EnableJVMCI) {
|
||||||
|
// Switch off eager JVMCI initialization if JVMCI is disabled.
|
||||||
|
// Don't throw error if EagerJVMCI is set to allow testing.
|
||||||
|
if (EagerJVMCI) {
|
||||||
|
FLAG_SET_DEFAULT(EagerJVMCI, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JVMCI_FLAG_CHECKED(EagerJVMCI)
|
||||||
|
|
||||||
CHECK_NOT_SET(JVMCITraceLevel, EnableJVMCI)
|
CHECK_NOT_SET(JVMCITraceLevel, EnableJVMCI)
|
||||||
CHECK_NOT_SET(JVMCICounterSize, EnableJVMCI)
|
CHECK_NOT_SET(JVMCICounterSize, EnableJVMCI)
|
||||||
CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
|
CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -55,6 +55,9 @@
|
||||||
experimental(bool, BootstrapJVMCI, false, \
|
experimental(bool, BootstrapJVMCI, false, \
|
||||||
"Bootstrap JVMCI before running Java main method") \
|
"Bootstrap JVMCI before running Java main method") \
|
||||||
\
|
\
|
||||||
|
experimental(bool, EagerJVMCI, false, \
|
||||||
|
"Force eager JVMCI initialization") \
|
||||||
|
\
|
||||||
experimental(bool, PrintBootstrap, true, \
|
experimental(bool, PrintBootstrap, true, \
|
||||||
"Print JVMCI bootstrap progress and summary") \
|
"Print JVMCI bootstrap progress and summary") \
|
||||||
\
|
\
|
||||||
|
|
|
@ -3863,10 +3863,11 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
|
||||||
|
|
||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
if (EnableJVMCI) {
|
if (EnableJVMCI) {
|
||||||
// Initialize JVMCI eagerly if JVMCIPrintProperties is enabled.
|
// Initialize JVMCI eagerly when it is explicitly requested.
|
||||||
|
// Or when JVMCIPrintProperties is enabled.
|
||||||
// The JVMCI Java initialization code will read this flag and
|
// The JVMCI Java initialization code will read this flag and
|
||||||
// do the printing if it's set.
|
// do the printing if it's set.
|
||||||
bool init = JVMCIPrintProperties;
|
bool init = EagerJVMCI || JVMCIPrintProperties;
|
||||||
|
|
||||||
if (!init) {
|
if (!init) {
|
||||||
// 8145270: Force initialization of JVMCI runtime otherwise requests for blocking
|
// 8145270: Force initialization of JVMCI runtime otherwise requests for blocking
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
|
||||||
* @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
* @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||||
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
|
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
|
||||||
|
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
|
||||||
* compiler.rangechecks.TestRangeCheckSmearing
|
* compiler.rangechecks.TestRangeCheckSmearing
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -33,6 +33,7 @@
|
||||||
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
* sun.hotspot.WhiteBox$WhiteBoxPermission
|
||||||
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
|
||||||
* -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss512K
|
* -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss512K
|
||||||
|
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
|
||||||
* -XX:CompileCommand=exclude,compiler.uncommontrap.Test8009761::m2
|
* -XX:CompileCommand=exclude,compiler.uncommontrap.Test8009761::m2
|
||||||
* compiler.uncommontrap.Test8009761
|
* compiler.uncommontrap.Test8009761
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -35,6 +35,7 @@
|
||||||
* -XX:-TieredCompilation -XX:+WhiteBoxAPI
|
* -XX:-TieredCompilation -XX:+WhiteBoxAPI
|
||||||
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
|
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
|
||||||
* -XX:-BackgroundCompilation -XX:-UseCounterDecay
|
* -XX:-BackgroundCompilation -XX:-UseCounterDecay
|
||||||
|
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
|
||||||
* compiler.whitebox.ForceNMethodSweepTest
|
* compiler.whitebox.ForceNMethodSweepTest
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue