Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 2239:c08677f98289
6840152: JVM crashes when heavyweight monitors are used
Summary: Turn off biased locking if !UseFastLocking or UseHeavyMonitors options are requested.
Reviewed-by: phh, never, dcubed, dholmes
author | coleenp |
---|---|
date | Wed, 16 Feb 2011 11:34:44 -0500 |
parents | 27e4ea99855d |
children | f77b3ec064b0 |
comparison
equal
deleted
inserted
replaced
2238:5415131bc5ab | 2239:c08677f98289 |
---|---|
3101 set_bytecode_flags(); | 3101 set_bytecode_flags(); |
3102 | 3102 |
3103 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. | 3103 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. |
3104 set_aggressive_opts_flags(); | 3104 set_aggressive_opts_flags(); |
3105 | 3105 |
3106 // Turn off biased locking for locking debug mode flags, | |
3107 // which are subtlely different from each other but neither works with | |
3108 // biased locking. | |
3109 if (!UseFastLocking || UseHeavyMonitors) { | |
3110 if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) { | |
3111 // flag set to true on command line; warn the user that they | |
3112 // can't enable biased locking here | |
3113 warning("Biased Locking is not supported with locking debug flags" | |
3114 "; ignoring UseBiasedLocking flag." ); | |
3115 } | |
3116 UseBiasedLocking = false; | |
3117 } | |
3118 | |
3106 #ifdef CC_INTERP | 3119 #ifdef CC_INTERP |
3107 // Clear flags not supported by the C++ interpreter | 3120 // Clear flags not supported by the C++ interpreter |
3108 FLAG_SET_DEFAULT(ProfileInterpreter, false); | 3121 FLAG_SET_DEFAULT(ProfileInterpreter, false); |
3109 FLAG_SET_DEFAULT(UseBiasedLocking, false); | 3122 FLAG_SET_DEFAULT(UseBiasedLocking, false); |
3110 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); | 3123 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); |