--- old/src/hotspot/share/gc/g1/g1Allocator.hpp 2019-09-21 06:25:03.801962337 -0700 +++ new/src/hotspot/share/gc/g1/g1Allocator.hpp 2019-09-21 06:25:03.433962349 -0700 @@ -27,6 +27,7 @@ #include "gc/g1/g1AllocRegion.hpp" #include "gc/g1/g1HeapRegionAttr.hpp" +#include "gc/g1/g1NUMA.hpp" #include "gc/shared/collectedHeap.hpp" #include "gc/shared/plab.hpp" @@ -44,8 +45,11 @@ bool _survivor_is_full; bool _old_is_full; + // The number of MutatorAllocRegions used, one per memory node. + size_t _num_alloc_region; + // Alloc region used to satisfy mutator allocation requests. - MutatorAllocRegion _mutator_alloc_region; + MutatorAllocRegion* _mutator_alloc_region; // Alloc region used to satisfy allocation requests by the GC for // survivor objects. @@ -68,25 +72,26 @@ HeapRegion** retained); // Accessors to the allocation regions. - inline MutatorAllocRegion* mutator_alloc_region(); + inline MutatorAllocRegion* mutator_alloc_region(uint node_index); inline SurvivorGCAllocRegion* survivor_gc_alloc_region(); inline OldGCAllocRegion* old_gc_alloc_region(); // Allocation attempt during GC for a survivor object / PLAB. HeapWord* survivor_attempt_allocation(size_t min_word_size, - size_t desired_word_size, - size_t* actual_word_size); + size_t desired_word_size, + size_t* actual_word_size); // Allocation attempt during GC for an old object / PLAB. HeapWord* old_attempt_allocation(size_t min_word_size, - size_t desired_word_size, - size_t* actual_word_size); + size_t desired_word_size, + size_t* actual_word_size); public: G1Allocator(G1CollectedHeap* heap); + ~G1Allocator(); #ifdef ASSERT // Do we currently have an active mutator region to allocate into? - bool has_mutator_alloc_region() { return mutator_alloc_region()->get() != NULL; } + bool has_mutator_alloc_region(); #endif void init_mutator_alloc_region();