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

[C1, C2] Release barrier for volatile field stores in constructors implemented inconsistently

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b13

      Description

      C1 and C2 compiler contain code to insert a release barrier for constructors which write volatile fields.
      This is only relevant for platforms with the property "support_IRIW_for_not_multiple_copy_atomic_cpu", currently only PPC64. Other platforms already add a heavy-weight memory barrier after each volatile store.

      The implementation is not consistent:
      C1 GraphBuilder::method_return uses:
      support_IRIW_for_not_multiple_copy_atomic_cpu && scope()->wrote_volatile()
      C2 Parse::do_exits() uses:
      PPC64_ONLY(wrote_volatile())

      This is currently not an issue, but should better be made consistent to avoid inconsistencies for future changes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mdoerr Martin Doerr
              Reporter:
              mdoerr Martin Doerr
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: