554 assert(_g1mm != NULL, "should have been initialized");
555 return _g1mm;
556 }
557
558 // Expand the garbage-first heap by at least the given size (in bytes!).
559 // Returns true if the heap was expanded by the requested amount;
560 // false otherwise.
561 // (Rounds up to a HeapRegion boundary.)
562 bool expand(size_t expand_bytes, WorkGang* pretouch_workers = NULL, double* expand_time_ms = NULL);
563
564 // Returns the PLAB statistics for a given destination.
565 inline G1EvacStats* alloc_buffer_stats(InCSetState dest);
566
567 // Determines PLAB size for a given destination.
568 inline size_t desired_plab_sz(InCSetState dest);
569
570 // Do anything common to GC's.
571 void gc_prologue(bool full);
572 void gc_epilogue(bool full);
573
574 // Modify the reclaim candidate set and test for presence.
575 // These are only valid for starts_humongous regions.
576 inline void set_humongous_reclaim_candidate(uint region, bool value);
577 inline bool is_humongous_reclaim_candidate(uint region);
578
579 // Remove from the reclaim candidate set. Also remove from the
580 // collection set so that later encounters avoid the slow path.
581 inline void set_humongous_is_live(oop obj);
582
583 // Register the given region to be part of the collection set.
584 inline void register_humongous_region_with_cset(uint index);
585 // Register regions with humongous objects (actually on the start region) in
586 // the in_cset_fast_test table.
587 void register_humongous_regions_with_cset();
588 // We register a region with the fast "in collection set" test. We
589 // simply set to true the array slot corresponding to this region.
590 void register_young_region_with_cset(HeapRegion* r) {
591 _in_cset_fast_test.set_in_young(r->hrm_index());
592 }
593 void register_old_region_with_cset(HeapRegion* r) {
|
554 assert(_g1mm != NULL, "should have been initialized");
555 return _g1mm;
556 }
557
558 // Expand the garbage-first heap by at least the given size (in bytes!).
559 // Returns true if the heap was expanded by the requested amount;
560 // false otherwise.
561 // (Rounds up to a HeapRegion boundary.)
562 bool expand(size_t expand_bytes, WorkGang* pretouch_workers = NULL, double* expand_time_ms = NULL);
563
564 // Returns the PLAB statistics for a given destination.
565 inline G1EvacStats* alloc_buffer_stats(InCSetState dest);
566
567 // Determines PLAB size for a given destination.
568 inline size_t desired_plab_sz(InCSetState dest);
569
570 // Do anything common to GC's.
571 void gc_prologue(bool full);
572 void gc_epilogue(bool full);
573
574 // Does the given region fulfill remembered set based eager reclaim candidate requirements?
575 bool is_potential_eager_reclaim_candidate(HeapRegion* r) const;
576
577 // Modify the reclaim candidate set and test for presence.
578 // These are only valid for starts_humongous regions.
579 inline void set_humongous_reclaim_candidate(uint region, bool value);
580 inline bool is_humongous_reclaim_candidate(uint region);
581
582 // Remove from the reclaim candidate set. Also remove from the
583 // collection set so that later encounters avoid the slow path.
584 inline void set_humongous_is_live(oop obj);
585
586 // Register the given region to be part of the collection set.
587 inline void register_humongous_region_with_cset(uint index);
588 // Register regions with humongous objects (actually on the start region) in
589 // the in_cset_fast_test table.
590 void register_humongous_regions_with_cset();
591 // We register a region with the fast "in collection set" test. We
592 // simply set to true the array slot corresponding to this region.
593 void register_young_region_with_cset(HeapRegion* r) {
594 _in_cset_fast_test.set_in_young(r->hrm_index());
595 }
596 void register_old_region_with_cset(HeapRegion* r) {
|