equal
deleted
inserted
replaced
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)); |