8196602: Change HeapRegionClosure to comply to naming conventions
authortschatzl
Fri, 09 Feb 2018 13:09:55 +0100
changeset 48950 f323537c9b75
parent 48949 d2a860bc50a3
child 48951 950c35ea6237
8196602: Change HeapRegionClosure to comply to naming conventions Reviewed-by: kbarrett, sjohanss
src/hotspot/share/gc/g1/collectionSetChooser.cpp
src/hotspot/share/gc/g1/g1CardCounts.cpp
src/hotspot/share/gc/g1/g1CardLiveData.cpp
src/hotspot/share/gc/g1/g1CollectedHeap.cpp
src/hotspot/share/gc/g1/g1CollectedHeap.hpp
src/hotspot/share/gc/g1/g1CollectionSet.cpp
src/hotspot/share/gc/g1/g1ConcurrentMark.cpp
src/hotspot/share/gc/g1/g1ConcurrentMark.hpp
src/hotspot/share/gc/g1/g1EvacFailure.cpp
src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp
src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp
src/hotspot/share/gc/g1/g1HeapTransition.cpp
src/hotspot/share/gc/g1/g1HeapVerifier.cpp
src/hotspot/share/gc/g1/g1RemSet.cpp
src/hotspot/share/gc/g1/g1RemSet.hpp
src/hotspot/share/gc/g1/g1RemSetSummary.cpp
src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp
src/hotspot/share/gc/g1/heapRegion.hpp
src/hotspot/share/gc/g1/heapRegionManager.cpp
src/hotspot/share/gc/g1/heapRegionManager.hpp
src/hotspot/share/prims/whitebox.cpp
--- a/src/hotspot/share/gc/g1/collectionSetChooser.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/collectionSetChooser.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -138,7 +138,7 @@
     G1PrintRegionLivenessInfoClosure cl("Post-Sorting");
     for (uint i = 0; i < _end; ++i) {
       HeapRegion* r = regions_at(i);
-      cl.doHeapRegion(r);
+      cl.do_heap_region(r);
     }
   }
   verify();
@@ -220,7 +220,7 @@
     _g1h(G1CollectedHeap::heap()),
     _cset_updater(hrSorted, true /* parallel */, chunk_size) { }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(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
--- a/src/hotspot/share/gc/g1/g1CardCounts.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CardCounts.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -144,7 +144,7 @@
     HeapRegionClosure(), _card_counts(card_counts) { }
 
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     _card_counts->clear_region(r);
     return false;
   }
--- a/src/hotspot/share/gc/g1/g1CardLiveData.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CardLiveData.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -285,7 +285,7 @@
       _mark_bitmap(mark_bitmap),
       _cm(cm) { }
 
