629 bool is_user_requested_concurrent_full_gc(GCCause::Cause cause);
630
631 // This is called at the start of either a concurrent cycle or a Full
632 // GC to update the number of old marking cycles started.
633 void increment_old_marking_cycles_started();
634
635 // This is called at the end of either a concurrent cycle or a Full
636 // GC to update the number of old marking cycles completed. Those two
637 // can happen in a nested fashion, i.e., we start a concurrent
638 // cycle, a Full GC happens half-way through it which ends first,
639 // and then the cycle notices that a Full GC happened and ends
640 // too. The concurrent parameter is a boolean to help us do a bit
641 // tighter consistency checking in the method. If concurrent is
642 // false, the caller is the inner caller in the nesting (i.e., the
643 // Full GC). If concurrent is true, the caller is the outer caller
644 // in this nesting (i.e., the concurrent cycle). Further nesting is
645 // not currently supported. The end of this call also notifies
646 // the G1OldGCCount_lock in case a Java thread is waiting for a full
647 // GC to happen (e.g., it called System.gc() with
648 // +ExplicitGCInvokesConcurrent).
649 // liveness_completed should indicate that during that old marking
650 // cycle the whole heap has actually been examined for live objects.
651 void increment_old_marking_cycles_completed(bool concurrent, bool liveness_completed);
652
653 uint old_marking_cycles_completed() {
654 return _old_marking_cycles_completed;
655 }
656
657 G1HRPrinter* hr_printer() { return &_hr_printer; }
658
659 // Allocates a new heap region instance.
660 HeapRegion* new_heap_region(uint hrs_index, MemRegion mr);
661
662 // Allocate the highest free region in the reserved heap. This will commit
663 // regions as necessary.
664 HeapRegion* alloc_highest_free_region();
665
666 // Frees a region by resetting its metadata and adding it to the free list
667 // passed as a parameter (this is usually a local list which will be appended
668 // to the master free list later or NULL if free list management is handled
669 // in another way).
670 // Callers must ensure they are the only one calling free on the given region
671 // at the same time.
|
629 bool is_user_requested_concurrent_full_gc(GCCause::Cause cause);
630
631 // This is called at the start of either a concurrent cycle or a Full
632 // GC to update the number of old marking cycles started.
633 void increment_old_marking_cycles_started();
634
635 // This is called at the end of either a concurrent cycle or a Full
636 // GC to update the number of old marking cycles completed. Those two
637 // can happen in a nested fashion, i.e., we start a concurrent
638 // cycle, a Full GC happens half-way through it which ends first,
639 // and then the cycle notices that a Full GC happened and ends
640 // too. The concurrent parameter is a boolean to help us do a bit
641 // tighter consistency checking in the method. If concurrent is
642 // false, the caller is the inner caller in the nesting (i.e., the
643 // Full GC). If concurrent is true, the caller is the outer caller
644 // in this nesting (i.e., the concurrent cycle). Further nesting is
645 // not currently supported. The end of this call also notifies
646 // the G1OldGCCount_lock in case a Java thread is waiting for a full
647 // GC to happen (e.g., it called System.gc() with
648 // +ExplicitGCInvokesConcurrent).
649 // whole_heap_examined should indicate that during that old marking
650 // cycle the whole heap has been examined for live objects (as opposed
651 // to only parts, or aborted before completion).
652 void increment_old_marking_cycles_completed(bool concurrent, bool whole_heap_examined);
653
654 uint old_marking_cycles_completed() {
655 return _old_marking_cycles_completed;
656 }
657
658 G1HRPrinter* hr_printer() { return &_hr_printer; }
659
660 // Allocates a new heap region instance.
661 HeapRegion* new_heap_region(uint hrs_index, MemRegion mr);
662
663 // Allocate the highest free region in the reserved heap. This will commit
664 // regions as necessary.
665 HeapRegion* alloc_highest_free_region();
666
667 // Frees a region by resetting its metadata and adding it to the free list
668 // passed as a parameter (this is usually a local list which will be appended
669 // to the master free list later or NULL if free list management is handled
670 // in another way).
671 // Callers must ensure they are the only one calling free on the given region
672 // at the same time.
|