File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -629,12 +629,11 @@ ZPageAllocatorStats ZPageAllocator::stats(ZGeneration* generation) const {
629629 state->_used_generations [gen_id]);
630630 }
631631
632- // We can only calculate the soft_max_capcity after finding the combined value
633- // for the current_max_capacity, so we set it after constructing the stats object .
632+ // We can only calculate the soft_max_capacity after finding the combined value
633+ // for current_max_capacity, so we set it after incrementing all the other stats .
634634 const size_t soft_max_heapsize = Atomic::load (&SoftMaxHeapSize);
635- if (current_max_capacity > soft_max_heapsize) {
636- stats.set_soft_max_capacity (current_max_capacity);
637- }
635+ const size_t soft_max_capacity = MIN2 (soft_max_heapsize, current_max_capacity);
636+ stats.set_soft_max_capacity (soft_max_capacity);
638637
639638 return stats;
640639}
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ class ZPageAllocatorStats {
193193 size_t used_low () const ;
194194 size_t used_generation () const ;
195195
196- void set_soft_max_capacity (size_t new_capacity );
196+ void set_soft_max_capacity (size_t soft_max_capacity );
197197};
198198
199199#endif // SHARE_GC_Z_ZPAGEALLOCATOR_HPP
Original file line number Diff line number Diff line change @@ -106,8 +106,8 @@ inline size_t ZPageAllocatorStats::allocation_stalls() const {
106106 return _allocation_stalls;
107107}
108108
109- inline void ZPageAllocatorStats::set_soft_max_capacity (size_t new_capacity ) {
110- _soft_max_capacity = new_capacity ;
109+ inline void ZPageAllocatorStats::set_soft_max_capacity (size_t soft_max_capacity ) {
110+ _soft_max_capacity = soft_max_capacity ;
111111}
112112
113113#endif // SHARE_GC_Z_ZPAGEALLOCATOR_INLINE_HPP
You can’t perform that action at this time.
0 commit comments