8293046: Move CDS command-line flags to cds_globals.hpp
Reviewed-by: dholmes, ccheung, coleenp
This commit is contained in:
parent
372fc58e89
commit
12317ef7d0
101
src/hotspot/share/cds/cds_globals.hpp
Normal file
101
src/hotspot/share/cds/cds_globals.hpp
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright (c) 2022, 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 SHARED_CDS_CDS_GLOBALS_HPP
|
||||
#define SHARED_CDS_CDS_GLOBALS_HPP
|
||||
|
||||
#include "runtime/globals_shared.hpp"
|
||||
|
||||
//
|
||||
// Defines all globals flags used by CDS.
|
||||
//
|
||||
|
||||
#define CDS_FLAGS(develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
product_pd, \
|
||||
notproduct, \
|
||||
range, \
|
||||
constraint) \
|
||||
/* Shared spaces */ \
|
||||
\
|
||||
product(bool, VerifySharedSpaces, false, \
|
||||
"Verify integrity of shared spaces") \
|
||||
\
|
||||
product(bool, RecordDynamicDumpInfo, false, \
|
||||
"Record class info for jcmd VM.cds dynamic_dump") \
|
||||
\
|
||||
product(bool, AutoCreateSharedArchive, false, \
|
||||
"Create shared archive at exit if cds mapping failed") \
|
||||
\
|
||||
product(bool, PrintSharedArchiveAndExit, false, \
|
||||
"Print shared archive file contents") \
|
||||
\
|
||||
product(bool, PrintSharedDictionary, false, \
|
||||
"If PrintSharedArchiveAndExit is true, also print the shared " \
|
||||
"dictionary") \
|
||||
\
|
||||
product(size_t, SharedBaseAddress, LP64_ONLY(32*G) \
|
||||
NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
|
||||
"Address to allocate shared memory region for class data") \
|
||||
range(0, SIZE_MAX) \
|
||||
\
|
||||
product(ccstr, SharedArchiveConfigFile, NULL, \
|
||||
"Data to add to the CDS archive file") \
|
||||
\
|
||||
product(uint, SharedSymbolTableBucketSize, 4, \
|
||||
"Average number of symbols per bucket in shared table") \
|
||||
range(2, 246) \
|
||||
\
|
||||
product(bool, AllowArchivingWithJavaAgent, false, DIAGNOSTIC, \
|
||||
"Allow Java agent to be run with CDS dumping") \
|
||||
\
|
||||
product(ccstr, DumpLoadedClassList, NULL, \
|
||||
"Dump the names all loaded classes, that could be stored into " \
|
||||
"the CDS archive, in the specified file") \
|
||||
\
|
||||
product(ccstr, SharedClassListFile, NULL, \
|
||||
"Override the default CDS class list") \
|
||||
\
|
||||
product(ccstr, SharedArchiveFile, NULL, \
|
||||
"Override the default location of the CDS archive file") \
|
||||
\
|
||||
product(ccstr, ArchiveClassesAtExit, NULL, \
|
||||
"The path and name of the dynamic archive file") \
|
||||
\
|
||||
product(ccstr, ExtraSharedClassListFile, NULL, \
|
||||
"Extra classlist for building the CDS archive file") \
|
||||
\
|
||||
product(int, ArchiveRelocationMode, 0, DIAGNOSTIC, \
|
||||
"(0) first map at preferred address, and if " \
|
||||
"unsuccessful, map at alternative address (default); " \
|
||||
"(1) always map at alternative address; " \
|
||||
"(2) always map at preferred address, and if unsuccessful, " \
|
||||
"do not map the archive") \
|
||||
range(0, 2) \
|
||||
// end of CDS_FLAGS
|
||||
|
||||
DECLARE_FLAGS(CDS_FLAGS)
|
||||
|
||||
#endif // SHARED_CDS_CDS_GLOBALS_HPP
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/classListWriter.hpp"
|
||||
#include "classfile/classFileStream.hpp"
|
||||
#include "classfile/classLoader.hpp"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "jvm.h"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/archiveUtils.inline.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/dynamicArchive.hpp"
|
||||
#include "cds/lambdaFormInvokers.hpp"
|
||||
#include "cds/metaspaceShared.hpp"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "jvm.h"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/archiveUtils.inline.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/dynamicArchive.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "cds/heapShared.inline.hpp"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm_io.h"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/cdsProtectionDomain.hpp"
|
||||
#include "cds/classListWriter.hpp"
|
||||
#include "cds/classListParser.hpp"
|
||||
|
@ -25,11 +25,12 @@
|
||||
#ifndef SHARED_CDS_SHAREDCLASSINFO_HPP
|
||||
#define SHARED_CDS_SHAREDCLASSINFO_HPP
|
||||
|
||||
#include "classfile/compactHashtable.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/archiveUtils.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/metaspaceShared.hpp"
|
||||
#include "classfile/compactHashtable.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "memory/metaspaceClosure.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "prims/jvmtiExport.hpp"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "jimage.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "classfile/classFileStream.hpp"
|
||||
#include "classfile/classLoader.inline.hpp"
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "cds/heapShared.hpp"
|
||||
#include "classfile/classFileParser.hpp"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "cds/archiveBuilder.hpp"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/heapShared.inline.hpp"
|
||||
#include "classfile/compactHashtable.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, 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
|
||||
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_CLASSFILE_COMPACTHASHTABLE_HPP
|
||||
#define SHARE_CLASSFILE_COMPACTHASHTABLE_HPP
|
||||
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "oops/array.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
|
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
|
||||
#define SHARE_CLASSFILE_SYSTEMDICTIONARYSHARED_HPP
|
||||
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "cds/dumpTimeClassInfo.hpp"
|
||||
#include "cds/lambdaProxyClassDictionary.hpp"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/filemap.hpp"
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/javaAssertions.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2022, 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
|
||||
@ -25,6 +25,7 @@
|
||||
#ifndef SHARE_RUNTIME_FLAGS_ALLFLAGS_HPP
|
||||
#define SHARE_RUNTIME_FLAGS_ALLFLAGS_HPP
|
||||
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "compiler/compiler_globals.hpp"
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
#include "gc/shared/tlab_globals.hpp"
|
||||
@ -59,6 +60,15 @@
|
||||
range, \
|
||||
constraint) \
|
||||
\
|
||||
CDS_FLAGS( \
|
||||
develop, \
|
||||
develop_pd, \
|
||||
product, \
|
||||
product_pd, \
|
||||
notproduct, \
|
||||
range, \
|
||||
constraint) \
|
||||
\
|
||||
JVMCI_ONLY(JVMCI_FLAGS( \
|
||||
develop, \
|
||||
develop_pd, \
|
||||
|
@ -1782,39 +1782,6 @@ const int ObjectAlignmentInBytes = 8;
|
||||
product(bool, PrintConcurrentLocks, false, MANAGEABLE, \
|
||||
"Print java.util.concurrent locks in thread dump") \
|
||||
\
|
||||
/* Shared spaces */ \
|
||||
\
|
||||
product(bool, VerifySharedSpaces, false, \
|
||||
"Verify integrity of shared spaces") \
|
||||
\
|
||||
product(bool, RecordDynamicDumpInfo, false, \
|
||||
"Record class info for jcmd VM.cds dynamic_dump") \
|
||||
\
|
||||
product(bool, AutoCreateSharedArchive, false, \
|
||||
"Create shared archive at exit if cds mapping failed") \
|
||||
\
|
||||
product(bool, PrintSharedArchiveAndExit, false, \
|
||||
"Print shared archive file contents") \
|
||||
\
|
||||
product(bool, PrintSharedDictionary, false, \
|
||||
"If PrintSharedArchiveAndExit is true, also print the shared " \
|
||||
"dictionary") \
|
||||
\
|
||||
product(size_t, SharedBaseAddress, LP64_ONLY(32*G) \
|
||||
NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
|
||||
"Address to allocate shared memory region for class data") \
|
||||
range(0, SIZE_MAX) \
|
||||
\
|
||||
product(ccstr, SharedArchiveConfigFile, NULL, \
|
||||
"Data to add to the CDS archive file") \
|
||||
\
|
||||
product(uint, SharedSymbolTableBucketSize, 4, \
|
||||
"Average number of symbols per bucket in shared table") \
|
||||
range(2, 246) \
|
||||
\
|
||||
product(bool, AllowArchivingWithJavaAgent, false, DIAGNOSTIC, \
|
||||
"Allow Java agent to be run with CDS dumping") \
|
||||
\
|
||||
product(bool, PrintMethodHandleStubs, false, DIAGNOSTIC, \
|
||||
"Print generated stub code for method handles") \
|
||||
\
|
||||
@ -1918,30 +1885,6 @@ const int ObjectAlignmentInBytes = 8;
|
||||
product(bool, WhiteBoxAPI, false, DIAGNOSTIC, \
|
||||
"Enable internal testing APIs") \
|
||||
\
|
||||
product(ccstr, DumpLoadedClassList, NULL, \
|
||||
"Dump the names all loaded classes, that could be stored into " \
|
||||
"the CDS archive, in the specified file") \
|
||||
\
|
||||
product(ccstr, SharedClassListFile, NULL, \
|
||||
"Override the default CDS class list") \
|
||||
\
|
||||
product(ccstr, SharedArchiveFile, NULL, \
|
||||
"Override the default location of the CDS archive file") \
|
||||
\
|
||||
product(ccstr, ArchiveClassesAtExit, NULL, \
|
||||
"The path and name of the dynamic archive file") \
|
||||
\
|
||||
product(ccstr, ExtraSharedClassListFile, NULL, \
|
||||
"Extra classlist for building the CDS archive file") \
|
||||
\
|
||||
product(int, ArchiveRelocationMode, 0, DIAGNOSTIC, \
|
||||
"(0) first map at preferred address, and if " \
|
||||
"unsuccessful, map at alternative address (default); " \
|
||||
"(1) always map at alternative address; " \
|
||||
"(2) always map at preferred address, and if unsuccessful, " \
|
||||
"do not map the archive") \
|
||||
range(0, 2) \
|
||||
\
|
||||
product(size_t, ArrayAllocatorMallocLimit, (size_t)-1, EXPERIMENTAL, \
|
||||
"Allocation less than this value will be allocated " \
|
||||
"using malloc. Larger allocations will use mmap.") \
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/dynamicArchive.hpp"
|
||||
#include "classfile/classLoaderDataGraph.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "cds/metaspaceShared.hpp"
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
@ -79,7 +80,6 @@
|
||||
#include "runtime/statSampler.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "services/threadIdTable.hpp"
|
||||
#include "runtime/threads.hpp"
|
||||
#include "runtime/threadSMR.inline.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
@ -89,6 +89,7 @@
|
||||
#include "services/attachListener.hpp"
|
||||
#include "services/management.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "services/threadIdTable.hpp"
|
||||
#include "services/threadService.hpp"
|
||||
#include "utilities/dtrace.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "cds/cds_globals.hpp"
|
||||
#include "classfile/classLoaderHierarchyDCmd.hpp"
|
||||
#include "classfile/classLoaderStats.hpp"
|
||||
#include "classfile/classLoaderDataGraph.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user