1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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_PSYOUNGGEN_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSYOUNGGEN_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
34 class PSMarkSweepDecorator;
35
36 class PSYoungGen : public CHeapObj<mtGC> {
37 friend class VMStructs;
38 friend class ParallelScavengeHeap;
39 friend class AdjoiningGenerations;
40
41 protected:
42 MemRegion _reserved;
43 PSVirtualSpace* _virtual_space;
44
45 // Spaces
46 MutableSpace* _eden_space;
47 MutableSpace* _from_space;
48 MutableSpace* _to_space;
49
50
51 // MarkSweep Decorators
52 PSMarkSweepDecorator* _eden_mark_sweep;
178 // Debugging - do not use for time critical operations
179 void print() const;
180 void print_on(outputStream* st) const;
181 void print_used_change(size_t prev_used) const;
182 virtual const char* name() const { return "PSYoungGen"; }
183
184 void verify();
185
186 // Space boundary invariant checker
187 void space_invariants() PRODUCT_RETURN;
188
189 // Helper for mangling survivor spaces.
190 void mangle_survivors(MutableSpace* s1,
191 MemRegion s1MR,
192 MutableSpace* s2,
193 MemRegion s2MR) PRODUCT_RETURN;
194
195 void record_spaces_top() PRODUCT_RETURN;
196 };
197
198 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSYOUNGGEN_HPP
|
1 /*
2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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_PSYOUNGGEN_HPP
26 #define SHARE_VM_GC_PARALLEL_PSYOUNGGEN_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
34 class PSMarkSweepDecorator;
35
36 class PSYoungGen : public CHeapObj<mtGC> {
37 friend class VMStructs;
38 friend class ParallelScavengeHeap;
39 friend class AdjoiningGenerations;
40
41 protected:
42 MemRegion _reserved;
43 PSVirtualSpace* _virtual_space;
44
45 // Spaces
46 MutableSpace* _eden_space;
47 MutableSpace* _from_space;
48 MutableSpace* _to_space;
49
50
51 // MarkSweep Decorators
52 PSMarkSweepDecorator* _eden_mark_sweep;
178 // Debugging - do not use for time critical operations
179 void print() const;
180 void print_on(outputStream* st) const;
181 void print_used_change(size_t prev_used) const;
182 virtual const char* name() const { return "PSYoungGen"; }
183
184 void verify();
185
186 // Space boundary invariant checker
187 void space_invariants() PRODUCT_RETURN;
188
189 // Helper for mangling survivor spaces.
190 void mangle_survivors(MutableSpace* s1,
191 MemRegion s1MR,
192 MutableSpace* s2,
193 MemRegion s2MR) PRODUCT_RETURN;
194
195 void record_spaces_top() PRODUCT_RETURN;
196 };
197
198 #endif // SHARE_VM_GC_PARALLEL_PSYOUNGGEN_HPP
|