src/hotspot/share/utilities/globalCounter.hpp
changeset 52227 eadd0abbfdf4
parent 49800 69d7398038c5
child 52332 d2a3503c72f7
equal deleted inserted replaced
52226:b4b932c6001f 52227:eadd0abbfdf4
    43 class GlobalCounter : public AllStatic {
    43 class GlobalCounter : public AllStatic {
    44  private:
    44  private:
    45   // Since do not know what we will end up next to in BSS, we make sure the
    45   // Since do not know what we will end up next to in BSS, we make sure the
    46   // counter is on a seperate cacheline.
    46   // counter is on a seperate cacheline.
    47   struct PaddedCounter {
    47   struct PaddedCounter {
    48     DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE/2, 0);
    48     DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
    49     volatile uintx _counter;
    49     volatile uintx _counter;
    50     DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE/2, sizeof(volatile uintx));
    50     DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile uintx));
    51   };
    51   };
    52 
    52 
    53   // The global counter
    53   // The global counter
    54   static PaddedCounter _global_counter;
    54   static PaddedCounter _global_counter;
    55 
    55