hotspot/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp
author hseigel
Tue, 08 Aug 2017 09:53:52 -0400
changeset 46773 fb17cc9a6847
parent 46742 24ec8a039c90
permissions -rw-r--r--
8185717: Make ModuleEntry->module() return an oop not a jobject Summary: Change ModuleEntry::module() to return an oop and add a ModuleEntry::module_handle() that returns a jobject Reviewed-by: shade, coleenp, lfoltan
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
/*
46698
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
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"
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46735
diff changeset
    26
#include "code/relocInfo.hpp"
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46735
diff changeset
    27
#include "compiler/compilerDefinitions.hpp"
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    28
#include "oops/metadata.hpp"
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    29
#include "runtime/os.hpp"
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    30
#include "interpreter/invocationCounter.hpp"
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    31
#include "runtime/arguments.hpp"
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    32
#include "runtime/commandLineFlagConstraintsCompiler.hpp"
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    33
#include "runtime/commandLineFlagRangeList.hpp"
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    34
#include "runtime/globals.hpp"
46742
24ec8a039c90 8184994: Add Dictionary size logging and jcmd
coleenp
parents: 46735
diff changeset
    35
#include "runtime/globals_extension.hpp"
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    36
#include "utilities/defaultStream.hpp"
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    37
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    38
Flag::Error AliasLevelConstraintFunc(intx value, bool verbose) {
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
    39
  if ((value <= 1) && (Arguments::mode() == Arguments::_comp || Arguments::mode() == Arguments::_mixed)) {
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    40
    CommandLineError::print(verbose,
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    41
                            "AliasLevel (" INTX_FORMAT ") is not "
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
    42
                            "compatible with -Xcomp or -Xmixed\n",
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    43
                            value);
31995
aa4049b4184a 8130459: Add additional validation after heap creation
sangheki
parents: 31371
diff changeset
    44
    return Flag::VIOLATES_CONSTRAINT;
aa4049b4184a 8130459: Add additional validation after heap creation
sangheki
parents: 31371
diff changeset
    45
  } else {
aa4049b4184a 8130459: Add additional validation after heap creation
sangheki
parents: 31371
diff changeset
    46
    return Flag::SUCCESS;
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    47
  }
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    48
}
31959
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    49
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    50
/**
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    51
 * Validate the minimum number of compiler threads needed to run the
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    52
 * JVM. The following configurations are possible.
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    53
 *
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    54
 * 1) The JVM is build using an interpreter only. As a result, the minimum number of
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    55
 *    compiler threads is 0.
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    56
 * 2) The JVM is build using the compiler(s) and tiered compilation is disabled. As
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    57
 *    a result, either C1 or C2 is used, so the minimum number of compiler threads is 1.
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    58
 * 3) The JVM is build using the compiler(s) and tiered compilation is enabled. However,
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    59
 *    the option "TieredStopAtLevel < CompLevel_full_optimization". As a result, only
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    60
 *    C1 can be used, so the minimum number of compiler threads is 1.
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    61
 * 4) The JVM is build using the compilers and tiered compilation is enabled. The option
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    62
 *    'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    63
 *    the minimum number of compiler threads is 2.
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    64
 */
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    65
Flag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
31959
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    66
  int min_number_of_compiler_threads = 0;
33160
c59f1676d27e 8136421: JEP 243: Java-Level JVM Compiler Interface
twisti
parents: 32351
diff changeset
    67
#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK) && !INCLUDE_JVMCI
31959
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    68
  // case 1
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    69
#else
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    70
  if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    71
    min_number_of_compiler_threads = 1; // case 2 or case 3
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    72
  } else {
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    73
    min_number_of_compiler_threads = 2;   // case 4 (tiered)
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    74
  }
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    75
#endif
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    76
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    77
  // The default CICompilerCount's value is CI_COMPILER_COUNT.
32083
1796911eb140 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
roland
parents: 31959
diff changeset
    78
  // With a client VM, -XX:+TieredCompilation causes TieredCompilation
1796911eb140 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
roland
parents: 31959
diff changeset
    79
  // to be true here (the option is validated later) and
1796911eb140 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
roland
parents: 31959
diff changeset
    80
  // min_number_of_compiler_threads to exceed CI_COMPILER_COUNT.
1796911eb140 8132525: java -client -XX:+TieredCompilation -XX:CICompilerCount=1 -version asserts since 8130858
roland
parents: 31959
diff changeset
    81
  min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT);
31959
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    82
32351
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    83
  if (value < (intx)min_number_of_compiler_threads) {
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    84
    CommandLineError::print(verbose,
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    85
                            "CICompilerCount (" INTX_FORMAT ") must be "
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    86
                            "at least %d \n",
1da9b960b3d4 8112746: Followup to JDK-8059557 (JEP 245)
gziemski
parents: 32087
diff changeset
    87
                            value, min_number_of_compiler_threads);
31959
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    88
    return Flag::VIOLATES_CONSTRAINT;
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    89
  } else {
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    90
    return Flag::SUCCESS;
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    91
  }
34180370555e 8130858: CICompilerCount=1 when tiered is off is not allowed any more
roland
parents: 31371
diff changeset
    92
}
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    93
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    94
Flag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) {
38220
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
    95
  if (value < 0 || value > 512) {
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
    96
    CommandLineError::print(verbose,
38220
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
    97
                            "AllocatePrefetchDistance (" INTX_FORMAT ") must be "
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
    98
                            "between 0 and " INTX_FORMAT "\n",
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
    99
                            AllocatePrefetchDistance, 512);
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   100
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   101
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   102
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   103
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   104
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   105
38220
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   106
Flag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) {
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   107
  if (AllocatePrefetchStyle == 3) {
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   108
    if (value % wordSize != 0) {
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   109
      CommandLineError::print(verbose,
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   110
                              "AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n",
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   111
                              value, wordSize);
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   112
      return Flag::VIOLATES_CONSTRAINT;
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   113
    }
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   114
  }
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   115
  return Flag::SUCCESS;
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   116
}
8d86b82e0ac7 8153340: Disallow misconfiguration and improve the consistency of allocation prefetching
zmajo
parents: 36554
diff changeset
   117
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   118
Flag::Error AllocatePrefetchInstrConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   119
  intx max_value = max_intx;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   120
#if defined(SPARC)
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   121
  max_value = 1;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   122
#elif defined(X86)
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   123
  max_value = 3;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   124
#endif
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   125
  if (value < 0 || value > max_value) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   126
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   127
                            "AllocatePrefetchInstr (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   128
                            "between 0 and " INTX_FORMAT "\n", value, max_value);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   129
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   130
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   131
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   132
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   133
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   134
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   135
Flag::Error CompileThresholdConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   136
  if (value < 0 || value > INT_MAX >> InvocationCounter::count_shift) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   137
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   138
                            "CompileThreshold (" INTX_FORMAT ") "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   139
                            "must be between 0 and %d\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   140
                            value,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   141
                            INT_MAX >> InvocationCounter::count_shift);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   142
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   143
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   144
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   145
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   146
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   147
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   148
Flag::Error OnStackReplacePercentageConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   149
  int backward_branch_limit;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   150
  if (ProfileInterpreter) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   151
    if (OnStackReplacePercentage < InterpreterProfilePercentage) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   152
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   153
                              "OnStackReplacePercentage (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   154
                              "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   155
                              OnStackReplacePercentage, InterpreterProfilePercentage);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   156
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   157
    }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   158
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   159
    backward_branch_limit = ((CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100)
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   160
                            << InvocationCounter::count_shift;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   161
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   162
    if (backward_branch_limit < 0) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   163
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   164
                              "CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   165
                              INTX_FORMAT " "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   166
                              "must be between 0 and " INTX_FORMAT ", try changing "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   167
                              "CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   168
                              (CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   169
                              INT_MAX >> InvocationCounter::count_shift);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   170
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   171
    }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   172
  } else {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   173
    if (OnStackReplacePercentage < 0 ) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   174
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   175
                              "OnStackReplacePercentage (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   176
                              "non-negative\n", OnStackReplacePercentage);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   177
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   178
    }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   179
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   180
    backward_branch_limit = ((CompileThreshold * OnStackReplacePercentage) / 100)
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   181
                            << InvocationCounter::count_shift;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   182
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   183
    if (backward_branch_limit < 0) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   184
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   185
                              "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   186
                              "must be between 0 and " INTX_FORMAT ", try changing "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   187
                              "CompileThreshold and/or OnStackReplacePercentage\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   188
                              (CompileThreshold * OnStackReplacePercentage) / 100,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   189
                              INT_MAX >> InvocationCounter::count_shift);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   190
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   191
    }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   192
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   193
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   194
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   195
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   196
Flag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   197
  if (CodeCacheSegmentSize < (uintx)CodeEntryAlignment) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   198
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   199
                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   200
                            "larger than or equal to CodeEntryAlignment (" INTX_FORMAT ") "
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   201
                            "to align entry points\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   202
                            CodeCacheSegmentSize, CodeEntryAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   203
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   204
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   205
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   206
  if (CodeCacheSegmentSize < sizeof(jdouble)) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   207
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   208
                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   209
                            "at least " SIZE_FORMAT " to align constants\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   210
                            CodeCacheSegmentSize, sizeof(jdouble));
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   211
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   212
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   213
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   214
#ifdef COMPILER2
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   215
  if (CodeCacheSegmentSize < (uintx)OptoLoopAlignment) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   216
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   217
                            "CodeCacheSegmentSize  (" UINTX_FORMAT ") must be "
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   218
                            "larger than or equal to OptoLoopAlignment (" INTX_FORMAT ") "
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   219
                            "to align inner loops\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   220
                            CodeCacheSegmentSize, OptoLoopAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   221
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   222
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   223
#endif
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   224
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   225
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   226
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   227
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   228
Flag::Error CompilerThreadPriorityConstraintFunc(intx value, bool verbose) {
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   229
#ifdef SOLARIS
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   230
  if ((value < MinimumPriority || value > MaximumPriority) &&
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   231
      (value != -1) && (value != -FXCriticalPriority)) {
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   232
    CommandLineError::print(verbose,
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   233
                            "CompileThreadPriority (" INTX_FORMAT ") must be "
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   234
                            "between %d and %d inclusively or -1 (means no change) "
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   235
                            "or %d (special value for critical thread class/priority)\n",
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   236
                            value, MinimumPriority, MaximumPriority, -FXCriticalPriority);
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   237
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   238
  }
33744
8dd886109959 8141042: Typos and refactoring in Compiler constraints functions
ddmitriev
parents: 33163
diff changeset
   239
#endif
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   240
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   241
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   242
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   243
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   244
Flag::Error CodeEntryAlignmentConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   245
#ifdef SPARC
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   246
  if (CodeEntryAlignment % relocInfo::addr_unit() != 0) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   247
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   248
                            "CodeEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   249
                            "multiple of NOP size\n", CodeEntryAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   250
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   251
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   252
#endif
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   253
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   254
  if (!is_power_of_2(value)) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   255
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   256
                            "CodeEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   257
                            "a power of two\n", CodeEntryAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   258
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   259
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   260
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   261
  if (CodeEntryAlignment < 16) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   262
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   263
                              "CodeEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   264
                              "greater than or equal to %d\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   265
                              CodeEntryAlignment, 16);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   266
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   267
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   268
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   269
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   270
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   271
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   272
Flag::Error OptoLoopAlignmentConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   273
  if (!is_power_of_2(value)) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   274
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   275
                            "OptoLoopAlignment (" INTX_FORMAT ") "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   276
                            "must be a power of two\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   277
                            value);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   278
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   279
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   280
46486
314aa24e62d6 8179618: Fixes for range of OptoLoopAlignment and Inlining flags
goetz
parents: 46422
diff changeset
   281
  // Relevant on ppc, s390, sparc. Will be optimized where
