8232648: ZGC: Move ATTRIBUTE_ALIGNED to the front of declarations

Reviewed-by: pliden, eosterlund
This commit is contained in:
Stefan Karlsson 2019-10-28 11:23:48 +01:00
parent 06a479f965
commit 8df718fa82
5 changed files with 11 additions and 10 deletions

View File

@ -130,6 +130,7 @@ const size_t ZNMethodDisarmedOffset = ZPlatformNMethodDisarmedOffset
// Cache line size
const size_t ZCacheLineSize = ZPlatformCacheLineSize;
#define ZCACHE_ALIGNED ATTRIBUTE_ALIGNED(ZCacheLineSize)
// Mark stack space
extern uintptr_t ZMarkStackSpaceStart;

View File

@ -73,8 +73,8 @@ typedef ZStackList<ZMarkStackMagazine> ZMarkStackMagazineList;
class ZMarkStripe {
private:
ZMarkStackList _published ATTRIBUTE_ALIGNED(ZCacheLineSize);
ZMarkStackList _overflowed ATTRIBUTE_ALIGNED(ZCacheLineSize);
ZCACHE_ALIGNED ZMarkStackList _published;
ZCACHE_ALIGNED ZMarkStackList _overflowed;
public:
ZMarkStripe();

View File

@ -50,8 +50,8 @@ public:
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);

View File

@ -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);

View File

@ -31,9 +31,9 @@ class ZNMethodTableEntry;
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();