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

Cleanup G1DirtyCardQueueSet::num_processed_xxx

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 13
    • hotspot
    • gc

      G1DirtyCardQueueSet has a pair of members, _num_processed_mut and _num_processed_rs_thread, with associated accessor functions. There are several problems with these.

      The members and the accessors are declared jint, but their only use is by G1RemSetSummary, where they are used as effectively size_t values.

      The members may be incremented by multiple threads concurrently. That's done using Atomic::inc, which is fine. But the members aren't declared volatile, contrary to current HotSpot "practice". Note that the accessors are not called concurrently with updates.

      The accessor functions should be const.

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: