< prev index next >

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

Print this page
rev 48820 : [mq]: 8196602-heapregionclosure-renaming

*** 589,599 **** G1ConcurrentMark* _cm; public: G1ClearBitmapHRClosure(G1CMBitMap* bitmap, G1ConcurrentMark* cm) : HeapRegionClosure(), _cm(cm), _bitmap(bitmap) { } ! virtual bool doHeapRegion(HeapRegion* r) { size_t const chunk_size_in_words = G1ClearBitMapTask::chunk_size() / HeapWordSize; HeapWord* cur = r->bottom(); HeapWord* const end = r->end(); --- 589,599 ---- G1ConcurrentMark* _cm; public: G1ClearBitmapHRClosure(G1CMBitMap* bitmap, G1ConcurrentMark* cm) : HeapRegionClosure(), _cm(cm), _bitmap(bitmap) { } ! virtual bool do_heap_region(HeapRegion* r) { size_t const chunk_size_in_words = G1ClearBitMapTask::chunk_size() / HeapWordSize; HeapWord* cur = r->bottom(); HeapWord* const end = r->end();
*** 636,646 **** SuspendibleThreadSetJoiner sts_join(_suspendible); G1CollectedHeap::heap()->heap_region_par_iterate_from_worker_offset(&_cl, &_hr_claimer, worker_id); } bool is_complete() { ! return _cl.complete(); } }; void G1ConcurrentMark::clear_bitmap(G1CMBitMap* bitmap, WorkGang* workers, bool may_yield) { assert(may_yield || SafepointSynchronize::is_at_safepoint(), "Non-yielding bitmap clear only allowed at safepoint."); --- 636,646 ---- SuspendibleThreadSetJoiner sts_join(_suspendible); G1CollectedHeap::heap()->heap_region_par_iterate_from_worker_offset(&_cl, &_hr_claimer, worker_id); } bool is_complete() { ! return _cl.is_complete(); } }; void G1ConcurrentMark::clear_bitmap(G1CMBitMap* bitmap, WorkGang* workers, bool may_yield) { assert(may_yield || SafepointSynchronize::is_at_safepoint(), "Non-yielding bitmap clear only allowed at safepoint.");
*** 692,702 **** bool _error; public: CheckBitmapClearHRClosure(G1CMBitMap* bitmap) : _bitmap(bitmap) { } ! virtual bool doHeapRegion(HeapRegion* r) { // This closure can be called concurrently to the mutator, so we must make sure // that the result of the getNextMarkedWordAddress() call is compared to the // value passed to it as limit to detect any found bits. // end never changes in G1. HeapWord* end = r->end(); --- 692,702 ---- bool _error; public: CheckBitmapClearHRClosure(G1CMBitMap* bitmap) : _bitmap(bitmap) { } ! virtual bool do_heap_region(HeapRegion* r) { // This closure can be called concurrently to the mutator, so we must make sure // that the result of the getNextMarkedWordAddress() call is compared to the // value passed to it as limit to detect any found bits. // end never changes in G1. HeapWord* end = r->end();
*** 705,720 **** }; bool G1ConcurrentMark::next_mark_bitmap_is_clear() { CheckBitmapClearHRClosure cl(_next_mark_bitmap); _g1h->heap_region_iterate(&cl); ! return cl.complete(); } class NoteStartOfMarkHRClosure: public HeapRegionClosure { public: ! bool doHeapRegion(HeapRegion* r) { r->note_start_of_marking(); return false; } }; --- 705,720 ---- }; bool G1ConcurrentMark::next_mark_bitmap_is_clear() { CheckBitmapClearHRClosure cl(_next_mark_bitmap); _g1h->heap_region_iterate(&cl); ! return cl.is_complete(); } class NoteStartOfMarkHRClosure: public HeapRegionClosure { public: ! bool do_heap_region(HeapRegion* r) { r->note_start_of_marking(); return false; } };
*** 1092,1102 **** size_t freed_bytes() { return _freed_bytes; } const uint old_regions_removed() { return _old_regions_removed; } const uint humongous_regions_removed() { return _humongous_regions_removed; } ! bool doHeapRegion(HeapRegion *hr) { _g1->reset_gc_time_stamps(hr); hr->note_end_of_marking(); if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young() && !hr->is_archive()) { _freed_bytes += hr->used(); --- 1092,1102 ---- size_t freed_bytes() { return _freed_bytes; } const uint old_regions_removed() { return _old_regions_removed; } const uint humongous_regions_removed() { return _humongous_regions_removed; } ! bool do_heap_region(HeapRegion *hr) { _g1->reset_gc_time_stamps(hr); hr->note_end_of_marking(); if (hr->used() > 0 && hr->max_live_bytes() == 0 && !hr->is_young() && !hr->is_archive()) { _freed_bytes += hr->used();
*** 1133,1143 **** FreeRegionList local_cleanup_list("Local Cleanup List"); HRRSCleanupTask hrrs_cleanup_task; G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &local_cleanup_list, &hrrs_cleanup_task); _g1h->heap_region_par_iterate_from_worker_offset(&g1_note_end, &_hrclaimer, worker_id); ! assert(g1_note_end.complete(), "Shouldn't have yielded!"); // Now update the lists _g1h->remove_from_old_sets(g1_note_end.old_regions_removed(), g1_note_end.humongous_regions_removed()); { MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag); --- 1133,1143 ---- FreeRegionList local_cleanup_list("Local Cleanup List"); HRRSCleanupTask hrrs_cleanup_task; G1NoteEndOfConcMarkClosure g1_note_end(_g1h, &local_cleanup_list, &hrrs_cleanup_task); _g1h->heap_region_par_iterate_from_worker_offset(&g1_note_end, &_hrclaimer, worker_id); ! assert(g1_note_end.is_complete(), "Shouldn't have yielded!"); // Now update the lists _g1h->remove_from_old_sets(g1_note_end.old_regions_removed(), g1_note_end.humongous_regions_removed()); { MutexLockerEx x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
*** 2920,2930 **** "", "", "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", "(bytes)", "(bytes)"); } ! bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) { const char* type = r->get_type_str(); HeapWord* bottom = r->bottom(); HeapWord* end = r->end(); size_t capacity_bytes = r->capacity(); size_t used_bytes = r->used(); --- 2920,2930 ---- "", "", "(bytes)", "(bytes)", "(bytes)", "(bytes/ms)", "(bytes)", "(bytes)"); } ! bool G1PrintRegionLivenessInfoClosure::do_heap_region(HeapRegion* r) { const char* type = r->get_type_str(); HeapWord* bottom = r->bottom(); HeapWord* end = r->end(); size_t capacity_bytes = r->capacity(); size_t used_bytes = r->used();
< prev index next >