CompareAndExchangeObject inserts two pre-barriers

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: 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/

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

                Created:
                Updated:
                Resolved: