mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8239794: Move -Os from JVM feature 'minimal' to new feature 'opt-size'
Reviewed-by: erikj, dholmes
This commit is contained in:
parent
00e009d729
commit
7d5652f14a
@ -45,8 +45,8 @@ m4_define(jvm_features_valid, m4_normalize( \
|
||||
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
|
||||
\
|
||||
aot cds compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check \
|
||||
jvmci jvmti link-time-opt management minimal nmt parallelgc serialgc \
|
||||
services shenandoahgc static-build vm-structs zero zgc \
|
||||
jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \
|
||||
serialgc services shenandoahgc static-build vm-structs zero zgc \
|
||||
))
|
||||
|
||||
# Deprecated JVM features (these are ignored, but with a warning)
|
||||
@ -71,6 +71,7 @@ m4_define(jvm_feature_desc_link_time_opt, [enable link time optimization])
|
||||
m4_define(jvm_feature_desc_management, [enable java.lang.management API support])
|
||||
m4_define(jvm_feature_desc_minimal, [support building variant 'minimal'])
|
||||
m4_define(jvm_feature_desc_nmt, [include native memory tracking (NMT)])
|
||||
m4_define(jvm_feature_desc_opt_size, [optimize the JVM library for size])
|
||||
m4_define(jvm_feature_desc_parallelgc, [include the parallel garbage collector])
|
||||
m4_define(jvm_feature_desc_serialgc, [include the serial garbage collector])
|
||||
m4_define(jvm_feature_desc_services, [enable diagnostic services and client attaching])
|
||||
@ -476,23 +477,25 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
|
||||
|
||||
# Check which features should be off by default for this JVM variant.
|
||||
if test "x$variant" = "xclient"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot compiler2 graal jvmci link-time-opt"
|
||||
JVM_FEATURES_VARIANT_FILTER="aot compiler2 graal jvmci link-time-opt opt-size"
|
||||
elif test "x$variant" = "xminimal"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot cds compiler2 dtrace epsilongc g1gc \
|
||||
graal jfr jni-check jvmci jvmti management nmt parallelgc services \
|
||||
shenandoahgc vm-structs zgc"
|
||||
if test "x$OPENJDK_TARGET_CPU" != xarm ; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
|
||||
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER opt-size"
|
||||
else
|
||||
# Only arm-32 should have link-time-opt enabled as default.
|
||||
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER \
|
||||
link-time-opt"
|
||||
fi
|
||||
elif test "x$variant" = "xcore"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot compiler1 compiler2 graal jvmci \
|
||||
link-time-opt"
|
||||
link-time-opt opt-size"
|
||||
elif test "x$variant" = "xzero"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="jfr link-time-opt"
|
||||
JVM_FEATURES_VARIANT_FILTER="jfr link-time-opt opt-size"
|
||||
else
|
||||
JVM_FEATURES_VARIANT_FILTER="link-time-opt"
|
||||
JVM_FEATURES_VARIANT_FILTER="link-time-opt opt-size"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
@ -186,95 +186,95 @@ ifeq ($(call check-jvm-feature, link-time-opt), true)
|
||||
JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, minimal), true)
|
||||
ifeq ($(call check-jvm-feature, link-time-opt), false)
|
||||
JVM_OPTIMIZATION := SIZE
|
||||
OPT_SPEED_SRC := \
|
||||
allocation.cpp \
|
||||
assembler.cpp \
|
||||
barrierSet.cpp \
|
||||
basicLock.cpp \
|
||||
biasedLocking.cpp \
|
||||
bytecode.cpp \
|
||||
bytecodeInterpreter.cpp \
|
||||
c1_Compilation.cpp \
|
||||
c1_Compiler.cpp \
|
||||
c1_GraphBuilder.cpp \
|
||||
c1_LinearScan.cpp \
|
||||
c1_LIR.cpp \
|
||||
ciEnv.cpp \
|
||||
ciObjectFactory.cpp \
|
||||
codeBlob.cpp \
|
||||
constantPool.cpp \
|
||||
constMethod.cpp \
|
||||
classLoader.cpp \
|
||||
classLoaderData.cpp \
|
||||
classFileParser.cpp \
|
||||
classFileStream.cpp \
|
||||
cpCache.cpp \
|
||||
defNewGeneration.cpp \
|
||||
frame_arm.cpp \
|
||||
frame_aarch64.cpp \
|
||||
frame_ppc.cpp \
|
||||
frame_s390.cpp \
|
||||
frame_x86.cpp \
|
||||
genCollectedHeap.cpp \
|
||||
generation.cpp \
|
||||
genMarkSweep.cpp \
|
||||
growableArray.cpp \
|
||||
handles.cpp \
|
||||
hashtable.cpp \
|
||||
heap.cpp \
|
||||
icache.cpp \
|
||||
icache_arm.cpp \
|
||||
icache_aarch64.cpp \
|
||||
icache_ppc.cpp \
|
||||
icache_s390.cpp \
|
||||
icache_x86.cpp \
|
||||
instanceKlass.cpp \
|
||||
invocationCounter.cpp \
|
||||
iterator.cpp \
|
||||
javaCalls.cpp \
|
||||
javaClasses.cpp \
|
||||
jniFastGetField_arm.cpp \
|
||||
jvm.cpp \
|
||||
linkResolver.cpp \
|
||||
klass.cpp \
|
||||
klassVtable.cpp \
|
||||
markSweep.cpp \
|
||||
memRegion.cpp \
|
||||
memoryPool.cpp \
|
||||
method.cpp \
|
||||
methodHandles.cpp \
|
||||
methodHandles_arm.cpp \
|
||||
methodLiveness.cpp \
|
||||
metaspace.cpp \
|
||||
mutex.cpp \
|
||||
mutexLocker.cpp \
|
||||
nativeLookup.cpp \
|
||||
objArrayKlass.cpp \
|
||||
os_linux.cpp \
|
||||
os_linux_arm.cpp \
|
||||
resourceArea.cpp \
|
||||
rewriter.cpp \
|
||||
sharedRuntime.cpp \
|
||||
signature.cpp \
|
||||
space.cpp \
|
||||
stackMapTable.cpp \
|
||||
symbolTable.cpp \
|
||||
systemDictionary.cpp \
|
||||
symbol.cpp \
|
||||
synchronizer.cpp \
|
||||
timer.cpp \
|
||||
typeArrayKlass.cpp \
|
||||
unsafe.cpp \
|
||||
utf8.cpp \
|
||||
vmSymbols.cpp \
|
||||
#
|
||||
ifeq ($(call check-jvm-feature, opt-size), true)
|
||||
JVM_OPTIMIZATION := SIZE
|
||||
OPT_SPEED_SRC := \
|
||||
allocation.cpp \
|
||||
assembler.cpp \
|
||||
barrierSet.cpp \
|
||||
basicLock.cpp \
|
||||
biasedLocking.cpp \
|
||||
bytecode.cpp \
|
||||
bytecodeInterpreter.cpp \
|
||||
c1_Compilation.cpp \
|
||||
c1_Compiler.cpp \
|
||||
c1_GraphBuilder.cpp \
|
||||
c1_LinearScan.cpp \
|
||||
c1_LIR.cpp \
|
||||
ciEnv.cpp \
|
||||
ciObjectFactory.cpp \
|
||||
codeBlob.cpp \
|
||||
constantPool.cpp \
|
||||
constMethod.cpp \
|
||||
classLoader.cpp \
|
||||
classLoaderData.cpp \
|
||||
classFileParser.cpp \
|
||||
classFileStream.cpp \
|
||||
cpCache.cpp \
|
||||
defNewGeneration.cpp \
|
||||
frame_arm.cpp \
|
||||
frame_aarch64.cpp \
|
||||
frame_ppc.cpp \
|
||||
frame_s390.cpp \
|
||||
frame_x86.cpp \
|
||||
genCollectedHeap.cpp \
|
||||
generation.cpp \
|
||||
genMarkSweep.cpp \
|
||||
growableArray.cpp \
|
||||
handles.cpp \
|
||||
hashtable.cpp \
|
||||
heap.cpp \
|
||||
icache.cpp \
|
||||
icache_arm.cpp \
|
||||
icache_aarch64.cpp \
|
||||
icache_ppc.cpp \
|
||||
icache_s390.cpp \
|
||||
icache_x86.cpp \
|
||||
instanceKlass.cpp \
|
||||
invocationCounter.cpp \
|
||||
iterator.cpp \
|
||||
javaCalls.cpp \
|
||||
javaClasses.cpp \
|
||||
jniFastGetField_arm.cpp \
|
||||
jvm.cpp \
|
||||
linkResolver.cpp \
|
||||
klass.cpp \
|
||||
klassVtable.cpp \
|
||||
markSweep.cpp \
|
||||
memRegion.cpp \
|
||||
memoryPool.cpp \
|
||||
method.cpp \
|
||||
methodHandles.cpp \
|
||||
methodHandles_arm.cpp \
|
||||
methodLiveness.cpp \
|
||||
metaspace.cpp \
|
||||
mutex.cpp \
|
||||
mutexLocker.cpp \
|
||||
nativeLookup.cpp \
|
||||
objArrayKlass.cpp \
|
||||
os_linux.cpp \
|
||||
os_linux_arm.cpp \
|
||||
resourceArea.cpp \
|
||||
rewriter.cpp \
|
||||
sharedRuntime.cpp \
|
||||
signature.cpp \
|
||||
space.cpp \
|
||||
stackMapTable.cpp \
|
||||
symbolTable.cpp \
|
||||
systemDictionary.cpp \
|
||||
symbol.cpp \
|
||||
synchronizer.cpp \
|
||||
timer.cpp \
|
||||
typeArrayKlass.cpp \
|
||||
unsafe.cpp \
|
||||
utf8.cpp \
|
||||
vmSymbols.cpp \
|
||||
#
|
||||
|
||||
$(foreach s, $(OPT_SPEED_SRC), \
|
||||
$(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
|
||||
$(foreach s, $(OPT_SPEED_SRC), \
|
||||
$(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
|
||||
|
||||
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
|
||||
endif
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user