On Mon, 13 Oct 2025 19:53:27 GMT, Chen Liang <[email protected]> wrote:

> There's a spike of calls to `Unsafe.isFlatField` in serialzation workloads. 
> The layout information can be prepared with FieldReflector and cached. CI 
> looks good, need to verify the regression is fixed.
> 
> The old perfasm profile was:
> ....[Hottest 
> Regions]...............................................................................
>    4.66% libjvm.so Unsafe_IsFlatField
>    4.13% c2, level 4 java.io.ObjectOutputStream::writeObject0, version 6, 
> compile id 2698
>    3.72% c2, level 4 
> java.io.ObjectInputStream$BlockDataInputStream::readUTFSpan, version 2, 
> compile id 1878
>    3.61% c2, level 4 java.io.ObjectInputStream$PeekInputStream::readFully, 
> version 2, compile id 1902

I don't think FieldLayout is sufficient for the long term - I view this array 
polymorphism as a baby step towards a polymorphic VM. What should replace an 
int layout should be a specialization anchor in the long run.

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

PR Comment: https://git.openjdk.org/valhalla/pull/1676#issuecomment-3407229026

Reply via email to