comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 20211:82693fb204a5

8038930: G1CodeRootSet::test fails with assert(_num_chunks_handed_out == 0) failed: No elements must have been handed out yet Summary: The test incorrectly assumed that it had been started with no other previous compilation activity. Fix this by allowing multiple code root free chunk lists, and use one separate from the global one to perform the test. Reviewed-by: brutisso
author tschatzl
date Wed, 16 Apr 2014 10:14:50 +0200
parents ae7336d6337e
children ff7b317d2af8
comparison
equal deleted inserted replaced
20210:3a62cd59c8d8 20211:82693fb204a5
353 } 353 }
354 354
355 // Returns the memory occupancy of all free_list data structures associated 355 // Returns the memory occupancy of all free_list data structures associated
356 // with remembered sets. 356 // with remembered sets.
357 static size_t fl_mem_size() { 357 static size_t fl_mem_size() {
358 return OtherRegionsTable::fl_mem_size() + G1CodeRootSet::fl_mem_size(); 358 return OtherRegionsTable::fl_mem_size() + G1CodeRootSet::free_chunks_mem_size();
359 } 359 }
360 360
361 bool contains_reference(OopOrNarrowOopStar from) const { 361 bool contains_reference(OopOrNarrowOopStar from) const {
362 return _other_regions.contains_reference(from); 362 return _other_regions.contains_reference(from);
363 } 363 }
398 static void cleanup(); 398 static void cleanup();
399 399
400 // Declare the heap size (in # of regions) to the HeapRegionRemSet(s). 400 // Declare the heap size (in # of regions) to the HeapRegionRemSet(s).
401 // (Uses it to initialize from_card_cache). 401 // (Uses it to initialize from_card_cache).
402 static void init_heap(uint max_regions) { 402 static void init_heap(uint max_regions) {
403 G1CodeRootSet::initialize();
404 OtherRegionsTable::init_from_card_cache(max_regions); 403 OtherRegionsTable::init_from_card_cache(max_regions);
405 } 404 }
406 405
407 // Declares that only regions i s.t. 0 <= i < new_n_regs are in use. 406 // Declares that only regions i s.t. 0 <= i < new_n_regs are in use.
408 static void shrink_heap(uint new_n_regs) { 407 static void shrink_heap(uint new_n_regs) {