comparison src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp @ 14314:2c95095271e9

Merge
author ehelin
date Thu, 30 Jan 2014 14:01:45 +0100
parents 1e1c8d358b52
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14302:1fb56cbac3a1 14314:2c95095271e9
87 // Compute desired plab size and latch result for later 87 // Compute desired plab size and latch result for later
88 // use. This should be called once at the end of parallel 88 // use. This should be called once at the end of parallel
89 // scavenge; it clears the sensor accumulators. 89 // scavenge; it clears the sensor accumulators.
90 void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) { 90 void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) {
91 assert(ResizePLAB, "Not set"); 91 assert(ResizePLAB, "Not set");
92
93 assert(is_object_aligned(max_size()) && min_size() <= max_size(),
94 "PLAB clipping computation may be incorrect");
95
92 if (_allocated == 0) { 96 if (_allocated == 0) {
93 assert(_unused == 0, 97 assert(_unused == 0,
94 err_msg("Inconsistency in PLAB stats: " 98 err_msg("Inconsistency in PLAB stats: "
95 "_allocated: "SIZE_FORMAT", " 99 "_allocated: "SIZE_FORMAT", "
96 "_wasted: "SIZE_FORMAT", " 100 "_wasted: "SIZE_FORMAT", "
150 _true_end(_hard_end) 154 _true_end(_hard_end)
151 {} 155 {}
152 156
153 // The buffer comes with its own BOT, with a shared (obviously) underlying 157 // The buffer comes with its own BOT, with a shared (obviously) underlying
154 // BlockOffsetSharedArray. We manipulate this BOT in the normal way 158 // BlockOffsetSharedArray. We manipulate this BOT in the normal way
155 // as we would for any contiguous space. However, on accasion we 159 // as we would for any contiguous space. However, on occasion we
156 // need to do some buffer surgery at the extremities before we 160 // need to do some buffer surgery at the extremities before we
157 // start using the body of the buffer for allocations. Such surgery 161 // start using the body of the buffer for allocations. Such surgery
158 // (as explained elsewhere) is to prevent allocation on a card that 162 // (as explained elsewhere) is to prevent allocation on a card that
159 // is in the process of being walked concurrently by another GC thread. 163 // is in the process of being walked concurrently by another GC thread.
160 // When such surgery happens at a point that is far removed (to the 164 // When such surgery happens at a point that is far removed (to the