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

[C2] GC barrier implementation prevents optimization of concurrent marking checks

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11, 16
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:

      Description

      In the current implementation, the check if concurrent marking is active is created with AliasIdxRaw so it won't get reordered with other memory accesses (G1 and Shenadoah).
      The flag which indicates if concurrent marking is active can only change at safepoints.
      So the load could be pinned to the dominating safepoint if it exists (otherwise to where control flow from several safepoints merges or top if there's no safepoint).
      This may enable optimizations.

      In case of G1 see G1BarrierSetC2::pre_barrier:
      Node* marking = __ load(__ ctrl(), marking_adr, TypeInt::INT, active_type, Compile::AliasIdxRaw);

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: