1 /*
2 * Copyright (c) 2003, 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 #include "precompiled.hpp"
26 #include "gc/parallel/asPSOldGen.hpp"
27 #include "gc/parallel/parallelScavengeHeap.hpp"
28 #include "gc/parallel/psAdaptiveSizePolicy.hpp"
29 #include "gc/parallel/psMarkSweepDecorator.hpp"
30 #include "gc/shared/cardTableBarrierSet.hpp"
31 #include "gc/shared/genArguments.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "runtime/java.hpp"
34 #include "utilities/align.hpp"
35
36 // Whereas PSOldGen takes the maximum size of the generation
37 // (which doesn't change in the case of PSOldGen) as a parameter,
38 // ASPSOldGen takes the upper limit on the size of
39 // the generation as a parameter. In ASPSOldGen the
40 // maximum size of the generation can change as the boundary
41 // moves. The "maximum size of the generation" is still a valid
42 // concept since the generation can grow and shrink within that
43 // maximum. There are lots of useful checks that use that
44 // maximum. In PSOldGen the method max_gen_size() returns
45 // _max_gen_size (as set by the PSOldGen constructor). This
46 // is how it always worked. In ASPSOldGen max_gen_size()
47 // returned the size of the reserved space for the generation.
48 // That can change as the boundary moves. Below the limit of
49 // the size of the generation is passed to the PSOldGen constructor
|
1 /*
2 * Copyright (c) 2003, 2020, 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 #include "precompiled.hpp"
26 #include "gc/parallel/asPSOldGen.hpp"
27 #include "gc/parallel/parallelScavengeHeap.hpp"
28 #include "gc/parallel/psAdaptiveSizePolicy.hpp"
29 #include "gc/shared/cardTableBarrierSet.hpp"
30 #include "gc/shared/genArguments.hpp"
31 #include "oops/oop.inline.hpp"
32 #include "runtime/java.hpp"
33 #include "utilities/align.hpp"
34
35 // Whereas PSOldGen takes the maximum size of the generation
36 // (which doesn't change in the case of PSOldGen) as a parameter,
37 // ASPSOldGen takes the upper limit on the size of
38 // the generation as a parameter. In ASPSOldGen the
39 // maximum size of the generation can change as the boundary
40 // moves. The "maximum size of the generation" is still a valid
41 // concept since the generation can grow and shrink within that
42 // maximum. There are lots of useful checks that use that
43 // maximum. In PSOldGen the method max_gen_size() returns
44 // _max_gen_size (as set by the PSOldGen constructor). This
45 // is how it always worked. In ASPSOldGen max_gen_size()
46 // returned the size of the reserved space for the generation.
47 // That can change as the boundary moves. Below the limit of
48 // the size of the generation is passed to the PSOldGen constructor
|