src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp
author redestad
Thu, 07 Feb 2019 10:26:32 +0100
changeset 53682 e30211561a17
parent 52004 22ca7ba0c50c
permissions -rw-r--r--
8218565: HandleMark cleanup Reviewed-by: coleenp, kbarrett, rehn
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
/*
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
     2
 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
49860
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"
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    29
#include "runtime/globals.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    30
#include "runtime/safepointMechanism.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    31
#include "runtime/task.hpp"
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    32
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    33
JVMFlag::Error ObjectAlignmentInBytesConstraintFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    34
  if (!is_power_of_2(value)) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    35
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    36
                        "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    37
                        "power of 2\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    38
                        value);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    39
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    40
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    41
  // In case page size is very small.
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    42
  if (value >= (intx)os::vm_page_size()) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    43
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    44
                        "ObjectAlignmentInBytes (" INTX_FORMAT ") must be "
52004
22ca7ba0c50c 8204294: [REDO] - JVMFlag::printError missing ATTRIBUTE_PRINTF
gziemski
parents: 50289
diff changeset
    45
                        "less than page size (%d)\n",
22ca7ba0c50c 8204294: [REDO] - JVMFlag::printError missing ATTRIBUTE_PRINTF
gziemski
parents: 50289
diff changeset
    46
                        value, os::vm_page_size());
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    47
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    48
  }
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    49
  return JVMFlag::SUCCESS;
49860
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
// 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
    53
// 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
    54
JVMFlag::Error ContendedPaddingWidthConstraintFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    55
  if ((value % BytesPerLong) != 0) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    56
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    57
                        "ContendedPaddingWidth (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    58
                        "a multiple of %d\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    59
                        value, BytesPerLong);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    60
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    61
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    62
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    63
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    64
}
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 BiasedLockingBulkRebiasThresholdFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    67
  if (value > BiasedLockingBulkRevokeThreshold) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    68
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    69
                        "BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    70
                        "less than or equal to BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    71
                        value, BiasedLockingBulkRevokeThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    72
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    73
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    74
    return JVMFlag::SUCCESS;
49860
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
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    77
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    78
JVMFlag::Error BiasedLockingStartupDelayFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    79
  if ((value % PeriodicTask::interval_gran) != 0) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    80
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    81
                        "BiasedLockingStartupDelay (" INTX_FORMAT ") must be "
52004
22ca7ba0c50c 8204294: [REDO] - JVMFlag::printError missing ATTRIBUTE_PRINTF
gziemski
parents: 50289
diff changeset
    82
                        "evenly divisible by PeriodicTask::interval_gran (%d)\n",
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    83
                        value, PeriodicTask::interval_gran);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    84
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    85
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    86
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    87
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    88
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    89
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    90
JVMFlag::Error BiasedLockingBulkRevokeThresholdFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    91
  if (value < BiasedLockingBulkRebiasThreshold) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    92
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    93
                        "BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    94
                        "greater than or equal to BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    95
                        value, BiasedLockingBulkRebiasThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
    96
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
    97
  } else if ((double)value/(double)BiasedLockingDecayTime > 0.1) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    98
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
    99
                        "The ratio of BiasedLockingBulkRevokeThreshold (" INTX_FORMAT ")"
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   100
                        " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   101
                        "less than or equal to 0.1\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   102
                        value, BiasedLockingBulkRebiasThreshold);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   103
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   104
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   105
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   106
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   107
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   108
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   109
JVMFlag::Error BiasedLockingDecayTimeFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   110
  if (BiasedLockingBulkRebiasThreshold/(double)value > 0.1) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   111
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   112
                        "The ratio of BiasedLockingBulkRebiasThreshold (" INTX_FORMAT ")"
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   113
                        " to BiasedLockingDecayTime (" INTX_FORMAT ") must be "
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   114
                        "less than or equal to 0.1\n",
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   115
                        BiasedLockingBulkRebiasThreshold, value);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   116
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   117
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   118
    return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   119
  }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   120
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   121
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   122
JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   123
  if ((value % PeriodicTask::interval_gran != 0)) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   124
    JVMFlag::printError(verbose,
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   125
                        "PerfDataSamplingInterval (" INTX_FORMAT ") must be "
52004
22ca7ba0c50c 8204294: [REDO] - JVMFlag::printError missing ATTRIBUTE_PRINTF
gziemski
parents: 50289
diff changeset
   126
                        "evenly divisible by PeriodicTask::interval_gran (%d)\n",
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   127
                        value, PeriodicTask::interval_gran);
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   128
    return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   129
  } else {
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   130
    return JVMFlag::SUCCESS;
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
}
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   133
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   134
JVMFlag::Error ThreadLocalHandshakesConstraintFunc(bool value, bool verbose) {
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   135
  if (value) {
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   136
    if (!SafepointMechanism::supports_thread_local_poll()) {
50289
0195ee80e530 8133564: Runtime - 2nd followup to Validate JVM Command-Line Flag Arguments
gziemski
parents: 49902
diff changeset
   137
      JVMFlag::printError(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
   138
      return JVMFlag::VIOLATES_CONSTRAINT;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   139
    }
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   140
  }
49902
3661f31c6df4 8202150: [REDO] Split globals.hpp to factor out the Flag class
gziemski
parents: 49860
diff changeset
   141
  return JVMFlag::SUCCESS;
49860
ca5216a2a2cc 8202151: [BACKOUT] Split globals.hpp to factor out the Flag class
gziemski
parents:
diff changeset
   142
}