Shenandoah: Use Atomic<T> for volatile fields accessed with AtomicAccess in Shenandoah related code

XMLWordPrintable

    • gc

      This is the parent task for related work to convert Shenandoah related code to use Atomic<T>, here is the list of source files I am sure we need to update:
      ```
      src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
      src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp
      src/hotspot/share/gc/shenandoah/shenandoahNumberSeq.cpp
      src/hotspot/share/gc/shenandoah/shenandoahLock.hpp
      src/hotspot/share/gc/shenandoah/shenandoahLock.cpp
      src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp
      src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp
      src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp
      src/hotspot/share/gc/shenandoah/shenandoahScanRemembered.inline.hpp
      src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp
      src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.hpp
      src/hotspot/share/gc/shenandoah/shenandoahReferenceProcessor.cpp
      src/hotspot/share/gc/shenandoah/shenandoahHeapRegionCounters.cpp
      src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp
      src/hotspot/share/gc/shenandoah/shenandoahNMethod.cpp
      src/hotspot/share/gc/shenandoah/shenandoahController.cpp (_gc_id)
      src/hotspot/share/gc/shenandoah/shenandoahHeap.inline.hpp
      src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.inline.hpp
      src/hotspot/share/gc/shenandoah/shenandoahEvacOOMHandler.cpp
      src/hotspot/share/gc/shenandoah/shenandoahSharedVariables.hpp
      src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp
      src/hotspot/share/gc/shenandoah/shenandoahTaskqueue.hpp

      ```

      Some sub-tasks are created to logically (if possible) group the changes into smaller PRs, we can create more sub-tasks as we are working on more of the files.

      Here is another list of files I think we don't need to update for various reasons:
      ```
      src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp // AtomicAccess is not actually used, we may clean up the source code and remove the unused header.
      src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp // AtomicAccess is not actually used, we may clean up the source code and remove the unused header.
      src/hotspot/share/gc/shenandoah/shenandoahHeapRegionSet.cpp // AtomicAccess is not actually used, we may clean up the source code and remove the unused header.
      src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.hpp // We can't convert bitmap access to use Atomic<T>
      src/hotspot/share/gc/shenandoah/shenandoahMarkBitMap.inline.hpp // We can't convert bitmap access to use Atomic<T>
      src/hotspot/share/gc/shenandoah/shenandoahCodeRoots.cpp // AtomicAccess is not actually used, we may clean up the source code and remove the unused header.

      ```

            Assignee:
            Unassigned
            Reporter:
            Xiaolong Peng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: