210 static size_t MaxTLABSizeBytes;
211 static size_t MaxTLABSizeWords;
212
213 // Global allocation counter, increased for each allocation under Shenandoah heap lock.
214 // Padded to avoid false sharing with the read-only fields above.
215 struct PaddedAllocSeqNum {
216 DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(uint64_t));
217 uint64_t value;
218 DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, 0);
219
220 PaddedAllocSeqNum() {
221 // start with 1, reserve 0 for uninitialized value
222 value = 1;
223 }
224 };
225
226 static PaddedAllocSeqNum _alloc_seq_num;
227
228 // Never updated fields
229 ShenandoahHeap* _heap;
230 ShenandoahPacer* _pacer;
231 MemRegion _reserved;
232 size_t _region_number;
233
234 // Rarely updated fields
235 HeapWord* _new_top;
236 size_t _critical_pins;
237 double _empty_time;
238
239 // Seldom updated fields
240 RegionState _state;
241
242 // Frequently updated fields
243 size_t _tlab_allocs;
244 size_t _gclab_allocs;
245 size_t _shared_allocs;
246
247 uint64_t _seqnum_first_alloc_mutator;
248 uint64_t _seqnum_first_alloc_gc;
249 uint64_t _seqnum_last_alloc_mutator;
250 uint64_t _seqnum_last_alloc_gc;
|
210 static size_t MaxTLABSizeBytes;
211 static size_t MaxTLABSizeWords;
212
213 // Global allocation counter, increased for each allocation under Shenandoah heap lock.
214 // Padded to avoid false sharing with the read-only fields above.
215 struct PaddedAllocSeqNum {
216 DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, sizeof(uint64_t));
217 uint64_t value;
218 DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, 0);
219
220 PaddedAllocSeqNum() {
221 // start with 1, reserve 0 for uninitialized value
222 value = 1;
223 }
224 };
225
226 static PaddedAllocSeqNum _alloc_seq_num;
227
228 // Never updated fields
229 ShenandoahHeap* _heap;
230 MemRegion _reserved;
231 size_t _region_number;
232
233 // Rarely updated fields
234 HeapWord* _new_top;
235 size_t _critical_pins;
236 double _empty_time;
237
238 // Seldom updated fields
239 RegionState _state;
240
241 // Frequently updated fields
242 size_t _tlab_allocs;
243 size_t _gclab_allocs;
244 size_t _shared_allocs;
245
246 uint64_t _seqnum_first_alloc_mutator;
247 uint64_t _seqnum_first_alloc_gc;
248 uint64_t _seqnum_last_alloc_mutator;
249 uint64_t _seqnum_last_alloc_gc;
|