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/g1/g1Arguments.hpp"
27 #include "gc/g1/g1HeterogeneousHeapYoungGenSizer.hpp"
28 #include "gc/g1/g1YoungGenSizer.hpp"
29 #include "gc/g1/heapRegion.hpp"
30 #include "logging/log.hpp"
31
32 G1YoungGenSizer::G1YoungGenSizer() : _sizer_kind(SizerDefaults),
33 _use_adaptive_sizing(true), _min_desired_young_length(0), _max_desired_young_length(0) {
34
35 if (FLAG_IS_CMDLINE(NewRatio)) {
36 if (FLAG_IS_CMDLINE(NewSize) || FLAG_IS_CMDLINE(MaxNewSize)) {
37 log_warning(gc, ergo)("-XX:NewSize and -XX:MaxNewSize override -XX:NewRatio");
38 } else {
39 _sizer_kind = SizerNewRatio;
40 _use_adaptive_sizing = false;
41 return;
42 }
43 }
44
45 if (NewSize > MaxNewSize) {
46 if (FLAG_IS_CMDLINE(MaxNewSize)) {
47 log_warning(gc, ergo)("NewSize (" SIZE_FORMAT "k) is greater than the MaxNewSize (" SIZE_FORMAT "k). "
48 "A new max generation size of " SIZE_FORMAT "k will be used.",
49 NewSize/K, MaxNewSize/K, NewSize/K);
50 }
|
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/g1/g1Arguments.hpp"
27 #include "gc/g1/g1HeterogeneousHeapYoungGenSizer.hpp"
28 #include "gc/g1/g1YoungGenSizer.hpp"
29 #include "gc/g1/heapRegion.hpp"
30 #include "logging/log.hpp"
31 #include "runtime/globals_extension.hpp"
32
33 G1YoungGenSizer::G1YoungGenSizer() : _sizer_kind(SizerDefaults),
34 _use_adaptive_sizing(true), _min_desired_young_length(0), _max_desired_young_length(0) {
35
36 if (FLAG_IS_CMDLINE(NewRatio)) {
37 if (FLAG_IS_CMDLINE(NewSize) || FLAG_IS_CMDLINE(MaxNewSize)) {
38 log_warning(gc, ergo)("-XX:NewSize and -XX:MaxNewSize override -XX:NewRatio");
39 } else {
40 _sizer_kind = SizerNewRatio;
41 _use_adaptive_sizing = false;
42 return;
43 }
44 }
45
46 if (NewSize > MaxNewSize) {
47 if (FLAG_IS_CMDLINE(MaxNewSize)) {
48 log_warning(gc, ergo)("NewSize (" SIZE_FORMAT "k) is greater than the MaxNewSize (" SIZE_FORMAT "k). "
49 "A new max generation size of " SIZE_FORMAT "k will be used.",
50 NewSize/K, MaxNewSize/K, NewSize/K);
51 }
|