# HG changeset patch # User coleenp # Date 1297902357 28800 # Node ID a959935a5732271c3cb971d90480d65d89775995 # Parent 3adec115d40d5eb40122926db4cd49ea73848774# Parent c08677f982895c7e89d370768ec261c00b0d6e2d Merge diff -r 3adec115d40d -r a959935a5732 src/share/vm/runtime/arguments.cpp --- a/src/share/vm/runtime/arguments.cpp Wed Feb 16 17:12:31 2011 -0500 +++ b/src/share/vm/runtime/arguments.cpp Wed Feb 16 16:25:57 2011 -0800 @@ -3103,6 +3103,19 @@ // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled. 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 // Clear flags not supported by the C++ interpreter FLAG_SET_DEFAULT(ProfileInterpreter, false);