RFR(XS): 8071821: Assert failed in UnexpectedDeoptimizationTest.java
Vladimir Kozlov
vladimir.kozlov at oracle.com
Fri Feb 6 18:07:52 UTC 2015
Yes, the assert is useless here. Can you also move _has_injected_fields
= 0; to the very beginning of compute_injected_fields() method to reduce
race window?
Thanks,
Vladimir
On 2/6/15 9:58 AM, Roland Westrelin wrote:
> Hi Vladimir,
>
> Thanks for taking a look at this.
>
>> Is it one direction change of the field? Should we change the assert to check then?
>
> The field will change from -1 to something that is >=0 and it won’t ever go back to -1.
> has_injected_fields() is the only place that calls compute_injected_fields() and the call is guarded by a _has_injected_fields == -1. That’s why I think the assert is unlikely to catch any bad behavior and can be removed.
>
> Roland.
>
>>
>> Thanks,
>> Vladimir
>>
>> On 2/6/15 5:19 AM, Roland Westrelin wrote:
>>> http://cr.openjdk.java.net/~roland/8071821/webrev.00/
>>>
>>> Some ciInstanceKlass objects are shared between compiler threads so has_injected_fields() can be called on the same ciInstanceKlass concurrently by multiple threads and cause a concurrent initialization of the _has_injected_fields. In itself it’s armless (all threads will get the same result, the _has_inkected_fields will be set correctly) but it causes an assert to fire. The assert is pretty useless so I removed it.
>>>
>>> Roland.
>>>
>
More information about the hotspot-compiler-dev
mailing list