< prev index next >

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

Print this page
rev 56821 : imported patch 8220310.mut.0
rev 56822 : imported patch 8220310.mut.1
rev 56823 : imported patch 8220310.mut.2
rev 56824 : imported patch 8220310.mut.3
rev 56825 : imported patch 8220310.mut.4
rev 56834 : imported patch 8220312.stat.2
rev 56836 : imported patch 8220312.stat.4
rev 56838 : [mq]: 8220312.stat.5

*** 24,33 **** --- 24,34 ---- #include "precompiled.hpp" #include "gc/g1/g1Arguments.hpp" #include "gc/g1/g1CollectedHeap.inline.hpp" #include "gc/g1/g1ConcurrentRefine.hpp" + #include "gc/g1/g1NUMAStats.hpp" #include "gc/g1/heapRegion.hpp" #include "gc/g1/heapRegionManager.inline.hpp" #include "gc/g1/heapRegionSet.inline.hpp" #include "gc/g1/heterogeneousHeapRegionManager.hpp" #include "logging/logStream.hpp"
*** 105,118 **** } HeapRegion* HeapRegionManager::allocate_free_region(HeapRegionType type, uint requested_node_index) { HeapRegion* hr = NULL; bool from_head = !type.is_young(); ! if (requested_node_index != G1NUMA::AnyNodeIndex && G1NUMA::numa()->is_enabled()) { // Try to allocate with requested node index. ! hr = _free_list.remove_region_with_node_index(from_head, requested_node_index, NULL); } if (hr == NULL) { // If there's a single active node or we did not get a region from our requested node, // try without requested node index. --- 106,120 ---- } HeapRegion* HeapRegionManager::allocate_free_region(HeapRegionType type, uint requested_node_index) { HeapRegion* hr = NULL; bool from_head = !type.is_young(); + G1NUMA* numa = G1NUMA::numa(); ! if (requested_node_index != G1NUMA::AnyNodeIndex && numa->is_enabled()) { // Try to allocate with requested node index. ! hr = _free_list.remove_region_with_node_index(from_head, requested_node_index); } if (hr == NULL) { // If there's a single active node or we did not get a region from our requested node, // try without requested node index.
*** 120,129 **** --- 122,135 ---- } if (hr != NULL) { assert(hr->next() == NULL, "Single region should not have next"); assert(is_available(hr->hrm_index()), "Must be committed"); + + if (numa->is_enabled() && hr->node_index() < numa->num_active_nodes()) { + numa->update_statistics(G1NUMAStats::NewRegionAlloc, requested_node_index, hr->node_index()); + } } return hr; }
< prev index next >