src/hotspot/share/gc/shared/plab.cpp
changeset 59221 cc3a82fc7bcb
parent 54786 ebf733a324d4
equal deleted inserted replaced
59220:72e15d757e6c 59221:cc3a82fc7bcb
   133                       net_desired_words * HeapWordSize);
   133                       net_desired_words * HeapWordSize);
   134 }
   134 }
   135 
   135 
   136 // Calculates plab size for current number of gc worker threads.
   136 // Calculates plab size for current number of gc worker threads.
   137 size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
   137 size_t PLABStats::desired_plab_sz(uint no_of_gc_workers) {
   138   return align_object_size(MIN2(MAX2(min_size(), _desired_net_plab_sz / no_of_gc_workers), max_size()));
   138   return align_object_size(clamp(_desired_net_plab_sz / no_of_gc_workers, min_size(), max_size()));
   139 }
   139 }
   140 
   140 
   141 // Compute desired plab size for one gc worker thread and latch result for later
   141 // Compute desired plab size for one gc worker thread and latch result for later
   142 // use. This should be called once at the end of parallel
   142 // use. This should be called once at the end of parallel
   143 // scavenge; it clears the sensor accumulators.
   143 // scavenge; it clears the sensor accumulators.