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

CompareAndExchangeObject inserts two pre-barriers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • 9
    • b159
    • generic

        in LibaryCallKit::inline_unsafe_access(), the pre_barrier() gets inserted twice for LS_cmp_exchange, in one case it is treated like the other CAS instructions, and at the end it is treated like get_and_set.

        A simple fix would be to only treat it like the other CAS instructions. There is no need to use the exchanged value and possibly require decoding the narrow oop because we already know the only possible pre-value.

        http://cr.openjdk.java.net/~rkennke/fix-cae-prebarrier/webrev.00/

              rkennke Roman Kennke
              rkennke Roman Kennke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: