5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSOLDGEN_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSOLDGEN_HPP
27
28 #include "gc_implementation/parallelScavenge/objectStartArray.hpp"
29 #include "gc_implementation/parallelScavenge/psGenerationCounters.hpp"
30 #include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
31 #include "gc_implementation/shared/mutableSpace.hpp"
32 #include "gc_implementation/shared/spaceCounters.hpp"
33 #include "runtime/safepoint.hpp"
34
35 class PSMarkSweepDecorator;
36
37 class PSOldGen : public CHeapObj<mtGC> {
38 friend class VMStructs;
39 friend class PSPromotionManager; // Uses the cas_allocate methods
40 friend class ParallelScavengeHeap;
41 friend class AdjoiningGenerations;
42
43 protected:
44 MemRegion _reserved; // Used for simple containment tests
45 PSVirtualSpace* _virtual_space; // Controls mapping and unmapping of virtual mem
46 ObjectStartArray _start_array; // Keeps track of where objects start in a 512b block
47 MutableSpace* _object_space; // Where all the objects live
48 PSMarkSweepDecorator* _object_mark_sweep; // The mark sweep view of _object_space
49 const char* const _name; // Name of this generation.
50
51 // Performance Counters
52 PSGenerationCounters* _gen_counters;
200 // These should not used
201 virtual void reset_after_change();
202
203 // These should not used
204 virtual size_t available_for_expansion();
205 virtual size_t available_for_contraction();
206
207 void space_invariants() PRODUCT_RETURN;
208
209 // Performance Counter support
210 void update_counters();
211
212 // Printing support
213 virtual const char* name() const { return _name; }
214
215 // Debugging support
216 // Save the tops of all spaces for later use during mangling.
217 void record_spaces_top() PRODUCT_RETURN;
218 };
219
220 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSOLDGEN_HPP
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_PARALLEL_PSOLDGEN_HPP
26 #define SHARE_VM_GC_PARALLEL_PSOLDGEN_HPP
27
28 #include "gc/parallel/objectStartArray.hpp"
29 #include "gc/parallel/psGenerationCounters.hpp"
30 #include "gc/parallel/psVirtualspace.hpp"
31 #include "gc/shared/mutableSpace.hpp"
32 #include "gc/shared/spaceCounters.hpp"
33 #include "runtime/safepoint.hpp"
34
35 class PSMarkSweepDecorator;
36
37 class PSOldGen : public CHeapObj<mtGC> {
38 friend class VMStructs;
39 friend class PSPromotionManager; // Uses the cas_allocate methods
40 friend class ParallelScavengeHeap;
41 friend class AdjoiningGenerations;
42
43 protected:
44 MemRegion _reserved; // Used for simple containment tests
45 PSVirtualSpace* _virtual_space; // Controls mapping and unmapping of virtual mem
46 ObjectStartArray _start_array; // Keeps track of where objects start in a 512b block
47 MutableSpace* _object_space; // Where all the objects live
48 PSMarkSweepDecorator* _object_mark_sweep; // The mark sweep view of _object_space
49 const char* const _name; // Name of this generation.
50
51 // Performance Counters
52 PSGenerationCounters* _gen_counters;
200 // These should not used
201 virtual void reset_after_change();
202
203 // These should not used
204 virtual size_t available_for_expansion();
205 virtual size_t available_for_contraction();
206
207 void space_invariants() PRODUCT_RETURN;
208
209 // Performance Counter support
210 void update_counters();
211
212 // Printing support
213 virtual const char* name() const { return _name; }
214
215 // Debugging support
216 // Save the tops of all spaces for later use during mangling.
217 void record_spaces_top() PRODUCT_RETURN;
218 };
219
220 #endif // SHARE_VM_GC_PARALLEL_PSOLDGEN_HPP
|