mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6840152: JVM crashes when heavyweight monitors are used
Turn off biased locking if !UseFastLocking or UseHeavyMonitors options are requested. Reviewed-by: phh, never, dcubed, dholmes
This commit is contained in:
parent
89f51d79cc
commit
9c5679fe53
1 changed files with 13 additions and 0 deletions
|
@ -3103,6 +3103,19 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
|
||||||
// Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
|
// Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
|
||||||
set_aggressive_opts_flags();
|
set_aggressive_opts_flags();
|
||||||
|
|
||||||
|
// Turn off biased locking for locking debug mode flags,
|
||||||
|
// which are subtlely different from each other but neither works with
|
||||||
|
// biased locking.
|
||||||
|
if (!UseFastLocking || UseHeavyMonitors) {
|
||||||
|
if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {
|
||||||
|
// flag set to true on command line; warn the user that they
|
||||||
|
// can't enable biased locking here
|
||||||
|
warning("Biased Locking is not supported with locking debug flags"
|
||||||
|
"; ignoring UseBiasedLocking flag." );
|
||||||
|
}
|
||||||
|
UseBiasedLocking = false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CC_INTERP
|
#ifdef CC_INTERP
|
||||||
// Clear flags not supported by the C++ interpreter
|
// Clear flags not supported by the C++ interpreter
|
||||||
FLAG_SET_DEFAULT(ProfileInterpreter, false);
|
FLAG_SET_DEFAULT(ProfileInterpreter, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue