< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.hpp

Print this page
rev 57745 : 8240872: Shenandoah: Avoid updating new regions from start of evacuation
Reviewed-by: shade
rev 57746 : 8240873: Shenandoah: Short-cut arraycopy barriers
Reviewed-by: shade


 243   // Rarely updated fields
 244   HeapWord* _new_top;
 245   double _empty_time;
 246 
 247   // Seldom updated fields
 248   RegionState _state;
 249 
 250   // Frequently updated fields
 251   size_t _tlab_allocs;
 252   size_t _gclab_allocs;
 253   size_t _shared_allocs;
 254 
 255   uint64_t _seqnum_first_alloc_mutator;
 256   uint64_t _seqnum_first_alloc_gc;
 257   uint64_t _seqnum_last_alloc_mutator;
 258   uint64_t _seqnum_last_alloc_gc;
 259 
 260   volatile size_t _live_data;
 261   volatile size_t _critical_pins;
 262 
 263   HeapWord* _update_watermark;
 264 
 265   // Claim some space at the end to protect next region
 266   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
 267 
 268 public:
 269   ShenandoahHeapRegion(ShenandoahHeap* heap, HeapWord* start, size_t size_words, size_t index, bool committed);
 270 
 271   static const size_t MIN_NUM_REGIONS = 10;
 272 
 273   static void setup_sizes(size_t max_heap_size);
 274 
 275   double empty_time() {
 276     return _empty_time;
 277   }
 278 
 279   inline static size_t required_regions(size_t bytes) {
 280     return (bytes + ShenandoahHeapRegion::region_size_bytes() - 1) >> ShenandoahHeapRegion::region_size_bytes_shift();
 281   }
 282 
 283   inline static size_t region_count() {


 414   }
 415 
 416   uint64_t seqnum_first_alloc_mutator() const {
 417     return _seqnum_first_alloc_mutator;
 418   }
 419 
 420   uint64_t seqnum_last_alloc_mutator()  const {
 421     return _seqnum_last_alloc_mutator;
 422   }
 423 
 424   uint64_t seqnum_first_alloc_gc() const {
 425     return _seqnum_first_alloc_gc;
 426   }
 427 
 428   uint64_t seqnum_last_alloc_gc()  const {
 429     return _seqnum_last_alloc_gc;
 430   }
 431 
 432   HeapWord* get_update_watermark() const {
 433     assert(bottom() <= _update_watermark && _update_watermark <= top(), "within bounds");
 434     return _update_watermark;
 435   }
 436 
 437   void set_update_watermark(HeapWord* w) {
 438     assert(bottom() <= w && w <= top(), "within bounds");
 439     _update_watermark = w;
 440   }
 441 
 442 private:
 443   void do_commit();
 444   void do_uncommit();
 445 
 446   void oop_iterate_objects(OopIterateClosure* cl);
 447   void oop_iterate_humongous(OopIterateClosure* cl);
 448 
 449   inline void internal_increase_live_data(size_t s);
 450 
 451   void set_state(RegionState to);
 452 };
 453 
 454 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHHEAPREGION_HPP


 243   // Rarely updated fields
 244   HeapWord* _new_top;
 245   double _empty_time;
 246 
 247   // Seldom updated fields
 248   RegionState _state;
 249 
 250   // Frequently updated fields
 251   size_t _tlab_allocs;
 252   size_t _gclab_allocs;
 253   size_t _shared_allocs;
 254 
 255   uint64_t _seqnum_first_alloc_mutator;
 256   uint64_t _seqnum_first_alloc_gc;
 257   uint64_t _seqnum_last_alloc_mutator;
 258   uint64_t _seqnum_last_alloc_gc;
 259 
 260   volatile size_t _live_data;
 261   volatile size_t _critical_pins;
 262 
 263   HeapWord* volatile _update_watermark;
 264 
 265   // Claim some space at the end to protect next region
 266   DEFINE_PAD_MINUS_SIZE(0, DEFAULT_CACHE_LINE_SIZE, 0);
 267 
 268 public:
 269   ShenandoahHeapRegion(ShenandoahHeap* heap, HeapWord* start, size_t size_words, size_t index, bool committed);
 270 
 271   static const size_t MIN_NUM_REGIONS = 10;
 272 
 273   static void setup_sizes(size_t max_heap_size);
 274 
 275   double empty_time() {
 276     return _empty_time;
 277   }
 278 
 279   inline static size_t required_regions(size_t bytes) {
 280     return (bytes + ShenandoahHeapRegion::region_size_bytes() - 1) >> ShenandoahHeapRegion::region_size_bytes_shift();
 281   }
 282 
 283   inline static size_t region_count() {


 414   }
 415 
 416   uint64_t seqnum_first_alloc_mutator() const {
 417     return _seqnum_first_alloc_mutator;
 418   }
 419 
 420   uint64_t seqnum_last_alloc_mutator()  const {
 421     return _seqnum_last_alloc_mutator;
 422   }
 423 
 424   uint64_t seqnum_first_alloc_gc() const {
 425     return _seqnum_first_alloc_gc;
 426   }
 427 
 428   uint64_t seqnum_last_alloc_gc()  const {
 429     return _seqnum_last_alloc_gc;
 430   }
 431 
 432   HeapWord* get_update_watermark() const {
 433     assert(bottom() <= _update_watermark && _update_watermark <= top(), "within bounds");
 434     return Atomic::load_acquire(&_update_watermark);
 435   }
 436 
 437   void set_update_watermark(HeapWord* w) {
 438     assert(bottom() <= w && w <= top(), "within bounds");
 439     Atomic::release_store(&_update_watermark, w);
 440   }
 441 
 442 private:
 443   void do_commit();
 444   void do_uncommit();
 445 
 446   void oop_iterate_objects(OopIterateClosure* cl);
 447   void oop_iterate_humongous(OopIterateClosure* cl);
 448 
 449   inline void internal_increase_live_data(size_t s);
 450 
 451   void set_state(RegionState to);
 452 };
 453 
 454 #endif // SHARE_GC_SHENANDOAH_SHENANDOAHHEAPREGION_HPP
< prev index next >