< prev index next >

src/hotspot/share/gc/parallel/psOldGen.cpp

Print this page
rev 58025 : imported patch 8238854-remove-superfluous-alloc-checks


 118   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
 119   PSCardTable* ct = heap->card_table();
 120   ct->resize_covered_region(cmr);
 121 
 122   // Verify that the start and end of this generation is the start of a card.
 123   // If this wasn't true, a single card could span more than one generation,
 124   // which would cause problems when we commit/uncommit memory, and when we
 125   // clear and dirty cards.
 126   guarantee(ct->is_card_aligned(_reserved.start()), "generation must be card aligned");
 127   if (_reserved.end() != heap->reserved_region().end()) {
 128     // Don't check at the very end of the heap as we'll assert that we're probing off
 129     // the end if we try.
 130     guarantee(ct->is_card_aligned(_reserved.end()), "generation must be card aligned");
 131   }
 132 
 133   //
 134   // ObjectSpace stuff
 135   //
 136 
 137   _object_space = new MutableSpace(virtual_space()->alignment());
 138 
 139   if (_object_space == NULL)
 140     vm_exit_during_initialization("Could not allocate an old gen space");
 141 
 142   object_space()->initialize(cmr,
 143                              SpaceDecorator::Clear,
 144                              SpaceDecorator::Mangle);
 145 
 146   // Update the start_array
 147   start_array()->set_covered_region(cmr);
 148 }
 149 
 150 void PSOldGen::initialize_performance_counters(const char* perf_data_name, int level) {
 151   // Generation Counters, generation 'level', 1 subspace
 152   _gen_counters = new PSGenerationCounters(perf_data_name, level, 1, _min_gen_size,
 153                                            _max_gen_size, virtual_space());
 154   _space_counters = new SpaceCounters(perf_data_name, 0,
 155                                       virtual_space()->reserved_size(),
 156                                       _object_space, _gen_counters);
 157 }
 158 
 159 // Assume that the generation has been allocated if its
 160 // reserved size is not 0.
 161 bool  PSOldGen::is_allocated() {




 118   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
 119   PSCardTable* ct = heap->card_table();
 120   ct->resize_covered_region(cmr);
 121 
 122   // Verify that the start and end of this generation is the start of a card.
 123   // If this wasn't true, a single card could span more than one generation,
 124   // which would cause problems when we commit/uncommit memory, and when we
 125   // clear and dirty cards.
 126   guarantee(ct->is_card_aligned(_reserved.start()), "generation must be card aligned");
 127   if (_reserved.end() != heap->reserved_region().end()) {
 128     // Don't check at the very end of the heap as we'll assert that we're probing off
 129     // the end if we try.
 130     guarantee(ct->is_card_aligned(_reserved.end()), "generation must be card aligned");
 131   }
 132 
 133   //
 134   // ObjectSpace stuff
 135   //
 136 
 137   _object_space = new MutableSpace(virtual_space()->alignment());




 138   object_space()->initialize(cmr,
 139                              SpaceDecorator::Clear,
 140                              SpaceDecorator::Mangle);
 141 
 142   // Update the start_array
 143   start_array()->set_covered_region(cmr);
 144 }
 145 
 146 void PSOldGen::initialize_performance_counters(const char* perf_data_name, int level) {
 147   // Generation Counters, generation 'level', 1 subspace
 148   _gen_counters = new PSGenerationCounters(perf_data_name, level, 1, _min_gen_size,
 149                                            _max_gen_size, virtual_space());
 150   _space_counters = new SpaceCounters(perf_data_name, 0,
 151                                       virtual_space()->reserved_size(),
 152                                       _object_space, _gen_counters);
 153 }
 154 
 155 // Assume that the generation has been allocated if its
 156 // reserved size is not 0.
 157 bool  PSOldGen::is_allocated() {


< prev index next >