< prev index next >

src/hotspot/share/gc/g1/jvmFlagConstraintsG1.cpp

Print this page


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/g1/heapRegionBounds.inline.hpp"
  27 #include "gc/g1/jvmFlagConstraintsG1.hpp"
  28 #include "runtime/globals_extension.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 JVMFlag::Error G1RSetRegionEntriesConstraintFunc(intx value, bool verbose) {
  32   if (!UseG1GC) return JVMFlag::SUCCESS;
  33 
  34   // Default value of G1RSetRegionEntries=0 means will be set ergonomically.
  35   // Minimum value is 1.
  36   if (FLAG_IS_CMDLINE(G1RSetRegionEntries) && (value < 1)) {
  37     JVMFlag::printError(verbose,
  38                         "G1RSetRegionEntries (" INTX_FORMAT ") must be "
  39                         "greater than or equal to 1\n",
  40                         value);
  41     return JVMFlag::VIOLATES_CONSTRAINT;
  42   } else {
  43     return JVMFlag::SUCCESS;
  44   }
  45 }
  46 
  47 JVMFlag::Error G1RSetSparseRegionEntriesConstraintFunc(intx value, bool verbose) {
  48   if (!UseG1GC) return JVMFlag::SUCCESS;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/g1/heapRegionBounds.inline.hpp"
  27 #include "gc/g1/jvmFlagConstraintsG1.hpp"
  28 #include "runtime/globals.hpp"
  29 #include "utilities/globalDefinitions.hpp"
  30 
  31 JVMFlag::Error G1RSetRegionEntriesConstraintFunc(intx value, bool verbose) {
  32   if (!UseG1GC) return JVMFlag::SUCCESS;
  33 
  34   // Default value of G1RSetRegionEntries=0 means will be set ergonomically.
  35   // Minimum value is 1.
  36   if (FLAG_IS_CMDLINE(G1RSetRegionEntries) && (value < 1)) {
  37     JVMFlag::printError(verbose,
  38                         "G1RSetRegionEntries (" INTX_FORMAT ") must be "
  39                         "greater than or equal to 1\n",
  40                         value);
  41     return JVMFlag::VIOLATES_CONSTRAINT;
  42   } else {
  43     return JVMFlag::SUCCESS;
  44   }
  45 }
  46 
  47 JVMFlag::Error G1RSetSparseRegionEntriesConstraintFunc(intx value, bool verbose) {
  48   if (!UseG1GC) return JVMFlag::SUCCESS;


< prev index next >