RFR: 8295486: Inconsistent constant field values observed during compilation [v5]

Vladimir Ivanov vlivanov at openjdk.org
Fri Jan 20 18:57:37 UTC 2023


On Fri, 20 Jan 2023 18:39:53 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix to verification code
>
> src/hotspot/share/ci/ciArray.cpp line 101:
> 
>> 99:     value = element_value_impl(elembt, get_arrayOop(), index);
>> 100:   )
>> 101:   return check_constant_value_cache(index, value);
> 
> It still unconditionally goes through VM transition on every call. If you check the cache first and call `element_value_impl()` only when there's a miss, then you can save on state transition when the cache is populated. But you would need additional call to update the cache.

Or you could move both checks into `element_value_impl()` along with `GUARDED_VM_ENTRY` (and convert it into `VM_ENTRY_MARK`).

-------------

PR: https://git.openjdk.org/jdk/pull/11861


More information about the hotspot-compiler-dev mailing list