< prev index next >
src/hotspot/share/gc/g1/heapRegionManager.hpp
Print this page
rev 56448 : imported patch 8220310.mut.0
rev 56449 : imported patch 8220310.mut.1
rev 56450 : imported patch 8220310.mut.2
@@ -106,10 +106,13 @@
// Finds the next sequence of empty regions starting from start_idx, going backwards in
// the heap. Returns the length of the sequence found. If this value is zero, no
// sequence could be found, otherwise res_idx contains the start index of this range.
uint find_empty_from_idx_reverse(uint start_idx, uint* res_idx) const;
+ // Checks the G1MemoryNodeManager to see if this region is on the preferred node.
+ bool is_on_preferred_index(uint region_index, uint preferred_node_index);
+
protected:
G1HeapRegionTable _regions;
G1RegionToSpaceMapper* _heap_mapper;
G1RegionToSpaceMapper* _prev_bitmap_mapper;
G1RegionToSpaceMapper* _next_bitmap_mapper;
@@ -172,19 +175,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() {
@@ -225,10 +221,13 @@
// 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);
+ // Try to expand on the given node index.
+ virtual uint expand_on_preferred_node(uint node_index);
+
// 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
// start index of that set, or G1_NO_HRM_INDEX.
< prev index next >