< prev index next >
src/hotspot/share/gc/g1/g1Allocator.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
rev 56451 : imported patch 8220310.mut.3
rev 56452 : [mq]: 8220310.mut.4
*** 29,53 ****
#include "gc/g1/g1HeapRegionAttr.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/plab.hpp"
class G1EvacuationInfo;
// Interface to keep track of which regions G1 is currently allocating into. Provides
// some accessors (e.g. allocating into them, or getting their occupancy).
// Also keeps track of retained regions across GCs.
class G1Allocator : public CHeapObj<mtGC> {
friend class VMStructs;
private:
G1CollectedHeap* _g1h;
bool _survivor_is_full;
bool _old_is_full;
// Alloc region used to satisfy mutator allocation requests.
! MutatorAllocRegion _mutator_alloc_region;
// Alloc region used to satisfy allocation requests by the GC for
// survivor objects.
SurvivorGCAllocRegion _survivor_gc_alloc_region;
--- 29,58 ----
#include "gc/g1/g1HeapRegionAttr.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/plab.hpp"
class G1EvacuationInfo;
+ class G1NUMA;
// Interface to keep track of which regions G1 is currently allocating into. Provides
// some accessors (e.g. allocating into them, or getting their occupancy).
// Also keeps track of retained regions across GCs.
class G1Allocator : public CHeapObj<mtGC> {
friend class VMStructs;
private:
G1CollectedHeap* _g1h;
+ G1NUMA* _numa;
bool _survivor_is_full;
bool _old_is_full;
+ // The number of MutatorAllocRegions used, one per memory node.
+ size_t _num_alloc_regions;
+
// Alloc region used to satisfy mutator allocation requests.
! MutatorAllocRegion* _mutator_alloc_regions;
// Alloc region used to satisfy allocation requests by the GC for
// survivor objects.
SurvivorGCAllocRegion _survivor_gc_alloc_region;
*** 66,76 ****
void reuse_retained_old_region(G1EvacuationInfo& evacuation_info,
OldGCAllocRegion* old,
HeapRegion** retained);
// Accessors to the allocation regions.
! inline MutatorAllocRegion* mutator_alloc_region();
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,
--- 71,81 ----
void reuse_retained_old_region(G1EvacuationInfo& evacuation_info,
OldGCAllocRegion* old,
HeapRegion** retained);
// Accessors to the allocation regions.
! 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,
*** 79,98 ****
// 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);
public:
G1Allocator(G1CollectedHeap* heap);
#ifdef ASSERT
// Do we currently have an active mutator region to allocate into?
! bool has_mutator_alloc_region() { return mutator_alloc_region()->get() != NULL; }
#endif
! void init_mutator_alloc_region();
! void release_mutator_alloc_region();
void init_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
void release_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
void abandon_gc_alloc_regions();
bool is_retained_old_region(HeapRegion* hr);
--- 84,108 ----
// 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);
+
+ // Node index of current thread.
+ inline uint current_node_index() const;
+
public:
G1Allocator(G1CollectedHeap* heap);
+ ~G1Allocator();
#ifdef ASSERT
// Do we currently have an active mutator region to allocate into?
! bool has_mutator_alloc_region();
#endif
! void init_mutator_alloc_regions();
! void release_mutator_alloc_regions();
void init_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
void release_gc_alloc_regions(G1EvacuationInfo& evacuation_info);
void abandon_gc_alloc_regions();
bool is_retained_old_region(HeapRegion* hr);
< prev index next >