314aa24e62d6 8179618: Fixes for range of OptoLoopAlignment and Inlining flags
goetz
parents: 46422
diff changeset
   282
  // addr_unit() == 1.
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   283
  if (OptoLoopAlignment % relocInfo::addr_unit() != 0) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   284
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   285
                            "OptoLoopAlignment (" INTX_FORMAT ") must be "
46486
314aa24e62d6 8179618: Fixes for range of OptoLoopAlignment and Inlining flags
goetz
parents: 46422
diff changeset
   286
                            "multiple of NOP size (%d)\n",
314aa24e62d6 8179618: Fixes for range of OptoLoopAlignment and Inlining flags
goetz
parents: 46422
diff changeset
   287
                            value, relocInfo::addr_unit());
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   288
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   289
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   290
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   291
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   292
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   293
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   294
Flag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verbose) {
46422
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   295
  if (value >= 4032) {
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   296
    CommandLineError::print(verbose,
46422
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   297
                            "ArraycopyDstPrefetchDistance (" UINTX_FORMAT ") must be"
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   298
                            "between 0 and 4031\n", value);
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   299
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   300
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   301
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   302
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   303
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   304
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   305
Flag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) {
46422
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   306
  if (value >= 4032) {
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   307
    CommandLineError::print(verbose,
46422
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   308
                            "ArraycopySrcPrefetchDistance (" UINTX_FORMAT ") must be"
6ecc7cc67619 8179019: Correct range checks for command-line options ArraycopySrcPrefetchDistance and ArraycopyDstPrefetchDistance
zmajo
parents: 42063
diff changeset
   309
                            "between 0 and 4031\n", value);
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   310
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   311
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   312
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   313
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   314
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   315
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   316
Flag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   317
  for (int i = 0; i < 3; i++) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   318
    if (value % 10 > 2) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   319
      CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   320
                              "Invalid value (" UINTX_FORMAT ") "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   321
                              "in TypeProfileLevel at position %d\n", value, i);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   322
      return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   323
    }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   324
    value = value / 10;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   325
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   326
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   327
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   328
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   329
36554
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   330
Flag::Error InitArrayShortSizeConstraintFunc(intx value, bool verbose) {
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   331
  if (value % BytesPerLong != 0) {
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   332
    return Flag::VIOLATES_CONSTRAINT;
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   333
  } else {
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   334
    return Flag::SUCCESS;
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   335
  }
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   336
}
a7eb9ee4680c 8146801: Allocating short arrays of non-constant size is slow
shade
parents: 35751
diff changeset
   337
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   338
#ifdef COMPILER2
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   339
Flag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   340
  if (InteriorEntryAlignment > CodeEntryAlignment) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   341
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   342
                           "InteriorEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   343
                           "less than or equal to CodeEntryAlignment (" INTX_FORMAT ")\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   344
                           InteriorEntryAlignment, CodeEntryAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   345
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   346
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   347
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   348
#ifdef SPARC
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   349
  if (InteriorEntryAlignment % relocInfo::addr_unit() != 0) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   350
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   351
                            "InteriorEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   352
                            "multiple of NOP size\n");
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   353
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   354
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   355
#endif
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   356
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   357
  if (!is_power_of_2(value)) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   358
     CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   359
                             "InteriorEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   360
                             "a power of two\n", InteriorEntryAlignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   361
     return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   362
   }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   363
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   364
  int minimum_alignment = 16;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   365
