[lworld] RFR: 8349162: [lworld] VM Flags controlling flattening need an update [v5]

Frederic Parain fparain at openjdk.org
Thu Feb 6 14:18:11 UTC 2025


> This patch is mostly about VM flags update and internal renaming.
> 
> Renaming a few symbols to make them consistent with previous code cleanup:
>   - data_for_oop() -> payload_address()
>   - first_field_offset() -> payload_offset()
>   - LayoutKind::PAYLOAD -> LayoutKind::BUFFERED (it is only used to describe layout in buffered values, and it makes it an adjective like the other LayoutKind values)
>   
> VM flags controlling flattening:
>   - size based VM flags are removed:  FlatArrayElementMaxSize, InlineFieldMaxFlatSize. For now, FlatArrayElementMaxOops is still present because some compiler tests rely on it, but it will be removed eventually
>   - InlineArrayAtomicAccess has been removed, use AlwaysAtomicAccesses instead
>   - new VM flags to control the generation of the new layouts: NonAtomicValueFlattening, AtomicValueFlattening, NullableValueFlattening. Note that that those flags control the generation of the layouts, not the way they are used (see flags below)
>   - new VM flags to control use of flat layouts: UseFlatField, UseFlatArray
>   
> Example:
>   To enable flattening of nullable fields, the flag combination is -XX:+NullableValueFlattening -XX:+UseFlatField
> 
> The new VM flags controlling flattening are flags for testing or troubleshooting (they should probably be turned into DIAGNOSTIC flags before preview). They are not designed for performance tuning.
> 
> Feel free to propose new names for those flags if you think they are not explicit enough.
> 
> Thank you,
> 
> Fred

Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:

  Fix flag name typo

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/1345/files
  - new: https://git.openjdk.org/valhalla/pull/1345/files/cc2eab84..74b55a39

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=1345&range=04
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1345&range=03-04

  Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/valhalla/pull/1345.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1345/head:pull/1345

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


More information about the valhalla-dev mailing list