comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 20337:1f1d373cd044

8038423: G1: Decommit memory within heap Summary: Allow G1 to decommit memory of arbitrary regions within the heap and their associated auxiliary data structures card table, BOT, hot card cache, and mark bitmaps. Reviewed-by: mgerdin, brutisso, jwilhelm
author tschatzl
date Thu, 21 Aug 2014 11:47:10 +0200
parents a3953c777565
children 7baf47cb97cb
comparison
equal deleted inserted replaced
20336:6701abbc4441 20337:1f1d373cd044
82 _cache[worker_id][region_idx] = val; 82 _cache[worker_id][region_idx] = val;
83 } 83 }
84 84
85 static void initialize(uint n_par_rs, uint max_num_regions); 85 static void initialize(uint n_par_rs, uint max_num_regions);
86 86
87 static void shrink(uint new_num_regions); 87 static void invalidate(uint start_idx, size_t num_regions);
88 88
89 static void print(outputStream* out = gclog_or_tty) PRODUCT_RETURN; 89 static void print(outputStream* out = gclog_or_tty) PRODUCT_RETURN;
90 90
91 static size_t static_mem_size() { 91 static size_t static_mem_size() {
92 return _static_mem_size; 92 return _static_mem_size;
211 211
212 void do_cleanup_work(HRRSCleanupTask* hrrs_cleanup_task); 212 void do_cleanup_work(HRRSCleanupTask* hrrs_cleanup_task);
213 213
214 // Declare the heap size (in # of regions) to the OtherRegionsTable. 214 // Declare the heap size (in # of regions) to the OtherRegionsTable.
215 // (Uses it to initialize from_card_cache). 215 // (Uses it to initialize from_card_cache).
216 static void init_from_card_cache(uint max_regions); 216 static void initialize(uint max_regions);
217 217
218 // Declares that only regions i s.t. 0 <= i < new_n_regs are in use. 218 // Declares that regions between start_idx <= i < start_idx + num_regions are
219 // Make sure any entries for higher regions are invalid. 219 // not in use. Make sure that any entries for these regions are invalid.
220 static void shrink_from_card_cache(uint new_num_regions); 220 static void invalidate(uint start_idx, size_t num_regions);
221 221
222 static void print_from_card_cache(); 222 static void print_from_card_cache();
223 }; 223 };
224 224
225 class HeapRegionRemSet : public CHeapObj<mtGC> { 225 class HeapRegionRemSet : public CHeapObj<mtGC> {
402 static void cleanup(); 402 static void cleanup();
403 403
404 // Declare the heap size (in # of regions) to the HeapRegionRemSet(s). 404 // Declare the heap size (in # of regions) to the HeapRegionRemSet(s).
405 // (Uses it to initialize from_card_cache). 405 // (Uses it to initialize from_card_cache).
406 static void init_heap(uint max_regions) { 406 static void init_heap(uint max_regions) {
407 OtherRegionsTable::init_from_card_cache(max_regions); 407 OtherRegionsTable::initialize(max_regions);
408 } 408 }
409 409
410 // Declares that only regions i s.t. 0 <= i < new_n_regs are in use. 410 static void invalidate(uint start_idx, uint num_regions) {
411 static void shrink_heap(uint new_n_regs) { 411 OtherRegionsTable::invalidate(start_idx, num_regions);
412 OtherRegionsTable::shrink_from_card_cache(new_n_regs);
413 } 412 }
414 413
415 #ifndef PRODUCT 414 #ifndef PRODUCT
416 static void print_from_card_cache() { 415 static void print_from_card_cache() {
417 OtherRegionsTable::print_from_card_cache(); 416 OtherRegionsTable::print_from_card_cache();