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.

This pull request has now been integrated.

Changeset: adf92f09
Author:    Roberto Castañeda Lozano <[email protected]>
Committer: Paul Hübner <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/adf92f09c7355102e615663e98fee0dd057b1b04
Stats:     4 lines in 1 file changed: 0 ins; 4 del; 0 mod

8377799: [lworld] Diagnostic PrintFlatArrayLayout flag has no effect in product 
builds

Reviewed-by: phubner

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

PR: https://git.openjdk.org/valhalla/pull/2090

Reply via email to