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

Relax G1EvacStats atomic operations

    XMLWordPrintable

Details

    • gc
    • b11

    Description

      G1EvacStats uses atomic operations like:
        Atomic::add(&_direct_allocated, value);

      This causes the default barriers to be used:

        // Returns updated value.
        template<typename D, typename I>
        inline static D add(D volatile* dest, I add_value,
                            atomic_memory_order order = memory_order_conservative);

      Since these are stats, we can use memory_order_relaxed and get a tiny improvement for gathering stats. (I doubt it would show on benchmarks, this is a paper-cut issue.)

      Attachments

        Issue Links

          Activity

            People

              btaylor Ben Taylor
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: