Request for review 6840152: JVM crashes when heavyweight monitors are used

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Feb 16 06:19:30 PST 2011


There was a typo in the original review request:

    UseHeavyWeightMonitors -> UseHeavyMonitors

which Coleen fixed in a subsequent post. Also the scope of
the fix was revised in the second review request because
the semantics of the two flags are not the same.

Coleen's revised fix is focused on fixing the biased locking
crash when UseHeavyMonitors is enabled.

This logic:

+     if (!FLAG_IS_DEFAULT(UseBiasedLocking)) {

means "if UseBiasedLocking has been specified on the command
line". This handles the case where UseBiasedLocking is both
specified on the command line and the system default for
UseBiasedLocking is true. In that case, a warning is issued
because you don't get what you asked for...

Dan



On 2/15/2011 11:33 PM, David Holmes wrote:
> Hi Coleen,
>
> I don't see a UseHeavyWeightMonitors flag in the current source. And 
> the change in arguments.cpp refers to both UseHeavyMonitors and 
> UseFastLocking, so I'm confused about this "renaming".
>
> And I'm not sure this warning logic is quite right:
>
> +   // Turn off biased locking for locking debug mode flags
> +   if (!UseFastLocking || UseHeavyMonitors) {
> +     if (!FLAG_IS_DEFAULT(UseBiasedLocking)) {
> +       warning("Biased Locking is not supported with locking debug 
> flags");
> +     }
> +     UseBiasedLocking = false;
> +   }
>
> These FLAG macros always confuse me but surely the issue is whether 
> UseBiasedLocking is true, not whether it has its "default value" ???
>
> On some architectures the default value of UseBiasedLocking is false.
>
> David
>
>
> Coleen Phillimore said the following on 02/16/11 05:19:
>> Summary: Renamed UseHeavyWeightMonitors flag to !UseFastLocking flag 
>> and turn off biased locking if !UseFastLocking option is requested.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/6840152/
>> bug link at http://bugs.sun.com/view_bug.do?bug_id=6840152
>>
>> Tested against specjbb2005.
>>
>> Thanks,
>> Coleen
>>


More information about the hotspot-runtime-dev mailing list