src/hotspot/share/runtime/commandLineFlagConstraintsRuntime.cpp
author dlong
Thu, 30 Nov 2017 10:40:48 -0800
changeset 48172 e26fc5201707
parent 47881 0ce0ac68ace7
child 56478 90df053536e0
permissions -rw-r--r--
8191437: AOT doesn't work easily after thread local handshakes Reviewed-by: kvn, rehn, aph
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    27
#include "runtime/commandLineFlagConstraintsRuntime.hpp"
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    28
#include "runtime/commandLineFlagRangeList.hpp"
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    29
#include "runtime/globals.hpp"
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
    30
#include "runtime/safepointMechanism.hpp"
33222
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    31
#include "runtime/task.hpp"
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    32
#include "utilities/defaultStream.hpp"
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    33
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    34
Flag::Error ObjectAlignmentInBytesConstraintFunc(intx value, bool verbose) {
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    35
  if (!is_power_of_2(value)) {
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    36
    CommandLineError::print(verbose,
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    37
                            "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    38
                            "power of 2\n",
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    39
                            value);
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    40
    return Flag::VIOLATES_CONSTRAINT;
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    41
  }
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    42
  // In case page size is very small.
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    43
  if (value >= (intx)os::vm_page_size()) {
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    44
    CommandLineError::print(verbose,
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    45
                            "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
    46
                            "less than page size (" INTX_FORMAT ")\n",
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    47
                            value, (intx)os::vm_page_size());
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    48
    return Flag::VIOLATES_CONSTRAINT;
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    49
  }
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    50
  return Flag::SUCCESS;
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    51
}
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
// 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
    54
// It is sufficient to check against the largest type size.
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    55
Flag::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
    56
  if ((value % BytesPerLong) != 0) {
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    57
    CommandLineError::print(verbose,
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    58
                            "ContendedPaddingWidth (" INTX_FORMAT ") must be "
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    59
                            "a multiple of %d\n",
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 31371
diff changeset
    60
                            value, BytesPerLong);
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    61
    return Flag::VIOLATES_CONSTRAINT;
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    62
  } else {
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    63
    return Flag::SUCCESS;
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    64
  }
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    65
}
33222
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    66
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    67
Flag::Error BiasedLockingBulkRebiasThresholdFunc(intx value, bool verbose) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    68
  if (value > BiasedLockingBulkRevokeThreshold) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    69
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    70
                            "BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be "
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    71
                            "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
    72
                            value, BiasedLockingBulkRevokeThreshold);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    73
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    74
  } else {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    75
    return Flag::SUCCESS;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    76
  }
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
Flag::Error BiasedLockingStartupDelayFunc(intx value, bool verbose) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    80
  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
    81
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    82
                            "BiasedLockingStartupDelay (" INTX_FORMAT ") must be "
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    83
                            "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
    84
                            value, PeriodicTask::interval_gran);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    85
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    86
  } else {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    87
    return Flag::SUCCESS;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    88
  }
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
Flag::Error BiasedLockingBulkRevokeThresholdFunc(intx value, bool verbose) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    92
  if (value < BiasedLockingBulkRebiasThreshold) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    93
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    94
                            "BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be "
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    95
                            "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
    96
                            value, BiasedLockingBulkRebiasThreshold);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    97
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
    98
  } 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
    99
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   100
                            "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
   101
                            " 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
   102
                            "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
   103
                            value, BiasedLockingBulkRebiasThreshold);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   104
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   105
  } else {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   106
    return Flag::SUCCESS;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   107
  }
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
Flag::Error BiasedLockingDecayTimeFunc(intx value, bool verbose) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   111
  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
   112
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   113
                            "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
   114
                            " 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
   115
                            "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
   116
                            BiasedLockingBulkRebiasThreshold, value);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   117
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   118
  } else {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   119
    return Flag::SUCCESS;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   120
  }
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
Flag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   124
  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
   125
    CommandLineError::print(verbose,
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   126
                            "PerfDataSamplingInterval (" INTX_FORMAT ") must be "
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   127
                            "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
   128
                            value, PeriodicTask::interval_gran);
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   129
    return Flag::VIOLATES_CONSTRAINT;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   130
  } else {
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   131
    return Flag::SUCCESS;
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   132
  }
e0a340f4ab6e 8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing.
gziemski
parents: 32351
diff changeset
   133
}
47881
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   134
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   135
Flag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   136
  if (value) {
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   137
    if (!SafepointMechanism::supports_thread_local_poll()) {
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   138
      CommandLineError::print(verbose, "ThreadLocalHandshakes not yet supported on this platform\n");
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   139
      return Flag::VIOLATES_CONSTRAINT;
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   140
    }
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
  return Flag::SUCCESS;
0ce0ac68ace7 8189941: Implementation JEP 312: Thread-local handshake
rehn
parents: 47216
diff changeset
   143
}