55 |
55 |
56 void PSOldGen::initialize(ReservedSpace rs, size_t alignment, |
56 void PSOldGen::initialize(ReservedSpace rs, size_t alignment, |
57 const char* perf_data_name, int level) { |
57 const char* perf_data_name, int level) { |
58 initialize_virtual_space(rs, alignment); |
58 initialize_virtual_space(rs, alignment); |
59 initialize_work(perf_data_name, level); |
59 initialize_work(perf_data_name, level); |
|
60 |
60 // The old gen can grow to gen_size_limit(). _reserve reflects only |
61 // The old gen can grow to gen_size_limit(). _reserve reflects only |
61 // the current maximum that can be committed. |
62 // the current maximum that can be committed. |
62 assert(_reserved.byte_size() <= gen_size_limit(), "Consistency check"); |
63 assert(_reserved.byte_size() <= gen_size_limit(), "Consistency check"); |
|
64 |
|
65 initialize_performance_counters(perf_data_name, level); |
63 } |
66 } |
64 |
67 |
65 void PSOldGen::initialize_virtual_space(ReservedSpace rs, size_t alignment) { |
68 void PSOldGen::initialize_virtual_space(ReservedSpace rs, size_t alignment) { |
66 |
69 |
67 _virtual_space = new PSVirtualSpace(rs, alignment); |
70 _virtual_space = new PSVirtualSpace(rs, alignment); |
138 if (_object_mark_sweep == NULL) |
141 if (_object_mark_sweep == NULL) |
139 vm_exit_during_initialization("Could not complete allocation of old generation"); |
142 vm_exit_during_initialization("Could not complete allocation of old generation"); |
140 |
143 |
141 // Update the start_array |
144 // Update the start_array |
142 start_array()->set_covered_region(cmr); |
145 start_array()->set_covered_region(cmr); |
143 |
146 } |
|
147 |
|
148 void PSOldGen::initialize_performance_counters(const char* perf_data_name, int level) { |
144 // Generation Counters, generation 'level', 1 subspace |
149 // Generation Counters, generation 'level', 1 subspace |
145 _gen_counters = new PSGenerationCounters(perf_data_name, level, 1, |
150 _gen_counters = new PSGenerationCounters(perf_data_name, level, 1, |
146 virtual_space()); |
151 virtual_space()); |
147 _space_counters = new SpaceCounters(perf_data_name, 0, |
152 _space_counters = new SpaceCounters(perf_data_name, 0, |
148 virtual_space()->reserved_size(), |
153 virtual_space()->reserved_size(), |