8212707: GlobalCounter padding is too optimistic
Reviewed-by: shade, redestad, mdoerr
--- a/src/hotspot/share/utilities/globalCounter.hpp Tue Oct 23 11:03:51 2018 +0200
+++ b/src/hotspot/share/utilities/globalCounter.hpp Tue Oct 23 13:24:36 2018 +0200
@@ -45,9 +45,9 @@
// Since do not know what we will end up next to in BSS, we make sure the
// counter is on a seperate cacheline.
struct PaddedCounter {
- DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE/2, 0);
+ DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
volatile uintx _counter;
- DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE/2, sizeof(volatile uintx));
+ DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile uintx));
};
// The global counter