8212707: GlobalCounter padding is too optimistic
authorrehn
Tue, 23 Oct 2018 13:24:36 +0200
changeset 52227 eadd0abbfdf4
parent 52226 b4b932c6001f
child 52228 0ca91992dd8e
child 56999 b50d414a755c
8212707: GlobalCounter padding is too optimistic Reviewed-by: shade, redestad, mdoerr
src/hotspot/share/utilities/globalCounter.hpp
--- 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