--- old/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2019-09-21 06:25:07.989962191 -0700 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2019-09-21 06:25:07.629962203 -0700 @@ -40,6 +40,7 @@ #include "gc/g1/g1HeapVerifier.hpp" #include "gc/g1/g1HRPrinter.hpp" #include "gc/g1/g1HeapRegionAttr.hpp" +#include "gc/g1/g1MemoryNodeManager.hpp" #include "gc/g1/g1MonitoringSupport.hpp" #include "gc/g1/g1RedirtyCardsQueue.hpp" #include "gc/g1/g1SurvivorRegions.hpp" @@ -192,6 +193,9 @@ // Callback for region mapping changed events. G1RegionMappingChangedListener _listener; + // Manages single or multi node memory. + G1MemoryNodeManager* _mem_node_mgr; + // The sequence of all heap regions in the heap. HeapRegionManager* _hrm; @@ -388,7 +392,10 @@ // attempt to expand the heap if necessary to satisfy the allocation // request. 'type' takes the type of region to be allocated. (Use constants // Old, Eden, Humongous, Survivor defined in HeapRegionType.) - HeapRegion* new_region(size_t word_size, HeapRegionType type, bool do_expand); + HeapRegion* new_region(size_t word_size, + HeapRegionType type, + bool do_expand, + uint node_index = G1MemoryNodeManager::AnyNodeIndex); // Initialize a contiguous set of free regions of length num_regions // and starting at index first so that they appear as a single @@ -463,7 +470,7 @@ // These methods are the "callbacks" from the G1AllocRegion class. // For mutator alloc regions. - HeapRegion* new_mutator_alloc_region(size_t word_size, bool force); + HeapRegion* new_mutator_alloc_region(size_t word_size, bool force, uint node_index); void retire_mutator_alloc_region(HeapRegion* alloc_region, size_t allocated_bytes); @@ -548,11 +555,13 @@ void resize_heap_if_necessary(); + G1MemoryNodeManager* mem_node_mgr() const { return _mem_node_mgr; } + // Expand the garbage-first heap by at least the given size (in bytes!). // Returns true if the heap was expanded by the requested amount; // false otherwise. // (Rounds up to a HeapRegion boundary.) - bool expand(size_t expand_bytes, WorkGang* pretouch_workers = NULL, double* expand_time_ms = NULL); + bool expand(size_t expand_bytes, uint node_index, WorkGang* pretouch_workers = NULL, double* expand_time_ms = NULL); // Returns the PLAB statistics for a given destination. inline G1EvacStats* alloc_buffer_stats(G1HeapRegionAttr dest); @@ -928,7 +937,6 @@ G1CMSubjectToDiscoveryClosure _is_subject_to_discovery_cm; public: - RefToScanQueue *task_queue(uint i) const; uint num_task_queues() const;