--- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-07-10 11:11:03.365975192 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2014-07-10 11:11:03.280972733 +0200 @@ -2953,13 +2953,11 @@ HeapRegion* G1CollectedHeap::next_compaction_region(const HeapRegion* from) const { // We're not using an iterator given that it will wrap around when // it reaches the last region and this is not what we want here. - uint index = from->hrs_index() + 1; - while (index < n_regions()) { + for (uint index = from->hrs_index() + 1; index < n_regions(); index++) { HeapRegion* hr = region_at(index); if (!hr->isHumongous()) { return hr; } - index += 1; } return NULL; } @@ -6613,9 +6611,8 @@ } else if (!_free_list_only) { assert(!r->is_young(), "we should not come across young regions"); - if (r->startsHumongous()) { + if (r->isHumongous()) { // We ignore humongous regions, we left the humongous set unchanged - } else if (r->continuesHumongous()) { } else { // The rest should be old, add them to the old set _old_set->add(r); --- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2014-07-10 11:11:03.988993217 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2014-07-10 11:11:03.909990931 +0200 @@ -1161,16 +1161,16 @@ uint n_regions() const { return _hrs.length(); } // The max number of regions in the heap. - uint max_regions() { return _hrs.max_length(); } + uint max_regions() const { return _hrs.max_length(); } // The number of regions that are completely free. - uint free_regions() { return _free_list.length(); } + uint free_regions() const { return _free_list.length(); } // The number of regions that are not completely free. - uint used_regions() { return n_regions() - free_regions(); } + uint used_regions() const { return n_regions() - free_regions(); } // The number of regions available for "regular" expansion. - uint expansion_regions() { return _expansion_regions; } + uint expansion_regions() const { return _expansion_regions; } // Factory method for HeapRegion instances. It will return NULL if // the allocation fails. --- old/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2014-07-10 11:11:04.518008522 +0200 +++ new/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp 2014-07-10 11:11:04.441006294 +0200 @@ -237,7 +237,7 @@ G1PrepareCompactClosure() : _g1h(G1CollectedHeap::heap()), _mrbs(_g1h->g1_barrier_set()), - _cp(), + _cp(NULL), _humongous_regions_removed() { } void update_sets() { --- old/src/share/vm/gc_implementation/g1/heapRegionSet.hpp 2014-07-10 11:11:05.028023278 +0200 +++ new/src/share/vm/gc_implementation/g1/heapRegionSet.hpp 2014-07-10 11:11:04.948020963 +0200 @@ -119,7 +119,7 @@ public: const char* name() { return _name; } - uint length() { return _count.length(); } + uint length() const { return _count.length(); } bool is_empty() { return _count.length() == 0; } --- old/src/share/vm/memory/genCollectedHeap.cpp 2014-07-10 11:11:05.518037454 +0200 +++ new/src/share/vm/memory/genCollectedHeap.cpp 2014-07-10 11:11:05.440035198 +0200 @@ -1088,7 +1088,7 @@ guarantee(_n_gens = 2, "Wrong number of generations"); Generation* old_gen = _gens[1]; // Start by compacting into same gen. - CompactPoint cp(old_gen, NULL, NULL); + CompactPoint cp(old_gen); old_gen->prepare_for_compaction(&cp); Generation* young_gen = _gens[0]; young_gen->prepare_for_compaction(&cp); --- old/src/share/vm/memory/space.hpp 2014-07-10 11:11:06.057053049 +0200 +++ new/src/share/vm/memory/space.hpp 2014-07-10 11:11:05.978050763 +0200 @@ -331,11 +331,8 @@ CompactibleSpace* space; HeapWord* threshold; - CompactPoint() : gen(NULL), space(NULL), threshold(0) {} - - CompactPoint(Generation* _gen, CompactibleSpace* _space, - HeapWord* _threshold) : - gen(_gen), space(_space), threshold(_threshold) {} + CompactPoint(Generation* _gen) : + gen(_gen), space(NULL), threshold(0) {} };