author | gziemski |
Mon, 23 Apr 2018 10:59:39 -0500 | |
changeset 49857 | 31e07291ae29 |
parent 48172 | src/hotspot/share/runtime/commandLineFlagConstraintsRuntime.cpp@e26fc5201707 |
permissions | -rw-r--r-- |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
1 |
/* |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
4 |
* |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
8 |
* |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
13 |
* accompanied this code). |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
14 |
* |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
18 |
* |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
21 |
* questions. |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
22 |
* |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
23 |
*/ |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
24 |
|
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
25 |
#include "precompiled.hpp" |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
26 |
#include "runtime/arguments.hpp" |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
27 |
#include "runtime/flags/jvmFlag.hpp" |
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
28 |
#include "runtime/flags/jvmFlagConstraintsRuntime.hpp" |
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
29 |
#include "runtime/flags/jvmFlagRangeList.hpp" |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
30 |
#include "runtime/globals.hpp" |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
31 |
#include "runtime/safepointMechanism.hpp" |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
32 |
#include "runtime/task.hpp" |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
33 |
#include "utilities/defaultStream.hpp" |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
34 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
35 |
JVMFlag::Error ObjectAlignmentInBytesConstraintFunc(intx value, bool verbose) { |
32351 | 36 |
if (!is_power_of_2(value)) { |
37 |
CommandLineError::print(verbose, |
|
38 |
"ObjectAlignmentInBytes (" INTX_FORMAT ") must be " |
|
39 |
"power of 2\n", |
|
40 |
value); |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
41 |
return JVMFlag::VIOLATES_CONSTRAINT; |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
42 |
} |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
43 |
// In case page size is very small. |
32351 | 44 |
if (value >= (intx)os::vm_page_size()) { |
45 |
CommandLineError::print(verbose, |
|
46 |
"ObjectAlignmentInBytes (" INTX_FORMAT ") must be " |
|
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
47 |
"less than page size (" INTX_FORMAT ")\n", |
32351 | 48 |
value, (intx)os::vm_page_size()); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
49 |
return JVMFlag::VIOLATES_CONSTRAINT; |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
50 |
} |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
51 |
return JVMFlag::SUCCESS; |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
52 |
} |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
53 |
|
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
54 |
// Need to enforce the padding not to break the existing field alignments. |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
55 |
// It is sufficient to check against the largest type size. |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
56 |
JVMFlag::Error ContendedPaddingWidthConstraintFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
57 |
if ((value % BytesPerLong) != 0) { |
32351 | 58 |
CommandLineError::print(verbose, |
59 |
"ContendedPaddingWidth (" INTX_FORMAT ") must be " |
|
60 |
"a multiple of %d\n", |
|
61 |
value, BytesPerLong); |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
62 |
return JVMFlag::VIOLATES_CONSTRAINT; |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
63 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
64 |
return JVMFlag::SUCCESS; |
31371
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
65 |
} |
311143309e73
8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff
changeset
|
66 |
} |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
67 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
68 |
JVMFlag::Error BiasedLockingBulkRebiasThresholdFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
69 |
if (value > BiasedLockingBulkRevokeThreshold) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
70 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
71 |
"BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
72 |
"less than or equal to BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
73 |
value, BiasedLockingBulkRevokeThreshold); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
74 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
75 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
76 |
return JVMFlag::SUCCESS; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
77 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
78 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
79 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
80 |
JVMFlag::Error BiasedLockingStartupDelayFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
81 |
if ((value % PeriodicTask::interval_gran) != 0) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
82 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
83 |
"BiasedLockingStartupDelay (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
84 |
"evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
85 |
value, PeriodicTask::interval_gran); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
86 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
87 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
88 |
return JVMFlag::SUCCESS; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
89 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
90 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
91 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
92 |
JVMFlag::Error BiasedLockingBulkRevokeThresholdFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
93 |
if (value < BiasedLockingBulkRebiasThreshold) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
94 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
95 |
"BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
96 |
"greater than or equal to BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
97 |
value, BiasedLockingBulkRebiasThreshold); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
98 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
99 |
} else if ((double)value/(double)BiasedLockingDecayTime > 0.1) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
100 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
101 |
"The ratio of BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")" |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
102 |
" to BiasedLockingDecayTime (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
103 |
"less than or equal to 0.1\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
104 |
value, BiasedLockingBulkRebiasThreshold); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
105 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
106 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
107 |
return JVMFlag::SUCCESS; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
108 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
109 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
110 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
111 |
JVMFlag::Error BiasedLockingDecayTimeFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
112 |
if (BiasedLockingBulkRebiasThreshold/(double)value > 0.1) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
113 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
114 |
"The ratio of BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")" |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
115 |
" to BiasedLockingDecayTime (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
116 |
"less than or equal to 0.1\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
117 |
BiasedLockingBulkRebiasThreshold, value); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
118 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
119 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
120 |
return JVMFlag::SUCCESS; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
121 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
122 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
123 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
124 |
JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) { |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
125 |
if ((value % PeriodicTask::interval_gran != 0)) { |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
126 |
CommandLineError::print(verbose, |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
127 |
"PerfDataSamplingInterval (" INTX_FORMAT ") must be " |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
128 |
"evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n", |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
129 |
value, PeriodicTask::interval_gran); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
130 |
return JVMFlag::VIOLATES_CONSTRAINT; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
131 |
} else { |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
132 |
return JVMFlag::SUCCESS; |
33222
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
133 |
} |
e0a340f4ab6e
8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents:
32351
diff
changeset
|
134 |
} |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
135 |
|
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
136 |
JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) { |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
137 |
if (value) { |
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
138 |
if (!SafepointMechanism::supports_thread_local_poll()) { |
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
139 |
CommandLineError::print(verbose, "ThreadLocalHandshakes not yet supported on this platform\n"); |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
140 |
return JVMFlag::VIOLATES_CONSTRAINT; |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
141 |
} |
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
142 |
} |
49857
31e07291ae29
8081519: Split globals.hpp to factor out the Flag class
gziemski
parents:
48172
diff
changeset
|
143 |
return JVMFlag::SUCCESS; |
47881
0ce0ac68ace7
8189941: Implementation JEP 312: Thread-local handshake
rehn
parents:
47216
diff
changeset
|
144 |
} |