mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 09:58:43 +00:00
Merge
This commit is contained in:
commit
49193e2789
1
.hgtags
1
.hgtags
@ -551,3 +551,4 @@ b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33
|
||||
1d7aec80147a6d92b101a76aef92f3ddc88bedf4 jdk-13+12
|
||||
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12-ga
|
||||
83cace4142c8563b6a921787db02388e1bc48d01 jdk-13+13
|
||||
46cf212cdccaf4fb064d913b12004007d3322b67 jdk-13+14
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
<p>This new way of running tests is developer-centric. It assumes that you have built a JDK locally and want to test it. Running common test targets is simple, and more complex ad-hoc combination of tests is possible. The user interface is forgiving, and clearly report errors it cannot resolve.</p>
|
||||
<p>The main target <code>test</code> uses the jdk-image as the tested product. There is also an alternate target <code>exploded-test</code> that uses the exploded image instead. Not all tests will run successfully on the exploded image, but using this target can greatly improve rebuild times for certain workflows.</p>
|
||||
<p>Previously, <code>make test</code> was used invoke an old system for running test, and <code>make run-test</code> was used for the new test framework. For backward compatibility with scripts and muscle memory, <code>run-test</code> (and variants like <code>exploded-run-test</code> or <code>run-test-tier1</code>) are kept as aliases. The old system can still be accessed for some time using <code>cd test && make</code>.</p>
|
||||
<p>Previously, <code>make test</code> was used to invoke an old system for running tests, and <code>make run-test</code> was used for the new test framework. For backward compatibility with scripts and muscle memory, <code>run-test</code> (and variants like <code>exploded-run-test</code> or <code>run-test-tier1</code>) are kept as aliases.</p>
|
||||
<p>Some example command-lines:</p>
|
||||
<pre><code>$ make test-tier1
|
||||
$ make test-jdk_lang JTREG="JOBS=8"
|
||||
|
||||
@ -12,11 +12,10 @@ also an alternate target `exploded-test` that uses the exploded image
|
||||
instead. Not all tests will run successfully on the exploded image, but using
|
||||
this target can greatly improve rebuild times for certain workflows.
|
||||
|
||||
Previously, `make test` was used invoke an old system for running test, and
|
||||
Previously, `make test` was used to invoke an old system for running tests, and
|
||||
`make run-test` was used for the new test framework. For backward compatibility
|
||||
with scripts and muscle memory, `run-test` (and variants like
|
||||
`exploded-run-test` or `run-test-tier1`) are kept as aliases. The old system
|
||||
can still be accessed for some time using `cd test && make`.
|
||||
`exploded-run-test` or `run-test-tier1`) are kept as aliases.
|
||||
|
||||
Some example command-lines:
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2019, 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
|
||||
@ -29,6 +29,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
PRODUCT_TARGETS :=
|
||||
LEGACY_TARGETS :=
|
||||
TEST_TARGETS :=
|
||||
DOCS_TARGETS :=
|
||||
|
||||
@ -146,19 +147,25 @@ endef
|
||||
# correct base directories.
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
JDK_IMAGE_DIR := $(JDK_MACOSX_BUNDLE_DIR)
|
||||
JRE_IMAGE_DIR := $(JRE_MACOSX_BUNDLE_DIR)
|
||||
JDK_IMAGE_HOMEDIR := $(JDK_MACOSX_CONTENTS_DIR)/Home
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_MACOSX_CONTENTS_DIR)/Home
|
||||
JDK_BUNDLE_SUBDIR :=
|
||||
JRE_BUNDLE_SUBDIR :=
|
||||
else
|
||||
JDK_IMAGE_HOMEDIR := $(JDK_IMAGE_DIR)
|
||||
JRE_IMAGE_HOMEDIR := $(JRE_IMAGE_DIR)
|
||||
JDK_BUNDLE_SUBDIR := jdk-$(VERSION_NUMBER)
|
||||
JRE_BUNDLE_SUBDIR := jre-$(VERSION_NUMBER)
|
||||
ifneq ($(DEBUG_LEVEL), release)
|
||||
JDK_BUNDLE_SUBDIR := $(JDK_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
JRE_BUNDLE_SUBDIR := $(JRE_BUNDLE_SUBDIR)/$(DEBUG_LEVEL)
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
|
||||
ifneq ($(filter product-bundles legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(eval $(call FillCacheFind, $(IMAGES_OUTPUTDIR)))
|
||||
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
|
||||
@ -198,6 +205,22 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
|
||||
|
||||
ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
|
||||
|
||||
# Create special filter rules when dealing with unzipped .dSYM directories on
|
||||
# macosx
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), false)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := $(addprefix %, \
|
||||
$(call containing, .dSYM/, $(patsubst $(JRE_IMAGE_DIR)/%, %, $(ALL_JRE_FILES))))
|
||||
endif
|
||||
endif
|
||||
|
||||
JRE_BUNDLE_FILES := $(filter-out \
|
||||
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
@ -208,6 +231,15 @@ ifneq ($(filter product-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
|
||||
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
|
||||
@ -283,6 +315,7 @@ $(eval $(call IncludeCustomExtension, Bundles.gmk))
|
||||
################################################################################
|
||||
|
||||
product-bundles: $(PRODUCT_TARGETS)
|
||||
legacy-bundles: $(LEGACY_TARGETS)
|
||||
test-bundles: $(TEST_TARGETS)
|
||||
docs-bundles: $(DOCS_TARGETS)
|
||||
jcov-bundles: $(JCOV_TARGETS)
|
||||
|
||||
@ -581,6 +581,9 @@ ALL_TARGETS += test exploded-test jcov-test
|
||||
product-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
|
||||
|
||||
legacy-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk legacy-bundles)
|
||||
|
||||
test-bundles:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk test-bundles)
|
||||
|
||||
@ -592,7 +595,7 @@ ifeq ($(JCOV_ENABLED), true)
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
|
||||
endif
|
||||
|
||||
ALL_TARGETS += product-bundles test-bundles docs-bundles jcov-bundles
|
||||
ALL_TARGETS += product-bundles legacy-bundles test-bundles docs-bundles jcov-bundles
|
||||
|
||||
################################################################################
|
||||
# Install targets
|
||||
@ -918,6 +921,8 @@ else
|
||||
|
||||
product-bundles: product-images
|
||||
|
||||
legacy-bundles: legacy-images
|
||||
|
||||
test-bundles: test-image
|
||||
|
||||
docs-bundles: docs-image
|
||||
@ -1020,6 +1025,9 @@ mac-bundles: mac-jdk-bundle
|
||||
# (and possibly other, more specific versions)
|
||||
product-images: jdk-image symbols-image exploded-image
|
||||
|
||||
# This target builds the legacy images, e.g. the legacy JRE image
|
||||
legacy-images: legacy-jre-image
|
||||
|
||||
# zip-security is actually a bundle, but for now it needs to be considered
|
||||
# an image until this can be cleaned up properly.
|
||||
product-images: zip-security
|
||||
@ -1036,6 +1044,8 @@ endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
product-images: mac-jdk-bundle
|
||||
|
||||
legacy-images: mac-legacy-jre-bundle
|
||||
endif
|
||||
|
||||
# This target builds the documentation image
|
||||
@ -1070,7 +1080,7 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
|
||||
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
|
||||
exploded-image-base exploded-image \
|
||||
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
|
||||
docs-javase docs-reference docs-javadoc mac-bundles product-images \
|
||||
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
|
||||
docs-image test-image all-images \
|
||||
all-bundles
|
||||
|
||||
|
||||
@ -460,6 +460,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# We could define --with flags for these, if really needed
|
||||
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
|
||||
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
|
||||
JDK_SOURCE_TARGET_VERSION="$DEFAULT_JDK_SOURCE_TARGET_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([for version string])
|
||||
AC_MSG_RESULT([$VERSION_STRING])
|
||||
@ -483,5 +484,5 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_SUBST(VENDOR_VERSION_STRING)
|
||||
AC_SUBST(VERSION_CLASSFILE_MAJOR)
|
||||
AC_SUBST(VERSION_CLASSFILE_MINOR)
|
||||
|
||||
AC_SUBST(JDK_SOURCE_TARGET_VERSION)
|
||||
])
|
||||
|
||||
@ -119,7 +119,7 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
|
||||
if test "x$X11_HEADERS_OK" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([x11])
|
||||
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrander.h XTest.h Intrinsic.h). $HELP_MSG])
|
||||
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h Xrandr.h XTest.h Intrinsic.h). $HELP_MSG])
|
||||
fi
|
||||
|
||||
# If XLinearGradient isn't available in Xrender.h, signal that it needs to be
|
||||
|
||||
@ -208,6 +208,8 @@ VENDOR_VERSION_STRING := @VENDOR_VERSION_STRING@
|
||||
VERSION_CLASSFILE_MAJOR := @VERSION_CLASSFILE_MAJOR@
|
||||
VERSION_CLASSFILE_MINOR := @VERSION_CLASSFILE_MINOR@
|
||||
|
||||
JDK_SOURCE_TARGET_VERSION := @JDK_SOURCE_TARGET_VERSION@
|
||||
|
||||
# Convenience CFLAGS settings for passing version information into native programs.
|
||||
VERSION_CFLAGS := \
|
||||
-DVERSION_FEATURE=$(VERSION_FEATURE) \
|
||||
@ -904,6 +906,7 @@ else
|
||||
JDK_BUNDLE_EXTENSION := tar.gz
|
||||
endif
|
||||
JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
|
||||
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
|
||||
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
|
||||
@ -911,6 +914,7 @@ DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
|
||||
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
|
||||
|
||||
JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
|
||||
JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
|
||||
JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
|
||||
TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
|
||||
TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
|
||||
|
||||
@ -87,6 +87,7 @@ VS_SDK_INSTALLDIR_2017=
|
||||
VS_VS_PLATFORM_NAME_2017="v141"
|
||||
VS_SDK_PLATFORM_NAME_2017=
|
||||
VS_SUPPORTED_2017=true
|
||||
VS_TOOLSET_SUPPORTED_2017=true
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -177,6 +178,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
# build environment and assigns it to VS_ENV_CMD
|
||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[
|
||||
# VS2017 provides the option to install previous minor versions of the MSVC
|
||||
# toolsets. It is not possible to directly download earlier minor versions of
|
||||
# VS2017 and in order to build with a previous minor compiler toolset version,
|
||||
# it is now possible to compile with earlier minor versions by passing
|
||||
# -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
|
||||
AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
|
||||
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
|
||||
pass to vcvarsall.bat (Windows only)])])
|
||||
|
||||
VS_VERSION="$1"
|
||||
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
|
||||
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
|
||||
@ -184,6 +194,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
|
||||
eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
|
||||
eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
|
||||
eval VS_TOOLSET_SUPPORTED="\${VS_TOOLSET_SUPPORTED_${VS_VERSION}}"
|
||||
|
||||
# When using --with-tools-dir, assume it points to the correct and default
|
||||
# version of Visual Studio or that --with-toolchain-version was also set.
|
||||
@ -240,6 +251,12 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
|
||||
[C:/Program Files (x86)/$SDK_INSTALL_DIR], [well-known name])
|
||||
fi
|
||||
|
||||
if test "x$VS_TOOLSET_SUPPORTED" != x; then
|
||||
if test "x$with_msvc_toolset_version" != x; then
|
||||
VS_ENV_ARGS="$VS_ENV_ARGS -vcvars_ver=$with_msvc_toolset_version"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -423,6 +440,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO 'echo VCINSTALLDIR="%VCINSTALLDIR% " >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO 'echo VCToolsRedistDir="%VCToolsRedistDir% " >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO 'echo WindowsSdkDir="%WindowsSdkDir% " >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO 'echo WINDOWSSDKDIR="%WINDOWSSDKDIR% " >> set-vs-env.sh' \
|
||||
@ -440,6 +459,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
|
||||
>> $EXTRACT_VC_ENV_BAT_FILE
|
||||
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
|
||||
@ -517,6 +538,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
|
||||
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
|
||||
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
|
||||
VCToolsRedistDir=`$ECHO "$VCToolsRedistDir" | $SED 's/\\\\* *$//'`
|
||||
WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
|
||||
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
|
||||
if test -z "$WINDOWSSDKDIR"; then
|
||||
@ -638,11 +660,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
|
||||
fi
|
||||
else
|
||||
CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir"
|
||||
BASIC_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
|
||||
# Probe: Using well-known location from VS 2017
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
else
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
fi
|
||||
fi
|
||||
# In case any of the above finds more than one file, loop over them.
|
||||
|
||||
@ -35,7 +35,8 @@ DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2019-09-17
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=57 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12 13"
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="12 13"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=13
|
||||
|
||||
LAUNCHER_NAME=openjdk
|
||||
PRODUCT_NAME=OpenJDK
|
||||
|
||||
@ -53,6 +53,7 @@ define FindJtregGroupsBody
|
||||
-e 's/^groups\w*=//p' $1/TEST.ROOT)
|
||||
$1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES))
|
||||
$1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \
|
||||
-e 's/^\#.*//g' \
|
||||
-e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \
|
||||
| $$(SORT) -u))
|
||||
endif
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
# RUN_V11:=Set to run rmic with -v1.1
|
||||
# RUN_V12:=Set to run rmic with -v1.2
|
||||
# KEEP_GENERATED:=Set to keep generated sources around
|
||||
# STUB_SOURCES_DIR:=Directory to put generated sources in
|
||||
SetupRMICompilation = $(NamedParamsMacroTemplate)
|
||||
define SetupRMICompilationBody
|
||||
|
||||
@ -58,9 +59,16 @@ define SetupRMICompilationBody
|
||||
$1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
$1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES)))
|
||||
|
||||
ifneq (,$$($1_KEEP_GENERATED))
|
||||
ifneq ($$($1_KEEP_GENERATED), )
|
||||
$1_ARGS += -keepgenerated
|
||||
$1_TARGETS += $$(subst .class,.java,$$($1_TARGETS))
|
||||
$1_JAVA_TARGETS := $$(subst .class,.java,$$($1_TARGETS))
|
||||
ifneq ($$($1_STUB_SOURCES_DIR), )
|
||||
# This is where the java files are created by rmic
|
||||
$1_JAVA_TARGETS_REL := $$(subst $$($1_STUB_CLASSES_DIR),, $$($1_JAVA_TARGETS))
|
||||
# This is where the caller wants the java files
|
||||
$1_JAVA_TARGETS := $$(addprefix $$($1_STUB_SOURCES_DIR), $$($1_JAVA_TARGETS_REL))
|
||||
endif
|
||||
$1_TARGETS += $$($1_JAVA_TARGETS)
|
||||
endif
|
||||
|
||||
$1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES))
|
||||
@ -72,11 +80,12 @@ define SetupRMICompilationBody
|
||||
$$(call MakeDir, $$($1_STUB_CLASSES_DIR))
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
fi; \
|
||||
$$(if $$($1_STUB_SOURCES_DIR), \
|
||||
$$(foreach f, $$($1_JAVA_TARGETS_REL), \
|
||||
$(MKDIR) -p $$(dir $$($1_STUB_SOURCES_DIR)/$$f) ; \
|
||||
$(MV) $$($1_STUB_CLASSES_DIR)/$$f $$($1_STUB_SOURCES_DIR)/$$f ; \
|
||||
) \
|
||||
) \
|
||||
$(TOUCH) $$@
|
||||
|
||||
|
||||
|
||||
@ -33,6 +33,9 @@ include JavaCompilation.gmk
|
||||
|
||||
DISABLE_WARNINGS ?= -Xlint:all,-deprecation,-removal,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
|
||||
|
||||
JDK_SOURCE_TARGET_FLAGS := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||
|
||||
# If warnings needs to be non-fatal for testing purposes use a command like:
|
||||
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
|
||||
JAVAC_WARNINGS ?= -Xlint:all -Werror
|
||||
@ -72,7 +75,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -source 13 -target 13 --doclint-format html5 \
|
||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) --doclint-format html5 \
|
||||
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
@ -82,7 +85,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
|
||||
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
|
||||
JVM := $(JAVA_JAVAC), \
|
||||
JAVAC := $(NEW_JAVAC), \
|
||||
FLAGS := -source 13 -target 13 \
|
||||
FLAGS := $(JDK_SOURCE_TARGET_FLAGS) \
|
||||
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
|
||||
|
||||
@ -365,7 +365,8 @@ var getJibProfilesCommon = function (input, data) {
|
||||
};
|
||||
};
|
||||
|
||||
common.boot_jdk_version = "11";
|
||||
common.boot_jdk_version = "12";
|
||||
common.boot_jdk_build_number = "33";
|
||||
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
|
||||
+ common.boot_jdk_version
|
||||
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
|
||||
@ -754,7 +755,11 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles[cmpBaselineName] = clone(profiles[name + suffix]);
|
||||
// Only compare the images target. This should pressumably be expanded
|
||||
// to include more build targets when possible.
|
||||
profiles[cmpBaselineName].default_make_targets = [ "images" ];
|
||||
profiles[cmpBaselineName].default_make_targets = [ "images", "test-image" ];
|
||||
if (name == "linux-x64") {
|
||||
profiles[cmpBaselineName].default_make_targets
|
||||
= concat(profiles[cmpBaselineName].default_make_targets, "docs");
|
||||
}
|
||||
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
|
||||
// Do not inherit artifact definitions from base profile
|
||||
delete profiles[cmpBaselineName].artifacts;
|
||||
@ -980,7 +985,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
server: "jpg",
|
||||
product: "jdk",
|
||||
version: common.boot_jdk_version,
|
||||
build_number: "28",
|
||||
build_number: common.boot_jdk_build_number,
|
||||
file: "bundles/" + boot_jdk_platform + "/jdk-" + common.boot_jdk_version + "_"
|
||||
+ boot_jdk_platform + "_bin" + boot_jdk_ext,
|
||||
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
|
||||
|
||||
@ -3633,7 +3633,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
|
||||
<era type="233">大正</era>
|
||||
<era type="234">昭和</era>
|
||||
<era type="235">平成</era>
|
||||
<era type="236">元号</era> <!-- NewEra -->
|
||||
<era type="236">令和</era>
|
||||
</eraAbbr>
|
||||
<eraNarrow>
|
||||
<era type="0">大化</era>
|
||||
@ -3872,7 +3872,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
|
||||
<era type="233">T</era>
|
||||
<era type="234">S</era>
|
||||
<era type="235">H</era>
|
||||
<era type="236">N</era> <!-- NewEra -->
|
||||
<era type="236">R</era>
|
||||
</eraNarrow>
|
||||
</eras>
|
||||
<dateFormats>
|
||||
|
||||
@ -2030,7 +2030,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
|
||||
<era type="233">Taishō</era>
|
||||
<era type="234">Shōwa</era>
|
||||
<era type="235">Heisei</era>
|
||||
<era type="236">NewEra</era> <!-- NewEra -->
|
||||
<era type="236">Reiwa</era>
|
||||
</eraAbbr>
|
||||
<eraNarrow>
|
||||
<era type="0">Taika (645–650)</era>
|
||||
@ -2269,7 +2269,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
|
||||
<era type="233">T</era>
|
||||
<era type="234">S</era>
|
||||
<era type="235">H</era>
|
||||
<era type="236">N</era> <!-- NewEra -->
|
||||
<era type="236">R</era>
|
||||
</eraNarrow>
|
||||
</eras>
|
||||
<dateFormats>
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
Github: https://raw.githubusercontent.com/publicsuffix/list/2225db8d9f4a2a27ec697c883360632fa0c16261/public_suffix_list.dat
|
||||
Date: 2018-05-24
|
||||
Github: https://raw.githubusercontent.com/publicsuffix/list/ce0d1a5fba657e55adea3abde4b7f1e50636ff10/public_suffix_list.dat
|
||||
Date: 2019-01-28
|
||||
|
||||
@ -381,8 +381,13 @@ gov.bm
|
||||
net.bm
|
||||
org.bm
|
||||
|
||||
// bn : https://en.wikipedia.org/wiki/.bn
|
||||
*.bn
|
||||
// bn : http://www.bnnic.bn/faqs
|
||||
bn
|
||||
com.bn
|
||||
edu.bn
|
||||
gov.bn
|
||||
net.bn
|
||||
org.bn
|
||||
|
||||
// bo : https://nic.bo/delegacion2015.php#h-1.10
|
||||
bo
|
||||
@ -546,6 +551,7 @@ niteroi.br
|
||||
not.br
|
||||
ntr.br
|
||||
odo.br
|
||||
ong.br
|
||||
org.br
|
||||
osasco.br
|
||||
palmas.br
|
||||
@ -1239,7 +1245,7 @@ tozsde.hu
|
||||
utazas.hu
|
||||
video.hu
|
||||
|
||||
// id : https://register.pandi.or.id/
|
||||
// id : https://pandi.id/en/domain/registration-requirements/
|
||||
id
|
||||
ac.id
|
||||
biz.id
|
||||
@ -1250,6 +1256,7 @@ mil.id
|
||||
my.id
|
||||
net.id
|
||||
or.id
|
||||
ponpes.id
|
||||
sch.id
|
||||
web.id
|
||||
|
||||
@ -1407,9 +1414,9 @@ taa.it
|
||||
tos.it
|
||||
toscana.it
|
||||
trentin-sud-tirol.it
|
||||
trentin-süd-tirol.it
|
||||
trentin-süd-tirol.it
|
||||
trentin-sudtirol.it
|
||||
trentin-südtirol.it
|
||||
trentin-südtirol.it
|
||||
trentin-sued-tirol.it
|
||||
trentin-suedtirol.it
|
||||
trentino-a-adige.it
|
||||
@ -1419,9 +1426,9 @@ trentino-altoadige.it
|
||||
trentino-s-tirol.it
|
||||
trentino-stirol.it
|
||||
trentino-sud-tirol.it
|
||||
trentino-süd-tirol.it
|
||||
trentino-süd-tirol.it
|
||||
trentino-sudtirol.it
|
||||
trentino-südtirol.it
|
||||
trentino-südtirol.it
|
||||
trentino-sued-tirol.it
|
||||
trentino-suedtirol.it
|
||||
trentino.it
|
||||
@ -1432,15 +1439,15 @@ trentinoaltoadige.it
|
||||
trentinos-tirol.it
|
||||
trentinostirol.it
|
||||
trentinosud-tirol.it
|
||||
trentinosüd-tirol.it
|
||||
trentinosüd-tirol.it
|
||||
trentinosudtirol.it
|
||||
trentinosüdtirol.it
|
||||
trentinosüdtirol.it
|
||||
trentinosued-tirol.it
|
||||
trentinosuedtirol.it
|
||||
trentinsud-tirol.it
|
||||
trentinsüd-tirol.it
|
||||
trentinsüd-tirol.it
|
||||
trentinsudtirol.it
|
||||
trentinsüdtirol.it
|
||||
trentinsüdtirol.it
|
||||
trentinsued-tirol.it
|
||||
trentinsuedtirol.it
|
||||
tuscany.it
|
||||
@ -1457,13 +1464,13 @@ valleaosta.it
|
||||
valled-aosta.it
|
||||
valledaosta.it
|
||||
vallee-aoste.it
|
||||
vallée-aoste.it
|
||||
vallée-aoste.it
|
||||
vallee-d-aoste.it
|
||||
vallée-d-aoste.it
|
||||
vallée-d-aoste.it
|
||||
valleeaoste.it
|
||||
valléeaoste.it
|
||||
valléeaoste.it
|
||||
valleedaoste.it
|
||||
valléedaoste.it
|
||||
valléedaoste.it
|
||||
vao.it
|
||||
vda.it
|
||||
ven.it
|
||||
@ -1497,7 +1504,7 @@ av.it
|
||||
avellino.it
|
||||
ba.it
|
||||
balsan-sudtirol.it
|
||||
balsan-südtirol.it
|
||||
balsan-südtirol.it
|
||||
balsan-suedtirol.it
|
||||
balsan.it
|
||||
bari.it
|
||||
@ -1516,7 +1523,7 @@ bologna.it
|
||||
bolzano-altoadige.it
|
||||
bolzano.it
|
||||
bozen-sudtirol.it
|
||||
bozen-südtirol.it
|
||||
bozen-südtirol.it
|
||||
bozen-suedtirol.it
|
||||
bozen.it
|
||||
br.it
|
||||
@ -1525,7 +1532,7 @@ brindisi.it
|
||||
bs.it
|
||||
bt.it
|
||||
bulsan-sudtirol.it
|
||||
bulsan-südtirol.it
|
||||
bulsan-südtirol.it
|
||||
bulsan-suedtirol.it
|
||||
bulsan.it
|
||||
bz.it
|
||||
@ -1545,9 +1552,9 @@ catanzaro.it
|
||||
cb.it
|
||||
ce.it
|
||||
cesena-forli.it
|
||||
cesena-forlì.it
|
||||
cesena-forlì.it
|
||||
cesenaforli.it
|
||||
cesenaforlì.it
|
||||
cesenaforlì.it
|
||||
ch.it
|
||||
chieti.it
|
||||
ci.it
|
||||
@ -1578,9 +1585,9 @@ florence.it
|
||||
fm.it
|
||||
foggia.it
|
||||
forli-cesena.it
|
||||
forlì-cesena.it
|
||||
forlì-cesena.it
|
||||
forlicesena.it
|
||||
forlìcesena.it
|
||||
forlìcesena.it
|
||||
fr.it
|
||||
frosinone.it
|
||||
ge.it
|
||||
@ -1711,7 +1718,7 @@ sp.it
|
||||
sr.it
|
||||
ss.it
|
||||
suedtirol.it
|
||||
südtirol.it
|
||||
südtirol.it
|
||||
sv.it
|
||||
ta.it
|
||||
taranto.it
|
||||
@ -3692,8 +3699,16 @@ jeonnam.kr
|
||||
seoul.kr
|
||||
ulsan.kr
|
||||
|
||||
// kw : https://en.wikipedia.org/wiki/.kw
|
||||
*.kw
|
||||
// kw : https://www.nic.kw/policies/
|
||||
// Confirmed by registry <nic.tech@citra.gov.kw>
|
||||
kw
|
||||
com.kw
|
||||
edu.kw
|
||||
emb.kw
|
||||
gov.kw
|
||||
ind.kw
|
||||
net.kw
|
||||
org.kw
|
||||
|
||||
// ky : http://www.icta.ky/da_ky_reg_dom.php
|
||||
// Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17
|
||||
@ -3775,10 +3790,18 @@ gov.lr
|
||||
org.lr
|
||||
net.lr
|
||||
|
||||
// ls : https://en.wikipedia.org/wiki/.ls
|
||||
// ls : http://www.nic.ls/
|
||||
// Confirmed by registry <lsadmin@nic.ls>
|
||||
ls
|
||||
ac.ls
|
||||
biz.ls
|
||||
co.ls
|
||||
edu.ls
|
||||
gov.ls
|
||||
info.ls
|
||||
net.ls
|
||||
org.ls
|
||||
sc.ls
|
||||
|
||||
// lt : https://en.wikipedia.org/wiki/.lt
|
||||
lt
|
||||
@ -4636,9 +4659,6 @@ web.ni
|
||||
// ccTLD for the Netherlands
|
||||
nl
|
||||
|
||||
// BV.nl will be a registry for dutch BV's (besloten vennootschap)
|
||||
bv.nl
|
||||
|
||||
// no : http://www.norid.no/regelverk/index.en.html
|
||||
// The Norwegian registry has declined to notify us of updates. The web pages
|
||||
// referenced below are the official source of the data. There is also an
|
||||
@ -8329,9 +8349,6 @@ golf
|
||||
// goo : 2014-12-18 NTT Resonant Inc.
|
||||
goo
|
||||
|
||||
// goodhands : 2015-07-31 Allstate Fire and Casualty Insurance Company
|
||||
goodhands
|
||||
|
||||
// goodyear : 2015-07-02 The Goodyear Tire & Rubber Company
|
||||
goodyear
|
||||
|
||||
@ -8608,9 +8625,6 @@ itv
|
||||
// iveco : 2015-09-03 CNH Industrial N.V.
|
||||
iveco
|
||||
|
||||
// iwc : 2014-06-23 Richemont DNS Inc.
|
||||
iwc
|
||||
|
||||
// jaguar : 2014-11-13 Jaguar Land Rover Ltd
|
||||
jaguar
|
||||
|
||||
@ -8635,9 +8649,6 @@ jewelry
|
||||
// jio : 2015-04-02 Reliance Industries Limited
|
||||
jio
|
||||
|
||||
// jlc : 2014-12-04 Richemont DNS Inc.
|
||||
jlc
|
||||
|
||||
// jll : 2015-04-02 Jones Lang LaSalle Incorporated
|
||||
jll
|
||||
|
||||
@ -8989,9 +9000,6 @@ men
|
||||
// menu : 2013-09-11 Wedding TLD2, LLC
|
||||
menu
|
||||
|
||||
// meo : 2014-11-07 MEO Servicos de Comunicacoes e Multimedia, S.A.
|
||||
meo
|
||||
|
||||
// merckmsd : 2016-07-14 MSD Registry Holdings, Inc.
|
||||
merckmsd
|
||||
|
||||
@ -9283,9 +9291,6 @@ page
|
||||
// panasonic : 2015-07-30 Panasonic Corporation
|
||||
panasonic
|
||||
|
||||
// panerai : 2014-11-07 Richemont DNS Inc.
|
||||
panerai
|
||||
|
||||
// paris : 2014-01-30 City of Paris
|
||||
paris
|
||||
|
||||
@ -9634,9 +9639,6 @@ sanofi
|
||||
// sap : 2014-03-27 SAP AG
|
||||
sap
|
||||
|
||||
// sapo : 2014-11-07 MEO Servicos de Comunicacoes e Multimedia, S.A.
|
||||
sapo
|
||||
|
||||
// sarl : 2014-07-03 Binky Moon, LLC
|
||||
sarl
|
||||
|
||||
@ -9877,9 +9879,6 @@ statebank
|
||||
// statefarm : 2015-07-30 State Farm Mutual Automobile Insurance Company
|
||||
statefarm
|
||||
|
||||
// statoil : 2014-12-04 Statoil ASA
|
||||
statoil
|
||||
|
||||
// stc : 2014-10-09 Saudi Telecom Company
|
||||
stc
|
||||
|
||||
@ -9991,9 +9990,6 @@ tech
|
||||
// technology : 2013-09-13 Binky Moon, LLC
|
||||
technology
|
||||
|
||||
// telecity : 2015-02-19 TelecityGroup International Limited
|
||||
telecity
|
||||
|
||||
// telefonica : 2014-10-16 Telefónica S.A.
|
||||
telefonica
|
||||
|
||||
@ -10201,9 +10197,6 @@ visa
|
||||
// vision : 2013-12-05 Binky Moon, LLC
|
||||
vision
|
||||
|
||||
// vista : 2014-09-18 Vistaprint Limited
|
||||
vista
|
||||
|
||||
// vistaprint : 2014-09-18 Vistaprint Limited
|
||||
vistaprint
|
||||
|
||||
@ -10642,9 +10635,6 @@ vermögensberatung
|
||||
// xn--zfr164b : 2013-11-08 China Organizational Name Administration Center
|
||||
政务
|
||||
|
||||
// xperia : 2015-05-14 Sony Mobile Communications AB
|
||||
xperia
|
||||
|
||||
// xyz : 2013-12-05 XYZ.COM LLC
|
||||
xyz
|
||||
|
||||
@ -10737,6 +10727,7 @@ us-east-1.amazonaws.com
|
||||
// Amazon Elastic Beanstalk : https://aws.amazon.com/elasticbeanstalk/
|
||||
// Submitted by Luke Wells <psl-maintainers@amazon.com>
|
||||
cn-north-1.eb.amazonaws.com.cn
|
||||
cn-northwest-1.eb.amazonaws.com.cn
|
||||
elasticbeanstalk.com
|
||||
ap-northeast-1.elasticbeanstalk.com
|
||||
ap-northeast-2.elasticbeanstalk.com
|
||||
@ -10823,6 +10814,10 @@ s3-website.us-east-2.amazonaws.com
|
||||
t3l3p0rt.net
|
||||
tele.amune.org
|
||||
|
||||
// Apigee : https://apigee.com/
|
||||
// Submitted by Apigee Security Team <security@apigee.com>
|
||||
apigee.io
|
||||
|
||||
// Aptible : https://www.aptible.com/
|
||||
// Submitted by Thomas Orozco <thomas@aptible.com>
|
||||
on-aptible.com
|
||||
@ -10842,6 +10837,11 @@ sweetpepper.org
|
||||
// Submitted by Vincent Tseng <vincenttseng@asustor.com>
|
||||
myasustor.com
|
||||
|
||||
// Automattic Inc. : https://automattic.com/
|
||||
// Submitted by Alex Concha <alex.concha@automattic.com>
|
||||
go-vip.co
|
||||
wpcomstaging.com
|
||||
|
||||
// AVM : https://avm.de
|
||||
// Submitted by Andreas Weise <a.weise@avm.de>
|
||||
myfritz.net
|
||||
@ -10888,6 +10888,11 @@ square7.net
|
||||
// Submitted by Dave Tharp <browsersafetymark.io@quicinc.com>
|
||||
browsersafetymark.io
|
||||
|
||||
// Bytemark Hosting : https://www.bytemark.co.uk
|
||||
// Submitted by Paul Cammish <paul.cammish@bytemark.co.uk>
|
||||
dh.bytemark.co.uk
|
||||
vm.bytemark.co.uk
|
||||
|
||||
// callidomus : https://www.callidomus.com/
|
||||
// Submitted by Marcus Popp <admin@callidomus.com>
|
||||
mycd.eu
|
||||
@ -11080,6 +11085,11 @@ firm.dk
|
||||
reg.dk
|
||||
store.dk
|
||||
|
||||
// dapps.earth : https://dapps.earth/
|
||||
// Submitted by Daniil Burdakov <icqkill@gmail.com>
|
||||
*.dapps.earth
|
||||
*.bzz.dapps.earth
|
||||
|
||||
// Debian : https://www.debian.org/
|
||||
// Submitted by Peter Palfrader / Debian Sysadmin Team <dsa-publicsuffixlist@debian.org>
|
||||
debian.net
|
||||
@ -11092,6 +11102,11 @@ dedyn.io
|
||||
// Submitted by Norbert Auler <mail@dnshome.de>
|
||||
dnshome.de
|
||||
|
||||
// DotArai : https://www.dotarai.com/
|
||||
// Submitted by Atsadawat Netcharadsang <atsadawat@dotarai.co.th>
|
||||
online.th
|
||||
shop.th
|
||||
|
||||
// DrayTek Corp. : https://www.draytek.com/
|
||||
// Submitted by Paul Fang <mis@draytek.com>
|
||||
drayddns.com
|
||||
@ -11648,6 +11663,10 @@ cloud.fedoraproject.org
|
||||
app.os.fedoraproject.org
|
||||
app.os.stg.fedoraproject.org
|
||||
|
||||
// Fermax : https://fermax.com/
|
||||
// submitted by Koen Van Isterdael <k.vanisterdael@fermax.be>
|
||||
mydobiss.com
|
||||
|
||||
// Filegear Inc. : https://www.filegear.com
|
||||
// Submitted by Jason Zhu <jason@owtware.com>
|
||||
filegear.me
|
||||
@ -11713,6 +11732,8 @@ goip.de
|
||||
|
||||
// Google, Inc.
|
||||
// Submitted by Eduardo Vela <evn@google.com>
|
||||
run.app
|
||||
a.run.app
|
||||
*.0emm.com
|
||||
appspot.com
|
||||
blogspot.ae
|
||||
@ -11918,6 +11939,12 @@ git-repos.de
|
||||
lcube-server.de
|
||||
svn-repos.de
|
||||
|
||||
// Leadpages : https://www.leadpages.net
|
||||
// Submitted by Greg Dallavalle <domains@leadpages.net>
|
||||
leadpages.co
|
||||
lpages.co
|
||||
lpusercontent.com
|
||||
|
||||
// Lightmaker Property Manager, Inc. : https://app.lmpm.com/
|
||||
// Submitted by Greg Holland <greg.holland@lmpm.com>
|
||||
app.lmpm.com
|
||||
@ -11935,6 +11962,15 @@ linkyard-cloud.ch
|
||||
// Submitted by Victor Velchev <admin@liquidnetlimited.com>
|
||||
we.bs
|
||||
|
||||
// LubMAN UMCS Sp. z o.o : https://lubman.pl/
|
||||
// Submitted by Ireneusz Maliszewski <ireneusz.maliszewski@lubman.pl>
|
||||
krasnik.pl
|
||||
leczna.pl
|
||||
lubartow.pl
|
||||
lublin.pl
|
||||
poniatowa.pl
|
||||
swidnik.pl
|
||||
|
||||
// Lug.org.uk : https://lug.org.uk
|
||||
// Submitted by Jon Spriggs <admin@lug.org.uk>
|
||||
uklugs.org
|
||||
@ -12322,6 +12358,10 @@ protonet.io
|
||||
chirurgiens-dentistes-en-france.fr
|
||||
byen.site
|
||||
|
||||
// Redstar Consultants : https://www.redstarconsultants.com/
|
||||
// Submitted by Jons Slemmer <jons@redstarconsultants.com>
|
||||
instantcloud.cn
|
||||
|
||||
// Russian Academy of Sciences
|
||||
// Submitted by Tech Support <support@rasnet.ru>
|
||||
ras.ru
|
||||
@ -12350,6 +12390,10 @@ vaporcloud.io
|
||||
rackmaze.com
|
||||
rackmaze.net
|
||||
|
||||
// Read The Docs, Inc : https://www.readthedocs.org
|
||||
// Submitted by David Fischer <team@readthedocs.org>
|
||||
readthedocs.io
|
||||
|
||||
// Red Hat, Inc. OpenShift : https://openshift.redhat.com/
|
||||
// Submitted by Tim Kramer <tkramer@rhcloud.com>
|
||||
rhcloud.com
|
||||
@ -12426,6 +12470,10 @@ applinzi.com
|
||||
sinaapp.com
|
||||
vipsinaapp.com
|
||||
|
||||
// Siteleaf : https://www.siteleaf.com/
|
||||
// Submitted by Skylar Challand <support@siteleaf.com>
|
||||
siteleaf.net
|
||||
|
||||
// Skyhat : http://www.skyhat.io
|
||||
// Submitted by Shante Adam <shante@skyhat.io>
|
||||
bounty-full.com
|
||||
@ -12451,10 +12499,6 @@ spacekit.io
|
||||
// Submitted by Stefan Neufeind <info@speedpartner.de>
|
||||
customer.speedpartner.de
|
||||
|
||||
// Stackspace : https://www.stackspace.io/
|
||||
// Submitted by Lina He <info@stackspace.io>
|
||||
stackspace.space
|
||||
|
||||
// Storj Labs Inc. : https://storj.io/
|
||||
// Submitted by Philip Hutchins <hostmaster@storj.io>
|
||||
storj.farm
|
||||
@ -12495,6 +12539,12 @@ gdynia.pl
|
||||
med.pl
|
||||
sopot.pl
|
||||
|
||||
// Telebit : https://telebit.cloud
|
||||
// Submitted by AJ ONeal <aj@telebit.cloud>
|
||||
telebit.app
|
||||
telebit.io
|
||||
*.telebit.xyz
|
||||
|
||||
// The Gwiddle Foundation : https://gwiddlefoundation.org.uk
|
||||
// Submitted by Joshua Bayfield <joshua.bayfield@gwiddlefoundation.org.uk>
|
||||
gwiddle.co.uk
|
||||
@ -12533,7 +12583,7 @@ lima-city.rocks
|
||||
webspace.rocks
|
||||
lima.zone
|
||||
|
||||
// TransIP : htts://www.transip.nl
|
||||
// TransIP : https://www.transip.nl
|
||||
// Submitted by Rory Breuk <rbreuk@transip.nl>
|
||||
*.transurl.be
|
||||
*.transurl.eu
|
||||
|
||||
@ -11836,7 +11836,7 @@
|
||||
32FC;CIRCLED KATAKANA WI;So;0;L;<circle> 30F0;;;;N;;;;;
|
||||
32FD;CIRCLED KATAKANA WE;So;0;L;<circle> 30F1;;;;N;;;;;
|
||||
32FE;CIRCLED KATAKANA WO;So;0;L;<circle> 30F2;;;;N;;;;;
|
||||
32FF;SQUARE ERA NAME NEWERA;So;0;L;<square> 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;;
|
||||
32FF;SQUARE ERA NAME REIWA;So;0;L;<square> 4EE4 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME REIWA;;;;
|
||||
3300;SQUARE APAATO;So;0;L;<square> 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;;
|
||||
3301;SQUARE ARUHUA;So;0;L;<square> 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;;
|
||||
3302;SQUARE ANPEA;So;0;L;<square> 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2019, 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
|
||||
@ -47,6 +47,9 @@ endif
|
||||
ifeq ($(call check-jvm-feature, zero), true)
|
||||
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
|
||||
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
|
||||
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
|
||||
JVM_LDFLAGS_FEATURES += $(call SET_EXECUTABLE_ORIGIN,/..)
|
||||
endif
|
||||
ifeq ($(call isTargetCpu, sparcv9), true)
|
||||
BUILD_LIBJVM_EXTRA_FILES := $(TOPDIR)/src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
|
||||
endif
|
||||
@ -123,7 +126,7 @@ ifneq ($(call check-jvm-feature, nmt), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_NMT=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
memBaseline.cpp memReporter.cpp mallocTracker.cpp virtualMemoryTracker.cpp nmtCommon.cpp \
|
||||
memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp
|
||||
memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp threadStackTracker.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, aot), true)
|
||||
|
||||
@ -40,23 +40,14 @@ JMX_RMI_CLASSES := javax.management.remote.rmi.RMIConnectionImpl \
|
||||
$(eval $(call SetupRMICompilation,RMI_GEN, \
|
||||
CLASSES := $(JMX_RMI_CLASSES), \
|
||||
CLASSES_DIR := $(CLASSES_DIR)/java.management.rmi, \
|
||||
STUB_CLASSES_DIR := $(RMIC_GENSRC_DIR)/java.management.rmi, \
|
||||
STUB_CLASSES_DIR := $(STUB_CLASSES_DIR)/java.management.rmi, \
|
||||
RUN_V12 := true, \
|
||||
KEEP_GENERATED := true, \
|
||||
STUB_SOURCES_DIR := $(RMIC_GENSRC_DIR)/java.management.rmi, \
|
||||
))
|
||||
|
||||
# Find all classes generated and move them from the gensrc dir to the stub classes dir
|
||||
$(RMIC_GENSRC_DIR)/_classes.moved: $(RMI_GEN)
|
||||
$(eval classfiles := $(shell $(FIND) $(RMIC_GENSRC_DIR) -name "*.class"))
|
||||
$(foreach src, $(classfiles), \
|
||||
$(eval target := $(patsubst $(RMIC_GENSRC_DIR)/%, \
|
||||
$(STUB_CLASSES_DIR)/%, $(src))) \
|
||||
$(call MakeDir, $(dir $(target))) \
|
||||
$(MV) $(src) $(target) $(NEWLINE))
|
||||
$(TOUCH) $@
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(RMIC_GENSRC_DIR)/_classes.moved $(RMI_GEN)
|
||||
all: $(RMI_GEN)
|
||||
|
||||
.PHONY: all
|
||||
|
||||
@ -202,15 +202,20 @@ diff_text() {
|
||||
$SED -e '/[<>].*[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}.*/d')
|
||||
fi
|
||||
if test "x$SUFFIX" = "xhtml"; then
|
||||
# Some javadoc versions do not put quotes around font size
|
||||
HTML_FILTER="$SED \
|
||||
# Some javadoc versions do not put quotes around font size
|
||||
HTML_FILTER="$SED \
|
||||
-e 's/<font size=-1>/<font size=\"-1\">/g'"
|
||||
$CAT $THIS_FILE | eval "$HTML_FILTER" > $THIS_FILE.filtered
|
||||
$CAT $OTHER_FILE | eval "$HTML_FILTER" > $OTHER_FILE.filtered
|
||||
$CAT $THIS_FILE | eval "$HTML_FILTER" > $THIS_FILE.filtered
|
||||
$CAT $OTHER_FILE | eval "$HTML_FILTER" > $OTHER_FILE.filtered
|
||||
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.filtered $THIS_FILE.filtered | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' \
|
||||
-e '/[<>] <meta name="date" content=".*">/d' )
|
||||
-e '/[<>] <meta name="date" content=".*">/d' )
|
||||
fi
|
||||
if test "$NAME" = "BenchmarkList"; then
|
||||
$SORT $THIS_FILE > $THIS_FILE.sorted
|
||||
$SORT $OTHER_FILE > $OTHER_FILE.sorted
|
||||
TMP=$($DIFF $THIS_FILE.sorted $OTHER_FILE.sorted)
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OTHER_FILE and $THIS_FILE differ
|
||||
@ -382,17 +387,19 @@ compare_general_files() {
|
||||
! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "modules" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" ! -name "*.jmod" \
|
||||
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
|
||||
! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
|
||||
! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \
|
||||
! -name "finish_installation" ! -name "Sparkle" ! -name "*.tar.gz" \
|
||||
! -name "classes.jsa" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "*.jmod" ! -name "*.exe" \
|
||||
! -name "*.obj" ! -name "*.o" ! -name "jspawnhelper" ! -name "*.a" \
|
||||
! -name "*.tar.gz" ! -name "classes.jsa" ! -name "gtestLauncher" \
|
||||
! -name "*.map" \
|
||||
| $GREP -v "./bin/" | $SORT | $FILTER)
|
||||
|
||||
echo Other files with binary differences...
|
||||
for f in $GENERAL_FILES
|
||||
do
|
||||
# Skip all files in test/*/native
|
||||
if [[ "$f" == */native/* ]]; then
|
||||
continue
|
||||
fi
|
||||
if [ -e $OTHER_DIR/$f ]; then
|
||||
SUFFIX="${f##*.}"
|
||||
if [ "$(basename $f)" = "release" ]; then
|
||||
@ -431,7 +438,7 @@ compare_general_files() {
|
||||
$CAT $OTHER_DIR/$f | eval "$HTML_FILTER" > $OTHER_FILE &
|
||||
$CAT $THIS_DIR/$f | eval "$HTML_FILTER" > $THIS_FILE &
|
||||
wait
|
||||
elif [[ "$f" = *"/lib/classlist" ]]; then
|
||||
elif [[ "$f" = *"/lib/classlist" ]] || [ "$SUFFIX" = "jar_contents" ]; then
|
||||
# The classlist files may have some lines in random order
|
||||
OTHER_FILE=$WORK_DIR/$f.other
|
||||
THIS_FILE=$WORK_DIR/$f.this
|
||||
@ -792,14 +799,14 @@ compare_bin_file() {
|
||||
export _NT_SYMBOL_PATH="$(echo $PDB_DIRS | tr ' ' ';')"
|
||||
fi
|
||||
|
||||
if [ -z "$SKIP_BIN_DIFF" ]; then
|
||||
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
|
||||
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
|
||||
# The files were bytewise identical.
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
echo " : : : : : : $BIN_FILE"
|
||||
fi
|
||||
return 0
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
echo " : : : : : : $BIN_FILE"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
if [ -z "$SKIP_BIN_DIFF" ]; then
|
||||
BIN_MSG=" diff "
|
||||
if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then
|
||||
DIFF_BIN=true
|
||||
@ -826,7 +833,8 @@ compare_bin_file() {
|
||||
DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE)
|
||||
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
|
||||
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* || "$ACCEPTED_SMALL_SIZE_DIFF" = "true" ]] \
|
||||
&& [ "$DIFF_SIZE_REL" -gt 98 ] \
|
||||
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
@ -1440,13 +1448,8 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
# Find the common images to compare, prioritizing later build stages
|
||||
if [ -d "$THIS/install/jdk" ] && [ -d "$OTHER/install/jdk" ]; then
|
||||
THIS_JDK="$THIS/install/jdk"
|
||||
OTHER_JDK="$OTHER/install/jdk"
|
||||
echo "Selecting install images for JDK compare"
|
||||
elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
|
||||
if [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
|
||||
THIS_JDK="$THIS/images/jdk"
|
||||
OTHER_JDK="$OTHER/images/jdk"
|
||||
echo "Selecting normal images for JDK compare"
|
||||
@ -1475,63 +1478,22 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
echo " $OTHER_JDK"
|
||||
|
||||
if [ -d "$THIS/images/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \
|
||||
&& [ -d "$OTHER/images/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then
|
||||
if [ -d "$THIS/deploy/images/jdk-bundle" ]; then
|
||||
&& [ -d "$OTHER/images/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then
|
||||
if [ -d "$THIS/deploy/images/jdk-bundle" ]; then
|
||||
THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle"
|
||||
else
|
||||
else
|
||||
THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
|
||||
fi
|
||||
if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then
|
||||
fi
|
||||
if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then
|
||||
OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle"
|
||||
else
|
||||
else
|
||||
OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
|
||||
fi
|
||||
fi
|
||||
echo "Also comparing jdk macosx bundles"
|
||||
echo " $THIS_JDK_BUNDLE"
|
||||
echo " $OTHER_JDK_BUNDLE"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/deploy/bundles" -o -d "$THIS/deploy/images/bundles" ] \
|
||||
&& [ -d "$OTHER/deploy/bundles" -o -d "$OTHER/deploy/images/bundles" ]; then
|
||||
if [ -d "$THIS/deploy/images/bundles" ]; then
|
||||
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/images/bundles"
|
||||
else
|
||||
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/bundles"
|
||||
fi
|
||||
if [ -d "$OTHER/deploy/images/bundles" ]; then
|
||||
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/images/bundles"
|
||||
else
|
||||
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
|
||||
fi
|
||||
echo "Also comparing deploy javadoc bundles"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/JavaAppletPlugin.plugin" ] \
|
||||
&& [ -d "$OTHER/images/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then
|
||||
if [ -d "$THIS/images/JavaAppletPlugin.plugin" ]; then
|
||||
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/images/JavaAppletPlugin.plugin"
|
||||
else
|
||||
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin"
|
||||
fi
|
||||
if [ -d "$OTHER/images/JavaAppletPlugin.plugin" ]; then
|
||||
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/images/JavaAppletPlugin.plugin"
|
||||
else
|
||||
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin"
|
||||
fi
|
||||
echo "Also comparing deploy applet image"
|
||||
echo " $THIS_DEPLOY_APPLET_PLUGIN_DIR"
|
||||
echo " $OTHER_DEPLOY_APPLET_PLUGIN_DIR"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/install/sparkle/Sparkle.framework" ] \
|
||||
&& [ -d "$OTHER/install/sparkle/Sparkle.framework" ]; then
|
||||
THIS_SPARKLE_DIR="$THIS/install/sparkle/Sparkle.framework"
|
||||
OTHER_SPARKLE_DIR="$OTHER/install/sparkle/Sparkle.framework"
|
||||
echo "Also comparing install sparkle framework"
|
||||
echo " $THIS_SPARKLE_DIR"
|
||||
echo " $OTHER_SPARKLE_DIR"
|
||||
fi
|
||||
|
||||
THIS_SEC_DIR="$THIS/images"
|
||||
OTHER_SEC_DIR="$OTHER/images"
|
||||
if [ -f "$THIS_SEC_DIR/sec-bin.zip" ] && [ -f "$OTHER_SEC_DIR/sec-bin.zip" ]; then
|
||||
@ -1557,6 +1519,14 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
else
|
||||
echo "WARNING! Docs haven't been built and won't be compared."
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/test" ] && [ -d "$OTHER/images/test" ]; then
|
||||
THIS_TEST="$THIS/images/test"
|
||||
OTHER_TEST="$OTHER/images/test"
|
||||
echo "Also comparing test image"
|
||||
else
|
||||
echo "WARNING! Test haven't been built and won't be compared."
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
@ -1582,22 +1552,16 @@ if [ "$CMP_NAMES" = "true" ]; then
|
||||
echo -n "Docs "
|
||||
compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_dirs $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
echo -n "Test "
|
||||
compare_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_dirs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
echo -n "Sparkle.framework "
|
||||
compare_files $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_LIBS" = "true" ]; then
|
||||
@ -1605,34 +1569,38 @@ if [ "$CMP_LIBS" = "true" ]; then
|
||||
echo -n "JDK "
|
||||
compare_all_libs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
# Test native libs are never stripped so will not compare well.
|
||||
SKIP_BIN_DIFF="true"
|
||||
ACCEPTED_SMALL_SIZE_DIFF_bak="$ACCEPTED_SMALL_SIZE_DIFF"
|
||||
if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
ACCEPTED_SMALL_SIZE_DIFF="true"
|
||||
fi
|
||||
compare_all_libs $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
SKIP_BIN_DIFF="false"
|
||||
ACCEPTED_SMALL_SIZE_DIFF="$ACCEPTED_SMALL_SIZE_DIFF_bak"
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_all_libs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_EXECS" = "true" ]; then
|
||||
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
|
||||
echo -n "JDK "
|
||||
compare_all_execs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
# Test native executables are never stripped so will not compare well.
|
||||
SKIP_BIN_DIFF="true"
|
||||
compare_all_execs $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
SKIP_BIN_DIFF="false"
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_all_execs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_GENERAL" = "true" ]; then
|
||||
@ -1648,23 +1616,24 @@ if [ "$CMP_GENERAL" = "true" ]; then
|
||||
echo -n "Docs "
|
||||
compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_general_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_general_files $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_ZIPS" = "true" ]; then
|
||||
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
|
||||
echo -n "JDK "
|
||||
compare_all_zip_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_all_zip_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
fi
|
||||
if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then
|
||||
if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then
|
||||
echo "sec-bin.zip..."
|
||||
@ -1686,24 +1655,20 @@ if [ "$CMP_ZIPS" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then
|
||||
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_JARS" = "true" ]; then
|
||||
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
|
||||
echo -n "JDK "
|
||||
compare_all_jar_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_all_jar_files $THIS_TEST $OTHER_TEST $COMPARE_ROOT/test
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_JMODS" = "true" ]; then
|
||||
@ -1723,14 +1688,6 @@ if [ "$CMP_PERMS" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_permissions $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_TYPES" = "true" ]; then
|
||||
@ -1742,17 +1699,13 @@ if [ "$CMP_TYPES" = "true" ]; then
|
||||
echo -n "JDK Bundle "
|
||||
compare_file_types $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
|
||||
fi
|
||||
if [ -n "$THIS_TEST" ] && [ -n "$OTHER_TEST" ]; then
|
||||
echo -n "Test "
|
||||
compare_file_types $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
|
||||
echo -n "Sparkle.framework "
|
||||
compare_file_types $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
@ -38,6 +38,7 @@ fi
|
||||
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./lib/server/libjvm.so
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
SKIP_BIN_DIFF="true"
|
||||
@ -49,6 +50,7 @@ elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
./lib/libunpack.so
|
||||
./lib/server/libjvm.so
|
||||
./bin/unpack200
|
||||
./hotspot/gtest/server/libjvm.so
|
||||
"
|
||||
KNOWN_DIS_DIFF="
|
||||
./lib/libfontmanager.so
|
||||
@ -68,5 +70,6 @@ elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
./lib/libosxapp.dylib
|
||||
./lib/libosxui.dylib
|
||||
./lib/server/libjvm.dylib
|
||||
./hotspot/gtest/server/libjvm.dylib
|
||||
"
|
||||
fi
|
||||
|
||||
@ -3445,7 +3445,7 @@ encode %{
|
||||
// markOop of object (disp_hdr) with the stack pointer.
|
||||
__ mov(rscratch1, sp);
|
||||
__ sub(disp_hdr, disp_hdr, rscratch1);
|
||||
__ mov(tmp, (address) (~(os::vm_page_size()-1) | markOopDesc::lock_mask_in_place));
|
||||
__ mov(tmp, (address) (~(os::vm_page_size()-1) | (uintptr_t)markOopDesc::lock_mask_in_place));
|
||||
// If condition is true we are cont and hence we can store 0 as the
|
||||
// displaced header in the box, which indicates that it is a recursive lock.
|
||||
__ ands(tmp/*==0?*/, disp_hdr, tmp); // Sets flags for result
|
||||
|
||||
@ -72,15 +72,12 @@ void G1BarrierSetAssembler::gen_write_ref_array_pre_barrier(MacroAssembler* masm
|
||||
}
|
||||
|
||||
void G1BarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register end, Register scratch, RegSet saved_regs) {
|
||||
Register start, Register count, Register scratch, RegSet saved_regs) {
|
||||
__ push(saved_regs, sp);
|
||||
// must compute element count unless barrier set interface is changed (other platforms supply count)
|
||||
assert_different_registers(start, end, scratch);
|
||||
__ lea(scratch, Address(end, BytesPerHeapOop));
|
||||
__ sub(scratch, scratch, start); // subtract start to get #bytes
|
||||
__ lsr(scratch, scratch, LogBytesPerHeapOop); // convert to element count
|
||||
assert_different_registers(start, count, scratch);
|
||||
assert_different_registers(c_rarg0, count);
|
||||
__ mov(c_rarg0, start);
|
||||
__ mov(c_rarg1, scratch);
|
||||
__ mov(c_rarg1, count);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_array_post_entry), 2);
|
||||
__ pop(saved_regs, sp);
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ protected:
|
||||
void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register addr, Register count, RegSet saved_regs);
|
||||
void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs);
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
|
||||
void g1_write_barrier_pre(MacroAssembler* masm,
|
||||
Register obj,
|
||||
|
||||
@ -62,18 +62,22 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register ob
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register end, Register scratch, RegSet saved_regs) {
|
||||
Register start, Register count, Register scratch, RegSet saved_regs) {
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
|
||||
Label L_loop;
|
||||
Label L_loop, L_done;
|
||||
const Register end = count;
|
||||
|
||||
__ cbz(count, L_done); // zero count - nothing to do
|
||||
|
||||
__ lea(end, Address(start, count, Address::lsl(LogBytesPerHeapOop))); // end = start + count << LogBytesPerHeapOop
|
||||
__ sub(end, end, BytesPerHeapOop); // last element address to make inclusive
|
||||
__ lsr(start, start, CardTable::card_shift);
|
||||
__ lsr(end, end, CardTable::card_shift);
|
||||
__ sub(end, end, start); // number of bytes to copy
|
||||
__ sub(count, end, start); // number of bytes to copy
|
||||
|
||||
const Register count = end; // 'end' register contains bytes count now
|
||||
__ load_byte_map_base(scratch);
|
||||
__ add(start, start, scratch);
|
||||
if (ct->scanned_concurrently()) {
|
||||
@ -83,6 +87,7 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
__ strb(zr, Address(start, count));
|
||||
__ subs(count, count, 1);
|
||||
__ br(Assembler::GE, L_loop);
|
||||
__ bind(L_done);
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
|
||||
@ -33,7 +33,7 @@ protected:
|
||||
void store_check(MacroAssembler* masm, Register obj, Address dst);
|
||||
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs);
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
|
||||
|
||||
@ -37,10 +37,10 @@ void ModRefBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Decorat
|
||||
}
|
||||
|
||||
void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register end, Register tmp,
|
||||
Register start, Register count, Register tmp,
|
||||
RegSet saved_regs) {
|
||||
if (is_oop) {
|
||||
gen_write_ref_array_post_barrier(masm, decorators, start, end, tmp, saved_regs);
|
||||
gen_write_ref_array_post_barrier(masm, decorators, start, count, tmp, saved_regs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ protected:
|
||||
virtual void gen_write_ref_array_pre_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register addr, Register count, RegSet saved_regs) {}
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs) {}
|
||||
Register start, Register count, Register tmp, RegSet saved_regs) {}
|
||||
|
||||
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2) = 0;
|
||||
@ -46,7 +46,7 @@ public:
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register addr, Register count, RegSet saved_regs);
|
||||
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs);
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Address dst, Register val, Register tmp1, Register tmp2);
|
||||
};
|
||||
|
||||
@ -73,16 +73,13 @@ void ShenandoahBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm, Dec
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register end, Register scratch, RegSet saved_regs) {
|
||||
Register start, Register count, Register scratch, RegSet saved_regs) {
|
||||
if (is_oop) {
|
||||
__ push(saved_regs, sp);
|
||||
// must compute element count unless barrier set interface is changed (other platforms supply count)
|
||||
assert_different_registers(start, end, scratch);
|
||||
__ lea(scratch, Address(end, BytesPerHeapOop));
|
||||
__ sub(scratch, scratch, start); // subtract start to get #bytes
|
||||
__ lsr(scratch, scratch, LogBytesPerHeapOop); // convert to element count
|
||||
assert_different_registers(start, count, scratch);
|
||||
assert_different_registers(c_rarg0, count);
|
||||
__ mov(c_rarg0, start);
|
||||
__ mov(c_rarg1, scratch);
|
||||
__ mov(c_rarg1, count);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_post_entry), 2);
|
||||
__ pop(saved_regs, sp);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public:
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register addr, Register count, RegSet saved_regs);
|
||||
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
Register start, Register end, Register tmp, RegSet saved_regs);
|
||||
Register start, Register count, Register tmp, RegSet saved_regs);
|
||||
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
Register dst, Address src, Register tmp1, Register tmp_thread);
|
||||
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
|
||||
|
||||
@ -1375,8 +1375,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ pop(RegSet::of(d, count), sp);
|
||||
if (VerifyOops)
|
||||
verify_oop_array(size, d, count, r16);
|
||||
__ sub(count, count, 1); // make an inclusive end pointer
|
||||
__ lea(count, Address(d, count, Address::lsl(exact_log2(size))));
|
||||
}
|
||||
|
||||
bs->arraycopy_epilogue(_masm, decorators, is_oop, d, count, rscratch1, RegSet());
|
||||
@ -1448,8 +1446,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ pop(RegSet::of(d, count), sp);
|
||||
if (VerifyOops)
|
||||
verify_oop_array(size, d, count, r16);
|
||||
__ sub(count, count, 1); // make an inclusive end pointer
|
||||
__ lea(count, Address(d, count, Address::lsl(exact_log2(size))));
|
||||
}
|
||||
bs->arraycopy_epilogue(_masm, decorators, is_oop, d, count, rscratch1, RegSet());
|
||||
__ leave();
|
||||
@ -1842,8 +1838,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ br(Assembler::EQ, L_done_pop);
|
||||
|
||||
__ BIND(L_do_card_marks);
|
||||
__ add(to, to, -heapOopSize); // make an inclusive end pointer
|
||||
bs->arraycopy_epilogue(_masm, decorators, is_oop, start_to, to, rscratch1, wb_post_saved_regs);
|
||||
bs->arraycopy_epilogue(_masm, decorators, is_oop, start_to, count_save, rscratch1, wb_post_saved_regs);
|
||||
|
||||
__ bind(L_done_pop);
|
||||
__ pop(RegSet::of(r18, r19, r20, r21), sp);
|
||||
|
||||
@ -2885,7 +2885,7 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
{
|
||||
Label notVolatile;
|
||||
__ tbz(r5, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
|
||||
__ membar(MacroAssembler::StoreLoad);
|
||||
__ membar(MacroAssembler::StoreLoad | MacroAssembler::StoreStore);
|
||||
__ bind(notVolatile);
|
||||
}
|
||||
}
|
||||
@ -3029,7 +3029,7 @@ void TemplateTable::fast_storefield(TosState state)
|
||||
{
|
||||
Label notVolatile;
|
||||
__ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
|
||||
__ membar(MacroAssembler::StoreLoad);
|
||||
__ membar(MacroAssembler::StoreLoad | MacroAssembler::StoreStore);
|
||||
__ bind(notVolatile);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1455,13 +1455,11 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (opr2->is_address()) {
|
||||
DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment.
|
||||
LIR_Address *addr = opr2->as_address_ptr();
|
||||
BasicType type = addr->type();
|
||||
if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); }
|
||||
else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); }
|
||||
__ cmpd(BOOL_RESULT, opr1->as_register(), R0);
|
||||
assert(opr1->type() != T_ADDRESS && opr2->type() != T_ADDRESS, "currently unsupported");
|
||||
if (opr1->type() == T_OBJECT || opr1->type() == T_ARRAY) {
|
||||
// There are only equal/notequal comparisons on objects.
|
||||
assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops");
|
||||
__ cmpd(BOOL_RESULT, opr1->as_register(), opr2->as_register());
|
||||
} else {
|
||||
if (unsigned_comp) {
|
||||
__ cmplw(BOOL_RESULT, opr1->as_register(), opr2->as_register());
|
||||
@ -1497,14 +1495,6 @@ void LIR_Assembler::comp_op(LIR_Condition condition, LIR_Opr opr1, LIR_Opr opr2,
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
} else if (opr1->is_address()) {
|
||||
DEBUG_ONLY( Unimplemented(); ) // Seems to be unused at the moment.
|
||||
LIR_Address * addr = opr1->as_address_ptr();
|
||||
BasicType type = addr->type();
|
||||
assert (opr2->is_constant(), "Checking");
|
||||
if (type == T_OBJECT) { __ ld(R0, index_or_disp(addr), addr->base()->as_register()); }
|
||||
else { __ lwa(R0, index_or_disp(addr), addr->base()->as_register()); }
|
||||
__ cmpdi(BOOL_RESULT, R0, opr2->as_constant_ptr()->as_jint());
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "gc/shared/barrierSetAssembler.hpp"
|
||||
#include "interpreter/interp_masm.hpp"
|
||||
#include "runtime/jniHandles.hpp"
|
||||
|
||||
#define __ masm->
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2019, 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
|
||||
@ -22,6 +22,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPU_X86_CRC32C_H
|
||||
#define CPU_X86_CRC32C_H
|
||||
|
||||
enum {
|
||||
// S. Gueron / Information Processing Letters 112 (2012) 184
|
||||
// shows than anything above 6K and below 32K is a good choice
|
||||
@ -64,3 +67,5 @@ enum {
|
||||
// a) constants table generation (hotspot/src/cpu/x86/vm/stubRoutines_x86.cpp)
|
||||
// b) constant fetch from that table (macroAssembler_x86.cpp)
|
||||
// c) unrolled for loop (macroAssembler_x86.cpp)
|
||||
|
||||
#endif /* !CPU_X86_CRC32C_H */
|
||||
|
||||
@ -901,11 +901,15 @@ void VM_Version::get_processor_features() {
|
||||
FLAG_SET_DEFAULT(UseSHA256Intrinsics, false);
|
||||
}
|
||||
|
||||
#ifdef _LP64
|
||||
// These are only supported on 64-bit
|
||||
if (UseSHA && supports_avx2() && supports_bmi2()) {
|
||||
if (FLAG_IS_DEFAULT(UseSHA512Intrinsics)) {
|
||||
FLAG_SET_DEFAULT(UseSHA512Intrinsics, true);
|
||||
}
|
||||
} else if (UseSHA512Intrinsics) {
|
||||
} else
|
||||
#endif
|
||||
if (UseSHA512Intrinsics) {
|
||||
warning("Intrinsics for SHA-384 and SHA-512 crypto hash functions not available on this CPU.");
|
||||
FLAG_SET_DEFAULT(UseSHA512Intrinsics, false);
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
#include "compiler/compileBroker.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "libo4.hpp"
|
||||
#include "libperfstat_aix.hpp"
|
||||
#include "libodm_aix.hpp"
|
||||
@ -923,6 +924,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
char buf[64];
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%d=%s) for attributes: %s.",
|
||||
ret, os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -743,6 +744,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
@ -780,6 +780,13 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
os::Linux::print_proc_sys_info(&st);
|
||||
os::Linux::print_container_info(&st);
|
||||
}
|
||||
|
||||
pthread_attr_destroy(&attr);
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -992,6 +993,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - thr_create failed (%s) for attributes: %s.",
|
||||
os::errno_name(status), describe_thr_create_attributes(buf, sizeof(buf), stack_size, flags));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::Posix::print_rlimit_info(&st);
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
if (status != 0) {
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "logging/logStream.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
@ -669,6 +670,10 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
} else {
|
||||
log_warning(os, thread)("Failed to start thread - _beginthreadex failed (%s) for attributes: %s.",
|
||||
os::errno_name(errno), describe_beginthreadex_attributes(buf, sizeof(buf), stack_size, initflag));
|
||||
// Log some OS information which might explain why creating the thread failed.
|
||||
log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads());
|
||||
LogStream st(Log(os, thread)::info());
|
||||
os::print_memory_info(&st);
|
||||
}
|
||||
|
||||
if (thread_handle == NULL) {
|
||||
|
||||
@ -77,6 +77,8 @@ inline void OrderAccess::storeload() { inlasm_sync(); }
|
||||
inline void OrderAccess::acquire() { inlasm_lwsync(); }
|
||||
inline void OrderAccess::release() { inlasm_lwsync(); }
|
||||
inline void OrderAccess::fence() { inlasm_sync(); }
|
||||
inline void OrderAccess::cross_modify_fence()
|
||||
{ inlasm_isync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
|
||||
@ -59,6 +59,11 @@ inline void OrderAccess::fence() {
|
||||
compiler_barrier();
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() {
|
||||
int idx = 0;
|
||||
__asm__ volatile ("cpuid " : "+a" (idx) : : "ebx", "ecx", "edx", "memory");
|
||||
}
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
{
|
||||
|
||||
@ -73,5 +73,6 @@ inline void OrderAccess::storeload() { FULL_MEM_BARRIER; }
|
||||
inline void OrderAccess::acquire() { LIGHT_MEM_BARRIER; }
|
||||
inline void OrderAccess::release() { LIGHT_MEM_BARRIER; }
|
||||
inline void OrderAccess::fence() { FULL_MEM_BARRIER; }
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
#endif // OS_CPU_BSD_ZERO_ORDERACCESS_BSD_ZERO_HPP
|
||||
|
||||
@ -49,6 +49,8 @@ inline void OrderAccess::fence() {
|
||||
FULL_MEM_BARRIER;
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
{
|
||||
|
||||
@ -101,5 +101,6 @@ inline void OrderAccess::storestore() { dmb_st(); }
|
||||
inline void OrderAccess::storeload() { dmb_sy(); }
|
||||
inline void OrderAccess::release() { dmb_sy(); }
|
||||
inline void OrderAccess::fence() { dmb_sy(); }
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
#endif // OS_CPU_LINUX_ARM_ORDERACCESS_LINUX_ARM_HPP
|
||||
|
||||
@ -79,7 +79,8 @@ inline void OrderAccess::storeload() { inlasm_sync(); }
|
||||
inline void OrderAccess::acquire() { inlasm_lwsync(); }
|
||||
inline void OrderAccess::release() { inlasm_lwsync(); }
|
||||
inline void OrderAccess::fence() { inlasm_sync(); }
|
||||
|
||||
inline void OrderAccess::cross_modify_fence()
|
||||
{ inlasm_isync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
|
||||
@ -132,6 +132,10 @@ intptr_t* os::Linux::ucontext_get_fp(const ucontext_t * uc) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static unsigned long ucontext_get_trap(const ucontext_t * uc) {
|
||||
return uc->uc_mcontext.regs->trap;
|
||||
}
|
||||
|
||||
ExtendedPC os::fetch_frame_from_context(const void* ucVoid,
|
||||
intptr_t** ret_sp, intptr_t** ret_fp) {
|
||||
|
||||
@ -304,9 +308,22 @@ JVM_handle_linux_signal(int sig,
|
||||
|
||||
// Handle ALL stack overflow variations here
|
||||
if (sig == SIGSEGV) {
|
||||
// Si_addr may not be valid due to a bug in the linux-ppc64 kernel (see
|
||||
// si_addr may not be valid due to a bug in the linux-ppc64 kernel (see
|
||||
// comment below). Use get_stack_bang_address instead of si_addr.
|
||||
address addr = ((NativeInstruction*)pc)->get_stack_bang_address(uc);
|
||||
// If SIGSEGV is caused due to a branch to an invalid address an
|
||||
// "Instruction Storage" interruption is generated and 'pc' (NIP) already
|
||||
// contains the invalid address. Otherwise, the SIGSEGV is caused due to
|
||||
// load/store instruction trying to load/store from/to an invalid address
|
||||
// and causing a "Data Storage" interruption, so we inspect the intruction
|
||||
// in order to extract the faulty data addresss.
|
||||
address addr;
|
||||
if ((ucontext_get_trap(uc) & 0x0F00 /* no IRQ reply bits */) == 0x0400) {
|
||||
// Instruction interruption
|
||||
addr = pc;
|
||||
} else {
|
||||
// Data interruption (0x0300): extract faulty data address
|
||||
addr = ((NativeInstruction*)pc)->get_stack_bang_address(uc);
|
||||
}
|
||||
|
||||
// Check if fault address is within thread stack.
|
||||
if (thread->on_local_stack(addr)) {
|
||||
|
||||
@ -74,6 +74,7 @@ inline void OrderAccess::storeload() { inlasm_zarch_sync(); }
|
||||
inline void OrderAccess::acquire() { inlasm_zarch_acquire(); }
|
||||
inline void OrderAccess::release() { inlasm_zarch_release(); }
|
||||
inline void OrderAccess::fence() { inlasm_zarch_sync(); }
|
||||
inline void OrderAccess::cross_modify_fence() { inlasm_zarch_sync(); }
|
||||
|
||||
template<size_t byte_size>
|
||||
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016 SAP SE. All rights reserved.
|
||||
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2019 SAP SE. 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
|
||||
@ -63,7 +63,7 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext,
|
||||
|
||||
if (ret_frame.is_interpreted_frame()) {
|
||||
frame::z_ijava_state* istate = ret_frame.ijava_state_unchecked();
|
||||
if (!((Method*)(istate->method))->is_metaspace_object()) {
|
||||
if ((stack_base() >= (address)istate && (address)istate > stack_end()) || !((Method*)(istate->method))->is_metaspace_object()) {
|
||||
return false;
|
||||
}
|
||||
uint64_t reg_bcp = uc->uc_mcontext.gregs[13/*Z_BCP*/];
|
||||
|
||||
@ -48,4 +48,6 @@ inline void OrderAccess::fence() {
|
||||
__asm__ volatile ("membar #StoreLoad" : : : "memory");
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
#endif // OS_CPU_LINUX_SPARC_ORDERACCESS_LINUX_SPARC_HPP
|
||||
|
||||
@ -55,6 +55,11 @@ inline void OrderAccess::fence() {
|
||||
compiler_barrier();
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() {
|
||||
int idx = 0;
|
||||
__asm__ volatile ("cpuid " : "+a" (idx) : : "ebx", "ecx", "edx", "memory");
|
||||
}
|
||||
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
{
|
||||
|
||||
@ -82,5 +82,6 @@ inline void OrderAccess::acquire() { LIGHT_MEM_BARRIER; }
|
||||
inline void OrderAccess::release() { LIGHT_MEM_BARRIER; }
|
||||
|
||||
inline void OrderAccess::fence() { FULL_MEM_BARRIER; }
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
#endif // OS_CPU_LINUX_ZERO_ORDERACCESS_LINUX_ZERO_HPP
|
||||
|
||||
@ -51,4 +51,6 @@ inline void OrderAccess::fence() {
|
||||
__asm__ volatile ("membar #StoreLoad" : : : "memory");
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() { }
|
||||
|
||||
#endif // OS_CPU_SOLARIS_SPARC_ORDERACCESS_SOLARIS_SPARC_HPP
|
||||
|
||||
@ -54,4 +54,9 @@ inline void OrderAccess::fence() {
|
||||
compiler_barrier();
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() {
|
||||
int idx = 0;
|
||||
__asm__ volatile ("cpuid " : "+a" (idx) : : "ebx", "ecx", "edx", "memory");
|
||||
}
|
||||
|
||||
#endif // OS_CPU_SOLARIS_X86_ORDERACCESS_SOLARIS_X86_HPP
|
||||
|
||||
@ -69,6 +69,11 @@ inline void OrderAccess::fence() {
|
||||
compiler_barrier();
|
||||
}
|
||||
|
||||
inline void OrderAccess::cross_modify_fence() {
|
||||
int regs[4];
|
||||
__cpuid(regs, 0);
|
||||
}
|
||||
|
||||
#ifndef AMD64
|
||||
template<>
|
||||
struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
|
||||
|
||||
@ -465,6 +465,9 @@ frame os::get_sender_for_C_frame(frame* fr) {
|
||||
}
|
||||
|
||||
#ifndef AMD64
|
||||
// Ignore "C4172: returning address of local variable or temporary" on 32bit
|
||||
PRAGMA_DIAG_PUSH
|
||||
PRAGMA_DISABLE_MSVC_WARNING(4172)
|
||||
// Returns an estimate of the current stack pointer. Result must be guaranteed
|
||||
// to point into the calling threads stack, and be no lower than the current
|
||||
// stack pointer.
|
||||
@ -473,6 +476,7 @@ address os::current_stack_pointer() {
|
||||
address sp = (address)&dummy;
|
||||
return sp;
|
||||
}
|
||||
PRAGMA_DIAG_POP
|
||||
#else
|
||||
// Returns the current stack pointer. Accurate value needed for
|
||||
// os::verify_stack_alignment().
|
||||
|
||||
@ -206,8 +206,6 @@ private:
|
||||
// AOT compiled methods do not get into zombie state
|
||||
virtual bool can_convert_to_zombie() { return false; }
|
||||
|
||||
// Evol dependent methods already marked.
|
||||
virtual bool is_evol_dependent() { return false; }
|
||||
virtual bool is_dependent_on_method(Method* dependee) { return true; }
|
||||
|
||||
virtual void clear_inline_caches();
|
||||
|
||||
@ -40,6 +40,7 @@
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "utilities/copy.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
#include "classfile/dictionary.hpp"
|
||||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
#include "classfile/packageEntry.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "classfile/verificationType.hpp"
|
||||
@ -77,6 +78,8 @@
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/ostream.hpp"
|
||||
#include "utilities/resourceHash.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
|
||||
#if INCLUDE_CDS
|
||||
#include "classfile/systemDictionaryShared.hpp"
|
||||
#endif
|
||||
@ -312,7 +315,7 @@ void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const s
|
||||
const char* const str = java_lang_String::as_utf8_string(patch());
|
||||
// (could use java_lang_String::as_symbol instead, but might as well batch them)
|
||||
utf8_buffer = (const u1*) str;
|
||||
utf8_length = (int) strlen(str);
|
||||
utf8_length = (u2) strlen(str);
|
||||
}
|
||||
|
||||
unsigned int hash;
|
||||
@ -6113,7 +6116,7 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
|
||||
// For the boot and platform class loaders, skip classes that are not found in the
|
||||
// java runtime image, such as those found in the --patch-module entries.
|
||||
// These classes can't be loaded from the archive during runtime.
|
||||
if (!ClassLoader::is_modules_image(stream->source()) && strncmp(stream->source(), "jrt:", 4) != 0) {
|
||||
if (!stream->from_boot_loader_modules_image() && strncmp(stream->source(), "jrt:", 4) != 0) {
|
||||
skip = true;
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, 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
|
||||
@ -38,12 +38,14 @@ void ClassFileStream::truncated_file_error(TRAPS) const {
|
||||
ClassFileStream::ClassFileStream(const u1* buffer,
|
||||
int length,
|
||||
const char* source,
|
||||
bool verify_stream) :
|
||||
bool verify_stream,
|
||||
bool from_boot_loader_modules_image) :
|
||||
_buffer_start(buffer),
|
||||
_buffer_end(buffer + length),
|
||||
_current(buffer),
|
||||
_source(source),
|
||||
_need_verify(verify_stream) {}
|
||||
_need_verify(verify_stream),
|
||||
_from_boot_loader_modules_image(from_boot_loader_modules_image) {}
|
||||
|
||||
const u1* ClassFileStream::clone_buffer() const {
|
||||
u1* const new_buffer_start = NEW_RESOURCE_ARRAY(u1, length());
|
||||
@ -69,7 +71,8 @@ const ClassFileStream* ClassFileStream::clone() const {
|
||||
return new ClassFileStream(new_buffer_start,
|
||||
length(),
|
||||
clone_source(),
|
||||
need_verify());
|
||||
need_verify(),
|
||||
from_boot_loader_modules_image());
|
||||
}
|
||||
|
||||
uint64_t ClassFileStream::compute_fingerprint() const {
|
||||
|
||||
@ -44,7 +44,7 @@ class ClassFileStream: public ResourceObj {
|
||||
mutable const u1* _current; // Current buffer position
|
||||
const char* const _source; // Source of stream (directory name, ZIP/JAR archive name)
|
||||
bool _need_verify; // True if verification is on for the class file
|
||||
|
||||
bool _from_boot_loader_modules_image; // True if this was created by ClassPathImageEntry.
|
||||
void truncated_file_error(TRAPS) const ;
|
||||
|
||||
protected:
|
||||
@ -57,7 +57,8 @@ class ClassFileStream: public ResourceObj {
|
||||
ClassFileStream(const u1* buffer,
|
||||
int length,
|
||||
const char* source,
|
||||
bool verify_stream = verify); // to be verified by default
|
||||
bool verify_stream = verify, // to be verified by default
|
||||
bool from_boot_loader_modules_image = false);
|
||||
|
||||
virtual const ClassFileStream* clone() const;
|
||||
|
||||
@ -77,6 +78,7 @@ class ClassFileStream: public ResourceObj {
|
||||
const char* source() const { return _source; }
|
||||
bool need_verify() const { return _need_verify; }
|
||||
void set_verify(bool flag) { _need_verify = flag; }
|
||||
bool from_boot_loader_modules_image() const { return _from_boot_loader_modules_image; }
|
||||
|
||||
void check_truncated_file(bool b, TRAPS) const {
|
||||
if (b) {
|
||||
|
||||
@ -361,6 +361,8 @@ void ClassPathZipEntry::contents_do(void f(const char* name, void* context), voi
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_ONLY(ClassPathImageEntry* ClassPathImageEntry::_singleton = NULL;)
|
||||
|
||||
void ClassPathImageEntry::close_jimage() {
|
||||
if (_jimage != NULL) {
|
||||
(*JImageClose)(_jimage);
|
||||
@ -373,12 +375,17 @@ ClassPathImageEntry::ClassPathImageEntry(JImageFile* jimage, const char* name) :
|
||||
_jimage(jimage) {
|
||||
guarantee(jimage != NULL, "jimage file is null");
|
||||
guarantee(name != NULL, "jimage file name is null");
|
||||
assert(_singleton == NULL, "VM supports only one jimage");
|
||||
DEBUG_ONLY(_singleton = this);
|
||||
size_t len = strlen(name) + 1;
|
||||
_name = NEW_C_HEAP_ARRAY(const char, len, mtClass);
|
||||
strncpy((char *)_name, name, len);
|
||||
}
|
||||
|
||||
ClassPathImageEntry::~ClassPathImageEntry() {
|
||||
assert(_singleton == this, "must be");
|
||||
DEBUG_ONLY(_singleton = NULL);
|
||||
|
||||
if (_name != NULL) {
|
||||
FREE_C_HEAP_ARRAY(const char, _name);
|
||||
_name = NULL;
|
||||
@ -389,6 +396,10 @@ ClassPathImageEntry::~ClassPathImageEntry() {
|
||||
}
|
||||
}
|
||||
|
||||
ClassFileStream* ClassPathImageEntry::open_stream(const char* name, TRAPS) {
|
||||
return open_stream_for_loader(name, ClassLoaderData::the_null_class_loader_data(), THREAD);
|
||||
}
|
||||
|
||||
// For a class in a named module, look it up in the jimage file using this syntax:
|
||||
// /<module-name>/<package-name>/<base-class>
|
||||
//
|
||||
@ -396,7 +407,7 @@ ClassPathImageEntry::~ClassPathImageEntry() {
|
||||
// 1. There are no unnamed modules in the jimage file.
|
||||
// 2. A package is in at most one module in the jimage file.
|
||||
//
|
||||
ClassFileStream* ClassPathImageEntry::open_stream(const char* name, TRAPS) {
|
||||
ClassFileStream* ClassPathImageEntry::open_stream_for_loader(const char* name, ClassLoaderData* loader_data, TRAPS) {
|
||||
jlong size;
|
||||
JImageLocationRef location = (*JImageFindResource)(_jimage, "", get_jimage_version_string(), name, &size);
|
||||
|
||||
@ -407,20 +418,8 @@ ClassFileStream* ClassPathImageEntry::open_stream(const char* name, TRAPS) {
|
||||
if (pkg_name != NULL) {
|
||||
if (!Universe::is_module_initialized()) {
|
||||
location = (*JImageFindResource)(_jimage, JAVA_BASE_NAME, get_jimage_version_string(), name, &size);
|
||||
#if INCLUDE_CDS
|
||||
// CDS uses the boot class loader to load classes whose packages are in
|
||||
// modules defined for other class loaders. So, for now, get their module
|
||||
// names from the "modules" jimage file.
|
||||
if (DumpSharedSpaces && location == 0) {
|
||||
const char* module_name = (*JImagePackageToModule)(_jimage, pkg_name);
|
||||
if (module_name != NULL) {
|
||||
location = (*JImageFindResource)(_jimage, module_name, get_jimage_version_string(), name, &size);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
} else {
|
||||
PackageEntry* package_entry = ClassLoader::get_package_entry(name, ClassLoaderData::the_null_class_loader_data(), CHECK_NULL);
|
||||
PackageEntry* package_entry = ClassLoader::get_package_entry(name, loader_data, CHECK_NULL);
|
||||
if (package_entry != NULL) {
|
||||
ResourceMark rm;
|
||||
// Get the module name
|
||||
@ -442,10 +441,12 @@ ClassFileStream* ClassPathImageEntry::open_stream(const char* name, TRAPS) {
|
||||
char* data = NEW_RESOURCE_ARRAY(char, size);
|
||||
(*JImageGetResource)(_jimage, location, data, size);
|
||||
// Resource allocated
|
||||
assert(this == (ClassPathImageEntry*)ClassLoader::get_jrt_entry(), "must be");
|
||||
return new ClassFileStream((u1*)data,
|
||||
(int)size,
|
||||
_name,
|
||||
ClassFileStream::verify);
|
||||
ClassFileStream::verify,
|
||||
true); // from_boot_loader_modules_image
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -459,7 +460,9 @@ JImageLocationRef ClassLoader::jimage_find_resource(JImageFile* jf,
|
||||
}
|
||||
|
||||
bool ClassPathImageEntry::is_modules_image() const {
|
||||
return ClassLoader::is_modules_image(name());
|
||||
assert(this == _singleton, "VM supports a single jimage");
|
||||
assert(this == (ClassPathImageEntry*)ClassLoader::get_jrt_entry(), "must be used for jrt entry");
|
||||
return true;
|
||||
}
|
||||
|
||||
#if INCLUDE_CDS
|
||||
@ -737,8 +740,8 @@ void ClassLoader::setup_boot_search_path(const char *class_path) {
|
||||
// Check for a jimage
|
||||
if (Arguments::has_jimage()) {
|
||||
assert(_jrt_entry == NULL, "should not setup bootstrap class search path twice");
|
||||
assert(new_entry != NULL && new_entry->is_modules_image(), "No java runtime image present");
|
||||
_jrt_entry = new_entry;
|
||||
assert(new_entry != NULL && new_entry->is_modules_image(), "No java runtime image present");
|
||||
assert(_jrt_entry->jimage() != NULL, "No java runtime image");
|
||||
}
|
||||
} else {
|
||||
@ -1499,7 +1502,7 @@ void ClassLoader::record_result(InstanceKlass* ik, const ClassFileStream* stream
|
||||
}
|
||||
// for index 0 and the stream->source() is the modules image or has the jrt: protocol.
|
||||
// The class must be from the runtime modules image.
|
||||
if (i == 0 && (is_modules_image(src) || string_starts_with(src, "jrt:"))) {
|
||||
if (i == 0 && (stream->from_boot_loader_modules_image() || string_starts_with(src, "jrt:"))) {
|
||||
classpath_index = i;
|
||||
break;
|
||||
}
|
||||
@ -1515,7 +1518,7 @@ void ClassLoader::record_result(InstanceKlass* ik, const ClassFileStream* stream
|
||||
// The shared path table is set up after module system initialization.
|
||||
// The path table contains no entry before that. Any classes loaded prior
|
||||
// to the setup of the shared path table must be from the modules image.
|
||||
assert(is_modules_image(src), "stream must be from modules image");
|
||||
assert(stream->from_boot_loader_modules_image(), "stream must be loaded by boot loader from modules image");
|
||||
assert(FileMapInfo::get_number_of_shared_paths() == 0, "shared path table must not have been setup");
|
||||
classpath_index = 0;
|
||||
}
|
||||
|
||||
@ -61,6 +61,10 @@ public:
|
||||
// Attempt to locate file_name through this class path entry.
|
||||
// Returns a class file parsing stream if successfull.
|
||||
virtual ClassFileStream* open_stream(const char* name, TRAPS) = 0;
|
||||
// Open the stream for a specific class loader
|
||||
virtual ClassFileStream* open_stream_for_loader(const char* name, ClassLoaderData* loader_data, TRAPS) {
|
||||
return open_stream(name, THREAD);
|
||||
}
|
||||
};
|
||||
|
||||
class ClassPathDirEntry: public ClassPathEntry {
|
||||
@ -114,6 +118,7 @@ class ClassPathImageEntry: public ClassPathEntry {
|
||||
private:
|
||||
JImageFile* _jimage;
|
||||
const char* _name;
|
||||
DEBUG_ONLY(static ClassPathImageEntry* _singleton;)
|
||||
public:
|
||||
bool is_modules_image() const;
|
||||
bool is_jar_file() const { return false; }
|
||||
@ -124,6 +129,7 @@ public:
|
||||
ClassPathImageEntry(JImageFile* jimage, const char* name);
|
||||
virtual ~ClassPathImageEntry();
|
||||
ClassFileStream* open_stream(const char* name, TRAPS);
|
||||
ClassFileStream* open_stream_for_loader(const char* name, ClassLoaderData* loader_data, TRAPS);
|
||||
};
|
||||
|
||||
// ModuleClassPathList contains a linked list of ClassPathEntry's
|
||||
@ -439,8 +445,6 @@ class ClassLoader: AllStatic {
|
||||
// distinguish from a class_name with no package name, as both cases have a NULL return value
|
||||
static const char* package_from_name(const char* const class_name, bool* bad_class_name = NULL);
|
||||
|
||||
static bool is_modules_image(const char* name) { return string_ends_with(name, MODULES_IMAGE_NAME); }
|
||||
|
||||
// Debugging
|
||||
static void verify() PRODUCT_RETURN;
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2019, 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
|
||||
@ -288,7 +288,7 @@ bool ClassLoaderData::try_claim(int claim) {
|
||||
// it is being defined, therefore _keep_alive is not volatile or atomic.
|
||||
void ClassLoaderData::inc_keep_alive() {
|
||||
if (is_unsafe_anonymous()) {
|
||||
assert(_keep_alive >= 0, "Invalid keep alive increment count");
|
||||
assert(_keep_alive > 0, "Invalid keep alive increment count");
|
||||
_keep_alive++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, 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
|
||||
@ -163,7 +163,7 @@ void ClassLoaderDataGraph::walk_metadata_and_clean_metaspaces() {
|
||||
// TODO: have redefinition clean old methods out of the code cache. They still exist in some places.
|
||||
bool walk_all_metadata = InstanceKlass::has_previous_versions_and_reset();
|
||||
|
||||
MetadataOnStackMark md_on_stack(walk_all_metadata);
|
||||
MetadataOnStackMark md_on_stack(walk_all_metadata, /*redefinition_walk*/false);
|
||||
clean_deallocate_lists(walk_all_metadata);
|
||||
}
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@
|
||||
#include "runtime/vframe.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/preserveException.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
#if INCLUDE_JVMCI
|
||||
#include "jvmci/jvmciJavaClasses.hpp"
|
||||
#endif
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
#include "jvmtifiles/jvmti.h"
|
||||
#include "oops/oop.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
|
||||
// Interface for manipulating the basic Java classes.
|
||||
//
|
||||
|
||||
@ -58,7 +58,7 @@ InstanceKlass* KlassFactory::check_shared_class_file_load_hook(
|
||||
// Post the CFLH
|
||||
JvmtiCachedClassFileData* cached_class_file = NULL;
|
||||
if (cfs == NULL) {
|
||||
cfs = FileMapInfo::open_stream_for_jvmti(ik, CHECK_NULL);
|
||||
cfs = FileMapInfo::open_stream_for_jvmti(ik, class_loader, CHECK_NULL);
|
||||
}
|
||||
unsigned char* ptr = (unsigned char*)cfs->buffer();
|
||||
unsigned char* end_ptr = ptr + cfs->length();
|
||||
|
||||
@ -50,18 +50,25 @@ class MetadataOnStackClosure : public MetadataClosure {
|
||||
// it. Class unloading only deletes in-error class files, methods created by
|
||||
// the relocator and dummy constant pools. None of these appear anywhere except
|
||||
// in metadata Handles.
|
||||
MetadataOnStackMark::MetadataOnStackMark(bool redefinition_walk) {
|
||||
MetadataOnStackMark::MetadataOnStackMark(bool walk_all_metadata, bool redefinition_walk) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||
assert(_used_buffers == NULL, "sanity check");
|
||||
assert(!_is_active, "MetadataOnStackMarks do not nest");
|
||||
assert(!redefinition_walk || walk_all_metadata,
|
||||
"walk_all_metadata must be true for redefinition_walk");
|
||||
NOT_PRODUCT(_is_active = true;)
|
||||
|
||||
Threads::metadata_handles_do(Metadata::mark_on_stack);
|
||||
|
||||
if (redefinition_walk) {
|
||||
if (walk_all_metadata) {
|
||||
MetadataOnStackClosure md_on_stack;
|
||||
Threads::metadata_do(&md_on_stack);
|
||||
CodeCache::metadata_do(&md_on_stack);
|
||||
if (redefinition_walk) {
|
||||
// We have to walk the whole code cache during redefinition.
|
||||
CodeCache::metadata_do(&md_on_stack);
|
||||
} else {
|
||||
CodeCache::old_nmethods_do(&md_on_stack);
|
||||
}
|
||||
CompileBroker::mark_on_stack();
|
||||
JvmtiCurrentBreakpoints::metadata_do(Metadata::mark_on_stack);
|
||||
ThreadService::metadata_do(Metadata::mark_on_stack);
|
||||
|
||||
@ -48,7 +48,7 @@ class MetadataOnStackMark : public StackObj {
|
||||
static void retire_buffer(MetadataOnStackBuffer* buffer);
|
||||
|
||||
public:
|
||||
MetadataOnStackMark(bool redefinition_walk);
|
||||
MetadataOnStackMark(bool walk_all_metadata, bool redefinition_walk);
|
||||
~MetadataOnStackMark();
|
||||
|
||||
static void record(Metadata* m);
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "jni.h"
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/classLoaderData.inline.hpp"
|
||||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
|
||||
@ -52,6 +52,7 @@
|
||||
#include "utilities/concurrentHashTable.inline.hpp"
|
||||
#include "utilities/concurrentHashTableTasks.inline.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
|
||||
// We prefer short chains of avg 2
|
||||
const double PREF_AVG_LIST_LEN = 2.0;
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
#include "services/diagnosticCommand.hpp"
|
||||
#include "utilities/concurrentHashTable.inline.hpp"
|
||||
#include "utilities/concurrentHashTableTasks.inline.hpp"
|
||||
#include "utilities/utf8.hpp"
|
||||
|
||||
// We used to not resize at all, so let's be conservative
|
||||
// and not set it too short before we decide to resize,
|
||||
|
||||
@ -25,11 +25,12 @@
|
||||
#ifndef SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
|
||||
#define SHARE_CLASSFILE_SYSTEMDICTIONARY_HPP
|
||||
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/classLoaderData.hpp"
|
||||
#include "jvmci/systemDictionary_jvmci.hpp"
|
||||
#include "oops/objArrayOop.hpp"
|
||||
#include "oops/symbol.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
#include "runtime/reflectionUtils.hpp"
|
||||
#include "runtime/signature.hpp"
|
||||
#include "utilities/hashtable.hpp"
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
#include "oops/klass.hpp"
|
||||
#include "classfile/dictionary.hpp"
|
||||
#include "classfile/packageEntry.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "memory/filemap.hpp"
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "jvm.h"
|
||||
#include "classfile/classFileStream.hpp"
|
||||
#include "classfile/classLoader.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "classfile/stackMapTable.hpp"
|
||||
#include "classfile/stackMapFrame.hpp"
|
||||
@ -574,7 +575,7 @@ void ErrorContext::stackmap_details(outputStream* ss, const Method* method) cons
|
||||
ClassVerifier::ClassVerifier(
|
||||
InstanceKlass* klass, TRAPS)
|
||||
: _thread(THREAD), _previous_symbol(NULL), _symbols(NULL), _exception_type(NULL),
|
||||
_message(NULL), _klass(klass) {
|
||||
_message(NULL), _method_signatures_table(NULL), _klass(klass) {
|
||||
_this_type = VerificationType::reference_type(klass->name());
|
||||
}
|
||||
|
||||
@ -601,6 +602,13 @@ TypeOrigin ClassVerifier::ref_ctx(const char* sig, TRAPS) {
|
||||
void ClassVerifier::verify_class(TRAPS) {
|
||||
log_info(verification)("Verifying class %s with new format", _klass->external_name());
|
||||
|
||||
// Either verifying both local and remote classes or just remote classes.
|
||||
assert(BytecodeVerificationRemote, "Should not be here");
|
||||
|
||||
// Create hash table containing method signatures.
|
||||
method_signatures_table_type method_signatures_table;
|
||||
set_method_signatures_table(&method_signatures_table);
|
||||
|
||||
Array<Method*>* methods = _klass->methods();
|
||||
int num_methods = methods->length();
|
||||
|
||||
@ -625,6 +633,55 @@ void ClassVerifier::verify_class(TRAPS) {
|
||||
}
|
||||
}
|
||||
|
||||
// Translate the signature entries into verification types and save them in
|
||||
// the growable array. Also, save the count of arguments.
|
||||
void ClassVerifier::translate_signature(Symbol* const method_sig,
|
||||
sig_as_verification_types* sig_verif_types,
|
||||
TRAPS) {
|
||||
SignatureStream sig_stream(method_sig);
|
||||
VerificationType sig_type[2];
|
||||
int sig_i = 0;
|
||||
GrowableArray<VerificationType>* verif_types = sig_verif_types->sig_verif_types();
|
||||
|
||||
// Translate the signature arguments into verification types.
|
||||
while (!sig_stream.at_return_type()) {
|
||||
int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
|
||||
assert(n <= 2, "Unexpected signature type");
|
||||
|
||||
// Store verification type(s). Longs and Doubles each have two verificationTypes.
|
||||
for (int x = 0; x < n; x++) {
|
||||
verif_types->push(sig_type[x]);
|
||||
}
|
||||
sig_i += n;
|
||||
sig_stream.next();
|
||||
}
|
||||
|
||||
// Set final arg count, not including the return type. The final arg count will
|
||||
// be compared with sig_verify_types' length to see if there is a return type.
|
||||
sig_verif_types->set_num_args(sig_i);
|
||||
|
||||
// Store verification type(s) for the return type, if there is one.
|
||||
if (sig_stream.type() != T_VOID) {
|
||||
int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
|
||||
assert(n <= 2, "Unexpected signature return type");
|
||||
for (int y = 0; y < n; y++) {
|
||||
verif_types->push(sig_type[y]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ClassVerifier::create_method_sig_entry(sig_as_verification_types* sig_verif_types,
|
||||
int sig_index, TRAPS) {
|
||||
// Translate the signature into verification types.
|
||||
ConstantPool* cp = _klass->constants();
|
||||
Symbol* const method_sig = cp->symbol_at(sig_index);
|
||||
translate_signature(method_sig, sig_verif_types, CHECK_VERIFY(this));
|
||||
|
||||
// Add the list of this signature's verification types to the table.
|
||||
bool is_unique = method_signatures_table()->put(sig_index, sig_verif_types);
|
||||
assert(is_unique, "Duplicate entries in method_signature_table");
|
||||
}
|
||||
|
||||
void ClassVerifier::verify_method(const methodHandle& m, TRAPS) {
|
||||
HandleMark hm(THREAD);
|
||||
_method = m; // initialize _method
|
||||
@ -2734,44 +2791,28 @@ void ClassVerifier::verify_invoke_instructions(
|
||||
ref_class_type = cp_ref_index_to_type(index, cp, CHECK_VERIFY(this));
|
||||
}
|
||||
|
||||
// For a small signature length, we just allocate 128 bytes instead
|
||||
// of parsing the signature once to find its size.
|
||||
// -3 is for '(', ')' and return descriptor; multiply by 2 is for
|
||||
// longs/doubles to be consertive.
|
||||
assert(sizeof(VerificationType) == sizeof(uintptr_t),
|
||||
"buffer type must match VerificationType size");
|
||||
uintptr_t on_stack_sig_types_buffer[128];
|
||||
// If we make a VerificationType[128] array directly, the compiler calls
|
||||
// to the c-runtime library to do the allocation instead of just
|
||||
// stack allocating it. Plus it would run constructors. This shows up
|
||||
// in performance profiles.
|
||||
|
||||
VerificationType* sig_types;
|
||||
int size = (method_sig->utf8_length() - 3) * 2;
|
||||
if (size > 128) {
|
||||
// Long and double occupies two slots here.
|
||||
ArgumentSizeComputer size_it(method_sig);
|
||||
size = size_it.size();
|
||||
sig_types = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, VerificationType, size);
|
||||
} else{
|
||||
sig_types = (VerificationType*)on_stack_sig_types_buffer;
|
||||
}
|
||||
SignatureStream sig_stream(method_sig);
|
||||
int sig_i = 0;
|
||||
while (!sig_stream.at_return_type()) {
|
||||
sig_i += change_sig_to_verificationType(
|
||||
&sig_stream, &sig_types[sig_i], CHECK_VERIFY(this));
|
||||
sig_stream.next();
|
||||
}
|
||||
int nargs = sig_i;
|
||||
// Get the UTF8 index for this signature.
|
||||
int sig_index = cp->signature_ref_index_at(cp->name_and_type_ref_index_at(index));
|
||||
|
||||
#ifdef ASSERT
|
||||
{
|
||||
ArgumentSizeComputer size_it(method_sig);
|
||||
assert(nargs == size_it.size(), "Argument sizes do not match");
|
||||
assert(nargs <= (method_sig->utf8_length() - 3) * 2, "estimate of max size isn't conservative enough");
|
||||
// Get the signature's verification types.
|
||||
sig_as_verification_types* mth_sig_verif_types;
|
||||
sig_as_verification_types** mth_sig_verif_types_ptr = method_signatures_table()->get(sig_index);
|
||||
if (mth_sig_verif_types_ptr != NULL) {
|
||||
// Found the entry for the signature's verification types in the hash table.
|
||||
mth_sig_verif_types = *mth_sig_verif_types_ptr;
|
||||
assert(mth_sig_verif_types != NULL, "Unexpected NULL sig_as_verification_types value");
|
||||
} else {
|
||||
// Not found, add the entry to the table.
|
||||
GrowableArray<VerificationType>* verif_types = new GrowableArray<VerificationType>(10);
|
||||
mth_sig_verif_types = new sig_as_verification_types(verif_types);
|
||||
create_method_sig_entry(mth_sig_verif_types, sig_index, CHECK_VERIFY(this));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Get the number of arguments for this signature.
|
||||
int nargs = mth_sig_verif_types->num_args();
|
||||
|
||||
// Check instruction operands
|
||||
u2 bci = bcs->bci();
|
||||
@ -2844,10 +2885,16 @@ void ClassVerifier::verify_invoke_instructions(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Get the verification types for the method's arguments.
|
||||
GrowableArray<VerificationType>* sig_verif_types = mth_sig_verif_types->sig_verif_types();
|
||||
assert(sig_verif_types != NULL, "Missing signature's array of verification types");
|
||||
// Match method descriptor with operand stack
|
||||
for (int i = nargs - 1; i >= 0; i--) { // Run backwards
|
||||
current_frame->pop_stack(sig_types[i], CHECK_VERIFY(this));
|
||||
// The arguments are on the stack in descending order.
|
||||
for (int i = nargs - 1; i >= 0; i--) { // Run backwards
|
||||
current_frame->pop_stack(sig_verif_types->at(i), CHECK_VERIFY(this));
|
||||
}
|
||||
|
||||
// Check objectref on operand stack
|
||||
if (opcode != Bytecodes::_invokestatic &&
|
||||
opcode != Bytecodes::_invokedynamic) {
|
||||
@ -2919,7 +2966,8 @@ void ClassVerifier::verify_invoke_instructions(
|
||||
}
|
||||
}
|
||||
// Push the result type.
|
||||
if (sig_stream.type() != T_VOID) {
|
||||
int sig_verif_types_len = sig_verif_types->length();
|
||||
if (sig_verif_types_len > nargs) { // There's a return type
|
||||
if (method_name == vmSymbols::object_initializer_name()) {
|
||||
// <init> method must have a void return type
|
||||
/* Unreachable? Class file parser verifies that methods with '<' have
|
||||
@ -2928,11 +2976,13 @@ void ClassVerifier::verify_invoke_instructions(
|
||||
"Return type must be void in <init> method");
|
||||
return;
|
||||
}
|
||||
VerificationType return_type[2];
|
||||
int n = change_sig_to_verificationType(
|
||||
&sig_stream, return_type, CHECK_VERIFY(this));
|
||||
for (int i = 0; i < n; i++) {
|
||||
current_frame->push_stack(return_type[i], CHECK_VERIFY(this)); // push types backwards
|
||||
|
||||
assert(sig_verif_types_len <= nargs + 2,
|
||||
"Signature verification types array return type is bogus");
|
||||
for (int i = nargs; i < sig_verif_types_len; i++) {
|
||||
assert(i == nargs || sig_verif_types->at(i).is_long2() ||
|
||||
sig_verif_types->at(i).is_double2(), "Unexpected return verificationType");
|
||||
current_frame->push_stack(sig_verif_types->at(i), CHECK_VERIFY(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
#include "runtime/handles.hpp"
|
||||
#include "utilities/exceptions.hpp"
|
||||
#include "utilities/growableArray.hpp"
|
||||
#include "utilities/resourceHash.hpp"
|
||||
|
||||
// The verifier class
|
||||
class Verifier : AllStatic {
|
||||
@ -246,6 +247,33 @@ class ErrorContext {
|
||||
void stackmap_details(outputStream* ss, const Method* method) const;
|
||||
};
|
||||
|
||||
class sig_as_verification_types : public ResourceObj {
|
||||
private:
|
||||
int _num_args; // Number of arguments, not including return type.
|
||||
GrowableArray<VerificationType>* _sig_verif_types;
|
||||
|
||||
public:
|
||||
|
||||
sig_as_verification_types(GrowableArray<VerificationType>* sig_verif_types) :
|
||||
_num_args(0), _sig_verif_types(sig_verif_types) {
|
||||
}
|
||||
|
||||
int num_args() const { return _num_args; }
|
||||
void set_num_args(int num_args) { _num_args = num_args; }
|
||||
|
||||
GrowableArray<VerificationType>* sig_verif_types() { return _sig_verif_types; }
|
||||
void set_sig_verif_types(GrowableArray<VerificationType>* sig_verif_types) {
|
||||
_sig_verif_types = sig_verif_types;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// This hashtable is indexed by the Utf8 constant pool indexes pointed to
|
||||
// by constant pool (Interface)Method_refs' NameAndType signature entries.
|
||||
typedef ResourceHashtable<int, sig_as_verification_types*,
|
||||
primitive_hash<int>, primitive_equals<int>, 1007>
|
||||
method_signatures_table_type;
|
||||
|
||||
// A new instance of this class is created for each class being verified
|
||||
class ClassVerifier : public StackObj {
|
||||
private:
|
||||
@ -257,6 +285,8 @@ class ClassVerifier : public StackObj {
|
||||
Symbol* _exception_type;
|
||||
char* _message;
|
||||
|
||||
method_signatures_table_type* _method_signatures_table;
|
||||
|
||||
ErrorContext _error_context; // contains information about an error
|
||||
|
||||
void verify_method(const methodHandle& method, TRAPS);
|
||||
@ -383,6 +413,13 @@ class ClassVerifier : public StackObj {
|
||||
// the message_buffer will be filled in with the exception message.
|
||||
void verify_class(TRAPS);
|
||||
|
||||
// Translates method signature entries into verificationTypes and saves them
|
||||
// in the growable array.
|
||||
void translate_signature(Symbol* const method_sig, sig_as_verification_types* sig_verif_types, TRAPS);
|
||||
|
||||
// Initializes a sig_as_verification_types entry and puts it in the hash table.
|
||||
void create_method_sig_entry(sig_as_verification_types* sig_verif_types, int sig_index, TRAPS);
|
||||
|
||||
// Return status modes
|
||||
Symbol* result() const { return _exception_type; }
|
||||
bool has_error() const { return result() != NULL; }
|
||||
@ -400,6 +437,14 @@ class ClassVerifier : public StackObj {
|
||||
|
||||
Klass* load_class(Symbol* name, TRAPS);
|
||||
|
||||
method_signatures_table_type* method_signatures_table() const {
|
||||
return _method_signatures_table;
|
||||
}
|
||||
|
||||
void set_method_signatures_table(method_signatures_table_type* method_signatures_table) {
|
||||
_method_signatures_table = method_signatures_table;
|
||||
}
|
||||
|
||||
int change_sig_to_verificationType(
|
||||
SignatureStream* sig_type, VerificationType* inference_type, TRAPS);
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#ifndef SHARE_CLASSFILE_VMSYMBOLS_HPP
|
||||
#define SHARE_CLASSFILE_VMSYMBOLS_HPP
|
||||
|
||||
#include "classfile/moduleEntry.hpp"
|
||||
#include "jfr/support/jfrIntrinsics.hpp"
|
||||
#include "jvmci/vmSymbols_jvmci.hpp"
|
||||
#include "memory/iterator.hpp"
|
||||
@ -52,7 +51,7 @@
|
||||
|
||||
#define VM_SYMBOLS_DO(template, do_alias) \
|
||||
/* commonly used class, package, module names */ \
|
||||
template(java_base, JAVA_BASE_NAME) \
|
||||
template(java_base, "java.base") \
|
||||
template(java_lang_System, "java/lang/System") \
|
||||
template(java_lang_Object, "java/lang/Object") \
|
||||
template(java_lang_Class, "java/lang/Class") \
|
||||
|
||||
@ -1032,43 +1032,77 @@ bool CodeCache::is_far_target(address target) {
|
||||
#endif
|
||||
}
|
||||
|
||||
// Just marks the methods in this class as needing deoptimization
|
||||
void CodeCache::mark_for_evol_deoptimization(InstanceKlass* dependee) {
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
#ifdef INCLUDE_JVMTI
|
||||
// RedefineClasses support for unloading nmethods that are dependent on "old" methods.
|
||||
// We don't really expect this table to grow very large. If it does, it can become a hashtable.
|
||||
static GrowableArray<CompiledMethod*>* old_compiled_method_table = NULL;
|
||||
|
||||
// Deoptimize all methods of the evolving class itself
|
||||
Array<Method*>* old_methods = dependee->methods();
|
||||
for (int i = 0; i < old_methods->length(); i++) {
|
||||
ResourceMark rm;
|
||||
Method* old_method = old_methods->at(i);
|
||||
CompiledMethod* nm = old_method->code();
|
||||
if (nm != NULL) {
|
||||
nm->mark_for_deoptimization();
|
||||
static void add_to_old_table(CompiledMethod* c) {
|
||||
if (old_compiled_method_table == NULL) {
|
||||
old_compiled_method_table = new (ResourceObj::C_HEAP, mtCode) GrowableArray<CompiledMethod*>(100, true);
|
||||
}
|
||||
old_compiled_method_table->push(c);
|
||||
}
|
||||
|
||||
static void reset_old_method_table() {
|
||||
if (old_compiled_method_table != NULL) {
|
||||
delete old_compiled_method_table;
|
||||
old_compiled_method_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove this method when zombied or unloaded.
|
||||
void CodeCache::unregister_old_nmethod(CompiledMethod* c) {
|
||||
assert_locked_or_safepoint(CodeCache_lock);
|
||||
if (old_compiled_method_table != NULL) {
|
||||
int index = old_compiled_method_table->find(c);
|
||||
if (index != -1) {
|
||||
old_compiled_method_table->delete_at(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CodeCache::old_nmethods_do(MetadataClosure* f) {
|
||||
// Walk old method table and mark those on stack.
|
||||
int length = 0;
|
||||
if (old_compiled_method_table != NULL) {
|
||||
length = old_compiled_method_table->length();
|
||||
for (int i = 0; i < length; i++) {
|
||||
old_compiled_method_table->at(i)->metadata_do(f);
|
||||
}
|
||||
}
|
||||
log_debug(redefine, class, nmethod)("Walked %d nmethods for mark_on_stack", length);
|
||||
}
|
||||
|
||||
// Just marks the methods in this class as needing deoptimization
|
||||
void CodeCache::mark_for_evol_deoptimization(InstanceKlass* dependee) {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
||||
|
||||
// Mark dependent AOT nmethods, which are only found via the class redefined.
|
||||
// TODO: add dependencies to aotCompiledMethod's metadata section so this isn't
|
||||
// needed.
|
||||
AOTLoader::mark_evol_dependent_methods(dependee);
|
||||
}
|
||||
|
||||
|
||||
// Walk compiled methods and mark dependent methods for deoptimization.
|
||||
int CodeCache::mark_dependents_for_evol_deoptimization() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
||||
// Each redefinition creates a new set of nmethods that have references to "old" Methods
|
||||
// So delete old method table and create a new one.
|
||||
reset_old_method_table();
|
||||
|
||||
int number_of_marked_CodeBlobs = 0;
|
||||
CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
|
||||
while(iter.next()) {
|
||||
CompiledMethod* nm = iter.method();
|
||||
if (nm->is_marked_for_deoptimization()) {
|
||||
// ...Already marked in the previous pass; count it here.
|
||||
// Also counts AOT compiled methods, already marked.
|
||||
number_of_marked_CodeBlobs++;
|
||||
} else if (nm->has_evol_metadata()) {
|
||||
ResourceMark rm;
|
||||
// Walk all alive nmethods to check for old Methods.
|
||||
// This includes methods whose inline caches point to old methods, so
|
||||
// inline cache clearing is unnecessary.
|
||||
if (nm->has_evol_metadata()) {
|
||||
nm->mark_for_deoptimization();
|
||||
add_to_old_table(nm);
|
||||
number_of_marked_CodeBlobs++;
|
||||
} else {
|
||||
// Inline caches that refer to an nmethod are deoptimized already, because
|
||||
// the Method* is walked in the metadata section of the nmethod.
|
||||
assert(!nm->is_evol_dependent(), "should no longer be necessary");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1077,6 +1111,46 @@ int CodeCache::mark_dependents_for_evol_deoptimization() {
|
||||
return number_of_marked_CodeBlobs;
|
||||
}
|
||||
|
||||
void CodeCache::mark_all_nmethods_for_evol_deoptimization() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
||||
CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
|
||||
while(iter.next()) {
|
||||
CompiledMethod* nm = iter.method();
|
||||
if (!nm->method()->is_method_handle_intrinsic()) {
|
||||
nm->mark_for_deoptimization();
|
||||
if (nm->has_evol_metadata()) {
|
||||
add_to_old_table(nm);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flushes compiled methods dependent on redefined classes, that have already been
|
||||
// marked for deoptimization.
|
||||
void CodeCache::flush_evol_dependents() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
|
||||
|
||||
// CodeCache can only be updated by a thread_in_VM and they will all be
|
||||
// stopped during the safepoint so CodeCache will be safe to update without
|
||||
// holding the CodeCache_lock.
|
||||
|
||||
// At least one nmethod has been marked for deoptimization
|
||||
|
||||
// All this already happens inside a VM_Operation, so we'll do all the work here.
|
||||
// Stuff copied from VM_Deoptimize and modified slightly.
|
||||
|
||||
// We do not want any GCs to happen while we are in the middle of this VM operation
|
||||
ResourceMark rm;
|
||||
DeoptimizationMarker dm;
|
||||
|
||||
// Deoptimize all activations depending on marked nmethods
|
||||
Deoptimization::deoptimize_dependents();
|
||||
|
||||
// Make the dependent methods not entrant
|
||||
make_marked_nmethods_not_entrant();
|
||||
}
|
||||
#endif // INCLUDE_JVMTI
|
||||
|
||||
// Deoptimize all methods
|
||||
void CodeCache::mark_all_nmethods_for_deoptimization() {
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
@ -1137,32 +1211,6 @@ void CodeCache::flush_dependents_on(InstanceKlass* dependee) {
|
||||
}
|
||||
}
|
||||
|
||||
// Flushes compiled methods dependent on redefined classes, that have already been
|
||||
// marked for deoptimization.
|
||||
void CodeCache::flush_evol_dependents() {
|
||||
// --- Compile_lock is not held. However we are at a safepoint.
|
||||
assert_locked_or_safepoint(Compile_lock);
|
||||
|
||||
// CodeCache can only be updated by a thread_in_VM and they will all be
|
||||
// stopped during the safepoint so CodeCache will be safe to update without
|
||||
// holding the CodeCache_lock.
|
||||
|
||||
// At least one nmethod has been marked for deoptimization
|
||||
|
||||
// All this already happens inside a VM_Operation, so we'll do all the work here.
|
||||
// Stuff copied from VM_Deoptimize and modified slightly.
|
||||
|
||||
// We do not want any GCs to happen while we are in the middle of this VM operation
|
||||
ResourceMark rm;
|
||||
DeoptimizationMarker dm;
|
||||
|
||||
// Deoptimize all activations depending on marked nmethods
|
||||
Deoptimization::deoptimize_dependents();
|
||||
|
||||
// Make the dependent methods not entrant
|
||||
make_marked_nmethods_not_entrant();
|
||||
}
|
||||
|
||||
// Flushes compiled methods dependent on dependee
|
||||
void CodeCache::flush_dependents_on_method(const methodHandle& m_h) {
|
||||
// --- Compile_lock is not held. However we are at a safepoint.
|
||||
|
||||
@ -270,10 +270,16 @@ class CodeCache : AllStatic {
|
||||
|
||||
// Flushing and deoptimization
|
||||
static void flush_dependents_on(InstanceKlass* dependee);
|
||||
|
||||
// RedefineClasses support
|
||||
// Flushing and deoptimization in case of evolution
|
||||
static void mark_for_evol_deoptimization(InstanceKlass* dependee);
|
||||
static int mark_dependents_for_evol_deoptimization();
|
||||
static void mark_all_nmethods_for_evol_deoptimization();
|
||||
static void flush_evol_dependents();
|
||||
static void old_nmethods_do(MetadataClosure* f);
|
||||
static void unregister_old_nmethod(CompiledMethod* c);
|
||||
|
||||
// Support for fullspeed debugging
|
||||
static void flush_dependents_on_method(const methodHandle& dependee);
|
||||
|
||||
|
||||
@ -368,7 +368,6 @@ public:
|
||||
int verify_icholder_relocations();
|
||||
void verify_oop_relocations();
|
||||
|
||||
virtual bool is_evol_dependent() = 0;
|
||||
bool has_evol_metadata();
|
||||
|
||||
// Fast breakpoint support. Tells if this compiled method is
|
||||
|
||||
@ -1089,7 +1089,6 @@ void nmethod::make_unloaded() {
|
||||
if (_method->code() == this) {
|
||||
_method->clear_code(); // Break a cycle
|
||||
}
|
||||
_method = NULL; // Clear the method of this dead nmethod
|
||||
}
|
||||
|
||||
// Make the class unloaded - i.e., change state and notify sweeper
|
||||
@ -1107,8 +1106,12 @@ void nmethod::make_unloaded() {
|
||||
MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
|
||||
Mutex::_no_safepoint_check_flag);
|
||||
Universe::heap()->unregister_nmethod(this);
|
||||
CodeCache::unregister_old_nmethod(this);
|
||||
}
|
||||
|
||||
// Clear the method of this dead nmethod
|
||||
set_method(NULL);
|
||||
|
||||
// Log the unloading.
|
||||
log_state_change();
|
||||
|
||||
@ -1289,6 +1292,7 @@ bool nmethod::make_not_entrant_or_zombie(int state) {
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
if (nmethod_needs_unregister) {
|
||||
Universe::heap()->unregister_nmethod(this);
|
||||
CodeCache::unregister_old_nmethod(this);
|
||||
}
|
||||
flush_dependencies(/*delete_immediately*/true);
|
||||
}
|
||||
@ -1986,32 +1990,6 @@ bool nmethod::check_dependency_on(DepChange& changes) {
|
||||
return found_check;
|
||||
}
|
||||
|
||||
bool nmethod::is_evol_dependent() {
|
||||
for (Dependencies::DepStream deps(this); deps.next(); ) {
|
||||
if (deps.type() == Dependencies::evol_method) {
|
||||
Method* method = deps.method_argument(0);
|
||||
if (method->is_old()) {
|
||||
if (log_is_enabled(Debug, redefine, class, nmethod)) {
|
||||
ResourceMark rm;
|
||||
log_debug(redefine, class, nmethod)
|
||||
("Found evol dependency of nmethod %s.%s(%s) compile_id=%d on method %s.%s(%s)",
|
||||
_method->method_holder()->external_name(),
|
||||
_method->name()->as_C_string(),
|
||||
_method->signature()->as_C_string(),
|
||||
compile_id(),
|
||||
method->method_holder()->external_name(),
|
||||
method->name()->as_C_string(),
|
||||
method->signature()->as_C_string());
|
||||
}
|
||||
if (TraceDependencies || LogCompilation)
|
||||
deps.log_dependency(method->method_holder());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called from mark_for_deoptimization, when dependee is invalidated.
|
||||
bool nmethod::is_dependent_on_method(Method* dependee) {
|
||||
for (Dependencies::DepStream deps(this); deps.next(); ) {
|
||||
|
||||
@ -565,11 +565,6 @@ public:
|
||||
// and the changes have invalidated it
|
||||
bool check_dependency_on(DepChange& changes);
|
||||
|
||||
// Evolution support. Tells if this compiled method is dependent on any of
|
||||
// redefined methods, such that if m() is replaced,
|
||||
// this compiled method will have to be deoptimized.
|
||||
bool is_evol_dependent();
|
||||
|
||||
// Fast breakpoint support. Tells if this compiled method is
|
||||
// dependent on the given method. Returns true if this nmethod
|
||||
// corresponds to the given method as well.
|
||||
|
||||
@ -24,8 +24,6 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "classfile/classLoaderDataGraph.hpp"
|
||||
#include "classfile/stringTable.hpp"
|
||||
#include "classfile/symbolTable.hpp"
|
||||
#include "classfile/systemDictionary.hpp"
|
||||
#include "code/codeCache.hpp"
|
||||
#include "gc/cms/cmsCollectorPolicy.hpp"
|
||||
@ -54,7 +52,6 @@
|
||||
#include "gc/shared/genCollectedHeap.hpp"
|
||||
#include "gc/shared/genOopClosures.inline.hpp"
|
||||
#include "gc/shared/isGCActiveMark.hpp"
|
||||
#include "gc/shared/oopStorageParState.hpp"
|
||||
#include "gc/shared/owstTaskTerminator.hpp"
|
||||
#include "gc/shared/referencePolicy.hpp"
|
||||
#include "gc/shared/referenceProcessorPhaseTimes.hpp"
|
||||
@ -2771,12 +2768,10 @@ class CMSParMarkTask : public AbstractGangTask {
|
||||
protected:
|
||||
CMSCollector* _collector;
|
||||
uint _n_workers;
|
||||
OopStorage::ParState<false, false> _par_state_string;
|
||||
CMSParMarkTask(const char* name, CMSCollector* collector, uint n_workers) :
|
||||
AbstractGangTask(name),
|
||||
_collector(collector),
|
||||
_n_workers(n_workers),
|
||||
_par_state_string(StringTable::weak_storage()) {}
|
||||
_n_workers(n_workers) {}
|
||||
// Work method in support of parallel rescan ... of young gen spaces
|
||||
void do_young_space_rescan(OopsInGenClosure* cl,
|
||||
ContiguousSpace* space,
|
||||
|
||||
@ -582,8 +582,7 @@ ParNewGenTask::ParNewGenTask(ParNewGeneration* young_gen,
|
||||
_young_gen(young_gen), _old_gen(old_gen),
|
||||
_young_old_boundary(young_old_boundary),
|
||||
_state_set(state_set),
|
||||
_strong_roots_scope(strong_roots_scope),
|
||||
_par_state_string(StringTable::weak_storage())
|
||||
_strong_roots_scope(strong_roots_scope)
|
||||
{}
|
||||
|
||||
void ParNewGenTask::work(uint worker_id) {
|
||||
|
||||
@ -235,7 +235,6 @@ class ParNewGenTask: public AbstractGangTask {
|
||||
HeapWord* _young_old_boundary;
|
||||
class ParScanThreadStateSet* _state_set;
|
||||
StrongRootsScope* _strong_roots_scope;
|
||||
OopStorage::ParState<false, false> _par_state_string;
|
||||
|
||||
public:
|
||||
ParNewGenTask(ParNewGeneration* young_gen,
|
||||
|
||||
@ -129,6 +129,12 @@ public:
|
||||
virtual void print_gc_threads_on(outputStream* st) const {}
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const {}
|
||||
|
||||
// No nmethod handling
|
||||
virtual void register_nmethod(nmethod* nm) {}
|
||||
virtual void unregister_nmethod(nmethod* nm) {}
|
||||
virtual void flush_nmethod(nmethod* nm) {}
|
||||
virtual void verify_nmethod(nmethod* nm) {}
|
||||
|
||||
// No heap verification
|
||||
virtual void prepare_for_verify() {}
|
||||
virtual void verify(VerifyOption option) {}
|
||||
|
||||
@ -58,7 +58,8 @@ G1BarrierSet::G1BarrierSet(G1CardTable* card_table) :
|
||||
_satb_mark_queue_buffer_allocator("SATB Buffer Allocator", G1SATBBufferSize),
|
||||
_dirty_card_queue_buffer_allocator("DC Buffer Allocator", G1UpdateBufferSize),
|
||||
_satb_mark_queue_set(),
|
||||
_dirty_card_queue_set()
|
||||
_dirty_card_queue_set(),
|
||||
_shared_dirty_card_queue(&_dirty_card_queue_set)
|
||||
{}
|
||||
|
||||
void G1BarrierSet::enqueue(oop pre_val) {
|
||||
@ -147,24 +148,7 @@ void G1BarrierSet::on_thread_attach(Thread* thread) {
|
||||
|
||||
// If we are creating the thread during a marking cycle, we should
|
||||
// set the active field of the SATB queue to true. That involves
|
||||
// copying the global is_active value to this thread's queue, which
|
||||
// is done without any direct synchronization here.
|
||||
//
|
||||
// The activation and deactivation of the SATB queues occurs at the
|
||||
// beginning / end of a marking cycle, and is done during
|
||||
// safepoints. This function is called just before a thread is
|
||||
// added to its corresponding threads list (for Java or non-Java
|
||||
// threads, respectively).
|
||||
//
|
||||
// For Java threads, that's done while holding the Threads_lock,
|
||||
// which ensures we're not at a safepoint, so reading the global
|
||||
// is_active state is synchronized against update.
|
||||
assert(!thread->is_Java_thread() || !SafepointSynchronize::is_at_safepoint(),
|
||||
"Should not be at a safepoint");
|
||||
// For non-Java threads, thread creation (and list addition) may,
|
||||
// and indeed usually does, occur during a safepoint. But such
|
||||
// creation isn't concurrent with updating the global SATB active
|
||||
// state.
|
||||
// copying the global is_active value to this thread's queue.
|
||||
bool is_satb_active = _satb_mark_queue_set.is_active();
|
||||
G1ThreadLocalData::satb_mark_queue(thread).set_active(is_satb_active);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
#include "gc/g1/g1DirtyCardQueue.hpp"
|
||||
#include "gc/g1/g1SATBMarkQueueSet.hpp"
|
||||
#include "gc/g1/g1SharedDirtyCardQueue.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
|
||||
@ -42,6 +43,7 @@ class G1BarrierSet: public CardTableBarrierSet {
|
||||
BufferNode::Allocator _dirty_card_queue_buffer_allocator;
|
||||
G1SATBMarkQueueSet _satb_mark_queue_set;
|
||||
G1DirtyCardQueueSet _dirty_card_queue_set;
|
||||
G1SharedDirtyCardQueue _shared_dirty_card_queue;
|
||||
|
||||
static G1BarrierSet* g1_barrier_set() {
|
||||
return barrier_set_cast<G1BarrierSet>(BarrierSet::barrier_set());
|
||||
@ -91,6 +93,10 @@ class G1BarrierSet: public CardTableBarrierSet {
|
||||
return g1_barrier_set()->_dirty_card_queue_set;
|
||||
}
|
||||
|
||||
static G1SharedDirtyCardQueue& shared_dirty_card_queue() {
|
||||
return g1_barrier_set()->_shared_dirty_card_queue;
|
||||
}
|
||||
|
||||
// Callbacks for runtime accesses.
|
||||
template <DecoratorSet decorators, typename BarrierSetT = G1BarrierSet>
|
||||
class AccessBarrier: public ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT> {
|
||||
|
||||
@ -1575,7 +1575,10 @@ static size_t actual_reserved_page_size(ReservedSpace rs) {
|
||||
// And ReservedSpace calls it 'special'. If we failed to set 'special',
|
||||
// we reserved memory without large page.
|
||||
if (os::can_commit_large_page_memory() || rs.special()) {
|
||||
page_size = rs.alignment();
|
||||
// An alignment at ReservedSpace comes from preferred page size or
|
||||
// heap alignment, and if the alignment came from heap alignment, it could be
|
||||
// larger than large pages size. So need to cap with the large page size.
|
||||
page_size = MIN2(rs.alignment(), os::large_page_size());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1682,12 +1685,10 @@ jint G1CollectedHeap::initialize() {
|
||||
// later, based on the concurrent refinement object.
|
||||
G1BarrierSet::dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon,
|
||||
&bs->dirty_card_queue_buffer_allocator(),
|
||||
Shared_DirtyCardQ_lock,
|
||||
true); // init_free_ids
|
||||
|
||||
dirty_card_queue_set().initialize(DirtyCardQ_CBL_mon,
|
||||
&bs->dirty_card_queue_buffer_allocator(),
|
||||
Shared_DirtyCardQ_lock);
|
||||
&bs->dirty_card_queue_buffer_allocator());
|
||||
|
||||
// Create the hot card cache.
|
||||
_hot_card_cache = new G1HotCardCache(this);
|
||||
@ -2537,7 +2538,7 @@ void G1CollectedHeap::gc_prologue(bool full) {
|
||||
|
||||
// Update common counters.
|
||||
increment_total_collections(full /* full gc */);
|
||||
if (full) {
|
||||
if (full || collector_state()->in_initial_mark_gc()) {
|
||||
increment_old_marking_cycles_started();
|
||||
}
|
||||
|
||||
@ -2863,16 +2864,92 @@ public:
|
||||
};
|
||||
|
||||
void G1CollectedHeap::start_new_collection_set() {
|
||||
double start = os::elapsedTime();
|
||||
|
||||
collection_set()->start_incremental_building();
|
||||
|
||||
clear_cset_fast_test();
|
||||
|
||||
guarantee(_eden.length() == 0, "eden should have been cleared");
|
||||
policy()->transfer_survivors_to_cset(survivor());
|
||||
|
||||
// We redo the verification but now wrt to the new CSet which
|
||||
// has just got initialized after the previous CSet was freed.
|
||||
_cm->verify_no_collection_set_oops();
|
||||
|
||||
phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
|
||||
}
|
||||
|
||||
bool
|
||||
G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
void G1CollectedHeap::calculate_collection_set(G1EvacuationInfo& evacuation_info, double target_pause_time_ms){
|
||||
policy()->finalize_collection_set(target_pause_time_ms, &_survivor);
|
||||
evacuation_info.set_collectionset_regions(collection_set()->region_length());
|
||||
|
||||
_cm->verify_no_collection_set_oops();
|
||||
|
||||
if (_hr_printer.is_active()) {
|
||||
G1PrintCollectionSetClosure cl(&_hr_printer);
|
||||
_collection_set.iterate(&cl);
|
||||
}
|
||||
}
|
||||
|
||||
G1HeapVerifier::G1VerifyType G1CollectedHeap::young_collection_verify_type() const {
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
return G1HeapVerifier::G1VerifyConcurrentStart;
|
||||
} else if (collector_state()->in_young_only_phase()) {
|
||||
return G1HeapVerifier::G1VerifyYoungNormal;
|
||||
} else {
|
||||
return G1HeapVerifier::G1VerifyMixed;
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::verify_before_young_collection(G1HeapVerifier::G1VerifyType type) {
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets before GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
_verifier->verify_before_gc(type);
|
||||
_verifier->check_bitmaps("GC Start");
|
||||
}
|
||||
|
||||
void G1CollectedHeap::verify_after_young_collection(G1HeapVerifier::G1VerifyType type) {
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets after GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
_verifier->verify_after_gc(type);
|
||||
_verifier->check_bitmaps("GC End");
|
||||
}
|
||||
|
||||
void G1CollectedHeap::expand_heap_after_young_collection(){
|
||||
size_t expand_bytes = _heap_sizing_policy->expansion_amount();
|
||||
if (expand_bytes > 0) {
|
||||
// No need for an ergo logging here,
|
||||
// expansion_amount() does this when it returns a value > 0.
|
||||
double expand_ms;
|
||||
if (!expand(expand_bytes, _workers, &expand_ms)) {
|
||||
// We failed to expand the heap. Cannot do anything about it.
|
||||
}
|
||||
phase_times()->record_expand_heap_time(expand_ms);
|
||||
}
|
||||
}
|
||||
|
||||
const char* G1CollectedHeap::young_gc_name() const {
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
return "Pause Young (Concurrent Start)";
|
||||
} else if (collector_state()->in_young_only_phase()) {
|
||||
if (collector_state()->in_young_gc_before_mixed()) {
|
||||
return "Pause Young (Prepare Mixed)";
|
||||
} else {
|
||||
return "Pause Young (Normal)";
|
||||
}
|
||||
} else {
|
||||
return "Pause Young (Mixed)";
|
||||
}
|
||||
}
|
||||
|
||||
bool G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
assert_at_safepoint_on_vm_thread();
|
||||
guarantee(!is_gc_active(), "collection is not reentrant");
|
||||
|
||||
@ -2880,16 +2957,16 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
return false;
|
||||
}
|
||||
|
||||
_gc_timer_stw->register_gc_start();
|
||||
|
||||
GCIdMark gc_id_mark;
|
||||
_gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start());
|
||||
|
||||
SvcGCMarker sgcm(SvcGCMarker::MINOR);
|
||||
ResourceMark rm;
|
||||
|
||||
policy()->note_gc_start();
|
||||
|
||||
_gc_timer_stw->register_gc_start();
|
||||
_gc_tracer_stw->report_gc_start(gc_cause(), _gc_timer_stw->gc_start());
|
||||
|
||||
wait_for_root_region_scanning();
|
||||
|
||||
print_heap_before_gc();
|
||||
@ -2909,8 +2986,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
|
||||
// We do not allow initial-mark to be piggy-backed on a mixed GC.
|
||||
assert(!collector_state()->in_initial_mark_gc() ||
|
||||
collector_state()->in_young_only_phase(), "sanity");
|
||||
|
||||
collector_state()->in_young_only_phase(), "sanity");
|
||||
// We also do not allow mixed GCs during marking.
|
||||
assert(!collector_state()->mark_or_rebuild_in_progress() || collector_state()->in_young_only_phase(), "sanity");
|
||||
|
||||
@ -2918,39 +2994,19 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
// thread has completed its logging output and it's safe to signal
|
||||
// the CM thread, the flag's value in the policy has been reset.
|
||||
bool should_start_conc_mark = collector_state()->in_initial_mark_gc();
|
||||
if (should_start_conc_mark) {
|
||||
_cm->gc_tracer_cm()->set_gc_cause(gc_cause());
|
||||
}
|
||||
|
||||
// Inner scope for scope based logging, timers, and stats collection
|
||||
{
|
||||
G1EvacuationInfo evacuation_info;
|
||||
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
// We are about to start a marking cycle, so we increment the
|
||||
// full collection counter.
|
||||
increment_old_marking_cycles_started();
|
||||
_cm->gc_tracer_cm()->set_gc_cause(gc_cause());
|
||||
}
|
||||
|
||||
_gc_tracer_stw->report_yc_type(collector_state()->yc_type());
|
||||
|
||||
GCTraceCPUTime tcpu;
|
||||
|
||||
G1HeapVerifier::G1VerifyType verify_type;
|
||||
FormatBuffer<> gc_string("Pause Young ");
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
gc_string.append("(Concurrent Start)");
|
||||
verify_type = G1HeapVerifier::G1VerifyConcurrentStart;
|
||||
} else if (collector_state()->in_young_only_phase()) {
|
||||
if (collector_state()->in_young_gc_before_mixed()) {
|
||||
gc_string.append("(Prepare Mixed)");
|
||||
} else {
|
||||
gc_string.append("(Normal)");
|
||||
}
|
||||
verify_type = G1HeapVerifier::G1VerifyYoungNormal;
|
||||
} else {
|
||||
gc_string.append("(Mixed)");
|
||||
verify_type = G1HeapVerifier::G1VerifyMixed;
|
||||
}
|
||||
GCTraceTime(Info, gc) tm(gc_string, NULL, gc_cause(), true);
|
||||
GCTraceTime(Info, gc) tm(young_gc_name(), NULL, gc_cause(), true);
|
||||
|
||||
uint active_workers = WorkerPolicy::calc_active_workers(workers()->total_workers(),
|
||||
workers()->active_workers(),
|
||||
@ -2965,88 +3021,43 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
G1HeapTransition heap_transition(this);
|
||||
size_t heap_used_bytes_before_gc = used();
|
||||
|
||||
// Don't dynamically change the number of GC threads this early. A value of
|
||||
// 0 is used to indicate serial work. When parallel work is done,
|
||||
// it will be set.
|
||||
|
||||
{ // Call to jvmpi::post_class_unload_events must occur outside of active GC
|
||||
{
|
||||
IsGCActiveMark x;
|
||||
|
||||
gc_prologue(false);
|
||||
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets before GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
|
||||
_verifier->verify_before_gc(verify_type);
|
||||
|
||||
_verifier->check_bitmaps("GC Start");
|
||||
|
||||
#if COMPILER2_OR_JVMCI
|
||||
DerivedPointerTable::clear();
|
||||
#endif
|
||||
|
||||
// Please see comment in g1CollectedHeap.hpp and
|
||||
// G1CollectedHeap::ref_processing_init() to see how
|
||||
// reference processing currently works in G1.
|
||||
|
||||
// Enable discovery in the STW reference processor
|
||||
_ref_processor_stw->enable_discovery();
|
||||
G1HeapVerifier::G1VerifyType verify_type = young_collection_verify_type();
|
||||
verify_before_young_collection(verify_type);
|
||||
|
||||
{
|
||||
// The elapsed time induced by the start time below deliberately elides
|
||||
// the possible verification above.
|
||||
double sample_start_time_sec = os::elapsedTime();
|
||||
|
||||
// Please see comment in g1CollectedHeap.hpp and
|
||||
// G1CollectedHeap::ref_processing_init() to see how
|
||||
// reference processing currently works in G1.
|
||||
_ref_processor_stw->enable_discovery();
|
||||
|
||||
// We want to temporarily turn off discovery by the
|
||||
// CM ref processor, if necessary, and turn it back on
|
||||
// on again later if we do. Using a scoped
|
||||
// NoRefDiscovery object will do this.
|
||||
NoRefDiscovery no_cm_discovery(_ref_processor_cm);
|
||||
|
||||
// Forget the current alloc region (we might even choose it to be part
|
||||
policy()->record_collection_pause_start(sample_start_time_sec);
|
||||
|
||||
// Forget the current allocation region (we might even choose it to be part
|
||||
// of the collection set!).
|
||||
_allocator->release_mutator_alloc_region();
|
||||
|
||||
// This timing is only used by the ergonomics to handle our pause target.
|
||||
// It is unclear why this should not include the full pause. We will
|
||||
// investigate this in CR 7178365.
|
||||
//
|
||||
// Preserving the old comment here if that helps the investigation:
|
||||
//
|
||||
// The elapsed time induced by the start time below deliberately elides
|
||||
// the possible verification above.
|
||||
double sample_start_time_sec = os::elapsedTime();
|
||||
|
||||
policy()->record_collection_pause_start(sample_start_time_sec);
|
||||
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
concurrent_mark()->pre_initial_mark();
|
||||
}
|
||||
|
||||
policy()->finalize_collection_set(target_pause_time_ms, &_survivor);
|
||||
|
||||
evacuation_info.set_collectionset_regions(collection_set()->region_length());
|
||||
|
||||
register_humongous_regions_with_cset();
|
||||
|
||||
assert(_verifier->check_cset_fast_test(), "Inconsistency in the InCSetState table.");
|
||||
|
||||
// We call this after finalize_cset() to
|
||||
// ensure that the CSet has been finalized.
|
||||
_cm->verify_no_cset_oops();
|
||||
|
||||
if (_hr_printer.is_active()) {
|
||||
G1PrintCollectionSetClosure cl(&_hr_printer);
|
||||
_collection_set.iterate(&cl);
|
||||
}
|
||||
|
||||
// Initialize the GC alloc regions.
|
||||
_allocator->init_gc_alloc_regions(evacuation_info);
|
||||
calculate_collection_set(evacuation_info, target_pause_time_ms);
|
||||
|
||||
G1ParScanThreadStateSet per_thread_states(this,
|
||||
workers()->active_workers(),
|
||||
collection_set()->young_region_length(),
|
||||
collection_set()->optional_region_length());
|
||||
pre_evacuate_collection_set();
|
||||
pre_evacuate_collection_set(evacuation_info);
|
||||
|
||||
// Actually do the work...
|
||||
evacuate_collection_set(&per_thread_states);
|
||||
@ -3054,39 +3065,12 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
|
||||
post_evacuate_collection_set(evacuation_info, &per_thread_states);
|
||||
|
||||
const size_t* surviving_young_words = per_thread_states.surviving_young_words();
|
||||
free_collection_set(&_collection_set, evacuation_info, surviving_young_words);
|
||||
start_new_collection_set();
|
||||
|
||||
eagerly_reclaim_humongous_regions();
|
||||
|
||||
record_obj_copy_mem_stats();
|
||||
_survivor_evac_stats.adjust_desired_plab_sz();
|
||||
_old_evac_stats.adjust_desired_plab_sz();
|
||||
|
||||
double start = os::elapsedTime();
|
||||
start_new_collection_set();
|
||||
phase_times()->record_start_new_cset_time_ms((os::elapsedTime() - start) * 1000.0);
|
||||
|
||||
if (evacuation_failed()) {
|
||||
double recalculate_used_start = os::elapsedTime();
|
||||
set_used(recalculate_used());
|
||||
phase_times()->record_evac_fail_recalc_used_time((os::elapsedTime() - recalculate_used_start) * 1000.0);
|
||||
|
||||
if (_archive_allocator != NULL) {
|
||||
_archive_allocator->clear_used();
|
||||
}
|
||||
for (uint i = 0; i < ParallelGCThreads; i++) {
|
||||
if (_evacuation_failed_info_array[i].has_failed()) {
|
||||
_gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The "used" of the the collection set have already been subtracted
|
||||
// when they were freed. Add in the bytes evacuated.
|
||||
increase_used(policy()->bytes_copied_during_gc());
|
||||
}
|
||||
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
if (should_start_conc_mark) {
|
||||
// We have to do this before we notify the CM threads that
|
||||
// they can start working to make sure that all the
|
||||
// appropriate initialization is done on the CM object.
|
||||
@ -3100,50 +3084,16 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
|
||||
_allocator->init_mutator_alloc_region();
|
||||
|
||||
{
|
||||
size_t expand_bytes = _heap_sizing_policy->expansion_amount();
|
||||
if (expand_bytes > 0) {
|
||||
size_t bytes_before = capacity();
|
||||
// No need for an ergo logging here,
|
||||
// expansion_amount() does this when it returns a value > 0.
|
||||
double expand_ms;
|
||||
if (!expand(expand_bytes, _workers, &expand_ms)) {
|
||||
// We failed to expand the heap. Cannot do anything about it.
|
||||
}
|
||||
phase_times()->record_expand_heap_time(expand_ms);
|
||||
}
|
||||
}
|
||||
expand_heap_after_young_collection();
|
||||
|
||||
// We redo the verification but now wrt to the new CSet which
|
||||
// has just got initialized after the previous CSet was freed.
|
||||
_cm->verify_no_cset_oops();
|
||||
|
||||
// This timing is only used by the ergonomics to handle our pause target.
|
||||
// It is unclear why this should not include the full pause. We will
|
||||
// investigate this in CR 7178365.
|
||||
double sample_end_time_sec = os::elapsedTime();
|
||||
double pause_time_ms = (sample_end_time_sec - sample_start_time_sec) * MILLIUNITS;
|
||||
size_t total_cards_scanned = phase_times()->sum_thread_work_items(G1GCPhaseTimes::ScanRS, G1GCPhaseTimes::ScanRSScannedCards);
|
||||
policy()->record_collection_pause_end(pause_time_ms, total_cards_scanned, heap_used_bytes_before_gc);
|
||||
|
||||
evacuation_info.set_collectionset_used_before(collection_set()->bytes_used_before());
|
||||
evacuation_info.set_bytes_copied(policy()->bytes_copied_during_gc());
|
||||
|
||||
if (VerifyRememberedSets) {
|
||||
log_info(gc, verify)("[Verifying RemSets after GC]");
|
||||
VerifyRegionRemSetClosure v_cl;
|
||||
heap_region_iterate(&v_cl);
|
||||
}
|
||||
|
||||
_verifier->verify_after_gc(verify_type);
|
||||
_verifier->check_bitmaps("GC End");
|
||||
|
||||
assert(!_ref_processor_stw->discovery_enabled(), "Postcondition");
|
||||
_ref_processor_stw->verify_no_references_recorded();
|
||||
|
||||
// CM reference discovery will be re-enabled if necessary.
|
||||
}
|
||||
|
||||
verify_after_young_collection(verify_type);
|
||||
|
||||
#ifdef TRACESPINNING
|
||||
ParallelTaskTerminator::print_termination_counts();
|
||||
#endif
|
||||
@ -3159,11 +3109,6 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
policy()->print_phases();
|
||||
heap_transition.print();
|
||||
|
||||
// It is not yet to safe to tell the concurrent mark to
|
||||
// start as we have some optional output below. We don't want the
|
||||
// output from the concurrent mark thread interfering with this
|
||||
// logging output either.
|
||||
|
||||
_hrm->verify_optional();
|
||||
_verifier->verify_region_sets_optional();
|
||||
|
||||
@ -3190,13 +3135,11 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
// that came from the pause.
|
||||
|
||||
if (should_start_conc_mark) {
|
||||
// CAUTION: after the doConcurrentMark() call below,
|
||||
// the concurrent marking thread(s) could be running
|
||||
// concurrently with us. Make sure that anything after
|
||||
// this point does not assume that we are the only GC thread
|
||||
// running. Note: of course, the actual marking work will
|
||||
// not start until the safepoint itself is released in
|
||||
// SuspendibleThreadSet::desynchronize().
|
||||
// CAUTION: after the doConcurrentMark() call below, the concurrent marking
|
||||
// thread(s) could be running concurrently with us. Make sure that anything
|
||||
// after this point does not assume that we are the only GC thread running.
|
||||
// Note: of course, the actual marking work will not start until the safepoint
|
||||
// itself is released in SuspendibleThreadSet::desynchronize().
|
||||
do_concurrent_mark();
|
||||
}
|
||||
|
||||
@ -3677,6 +3620,7 @@ void G1CollectedHeap::process_discovered_references(G1ParScanThreadStateSet* per
|
||||
|
||||
make_pending_list_reachable();
|
||||
|
||||
assert(!rp->discovery_enabled(), "Postcondition");
|
||||
rp->verify_no_references_recorded();
|
||||
|
||||
double ref_proc_time = os::elapsedTime() - ref_proc_start;
|
||||
@ -3699,7 +3643,7 @@ void G1CollectedHeap::merge_per_thread_state_info(G1ParScanThreadStateSet* per_t
|
||||
phase_times()->record_merge_pss_time_ms((os::elapsedTime() - merge_pss_time_start) * 1000.0);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::pre_evacuate_collection_set() {
|
||||
void G1CollectedHeap::pre_evacuate_collection_set(G1EvacuationInfo& evacuation_info) {
|
||||
_expand_heap_after_alloc_failure = true;
|
||||
_evacuation_failed = false;
|
||||
|
||||
@ -3707,11 +3651,23 @@ void G1CollectedHeap::pre_evacuate_collection_set() {
|
||||
_hot_card_cache->reset_hot_cache_claimed_index();
|
||||
_hot_card_cache->set_use_cache(false);
|
||||
|
||||
// Initialize the GC alloc regions.
|
||||
_allocator->init_gc_alloc_regions(evacuation_info);
|
||||
|
||||
register_humongous_regions_with_cset();
|
||||
assert(_verifier->check_cset_fast_test(), "Inconsistency in the InCSetState table.");
|
||||
|
||||
rem_set()->prepare_for_oops_into_collection_set_do();
|
||||
_preserved_marks_set.assert_empty();
|
||||
|
||||
#if COMPILER2_OR_JVMCI
|
||||
DerivedPointerTable::clear();
|
||||
#endif
|
||||
|
||||
// InitialMark needs claim bits to keep track of the marked-through CLDs.
|
||||
if (collector_state()->in_initial_mark_gc()) {
|
||||
concurrent_mark()->pre_initial_mark();
|
||||
|
||||
double start_clear_claimed_marks = os::elapsedTime();
|
||||
|
||||
ClassLoaderDataGraph::clear_claimed_marks();
|
||||
@ -3918,19 +3874,34 @@ void G1CollectedHeap::post_evacuate_collection_set(G1EvacuationInfo& evacuation_
|
||||
phase_times()->record_string_deduplication_time(string_cleanup_time_ms);
|
||||
}
|
||||
|
||||
_allocator->release_gc_alloc_regions(evacuation_info);
|
||||
|
||||
if (evacuation_failed()) {
|
||||
restore_after_evac_failure();
|
||||
|
||||
// Reset the G1EvacuationFailureALot counters and flags
|
||||
// Note: the values are reset only when an actual
|
||||
// evacuation failure occurs.
|
||||
NOT_PRODUCT(reset_evacuation_should_fail();)
|
||||
|
||||
double recalculate_used_start = os::elapsedTime();
|
||||
set_used(recalculate_used());
|
||||
phase_times()->record_evac_fail_recalc_used_time((os::elapsedTime() - recalculate_used_start) * 1000.0);
|
||||
|
||||
if (_archive_allocator != NULL) {
|
||||
_archive_allocator->clear_used();
|
||||
}
|
||||
for (uint i = 0; i < ParallelGCThreads; i++) {
|
||||
if (_evacuation_failed_info_array[i].has_failed()) {
|
||||
_gc_tracer_stw->report_evacuation_failed(_evacuation_failed_info_array[i]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// The "used" of the the collection set have already been subtracted
|
||||
// when they were freed. Add in the bytes evacuated.
|
||||
increase_used(policy()->bytes_copied_during_gc());
|
||||
}
|
||||
|
||||
_preserved_marks_set.assert_empty();
|
||||
|
||||
_allocator->release_gc_alloc_regions(evacuation_info);
|
||||
|
||||
merge_per_thread_state_info(per_thread_states);
|
||||
|
||||
// Reset and re-enable the hot card cache.
|
||||
@ -3942,6 +3913,16 @@ void G1CollectedHeap::post_evacuate_collection_set(G1EvacuationInfo& evacuation_
|
||||
purge_code_root_memory();
|
||||
|
||||
redirty_logged_cards();
|
||||
|
||||
free_collection_set(&_collection_set, evacuation_info, per_thread_states->surviving_young_words());
|
||||
|
||||
eagerly_reclaim_humongous_regions();
|
||||
|
||||
record_obj_copy_mem_stats();
|
||||
|
||||
evacuation_info.set_collectionset_used_before(collection_set()->bytes_used_before());
|
||||
evacuation_info.set_bytes_copied(policy()->bytes_copied_during_gc());
|
||||
|
||||
#if COMPILER2_OR_JVMCI
|
||||
double start = os::elapsedTime();
|
||||
DerivedPointerTable::update_pointers();
|
||||
|
||||
@ -357,6 +357,8 @@ private:
|
||||
assert(Thread::current()->is_VM_thread(), "current thread is not VM thread"); \
|
||||
} while (0)
|
||||
|
||||
const char* young_gc_name() const;
|
||||
|
||||
// The young region list.
|
||||
G1EdenRegions _eden;
|
||||
G1SurvivorRegions _survivor;
|
||||
@ -730,14 +732,21 @@ private:
|
||||
// to the GC locker being active, true otherwise
|
||||
bool do_collection_pause_at_safepoint(double target_pause_time_ms);
|
||||
|
||||
G1HeapVerifier::G1VerifyType young_collection_verify_type() const;
|
||||
void verify_before_young_collection(G1HeapVerifier::G1VerifyType type);
|
||||
void verify_after_young_collection(G1HeapVerifier::G1VerifyType type);
|
||||
|
||||
void calculate_collection_set(G1EvacuationInfo& evacuation_info, double target_pause_time_ms);
|
||||
|
||||
// Actually do the work of evacuating the collection set.
|
||||
void evacuate_collection_set(G1ParScanThreadStateSet* per_thread_states);
|
||||
void evacuate_optional_collection_set(G1ParScanThreadStateSet* per_thread_states);
|
||||
void evacuate_optional_regions(G1ParScanThreadStateSet* per_thread_states, G1OptionalCSet* ocset);
|
||||
|
||||
void pre_evacuate_collection_set();
|
||||
void pre_evacuate_collection_set(G1EvacuationInfo& evacuation_info);
|
||||
void post_evacuate_collection_set(G1EvacuationInfo& evacuation_info, G1ParScanThreadStateSet* pss);
|
||||
|
||||
void expand_heap_after_young_collection();
|
||||
// Update object copying statistics.
|
||||
void record_obj_copy_mem_stats();
|
||||
|
||||
@ -1313,6 +1322,12 @@ public:
|
||||
// Unregister the given nmethod from the G1 heap.
|
||||
virtual void unregister_nmethod(nmethod* nm);
|
||||
|
||||
// No nmethod flushing needed.
|
||||
virtual void flush_nmethod(nmethod* nm) {}
|
||||
|
||||
// No nmethod verification implemented.
|
||||
virtual void verify_nmethod(nmethod* nm) {}
|
||||
|
||||
// Free up superfluous code root memory.
|
||||
void purge_code_root_memory();
|
||||
|
||||
|
||||
@ -734,7 +734,9 @@ public:
|
||||
};
|
||||
|
||||
void G1ConcurrentMark::pre_initial_mark() {
|
||||
// Initialize marking structures. This has to be done in a STW phase.
|
||||
assert_at_safepoint_on_vm_thread();
|
||||
|
||||
// Reset marking state.
|
||||
reset();
|
||||
|
||||
// For each region note start of marking.
|
||||
@ -1944,7 +1946,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void G1ConcurrentMark::verify_no_cset_oops() {
|
||||
void G1ConcurrentMark::verify_no_collection_set_oops() {
|
||||
assert(SafepointSynchronize::is_at_safepoint(), "should be at a safepoint");
|
||||
if (!_g1h->collector_state()->mark_or_rebuild_in_progress()) {
|
||||
return;
|
||||
|
||||
@ -579,7 +579,7 @@ public:
|
||||
// Verify that there are no collection set oops on the stacks (taskqueues /
|
||||
// global mark stack) and fingers (global / per-task).
|
||||
// If marking is not in progress, it's a no-op.
|
||||
void verify_no_cset_oops() PRODUCT_RETURN;
|
||||
void verify_no_collection_set_oops() PRODUCT_RETURN;
|
||||
|
||||
inline bool do_yield_check();
|
||||
|
||||
|
||||
@ -56,21 +56,18 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
G1DirtyCardQueue::G1DirtyCardQueue(G1DirtyCardQueueSet* qset, bool permanent) :
|
||||
G1DirtyCardQueue::G1DirtyCardQueue(G1DirtyCardQueueSet* qset) :
|
||||
// Dirty card queues are always active, so we create them with their
|
||||
// active field set to true.
|
||||
PtrQueue(qset, permanent, true /* active */)
|
||||
PtrQueue(qset, true /* active */)
|
||||
{ }
|
||||
|
||||
G1DirtyCardQueue::~G1DirtyCardQueue() {
|
||||
if (!is_permanent()) {
|
||||
flush();
|
||||
}
|
||||
flush();
|
||||
}
|
||||
|
||||
G1DirtyCardQueueSet::G1DirtyCardQueueSet(bool notify_when_complete) :
|
||||
PtrQueueSet(notify_when_complete),
|
||||
_shared_dirty_card_queue(this, true /* permanent */),
|
||||
_free_ids(NULL),
|
||||
_processed_buffers_mut(0),
|
||||
_processed_buffers_rs_thread(0),
|
||||
@ -90,10 +87,8 @@ uint G1DirtyCardQueueSet::num_par_ids() {
|
||||
|
||||
void G1DirtyCardQueueSet::initialize(Monitor* cbl_mon,
|
||||
BufferNode::Allocator* allocator,
|
||||
Mutex* lock,
|
||||
bool init_free_ids) {
|
||||
PtrQueueSet::initialize(cbl_mon, allocator);
|
||||
_shared_dirty_card_queue.set_lock(lock);
|
||||
if (init_free_ids) {
|
||||
_free_ids = new G1FreeIdSet(0, num_par_ids());
|
||||
}
|
||||
@ -217,13 +212,7 @@ void G1DirtyCardQueueSet::abandon_logs() {
|
||||
} closure;
|
||||
Threads::threads_do(&closure);
|
||||
|
||||
shared_dirty_card_queue()->reset();
|
||||
}
|
||||
|
||||
void G1DirtyCardQueueSet::concatenate_log(G1DirtyCardQueue& dcq) {
|
||||
if (!dcq.is_empty()) {
|
||||
dcq.flush();
|
||||
}
|
||||
G1BarrierSet::shared_dirty_card_queue().reset();
|
||||
}
|
||||
|
||||
void G1DirtyCardQueueSet::concatenate_logs() {
|
||||
@ -234,16 +223,16 @@ void G1DirtyCardQueueSet::concatenate_logs() {
|
||||
size_t old_limit = max_completed_buffers();
|
||||
set_max_completed_buffers(MaxCompletedBuffersUnlimited);
|
||||
|
||||
class ConcatenateThreadLogClosure : public ThreadClosure {
|
||||
G1DirtyCardQueueSet* _qset;
|
||||
public:
|
||||
ConcatenateThreadLogClosure(G1DirtyCardQueueSet* qset) : _qset(qset) {}
|
||||
struct ConcatenateThreadLogClosure : public ThreadClosure {
|
||||
virtual void do_thread(Thread* t) {
|
||||
_qset->concatenate_log(G1ThreadLocalData::dirty_card_queue(t));
|
||||
G1DirtyCardQueue& dcq = G1ThreadLocalData::dirty_card_queue(t);
|
||||
if (!dcq.is_empty()) {
|
||||
dcq.flush();
|
||||
}
|
||||
}
|
||||
} closure(this);
|
||||
} closure;
|
||||
Threads::threads_do(&closure);
|
||||
|
||||
concatenate_log(_shared_dirty_card_queue);
|
||||
G1BarrierSet::shared_dirty_card_queue().flush();
|
||||
set_max_completed_buffers(old_limit);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public:
|
||||
// A ptrQueue whose elements are "oops", pointers to object heads.
|
||||
class G1DirtyCardQueue: public PtrQueue {
|
||||
public:
|
||||
G1DirtyCardQueue(G1DirtyCardQueueSet* qset, bool permanent = false);
|
||||
G1DirtyCardQueue(G1DirtyCardQueueSet* qset);
|
||||
|
||||
// Flush before destroying; queue may be used to capture pending work while
|
||||
// doing something else, with auto-flush on completion.
|
||||
@ -70,11 +70,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class G1DirtyCardQueueSet: public PtrQueueSet {
|
||||
G1DirtyCardQueue _shared_dirty_card_queue;
|
||||
|
||||
// Apply the closure to the elements of "node" from it's index to
|
||||
// buffer_size. If all closure applications return true, then
|
||||
// returns true. Stops processing after the first closure
|
||||
@ -116,15 +112,12 @@ class G1DirtyCardQueueSet: public PtrQueueSet {
|
||||
// Current buffer node used for parallel iteration.
|
||||
BufferNode* volatile _cur_par_buffer_node;
|
||||
|
||||
void concatenate_log(G1DirtyCardQueue& dcq);
|
||||
|
||||
public:
|
||||
G1DirtyCardQueueSet(bool notify_when_complete = true);
|
||||
~G1DirtyCardQueueSet();
|
||||
|
||||
void initialize(Monitor* cbl_mon,
|
||||
BufferNode::Allocator* allocator,
|
||||
Mutex* lock,
|
||||
bool init_free_ids = false);
|
||||
|
||||
// The number of parallel ids that can be claimed to allow collector or
|
||||
@ -147,10 +140,6 @@ public:
|
||||
// by reset_for_par_iteration.
|
||||
void par_apply_closure_to_all_completed_buffers(G1CardTableEntryClosure* cl);
|
||||
|
||||
G1DirtyCardQueue* shared_dirty_card_queue() {
|
||||
return &_shared_dirty_card_queue;
|
||||
}
|
||||
|
||||
// If a full collection is happening, reset partial logs, and ignore
|
||||
// completed ones: the full collection will make them all irrelevant.
|
||||
void abandon_logs();
|
||||
|
||||
@ -1188,9 +1188,11 @@ uint G1Policy::calc_max_old_cset_length() const {
|
||||
return (uint) result;
|
||||
}
|
||||
|
||||
void G1Policy::finalize_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor) {
|
||||
uint G1Policy::finalize_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor) {
|
||||
double time_remaining_ms = _collection_set->finalize_young_part(target_pause_time_ms, survivor);
|
||||
_collection_set->finalize_old_part(time_remaining_ms);
|
||||
|
||||
return _collection_set->region_length();
|
||||
}
|
||||
|
||||
void G1Policy::transfer_survivors_to_cset(const G1SurvivorRegions* survivors) {
|
||||
|
||||
@ -344,7 +344,7 @@ public:
|
||||
bool next_gc_should_be_mixed(const char* true_action_str,
|
||||
const char* false_action_str) const;
|
||||
|
||||
void finalize_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor);
|
||||
uint finalize_collection_set(double target_pause_time_ms, G1SurvivorRegions* survivor);
|
||||
private:
|
||||
// Set the state to start a concurrent marking cycle and clear
|
||||
// _initiate_conc_mark_if_possible because it has now been
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user