On Thu, 12 Feb 2026 14:17:25 GMT, Roberto Castañeda Lozano 
<[email protected]> wrote:

> This simple changeset enables the diagnostic flag `PrintFlatArrayLayout` in 
> product builds, similarly to other diagnostic flags such as 
> `PrintFieldLayout`. This was useful to quickly grasp what arrays are 
> flattened when analyzing a benchmark.
> 
> before:
> 
> 
> $ java --enable-preview -XX:+UnlockDiagnosticVMOptions 
> -XX:+PrintFlatArrayLayout --version
> openjdk 27-jep401ea2 2026-09-15
> OpenJDK Runtime Environment (build 27-jep401ea2-rocastan.open)
> OpenJDK 64-Bit Server VM (build 27-jep401ea2-rocastan.open, mixed mode)
> 
> 
> after:
> 
> 
> $ java --enable-preview -XX:+UnlockDiagnosticVMOptions 
> -XX:+PrintFlatArrayLayout --version
> Flat Type Array: [Ljava.lang.Character; {0x0000000095040348}
>  - element klass: 'java/lang/Character'
>  - layout kind: NULLABLE_ATOMIC_FLAT
>  - array properties: DEFAULT (NULLABLE ATOMIC)
>  - element size 4 aligned layout size 4
> Flat Type Array: [Ljava.lang.Integer; {0x000000009505d0a0}
>  - element klass: 'java/lang/Integer'
>  - layout kind: NULLABLE_ATOMIC_FLAT
>  - array properties: DEFAULT (NULLABLE ATOMIC)
>  - element size 8 aligned layout size 8
> openjdk 27-jep401ea2 2026-09-15
> OpenJDK Runtime Environment (build 27-jep401ea2-rocastan.open)
> OpenJDK 64-Bit Server VM (build 27-jep401ea2-rocastan.open, mixed mode)
> 
> 
> **Testing**: tier1-3, manually checked that flattened array info is shown on 
> a couple of scenarios.

Thanks.

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

Marked as reviewed by phubner (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2090#pullrequestreview-3791364365

Reply via email to