1 /*
2 * Copyright (c) 2001, 2008, 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 class PSMarkSweepDecorator;
26
27 class PSYoungGen : public CHeapObj {
28 friend class VMStructs;
29 friend class ParallelScavengeHeap;
30 friend class AdjoiningGenerations;
31
32 protected:
33 MemRegion _reserved;
34 PSVirtualSpace* _virtual_space;
35
36 // Spaces
37 MutableSpace* _eden_space;
38 MutableSpace* _from_space;
39 MutableSpace* _to_space;
40
41
42 // MarkSweep Decorators
43 PSMarkSweepDecorator* _eden_mark_sweep;
44 PSMarkSweepDecorator* _from_mark_sweep;
171
172 // Debugging - do not use for time critical operations
173 void print() const;
174 void print_on(outputStream* st) const;
175 void print_used_change(size_t prev_used) const;
176 virtual const char* name() const { return "PSYoungGen"; }
177
178 void verify(bool allow_dirty);
179
180 // Space boundary invariant checker
181 void space_invariants() PRODUCT_RETURN;
182
183 // Helper for mangling survivor spaces.
184 void mangle_survivors(MutableSpace* s1,
185 MemRegion s1MR,
186 MutableSpace* s2,
187 MemRegion s2MR) PRODUCT_RETURN;
188
189 void record_spaces_top() PRODUCT_RETURN;
190 };
|
1 /*
2 * Copyright (c) 2001, 2010, 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 {
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;
53 PSMarkSweepDecorator* _from_mark_sweep;
180
181 // Debugging - do not use for time critical operations
182 void print() const;
183 void print_on(outputStream* st) const;
184 void print_used_change(size_t prev_used) const;
185 virtual const char* name() const { return "PSYoungGen"; }
186
187 void verify(bool allow_dirty);
188
189 // Space boundary invariant checker
190 void space_invariants() PRODUCT_RETURN;
191
192 // Helper for mangling survivor spaces.
193 void mangle_survivors(MutableSpace* s1,
194 MemRegion s1MR,
195 MutableSpace* s2,
196 MemRegion s2MR) PRODUCT_RETURN;
197
198 void record_spaces_top() PRODUCT_RETURN;
199 };
200
201 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PSYOUNGGEN_HPP
|