-    bool doHeapRegion(HeapRegion* hr) {
+    bool do_heap_region(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 @@
       _helper(live_data, g1h->reserved_region().start()),
       _gc_timestamp_at_create(live_data->gc_timestamp_at_create()) { }
 
-    bool doHeapRegion(HeapRegion* hr) {
+    bool do_heap_region(HeapRegion* hr) {
       if (has_been_reclaimed(hr)) {
         _helper.reset_live_data(hr);
       }
@@ -478,7 +478,7 @@
 
     int failures() const { return _failures; }
 
-    bool doHeapRegion(HeapRegion* hr) {
+    bool do_heap_region(HeapRegion* hr) {
       int failures = 0;
 
       // Walk the marking bitmap for this region and set the corresponding bits
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -1010,7 +1010,7 @@
 private:
   G1HRPrinter* _hr_printer;
 public:
-  bool doHeapRegion(HeapRegion* hr) {
+  bool do_heap_region(HeapRegion* hr) {
     assert(!hr->is_young(), "not expecting to find young regions");
     _hr_printer->post_compaction(hr);
     return false;
@@ -1917,7 +1917,7 @@
   CheckGCTimeStampsHRClosure(unsigned gc_time_stamp) :
     _gc_time_stamp(gc_time_stamp), _failures(false) { }
 
-  virtual bool doHeapRegion(HeapRegion* hr) {
+  virtual bool do_heap_region(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),
@@ -1969,7 +1969,7 @@
   size_t _used;
 public:
   SumUsedClosure() : _used(0) {}
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     _used += r->used();
     return false;
   }
@@ -2188,7 +2188,7 @@
   ObjectClosure* _cl;
 public:
   IterateObjectClosureRegionClosure(ObjectClosure* cl) : _cl(cl) {}
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (!r->is_continues_humongous()) {
       r->object_iterate(_cl);
     }
@@ -2303,7 +2303,7 @@
   outputStream* _st;
 public:
   PrintRegionClosure(outputStream* st) : _st(st) {}
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     r->print_on(_st);
     return false;
   }
@@ -2422,7 +2422,7 @@
   size_t _occupied_sum;
 
 public:
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     HeapRegionRemSet* hrrs = r->rem_set();
     size_t occupied = hrrs->occupied();
     _occupied_sum += occupied;
@@ -2669,7 +2669,7 @@
     _dcq(&JavaThread::dirty_card_queue_set()) {
   }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     if (!r->is_starts_humongous()) {
       return false;
     }
@@ -2745,7 +2745,7 @@
 
 class VerifyRegionRemSetClosure : public HeapRegionClosure {
   public:
-    bool doHeapRegion(HeapRegion* hr) {
+    bool do_heap_region(HeapRegion* hr) {
       if (!hr->is_archive() && !hr->is_continues_humongous()) {
         hr->verify_rem_set();
       }
@@ -2815,7 +2815,7 @@
 public:
   G1PrintCollectionSetClosure(G1HRPrinter* hr_printer) : HeapRegionClosure(), _hr_printer(hr_printer) { }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     _hr_printer->cset(r);
     return false;
   }
@@ -4505,7 +4505,7 @@
       _local_free_list("Local Region List for CSet Freeing") {
     }
 
-    virtual bool doHeapRegion(HeapRegion* r) {
+    virtual bool do_heap_region(HeapRegion* r) {
       G1CollectedHeap* g1h = G1CollectedHeap::heap();
 
       assert(r->in_collection_set(), "Region %u should be in collection set.", r->hrm_index());
@@ -4628,7 +4628,7 @@
   public:
     G1PrepareFreeCollectionSetClosure(WorkItem* work_items) : HeapRegionClosure(), _cur_idx(0), _work_items(work_items) { }
 
-    virtual bool doHeapRegion(HeapRegion* r) {
+    virtual bool do_heap_region(HeapRegion* r) {
       _work_items[_cur_idx++] = WorkItem(r);
       return false;
     }
@@ -4762,7 +4762,7 @@
     _free_region_list(free_region_list), _humongous_objects_reclaimed(0), _humongous_regions_reclaimed(0), _freed_bytes(0) {
   }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     if (!r->is_starts_humongous()) {
       return false;
     }
@@ -4897,7 +4897,7 @@
 
 class G1AbandonCollectionSetClosure : public HeapRegionClosure {
 public:
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(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);
@@ -4967,7 +4967,7 @@
   bool _success;
 public:
   NoYoungRegionsClosure() : _success(true) { }
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (r->is_young()) {
       log_error(gc, verify)("Region [" PTR_FORMAT ", " PTR_FORMAT ") tagged as young",
                             p2i(r->bottom()), p2i(r->end()));
@@ -4997,7 +4997,7 @@
 public:
   TearDownRegionSetsClosure(HeapRegionSet* old_set) : _old_set(old_set) { }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (r->is_old()) {
       _old_set->remove(r);
     } else if(r->is_young()) {
@@ -5065,7 +5065,7 @@
     }
   }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (r->is_empty()) {
       // Add free regions to the free list
       r->set_free();
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -1197,7 +1197,7 @@
   }
 
   // Iterate over heap regions, in address order, terminating the
-  // iteration early if the "doHeapRegion" method returns "true".
+  // iteration early if the "do_heap_region" method returns "true".
   void heap_region_iterate(HeapRegionClosure* blk) const;
 
   // Return the region with the given index. It assumes the index is valid.
--- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -186,9 +186,9 @@
 
   do {
     HeapRegion* r = G1CollectedHeap::heap()->region_at(_collection_set_regions[cur_pos]);
-    bool result = cl->doHeapRegion(r);
+    bool result = cl->do_heap_region(r);
     if (result) {
-      cl->incomplete();
+      cl->set_incomplete();
       return;
     }
     cur_pos++;
@@ -292,7 +292,7 @@
 public:
   G1VerifyYoungAgesClosure() : HeapRegionClosure(), _valid(true) { }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(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 @@
 public:
   G1PrintCollectionSetClosure(outputStream* st) : HeapRegionClosure(), _st(st) { }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(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 @@
     FREE_C_HEAP_ARRAY(int, _heap_region_indices);
   }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(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());
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -591,7 +591,7 @@
     G1ClearBitmapHRClosure(G1CMBitMap* bitmap, G1ConcurrentMark* cm) : HeapRegionClosure(), _cm(cm), _bitmap(bitmap) {
     }
 
-    virtual bool doHeapRegion(HeapRegion* r) {
+    virtual bool do_heap_region(HeapRegion* r) {
       size_t const chunk_size_in_words = G1ClearBitMapTask::chunk_size() / HeapWordSize;
 
       HeapWord* cur = r->bottom();
@@ -638,7 +638,7 @@
   }
 
   bool is_complete() {
-    return _cl.complete();
+    return _cl.is_complete();
   }
 };
 
@@ -694,7 +694,7 @@
   CheckBitmapClearHRClosure(G1CMBitMap* bitmap) : _bitmap(bitmap) {
   }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  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.
@@ -707,12 +707,12 @@
 bool G1ConcurrentMark::next_mark_bitmap_is_clear() {
   CheckBitmapClearHRClosure cl(_next_mark_bitmap);
   _g1h->heap_region_iterate(&cl);
-  return cl.complete();
+  return cl.is_complete();
 }
 
 class NoteStartOfMarkHRClosure: public HeapRegionClosure {
 public:
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     r->note_start_of_marking();
     return false;
   }
@@ -1094,7 +1094,7 @@
   const uint old_regions_removed() { return _old_regions_removed; }
   const uint humongous_regions_removed() { return _humongous_regions_removed; }
 
-  bool doHeapRegion(HeapRegion *hr) {
+  bool do_heap_region(HeapRegion *hr) {
     _g1->reset_gc_time_stamps(hr);
     hr->note_end_of_marking();
 
@@ -1135,7 +1135,7 @@
     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!");
+    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());
@@ -2922,7 +2922,7 @@
                           "(bytes)", "(bytes)");
 }
 
-bool G1PrintRegionLivenessInfoClosure::doHeapRegion(HeapRegion* r) {
+bool G1PrintRegionLivenessInfoClosure::do_heap_region(HeapRegion* r) {
   const char* type       = r->get_type_str();
   HeapWord* bottom       = r->bottom();
   HeapWord* end          = r->end();
--- a/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1ConcurrentMark.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -848,7 +848,7 @@
   // The header and footer are printed in the constructor and
   // destructor respectively.
   G1PrintRegionLivenessInfoClosure(const char* phase_name);
-  virtual bool doHeapRegion(HeapRegion* r);
+  virtual bool do_heap_region(HeapRegion* r);
   ~G1PrintRegionLivenessInfoClosure();
 };
 
--- a/src/hotspot/share/gc/g1/g1EvacFailure.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1EvacFailure.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -220,7 +220,7 @@
     return rspc.marked_bytes();
   }
 
-  bool doHeapRegion(HeapRegion *hr) {
+  bool do_heap_region(HeapRegion *hr) {
     assert(!hr->is_pinned(), "Unexpected pinned region at index %u", hr->hrm_index());
     assert(hr->in_collection_set(), "bad CS");
 
--- a/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1FullGCAdjustTask.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -56,7 +56,7 @@
     _bitmap(bitmap),
     _worker_id(worker_id) { }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     G1AdjustAndRebuildClosure cl(_worker_id);
     if (r->is_humongous()) {
       oop obj = oop(r->humongous_start_region()->bottom());
--- a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -40,7 +40,7 @@
   G1ResetHumongousClosure(G1CMBitMap* bitmap) :
       _bitmap(bitmap) { }
 
-  bool doHeapRegion(HeapRegion* current) {
+  bool do_heap_region(HeapRegion* current) {
     if (current->is_humongous()) {
       if (current->is_starts_humongous()) {
         oop obj = oop(current->bottom());
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -37,7 +37,7 @@
 #include "logging/log.hpp"
 #include "utilities/ticks.inline.hpp"
 
-bool G1FullGCPrepareTask::G1CalculatePointersClosure::doHeapRegion(HeapRegion* hr) {
+bool G1FullGCPrepareTask::G1CalculatePointersClosure::do_heap_region(HeapRegion* hr) {
   if (hr->is_humongous()) {
     oop obj = oop(hr->humongous_start_region()->bottom());
     if (_bitmap->is_marked(obj)) {
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -67,7 +67,7 @@
                                G1FullGCCompactionPoint* cp);
 
     void update_sets();
-    bool doHeapRegion(HeapRegion* hr);
+    bool do_heap_region(HeapRegion* hr);
     bool freed_regions();
   };
 
--- a/src/hotspot/share/gc/g1/g1HeapTransition.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1HeapTransition.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -58,7 +58,7 @@
 class DetailedUsageClosure: public HeapRegionClosure {
 public:
   DetailedUsage _usage;
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (r->is_old()) {
       _usage._old_used += r->used();
       _usage._old_region_count++;
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -273,7 +273,7 @@
   G1CollectedHeap* _g1h;
 public:
   VerifyArchivePointerRegionClosure(G1CollectedHeap* g1h) { }
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
    if (r->is_archive()) {
       VerifyObjectInArchiveRegionClosure verify_oop_pointers(r, false);
       r->object_iterate(&verify_oop_pointers);
@@ -306,7 +306,7 @@
     return _failures;
   }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(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 @@
     _old_set(old_set), _humongous_set(humongous_set), _hrm(hrm),
     _old_count(), _humongous_count(), _free_count(){ }
 
-  bool doHeapRegion(HeapRegion* hr) {
+  bool do_heap_region(HeapRegion* hr) {
     if (hr->is_young()) {
       // TODO
     } else if (hr->is_humongous()) {
@@ -608,7 +608,7 @@
 public:
   G1VerifyCardTableCleanup(G1HeapVerifier* verifier, G1SATBCardTableModRefBS* ct_bs)
     : _verifier(verifier), _ct_bs(ct_bs) { }
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     if (r->is_survivor()) {
       _verifier->verify_dirty_region(r);
     } else {
@@ -654,7 +654,7 @@
   G1HeapVerifier* _verifier;
 public:
   G1VerifyDirtyYoungListClosure(G1HeapVerifier* verifier) : HeapRegionClosure(), _verifier(verifier) { }
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     _verifier->verify_dirty_region(r);
     return false;
   }
@@ -721,7 +721,7 @@
 
   bool failures() { return _failures; }
 
-  virtual bool doHeapRegion(HeapRegion* hr) {
+  virtual bool do_heap_region(HeapRegion* hr) {
     bool result = _verifier->verify_bitmaps(_caller, hr);
     if (!result) {
       _failures = true;
@@ -744,7 +744,7 @@
  public:
   G1CheckCSetFastTableClosure() : HeapRegionClosure(), _failures(false) { }
 
-  virtual bool doHeapRegion(HeapRegion* hr) {
+  virtual bool do_heap_region(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()) {
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1RemSet.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -127,7 +127,7 @@
   public:
     G1ResetScanTopClosure(HeapWord** scan_top) : _scan_top(scan_top) { }
 
-    virtual bool doHeapRegion(HeapRegion* r) {
+    virtual bool do_heap_region(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 @@
   _scan_state->add_dirty_region(region_idx_for_card);
 }
 
-bool G1ScanRSForRegionClosure::doHeapRegion(HeapRegion* r) {
+bool G1ScanRSForRegionClosure::do_heap_region(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 @@
     _g1h(G1CollectedHeap::heap()),
     _live_data(live_data) { }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (!r->is_continues_humongous()) {
       r->rem_set()->scrub(_live_data);
     }
--- a/src/hotspot/share/gc/g1/g1RemSet.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1RemSet.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -176,7 +176,7 @@
                            CodeBlobClosure* code_root_cl,
                            uint worker_i);
 
-  bool doHeapRegion(HeapRegion* r);
+  bool do_heap_region(HeapRegion* r);
 
   double strong_code_root_scan_time_sec() {
     return _strong_code_root_scan_time_sec;
--- a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -252,7 +252,7 @@
     _max_rs_mem_sz(0), _max_code_root_mem_sz(0)
   {}
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     HeapRegionRemSet* hrrs = r->rem_set();
 
     // HeapRegionRemSet::mem_size() includes the
--- a/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1YoungRemSetSamplingThread.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -79,7 +79,7 @@
   G1YoungRemSetSamplingClosure(SuspendibleThreadSetJoiner* sts) :
     HeapRegionClosure(), _sts(sts), _regions_visited(0), _sampled_rs_lengths(0) { }
 
-  virtual bool doHeapRegion(HeapRegion* r) {
+  virtual bool do_heap_region(HeapRegion* r) {
     size_t rs_length = r->rem_set()->occupied();
     _sampled_rs_lengths += rs_length;
 
@@ -114,7 +114,7 @@
     G1CollectionSet* g1cs = g1h->collection_set();
     g1cs->iterate(&cl);
 
-    if (cl.complete()) {
+    if (cl.is_complete()) {
       g1p->revise_young_list_target_length_if_necessary(cl.sampled_rs_lengths());
     }
   }
--- a/src/hotspot/share/gc/g1/heapRegion.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/heapRegion.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -719,23 +719,23 @@
 };
 
 // HeapRegionClosure is used for iterating over regions.
-// Terminates the iteration when the "doHeapRegion" method returns "true".
+// Terminates the iteration when the "do_heap_region" method returns "true".
 class HeapRegionClosure : public StackObj {
   friend class HeapRegionManager;
   friend class G1CollectionSet;
 
-  bool _complete;
-  void incomplete() { _complete = false; }
+  bool _is_complete;
+  void set_incomplete() { _is_complete = false; }
 
  public:
-  HeapRegionClosure(): _complete(true) {}
+  HeapRegionClosure(): _is_complete(true) {}
 
   // Typically called on each region until it returns true.
-  virtual bool doHeapRegion(HeapRegion* r) = 0;
+  virtual bool do_heap_region(HeapRegion* r) = 0;
 
   // True after iteration if the closure was applied to all heap regions
   // and returned "false" in all cases.
-  bool complete() { return _complete; }
+  bool is_complete() { return _is_complete; }
 };
 
 #endif // SHARE_VM_GC_G1_HEAPREGION_HPP
--- a/src/hotspot/share/gc/g1/heapRegionManager.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/heapRegionManager.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -242,9 +242,9 @@
       continue;
     }
     guarantee(at(i) != NULL, "Tried to access region %u that has a NULL HeapRegion*", i);
-    bool res = blk->doHeapRegion(at(i));
+    bool res = blk->do_heap_region(at(i));
     if (res) {
-      blk->incomplete();
+      blk->set_incomplete();
       return;
     }
   }
@@ -353,7 +353,7 @@
     if (!hrclaimer->claim_region(index)) {
       continue;
     }
-    bool res = blk->doHeapRegion(r);
+    bool res = blk->do_heap_region(r);
     if (res) {
       return;
     }
--- a/src/hotspot/share/gc/g1/heapRegionManager.hpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/gc/g1/heapRegionManager.hpp	Fri Feb 09 13:09:55 2018 +0100
@@ -236,8 +236,8 @@
   // 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->doHeapRegion() on all committed regions in address order,
-  // terminating the iteration early if doHeapRegion() returns true.
+  // Apply blk->do_heap_region() on all committed regions in address order,
+  // terminating the iteration early if do_heap_region() returns true.
   void iterate(HeapRegionClosure* blk) const;
 
   void par_iterate(HeapRegionClosure* blk, HeapRegionClaimer* hrclaimer, const uint start_index) const;
--- a/src/hotspot/share/prims/whitebox.cpp	Fri Feb 09 12:09:21 2018 +0530
+++ b/src/hotspot/share/prims/whitebox.cpp	Fri Feb 09 13:09:55 2018 +0100
@@ -528,7 +528,7 @@
     size_t total_memory() { return _total_memory; }
     size_t total_memory_to_free() { return _total_memory_to_free; }
 
-  bool doHeapRegion(HeapRegion* r) {
+  bool do_heap_region(HeapRegion* r) {
     if (r->is_old()) {
       size_t prev_live = r->marked_bytes();
       size_t live = r->live_bytes();