1700 PSAdaptiveSizePolicy* policy = heap->size_policy();
1701 IsGCActiveMark mark;
1702
1703 if (ScavengeBeforeFullGC) {
1704 PSScavenge::invoke_no_policy();
1705 }
1706
1707 const bool clear_all_soft_refs =
1708 heap->collector_policy()->should_clear_all_soft_refs();
1709
1710 PSParallelCompact::invoke_no_policy(clear_all_soft_refs ||
1711 maximum_heap_compaction);
1712 }
1713
1714 // This method contains no policy. You should probably
1715 // be calling invoke() instead.
1716 bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
1717 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
1718 assert(ref_processor() != NULL, "Sanity");
1719
1720 if (GC_locker::check_active_before_gc()) {
1721 return false;
1722 }
1723
1724 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
1725
1726 GCIdMark gc_id_mark;
1727 _gc_timer.register_gc_start();
1728 _gc_tracer.report_gc_start(heap->gc_cause(), _gc_timer.gc_start());
1729
1730 TimeStamp marking_start;
1731 TimeStamp compaction_start;
1732 TimeStamp collection_exit;
1733
1734 GCCause::Cause gc_cause = heap->gc_cause();
1735 PSYoungGen* young_gen = heap->young_gen();
1736 PSOldGen* old_gen = heap->old_gen();
1737 PSAdaptiveSizePolicy* size_policy = heap->size_policy();
1738
1739 // The scope of casr should end after code that can change
1740 // CollectorPolicy::_should_clear_all_soft_refs.
|
1700 PSAdaptiveSizePolicy* policy = heap->size_policy();
1701 IsGCActiveMark mark;
1702
1703 if (ScavengeBeforeFullGC) {
1704 PSScavenge::invoke_no_policy();
1705 }
1706
1707 const bool clear_all_soft_refs =
1708 heap->collector_policy()->should_clear_all_soft_refs();
1709
1710 PSParallelCompact::invoke_no_policy(clear_all_soft_refs ||
1711 maximum_heap_compaction);
1712 }
1713
1714 // This method contains no policy. You should probably
1715 // be calling invoke() instead.
1716 bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
1717 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
1718 assert(ref_processor() != NULL, "Sanity");
1719
1720 if (GCLocker::check_active_before_gc()) {
1721 return false;
1722 }
1723
1724 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
1725
1726 GCIdMark gc_id_mark;
1727 _gc_timer.register_gc_start();
1728 _gc_tracer.report_gc_start(heap->gc_cause(), _gc_timer.gc_start());
1729
1730 TimeStamp marking_start;
1731 TimeStamp compaction_start;
1732 TimeStamp collection_exit;
1733
1734 GCCause::Cause gc_cause = heap->gc_cause();
1735 PSYoungGen* young_gen = heap->young_gen();
1736 PSOldGen* old_gen = heap->old_gen();
1737 PSAdaptiveSizePolicy* size_policy = heap->size_policy();
1738
1739 // The scope of casr should end after code that can change
1740 // CollectorPolicy::_should_clear_all_soft_refs.
|