RFR (XS): 8062950: Bug in locking code when UseOptoBiasInlining is disabled: assert(dmw->is_neutral()) failed: invariant

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Nov 7 01:42:45 UTC 2014


I doubt anyone will look on this code in foreseeable future.
But to make it simple for backport (8u40) I will go with your original fix.

Thanks,
Vladimir

On 11/6/14 2:40 AM, Doerr, Martin wrote:
> Hi Vladimir,
>
> thanks for replying quickly.
>
> Are you sure you want the swap_reg_contains_mark flag to get removed?
> There's a TODO in front of the changed line:
>      // TODO: optimize away redundant LDs of obj->mark and improve the markword triage
>      // order to reduce the number of conditional branches in the most common cases.
>      // Beware -- there's a subtle invariant that fetch of the markword
>      // at [FETCH], below, will never observe a biased encoding (*101b).
>      // If this invariant is not held we risk exclusion (safety) failure.
>
> So I'm not sure if the flag may be useful again when somebody works on this TODO.
>
> Best regards,
> Martin
>
>
> -----Original Message-----
> From: Vladimir Kozlov [mailto:vladimir.kozlov at oracle.com]
> Sent: Donnerstag, 6. November 2014 00:31
> To: Christian Thalinger; Doerr, Martin
> Cc: hotspot-compiler-dev at openjdk.java.net; Hotspot dev runtime
> Subject: Re: RFR (XS): 8062950: Bug in locking code when UseOptoBiasInlining is disabled: assert(dmw->is_neutral()) failed: invariant
>
> It is our (Compiler group) code. This problem was introduced with my
> changes for RTM locking.
>
> Martin your changes are good. But you cleanup a bit this code since we
> now never put markword to tmpReg before this call?
>
> Thanks,
> Vladimir
>
> On 11/5/14 3:13 PM, Christian Thalinger wrote:
>> I’m not exactly sure who is our biased locking expert these days but I guess it’s someone from the runtime team.  CC’ing them.
>>
>>> On Nov 5, 2014, at 7:38 AM, Doerr, Martin <martin.doerr at sap.com> wrote:
>>>
>>> Hi,
>>>
>>> we found a bug in MacroAssembler::fast_lock on x86 which shows up when UseOptoBiasInlining is switched off.
>>> The problem is that biased_locking_enter is used with swap_reg_contains_mark==true, which is no longer correct after biased_locking_enter was put in front of check for IsInflated.
>>>
>>> Please review
>>> http://cr.openjdk.java.net/~goetz/webrevs/8062950-lockBug/webrev.00/ <http://cr.openjdk.java.net/~goetz/webrevs/8062950-lockBug/webrev.00/>
>>>
>>> Best regards,
>>> Martin
>>


More information about the hotspot-compiler-dev mailing list