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

Deprecate -XX:FieldsAllocationStyle product option

    XMLWordPrintable

    Details

    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Users may have experimented with in 2011 but it's unlikely that this option is used.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: