src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
changeset 51794 4129f43607cb
parent 51742 3dd95a83791b
child 51817 46eac084082d
equal deleted inserted replaced
51793:6cd1ee2b4fa1 51794:4129f43607cb
   136          (start() == NULL && end() == NULL && top() == NULL &&
   136          (start() == NULL && end() == NULL && top() == NULL &&
   137           _allocation_end == NULL),
   137           _allocation_end == NULL),
   138          "TLAB must be reset");
   138          "TLAB must be reset");
   139 }
   139 }
   140 
   140 
   141 void ThreadLocalAllocBuffer::resize_all_tlabs() {
       
   142   if (ResizeTLAB) {
       
   143     for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
       
   144       thread->tlab().resize();
       
   145     }
       
   146   }
       
   147 }
       
   148 
       
   149 void ThreadLocalAllocBuffer::resize() {
   141 void ThreadLocalAllocBuffer::resize() {
   150   // Compute the next tlab size using expected allocation amount
   142   // Compute the next tlab size using expected allocation amount
   151   assert(ResizeTLAB, "Should not call this otherwise");
   143   assert(ResizeTLAB, "Should not call this otherwise");
   152   size_t alloc = (size_t)(_allocation_fraction.average() *
   144   size_t alloc = (size_t)(_allocation_fraction.average() *
   153                           (Universe::heap()->tlab_capacity(thread()) / HeapWordSize));
   145                           (Universe::heap()->tlab_capacity(thread()) / HeapWordSize));