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