8243205: Modularize JVM flags declaration

Reviewed-by: kvn, coleenp, stefank
This commit is contained in:
Ioi Lam 2020-12-11 04:18:54 +00:00
parent 8befc3210d
commit 1d15ebe19e
27 changed files with 336 additions and 191 deletions

View file

@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "compiler/compiler_globals.hpp"
#include "gc/shared/barrierSet.hpp" #include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp" #include "gc/shared/barrierSetAssembler.hpp"
#include "interp_masm_aarch64.hpp" #include "interp_masm_aarch64.hpp"

View file

@ -26,6 +26,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "compiler/compiler_globals.hpp"
#include "gc/shared/barrierSetAssembler.hpp" #include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/bytecodeHistogram.hpp" #include "interpreter/bytecodeHistogram.hpp"
#include "interpreter/interpreter.hpp" #include "interpreter/interpreter.hpp"

View file

@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "compiler/compiler_globals.hpp"
#include "interp_masm_x86.hpp" #include "interp_masm_x86.hpp"
#include "interpreter/interpreter.hpp" #include "interpreter/interpreter.hpp"
#include "interpreter/interpreterRuntime.hpp" #include "interpreter/interpreterRuntime.hpp"

View file

@ -26,6 +26,7 @@
#include "jvm.h" #include "jvm.h"
#include "asm/assembler.hpp" #include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp" #include "asm/assembler.inline.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "gc/shared/barrierSet.hpp" #include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp" #include "gc/shared/barrierSetAssembler.hpp"

View file

@ -26,6 +26,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.hpp" #include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp" #include "asm/macroAssembler.inline.hpp"
#include "compiler/compiler_globals.hpp"
#ifdef PRODUCT #ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */ #define BLOCK_COMMENT(str) /* nothing */

View file

@ -25,6 +25,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "asm/macroAssembler.hpp" #include "asm/macroAssembler.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "gc/shared/barrierSetAssembler.hpp" #include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/bytecodeHistogram.hpp" #include "interpreter/bytecodeHistogram.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
#include "ci/ciEnv.hpp" #include "ci/ciEnv.hpp"
#include "ci/ciMethodData.hpp" #include "ci/ciMethodData.hpp"
#include "code/exceptionHandlerTable.hpp" #include "code/exceptionHandlerTable.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerDirectives.hpp" #include "compiler/compilerDirectives.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "runtime/deoptimization.hpp" #include "runtime/deoptimization.hpp"

View file

@ -25,12 +25,9 @@
#ifndef SHARE_C1_C1_GLOBALS_HPP #ifndef SHARE_C1_C1_GLOBALS_HPP
#define SHARE_C1_C1_GLOBALS_HPP #define SHARE_C1_C1_GLOBALS_HPP
#include "c1/c1_globals_pd.hpp"
#include "runtime/globals_shared.hpp" #include "runtime/globals_shared.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include CPU_HEADER(c1_globals)
#include OS_HEADER(c1_globals)
// //
// Declare all global flags used by the client compiler. // Declare all global flags used by the client compiler.
// //
@ -339,4 +336,6 @@
// end of C1_FLAGS // end of C1_FLAGS
DECLARE_FLAGS(C1_FLAGS)
#endif // SHARE_C1_C1_GLOBALS_HPP #endif // SHARE_C1_C1_GLOBALS_HPP

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_C1_C1_GLOBALS_PD_HPP
#define SHARE_C1_C1_GLOBALS_PD_HPP
#include "runtime/globals_shared.hpp"
#include "utilities/macros.hpp"
#include CPU_HEADER(c1_globals)
#include OS_HEADER(c1_globals)
#endif // SHARE_C1_C1_GLOBALS_PD_HPP

View file

@ -27,6 +27,7 @@
#include "code/debugInfoRec.hpp" #include "code/debugInfoRec.hpp"
#include "code/pcDesc.hpp" #include "code/pcDesc.hpp"
#include "code/scopeDesc.hpp" #include "code/scopeDesc.hpp"
#include "compiler/compiler_globals.hpp"
#include "memory/resourceArea.hpp" #include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp" #include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp" #include "runtime/handles.inline.hpp"

View file

@ -28,6 +28,7 @@
#include "classfile/vmIntrinsics.hpp" #include "classfile/vmIntrinsics.hpp"
#include "ci/ciMetadata.hpp" #include "ci/ciMetadata.hpp"
#include "ci/ciMethod.hpp" #include "ci/ciMethod.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/methodMatcher.hpp" #include "compiler/methodMatcher.hpp"
#include "compiler/compilerOracle.hpp" #include "compiler/compilerOracle.hpp"
#include "utilities/exceptions.hpp" #include "utilities/exceptions.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,44 +36,4 @@
#include "jvmci/jvmci_globals.hpp" #include "jvmci/jvmci_globals.hpp"
#endif #endif
#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
define_pd_global(bool, BackgroundCompilation, false);
define_pd_global(bool, CICompileOSR, false);
define_pd_global(bool, UseTypeProfile, false);
define_pd_global(bool, UseOnStackReplacement, false);
define_pd_global(bool, InlineIntrinsics, false);
define_pd_global(bool, PreferInterpreterNativeStubs, true);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 0);
define_pd_global(intx, OnStackReplacePercentage, 0);
define_pd_global(size_t, NewSizeThreadIncrease, 4*K);
define_pd_global(bool, InlineClassNatives, true);
define_pd_global(bool, InlineUnsafeOps, true);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 0);
define_pd_global(uintx, ProfiledCodeHeapSize, 0);
define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K);
define_pd_global(size_t, MetaspaceSize, ScaleForWordSize(4*M));
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
#define CI_COMPILER_COUNT 0
#else
#if COMPILER2_OR_JVMCI
#define CI_COMPILER_COUNT 2
#else
#define CI_COMPILER_COUNT 1
#endif // COMPILER2_OR_JVMCI
#endif // no compilers
#endif // SHARE_COMPILER_COMPILER_GLOBALS_HPP #endif // SHARE_COMPILER_COMPILER_GLOBALS_HPP

View file

@ -0,0 +1,87 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_COMPILER_COMPILER_GLOBALS_PD_HPP
#define SHARE_COMPILER_COMPILER_GLOBALS_PD_HPP
// Platform-specific Default values for VM flags used by the compiler.
//
// Note: for historical reasons, some of these flags are declared in globals.hpp.
// E.g., BackgroundCompilation. Such declarations should be moved to this
// file instead.
#include "runtime/globals_shared.hpp"
#ifdef COMPILER1
#include "c1/c1_globals_pd.hpp"
#endif // COMPILER1
#ifdef COMPILER2
#include "opto/c2_globals_pd.hpp"
#endif // COMPILER2
// JVMCI has no platform-specific global definitions
//#if INCLUDE_JVMCI
//#include "jvmci/jvmci_globals_pd.hpp"
//#endif
#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
define_pd_global(bool, BackgroundCompilation, false);
define_pd_global(bool, CICompileOSR, false);
define_pd_global(bool, UseTypeProfile, false);
define_pd_global(bool, UseOnStackReplacement, false);
define_pd_global(bool, InlineIntrinsics, false);
define_pd_global(bool, PreferInterpreterNativeStubs, true);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 0);
define_pd_global(intx, OnStackReplacePercentage, 0);
define_pd_global(size_t, NewSizeThreadIncrease, 4*K);
define_pd_global(bool, InlineClassNatives, true);
define_pd_global(bool, InlineUnsafeOps, true);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 0);
define_pd_global(uintx, ProfiledCodeHeapSize, 0);
define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K);
define_pd_global(size_t, MetaspaceSize, ScaleForWordSize(4*M));
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
#define CI_COMPILER_COUNT 0
#else
#if COMPILER2_OR_JVMCI
#define CI_COMPILER_COUNT 2
#else
#define CI_COMPILER_COUNT 1
#endif // COMPILER2_OR_JVMCI
#endif // no compilers
#endif // SHARE_COMPILER_COMPILER_GLOBALS_PD_HPP

View file

@ -739,4 +739,6 @@
// end of GC_FLAGS // end of GC_FLAGS
DECLARE_FLAGS(GC_FLAGS)
#endif // SHARE_GC_SHARED_GC_GLOBALS_HPP #endif // SHARE_GC_SHARED_GC_GLOBALS_HPP

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,6 +24,7 @@
#ifndef SHARE_JVMCI_JVMCI_HPP #ifndef SHARE_JVMCI_JVMCI_HPP
#define SHARE_JVMCI_JVMCI_HPP #define SHARE_JVMCI_JVMCI_HPP
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerDefinitions.hpp" #include "compiler/compilerDefinitions.hpp"
#include "utilities/events.hpp" #include "utilities/events.hpp"
#include "utilities/exceptions.hpp" #include "utilities/exceptions.hpp"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,7 @@
#define SHARE_JVMCI_JVMCICOMPILER_HPP #define SHARE_JVMCI_JVMCICOMPILER_HPP
#include "compiler/abstractCompiler.hpp" #include "compiler/abstractCompiler.hpp"
#include "compiler/compiler_globals.hpp"
#include "runtime/atomic.hpp" #include "runtime/atomic.hpp"
class JVMCICompiler : public AbstractCompiler { class JVMCICompiler : public AbstractCompiler {

View file

@ -25,6 +25,7 @@
#ifndef SHARE_JVMCI_JVMCI_GLOBALS_HPP #ifndef SHARE_JVMCI_JVMCI_GLOBALS_HPP
#define SHARE_JVMCI_JVMCI_GLOBALS_HPP #define SHARE_JVMCI_JVMCI_GLOBALS_HPP
#include "runtime/globals_shared.hpp"
#include "utilities/vmEnums.hpp" #include "utilities/vmEnums.hpp"
class fileStream; class fileStream;
@ -139,6 +140,8 @@ class fileStream;
// end of JVMCI_FLAGS // end of JVMCI_FLAGS
DECLARE_FLAGS(JVMCI_FLAGS)
// The base name for the shared library containing the JVMCI based compiler // The base name for the shared library containing the JVMCI based compiler
#define JVMCI_SHARED_LIBRARY_NAME "jvmcicompiler" #define JVMCI_SHARED_LIBRARY_NAME "jvmcicompiler"

View file

@ -25,12 +25,10 @@
#ifndef SHARE_OPTO_C2_GLOBALS_HPP #ifndef SHARE_OPTO_C2_GLOBALS_HPP
#define SHARE_OPTO_C2_GLOBALS_HPP #define SHARE_OPTO_C2_GLOBALS_HPP
#include "opto/c2_globals_pd.hpp"
#include "runtime/globals_shared.hpp" #include "runtime/globals_shared.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
#include CPU_HEADER(c2_globals)
#include OS_HEADER(c2_globals)
// //
// Defines all globals flags used by the server compiler. // Defines all globals flags used by the server compiler.
// //
@ -807,4 +805,6 @@
// end of C2_FLAGS // end of C2_FLAGS
DECLARE_FLAGS(C2_FLAGS)
#endif // SHARE_OPTO_C2_GLOBALS_HPP #endif // SHARE_OPTO_C2_GLOBALS_HPP

View file

@ -0,0 +1,34 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_OPTO_C2_GLOBALS_PD_HPP
#define SHARE_OPTO_C2_GLOBALS_PD_HPP
#include "runtime/globals_shared.hpp"
#include "utilities/macros.hpp"
#include CPU_HEADER(c2_globals)
#include OS_HEADER(c2_globals)
#endif // SHARE_OPTO_C2_GLOBALS_PD_HPP

View file

@ -28,6 +28,7 @@
#include "asm/codeBuffer.hpp" #include "asm/codeBuffer.hpp"
#include "ci/compilerInterface.hpp" #include "ci/compilerInterface.hpp"
#include "code/debugInfoRec.hpp" #include "code/debugInfoRec.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerOracle.hpp" #include "compiler/compilerOracle.hpp"
#include "compiler/compileBroker.hpp" #include "compiler/compileBroker.hpp"
#include "compiler/compilerEvent.hpp" #include "compiler/compilerEvent.hpp"

View file

@ -26,8 +26,8 @@
#ifndef SHARE_RUNTIME_ESCAPEBARRIER_HPP #ifndef SHARE_RUNTIME_ESCAPEBARRIER_HPP
#define SHARE_RUNTIME_ESCAPEBARRIER_HPP #define SHARE_RUNTIME_ESCAPEBARRIER_HPP
#include "compiler/compiler_globals.hpp"
#include "memory/allocation.hpp" #include "memory/allocation.hpp"
#include "runtime/globals.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
class JavaThread; class JavaThread;

View file

@ -0,0 +1,120 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_RUNTIME_FLAGS_ALLFLAGS_HPP
#define SHARE_RUNTIME_FLAGS_ALLFLAGS_HPP
#include "compiler/compiler_globals.hpp"
#include "runtime/globals.hpp"
// Put the LP64/JVMCI/COMPILER1/COMPILER1/ARCH at
// the top, as they are processed by jvmFlags.cpp in that
// order.
#define ALL_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
LP64_RUNTIME_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
JVMCI_ONLY(JVMCI_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
COMPILER1_PRESENT(C1_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
COMPILER2_PRESENT(C2_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
ARCH_FLAGS( \
develop, \
product, \
notproduct, \
range, \
constraint) \
\
RUNTIME_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
RUNTIME_OS_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
GC_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)
#define ALL_CONSTRAINTS(f) \
COMPILER_CONSTRAINTS(f) \
RUNTIME_CONSTRAINTS(f) \
GC_CONSTRAINTS(f)
#endif // SHARE_RUNTIME_FLAGS_ALLFLAGS_HPP

View file

@ -23,20 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "jfr/jfrEvents.hpp" #include "runtime/flags/allFlags.hpp"
#include "jvm.h"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/arguments.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
#include "runtime/globals_shared.hpp"
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/macros.hpp"
#include "utilities/ostream.hpp"
#include "utilities/stringUtils.hpp"
// Implementation macros // Implementation macros
#define MATERIALIZE_PRODUCT_FLAG(type, name, value, ...) type name = value; #define MATERIALIZE_PRODUCT_FLAG(type, name, value, ...) type name = value;

View file

@ -25,7 +25,7 @@
#ifndef SHARE_RUNTIME_GLOBALS_HPP #ifndef SHARE_RUNTIME_GLOBALS_HPP
#define SHARE_RUNTIME_GLOBALS_HPP #define SHARE_RUNTIME_GLOBALS_HPP
#include "compiler/compiler_globals.hpp" #include "compiler/compiler_globals_pd.hpp"
#include "gc/shared/gc_globals.hpp" #include "gc/shared/gc_globals.hpp"
#include "runtime/globals_shared.hpp" #include "runtime/globals_shared.hpp"
#include "utilities/align.hpp" #include "utilities/align.hpp"
@ -2496,25 +2496,9 @@ const intx ObjectAlignmentInBytes = 8;
// end of RUNTIME_FLAGS // end of RUNTIME_FLAGS
// Interface macros DECLARE_FLAGS(LP64_RUNTIME_FLAGS)
#define DECLARE_PRODUCT_FLAG(type, name, value, ...) extern "C" type name; DECLARE_ARCH_FLAGS(ARCH_FLAGS)
#define DECLARE_PD_PRODUCT_FLAG(type, name, ...) extern "C" type name; DECLARE_FLAGS(RUNTIME_FLAGS)
#ifdef PRODUCT DECLARE_FLAGS(RUNTIME_OS_FLAGS)
#define DECLARE_DEVELOPER_FLAG(type, name, value, ...) const type name = value;
#define DECLARE_PD_DEVELOPER_FLAG(type, name, ...) const type name = pd_##name;
#define DECLARE_NOTPRODUCT_FLAG(type, name, value, ...) const type name = value;
#else
#define DECLARE_DEVELOPER_FLAG(type, name, value, ...) extern "C" type name;
#define DECLARE_PD_DEVELOPER_FLAG(type, name, ...) extern "C" type name;
#define DECLARE_NOTPRODUCT_FLAG(type, name, value, ...) extern "C" type name;
#endif // PRODUCT
ALL_FLAGS(DECLARE_DEVELOPER_FLAG,
DECLARE_PD_DEVELOPER_FLAG,
DECLARE_PRODUCT_FLAG,
DECLARE_PD_PRODUCT_FLAG,
DECLARE_NOTPRODUCT_FLAG,
IGNORE_RANGE,
IGNORE_CONSTRAINT)
#endif // SHARE_RUNTIME_GLOBALS_HPP #endif // SHARE_RUNTIME_GLOBALS_HPP

View file

@ -25,9 +25,9 @@
#ifndef SHARE_RUNTIME_GLOBALS_EXTENSION_HPP #ifndef SHARE_RUNTIME_GLOBALS_EXTENSION_HPP
#define SHARE_RUNTIME_GLOBALS_EXTENSION_HPP #define SHARE_RUNTIME_GLOBALS_EXTENSION_HPP
#include "runtime/flags/allFlags.hpp"
#include "runtime/flags/jvmFlag.hpp" #include "runtime/flags/jvmFlag.hpp"
#include "runtime/flags/jvmFlagAccess.hpp" #include "runtime/flags/jvmFlagAccess.hpp"
#include "runtime/globals.hpp"
#include "utilities/macros.hpp" #include "utilities/macros.hpp"
// Construct enum of Flag_<cmdline-arg> constants. // Construct enum of Flag_<cmdline-arg> constants.

View file

@ -79,110 +79,32 @@
#define IGNORE_FLAG(...) #define IGNORE_FLAG(...)
#define VM_FLAGS( \ #define DECLARE_PRODUCT_FLAG(type, name, value, ...) extern "C" type name;
develop, \ #define DECLARE_PD_PRODUCT_FLAG(type, name, ...) extern "C" type name;
develop_pd, \ #ifdef PRODUCT
product, \ #define DECLARE_DEVELOPER_FLAG(type, name, value, ...) const type name = value;
product_pd, \ #define DECLARE_PD_DEVELOPER_FLAG(type, name, ...) const type name = pd_##name;
notproduct, \ #define DECLARE_NOTPRODUCT_FLAG(type, name, value, ...) const type name = value;
range, \ #else
constraint) \ #define DECLARE_DEVELOPER_FLAG(type, name, value, ...) extern "C" type name;
\ #define DECLARE_PD_DEVELOPER_FLAG(type, name, ...) extern "C" type name;
RUNTIME_FLAGS( \ #define DECLARE_NOTPRODUCT_FLAG(type, name, value, ...) extern "C" type name;
develop, \ #endif // PRODUCT
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
GC_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
// Put the LP64/JVMCI/COMPILER1/COMPILER1/ARCH at #define DECLARE_FLAGS(flag_group) \
// the top, as they are processed by jvmFlags.cpp in that flag_group(DECLARE_DEVELOPER_FLAG, \
// order. DECLARE_PD_DEVELOPER_FLAG, \
DECLARE_PRODUCT_FLAG, \
DECLARE_PD_PRODUCT_FLAG, \
DECLARE_NOTPRODUCT_FLAG, \
IGNORE_RANGE, \
IGNORE_CONSTRAINT)
#define ALL_FLAGS( \ #define DECLARE_ARCH_FLAGS(flag_group) \
develop, \ flag_group(DECLARE_DEVELOPER_FLAG, \
develop_pd, \ DECLARE_PRODUCT_FLAG, \
product, \ DECLARE_NOTPRODUCT_FLAG, \
product_pd, \ IGNORE_RANGE, \
notproduct, \ IGNORE_CONSTRAINT)
range, \
constraint) \
\
LP64_RUNTIME_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
JVMCI_ONLY(JVMCI_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
COMPILER1_PRESENT(C1_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
COMPILER2_PRESENT(C2_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)) \
\
ARCH_FLAGS( \
develop, \
product, \
notproduct, \
range, \
constraint) \
\
VM_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint) \
\
RUNTIME_OS_FLAGS( \
develop, \
develop_pd, \
product, \
product_pd, \
notproduct, \
range, \
constraint)
#define ALL_CONSTRAINTS(f) \
COMPILER_CONSTRAINTS(f) \
RUNTIME_CONSTRAINTS(f) \
GC_CONSTRAINTS(f)
#endif // SHARE_RUNTIME_GLOBALS_SHARED_HPP #endif // SHARE_RUNTIME_GLOBALS_SHARED_HPP

View file

@ -26,6 +26,7 @@
#include "classfile/stringTable.hpp" #include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"
#include "code/icBuffer.hpp" #include "code/icBuffer.hpp"
#include "compiler/compiler_globals.hpp"
#include "gc/shared/collectedHeap.hpp" #include "gc/shared/collectedHeap.hpp"
#if INCLUDE_JVMCI #if INCLUDE_JVMCI
#include "jvmci/jvmci.hpp" #include "jvmci/jvmci.hpp"