8197493: [Backout] JDK-8196602 Change HeapRegionClosure to comply to naming conventions
Reviewed-by: shade
This commit is contained in:
parent
514930360f
commit
147e4f3054
src/hotspot/share
gc/g1
collectionSetChooser.cppg1CardCounts.cppg1CardLiveData.cppg1CollectedHeap.cppg1CollectedHeap.hppg1CollectionSet.cppg1ConcurrentMark.cppg1ConcurrentMark.hppg1EvacFailure.cppg1FullGCAdjustTask.cppg1FullGCCompactTask.cppg1FullGCPrepareTask.cppg1FullGCPrepareTask.hppg1HeapTransition.cppg1HeapVerifier.cppg1RemSet.cppg1RemSet.hppg1RemSetSummary.cppg1YoungRemSetSamplingThread.cppheapRegion.hppheapRegionManager.cppheapRegionManager.hpp
prims
@ -138,7 +138,7 @@ void CollectionSetChooser::sort_regions() {
|
||||
G1PrintRegionLivenessInfoClosure cl("Post-Sorting");
|
||||
for (uint i = 0; i < _end; ++i) {
|
||||
HeapRegion* r = regions_at(i);
|
||||
cl.do_heap_region(r);
|
||||
cl.doHeapRegion(r);
|
||||
}
|
||||
}
|
||||
verify();
|
||||
@ -220,7 +220,7 @@ public:
|
||||
_g1h(G1CollectedHeap::heap()),
|
||||
_cset_updater(hrSorted, true /* parallel */, chunk_size) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
// Do we have any marking information for this region?
|
||||
if (r->is_marked()) {
|
||||
// We will skip any region that's currently used as an old GC
|
||||
|
@ -144,7 +144,7 @@ class G1CardCountsClearClosure : public HeapRegionClosure {
|
||||
HeapRegionClosure(), _card_counts(card_counts) { }
|
||||
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
_card_counts->clear_region(r);
|
||||
return false;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ class G1CreateCardLiveDataTask: public AbstractGangTask {
|
||||
_mark_bitmap(mark_bitmap),
|
||||
_cm(cm) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
size_t marked_bytes = _helper.mark_marked_during_marking(_mark_bitmap, hr);
|
||||
if (marked_bytes > 0) {
|
||||
hr->add_to_marked_bytes(marked_bytes);
|
||||
@ -352,7 +352,7 @@ class G1FinalizeCardLiveDataTask: public AbstractGangTask {
|
||||
_helper(live_data, g1h->reserved_region().start()),
|
||||
_gc_timestamp_at_create(live_data->gc_timestamp_at_create()) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
if (has_been_reclaimed(hr)) {
|
||||
_helper.reset_live_data(hr);
|
||||
}
|
||||
@ -478,7 +478,7 @@ class G1VerifyCardLiveDataTask: public AbstractGangTask {
|
||||
|
||||
int failures() const { return _failures; }
|
||||
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
int failures = 0;
|
||||
|
||||
// Walk the marking bitmap for this region and set the corresponding bits
|
||||
|
@ -1069,7 +1069,7 @@ class PostCompactionPrinterClosure: public HeapRegionClosure {
|
||||
private:
|
||||
G1HRPrinter* _hr_printer;
|
||||
public:
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
assert(!hr->is_young(), "not expecting to find young regions");
|
||||
_hr_printer->post_compaction(hr);
|
||||
return false;
|
||||
@ -1980,7 +1980,7 @@ public:
|
||||
CheckGCTimeStampsHRClosure(unsigned gc_time_stamp) :
|
||||
_gc_time_stamp(gc_time_stamp), _failures(false) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* hr) {
|
||||
virtual bool doHeapRegion(HeapRegion* hr) {
|
||||
unsigned region_gc_time_stamp = hr->get_gc_time_stamp();
|
||||
if (_gc_time_stamp != region_gc_time_stamp) {
|
||||
log_error(gc, verify)("Region " HR_FORMAT " has GC time stamp = %d, expected %d", HR_FORMAT_PARAMS(hr),
|
||||
@ -2032,7 +2032,7 @@ class SumUsedClosure: public HeapRegionClosure {
|
||||
size_t _used;
|
||||
public:
|
||||
SumUsedClosure() : _used(0) {}
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
_used += r->used();
|
||||
return false;
|
||||
}
|
||||
@ -2251,7 +2251,7 @@ class IterateObjectClosureRegionClosure: public HeapRegionClosure {
|
||||
ObjectClosure* _cl;
|
||||
public:
|
||||
IterateObjectClosureRegionClosure(ObjectClosure* cl) : _cl(cl) {}
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (!r->is_continues_humongous()) {
|
||||
r->object_iterate(_cl);
|
||||
}
|
||||
@ -2366,7 +2366,7 @@ class PrintRegionClosure: public HeapRegionClosure {
|
||||
outputStream* _st;
|
||||
public:
|
||||
PrintRegionClosure(outputStream* st) : _st(st) {}
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
r->print_on(_st);
|
||||
return false;
|
||||
}
|
||||
@ -2485,7 +2485,7 @@ private:
|
||||
size_t _occupied_sum;
|
||||
|
||||
public:
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
HeapRegionRemSet* hrrs = r->rem_set();
|
||||
size_t occupied = hrrs->occupied();
|
||||
_occupied_sum += occupied;
|
||||
@ -2733,7 +2733,7 @@ class RegisterHumongousWithInCSetFastTestClosure : public HeapRegionClosure {
|
||||
_dcq(&JavaThread::dirty_card_queue_set()) {
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
if (!r->is_starts_humongous()) {
|
||||
return false;
|
||||
}
|
||||
@ -2809,7 +2809,7 @@ void G1CollectedHeap::register_humongous_regions_with_cset() {
|
||||
|
||||
class VerifyRegionRemSetClosure : public HeapRegionClosure {
|
||||
public:
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
if (!hr->is_archive() && !hr->is_continues_humongous()) {
|
||||
hr->verify_rem_set();
|
||||
}
|
||||
@ -2879,7 +2879,7 @@ private:
|
||||
public:
|
||||
G1PrintCollectionSetClosure(G1HRPrinter* hr_printer) : HeapRegionClosure(), _hr_printer(hr_printer) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
_hr_printer->cset(r);
|
||||
return false;
|
||||
}
|
||||
@ -4569,7 +4569,7 @@ private:
|
||||
_local_free_list("Local Region List for CSet Freeing") {
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
G1CollectedHeap* g1h = G1CollectedHeap::heap();
|
||||
|
||||
assert(r->in_collection_set(), "Region %u should be in collection set.", r->hrm_index());
|
||||
@ -4692,7 +4692,7 @@ private:
|
||||
public:
|
||||
G1PrepareFreeCollectionSetClosure(WorkItem* work_items) : HeapRegionClosure(), _cur_idx(0), _work_items(work_items) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
_work_items[_cur_idx++] = WorkItem(r);
|
||||
return false;
|
||||
}
|
||||
@ -4826,7 +4826,7 @@ class G1FreeHumongousRegionClosure : public HeapRegionClosure {
|
||||
_free_region_list(free_region_list), _humongous_objects_reclaimed(0), _humongous_regions_reclaimed(0), _freed_bytes(0) {
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
if (!r->is_starts_humongous()) {
|
||||
return false;
|
||||
}
|
||||
@ -4961,7 +4961,7 @@ void G1CollectedHeap::eagerly_reclaim_humongous_regions() {
|
||||
|
||||
class G1AbandonCollectionSetClosure : public HeapRegionClosure {
|
||||
public:
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
assert(r->in_collection_set(), "Region %u must have been in collection set", r->hrm_index());
|
||||
G1CollectedHeap::heap()->clear_in_cset(r);
|
||||
r->set_young_index_in_cset(-1);
|
||||
@ -5031,7 +5031,7 @@ private:
|
||||
bool _success;
|
||||
public:
|
||||
NoYoungRegionsClosure() : _success(true) { }
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_young()) {
|
||||
log_error(gc, verify)("Region [" PTR_FORMAT ", " PTR_FORMAT ") tagged as young",
|
||||
p2i(r->bottom()), p2i(r->end()));
|
||||
@ -5061,7 +5061,7 @@ private:
|
||||
public:
|
||||
TearDownRegionSetsClosure(HeapRegionSet* old_set) : _old_set(old_set) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_old()) {
|
||||
_old_set->remove(r);
|
||||
} else if(r->is_young()) {
|
||||
@ -5129,7 +5129,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_empty()) {
|
||||
// Add free regions to the free list
|
||||
r->set_free();
|
||||
|
@ -1208,7 +1208,7 @@ public:
|
||||
}
|
||||
|
||||
// Iterate over heap regions, in address order, terminating the
|
||||
// iteration early if the "do_heap_region" method returns "true".
|
||||
// iteration early if the "doHeapRegion" method returns "true".
|
||||
void heap_region_iterate(HeapRegionClosure* blk) const;
|
||||
|
||||
// Return the region with the given index. It assumes the index is valid.
|
||||
|
@ -186,9 +186,9 @@ void G1CollectionSet::iterate_from(HeapRegionClosure* cl, uint worker_id, uint t
|
||||
|
||||
do {
|
||||
HeapRegion* r = G1CollectedHeap::heap()->region_at(_collection_set_regions[cur_pos]);
|
||||
bool result = cl->do_heap_region(r);
|
||||
bool result = cl->doHeapRegion(r);
|
||||
if (result) {
|
||||
cl->set_incomplete();
|
||||
cl->incomplete();
|
||||
return;
|
||||
}
|
||||
cur_pos++;
|
||||
@ -292,7 +292,7 @@ public:
|
||||
public:
|
||||
G1VerifyYoungAgesClosure() : HeapRegionClosure(), _valid(true) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
guarantee(r->is_young(), "Region must be young but is %s", r->get_type_str());
|
||||
|
||||
SurvRateGroup* group = r->surv_rate_group();
|
||||
@ -332,7 +332,7 @@ class G1PrintCollectionSetClosure : public HeapRegionClosure {
|
||||
public:
|
||||
G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
assert(r->in_collection_set(), "Region %u should be in collection set", r->hrm_index());
|
||||
_st->print_cr(" " HR_FORMAT ", P: " PTR_FORMAT "N: " PTR_FORMAT ", age: %4d",
|
||||
HR_FORMAT_PARAMS(r),
|
||||
@ -524,7 +524,7 @@ public:
|
||||
FREE_C_HEAP_ARRAY(int, _heap_region_indices);
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
const int idx = r->young_index_in_cset();
|
||||
|
||||
assert(idx > -1, "Young index must be set for all regions in the incremental collection set but is not for region %u.", r->hrm_index());
|
||||
|
@ -591,7 +591,7 @@ private:
|
||||
G1ClearBitmapHRClosure(G1CMBitMap* bitmap, G1ConcurrentMark* cm) : HeapRegionClosure(), _cm(cm), _bitmap(bitmap) {
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
size_t const chunk_size_in_words = G1ClearBitMapTask::chunk_size() / HeapWordSize;
|
||||
|
||||
HeapWord* cur = r->bottom();
|
||||
@ -638,7 +638,7 @@ public:
|
||||
}
|
||||
|
||||
bool is_complete() {
|
||||
return _cl.is_complete();
|
||||
return _cl.complete();
|
||||
}
|
||||
};
|
||||
|
||||
@ -694,7 +694,7 @@ class CheckBitmapClearHRClosure : public HeapRegionClosure {
|
||||
CheckBitmapClearHRClosure(G1CMBitMap* bitmap) : _bitmap(bitmap) {
|
||||
}
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
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.
|
||||
@ -707,12 +707,12 @@ class CheckBitmapClearHRClosure : public HeapRegionClosure {
|
||||
bool G1ConcurrentMark::next_mark_bitmap_is_clear() {
|
||||
CheckBitmapClearHRClosure cl(_next_mark_bitmap);
|
||||
_g1h->heap_region_iterate(&cl);
|
||||
return cl.is_complete();
|
||||
return cl.complete();
|
||||
}
|
||||
|
||||
class NoteStartOfMarkHRClosure: public HeapRegionClosure {
|
||||
public:
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
r->note_start_of_marking();
|
||||
return false;
|
||||
}
|
||||
@ -1094,7 +1094,7 @@ public:
|
||||
const uint old_regions_removed() { return _old_regions_removed; }
|
||||
const uint humongous_regions_removed() { return _humongous_regions_removed; }
|
||||
|
||||
bool do_heap_region(HeapRegion *hr) {
|
||||
bool doHeapRegion(HeapRegion *hr) {
|
||||
_g1->reset_gc_time_stamps(hr);
|
||||
hr->note_end_of_marking();
|
||||
|
||||
@ -1135,7 +1135,7 @@ public:
|
||||
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!");
|
||||
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());
|
||||
@ -2922,7 +2922,7 @@ G1PrintRegionLivenessInfoClosure::G1PrintRegionLivenessInfoClosure(const char* p
|
||||
"(bytes)", "(bytes)");
|
||||
}
|
||||
|
||||
bool G1PrintRegionLivenessInfoClosure::do_heap_region(HeapRegion* r) {
|
||||
bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) {
|
||||
const char* type = r->get_type_str();
|
||||
HeapWord* bottom = r->bottom();
|
||||
HeapWord* end = r->end();
|
||||
|
@ -848,7 +848,7 @@ public:
|
||||
// The header and footer are printed in the constructor and
|
||||
// destructor respectively.
|
||||
G1PrintRegionLivenessInfoClosure(const char* phase_name);
|
||||
virtual bool do_heap_region(HeapRegion* r);
|
||||
virtual bool doHeapRegion(HeapRegion* r);
|
||||
~G1PrintRegionLivenessInfoClosure();
|
||||
};
|
||||
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
return rspc.marked_bytes();
|
||||
}
|
||||
|
||||
bool do_heap_region(HeapRegion *hr) {
|
||||
bool doHeapRegion(HeapRegion *hr) {
|
||||
assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
|
||||
assert(hr->in_collection_set(), "bad CS");
|
||||
|
||||
|
@ -56,7 +56,7 @@ class G1AdjustRegionClosure : public HeapRegionClosure {
|
||||
_bitmap(bitmap),
|
||||
_worker_id(worker_id) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
G1AdjustAndRebuildClosure cl(_worker_id);
|
||||
if (r->is_humongous()) {
|
||||
oop obj = oop(r->humongous_start_region()->bottom());
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
G1ResetHumongousClosure(G1CMBitMap* bitmap) :
|
||||
_bitmap(bitmap) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* current) {
|
||||
bool doHeapRegion(HeapRegion* current) {
|
||||
if (current->is_humongous()) {
|
||||
if (current->is_starts_humongous()) {
|
||||
oop obj = oop(current->bottom());
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "logging/log.hpp"
|
||||
#include "utilities/ticks.inline.hpp"
|
||||
|
||||
bool G1FullGCPrepareTask::G1CalculatePointersClosure::do_heap_region(HeapRegion* hr) {
|
||||
bool G1FullGCPrepareTask::G1CalculatePointersClosure::doHeapRegion(HeapRegion* hr) {
|
||||
if (hr->is_humongous()) {
|
||||
oop obj = oop(hr->humongous_start_region()->bottom());
|
||||
if (_bitmap->is_marked(obj)) {
|
||||
|
@ -67,7 +67,7 @@ protected:
|
||||
G1FullGCCompactionPoint* cp);
|
||||
|
||||
void update_sets();
|
||||
bool do_heap_region(HeapRegion* hr);
|
||||
bool doHeapRegion(HeapRegion* hr);
|
||||
bool freed_regions();
|
||||
};
|
||||
|
||||
|
@ -58,7 +58,7 @@ struct DetailedUsage : public StackObj {
|
||||
class DetailedUsageClosure: public HeapRegionClosure {
|
||||
public:
|
||||
DetailedUsage _usage;
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_old()) {
|
||||
_usage._old_used += r->used();
|
||||
_usage._old_region_count++;
|
||||
|
@ -273,7 +273,7 @@ private:
|
||||
G1CollectedHeap* _g1h;
|
||||
public:
|
||||
VerifyArchivePointerRegionClosure(G1CollectedHeap* g1h) { }
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_archive()) {
|
||||
VerifyObjectInArchiveRegionClosure verify_oop_pointers(r, false);
|
||||
r->object_iterate(&verify_oop_pointers);
|
||||
@ -306,7 +306,7 @@ public:
|
||||
return _failures;
|
||||
}
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
// For archive regions, verify there are no heap pointers to
|
||||
// non-pinned regions. For all others, verify liveness info.
|
||||
if (r->is_closed_archive()) {
|
||||
@ -498,7 +498,7 @@ public:
|
||||
_old_set(old_set), _humongous_set(humongous_set), _hrm(hrm),
|
||||
_old_count(), _humongous_count(), _free_count(){ }
|
||||
|
||||
bool do_heap_region(HeapRegion* hr) {
|
||||
bool doHeapRegion(HeapRegion* hr) {
|
||||
if (hr->is_young()) {
|
||||
// TODO
|
||||
} else if (hr->is_humongous()) {
|
||||
@ -608,7 +608,7 @@ class G1VerifyCardTableCleanup: public HeapRegionClosure {
|
||||
public:
|
||||
G1VerifyCardTableCleanup(G1HeapVerifier* verifier, G1SATBCardTableModRefBS* ct_bs)
|
||||
: _verifier(verifier), _ct_bs(ct_bs) { }
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_survivor()) {
|
||||
_verifier->verify_dirty_region(r);
|
||||
} else {
|
||||
@ -654,7 +654,7 @@ private:
|
||||
G1HeapVerifier* _verifier;
|
||||
public:
|
||||
G1VerifyDirtyYoungListClosure(G1HeapVerifier* verifier) : HeapRegionClosure(), _verifier(verifier) { }
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
_verifier->verify_dirty_region(r);
|
||||
return false;
|
||||
}
|
||||
@ -721,7 +721,7 @@ public:
|
||||
|
||||
bool failures() { return _failures; }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* hr) {
|
||||
virtual bool doHeapRegion(HeapRegion* hr) {
|
||||
bool result = _verifier->verify_bitmaps(_caller, hr);
|
||||
if (!result) {
|
||||
_failures = true;
|
||||
@ -744,7 +744,7 @@ class G1CheckCSetFastTableClosure : public HeapRegionClosure {
|
||||
public:
|
||||
G1CheckCSetFastTableClosure() : HeapRegionClosure(), _failures(false) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* hr) {
|
||||
virtual bool doHeapRegion(HeapRegion* hr) {
|
||||
uint i = hr->hrm_index();
|
||||
InCSetState cset_state = (InCSetState) G1CollectedHeap::heap()->_in_cset_fast_test.get_by_index(i);
|
||||
if (hr->is_humongous()) {
|
||||
|
@ -127,7 +127,7 @@ private:
|
||||
public:
|
||||
G1ResetScanTopClosure(HeapWord** scan_top) : _scan_top(scan_top) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
uint hrm_index = r->hrm_index();
|
||||
if (!r->in_collection_set() && r->is_old_or_humongous()) {
|
||||
_scan_top[hrm_index] = r->top();
|
||||
@ -349,7 +349,7 @@ void G1ScanRSForRegionClosure::claim_card(size_t card_index, const uint region_i
|
||||
_scan_state->add_dirty_region(region_idx_for_card);
|
||||
}
|
||||
|
||||
bool G1ScanRSForRegionClosure::do_heap_region(HeapRegion* r) {
|
||||
bool G1ScanRSForRegionClosure::doHeapRegion(HeapRegion* r) {
|
||||
assert(r->in_collection_set(), "should only be called on elements of CS.");
|
||||
uint region_idx = r->hrm_index();
|
||||
|
||||
@ -522,7 +522,7 @@ public:
|
||||
_g1h(G1CollectedHeap::heap()),
|
||||
_live_data(live_data) { }
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (!r->is_continues_humongous()) {
|
||||
r->rem_set()->scrub(_live_data);
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ public:
|
||||
CodeBlobClosure* code_root_cl,
|
||||
uint worker_i);
|
||||
|
||||
bool do_heap_region(HeapRegion* r);
|
||||
bool doHeapRegion(HeapRegion* r);
|
||||
|
||||
double strong_code_root_scan_time_sec() {
|
||||
return _strong_code_root_scan_time_sec;
|
||||
|
@ -252,7 +252,7 @@ public:
|
||||
_max_rs_mem_sz(0), _max_code_root_mem_sz(0)
|
||||
{}
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
HeapRegionRemSet* hrrs = r->rem_set();
|
||||
|
||||
// HeapRegionRemSet::mem_size() includes the
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
G1YoungRemSetSamplingClosure(SuspendibleThreadSetJoiner* sts) :
|
||||
HeapRegionClosure(), _sts(sts), _regions_visited(0), _sampled_rs_lengths(0) { }
|
||||
|
||||
virtual bool do_heap_region(HeapRegion* r) {
|
||||
virtual bool doHeapRegion(HeapRegion* r) {
|
||||
size_t rs_length = r->rem_set()->occupied();
|
||||
_sampled_rs_lengths += rs_length;
|
||||
|
||||
@ -114,7 +114,7 @@ void G1YoungRemSetSamplingThread::sample_young_list_rs_lengths() {
|
||||
G1CollectionSet* g1cs = g1h->collection_set();
|
||||
g1cs->iterate(&cl);
|
||||
|
||||
if (cl.is_complete()) {
|
||||
if (cl.complete()) {
|
||||
g1p->revise_young_list_target_length_if_necessary(cl.sampled_rs_lengths());
|
||||
}
|
||||
}
|
||||
|
@ -719,23 +719,23 @@ class HeapRegion: public G1ContiguousSpace {
|
||||
};
|
||||
|
||||
// HeapRegionClosure is used for iterating over regions.
|
||||
// Terminates the iteration when the "do_heap_region" method returns "true".
|
||||
// Terminates the iteration when the "doHeapRegion" method returns "true".
|
||||
class HeapRegionClosure : public StackObj {
|
||||
friend class HeapRegionManager;
|
||||
friend class G1CollectionSet;
|
||||
|
||||
bool _is_complete;
|
||||
void set_incomplete() { _is_complete = false; }
|
||||
bool _complete;
|
||||
void incomplete() { _complete = false; }
|
||||
|
||||
public:
|
||||
HeapRegionClosure(): _is_complete(true) {}
|
||||
HeapRegionClosure(): _complete(true) {}
|
||||
|
||||
// Typically called on each region until it returns true.
|
||||
virtual bool do_heap_region(HeapRegion* r) = 0;
|
||||
virtual bool doHeapRegion(HeapRegion* r) = 0;
|
||||
|
||||
// True after iteration if the closure was applied to all heap regions
|
||||
// and returned "false" in all cases.
|
||||
bool is_complete() { return _is_complete; }
|
||||
bool complete() { return _complete; }
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_G1_HEAPREGION_HPP
|
||||
|
@ -242,9 +242,9 @@ void HeapRegionManager::iterate(HeapRegionClosure* blk) const {
|
||||
continue;
|
||||
}
|
||||
guarantee(at(i) != NULL, "Tried to access region %u that has a NULL HeapRegion*", i);
|
||||
bool res = blk->do_heap_region(at(i));
|
||||
bool res = blk->doHeapRegion(at(i));
|
||||
if (res) {
|
||||
blk->set_incomplete();
|
||||
blk->incomplete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -353,7 +353,7 @@ void HeapRegionManager::par_iterate(HeapRegionClosure* blk, HeapRegionClaimer* h
|
||||
if (!hrclaimer->claim_region(index)) {
|
||||
continue;
|
||||
}
|
||||
bool res = blk->do_heap_region(r);
|
||||
bool res = blk->doHeapRegion(r);
|
||||
if (res) {
|
||||
return;
|
||||
}
|
||||
|
@ -236,8 +236,8 @@ public:
|
||||
// and not free, and return the number of regions newly committed in commit_count.
|
||||
bool allocate_containing_regions(MemRegion range, size_t* commit_count, WorkGang* pretouch_workers);
|
||||
|
||||
// Apply blk->do_heap_region() on all committed regions in address order,
|
||||
// terminating the iteration early if do_heap_region() returns true.
|
||||
// Apply blk->doHeapRegion() on all committed regions in address order,
|
||||
// terminating the iteration early if doHeapRegion() returns true.
|
||||
void iterate(HeapRegionClosure* blk) const;
|
||||
|
||||
void par_iterate(HeapRegionClosure* blk, HeapRegionClaimer* hrclaimer, const uint start_index) const;
|
||||
|
@ -528,7 +528,7 @@ class OldRegionsLivenessClosure: public HeapRegionClosure {
|
||||
size_t total_memory() { return _total_memory; }
|
||||
size_t total_memory_to_free() { return _total_memory_to_free; }
|
||||
|
||||
bool do_heap_region(HeapRegion* r) {
|
||||
bool doHeapRegion(HeapRegion* r) {
|
||||
if (r->is_old()) {
|
||||
size_t prev_live = r->marked_bytes();
|
||||
size_t live = r->live_bytes();
|
||||
|
Loading…
x
Reference in New Issue
Block a user