< prev index next >

src/hotspot/share/runtime/globals.hpp

Print this page
   1 /*
   2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   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  *


  87 // product_rw flags are writeable internal product flags.
  88 //    They are like "manageable" flags but for internal/private use.
  89 //    The list of product_rw flags are internal/private flags which
  90 //    may be changed/removed in a future release.  It can be set
  91 //    through the management interface to get/set value
  92 //    when the name of flag is supplied.
  93 //
  94 //    A flag can be made as "product_rw" only if
  95 //    - the VM implementation supports dynamic setting of the flag.
  96 //      This implies that the VM must *always* query the flag variable
  97 //      and not reuse state related to the flag state at any given time.
  98 //
  99 // Note that when there is a need to support develop flags to be writeable,
 100 // it can be done in the same way as product_rw.
 101 //
 102 // range is a macro that will expand to min and max arguments for range
 103 //    checking code if provided - see jvmFlagRangeList.hpp
 104 //
 105 // constraint is a macro that will expand to custom function call
 106 //    for constraint checking if provided - see jvmFlagConstraintList.hpp
 107 //
 108 // writeable is a macro that controls if and how the value can change during the runtime
 109 //
 110 // writeable(Always) is optional and allows the flag to have its value changed
 111 //    without any limitations at any time
 112 //
 113 // writeable(Once) flag value's can be only set once during the lifetime of VM
 114 //
 115 // writeable(CommandLineOnly) flag value's can be only set from command line
 116 //    (multiple times allowed)
 117 //
 118 
 119 // Default and minimum StringTable and SymbolTable size values
 120 // Must be powers of 2
 121 const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
 122 const size_t minimumStringTableSize = 128;
 123 const size_t defaultSymbolTableSize = 32768; // 2^15
 124 const size_t minimumSymbolTableSize = 1024;
 125 
 126 #define RUNTIME_FLAGS(develop, \
 127                       develop_pd, \
 128                       product, \
 129                       product_pd, \
 130                       diagnostic, \
 131                       diagnostic_pd, \
 132                       experimental, \
 133                       notproduct, \
 134                       manageable, \
 135                       product_rw, \
 136                       lp64_product, \
 137                       range, \
 138                       constraint, \
 139                       writeable) \
 140                                                                             \
 141   lp64_product(bool, UseCompressedOops, false,                              \
 142           "Use 32-bit object references in 64-bit VM. "                     \
 143           "lp64_product means flag is always constant in 32 bit VM")        \
 144                                                                             \
 145   lp64_product(bool, UseCompressedClassPointers, false,                     \
 146           "Use 32-bit class pointers in 64-bit VM. "                        \
 147           "lp64_product means flag is always constant in 32 bit VM")        \
 148                                                                             \
 149   notproduct(bool, CheckCompressedOops, true,                               \
 150           "Generate checks in encoding/decoding code in debug VM")          \
 151                                                                             \
 152   product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17),                        \
 153           "Heap allocation steps through preferred address regions to find" \
 154           " where it can allocate the heap. Number of steps to take per "   \
 155           "region.")                                                        \
 156           range(1, max_uintx)                                               \
 157                                                                             \
 158   lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
 159           "Default object alignment in bytes, 8 is minimum")                \


2531 #endif // PRODUCT
2532 // Special LP64 flags, product only needed for now.
2533 #ifdef _LP64
2534 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
2535 #else
2536 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) const type name = value;
2537 #endif // _LP64
2538 
2539 ALL_FLAGS(DECLARE_DEVELOPER_FLAG,     \
2540           DECLARE_PD_DEVELOPER_FLAG,  \
2541           DECLARE_PRODUCT_FLAG,       \
2542           DECLARE_PD_PRODUCT_FLAG,    \
2543           DECLARE_DIAGNOSTIC_FLAG,    \
2544           DECLARE_PD_DIAGNOSTIC_FLAG, \
2545           DECLARE_EXPERIMENTAL_FLAG,  \
2546           DECLARE_NOTPRODUCT_FLAG,    \
2547           DECLARE_MANAGEABLE_FLAG,    \
2548           DECLARE_PRODUCT_RW_FLAG,    \
2549           DECLARE_LP64_PRODUCT_FLAG,  \
2550           IGNORE_RANGE,               \
2551           IGNORE_CONSTRAINT,          \
2552           IGNORE_WRITEABLE)
2553 
2554 #endif // SHARE_RUNTIME_GLOBALS_HPP
   1 /*
   2  * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   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  *


  87 // product_rw flags are writeable internal product flags.
  88 //    They are like "manageable" flags but for internal/private use.
  89 //    The list of product_rw flags are internal/private flags which
  90 //    may be changed/removed in a future release.  It can be set
  91 //    through the management interface to get/set value
  92 //    when the name of flag is supplied.
  93 //
  94 //    A flag can be made as "product_rw" only if
  95 //    - the VM implementation supports dynamic setting of the flag.
  96 //      This implies that the VM must *always* query the flag variable
  97 //      and not reuse state related to the flag state at any given time.
  98 //
  99 // Note that when there is a need to support develop flags to be writeable,
 100 // it can be done in the same way as product_rw.
 101 //
 102 // range is a macro that will expand to min and max arguments for range
 103 //    checking code if provided - see jvmFlagRangeList.hpp
 104 //
 105 // constraint is a macro that will expand to custom function call
 106 //    for constraint checking if provided - see jvmFlagConstraintList.hpp











 107 
 108 // Default and minimum StringTable and SymbolTable size values
 109 // Must be powers of 2
 110 const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
 111 const size_t minimumStringTableSize = 128;
 112 const size_t defaultSymbolTableSize = 32768; // 2^15
 113 const size_t minimumSymbolTableSize = 1024;
 114 
 115 #define RUNTIME_FLAGS(develop, \
 116                       develop_pd, \
 117                       product, \
 118                       product_pd, \
 119                       diagnostic, \
 120                       diagnostic_pd, \
 121                       experimental, \
 122                       notproduct, \
 123                       manageable, \
 124                       product_rw, \
 125                       lp64_product, \
 126                       range, \
 127                       constraint) \

 128                                                                             \
 129   lp64_product(bool, UseCompressedOops, false,                              \
 130           "Use 32-bit object references in 64-bit VM. "                     \
 131           "lp64_product means flag is always constant in 32 bit VM")        \
 132                                                                             \
 133   lp64_product(bool, UseCompressedClassPointers, false,                     \
 134           "Use 32-bit class pointers in 64-bit VM. "                        \
 135           "lp64_product means flag is always constant in 32 bit VM")        \
 136                                                                             \
 137   notproduct(bool, CheckCompressedOops, true,                               \
 138           "Generate checks in encoding/decoding code in debug VM")          \
 139                                                                             \
 140   product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17),                        \
 141           "Heap allocation steps through preferred address regions to find" \
 142           " where it can allocate the heap. Number of steps to take per "   \
 143           "region.")                                                        \
 144           range(1, max_uintx)                                               \
 145                                                                             \
 146   lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
 147           "Default object alignment in bytes, 8 is minimum")                \


2519 #endif // PRODUCT
2520 // Special LP64 flags, product only needed for now.
2521 #ifdef _LP64
2522 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
2523 #else
2524 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) const type name = value;
2525 #endif // _LP64
2526 
2527 ALL_FLAGS(DECLARE_DEVELOPER_FLAG,     \
2528           DECLARE_PD_DEVELOPER_FLAG,  \
2529           DECLARE_PRODUCT_FLAG,       \
2530           DECLARE_PD_PRODUCT_FLAG,    \
2531           DECLARE_DIAGNOSTIC_FLAG,    \
2532           DECLARE_PD_DIAGNOSTIC_FLAG, \
2533           DECLARE_EXPERIMENTAL_FLAG,  \
2534           DECLARE_NOTPRODUCT_FLAG,    \
2535           DECLARE_MANAGEABLE_FLAG,    \
2536           DECLARE_PRODUCT_RW_FLAG,    \
2537           DECLARE_LP64_PRODUCT_FLAG,  \
2538           IGNORE_RANGE,               \
2539           IGNORE_CONSTRAINT)

2540 
2541 #endif // SHARE_RUNTIME_GLOBALS_HPP
< prev index next >