1 /*
2 * Copyright (c) 1997, 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 *
3013 #endif // PRODUCT
3014
3015 if (EnableInvokeDynamic && !EnableMethodHandles) {
3016 if (!FLAG_IS_DEFAULT(EnableMethodHandles)) {
3017 warning("forcing EnableMethodHandles true because EnableInvokeDynamic is true");
3018 }
3019 EnableMethodHandles = true;
3020 }
3021 if (EnableMethodHandles && !AnonymousClasses) {
3022 if (!FLAG_IS_DEFAULT(AnonymousClasses)) {
3023 warning("forcing AnonymousClasses true because EnableMethodHandles is true");
3024 }
3025 AnonymousClasses = true;
3026 }
3027 if ((EnableMethodHandles || AnonymousClasses) && ScavengeRootsInCode == 0) {
3028 if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
3029 warning("forcing ScavengeRootsInCode non-zero because EnableMethodHandles or AnonymousClasses is true");
3030 }
3031 ScavengeRootsInCode = 1;
3032 }
3033 #ifdef COMPILER2
3034 if (EnableInvokeDynamic && DoEscapeAnalysis) {
3035 // TODO: We need to find rules for invokedynamic and EA. For now,
3036 // simply disable EA by default.
3037 if (FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
3038 DoEscapeAnalysis = false;
3039 }
3040 }
3041 #endif
3042
3043 if (PrintGCDetails) {
3044 // Turn on -verbose:gc options as well
3045 PrintGC = true;
3046 }
3047
3048 // Set object alignment values.
3049 set_object_alignment();
3050
3051 #ifdef SERIALGC
3052 force_serial_gc();
3053 #endif // SERIALGC
3054 #ifdef KERNEL
3055 no_shared_spaces();
3056 #endif // KERNEL
3057
3058 // Set flags based on ergonomics.
3059 set_ergonomics_flags();
3060
3061 if (UseCompressedOops) {
|
1 /*
2 * Copyright (c) 1997, 2011, 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 *
3013 #endif // PRODUCT
3014
3015 if (EnableInvokeDynamic && !EnableMethodHandles) {
3016 if (!FLAG_IS_DEFAULT(EnableMethodHandles)) {
3017 warning("forcing EnableMethodHandles true because EnableInvokeDynamic is true");
3018 }
3019 EnableMethodHandles = true;
3020 }
3021 if (EnableMethodHandles && !AnonymousClasses) {
3022 if (!FLAG_IS_DEFAULT(AnonymousClasses)) {
3023 warning("forcing AnonymousClasses true because EnableMethodHandles is true");
3024 }
3025 AnonymousClasses = true;
3026 }
3027 if ((EnableMethodHandles || AnonymousClasses) && ScavengeRootsInCode == 0) {
3028 if (!FLAG_IS_DEFAULT(ScavengeRootsInCode)) {
3029 warning("forcing ScavengeRootsInCode non-zero because EnableMethodHandles or AnonymousClasses is true");
3030 }
3031 ScavengeRootsInCode = 1;
3032 }
3033
3034 if (PrintGCDetails) {
3035 // Turn on -verbose:gc options as well
3036 PrintGC = true;
3037 }
3038
3039 // Set object alignment values.
3040 set_object_alignment();
3041
3042 #ifdef SERIALGC
3043 force_serial_gc();
3044 #endif // SERIALGC
3045 #ifdef KERNEL
3046 no_shared_spaces();
3047 #endif // KERNEL
3048
3049 // Set flags based on ergonomics.
3050 set_ergonomics_flags();
3051
3052 if (UseCompressedOops) {
|