src/share/vm/memory/threadLocalAllocBuffer.hpp

Print this page




 153   static void resize_all_tlabs();
 154 
 155   void fill(HeapWord* start, HeapWord* top, size_t new_size);
 156   void initialize();
 157 
 158   static size_t refill_waste_limit_increment()   { return TLABWasteIncrement; }
 159 
 160   // Code generation support
 161   static ByteSize start_offset()                 { return byte_offset_of(ThreadLocalAllocBuffer, _start); }
 162   static ByteSize end_offset()                   { return byte_offset_of(ThreadLocalAllocBuffer, _end  ); }
 163   static ByteSize top_offset()                   { return byte_offset_of(ThreadLocalAllocBuffer, _top  ); }
 164   static ByteSize pf_top_offset()                { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top  ); }
 165   static ByteSize size_offset()                  { return byte_offset_of(ThreadLocalAllocBuffer, _desired_size ); }
 166   static ByteSize refill_waste_limit_offset()    { return byte_offset_of(ThreadLocalAllocBuffer, _refill_waste_limit ); }
 167 
 168   static ByteSize number_of_refills_offset()     { return byte_offset_of(ThreadLocalAllocBuffer, _number_of_refills ); }
 169   static ByteSize fast_refill_waste_offset()     { return byte_offset_of(ThreadLocalAllocBuffer, _fast_refill_waste ); }
 170   static ByteSize slow_allocations_offset()      { return byte_offset_of(ThreadLocalAllocBuffer, _slow_allocations ); }
 171 
 172   void verify();






 173 };
 174 
 175 class GlobalTLABStats: public CHeapObj<mtThread> {
 176 private:
 177 
 178   // Accumulate perfdata in private variables because
 179   // PerfData should be write-only for security reasons
 180   // (see perfData.hpp)
 181   unsigned _allocating_threads;
 182   unsigned _total_refills;
 183   unsigned _max_refills;
 184   size_t   _total_allocation;
 185   size_t   _total_gc_waste;
 186   size_t   _max_gc_waste;
 187   size_t   _total_slow_refill_waste;
 188   size_t   _max_slow_refill_waste;
 189   size_t   _total_fast_refill_waste;
 190   size_t   _max_fast_refill_waste;
 191   unsigned _total_slow_allocations;
 192   unsigned _max_slow_allocations;




 153   static void resize_all_tlabs();
 154 
 155   void fill(HeapWord* start, HeapWord* top, size_t new_size);
 156   void initialize();
 157 
 158   static size_t refill_waste_limit_increment()   { return TLABWasteIncrement; }
 159 
 160   // Code generation support
 161   static ByteSize start_offset()                 { return byte_offset_of(ThreadLocalAllocBuffer, _start); }
 162   static ByteSize end_offset()                   { return byte_offset_of(ThreadLocalAllocBuffer, _end  ); }
 163   static ByteSize top_offset()                   { return byte_offset_of(ThreadLocalAllocBuffer, _top  ); }
 164   static ByteSize pf_top_offset()                { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top  ); }
 165   static ByteSize size_offset()                  { return byte_offset_of(ThreadLocalAllocBuffer, _desired_size ); }
 166   static ByteSize refill_waste_limit_offset()    { return byte_offset_of(ThreadLocalAllocBuffer, _refill_waste_limit ); }
 167 
 168   static ByteSize number_of_refills_offset()     { return byte_offset_of(ThreadLocalAllocBuffer, _number_of_refills ); }
 169   static ByteSize fast_refill_waste_offset()     { return byte_offset_of(ThreadLocalAllocBuffer, _fast_refill_waste ); }
 170   static ByteSize slow_allocations_offset()      { return byte_offset_of(ThreadLocalAllocBuffer, _slow_allocations ); }
 171 
 172   void verify();
 173   void reset_to_null() {
 174     set_start(NULL);
 175     set_top(NULL);
 176     set_pf_top(NULL);
 177     set_end(NULL);
 178   }
 179 };
 180 
 181 class GlobalTLABStats: public CHeapObj<mtThread> {
 182 private:
 183 
 184   // Accumulate perfdata in private variables because
 185   // PerfData should be write-only for security reasons
 186   // (see perfData.hpp)
 187   unsigned _allocating_threads;
 188   unsigned _total_refills;
 189   unsigned _max_refills;
 190   size_t   _total_allocation;
 191   size_t   _total_gc_waste;
 192   size_t   _max_gc_waste;
 193   size_t   _total_slow_refill_waste;
 194   size_t   _max_slow_refill_waste;
 195   size_t   _total_fast_refill_waste;
 196   size_t   _max_fast_refill_waste;
 197   unsigned _total_slow_allocations;
 198   unsigned _max_slow_allocations;