mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
Merge
This commit is contained in:
commit
a4efe9440b
21 changed files with 166 additions and 359 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2015, 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
|
||||||
|
@ -403,6 +403,8 @@ $(EXPORT_LIB_ARCH_DIR)/%.dSYM: $(C2_BUILD_DIR)/%.dSYM
|
||||||
$(install-dir)
|
$(install-dir)
|
||||||
$(EXPORT_SERVER_DIR)/%.dSYM: $(C2_BUILD_DIR)/%.dSYM
|
$(EXPORT_SERVER_DIR)/%.dSYM: $(C2_BUILD_DIR)/%.dSYM
|
||||||
$(install-dir)
|
$(install-dir)
|
||||||
|
$(EXPORT_SERVER_DIR)/%.symbols: $(C2_BUILD_DIR)/%.symbols
|
||||||
|
$(install-file)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Client (C1)
|
# Client (C1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2015, 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
|
||||||
|
@ -224,6 +224,11 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
|
||||||
echo "OPENJDK = $(OPENJDK)"; \
|
echo "OPENJDK = $(OPENJDK)"; \
|
||||||
echo "$(LP64_SETTING/$(DATA_MODE))"; \
|
echo "$(LP64_SETTING/$(DATA_MODE))"; \
|
||||||
echo; \
|
echo; \
|
||||||
|
echo "STATIC_BUILD = $(STATIC_BUILD)"; \
|
||||||
|
echo "COMPILER_WARNINGS_FATAL = $(COMPILER_WARNINGS_FATAL)"; \
|
||||||
|
echo "EXTRA_LDFLAGS = $(EXTRA_LDFLAGS)"; \
|
||||||
|
echo "LIBRARY_SUFFIX = $(LIBRARY_SUFFIX)"; \
|
||||||
|
echo; \
|
||||||
echo "# Used for platform dispatching"; \
|
echo "# Used for platform dispatching"; \
|
||||||
echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
|
echo "TARGET_DEFINES = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
|
||||||
echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
|
echo "TARGET_DEFINES += -DTARGET_ARCH_\$$(Platform_arch)"; \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2015, 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
|
||||||
|
@ -186,13 +186,16 @@ ifeq ($(JDK6_OR_EARLIER),0)
|
||||||
# executed multiple times. We reduce the noise by at least checking that
|
# executed multiple times. We reduce the noise by at least checking that
|
||||||
# BUILD_FLAVOR has been set.
|
# BUILD_FLAVOR has been set.
|
||||||
ifneq ($(BUILD_FLAVOR),)
|
ifneq ($(BUILD_FLAVOR),)
|
||||||
ifeq ($(BUILD_FLAVOR), product)
|
# FULL_DEBUG_SYMBOLS not created for individual static libraries
|
||||||
FULL_DEBUG_SYMBOLS ?= 1
|
ifeq ($(STATIC_BUILD),false)
|
||||||
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
|
ifeq ($(BUILD_FLAVOR), product)
|
||||||
else
|
FULL_DEBUG_SYMBOLS ?= 1
|
||||||
# debug variants always get Full Debug Symbols (if available)
|
ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
|
||||||
ENABLE_FULL_DEBUG_SYMBOLS = 1
|
else
|
||||||
endif
|
# debug variants always get Full Debug Symbols (if available)
|
||||||
|
ENABLE_FULL_DEBUG_SYMBOLS = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
|
$(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)"))
|
||||||
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
|
# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
|
||||||
|
|
||||||
|
@ -256,16 +259,24 @@ endif # JDK_6_OR_EARLIER
|
||||||
JDK_INCLUDE_SUBDIR=bsd
|
JDK_INCLUDE_SUBDIR=bsd
|
||||||
|
|
||||||
# Library suffix
|
# Library suffix
|
||||||
ifeq ($(OS_VENDOR),Darwin)
|
ifneq ($(STATIC_BUILD),true)
|
||||||
LIBRARY_SUFFIX=dylib
|
ifeq ($(OS_VENDOR),Darwin)
|
||||||
|
LIBRARY_SUFFIX=dylib
|
||||||
|
else
|
||||||
|
LIBRARY_SUFFIX=so
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
LIBRARY_SUFFIX=so
|
LIBRARY_SUFFIX=a
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
|
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
|
||||||
|
|
||||||
|
# jsig library not needed for static builds
|
||||||
|
ifneq ($(STATIC_BUILD),true)
|
||||||
# client and server subdirectories have symbolic links to ../libjsig.so
|
# client and server subdirectories have symbolic links to ../libjsig.so
|
||||||
EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
|
EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||||
|
@ -286,6 +297,9 @@ EXPORT_MINIMAL_DIR = $(EXPORT_LIB_ARCH_DIR)/minimal
|
||||||
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
|
||||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
|
||||||
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.symbols
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||||
|
@ -303,6 +317,9 @@ endif
|
||||||
ifeq ($(JVM_VARIANT_CLIENT),true)
|
ifeq ($(JVM_VARIANT_CLIENT),true)
|
||||||
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
|
||||||
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.symbols
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||||
|
@ -320,6 +337,9 @@ endif
|
||||||
ifeq ($(JVM_VARIANT_MINIMAL1),true)
|
ifeq ($(JVM_VARIANT_MINIMAL1),true)
|
||||||
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt
|
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt
|
||||||
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.symbols
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Serviceability Binaries
|
# Serviceability Binaries
|
||||||
|
@ -388,7 +408,9 @@ ifeq ($(OS_VENDOR), Darwin)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Binaries to 'universalize' if built
|
# Binaries to 'universalize' if built
|
||||||
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX)
|
ifneq ($(STATIC_BUILD),true)
|
||||||
|
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/libjsig.$(LIBRARY_SUFFIX)
|
||||||
|
endif
|
||||||
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX)
|
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/libsaproc.$(LIBRARY_SUFFIX)
|
||||||
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX)
|
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/server/libjvm.$(LIBRARY_SUFFIX)
|
||||||
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX)
|
UNIVERSAL_LIPO_LIST += $(EXPORT_LIB_DIR)/client/libjvm.$(LIBRARY_SUFFIX)
|
||||||
|
@ -396,6 +418,13 @@ ifeq ($(OS_VENDOR), Darwin)
|
||||||
# Files to simply copy in place
|
# Files to simply copy in place
|
||||||
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/server/Xusage.txt
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/server/Xusage.txt
|
||||||
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/client/Xusage.txt
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/client/Xusage.txt
|
||||||
|
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/server/libjvm.symbols
|
||||||
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/client/libjvm.symbols
|
||||||
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/minimal/libjvm.symbols
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
ifeq ($(ZIP_DEBUGINFO_FILES),1)
|
||||||
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/server/libjvm.diz
|
UNIVERSAL_COPY_LIST += $(EXPORT_LIB_DIR)/server/libjvm.diz
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2015, 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
|
||||||
|
@ -37,15 +37,15 @@ DtraceOutDir = $(GENERATED)/dtracefiles
|
||||||
# Bsd does not build libjvm_db, does not compile on macosx
|
# Bsd does not build libjvm_db, does not compile on macosx
|
||||||
# disabled in build: rule in vm.make
|
# disabled in build: rule in vm.make
|
||||||
JVM_DB = libjvm_db
|
JVM_DB = libjvm_db
|
||||||
LIBJVM_DB = libjvm_db.dylib
|
LIBJVM_DB = libjvm_db.$(LIBRARY_SUFFIX)
|
||||||
|
|
||||||
LIBJVM_DB_DEBUGINFO = libjvm_db.dylib.dSYM
|
LIBJVM_DB_DEBUGINFO = libjvm_db.$(LIBRARY_SUFFIX).dSYM
|
||||||
LIBJVM_DB_DIZ = libjvm_db.diz
|
LIBJVM_DB_DIZ = libjvm_db.diz
|
||||||
|
|
||||||
JVM_DTRACE = jvm_dtrace
|
JVM_DTRACE = jvm_dtrace
|
||||||
LIBJVM_DTRACE = libjvm_dtrace.dylib
|
LIBJVM_DTRACE = libjvm_dtrace.$(LIBRARY_SUFFIX)
|
||||||
|
|
||||||
LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.dylib.dSYM
|
LIBJVM_DTRACE_DEBUGINFO = libjvm_dtrace.$(LIBRARY_SUFFIX).dSYM
|
||||||
LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz
|
LIBJVM_DTRACE_DIZ = libjvm_dtrace.diz
|
||||||
|
|
||||||
JVMOFFS = JvmOffsets
|
JVMOFFS = JvmOffsets
|
||||||
|
@ -167,14 +167,14 @@ endif # ifneq ("${ISA}","${BUILDARCH}")
|
||||||
|
|
||||||
LFLAGS_GENOFFS += -L.
|
LFLAGS_GENOFFS += -L.
|
||||||
|
|
||||||
lib$(GENOFFS).dylib: $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
|
lib$(GENOFFS).$(LIBRARY_SUFFIX): $(DTRACE_SRCDIR)/$(GENOFFS).cpp $(DTRACE_SRCDIR)/$(GENOFFS).h \
|
||||||
$(LIBJVM.o)
|
$(LIBJVM.o)
|
||||||
$(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
|
$(QUIETLY) $(CXX) $(CXXFLAGS) $(GENOFFS_CFLAGS) $(SHARED_FLAG) $(PICFLAG) \
|
||||||
$(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -ljvm
|
$(LFLAGS_GENOFFS) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS).cpp -ljvm
|
||||||
|
|
||||||
$(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).dylib
|
$(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).$(LIBRARY_SUFFIX)
|
||||||
$(QUIETLY) $(LINK.CXX) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \
|
$(QUIETLY) $(LINK.CXX) -o $@ $(DTRACE_SRCDIR)/$(GENOFFS)Main.c \
|
||||||
./lib$(GENOFFS).dylib
|
./lib$(GENOFFS).$(LIBRARY_SUFFIX)
|
||||||
|
|
||||||
# $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
|
# $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
|
||||||
$(JVMOFFS).h: $(GENOFFS)
|
$(JVMOFFS).h: $(GENOFFS)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 1999, 2015, 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
|
||||||
|
@ -186,7 +186,14 @@ ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||||
CFLAGS += $(LIBFFI_CFLAGS)
|
CFLAGS += $(LIBFFI_CFLAGS)
|
||||||
CFLAGS += $(LLVM_CFLAGS)
|
CFLAGS += $(LLVM_CFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
CXXFLAGS += -DSTATIC_BUILD
|
||||||
|
CFLAGS += -DSTATIC_BUILD
|
||||||
|
else
|
||||||
CFLAGS += $(VM_PICFLAG)
|
CFLAGS += $(VM_PICFLAG)
|
||||||
|
endif
|
||||||
|
|
||||||
CFLAGS += -fno-rtti
|
CFLAGS += -fno-rtti
|
||||||
CFLAGS += -fno-exceptions
|
CFLAGS += -fno-exceptions
|
||||||
ifeq ($(USE_CLANG),)
|
ifeq ($(USE_CLANG),)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2015, 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,9 +28,9 @@
|
||||||
JSIG = jsig
|
JSIG = jsig
|
||||||
|
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
LIBJSIG = lib$(JSIG).dylib
|
LIBJSIG = lib$(JSIG).$(LIBRARY_SUFFIX)
|
||||||
|
|
||||||
LIBJSIG_DEBUGINFO = lib$(JSIG).dylib.dSYM
|
LIBJSIG_DEBUGINFO = lib$(JSIG).$(LIBRARY_SUFFIX).dSYM
|
||||||
LIBJSIG_DIZ = lib$(JSIG).diz
|
LIBJSIG_DIZ = lib$(JSIG).diz
|
||||||
else
|
else
|
||||||
LIBJSIG = lib$(JSIG).so
|
LIBJSIG = lib$(JSIG).so
|
||||||
|
@ -61,8 +61,14 @@ endif
|
||||||
|
|
||||||
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
|
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
|
||||||
@echo $(LOG_INFO) Making signal interposition lib...
|
@echo $(LOG_INFO) Making signal interposition lib...
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
$(QUIETLY) $(CC) -c $(SYMFLAG) $(EXTRA_CFLAGS) $(ARCHFLAG) $(PICFLAG) \
|
||||||
|
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $(JSIG).o $<
|
||||||
|
$(QUIETLY) $(AR) $(ARFLAGS) $@ $(JSIG).o
|
||||||
|
else
|
||||||
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
|
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
|
||||||
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $<
|
$(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) $(EXTRA_CFLAGS) -o $@ $<
|
||||||
|
endif
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
$(DSYMUTIL) $@
|
$(DSYMUTIL) $@
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2003, 2015, 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
|
||||||
|
@ -39,7 +39,11 @@ AS.S = $(AS) $(ASFLAGS)
|
||||||
COMPILE.CC = $(CC_COMPILE) -c
|
COMPILE.CC = $(CC_COMPILE) -c
|
||||||
GENASM.CC = $(CC_COMPILE) -S
|
GENASM.CC = $(CC_COMPILE) -S
|
||||||
LINK.CC = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
|
LINK.CC = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
LINK_LIB.CC = $(AR) $(ARFLAGS)
|
||||||
|
else
|
||||||
LINK_LIB.CC = $(CC) $(LFLAGS) $(SHARED_FLAG)
|
LINK_LIB.CC = $(CC) $(LFLAGS) $(SHARED_FLAG)
|
||||||
|
endif
|
||||||
PREPROCESS.CC = $(CC_COMPILE) -E
|
PREPROCESS.CC = $(CC_COMPILE) -E
|
||||||
|
|
||||||
COMPILE.CXX = $(CXX_COMPILE) -c
|
COMPILE.CXX = $(CXX_COMPILE) -c
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2005, 2015, 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,9 +28,9 @@
|
||||||
SAPROC = saproc
|
SAPROC = saproc
|
||||||
|
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
LIBSAPROC = lib$(SAPROC).dylib
|
LIBSAPROC = lib$(SAPROC).$(LIBRARY_SUFFIX)
|
||||||
|
|
||||||
LIBSAPROC_DEBUGINFO = lib$(SAPROC).dylib.dSYM
|
LIBSAPROC_DEBUGINFO = lib$(SAPROC).$(LIBRARY_SUFFIX).dSYM
|
||||||
LIBSAPROC_DIZ = lib$(SAPROC).diz
|
LIBSAPROC_DIZ = lib$(SAPROC).diz
|
||||||
else
|
else
|
||||||
LIBSAPROC = lib$(SAPROC).so
|
LIBSAPROC = lib$(SAPROC).so
|
||||||
|
|
|
@ -142,10 +142,10 @@ include $(MAKEFILES_DIR)/dtrace.make
|
||||||
|
|
||||||
JVM = jvm
|
JVM = jvm
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
LIBJVM = lib$(JVM).dylib
|
LIBJVM = lib$(JVM).$(LIBRARY_SUFFIX)
|
||||||
CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
|
CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
|
||||||
|
|
||||||
LIBJVM_DEBUGINFO = lib$(JVM).dylib.dSYM
|
LIBJVM_DEBUGINFO = lib$(JVM).$(LIBRARY_SUFFIX).dSYM
|
||||||
LIBJVM_DIZ = lib$(JVM).diz
|
LIBJVM_DIZ = lib$(JVM).diz
|
||||||
else
|
else
|
||||||
LIBJVM = lib$(JVM).so
|
LIBJVM = lib$(JVM).so
|
||||||
|
@ -261,6 +261,16 @@ mapfile : $(MAPFILE) mapfile_extra vm.def
|
||||||
{ print $$0 } \
|
{ print $$0 } \
|
||||||
}' > $@ < $(MAPFILE)
|
}' > $@ < $(MAPFILE)
|
||||||
|
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
EXPORTED_SYMBOLS = libjvm.symbols
|
||||||
|
|
||||||
|
libjvm.symbols : mapfile
|
||||||
|
$(CP) mapfile libjvm.symbols
|
||||||
|
|
||||||
|
else
|
||||||
|
EXPORTED_SYMBOLS =
|
||||||
|
endif
|
||||||
|
|
||||||
mapfile_reorder : mapfile $(REORDERFILE)
|
mapfile_reorder : mapfile $(REORDERFILE)
|
||||||
rm -f $@
|
rm -f $@
|
||||||
cat $^ > $@
|
cat $^ > $@
|
||||||
|
@ -288,9 +298,11 @@ else
|
||||||
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
|
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
|
||||||
|
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
|
ifneq ($(STATIC_BUILD),true)
|
||||||
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
|
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
|
||||||
LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
|
LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
|
||||||
|
LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
LFLAGS_VM += -Wl,-z,defs
|
LFLAGS_VM += -Wl,-z,defs
|
||||||
endif
|
endif
|
||||||
|
@ -345,6 +357,10 @@ LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
|
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
|
||||||
|
ifeq ($(STATIC_BUILD),true)
|
||||||
|
echo Linking static vm...;
|
||||||
|
$(LINK_LIB.CC) $@ $(LIBJVM.o)
|
||||||
|
else
|
||||||
$(QUIETLY) { \
|
$(QUIETLY) { \
|
||||||
echo $(LOG_INFO) Linking vm...; \
|
echo $(LOG_INFO) Linking vm...; \
|
||||||
$(LINK_LIB.CXX/PRE_HOOK) \
|
$(LINK_LIB.CXX/PRE_HOOK) \
|
||||||
|
@ -354,6 +370,8 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
|
||||||
rm -f $@.1; ln -s $@ $@.1; \
|
rm -f $@.1; ln -s $@ $@.1; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
$(DSYMUTIL) $@
|
$(DSYMUTIL) $@
|
||||||
|
@ -410,10 +428,10 @@ include $(MAKEFILES_DIR)/saproc.make
|
||||||
|
|
||||||
ifeq ($(OS_VENDOR), Darwin)
|
ifeq ($(OS_VENDOR), Darwin)
|
||||||
# no libjvm_db for macosx
|
# no libjvm_db for macosx
|
||||||
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(BUILDLIBSAPROC) dtraceCheck
|
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(BUILDLIBSAPROC) dtraceCheck $(EXPORTED_SYMBOLS)
|
||||||
echo "Doing vm.make build:"
|
echo "Doing vm.make build:"
|
||||||
else
|
else
|
||||||
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC)
|
build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) $(EXPORTED_SYMBOLS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install: install_jvm install_jsig install_saproc
|
install: install_jvm install_jsig install_saproc
|
||||||
|
|
|
@ -440,6 +440,10 @@ void os::init_system_properties_values() {
|
||||||
if (pslash != NULL) {
|
if (pslash != NULL) {
|
||||||
*pslash = '\0'; // Get rid of /{client|server|hotspot}.
|
*pslash = '\0'; // Get rid of /{client|server|hotspot}.
|
||||||
}
|
}
|
||||||
|
#ifdef STATIC_BUILD
|
||||||
|
strcat(buf, "/lib");
|
||||||
|
#endif
|
||||||
|
|
||||||
Arguments::set_dll_dir(buf);
|
Arguments::set_dll_dir(buf);
|
||||||
|
|
||||||
if (pslash != NULL) {
|
if (pslash != NULL) {
|
||||||
|
@ -1388,6 +1392,9 @@ bool os::dll_address_to_library_name(address addr, char* buf,
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||||
|
#ifdef STATIC_BUILD
|
||||||
|
return os::get_default_process_handle();
|
||||||
|
#else
|
||||||
void * result= ::dlopen(filename, RTLD_LAZY);
|
void * result= ::dlopen(filename, RTLD_LAZY);
|
||||||
if (result != NULL) {
|
if (result != NULL) {
|
||||||
// Successful loading
|
// Successful loading
|
||||||
|
@ -1399,9 +1406,13 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||||
ebuf[ebuflen-1]='\0';
|
ebuf[ebuflen-1]='\0';
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#endif // STATIC_BUILD
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||||
|
#ifdef STATIC_BUILD
|
||||||
|
return os::get_default_process_handle();
|
||||||
|
#else
|
||||||
void * result= ::dlopen(filename, RTLD_LAZY);
|
void * result= ::dlopen(filename, RTLD_LAZY);
|
||||||
if (result != NULL) {
|
if (result != NULL) {
|
||||||
// Successful loading
|
// Successful loading
|
||||||
|
@ -1574,6 +1585,7 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#endif // STATIC_BUILD
|
||||||
}
|
}
|
||||||
#endif // !__APPLE__
|
#endif // !__APPLE__
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,12 @@ bool Disassembler::load_library() {
|
||||||
os::jvm_path(buf, sizeof(buf));
|
os::jvm_path(buf, sizeof(buf));
|
||||||
int jvm_offset = -1;
|
int jvm_offset = -1;
|
||||||
int lib_offset = -1;
|
int lib_offset = -1;
|
||||||
|
#ifdef STATIC_BUILD
|
||||||
|
char* p = strrchr(buf, '/');
|
||||||
|
*p = '\0';
|
||||||
|
strcat(p, "/lib/");
|
||||||
|
lib_offset = jvm_offset = strlen(buf);
|
||||||
|
#else
|
||||||
{
|
{
|
||||||
// Match "jvm[^/]*" in jvm_path.
|
// Match "jvm[^/]*" in jvm_path.
|
||||||
const char* base = buf;
|
const char* base = buf;
|
||||||
|
@ -94,6 +100,7 @@ bool Disassembler::load_library() {
|
||||||
p = strstr(p ? p : base, "jvm");
|
p = strstr(p ? p : base, "jvm");
|
||||||
if (p != NULL) jvm_offset = p - base;
|
if (p != NULL) jvm_offset = p - base;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Find the disassembler shared library.
|
// Find the disassembler shared library.
|
||||||
// Search for several paths derived from libjvm, in this order:
|
// Search for several paths derived from libjvm, in this order:
|
||||||
// 1. <home>/jre/lib/<arch>/<vm>/libhsdis-<arch>.so (for compatibility)
|
// 1. <home>/jre/lib/<arch>/<vm>/libhsdis-<arch>.so (for compatibility)
|
||||||
|
|
|
@ -73,11 +73,7 @@ void CompactibleFreeListSpace::set_cms_values() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs,
|
CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr) :
|
||||||
MemRegion mr, bool use_adaptive_freelists,
|
|
||||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice dictionaryChoice) :
|
|
||||||
_dictionaryChoice(dictionaryChoice),
|
|
||||||
_adaptive_freelists(use_adaptive_freelists),
|
|
||||||
_bt(bs, mr),
|
_bt(bs, mr),
|
||||||
// free list locks are in the range of values taken by _lockRank
|
// free list locks are in the range of values taken by _lockRank
|
||||||
// This range currently is [_leaf+2, _leaf+3]
|
// This range currently is [_leaf+2, _leaf+3]
|
||||||
|
@ -100,48 +96,17 @@ CompactibleFreeListSpace::CompactibleFreeListSpace(BlockOffsetSharedArray* bs,
|
||||||
"FreeChunk is larger than expected");
|
"FreeChunk is larger than expected");
|
||||||
_bt.set_space(this);
|
_bt.set_space(this);
|
||||||
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
||||||
// We have all of "mr", all of which we place in the dictionary
|
|
||||||
// as one big chunk. We'll need to decide here which of several
|
_dictionary = new AFLBinaryTreeDictionary(mr);
|
||||||
// possible alternative dictionary implementations to use. For
|
|
||||||
// now the choice is easy, since we have only one working
|
|
||||||
// implementation, namely, the simple binary tree (splaying
|
|
||||||
// temporarily disabled).
|
|
||||||
switch (dictionaryChoice) {
|
|
||||||
case FreeBlockDictionary<FreeChunk>::dictionaryBinaryTree:
|
|
||||||
_dictionary = new AFLBinaryTreeDictionary(mr);
|
|
||||||
break;
|
|
||||||
case FreeBlockDictionary<FreeChunk>::dictionarySplayTree:
|
|
||||||
case FreeBlockDictionary<FreeChunk>::dictionarySkipList:
|
|
||||||
default:
|
|
||||||
warning("dictionaryChoice: selected option not understood; using"
|
|
||||||
" default BinaryTreeDictionary implementation instead.");
|
|
||||||
}
|
|
||||||
assert(_dictionary != NULL, "CMS dictionary initialization");
|
assert(_dictionary != NULL, "CMS dictionary initialization");
|
||||||
// The indexed free lists are initially all empty and are lazily
|
// The indexed free lists are initially all empty and are lazily
|
||||||
// filled in on demand. Initialize the array elements to NULL.
|
// filled in on demand. Initialize the array elements to NULL.
|
||||||
initializeIndexedFreeListArray();
|
initializeIndexedFreeListArray();
|
||||||
|
|
||||||
// Not using adaptive free lists assumes that allocation is first
|
_smallLinearAllocBlock.set(0, 0, 1024*SmallForLinearAlloc,
|
||||||
// from the linAB's. Also a cms perm gen which can be compacted
|
SmallForLinearAlloc);
|
||||||
// has to have the klass's klassKlass allocated at a lower
|
|
||||||
// address in the heap than the klass so that the klassKlass is
|
|
||||||
// moved to its new location before the klass is moved.
|
|
||||||
// Set the _refillSize for the linear allocation blocks
|
|
||||||
if (!use_adaptive_freelists) {
|
|
||||||
FreeChunk* fc = _dictionary->get_chunk(mr.word_size(),
|
|
||||||
FreeBlockDictionary<FreeChunk>::atLeast);
|
|
||||||
// The small linAB initially has all the space and will allocate
|
|
||||||
// a chunk of any size.
|
|
||||||
HeapWord* addr = (HeapWord*) fc;
|
|
||||||
_smallLinearAllocBlock.set(addr, fc->size() ,
|
|
||||||
1024*SmallForLinearAlloc, fc->size());
|
|
||||||
// Note that _unallocated_block is not updated here.
|
|
||||||
// Allocations from the linear allocation block should
|
|
||||||
// update it.
|
|
||||||
} else {
|
|
||||||
_smallLinearAllocBlock.set(0, 0, 1024*SmallForLinearAlloc,
|
|
||||||
SmallForLinearAlloc);
|
|
||||||
}
|
|
||||||
// CMSIndexedFreeListReplenish should be at least 1
|
// CMSIndexedFreeListReplenish should be at least 1
|
||||||
CMSIndexedFreeListReplenish = MAX2((uintx)1, CMSIndexedFreeListReplenish);
|
CMSIndexedFreeListReplenish = MAX2((uintx)1, CMSIndexedFreeListReplenish);
|
||||||
_promoInfo.setSpace(this);
|
_promoInfo.setSpace(this);
|
||||||
|
@ -297,22 +262,7 @@ void CompactibleFreeListSpace::reset_after_compaction() {
|
||||||
MemRegion mr(compaction_top(), end());
|
MemRegion mr(compaction_top(), end());
|
||||||
reset(mr);
|
reset(mr);
|
||||||
// Now refill the linear allocation block(s) if possible.
|
// Now refill the linear allocation block(s) if possible.
|
||||||
if (_adaptive_freelists) {
|
refillLinearAllocBlocksIfNeeded();
|
||||||
refillLinearAllocBlocksIfNeeded();
|
|
||||||
} else {
|
|
||||||
// Place as much of mr in the linAB as we can get,
|
|
||||||
// provided it was big enough to go into the dictionary.
|
|
||||||
FreeChunk* fc = dictionary()->find_largest_dict();
|
|
||||||
if (fc != NULL) {
|
|
||||||
assert(fc->size() == mr.word_size(),
|
|
||||||
"Why was the chunk broken up?");
|
|
||||||
removeChunkFromDictionary(fc);
|
|
||||||
HeapWord* addr = (HeapWord*) fc;
|
|
||||||
_smallLinearAllocBlock.set(addr, fc->size() ,
|
|
||||||
1024*SmallForLinearAlloc, fc->size());
|
|
||||||
// Note that _unallocated_block is not updated here.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Walks the entire dictionary, returning a coterminal
|
// Walks the entire dictionary, returning a coterminal
|
||||||
|
@ -445,8 +395,7 @@ void CompactibleFreeListSpace::print_on(outputStream* st) const {
|
||||||
|
|
||||||
// dump_memory_block(_smallLinearAllocBlock->_ptr, 128);
|
// dump_memory_block(_smallLinearAllocBlock->_ptr, 128);
|
||||||
|
|
||||||
st->print_cr(" _fitStrategy = %s, _adaptive_freelists = %s",
|
st->print_cr(" _fitStrategy = %s", BOOL_TO_STR(_fitStrategy));
|
||||||
_fitStrategy?"true":"false", _adaptive_freelists?"true":"false");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompactibleFreeListSpace::print_indexed_free_lists(outputStream* st)
|
void CompactibleFreeListSpace::print_indexed_free_lists(outputStream* st)
|
||||||
|
@ -617,23 +566,9 @@ void CompactibleFreeListSpace::set_end(HeapWord* value) {
|
||||||
// Now, take this new chunk and add it to the free blocks.
|
// Now, take this new chunk and add it to the free blocks.
|
||||||
// Note that the BOT has not yet been updated for this block.
|
// Note that the BOT has not yet been updated for this block.
|
||||||
size_t newFcSize = pointer_delta(value, prevEnd);
|
size_t newFcSize = pointer_delta(value, prevEnd);
|
||||||
// XXX This is REALLY UGLY and should be fixed up. XXX
|
// Add the block to the free lists, if possible coalescing it
|
||||||
if (!_adaptive_freelists && _smallLinearAllocBlock._ptr == NULL) {
|
// with the last free block, and update the BOT and census data.
|
||||||
// Mark the boundary of the new block in BOT
|
addChunkToFreeListsAtEndRecordingStats(prevEnd, newFcSize);
|
||||||
_bt.mark_block(prevEnd, value);
|
|
||||||
// put it all in the linAB
|
|
||||||
MutexLockerEx x(parDictionaryAllocLock(),
|
|
||||||
Mutex::_no_safepoint_check_flag);
|
|
||||||
_smallLinearAllocBlock._ptr = prevEnd;
|
|
||||||
_smallLinearAllocBlock._word_size = newFcSize;
|
|
||||||
repairLinearAllocBlock(&_smallLinearAllocBlock);
|
|
||||||
// Births of chunks put into a LinAB are not recorded. Births
|
|
||||||
// of chunks as they are allocated out of a LinAB are.
|
|
||||||
} else {
|
|
||||||
// Add the block to the free lists, if possible coalescing it
|
|
||||||
// with the last free block, and update the BOT and census data.
|
|
||||||
addChunkToFreeListsAtEndRecordingStats(prevEnd, newFcSize);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1177,11 +1112,7 @@ HeapWord* CompactibleFreeListSpace::allocate(size_t size) {
|
||||||
assert(size == adjustObjectSize(size),
|
assert(size == adjustObjectSize(size),
|
||||||
"use adjustObjectSize() before calling into allocate()");
|
"use adjustObjectSize() before calling into allocate()");
|
||||||
|
|
||||||
if (_adaptive_freelists) {
|
res = allocate_adaptive_freelists(size);
|
||||||
res = allocate_adaptive_freelists(size);
|
|
||||||
} else { // non-adaptive free lists
|
|
||||||
res = allocate_non_adaptive_freelists(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (res != NULL) {
|
if (res != NULL) {
|
||||||
// check that res does lie in this space!
|
// check that res does lie in this space!
|
||||||
|
@ -1203,27 +1134,6 @@ HeapWord* CompactibleFreeListSpace::allocate(size_t size) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapWord* CompactibleFreeListSpace::allocate_non_adaptive_freelists(size_t size) {
|
|
||||||
HeapWord* res = NULL;
|
|
||||||
// try and use linear allocation for smaller blocks
|
|
||||||
if (size < _smallLinearAllocBlock._allocation_size_limit) {
|
|
||||||
// if successful, the following also adjusts block offset table
|
|
||||||
res = getChunkFromSmallLinearAllocBlock(size);
|
|
||||||
}
|
|
||||||
// Else triage to indexed lists for smaller sizes
|
|
||||||
if (res == NULL) {
|
|
||||||
if (size < SmallForDictionary) {
|
|
||||||
res = (HeapWord*) getChunkFromIndexedFreeList(size);
|
|
||||||
} else {
|
|
||||||
// else get it from the big dictionary; if even this doesn't
|
|
||||||
// work we are out of luck.
|
|
||||||
res = (HeapWord*)getChunkFromDictionaryExact(size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
HeapWord* CompactibleFreeListSpace::allocate_adaptive_freelists(size_t size) {
|
HeapWord* CompactibleFreeListSpace::allocate_adaptive_freelists(size_t size) {
|
||||||
assert_lock_strong(freelistLock());
|
assert_lock_strong(freelistLock());
|
||||||
HeapWord* res = NULL;
|
HeapWord* res = NULL;
|
||||||
|
@ -1281,9 +1191,6 @@ size_t CompactibleFreeListSpace::expansionSpaceRequired(size_t obj_size) const {
|
||||||
// bigLAB or a smallLAB plus refilling a PromotionInfo object. MinChunkSize
|
// bigLAB or a smallLAB plus refilling a PromotionInfo object. MinChunkSize
|
||||||
// is added because the dictionary may over-allocate to avoid fragmentation.
|
// is added because the dictionary may over-allocate to avoid fragmentation.
|
||||||
size_t space = obj_size;
|
size_t space = obj_size;
|
||||||
if (!_adaptive_freelists) {
|
|
||||||
space = MAX2(space, _smallLinearAllocBlock._refillSize);
|
|
||||||
}
|
|
||||||
space += _promoInfo.refillSize() + 2 * MinChunkSize;
|
space += _promoInfo.refillSize() + 2 * MinChunkSize;
|
||||||
return space;
|
return space;
|
||||||
}
|
}
|
||||||
|
@ -1698,11 +1605,7 @@ CompactibleFreeListSpace::returnChunkToFreeList(FreeChunk* fc) {
|
||||||
size_t size = fc->size();
|
size_t size = fc->size();
|
||||||
_bt.verify_single_block((HeapWord*) fc, size);
|
_bt.verify_single_block((HeapWord*) fc, size);
|
||||||
_bt.verify_not_unallocated((HeapWord*) fc, size);
|
_bt.verify_not_unallocated((HeapWord*) fc, size);
|
||||||
if (_adaptive_freelists) {
|
_indexedFreeList[size].return_chunk_at_tail(fc);
|
||||||
_indexedFreeList[size].return_chunk_at_tail(fc);
|
|
||||||
} else {
|
|
||||||
_indexedFreeList[size].return_chunk_at_head(fc);
|
|
||||||
}
|
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if (CMSCollector::abstract_state() != CMSCollector::Sweeping) {
|
if (CMSCollector::abstract_state() != CMSCollector::Sweeping) {
|
||||||
_indexedFreeList[size].verify_stats();
|
_indexedFreeList[size].verify_stats();
|
||||||
|
@ -1931,10 +1834,6 @@ CompactibleFreeListSpace::gc_prologue() {
|
||||||
void
|
void
|
||||||
CompactibleFreeListSpace::gc_epilogue() {
|
CompactibleFreeListSpace::gc_epilogue() {
|
||||||
assert_locked();
|
assert_locked();
|
||||||
if (PrintGCDetails && Verbose && !_adaptive_freelists) {
|
|
||||||
if (_smallLinearAllocBlock._word_size == 0)
|
|
||||||
warning("CompactibleFreeListSpace(epilogue):: Linear allocation failure");
|
|
||||||
}
|
|
||||||
assert(_promoInfo.noPromotions(), "_promoInfo inconsistency");
|
assert(_promoInfo.noPromotions(), "_promoInfo inconsistency");
|
||||||
_promoInfo.stopTrackingPromotions();
|
_promoInfo.stopTrackingPromotions();
|
||||||
repairLinearAllocationBlocks();
|
repairLinearAllocationBlocks();
|
||||||
|
@ -2060,13 +1959,6 @@ CompactibleFreeListSpace::refillLinearAllocBlock(LinearAllocBlock* blk) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support for concurrent collection policy decisions.
|
|
||||||
bool CompactibleFreeListSpace::should_concurrent_collect() const {
|
|
||||||
// In the future we might want to add in fragmentation stats --
|
|
||||||
// including erosion of the "mountain" into this decision as well.
|
|
||||||
return !adaptive_freelists() && linearAllocationWouldFail();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support for compaction
|
// Support for compaction
|
||||||
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
void CompactibleFreeListSpace::prepare_for_compaction(CompactPoint* cp) {
|
||||||
scan_and_forward(this, cp);
|
scan_and_forward(this, cp);
|
||||||
|
|
|
@ -138,15 +138,13 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||||
// Linear allocation blocks
|
// Linear allocation blocks
|
||||||
LinearAllocBlock _smallLinearAllocBlock;
|
LinearAllocBlock _smallLinearAllocBlock;
|
||||||
|
|
||||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice _dictionaryChoice;
|
|
||||||
AFLBinaryTreeDictionary* _dictionary; // Pointer to dictionary for large size blocks
|
AFLBinaryTreeDictionary* _dictionary; // Pointer to dictionary for large size blocks
|
||||||
|
|
||||||
// Indexed array for small size blocks
|
// Indexed array for small size blocks
|
||||||
AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize];
|
AdaptiveFreeList<FreeChunk> _indexedFreeList[IndexSetSize];
|
||||||
|
|
||||||
// Allocation strategy
|
// Allocation strategy
|
||||||
bool _fitStrategy; // Use best fit strategy
|
bool _fitStrategy; // Use best fit strategy
|
||||||
bool _adaptive_freelists; // Use adaptive freelists
|
|
||||||
|
|
||||||
// This is an address close to the largest free chunk in the heap.
|
// This is an address close to the largest free chunk in the heap.
|
||||||
// It is currently assumed to be at the end of the heap. Free
|
// It is currently assumed to be at the end of the heap. Free
|
||||||
|
@ -204,10 +202,6 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||||
// strategy that attempts to keep the needed number of chunks in each
|
// strategy that attempts to keep the needed number of chunks in each
|
||||||
// indexed free lists.
|
// indexed free lists.
|
||||||
HeapWord* allocate_adaptive_freelists(size_t size);
|
HeapWord* allocate_adaptive_freelists(size_t size);
|
||||||
// Allocate from the linear allocation buffers first. This allocation
|
|
||||||
// strategy assumes maximal coalescing can maintain chunks large enough
|
|
||||||
// to be used as linear allocation buffers.
|
|
||||||
HeapWord* allocate_non_adaptive_freelists(size_t size);
|
|
||||||
|
|
||||||
// Gets a chunk from the linear allocation block (LinAB). If there
|
// Gets a chunk from the linear allocation block (LinAB). If there
|
||||||
// is not enough space in the LinAB, refills it.
|
// is not enough space in the LinAB, refills it.
|
||||||
|
@ -333,9 +327,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr,
|
CompactibleFreeListSpace(BlockOffsetSharedArray* bs, MemRegion mr);
|
||||||
bool use_adaptive_freelists,
|
|
||||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice);
|
|
||||||
// Accessors
|
// Accessors
|
||||||
bool bestFitFirst() { return _fitStrategy == FreeBlockBestFitFirst; }
|
bool bestFitFirst() { return _fitStrategy == FreeBlockBestFitFirst; }
|
||||||
FreeBlockDictionary<FreeChunk>* dictionary() const { return _dictionary; }
|
FreeBlockDictionary<FreeChunk>* dictionary() const { return _dictionary; }
|
||||||
|
@ -349,8 +341,6 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||||
// chunk exists, return NULL.
|
// chunk exists, return NULL.
|
||||||
FreeChunk* find_chunk_at_end();
|
FreeChunk* find_chunk_at_end();
|
||||||
|
|
||||||
bool adaptive_freelists() const { return _adaptive_freelists; }
|
|
||||||
|
|
||||||
void set_collector(CMSCollector* collector) { _collector = collector; }
|
void set_collector(CMSCollector* collector) { _collector = collector; }
|
||||||
|
|
||||||
// Support for parallelization of rescan and marking.
|
// Support for parallelization of rescan and marking.
|
||||||
|
@ -536,9 +526,6 @@ class CompactibleFreeListSpace: public CompactibleSpace {
|
||||||
void addChunkAndRepairOffsetTable(HeapWord* chunk, size_t size,
|
void addChunkAndRepairOffsetTable(HeapWord* chunk, size_t size,
|
||||||
bool coalesced);
|
bool coalesced);
|
||||||
|
|
||||||
// Support for decisions regarding concurrent collection policy.
|
|
||||||
bool should_concurrent_collect() const;
|
|
||||||
|
|
||||||
// Support for compaction.
|
// Support for compaction.
|
||||||
void prepare_for_compaction(CompactPoint* cp);
|
void prepare_for_compaction(CompactPoint* cp);
|
||||||
void adjust_pointers();
|
void adjust_pointers();
|
||||||
|
|
|
@ -190,9 +190,7 @@ class CMSParGCThreadState: public CHeapObj<mtGC> {
|
||||||
};
|
};
|
||||||
|
|
||||||
ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
|
ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
|
||||||
ReservedSpace rs, size_t initial_byte_size,
|
ReservedSpace rs, size_t initial_byte_size, CardTableRS* ct) :
|
||||||
CardTableRS* ct, bool use_adaptive_freelists,
|
|
||||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice dictionaryChoice) :
|
|
||||||
CardGeneration(rs, initial_byte_size, ct),
|
CardGeneration(rs, initial_byte_size, ct),
|
||||||
_dilatation_factor(((double)MinChunkSize)/((double)(CollectedHeap::min_fill_size()))),
|
_dilatation_factor(((double)MinChunkSize)/((double)(CollectedHeap::min_fill_size()))),
|
||||||
_did_compact(false)
|
_did_compact(false)
|
||||||
|
@ -208,9 +206,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
|
||||||
_numWordsAllocated = 0;
|
_numWordsAllocated = 0;
|
||||||
)
|
)
|
||||||
|
|
||||||
_cmsSpace = new CompactibleFreeListSpace(_bts, MemRegion(bottom, end),
|
_cmsSpace = new CompactibleFreeListSpace(_bts, MemRegion(bottom, end));
|
||||||
use_adaptive_freelists,
|
|
||||||
dictionaryChoice);
|
|
||||||
NOT_PRODUCT(debug_cms_space = _cmsSpace;)
|
NOT_PRODUCT(debug_cms_space = _cmsSpace;)
|
||||||
_cmsSpace->_old_gen = this;
|
_cmsSpace->_old_gen = this;
|
||||||
|
|
||||||
|
@ -1312,13 +1308,6 @@ bool ConcurrentMarkSweepGeneration::should_concurrent_collect() const {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (_cmsSpace->should_concurrent_collect()) {
|
|
||||||
if (PrintGCDetails && Verbose) {
|
|
||||||
gclog_or_tty->print(" %s: collect because cmsSpace says so ",
|
|
||||||
short_name());
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1766,9 +1755,8 @@ void CMSCollector::collect_in_background(GCCause::Cause cause) {
|
||||||
MutexLockerEx hl(Heap_lock, safepoint_check);
|
MutexLockerEx hl(Heap_lock, safepoint_check);
|
||||||
FreelistLocker fll(this);
|
FreelistLocker fll(this);
|
||||||
MutexLockerEx x(CGC_lock, safepoint_check);
|
MutexLockerEx x(CGC_lock, safepoint_check);
|
||||||
if (_foregroundGCIsActive || !UseAsyncConcMarkSweepGC) {
|
if (_foregroundGCIsActive) {
|
||||||
// The foreground collector is active or we're
|
// The foreground collector is. Skip this
|
||||||
// not using asynchronous collections. Skip this
|
|
||||||
// background collection.
|
// background collection.
|
||||||
assert(!_foregroundGCShouldWait, "Should be clear");
|
assert(!_foregroundGCShouldWait, "Should be clear");
|
||||||
return;
|
return;
|
||||||
|
@ -5214,9 +5202,8 @@ void CMSCollector::do_remark_non_parallel() {
|
||||||
|
|
||||||
verify_work_stacks_empty();
|
verify_work_stacks_empty();
|
||||||
// Restore evacuated mark words, if any, used for overflow list links
|
// Restore evacuated mark words, if any, used for overflow list links
|
||||||
if (!CMSOverflowEarlyRestoration) {
|
restore_preserved_marks_if_any();
|
||||||
restore_preserved_marks_if_any();
|
|
||||||
}
|
|
||||||
verify_overflow_empty();
|
verify_overflow_empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6186,17 +6173,8 @@ void MarkRefsIntoAndScanClosure::do_oop(oop obj) {
|
||||||
assert(_mark_stack->isEmpty(), "post-condition (eager drainage)");
|
assert(_mark_stack->isEmpty(), "post-condition (eager drainage)");
|
||||||
assert(_collector->overflow_list_is_empty(),
|
assert(_collector->overflow_list_is_empty(),
|
||||||
"overflow list was drained above");
|
"overflow list was drained above");
|
||||||
// We could restore evacuated mark words, if any, used for
|
|
||||||
// overflow list links here because the overflow list is
|
assert(_collector->no_preserved_marks(),
|
||||||
// provably empty here. That would reduce the maximum
|
|
||||||
// size requirements for preserved_{oop,mark}_stack.
|
|
||||||
// But we'll just postpone it until we are all done
|
|
||||||
// so we can just stream through.
|
|
||||||
if (!_concurrent_precleaning && CMSOverflowEarlyRestoration) {
|
|
||||||
_collector->restore_preserved_marks_if_any();
|
|
||||||
assert(_collector->no_preserved_marks(), "No preserved marks");
|
|
||||||
}
|
|
||||||
assert(!CMSOverflowEarlyRestoration || _collector->no_preserved_marks(),
|
|
||||||
"All preserved marks should have been restored above");
|
"All preserved marks should have been restored above");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7372,14 +7350,6 @@ void SweepClosure::initialize_free_range(HeapWord* freeFinger,
|
||||||
|
|
||||||
set_freeFinger(freeFinger);
|
set_freeFinger(freeFinger);
|
||||||
set_freeRangeInFreeLists(freeRangeInFreeLists);
|
set_freeRangeInFreeLists(freeRangeInFreeLists);
|
||||||
if (CMSTestInFreeList) {
|
|
||||||
if (freeRangeInFreeLists) {
|
|
||||||
FreeChunk* fc = (FreeChunk*) freeFinger;
|
|
||||||
assert(fc->is_free(), "A chunk on the free list should be free.");
|
|
||||||
assert(fc->size() > 0, "Free range should have a size");
|
|
||||||
assert(_sp->verify_chunk_in_free_list(fc), "Chunk is not in free lists");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that the sweeper runs concurrently with mutators. Thus,
|
// Note that the sweeper runs concurrently with mutators. Thus,
|
||||||
|
@ -7532,12 +7502,7 @@ size_t SweepClosure::do_blk_careful(HeapWord* addr) {
|
||||||
|
|
||||||
void SweepClosure::do_already_free_chunk(FreeChunk* fc) {
|
void SweepClosure::do_already_free_chunk(FreeChunk* fc) {
|
||||||
const size_t size = fc->size();
|
const size_t size = fc->size();
|
||||||
// Chunks that cannot be coalesced are not in the
|
|
||||||
// free lists.
|
|
||||||
if (CMSTestInFreeList && !fc->cantCoalesce()) {
|
|
||||||
assert(_sp->verify_chunk_in_free_list(fc),
|
|
||||||
"free chunk should be in free lists");
|
|
||||||
}
|
|
||||||
// a chunk that is already free, should not have been
|
// a chunk that is already free, should not have been
|
||||||
// marked in the bit map
|
// marked in the bit map
|
||||||
HeapWord* const addr = (HeapWord*) fc;
|
HeapWord* const addr = (HeapWord*) fc;
|
||||||
|
@ -7550,57 +7515,8 @@ void SweepClosure::do_already_free_chunk(FreeChunk* fc) {
|
||||||
// See the definition of cantCoalesce().
|
// See the definition of cantCoalesce().
|
||||||
if (!fc->cantCoalesce()) {
|
if (!fc->cantCoalesce()) {
|
||||||
// This chunk can potentially be coalesced.
|
// This chunk can potentially be coalesced.
|
||||||
if (_sp->adaptive_freelists()) {
|
// All the work is done in
|
||||||
// All the work is done in
|
do_post_free_or_garbage_chunk(fc, size);
|
||||||
do_post_free_or_garbage_chunk(fc, size);
|
|
||||||
} else { // Not adaptive free lists
|
|
||||||
// this is a free chunk that can potentially be coalesced by the sweeper;
|
|
||||||
if (!inFreeRange()) {
|
|
||||||
// if the next chunk is a free block that can't be coalesced
|
|
||||||
// it doesn't make sense to remove this chunk from the free lists
|
|
||||||
FreeChunk* nextChunk = (FreeChunk*)(addr + size);
|
|
||||||
assert((HeapWord*)nextChunk <= _sp->end(), "Chunk size out of bounds?");
|
|
||||||
if ((HeapWord*)nextChunk < _sp->end() && // There is another free chunk to the right ...
|
|
||||||
nextChunk->is_free() && // ... which is free...
|
|
||||||
nextChunk->cantCoalesce()) { // ... but can't be coalesced
|
|
||||||
// nothing to do
|
|
||||||
} else {
|
|
||||||
// Potentially the start of a new free range:
|
|
||||||
// Don't eagerly remove it from the free lists.
|
|
||||||
// No need to remove it if it will just be put
|
|
||||||
// back again. (Also from a pragmatic point of view
|
|
||||||
// if it is a free block in a region that is beyond
|
|
||||||
// any allocated blocks, an assertion will fail)
|
|
||||||
// Remember the start of a free run.
|
|
||||||
initialize_free_range(addr, true);
|
|
||||||
// end - can coalesce with next chunk
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// the midst of a free range, we are coalescing
|
|
||||||
print_free_block_coalesced(fc);
|
|
||||||
if (CMSTraceSweeper) {
|
|
||||||
gclog_or_tty->print(" -- pick up free block " PTR_FORMAT " (" SIZE_FORMAT ")\n", p2i(fc), size);
|
|
||||||
}
|
|
||||||
// remove it from the free lists
|
|
||||||
_sp->removeFreeChunkFromFreeLists(fc);
|
|
||||||
set_lastFreeRangeCoalesced(true);
|
|
||||||
// If the chunk is being coalesced and the current free range is
|
|
||||||
// in the free lists, remove the current free range so that it
|
|
||||||
// will be returned to the free lists in its entirety - all
|
|
||||||
// the coalesced pieces included.
|
|
||||||
if (freeRangeInFreeLists()) {
|
|
||||||
FreeChunk* ffc = (FreeChunk*) freeFinger();
|
|
||||||
assert(ffc->size() == pointer_delta(addr, freeFinger()),
|
|
||||||
"Size of free range is inconsistent with chunk size.");
|
|
||||||
if (CMSTestInFreeList) {
|
|
||||||
assert(_sp->verify_chunk_in_free_list(ffc),
|
|
||||||
"free range is not in free lists");
|
|
||||||
}
|
|
||||||
_sp->removeFreeChunkFromFreeLists(ffc);
|
|
||||||
set_freeRangeInFreeLists(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Note that if the chunk is not coalescable (the else arm
|
// Note that if the chunk is not coalescable (the else arm
|
||||||
// below), we unconditionally flush, without needing to do
|
// below), we unconditionally flush, without needing to do
|
||||||
// a "lookahead," as we do below.
|
// a "lookahead," as we do below.
|
||||||
|
@ -7626,46 +7542,11 @@ size_t SweepClosure::do_garbage_chunk(FreeChunk* fc) {
|
||||||
HeapWord* const addr = (HeapWord*) fc;
|
HeapWord* const addr = (HeapWord*) fc;
|
||||||
const size_t size = CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size());
|
const size_t size = CompactibleFreeListSpace::adjustObjectSize(oop(addr)->size());
|
||||||
|
|
||||||
if (_sp->adaptive_freelists()) {
|
// Verify that the bit map has no bits marked between
|
||||||
// Verify that the bit map has no bits marked between
|
// addr and purported end of just dead object.
|
||||||
// addr and purported end of just dead object.
|
_bitMap->verifyNoOneBitsInRange(addr + 1, addr + size);
|
||||||
_bitMap->verifyNoOneBitsInRange(addr + 1, addr + size);
|
do_post_free_or_garbage_chunk(fc, size);
|
||||||
|
|
||||||
do_post_free_or_garbage_chunk(fc, size);
|
|
||||||
} else {
|
|
||||||
if (!inFreeRange()) {
|
|
||||||
// start of a new free range
|
|
||||||
assert(size > 0, "A free range should have a size");
|
|
||||||
initialize_free_range(addr, false);
|
|
||||||
} else {
|
|
||||||
// this will be swept up when we hit the end of the
|
|
||||||
// free range
|
|
||||||
if (CMSTraceSweeper) {
|
|
||||||
gclog_or_tty->print(" -- pick up garbage " PTR_FORMAT " (" SIZE_FORMAT ")\n", p2i(fc), size);
|
|
||||||
}
|
|
||||||
// If the chunk is being coalesced and the current free range is
|
|
||||||
// in the free lists, remove the current free range so that it
|
|
||||||
// will be returned to the free lists in its entirety - all
|
|
||||||
// the coalesced pieces included.
|
|
||||||
if (freeRangeInFreeLists()) {
|
|
||||||
FreeChunk* ffc = (FreeChunk*)freeFinger();
|
|
||||||
assert(ffc->size() == pointer_delta(addr, freeFinger()),
|
|
||||||
"Size of free range is inconsistent with chunk size.");
|
|
||||||
if (CMSTestInFreeList) {
|
|
||||||
assert(_sp->verify_chunk_in_free_list(ffc),
|
|
||||||
"free range is not in free lists");
|
|
||||||
}
|
|
||||||
_sp->removeFreeChunkFromFreeLists(ffc);
|
|
||||||
set_freeRangeInFreeLists(false);
|
|
||||||
}
|
|
||||||
set_lastFreeRangeCoalesced(true);
|
|
||||||
}
|
|
||||||
// this will be swept up when we hit the end of the free range
|
|
||||||
|
|
||||||
// Verify that the bit map has no bits marked between
|
|
||||||
// addr and purported end of just dead object.
|
|
||||||
_bitMap->verifyNoOneBitsInRange(addr + 1, addr + size);
|
|
||||||
}
|
|
||||||
assert(_limit >= addr + size,
|
assert(_limit >= addr + size,
|
||||||
"A freshly garbage chunk can't possibly straddle over _limit");
|
"A freshly garbage chunk can't possibly straddle over _limit");
|
||||||
if (inFreeRange()) lookahead_and_flush(fc, size);
|
if (inFreeRange()) lookahead_and_flush(fc, size);
|
||||||
|
@ -7727,11 +7608,7 @@ void SweepClosure::do_post_free_or_garbage_chunk(FreeChunk* fc,
|
||||||
// do_post_free_or_garbage_chunk() should only be called in the case
|
// do_post_free_or_garbage_chunk() should only be called in the case
|
||||||
// of the adaptive free list allocator.
|
// of the adaptive free list allocator.
|
||||||
const bool fcInFreeLists = fc->is_free();
|
const bool fcInFreeLists = fc->is_free();
|
||||||
assert(_sp->adaptive_freelists(), "Should only be used in this case.");
|
|
||||||
assert((HeapWord*)fc <= _limit, "sweep invariant");
|
assert((HeapWord*)fc <= _limit, "sweep invariant");
|
||||||
if (CMSTestInFreeList && fcInFreeLists) {
|
|
||||||
assert(_sp->verify_chunk_in_free_list(fc), "free chunk is not in free lists");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CMSTraceSweeper) {
|
if (CMSTraceSweeper) {
|
||||||
gclog_or_tty->print_cr(" -- pick up another chunk at " PTR_FORMAT " (" SIZE_FORMAT ")", p2i(fc), chunkSize);
|
gclog_or_tty->print_cr(" -- pick up another chunk at " PTR_FORMAT " (" SIZE_FORMAT ")", p2i(fc), chunkSize);
|
||||||
|
@ -7784,10 +7661,6 @@ void SweepClosure::do_post_free_or_garbage_chunk(FreeChunk* fc,
|
||||||
FreeChunk* const ffc = (FreeChunk*)freeFinger();
|
FreeChunk* const ffc = (FreeChunk*)freeFinger();
|
||||||
assert(ffc->size() == pointer_delta(fc_addr, freeFinger()),
|
assert(ffc->size() == pointer_delta(fc_addr, freeFinger()),
|
||||||
"Size of free range is inconsistent with chunk size.");
|
"Size of free range is inconsistent with chunk size.");
|
||||||
if (CMSTestInFreeList) {
|
|
||||||
assert(_sp->verify_chunk_in_free_list(ffc),
|
|
||||||
"Chunk is not in free lists");
|
|
||||||
}
|
|
||||||
_sp->coalDeath(ffc->size());
|
_sp->coalDeath(ffc->size());
|
||||||
_sp->removeFreeChunkFromFreeLists(ffc);
|
_sp->removeFreeChunkFromFreeLists(ffc);
|
||||||
set_freeRangeInFreeLists(false);
|
set_freeRangeInFreeLists(false);
|
||||||
|
@ -7856,12 +7729,6 @@ void SweepClosure::flush_cur_free_chunk(HeapWord* chunk, size_t size) {
|
||||||
assert(size > 0,
|
assert(size > 0,
|
||||||
"A zero sized chunk cannot be added to the free lists.");
|
"A zero sized chunk cannot be added to the free lists.");
|
||||||
if (!freeRangeInFreeLists()) {
|
if (!freeRangeInFreeLists()) {
|
||||||
if (CMSTestInFreeList) {
|
|
||||||
FreeChunk* fc = (FreeChunk*) chunk;
|
|
||||||
fc->set_size(size);
|
|
||||||
assert(!_sp->verify_chunk_in_free_list(fc),
|
|
||||||
"chunk should not be in free lists yet");
|
|
||||||
}
|
|
||||||
if (CMSTraceSweeper) {
|
if (CMSTraceSweeper) {
|
||||||
gclog_or_tty->print_cr(" -- add free block " PTR_FORMAT " (" SIZE_FORMAT ") to free lists",
|
gclog_or_tty->print_cr(" -- add free block " PTR_FORMAT " (" SIZE_FORMAT ") to free lists",
|
||||||
p2i(chunk), size);
|
p2i(chunk), size);
|
||||||
|
|
|
@ -1076,10 +1076,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
|
||||||
void assert_correct_size_change_locking();
|
void assert_correct_size_change_locking();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size,
|
ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size, CardTableRS* ct);
|
||||||
CardTableRS* ct,
|
|
||||||
bool use_adaptive_freelists,
|
|
||||||
FreeBlockDictionary<FreeChunk>::DictionaryChoice);
|
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
CMSCollector* collector() const { return _collector; }
|
CMSCollector* collector() const { return _collector; }
|
||||||
|
|
|
@ -138,7 +138,6 @@ class VM_GenCollectFullConcurrent: public VM_GC_Operation {
|
||||||
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
|
: VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
|
||||||
{
|
{
|
||||||
assert(FullGCCount_lock != NULL, "Error");
|
assert(FullGCCount_lock != NULL, "Error");
|
||||||
assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
|
|
||||||
}
|
}
|
||||||
~VM_GenCollectFullConcurrent() {}
|
~VM_GenCollectFullConcurrent() {}
|
||||||
virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
|
virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
|
||||||
|
|
|
@ -58,9 +58,7 @@ Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) {
|
||||||
// else registers with an existing CMSCollector
|
// else registers with an existing CMSCollector
|
||||||
|
|
||||||
ConcurrentMarkSweepGeneration* g = NULL;
|
ConcurrentMarkSweepGeneration* g = NULL;
|
||||||
g = new ConcurrentMarkSweepGeneration(rs,
|
g = new ConcurrentMarkSweepGeneration(rs, init_size(), remset);
|
||||||
init_size(), remset, UseCMSAdaptiveFreeLists,
|
|
||||||
(FreeBlockDictionary<FreeChunk>::DictionaryChoice)CMSDictionaryChoice);
|
|
||||||
|
|
||||||
g->initialize_performance_counters();
|
g->initialize_performance_counters();
|
||||||
|
|
||||||
|
|
|
@ -2469,16 +2469,6 @@ bool Arguments::check_vm_args_consistency() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: only executed in non-PRODUCT mode
|
|
||||||
if (!UseAsyncConcMarkSweepGC &&
|
|
||||||
(ExplicitGCInvokesConcurrent ||
|
|
||||||
ExplicitGCInvokesConcurrentAndUnloadsClasses)) {
|
|
||||||
jio_fprintf(defaultStream::error_stream(),
|
|
||||||
"error: +ExplicitGCInvokesConcurrent[AndUnloadsClasses] conflicts"
|
|
||||||
" with -UseAsyncConcMarkSweepGC");
|
|
||||||
status = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PrintNMTStatistics) {
|
if (PrintNMTStatistics) {
|
||||||
#if INCLUDE_NMT
|
#if INCLUDE_NMT
|
||||||
if (MemTracker::tracking_level() == NMT_off) {
|
if (MemTracker::tracking_level() == NMT_off) {
|
||||||
|
|
|
@ -1622,12 +1622,6 @@ public:
|
||||||
"Number of times to retry allocations when " \
|
"Number of times to retry allocations when " \
|
||||||
"blocked by the GC locker") \
|
"blocked by the GC locker") \
|
||||||
\
|
\
|
||||||
develop(bool, UseCMSAdaptiveFreeLists, true, \
|
|
||||||
"Use adaptive free lists in the CMS generation") \
|
|
||||||
\
|
|
||||||
develop(bool, UseAsyncConcMarkSweepGC, true, \
|
|
||||||
"Use Asynchronous Concurrent Mark-Sweep GC in the old generation")\
|
|
||||||
\
|
|
||||||
product(bool, UseCMSBestFit, true, \
|
product(bool, UseCMSBestFit, true, \
|
||||||
"Use CMS best fit allocation strategy") \
|
"Use CMS best fit allocation strategy") \
|
||||||
\
|
\
|
||||||
|
@ -1822,10 +1816,6 @@ public:
|
||||||
"When CMS class unloading is enabled, the maximum CMS cycle " \
|
"When CMS class unloading is enabled, the maximum CMS cycle " \
|
||||||
"count for which classes may not be unloaded") \
|
"count for which classes may not be unloaded") \
|
||||||
\
|
\
|
||||||
develop(intx, CMSDictionaryChoice, 0, \
|
|
||||||
"Use BinaryTreeDictionary as default in the CMS generation") \
|
|
||||||
range(0, 2) \
|
|
||||||
\
|
|
||||||
product(uintx, CMSIndexedFreeListReplenish, 4, \
|
product(uintx, CMSIndexedFreeListReplenish, 4, \
|
||||||
"Replenish an indexed free list with this number of chunks") \
|
"Replenish an indexed free list with this number of chunks") \
|
||||||
range(1, max_uintx) \
|
range(1, max_uintx) \
|
||||||
|
@ -1840,9 +1830,6 @@ public:
|
||||||
product(bool, CMSLoopWarn, false, \
|
product(bool, CMSLoopWarn, false, \
|
||||||
"Warn in case of excessive CMS looping") \
|
"Warn in case of excessive CMS looping") \
|
||||||
\
|
\
|
||||||
develop(bool, CMSOverflowEarlyRestoration, false, \
|
|
||||||
"Restore preserved marks early") \
|
|
||||||
\
|
|
||||||
/* where does the range max value of (max_jint - 1) come from? */ \
|
/* where does the range max value of (max_jint - 1) come from? */ \
|
||||||
product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M), \
|
product(size_t, MarkStackSizeMax, NOT_LP64(4*M) LP64_ONLY(512*M), \
|
||||||
"Maximum size of marking stack") \
|
"Maximum size of marking stack") \
|
||||||
|
@ -2080,10 +2067,6 @@ public:
|
||||||
"unloading of classes when class unloading is enabled") \
|
"unloading of classes when class unloading is enabled") \
|
||||||
range(0, 100) \
|
range(0, 100) \
|
||||||
\
|
\
|
||||||
develop(bool, CMSTestInFreeList, false, \
|
|
||||||
"Check if the coalesced range is already in the " \
|
|
||||||
"free lists as claimed") \
|
|
||||||
\
|
|
||||||
notproduct(bool, CMSVerifyReturnedBytes, false, \
|
notproduct(bool, CMSVerifyReturnedBytes, false, \
|
||||||
"Check that all the garbage collected was returned to the " \
|
"Check that all the garbage collected was returned to the " \
|
||||||
"free lists") \
|
"free lists") \
|
||||||
|
|
|
@ -243,6 +243,9 @@ hotspot_%:
|
||||||
$(ECHO) "Running tests: $@"
|
$(ECHO) "Running tests: $@"
|
||||||
$(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
|
$(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
|
||||||
|
|
||||||
|
hotspot_internal:
|
||||||
|
$(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version
|
||||||
|
|
||||||
# Prep for output
|
# Prep for output
|
||||||
prep: clean
|
prep: clean
|
||||||
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
|
@$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
* @bug 8136421
|
* @bug 8136421
|
||||||
* @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
|
* @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
|
||||||
* @library /testlibrary /../../test/lib /
|
* @library /testlibrary /../../test/lib /
|
||||||
|
* @ignore 8139385
|
||||||
* @compile ../common/CompilerToVMHelper.java
|
* @compile ../common/CompilerToVMHelper.java
|
||||||
* @build sun.hotspot.WhiteBox
|
* @build sun.hotspot.WhiteBox
|
||||||
* compiler.jvmci.compilerToVM.GetConstantPoolTest
|
* compiler.jvmci.compilerToVM.GetConstantPoolTest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue