src/hotspot/share/gc/shared/jvmFlagConstraintsGC.hpp
author gziemski
Mon, 23 Apr 2018 10:59:39 -0500
changeset 49857 31e07291ae29
parent 49731 src/hotspot/share/gc/shared/commandLineFlagConstraintsGC.hpp@635838cb8b3a
permissions -rw-r--r--
8081519: Split globals.hpp to factor out the Flag class Summary: Factored out Flag out go globals, renamed to JVMFlag Reviewed-by: coleenp, dholmes, kvn
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
/*
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
     2
 * Copyright (c) 2015, 2018, 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
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    25
#ifndef SHARE_GC_SHARED_COMMANDLINEFLAGCONSTRAINTSGC_HPP
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    26
#define SHARE_GC_SHARED_COMMANDLINEFLAGCONSTRAINTSGC_HPP
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    27
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    28
#include "utilities/globalDefinitions.hpp"
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    29
#include "utilities/macros.hpp"
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    30
#if INCLUDE_ALL_GCS
49857
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    31
#include "gc/cms/jvmFlagConstraintsCMS.hpp"
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    32
#include "gc/g1/jvmFlagConstraintsG1.hpp"
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    33
#include "gc/parallel/jvmFlagConstraintsParallel.hpp"
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    34
#endif
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    35
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    36
/*
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    37
 * Here we have GC arguments constraints functions, which are called automatically
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    38
 * whenever flag's value changes. If the constraint fails the function should return
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    39
 * an appropriate error value.
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    40
 */
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    41
49857
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    42
JVMFlag::Error ParallelGCThreadsConstraintFunc(uint value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    43
JVMFlag::Error ConcGCThreadsConstraintFunc(uint value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    44
JVMFlag::Error YoungPLABSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    45
JVMFlag::Error OldPLABSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    46
JVMFlag::Error MinHeapFreeRatioConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    47
JVMFlag::Error MaxHeapFreeRatioConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    48
JVMFlag::Error SoftRefLRUPolicyMSPerMBConstraintFunc(intx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    49
JVMFlag::Error MarkStackSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    50
JVMFlag::Error MinMetaspaceFreeRatioConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    51
JVMFlag::Error MaxMetaspaceFreeRatioConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    52
JVMFlag::Error InitialTenuringThresholdConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    53
JVMFlag::Error MaxTenuringThresholdConstraintFunc(uintx value, bool verbose);
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    54
49857
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    55
JVMFlag::Error MaxGCPauseMillisConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    56
JVMFlag::Error GCPauseIntervalMillisConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    57
JVMFlag::Error InitialBootClassLoaderMetaspaceSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    58
JVMFlag::Error InitialHeapSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    59
JVMFlag::Error MaxHeapSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    60
JVMFlag::Error HeapBaseMinAddressConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    61
JVMFlag::Error NewSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    62
JVMFlag::Error MinTLABSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    63
JVMFlag::Error TLABSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    64
JVMFlag::Error TLABWasteIncrementConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    65
JVMFlag::Error SurvivorRatioConstraintFunc(uintx value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    66
JVMFlag::Error MetaspaceSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    67
JVMFlag::Error MaxMetaspaceSizeConstraintFunc(size_t value, bool verbose);
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    68
JVMFlag::Error SurvivorAlignmentInBytesConstraintFunc(intx value, bool verbose);
31371
311143309e73 8122937: [JEP 245] Validate JVM Command-Line Flag Arguments.
gziemski
parents:
diff changeset
    69
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    70
// Internal
49857
31e07291ae29 8081519: Split globals.hpp to factor out the Flag class
gziemski
parents: 49731
diff changeset
    71
JVMFlag::Error MaxPLABSizeBounds(const char* name, size_t value, bool verbose);
49731
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    72
635838cb8b3a 8201168: Move GC command line constraint functions to GC specific files
stefank
parents: 47216
diff changeset
    73
#endif // SHARE_GC_SHARED_COMMANDLINEFLAGCONSTRAINTSGC_HPP