author | dfuchs |
Fri, 04 May 2018 17:28:03 +0100 | |
branch | http-client-branch |
changeset 56532 | a594484f54db |
parent 56497 | 598e0c5b6f8c |
child 56625 | 380796df44a9 |
permissions | -rw-r--r-- |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
1 |
/* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
4 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
8 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
13 |
* accompanied this code). |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
14 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
18 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
21 |
* questions. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
22 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
23 |
*/ |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
24 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
26 |
#include "code/relocInfo.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
27 |
#include "compiler/compilerDefinitions.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
28 |
#include "oops/metadata.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
29 |
#include "runtime/os.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
30 |
#include "interpreter/invocationCounter.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
31 |
#include "runtime/arguments.hpp" |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
32 |
#include "runtime/flags/jvmFlag.hpp" |
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
33 |
#include "runtime/flags/jvmFlagConstraintsCompiler.hpp" |
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
34 |
#include "runtime/flags/jvmFlagRangeList.hpp" |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
35 |
#include "runtime/globals.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
36 |
#include "runtime/globals_extension.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
37 |
#include "utilities/defaultStream.hpp" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
38 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
39 |
JVMFlag::Error AliasLevelConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
40 |
if ((value <= 1) && (Arguments::mode() == Arguments::_comp || Arguments::mode() == Arguments::_mixed)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
41 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
42 |
"AliasLevel (" INTX_FORMAT ") is not " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
43 |
"compatible with -Xcomp or -Xmixed\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
44 |
value); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
45 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
46 |
} else { |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
47 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
48 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
49 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
50 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
51 |
/** |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
52 |
* Validate the minimum number of compiler threads needed to run the |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
53 |
* JVM. The following configurations are possible. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
54 |
* |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
55 |
* 1) The JVM is build using an interpreter only. As a result, the minimum number of |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
56 |
* compiler threads is 0. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
57 |
* 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
58 |
* a result, either C1 or C2 is used, so the minimum number of compiler threads is 1. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
59 |
* 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
60 |
* the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
61 |
* C1 can be used, so the minimum number of compiler threads is 1. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
62 |
* 4) The JVM is build using the compilers and tiered compilation is enabled. The option |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
63 |
* 'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
64 |
* the minimum number of compiler threads is 2. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
65 |
*/ |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
66 |
JVMFlag::Error CICompilerCountConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
67 |
int min_number_of_compiler_threads = 0; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
68 |
#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
69 |
// case 1 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
70 |
#else |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
71 |
if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
72 |
min_number_of_compiler_threads = 1; // case 2 or case 3 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
73 |
} else { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
74 |
min_number_of_compiler_threads = 2; // case 4 (tiered) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
75 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
76 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
77 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
78 |
// The default CICompilerCount's value is CI_COMPILER_COUNT. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
79 |
// With a client VM, -XX:+TieredCompilation causes TieredCompilation |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
80 |
// to be true here (the option is validated later) and |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
81 |
// min_number_of_compiler_threads to exceed CI_COMPILER_COUNT. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
82 |
min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
83 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
84 |
if (value < (intx)min_number_of_compiler_threads) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
85 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
86 |
"CICompilerCount (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
87 |
"at least %d \n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
88 |
value, min_number_of_compiler_threads); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
89 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
90 |
} else { |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
91 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
92 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
93 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
94 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
95 |
JVMFlag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
96 |
if (value < 0 || value > 512) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
97 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
98 |
"AllocatePrefetchDistance (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
99 |
"between 0 and " INTX_FORMAT "\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
100 |
AllocatePrefetchDistance, 512); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
101 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
102 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
103 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
104 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
105 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
106 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
107 |
JVMFlag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
108 |
if (AllocatePrefetchStyle == 3) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
109 |
if (value % wordSize != 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
110 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
111 |
"AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
112 |
value, wordSize); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
113 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
114 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
115 |
} |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
116 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
117 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
118 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
119 |
JVMFlag::Error AllocatePrefetchInstrConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
120 |
intx max_value = max_intx; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
121 |
#if defined(SPARC) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
122 |
max_value = 1; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
123 |
#elif defined(X86) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
124 |
max_value = 3; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
125 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
126 |
if (value < 0 || value > max_value) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
127 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
128 |
"AllocatePrefetchInstr (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
129 |
"between 0 and " INTX_FORMAT "\n", value, max_value); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
130 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
131 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
132 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
133 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
134 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
135 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
136 |
JVMFlag::Error CompileThresholdConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
137 |
if (value < 0 || value > INT_MAX >> InvocationCounter::count_shift) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
138 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
139 |
"CompileThreshold (" INTX_FORMAT ") " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
140 |
"must be between 0 and %d\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
141 |
value, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
142 |
INT_MAX >> InvocationCounter::count_shift); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
143 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
144 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
145 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
146 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
147 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
148 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
149 |
JVMFlag::Error OnStackReplacePercentageConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
150 |
int backward_branch_limit; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
151 |
if (ProfileInterpreter) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
152 |
if (OnStackReplacePercentage < InterpreterProfilePercentage) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
153 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
154 |
"OnStackReplacePercentage (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
155 |
"larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
156 |
OnStackReplacePercentage, InterpreterProfilePercentage); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
157 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
158 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
159 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
160 |
backward_branch_limit = ((CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
161 |
<< InvocationCounter::count_shift; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
162 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
163 |
if (backward_branch_limit < 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
164 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
165 |
"CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
166 |
INTX_FORMAT " " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
167 |
"must be between 0 and " INTX_FORMAT ", try changing " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
168 |
"CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
169 |
(CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
170 |
INT_MAX >> InvocationCounter::count_shift); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
171 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
172 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
173 |
} else { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
174 |
if (OnStackReplacePercentage < 0 ) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
175 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
176 |
"OnStackReplacePercentage (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
177 |
"non-negative\n", OnStackReplacePercentage); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
178 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
179 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
180 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
181 |
backward_branch_limit = ((CompileThreshold * OnStackReplacePercentage) / 100) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
182 |
<< InvocationCounter::count_shift; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
183 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
184 |
if (backward_branch_limit < 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
185 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
186 |
"CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
187 |
"must be between 0 and " INTX_FORMAT ", try changing " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
188 |
"CompileThreshold and/or OnStackReplacePercentage\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
189 |
(CompileThreshold * OnStackReplacePercentage) / 100, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
190 |
INT_MAX >> InvocationCounter::count_shift); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
191 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
192 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
193 |
} |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
194 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
195 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
196 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
197 |
JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
198 |
if (CodeCacheSegmentSize < (uintx)CodeEntryAlignment) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
199 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
200 |
"CodeCacheSegmentSize (" UINTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
201 |
"larger than or equal to CodeEntryAlignment (" INTX_FORMAT ") " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
202 |
"to align entry points\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
203 |
CodeCacheSegmentSize, CodeEntryAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
204 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
205 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
206 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
207 |
if (CodeCacheSegmentSize < sizeof(jdouble)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
208 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
209 |
"CodeCacheSegmentSize (" UINTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
210 |
"at least " SIZE_FORMAT " to align constants\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
211 |
CodeCacheSegmentSize, sizeof(jdouble)); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
212 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
213 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
214 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
215 |
#ifdef COMPILER2 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
216 |
if (CodeCacheSegmentSize < (uintx)OptoLoopAlignment) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
217 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
218 |
"CodeCacheSegmentSize (" UINTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
219 |
"larger than or equal to OptoLoopAlignment (" INTX_FORMAT ") " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
220 |
"to align inner loops\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
221 |
CodeCacheSegmentSize, OptoLoopAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
222 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
223 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
224 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
225 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
226 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
227 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
228 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
229 |
JVMFlag::Error CompilerThreadPriorityConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
230 |
#ifdef SOLARIS |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
231 |
if ((value < MinimumPriority || value > MaximumPriority) && |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
232 |
(value != -1) && (value != -FXCriticalPriority)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
233 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
234 |
"CompileThreadPriority (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
235 |
"between %d and %d inclusively or -1 (means no change) " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
236 |
"or %d (special value for critical thread class/priority)\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
237 |
value, MinimumPriority, MaximumPriority, -FXCriticalPriority); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
238 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
239 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
240 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
241 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
242 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
243 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
244 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
245 |
JVMFlag::Error CodeEntryAlignmentConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
246 |
#ifdef SPARC |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
247 |
if (CodeEntryAlignment % relocInfo::addr_unit() != 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
248 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
249 |
"CodeEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
250 |
"multiple of NOP size\n", CodeEntryAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
251 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
252 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
253 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
254 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
255 |
if (!is_power_of_2(value)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
256 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
257 |
"CodeEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
258 |
"a power of two\n", CodeEntryAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
259 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
260 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
261 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
262 |
if (CodeEntryAlignment < 16) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
263 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
264 |
"CodeEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
265 |
"greater than or equal to %d\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
266 |
CodeEntryAlignment, 16); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
267 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
268 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
269 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
270 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
271 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
272 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
273 |
JVMFlag::Error OptoLoopAlignmentConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
274 |
if (!is_power_of_2(value)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
275 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
276 |
"OptoLoopAlignment (" INTX_FORMAT ") " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
277 |
"must be a power of two\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
278 |
value); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
279 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
280 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
281 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
282 |
// Relevant on ppc, s390, sparc. Will be optimized where |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
283 |
// addr_unit() == 1. |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
284 |
if (OptoLoopAlignment % relocInfo::addr_unit() != 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
285 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
286 |
"OptoLoopAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
287 |
"multiple of NOP size (%d)\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
288 |
value, relocInfo::addr_unit()); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
289 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
290 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
291 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
292 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
293 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
294 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
295 |
JVMFlag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
296 |
if (value >= 4032) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
297 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
298 |
"ArraycopyDstPrefetchDistance (" UINTX_FORMAT ") must be" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
299 |
"between 0 and 4031\n", value); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
300 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
301 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
302 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
303 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
304 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
305 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
306 |
JVMFlag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
307 |
if (value >= 4032) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
308 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
309 |
"ArraycopySrcPrefetchDistance (" UINTX_FORMAT ") must be" |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
310 |
"between 0 and 4031\n", value); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
311 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
312 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
313 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
314 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
315 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
316 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
317 |
JVMFlag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
318 |
for (int i = 0; i < 3; i++) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
319 |
if (value % 10 > 2) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
320 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
321 |
"Invalid value (" UINTX_FORMAT ") " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
322 |
"in TypeProfileLevel at position %d\n", value, i); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
323 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
324 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
325 |
value = value / 10; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
326 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
327 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
328 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
329 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
330 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
331 |
JVMFlag::Error InitArrayShortSizeConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
332 |
if (value % BytesPerLong != 0) { |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
333 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
334 |
} else { |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
335 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
336 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
337 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
338 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
339 |
#ifdef COMPILER2 |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
340 |
JVMFlag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
341 |
if (InteriorEntryAlignment > CodeEntryAlignment) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
342 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
343 |
"InteriorEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
344 |
"less than or equal to CodeEntryAlignment (" INTX_FORMAT ")\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
345 |
InteriorEntryAlignment, CodeEntryAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
346 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
347 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
348 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
349 |
#ifdef SPARC |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
350 |
if (InteriorEntryAlignment % relocInfo::addr_unit() != 0) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
351 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
352 |
"InteriorEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
353 |
"multiple of NOP size\n"); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
354 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
355 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
356 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
357 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
358 |
if (!is_power_of_2(value)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
359 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
360 |
"InteriorEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
361 |
"a power of two\n", InteriorEntryAlignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
362 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
363 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
364 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
365 |
int minimum_alignment = 16; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
366 |
#if defined(SPARC) || (defined(X86) && !defined(AMD64)) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
367 |
minimum_alignment = 4; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
368 |
#elif defined(S390) |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
369 |
minimum_alignment = 2; |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
370 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
371 |
|
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
372 |
if (InteriorEntryAlignment < minimum_alignment) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
373 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
374 |
"InteriorEntryAlignment (" INTX_FORMAT ") must be " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
375 |
"greater than or equal to %d\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
376 |
InteriorEntryAlignment, minimum_alignment); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
377 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
378 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
379 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
380 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
381 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
382 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
383 |
JVMFlag::Error NodeLimitFudgeFactorConstraintFunc(intx value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
384 |
if (value < MaxNodeLimit * 2 / 100 || value > MaxNodeLimit * 40 / 100) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
385 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
386 |
"NodeLimitFudgeFactor must be between 2%% and 40%% " |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
387 |
"of MaxNodeLimit (" INTX_FORMAT ")\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
388 |
MaxNodeLimit); |
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
389 |
return JVMFlag::VIOLATES_CONSTRAINT; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
390 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
391 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
392 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
393 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
394 |
#endif // COMPILER2 |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
395 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
396 |
JVMFlag::Error RTMTotalCountIncrRateConstraintFunc(int value, bool verbose) { |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
397 |
#if INCLUDE_RTM_OPT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
398 |
if (UseRTMLocking && !is_power_of_2(RTMTotalCountIncrRate)) { |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
399 |
CommandLineError::print(verbose, |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
400 |
"RTMTotalCountIncrRate (" INTX_FORMAT |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
401 |
") must be a power of 2, resetting it to 64\n", |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
402 |
RTMTotalCountIncrRate); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
403 |
FLAG_SET_DEFAULT(RTMTotalCountIncrRate, 64); |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
404 |
} |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
405 |
#endif |
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
406 |
|
49902
3661f31c6df4
8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents:
49860
diff
changeset
|
407 |
return JVMFlag::SUCCESS; |
49860
ca5216a2a2cc
8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff
changeset
|
408 |
} |