src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
author dfuchs
Fri, 04 May 2018 17:28:03 +0100
branchhttp-client-branch
changeset 56532 a594484f54db
parent 56497 598e0c5b6f8c
child 56625 380796df44a9
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 "runtime/arguments.hpp"
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    27
#include "runtime/flags/jvmFlag.hpp"
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    28
#include "runtime/flags/jvmFlagConstraintsRuntime.hpp"
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    29
#include "runtime/flags/jvmFlagRangeList.hpp"
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    30
#include "runtime/globals.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    31
#include "runtime/safepointMechanism.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    32
#include "runtime/task.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    33
#include "utilities/defaultStream.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    34
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    35
JVMFlag::Error ObjectAlignmentInBytesConstraintFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    36
  if (!is_power_of_2(value)) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    37
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    38
                            "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    39
                            "power of 2\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    40
                            value);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    41
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    42
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    43
  // In case page size is very small.
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    44
  if (value >= (intx)os::vm_page_size()) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    45
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    46
                            "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    47
                            "less than page size (" INTX_FORMAT ")\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    48
                            value, (intx)os::vm_page_size());
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    49
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    50
  }
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    51
  return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    52
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    53
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    54
// Need to enforce the padding not to break the existing field alignments.
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    55
// It is sufficient to check against the largest type size.
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    56
JVMFlag::Error ContendedPaddingWidthConstraintFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    57
  if ((value % BytesPerLong) != 0) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    58
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    59
                            "ContendedPaddingWidth (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    60
                            "a multiple of %d\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    61
                            value, BytesPerLong);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    62
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    63
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    64
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    65
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    66
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    67
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    68
JVMFlag::Error BiasedLockingBulkRebiasThresholdFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    69
  if (value > BiasedLockingBulkRevokeThreshold) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    70
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    71
                            "BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    72
                            "less than or equal to BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    73
                            value, BiasedLockingBulkRevokeThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    74
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    75
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    76
    return JVMFlag::SUCCESS;
49860
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
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    79
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    80
JVMFlag::Error BiasedLockingStartupDelayFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    81
  if ((value % PeriodicTask::interval_gran) != 0) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    82
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    83
                            "BiasedLockingStartupDelay (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    84
                            "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    85
                            value, PeriodicTask::interval_gran);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    86
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    87
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    88
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    89
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    90
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    91
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    92
JVMFlag::Error BiasedLockingBulkRevokeThresholdFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    93
  if (value < BiasedLockingBulkRebiasThreshold) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    94
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    95
                            "BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    96
                            "greater than or equal to BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    97
                            value, BiasedLockingBulkRebiasThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    98
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    99
  } else if ((double)value/(double)BiasedLockingDecayTime > 0.1) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   100
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   101
                            "The ratio of BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   102
                            " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   103
                            "less than or equal to 0.1\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   104
                            value, BiasedLockingBulkRebiasThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   105
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   106
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   107
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   108
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   109
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   110
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   111
JVMFlag::Error BiasedLockingDecayTimeFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   112
  if (BiasedLockingBulkRebiasThreshold/(double)value > 0.1) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   113
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   114
                            "The ratio of BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   115
                            " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   116
                            "less than or equal to 0.1\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   117
                            BiasedLockingBulkRebiasThreshold, value);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   118
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   119
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   120
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   121
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   122
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   123
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   124
JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   125
  if ((value % PeriodicTask::interval_gran != 0)) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   126
    CommandLineError::print(verbose,
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   127
                            "PerfDataSamplingInterval (" INTX_FORMAT ") must be "
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   128
                            "evenly divisible by PeriodicTask::interval_gran (" INTX_FORMAT ")\n",
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   129
                            value, PeriodicTask::interval_gran);
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
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   132
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   133
  }
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 ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   137
  if (value) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   138
    if (!SafepointMechanism::supports_thread_local_poll()) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   139
      CommandLineError::print(verbose, "ThreadLocalHandshakes not yet supported on this platform\n");
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   140
      return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   141
    }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   142
  }
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   143
  return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   144
}