RFR(XS): 8071821: Assert failed in UnexpectedDeoptimizationTest.java
vladimir.kozlov at oracle.com
Tue Feb 10 17:23:05 UTC 2015
On 2/10/15 1:07 AM, Roland Westrelin wrote:
>> 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.
> I was wrong. It’s not good enough to remove the assert. _has_injected_fields is set to 0 before it’s incremented so there’s a small window of time when some other thread can see 0 and assume there’s no injected fields. Here is a new webrev:
> _has_injected_fields is only set once it’s final value is known. So other threads may either see -1 and compute the final value on their own or a non -1 value and have the final value.
More information about the hotspot-compiler-dev