8232648: ZGC: Move ATTRIBUTE_ALIGNED to the front of declarations
authorstefank
Mon, 28 Oct 2019 11:23:48 +0100
changeset 58811 38f4701d6587
parent 58810 3aba4a42d8ad
child 58812 4adca7312d8f
8232648: ZGC: Move ATTRIBUTE_ALIGNED to the front of declarations Reviewed-by: pliden, eosterlund
src/hotspot/share/gc/z/zGlobals.hpp
src/hotspot/share/gc/z/zMarkStack.hpp
src/hotspot/share/gc/z/zMarkStackAllocator.hpp
src/hotspot/share/gc/z/zMarkTerminate.hpp
src/hotspot/share/gc/z/zNMethodTableIteration.hpp
--- a/src/hotspot/share/gc/z/zGlobals.hpp	Mon Oct 28 11:23:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zGlobals.hpp	Mon Oct 28 11:23:48 2019 +0100
@@ -130,6 +130,7 @@
 
 // Cache line size
 const size_t      ZCacheLineSize                = ZPlatformCacheLineSize;
+#define           ZCACHE_ALIGNED                ATTRIBUTE_ALIGNED(ZCacheLineSize)
 
 // Mark stack space
 extern uintptr_t  ZMarkStackSpaceStart;
--- a/src/hotspot/share/gc/z/zMarkStack.hpp	Mon Oct 28 11:23:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zMarkStack.hpp	Mon Oct 28 11:23:48 2019 +0100
@@ -73,8 +73,8 @@
 
 class ZMarkStripe {
 private:
-  ZMarkStackList _published  ATTRIBUTE_ALIGNED(ZCacheLineSize);
-  ZMarkStackList _overflowed ATTRIBUTE_ALIGNED(ZCacheLineSize);
+  ZCACHE_ALIGNED ZMarkStackList _published;
+  ZCACHE_ALIGNED ZMarkStackList _overflowed;
 
 public:
   ZMarkStripe();
--- a/src/hotspot/share/gc/z/zMarkStackAllocator.hpp	Mon Oct 28 11:23:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zMarkStackAllocator.hpp	Mon Oct 28 11:23:48 2019 +0100
@@ -50,8 +50,8 @@
 
 class ZMarkStackAllocator {
 private:
-  ZMarkStackMagazineList _freelist ATTRIBUTE_ALIGNED(ZCacheLineSize);
-  ZMarkStackSpace        _space    ATTRIBUTE_ALIGNED(ZCacheLineSize);
+  ZCACHE_ALIGNED ZMarkStackMagazineList _freelist;
+  ZCACHE_ALIGNED ZMarkStackSpace        _space;
 
   void prime_freelist();
   ZMarkStackMagazine* create_magazine_from_space(uintptr_t addr, size_t size);
--- a/src/hotspot/share/gc/z/zMarkTerminate.hpp	Mon Oct 28 11:23:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zMarkTerminate.hpp	Mon Oct 28 11:23:48 2019 +0100
@@ -30,9 +30,9 @@
 
 class ZMarkTerminate {
 private:
-  uint          _nworkers;
-  volatile uint _nworking_stage0 ATTRIBUTE_ALIGNED(ZCacheLineSize);
-  volatile uint _nworking_stage1;
+  uint                         _nworkers;
+  ZCACHE_ALIGNED volatile uint _nworking_stage0;
+  volatile uint                _nworking_stage1;
 
   bool enter_stage(volatile uint* nworking_stage);
   void exit_stage(volatile uint* nworking_stage);
--- a/src/hotspot/share/gc/z/zNMethodTableIteration.hpp	Mon Oct 28 11:23:28 2019 +0100
+++ b/src/hotspot/share/gc/z/zNMethodTableIteration.hpp	Mon Oct 28 11:23:48 2019 +0100
@@ -31,9 +31,9 @@
 
 class ZNMethodTableIteration {
 private:
-  ZNMethodTableEntry* _table;
-  size_t              _size;
-  volatile size_t     _claimed ATTRIBUTE_ALIGNED(ZCacheLineSize);
+  ZNMethodTableEntry*            _table;
+  size_t                         _size;
+  ZCACHE_ALIGNED volatile size_t _claimed;
 
 public:
   ZNMethodTableIteration();