comparison src/share/vm/gc_implementation/shared/mutableNUMASpace.hpp @ 535:4e400c36026f

6783381: NUMA allocator: don't pretouch eden space with UseNUMA Summary: Moved pretouching to MutableSpace. Also MutableSpace now turns on page interleaving for the region it covers. Reviewed-by: jmasa, jcoomes
author iveresov
date Tue, 27 Jan 2009 18:13:59 -0800
parents 06df86c2ec37
children 0fbdb4381b99
comparison
equal deleted inserted replaced
534:5cfd8d19e546 535:4e400c36026f
80 80
81 char* _last_page_scanned; 81 char* _last_page_scanned;
82 char* last_page_scanned() { return _last_page_scanned; } 82 char* last_page_scanned() { return _last_page_scanned; }
83 void set_last_page_scanned(char* p) { _last_page_scanned = p; } 83 void set_last_page_scanned(char* p) { _last_page_scanned = p; }
84 public: 84 public:
85 LGRPSpace(int l) : _lgrp_id(l), _last_page_scanned(NULL), _allocation_failed(false) { 85 LGRPSpace(int l, size_t alignment) : _lgrp_id(l), _last_page_scanned(NULL), _allocation_failed(false) {
86 _space = new MutableSpace(); 86 _space = new MutableSpace(alignment);
87 _alloc_rate = new AdaptiveWeightedAverage(NUMAChunkResizeWeight); 87 _alloc_rate = new AdaptiveWeightedAverage(NUMAChunkResizeWeight);
88 } 88 }
89 ~LGRPSpace() { 89 ~LGRPSpace() {
90 delete _space; 90 delete _space;
91 delete _alloc_rate; 91 delete _alloc_rate;
181 void merge_regions(MemRegion new_region, MemRegion* intersection, 181 void merge_regions(MemRegion new_region, MemRegion* intersection,
182 MemRegion *invalid_region); 182 MemRegion *invalid_region);
183 183
184 public: 184 public:
185 GrowableArray<LGRPSpace*>* lgrp_spaces() const { return _lgrp_spaces; } 185 GrowableArray<LGRPSpace*>* lgrp_spaces() const { return _lgrp_spaces; }
186 MutableNUMASpace(); 186 MutableNUMASpace(size_t alignment);
187 virtual ~MutableNUMASpace(); 187 virtual ~MutableNUMASpace();
188 // Space initialization. 188 // Space initialization.
189 virtual void initialize(MemRegion mr, bool clear_space, bool mangle_space); 189 virtual void initialize(MemRegion mr, bool clear_space, bool mangle_space, bool setup_pages = SetupPages);
190 // Update space layout if necessary. Do all adaptive resizing job. 190 // Update space layout if necessary. Do all adaptive resizing job.
191 virtual void update(); 191 virtual void update();
192 // Update allocation rate averages. 192 // Update allocation rate averages.
193 virtual void accumulate_statistics(); 193 virtual void accumulate_statistics();
194 194