diff --git a/src/hotspot/share/gc/g1/g1EdenRegions.hpp b/src/hotspot/share/gc/g1/g1EdenRegions.hpp index c7ed9008ee7..a08cda97d4c 100644 --- a/src/hotspot/share/gc/g1/g1EdenRegions.hpp +++ b/src/hotspot/share/gc/g1/g1EdenRegions.hpp @@ -41,10 +41,10 @@ private: public: G1EdenRegions() : _length(0), _used_bytes(0), _regions_on_node() { } - uint add(G1HeapRegion* hr) { + void add(G1HeapRegion* hr) { assert(hr->is_eden(), "must be"); _length++; - return _regions_on_node.add(hr); + _regions_on_node.add(hr); } void clear() { diff --git a/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp b/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp index 91f6ee49095..c1c0d471796 100644 --- a/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp +++ b/src/hotspot/share/gc/g1/g1RegionsOnNodes.cpp @@ -35,16 +35,13 @@ G1RegionsOnNodes::~G1RegionsOnNodes() { FREE_C_HEAP_ARRAY(uint, _count_per_node); } -uint G1RegionsOnNodes::add(G1HeapRegion* hr) { +void G1RegionsOnNodes::add(G1HeapRegion* hr) { uint node_index = hr->node_index(); // Update only if the node index is valid. if (node_index < _numa->num_active_nodes()) { *(_count_per_node + node_index) += 1; - return node_index; } - - return G1NUMA::UnknownNodeIndex; } void G1RegionsOnNodes::clear() { diff --git a/src/hotspot/share/gc/g1/g1RegionsOnNodes.hpp b/src/hotspot/share/gc/g1/g1RegionsOnNodes.hpp index d5318343399..5b8d6479833 100644 --- a/src/hotspot/share/gc/g1/g1RegionsOnNodes.hpp +++ b/src/hotspot/share/gc/g1/g1RegionsOnNodes.hpp @@ -40,8 +40,8 @@ public: ~G1RegionsOnNodes(); - // Increase _count_per_node for the node of given heap region and returns node index. - uint add(G1HeapRegion* hr); + // Increase _count_per_node for the node of given heap region. + void add(G1HeapRegion* hr); void clear(); diff --git a/src/hotspot/share/gc/g1/g1SurvivorRegions.cpp b/src/hotspot/share/gc/g1/g1SurvivorRegions.cpp index 4aa752e5823..84609df4fc9 100644 --- a/src/hotspot/share/gc/g1/g1SurvivorRegions.cpp +++ b/src/hotspot/share/gc/g1/g1SurvivorRegions.cpp @@ -32,10 +32,10 @@ G1SurvivorRegions::G1SurvivorRegions() : _used_bytes(0), _regions_on_node() {} -uint G1SurvivorRegions::add(G1HeapRegion* hr) { +void G1SurvivorRegions::add(G1HeapRegion* hr) { assert(hr->is_survivor(), "should be flagged as survivor region"); _regions.append(hr); - return _regions_on_node.add(hr); + _regions_on_node.add(hr); } uint G1SurvivorRegions::length() const { diff --git a/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp b/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp index 0532ee12162..65c20dfbf45 100644 --- a/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp +++ b/src/hotspot/share/gc/g1/g1SurvivorRegions.hpp @@ -42,7 +42,7 @@ class G1SurvivorRegions { public: G1SurvivorRegions(); - uint add(G1HeapRegion* hr); + void add(G1HeapRegion* hr); void convert_to_eden();