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

Redundant DMB instructions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • hotspot
    • None
    • b89
    • aarch64

        In generated code we sometimes see duplicated DMB instructions. We can make this more efficient by merging them.

        For example, in (C2-compiled) java.util.concurrent.ConcurrentHashMap$Node::<init> we see:

          0x000003ffa85d73d0: dmb ish
          0x000003ffa85d73d4: mov x11, x4
          0x000003ffa85d73d8: lsr xmethod, x1, #9
          0x000003ffa85d73dc: str w11, [x1,#20]
          0x000003ffa85d73e0: dmb ishst
          0x000003ffa85d73e4: strb wzr, [x10,x12,lsl #0]
         ;; membar_volatile
          0x000003ffa85d73e8: dmb ish ;*putfield val
                                                        ; - java.util.concurrent.ConcurrentHashMap$Node::<init>@16 (line 629)

         ;; membar_release
          0x000003ffa85d73ec: dmb ish
          0x000003ffa85d73f0: mov x11, x5
          0x000003ffa85d73f4: lsr xmethod, x1, #9
          0x000003ffa85d73f8: str w11, [x1,#24]
          0x000003ffa85d73fc: dmb ishst
          0x000003ffa85d7400: strb wzr, [x10,x12,lsl #0]
         ;; membar_volatile
          0x000003ffa85d7404: dmb ish ;*putfield next
                                                        ; - java.util.concurrent.ConcurrentHashMap$Node::<init>@22 (line 630)

        We see essentially the same effect in C1-compiled code.

              aph Andrew Haley
              aph Andrew Haley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: