< prev index next >

src/share/vm/gc/g1/concurrentMark.cpp

Print this page




1766   HeapRegionSetCount _old_regions_removed;
1767   HeapRegionSetCount _humongous_regions_removed;
1768   HRRSCleanupTask* _hrrs_cleanup_task;
1769 
1770 public:
1771   G1NoteEndOfConcMarkClosure(G1CollectedHeap* g1,
1772                              FreeRegionList* local_cleanup_list,
1773                              HRRSCleanupTask* hrrs_cleanup_task) :
1774     _g1(g1),
1775     _freed_bytes(0),
1776     _local_cleanup_list(local_cleanup_list),
1777     _old_regions_removed(),
1778     _humongous_regions_removed(),
1779     _hrrs_cleanup_task(hrrs_cleanup_task) { }
1780 
1781   size_t freed_bytes() { return _freed_bytes; }
1782   const HeapRegionSetCount& old_regions_removed() { return _old_regions_removed; }
1783   const HeapRegionSetCount& humongous_regions_removed() { return _humongous_regions_removed; }
1784 
1785   bool doHeapRegion(HeapRegion *hr) {
1786     if (hr->is_continues_humongous()) {
1787       return false;
1788     }
1789     // We use a claim value of zero here because all regions
1790     // were claimed with value 1 in the FinalCount task.
1791     _g1->reset_gc_time_stamps(hr);
1792     hr->note_end_of_marking();
1793 
1794     if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young()) {
1795       _freed_bytes += hr->used();
1796       hr->set_containing_set(NULL);
1797       if (hr->is_humongous()) {
1798         assert(hr->is_starts_humongous(), "we should only see starts humongous");
1799         _humongous_regions_removed.increment(1u, hr->capacity());
1800         _g1->free_humongous_region(hr, _local_cleanup_list, true);
1801       } else {
1802         _old_regions_removed.increment(1u, hr->capacity());
1803         _g1->free_region(hr, _local_cleanup_list, true);
1804       }
1805     } else {
1806       hr->rem_set()->do_cleanup_work(_hrrs_cleanup_task);




1766   HeapRegionSetCount _old_regions_removed;
1767   HeapRegionSetCount _humongous_regions_removed;
1768   HRRSCleanupTask* _hrrs_cleanup_task;
1769 
1770 public:
1771   G1NoteEndOfConcMarkClosure(G1CollectedHeap* g1,
1772                              FreeRegionList* local_cleanup_list,
1773                              HRRSCleanupTask* hrrs_cleanup_task) :
1774     _g1(g1),
1775     _freed_bytes(0),
1776     _local_cleanup_list(local_cleanup_list),
1777     _old_regions_removed(),
1778     _humongous_regions_removed(),
1779     _hrrs_cleanup_task(hrrs_cleanup_task) { }
1780 
1781   size_t freed_bytes() { return _freed_bytes; }
1782   const HeapRegionSetCount& old_regions_removed() { return _old_regions_removed; }
1783   const HeapRegionSetCount& humongous_regions_removed() { return _humongous_regions_removed; }
1784 
1785   bool doHeapRegion(HeapRegion *hr) {
1786     if (hr->is_continues_humongous() || hr->is_archive()) {
1787       return false;
1788     }
1789     // We use a claim value of zero here because all regions
1790     // were claimed with value 1 in the FinalCount task.
1791     _g1->reset_gc_time_stamps(hr);
1792     hr->note_end_of_marking();
1793 
1794     if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young()) {
1795       _freed_bytes += hr->used();
1796       hr->set_containing_set(NULL);
1797       if (hr->is_humongous()) {
1798         assert(hr->is_starts_humongous(), "we should only see starts humongous");
1799         _humongous_regions_removed.increment(1u, hr->capacity());
1800         _g1->free_humongous_region(hr, _local_cleanup_list, true);
1801       } else {
1802         _old_regions_removed.increment(1u, hr->capacity());
1803         _g1->free_region(hr, _local_cleanup_list, true);
1804       }
1805     } else {
1806       hr->rem_set()->do_cleanup_work(_hrrs_cleanup_task);


< prev index next >