#if defined(SPARC) || (defined(X86) && !defined(AMD64))
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   366
  minimum_alignment = 4;
42063
dca9294d9f59 8166561: [s390] Adaptions needed for s390 port in C1 and C2.
goetz
parents: 38220
diff changeset
   367
#elif defined(S390)
dca9294d9f59 8166561: [s390] Adaptions needed for s390 port in C1 and C2.
goetz
parents: 38220
diff changeset
   368
  minimum_alignment = 2;
33163
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   369
#endif
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   370
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   371
  if (InteriorEntryAlignment < minimum_alignment) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   372
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   373
                            "InteriorEntryAlignment (" INTX_FORMAT ") must be "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   374
                            "greater than or equal to %d\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   375
                            InteriorEntryAlignment, minimum_alignment);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   376
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   377
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   378
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   379
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   380
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   381
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   382
Flag::Error NodeLimitFudgeFactorConstraintFunc(intx value, bool verbose) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   383
  if (value < MaxNodeLimit * 2 / 100 || value > MaxNodeLimit * 40 / 100) {
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   384
    CommandLineError::print(verbose,
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   385
                            "NodeLimitFudgeFactor must be between 2%% and 40%% "
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   386
                            "of MaxNodeLimit (" INTX_FORMAT ")\n",
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   387
                            MaxNodeLimit);
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   388
    return Flag::VIOLATES_CONSTRAINT;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   389
  }
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   390
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   391
  return Flag::SUCCESS;
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   392
}
9e128b399e48 8078554: Compiler: implement ranges (optionally constraints) for those flags that have them missing
zmajo
parents: 33160
diff changeset
   393
#endif // COMPILER2
46698
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   394
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   395
Flag::Error RTMTotalCountIncrRateConstraintFunc(int value, bool verbose) {
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   396
#if INCLUDE_RTM_OPT
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   397
  if (UseRTMLocking && !is_power_of_2(RTMTotalCountIncrRate)) {
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   398
    CommandLineError::print(verbose,
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   399
                            "RTMTotalCountIncrRate (" INTX_FORMAT
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   400
                            ") must be a power of 2, resetting it to 64\n",
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   401
                            RTMTotalCountIncrRate);
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   402
    FLAG_SET_DEFAULT(RTMTotalCountIncrRate, 64);
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   403
  }
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   404
#endif
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   405
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   406
  return Flag::SUCCESS;
fa625dca9270 8184800: Streamline RTM flag validity testing with generic flag testing support
goetz
parents: 46486
diff changeset
   407
}