Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8228754

Deprecate -XX:FieldsAllocationStyle product option

XMLWordPrintable

    • behavioral
    • minimal
    • Users may have experimented with in 2011 but it's unlikely that this option is used.
    • add/remove/modify command line option
    • JDK

      Summary

      Deprecate the option -XX: FieldsAllocationStyle option. By default it is 1 and other values will not lead to better performance or observable benefits.

      Problem

      Flags allowing users to affect the layout of fields in Java classes give users unwelcome control over internal implementation details. This option determines allocation order of fields:

      "0 - type based with oops first, "
      "1 - with oops last, "
      "2 - oops in super and sub classes are together"

      Testing when the option was created showed that allocation style 1 was best, and this option has not been used by customers for performance improvements.

      With @contended, padding can be added to prevent false sharing, if needed.

      Deprecating and removing this option will allow for efficient implementation of inline types for valhalla.

      Solution

      Deprecate the option and continue affect layout with the option.

      Users will now get the following message when running: 'java -XX:+FieldsAllocationStyle ...'

      Java HotSpot(TM) 64-Bit Server VM warning: Option FieldsAllocationStyle was deprecated in version 14.0 and will likely be removed in a future release.

      Specification

      Deprecate the -XX: FieldsAllocationStyle option in JDK-14 and issue the above warning message when the option is used.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Vladimir Kozlov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: