RFR: 8263125: During deoptimization vectors should reassign scalarized payload after all objects are reallocated. [v2]
Richard Reingruber
rrich at openjdk.java.net
Fri Mar 12 08:57:34 UTC 2021
On Wed, 10 Mar 2021 20:08:24 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Currently during deoptimization Vector's `payload` field values are restored during Vector reallocation:
>> https://github.com/openjdk/jdk/blob/master/src/hotspot/share/prims/vectorSupport.cpp#L155
>>
>> But for scalar-replaced values this is not correct because payload box object could be re-allocated after allocation of this vector. Scalar-replaced `payload` should be restored during regular fields reassignment (`Deoptimization::reassign_fields()` change).
>>
>> I renamed incorrect `eliminate_*` names for methods which restore/reallocate objects and locks.
>>
>> I added checks for EliminateAutoBox and EnableVectorAggressiveReboxing optimizations which can replace allocations with scalar objects independent from Escape Analysis.
>>
>> I added prints for unexpected StackValue values (stackValue.cpp) and for Vector debug info location type (location.cpp).
>
> Vladimir Kozlov has updated the pull request incrementally with one additional commit since the last revision:
>
> Update Copyright year
Hello Vladimir,
your change looks good to me. You might want to add the refactoring Vladimir
suggested.
May I ask why there is a special case to reallocate a vectors payload at all. In
other words: why is the method VectorSupport::allocate_vector_payload_helper()
needed? Is it for support of VectorMask?
Thanks, Richard.
-------------
Marked as reviewed by rrich (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2924
More information about the hotspot-dev
mailing list