1 /*
   2  * Copyright (c) 1997, 2018, 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  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "jvm.h"
  27 #include "memory/allocation.inline.hpp"
  28 #include "oops/oop.inline.hpp"
  29 #include "runtime/arguments.hpp"
  30 #include "runtime/globals.hpp"
  31 #include "runtime/globals_extension.hpp"
  32 #include "runtime/flags/jvmFlagConstraintList.hpp"
  33 #include "runtime/flags/jvmFlagWriteableList.hpp"
  34 #include "runtime/os.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 #include "trace/tracing.hpp"
  37 #include "utilities/defaultStream.hpp"
  38 #include "utilities/macros.hpp"
  39 #include "utilities/ostream.hpp"
  40 #include "utilities/stringUtils.hpp"
  41 #ifdef COMPILER1
  42 #include "c1/c1_globals.hpp"
  43 #endif
  44 #if INCLUDE_JVMCI
  45 #include "jvmci/jvmci_globals.hpp"
  46 #endif
  47 #ifdef COMPILER2
  48 #include "opto/c2_globals.hpp"
  49 #endif
  50 
  51 VM_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
  52          MATERIALIZE_PD_DEVELOPER_FLAG, \
  53          MATERIALIZE_PRODUCT_FLAG, \
  54          MATERIALIZE_PD_PRODUCT_FLAG, \
  55          MATERIALIZE_DIAGNOSTIC_FLAG, \
  56          MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
  57          MATERIALIZE_EXPERIMENTAL_FLAG, \
  58          MATERIALIZE_NOTPRODUCT_FLAG, \
  59          MATERIALIZE_MANAGEABLE_FLAG, \
  60          MATERIALIZE_PRODUCT_RW_FLAG, \
  61          MATERIALIZE_LP64_PRODUCT_FLAG, \
  62          IGNORE_RANGE, \
  63          IGNORE_CONSTRAINT, \
  64          IGNORE_WRITEABLE)
  65 
  66 RUNTIME_OS_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
  67                  MATERIALIZE_PD_DEVELOPER_FLAG, \
  68                  MATERIALIZE_PRODUCT_FLAG, \
  69                  MATERIALIZE_PD_PRODUCT_FLAG, \
  70                  MATERIALIZE_DIAGNOSTIC_FLAG, \
  71                  MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
  72                  MATERIALIZE_NOTPRODUCT_FLAG, \
  73                  IGNORE_RANGE, \
  74                  IGNORE_CONSTRAINT, \
  75                  IGNORE_WRITEABLE)
  76 
  77 ARCH_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
  78            MATERIALIZE_PRODUCT_FLAG, \
  79            MATERIALIZE_DIAGNOSTIC_FLAG, \
  80            MATERIALIZE_EXPERIMENTAL_FLAG, \
  81            MATERIALIZE_NOTPRODUCT_FLAG, \
  82            IGNORE_RANGE, \
  83            IGNORE_CONSTRAINT, \
  84            IGNORE_WRITEABLE)
  85 
  86 MATERIALIZE_FLAGS_EXT