src/hotspot/share/gc/g1/commandLineFlagConstraintsG1.cpp
author tschatzl
Wed, 18 Apr 2018 11:36:48 +0200
changeset 49803 14518ac8df87
parent 49731 635838cb8b3a
permissions -rw-r--r--
8178105: Switch mark bitmaps during Remark Reviewed-by: sjohanss, sangheki
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     1
/*
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     2
 * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     4
 *
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     7
 * published by the Free Software Foundation.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     8
 *
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    13
 * accompanied this code).
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    14
 *
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    18
 *
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    21
 * questions.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    22
 *
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    23
 */
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    24
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    25
#include "precompiled.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    26
#include "gc/g1/heapRegionBounds.inline.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    27
#include "runtime/commandLineFlagRangeList.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    28
#include "runtime/globals_extension.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    29
#include "utilities/globalDefinitions.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    30
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    31
Flag::Error G1RSetRegionEntriesConstraintFunc(intx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    32
  if (!UseG1GC) return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    33
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    34
  // Default value of G1RSetRegionEntries=0 means will be set ergonomically.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    35
  // Minimum value is 1.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    36
  if (FLAG_IS_CMDLINE(G1RSetRegionEntries) && (value < 1)) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    37
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    38
                            "G1RSetRegionEntries (" INTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    39
                            "greater than or equal to 1\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    40
                            value);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    41
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    42
  } else {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    43
    return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    44
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    45
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    46
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    47
Flag::Error G1RSetSparseRegionEntriesConstraintFunc(intx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    48
  if (!UseG1GC) return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    49
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    50
  // Default value of G1RSetSparseRegionEntries=0 means will be set ergonomically.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    51
  // Minimum value is 1.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    52
  if (FLAG_IS_CMDLINE(G1RSetSparseRegionEntries) && (value < 1)) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    53
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    54
                            "G1RSetSparseRegionEntries (" INTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    55
                            "greater than or equal to 1\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    56
                            value);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    57
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    58
  } else {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    59
    return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    60
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    61
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    62
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    63
Flag::Error G1HeapRegionSizeConstraintFunc(size_t value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    64
  if (!UseG1GC) return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    65
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    66
  // Default value of G1HeapRegionSize=0 means will be set ergonomically.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    67
  if (FLAG_IS_CMDLINE(G1HeapRegionSize) && (value < HeapRegionBounds::min_size())) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    68
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    69
                            "G1HeapRegionSize (" SIZE_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    70
                            "greater than or equal to ergonomic heap region minimum size\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    71
                            value);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    72
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    73
  } else {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    74
    return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    75
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    76
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    77
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    78
Flag::Error G1NewSizePercentConstraintFunc(uintx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    79
  if (!UseG1GC) return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    80
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    81
  if (value > G1MaxNewSizePercent) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    82
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    83
                            "G1NewSizePercent (" UINTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    84
                            "less than or equal to G1MaxNewSizePercent (" UINTX_FORMAT ")\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    85
                            value, G1MaxNewSizePercent);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    86
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    87
  } else {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    88
    return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    89
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    90
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    91
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    92
Flag::Error G1MaxNewSizePercentConstraintFunc(uintx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    93
  if (!UseG1GC) return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    94
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    95
  if (value < G1NewSizePercent) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    96
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    97
                            "G1MaxNewSizePercent (" UINTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    98
                            "greater than or equal to G1NewSizePercent (" UINTX_FORMAT ")\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
    99
                            value, G1NewSizePercent);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   100
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   101
  } else {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   102
    return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   103
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   104
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   105
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   106
Flag::Error MaxGCPauseMillisConstraintFuncG1(uintx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   107
  if (UseG1GC && FLAG_IS_CMDLINE(MaxGCPauseMillis) && (value >= GCPauseIntervalMillis)) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   108
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   109
                            "MaxGCPauseMillis (" UINTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   110
                            "less than GCPauseIntervalMillis (" UINTX_FORMAT ")\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   111
                            value, GCPauseIntervalMillis);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   112
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   113
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   114
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   115
  return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   116
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   117
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   118
Flag::Error GCPauseIntervalMillisConstraintFuncG1(uintx value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   119
  if (UseG1GC) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   120
    if (FLAG_IS_CMDLINE(GCPauseIntervalMillis)) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   121
      if (value < 1) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   122
        CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   123
                                "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   124
                                "greater than or equal to 1\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   125
                                value);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   126
        return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   127
      }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   128
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   129
      if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   130
        CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   131
                                "GCPauseIntervalMillis cannot be set "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   132
                                "without setting MaxGCPauseMillis\n");
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   133
        return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   134
      }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   135
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   136
      if (value <= MaxGCPauseMillis) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   137
        CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   138
                                "GCPauseIntervalMillis (" UINTX_FORMAT ") must be "
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   139
                                "greater than MaxGCPauseMillis (" UINTX_FORMAT ")\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   140
                                value, MaxGCPauseMillis);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   141
        return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   142
      }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   143
    }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   144
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   145
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   146
  return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   147
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   148
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   149
Flag::Error NewSizeConstraintFuncG1(size_t value, bool verbose) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   150
#ifdef _LP64
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   151
  // Overflow would happen for uint type variable of YoungGenSizer::_min_desired_young_length
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   152
  // when the value to be assigned exceeds uint range.
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   153
  // i.e. result of '(uint)(NewSize / region size(1~32MB))'
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   154
  // So maximum of NewSize should be 'max_juint * 1M'
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   155
  if (UseG1GC && (value > (max_juint * 1 * M))) {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   156
    CommandLineError::print(verbose,
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   157
                            "NewSize (" SIZE_FORMAT ") must be less than ergonomic maximum value\n",
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   158
                            value);
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   159
    return Flag::VIOLATES_CONSTRAINT;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   160
  }
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   161
#endif // _LP64
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   162
  return Flag::SUCCESS;
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   163
}
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   164
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   165
size_t MaxSizeForHeapAlignmentG1() {
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   166
  return HeapRegionBounds::max_size();
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents:
diff changeset
   167
}