< prev index next >
src/hotspot/share/gc/g1/heapRegionManager.hpp
Print this page
rev 56323 : imported patch 8220310.mut.0
rev 56324 : imported patch 8220310.mut.1_thomas
rev 56326 : [mq]: 8220310.mut.1-3_kim
@@ -87,11 +87,14 @@
HeapWord* heap_bottom() const { return _regions.bottom_address_mapped(); }
HeapWord* heap_end() const {return _regions.end_address_mapped(); }
// Pass down commit calls to the VirtualSpace.
- void commit_regions(uint index, size_t num_regions = 1, WorkGang* pretouch_gang = NULL);
+ void commit_regions(uint index,
+ size_t num_regions = 1,
+ uint node_index = G1MemoryNodeManager::AnyNodeIndex,
+ WorkGang* pretouch_gang = NULL);
// Notify other data structures about change in the heap layout.
void update_committed_space(HeapWord* old_end, HeapWord* new_end);
// Find a contiguous set of empty or uncommitted regions of length num and return
@@ -113,11 +116,14 @@
G1RegionToSpaceMapper* _heap_mapper;
G1RegionToSpaceMapper* _prev_bitmap_mapper;
G1RegionToSpaceMapper* _next_bitmap_mapper;
FreeRegionList _free_list;
- void make_regions_available(uint index, uint num_regions = 1, WorkGang* pretouch_gang = NULL);
+ void make_regions_available(uint index,
+ uint num_regions = 1,
+ uint node_index = G1MemoryNodeManager::AnyNodeIndex,
+ WorkGang* pretouch_gang = NULL);
void uncommit_regions(uint index, size_t num_regions = 1);
// Allocate a new HeapRegion for the given index.
HeapRegion* new_heap_region(uint hrm_index);
#ifdef ASSERT
public:
@@ -172,19 +178,12 @@
// Insert the given region list into the global free region list.
void insert_list_into_free_list(FreeRegionList* list) {
_free_list.add_ordered(list);
}
- virtual HeapRegion* allocate_free_region(HeapRegionType type) {
- HeapRegion* hr = _free_list.remove_region(!type.is_young());
-
- if (hr != NULL) {
- assert(hr->next() == NULL, "Single region should not have next");
- assert(is_available(hr->hrm_index()), "Must be committed");
- }
- return hr;
- }
+ // Allocate a free region with specific node index. If fails allocate with next node index.
+ virtual HeapRegion* allocate_free_region(HeapRegionType type, uint requested_node_index);
inline void allocate_free_regions_starting_at(uint first, uint num_regions);
// Remove all regions from the free list.
void remove_all_free_regions() {
@@ -218,16 +217,16 @@
// Expand the sequence to reflect that the heap has grown. Either create new
// HeapRegions, or re-use existing ones. Returns the number of regions the
// sequence was expanded by. If a HeapRegion allocation fails, the resulting
// number of regions might be smaller than what's desired.
- virtual uint expand_by(uint num_regions, WorkGang* pretouch_workers);
+ virtual uint expand_by(uint num_regions, uint node_index, WorkGang* pretouch_workers);
// Makes sure that the regions from start to start+num_regions-1 are available
// for allocation. Returns the number of regions that were committed to achieve
// this.
- virtual uint expand_at(uint start, uint num_regions, WorkGang* pretouch_workers);
+ virtual uint expand_at(uint start, uint num_regions, uint node_index, WorkGang* pretouch_workers);
// Find a contiguous set of empty regions of length num. Returns the start index of
// that set, or G1_NO_HRM_INDEX.
virtual uint find_contiguous_only_empty(size_t num) { return find_contiguous(num, true); }
// Find a contiguous set of empty or unavailable regions of length num. Returns the
< prev index next >