8195632: [Graal] Introduce EagerJVMCI flag to force eager JVMCI initialization

Reviewed-by: thartmann
This commit is contained in:
Vladimir Kozlov 2018-03-01 09:03:30 -08:00
parent 89d8e788f5
commit d0ec59a9fb
6 changed files with 23 additions and 7 deletions

View File

@ -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.
*
* 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);
}
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(JVMCICounterSize, EnableJVMCI)
CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)

View File

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -55,6 +55,9 @@
experimental(bool, BootstrapJVMCI, false, \
"Bootstrap JVMCI before running Java main method") \
\
experimental(bool, EagerJVMCI, false, \
"Force eager JVMCI initialization") \
\
experimental(bool, PrintBootstrap, true, \
"Print JVMCI bootstrap progress and summary") \
\

View File

@ -3863,10 +3863,11 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
#if INCLUDE_JVMCI
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
// do the printing if it's set.
bool init = JVMCIPrintProperties;
bool init = EagerJVMCI || JVMCIPrintProperties;
if (!init) {
// 8145270: Force initialization of JVMCI runtime otherwise requests for blocking

View File

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -32,6 +32,7 @@
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
* compiler.rangechecks.TestRangeCheckSmearing
*
*/

View File

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -33,6 +33,7 @@
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
* -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -Xss512K
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
* -XX:CompileCommand=exclude,compiler.uncommontrap.Test8009761::m2
* compiler.uncommontrap.Test8009761
*/

View File

@ -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.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,7 @@
* -XX:-TieredCompilation -XX:+WhiteBoxAPI
* -XX:CompileCommand=compileonly,compiler.whitebox.SimpleTestCaseHelper::*
* -XX:-BackgroundCompilation -XX:-UseCounterDecay
* -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI
* compiler.whitebox.ForceNMethodSweepTest
*/