RFR: No need for fence in control loop: flags are now ShSharedVariables

Aleksey Shipilev shade at redhat.com
Wed Mar 7 10:16:02 UTC 2018


Obvious micro-optimization: we used to have the naked flags that required barriers. Now we use
ShSharedVariables for storing those flags, and barrier is not needed:

diff -r 67db05fbda9f src/hotspot/share/gc/shenandoah/shenandoahConcurrentThread.cpp
--- a/src/hotspot/share/gc/shenandoah/shenandoahConcurrentThread.cpp	Tue Mar 06 22:00:49 2018 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahConcurrentThread.cpp	Wed Mar 07 11:15:21 2018 +0100
@@ -195,9 +195,6 @@

     // Wait before performing the next action
     os::naked_short_sleep(ShenandoahControlLoopInterval);
-
-    // Make sure the _do_full_gc flag changes are seen.
-    OrderAccess::storeload();
   }

   // Wait for the actual stop(), can't leave run_service() earlier.


Testing: hotspot_gc_shenandoah

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list