--- a/.hgtags Mon Nov 12 10:55:49 2018 +0530
+++ b/.hgtags Mon Nov 12 11:10:16 2018 +0530
@@ -520,3 +520,5 @@
f8626bcc169813a4b2a15880386b952719d1d6d1 jdk-12+15
199658d1ef860cdc17055b4fd3e94b057f292fe9 jdk-12+16
eefa65e142af305923d2adcd596fab9c639723a1 jdk-12+17
+e38473506688e0995e701fc7f77d5a91b438ef93 jdk-12+18
+dc1f9dec2018a37fedba47d8a2aedef99faaec64 jdk-12+19
--- a/doc/testing.html Mon Nov 12 10:55:49 2018 +0530
+++ b/doc/testing.html Mon Nov 12 11:10:16 2018 +0530
@@ -62,9 +62,8 @@
<p>If you want, you can single out an individual test or a group of tests, for instance <code>gtest:LogDecorations</code> or <code>gtest:LogDecorations.level_test_vm</code>. This can be particularly useful if you want to run a shaky test repeatedly.</p>
<p>For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding <code>/<variant></code> to the test descriptor, e.g. <code>gtest:Log/client</code>. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then <code>gtest:all</code> will be equivalent to <code>gtest:all/server</code>.</p>
<h3 id="special-tests">Special tests</h3>
-<p>A handful of odd tests that are not covered by any other testing framework are accessible using the <code>special:</code> test descriptor. Currently, this includes <code>hotspot-internal</code>, <code>failure-handler</code> and <code>make</code>.</p>
+<p>A handful of odd tests that are not covered by any other testing framework are accessible using the <code>special:</code> test descriptor. Currently, this includes <code>failure-handler</code> and <code>make</code>.</p>
<ul>
-<li><p>Hotspot legacy internal testing (run using <code>-XX:+ExecuteInternalVMTests</code>) is run using <code>special:hotspot-internal</code> or just <code>hotspot-internal</code> as test descriptor, and will only work on a debug JVM.</p></li>
<li><p>Failure handler testing is run using <code>special:failure-handler</code> or just <code>failure-handler</code> as test descriptor.</p></li>
<li><p>Tests for the build system, including both makefiles and related functionality, is run using <code>special:make</code> or just <code>make</code> as test descriptor. This is equivalent to <code>special:make:all</code>.</p>
<p>A specific make test can be run by supplying it as argument, e.g. <code>special:make:idea</code>. As a special syntax, this can also be expressed as <code>make-idea</code>, which allows for command lines as <code>make test-make-idea</code>.</p></li>
--- a/doc/testing.md Mon Nov 12 10:55:49 2018 +0530
+++ b/doc/testing.md Mon Nov 12 11:10:16 2018 +0530
@@ -108,11 +108,7 @@
A handful of odd tests that are not covered by any other testing framework are
accessible using the `special:` test descriptor. Currently, this includes
-`hotspot-internal`, `failure-handler` and `make`.
-
- * Hotspot legacy internal testing (run using `-XX:+ExecuteInternalVMTests`)
- is run using `special:hotspot-internal` or just `hotspot-internal` as test
- descriptor, and will only work on a debug JVM.
+`failure-handler` and `make`.
* Failure handler testing is run using `special:failure-handler` or just
`failure-handler` as test descriptor.
--- a/make/Main.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/Main.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -485,7 +485,10 @@
# ALL_NAMED_TESTS is defined in FindTests.gmk
$(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
-ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_NAMED_TESTS))
+
+# We only support the "exploded-test-gtest" shortcut
+ALL_EXPLODED_TESTS := gtest
+ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
@@ -687,16 +690,17 @@
# copied and processed.
java.desktop-gensrc-src: java.base-gensrc java.base-copy
- # The annotation processing for jdk.internal.vm.ci and jdk.internal.vm.compiler
- # needs classes from the current JDK.
- jdk.internal.vm.ci-gensrc-src: $(addsuffix -java, \
- $(call FindTransitiveDepsForModule, jdk.internal.vm.ci))
+ # The annotation processing for jdk.internal.vm.compiler
+ # and jdk.internal.vm.compiler.management needs classes from the current JDK.
jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
+ jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
+ $(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))
- # For jdk.internal.vm.compiler, the gensrc step is generating a module-info.java.extra
+ # For these modules, the gensrc step is generating a module-info.java.extra
# file to be processed by the gensrc-moduleinfo target.
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
+ jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src
jdk.jdeps-gendata: java rmic
@@ -852,7 +856,7 @@
# Declare dependency for all generated test targets
$(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
- $(foreach t, $(filter-out exploded-test-make%, $(ALL_EXPLODED_TEST_TARGETS)), $(eval $t: exploded-image test-image))
+ $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
create-buildjdk-copy: jdk.jlink-java java.base-gendata \
$(addsuffix -java, $(INTERIM_IMAGE_MODULES))
@@ -1054,9 +1058,7 @@
# Let "run-test" be an alias for "test"
$(foreach t, $(ALL_NAMED_TESTS), $(eval run-test-$t: test-$t))
-$(foreach t, $(ALL_NAMED_TESTS), $(eval exploded-run-test-$t: exploded-test-$t))
-RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS)) \
- $(addprefix exploded-run-test-, $(ALL_NAMED_TESTS))
+RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))
run-test: test
exploded-run-test: exploded-test
--- a/make/RunTests.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/RunTests.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -45,7 +45,7 @@
endif
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
- SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR, \
+ SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR AOT_MODULES, \
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
))
@@ -108,6 +108,90 @@
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTEST_LAUNCHER_DIRS)))
################################################################################
+# Optionally create AOT libraries for specified modules before running tests.
+# Note, this could not be done during JDK build time.
+################################################################################
+
+# Note, this could not be done during JDK build time.
+
+# Parameter 1 is the name of the rule.
+#
+# Remaining parameters are named arguments.
+# MODULE The module to generate a library for
+# BIN Output directory in which to put the library
+# VM_OPTIONS List of JVM arguments to use when creating library
+# OPTIONS_VAR Name of variable to put AOT java options in
+# PREREQS_VAR Name of variable to put all AOT prerequisite rule targets in
+# for test rules to depend on
+#
+SetupAotModule = $(NamedParamsMacroTemplate)
+define SetupAotModuleBody
+ $1_AOT_LIB := $$($1_BIN)/$$(call SHARED_LIBRARY,$$($1_MODULE))
+ $1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt)
+
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $1_LD := $$(addsuffix $$(EXE_SUFFIX), $$(filter-out $$(FIXPATH), $$(LD)))
+ else
+ $1_LD := $$(LD)
+ endif
+
+ $1_JAOTC_OPTS := \
+ -J-Xmx4g --info \
+ $$(addprefix -J, $$($1_VM_OPTIONS)) \
+ $$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \
+ --linker-path $$($1_LD) \
+ #
+
+ ifneq ($$(filter -ea, $$($1_VM_OPTIONS)), )
+ $1_JAOTC_OPTS += --compile-with-assertions
+ endif
+
+ $$($1_AOT_LIB): $$(JDK_IMAGE_DIR)/release \
+ $$(call DependOnVariable, $1_JAOTC_OPTS) \
+ $$(call DependOnVariable, JDK_IMAGE_DIR)
+ $$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
+ $$(call MakeTargetDir)
+ $$(call ExecuteWithLog, $$@, \
+ $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/jaotc \
+ $$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
+ )
+ $$(call ExecuteWithLog, $$@.check, \
+ $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java \
+ $$($1_VM_OPTIONS) -XX:+PrintAOT -XX:+UseAOTStrictLoading -XX:AOTLibrary=$$@ -version \
+ > $$@.verify-aot \
+ )
+
+ $1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB)
+ $1_AOT_TARGETS += $$($1_AOT_LIB)
+endef
+
+# Parameter 1 is the name of the rule.
+#
+# Remaining parameters are named arguments.
+# MODULES The modules to generate a library for
+# VM_OPTIONS List of JVM arguments to use when creating libraries
+#
+# After calling this, the following variables are defined
+# $1_AOT_OPTIONS List of all java options needed to use the AOT libraries
+# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
+#
+SetupAot = $(NamedParamsMacroTemplate)
+define SetupAotBody
+ $$(info Running with AOTd libraries for $$($1_MODULES))
+ # Put aot libraries in a separate directory so they are not deleted between
+ # test runs and may be reused between make invocations.
+ $$(foreach m, $$($1_MODULES), \
+ $$(eval $$(call SetupAotModule, $1_$$m, \
+ MODULE := $$m, \
+ BIN := $$(TEST_SUPPORT_DIR)/aot/$1, \
+ VM_OPTIONS := $$($1_VM_OPTIONS), \
+ )) \
+ $$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
+ $$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
+ )
+endef
+
+################################################################################
# Setup global test running parameters
################################################################################
@@ -146,12 +230,15 @@
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST))
+$(eval $(call SetTestOpt,AOT_MODULES,JTREG))
+$(eval $(call SetTestOpt,AOT_MODULES,GTEST))
+
$(eval $(call SetTestOpt,JOBS,JTREG))
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM \
- EXTRA_PROBLEM_LISTS KEYWORDS, \
+ EXTRA_PROBLEM_LISTS KEYWORDS AOT_MODULES, \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \
))
@@ -161,7 +248,7 @@
endif
$(eval $(call ParseKeywordVariable, GTEST, \
- SINGLE_KEYWORDS := REPEAT, \
+ SINGLE_KEYWORDS := REPEAT AOT_MODULES, \
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS, \
))
@@ -318,7 +405,7 @@
special:make:all \
)
) \
- $(if $(filter hotspot-internal failure-handler, $1), \
+ $(if $(filter failure-handler, $1), \
special:$(strip $1) \
)
endef
@@ -407,7 +494,14 @@
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
endif
- run-test-$1: $(TEST_PREREQS)
+ ifneq ($$(GTEST_AOT_MODULES), )
+ $$(eval $$(call SetupAot, $1, \
+ MODULES := $$(GTEST_AOT_MODULES), \
+ VM_OPTIONS := $$(GTEST_VM_OPTIONS) $$(GTEST_JAVA_OPTIONS), \
+ ))
+ endif
+
+ run-test-$1: $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -416,7 +510,7 @@
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
- $$($1_GTEST_JAVA_OPTIONS) \
+ $$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
@@ -600,10 +694,21 @@
endif
endif
+ ifneq ($$(JTREG_AOT_MODULES), )
+ $$(eval $$(call SetupAot, $1, \
+ MODULES := $$(JTREG_AOT_MODULES), \
+ VM_OPTIONS := $$(JTREG_VM_OPTIONS) $$(JTREG_JAVA_OPTIONS), \
+ ))
+ endif
+
+ ifneq ($$($1_AOT_OPTIONS), )
+ $1_JTREG_BASIC_OPTIONS += -vmoptions:"$$($1_AOT_OPTIONS)"
+ endif
+
clean-workdir-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
- run-test-$1: clean-workdir-$1 $(TEST_PREREQS)
+ run-test-$1: clean-workdir-$1 $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -674,11 +779,7 @@
$1_TEST_ARGS :=
endif
- ifeq ($$($1_TEST_NAME), hotspot-internal)
- $1_TEST_COMMAND_LINE := \
- $$(JDK_IMAGE_DIR)/bin/java -XX:+ExecuteInternalVMTests \
- -XX:+ShowMessageBoxOnError -version
- else ifeq ($$($1_TEST_NAME), failure-handler)
+ ifeq ($$($1_TEST_NAME), failure-handler)
ifeq ($(BUILD_FAILURE_HANDLER), true)
$1_TEST_COMMAND_LINE := \
($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f \
--- a/make/RunTestsPrebuilt.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/RunTestsPrebuilt.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2018, 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
@@ -95,12 +95,12 @@
# $1: The output file name
# $2..$N: The lines to output to the file
define CreateNewSpec
- $(if $(strip $(26)), \
+ $(if $(strip $(30)), \
$(error Internal makefile error: \
Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
) \
$(shell $(RM) $1) \
- $(foreach i, $(call sequence, 2, 25), \
+ $(foreach i, $(call sequence, 2, 29), \
$(if $(strip $($i)), \
$(call AppendFile, $(strip $($i)), $1) \
) \
@@ -235,6 +235,34 @@
NUM_CORES := 1
endif
+# Setup LD for AOT support
+ifneq ($(DEVKIT_HOME), )
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ LD := $(DEVKIT_HOME)/VC/bin/x64/link
+ LIBRARY_PREFIX :=
+ SHARED_LIBRARY_SUFFIX := .dll
+ EXE_SUFFIX := .exe
+ else ifeq ($(OPENJDK_TARGET_OS), linux)
+ LD := $(DEVKIT_HOME)/bin/ld
+ LIBRARY_PREFIX := lib
+ SHARED_LIBRARY_SUFFIX := .so
+ EXE_SUFFIX :=
+ else ifeq ($(OPENJDK_TARGET_OS), macosx)
+ LD := $(DEVKIT_HOME)/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
+ LIBRARY_PREFIX := lib
+ SHARED_LIBRARY_SUFFIX := .dylib
+ EXE_SUFFIX :=
+ else ifeq ($(OPENJDK_TARGET_OS), solaris)
+ # Prefer system linker for AOT on Solaris.
+ LD := ld
+ LIBRARY_PREFIX := lib
+ SHARED_LIBRARY_SUFFIX := .so
+ EXE_SUFFIX :=
+ endif
+else
+ LD := ld
+endif
+
################################################################################
# Generate the ephemeral spec file
################################################################################
@@ -270,6 +298,10 @@
OPENJDK_TARGET_CPU_BITS := $(OPENJDK_TARGET_CPU_BITS), \
OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN), \
NUM_CORES := $(NUM_CORES), \
+ LD := $(LD), \
+ LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
+ SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
+ EXE_SUFFIX := $(EXE_SUFFIX), \
include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
$(CUSTOM_NEW_SPEC_LINE), \
)
--- a/make/RunTestsPrebuiltSpec.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/RunTestsPrebuiltSpec.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -186,3 +186,7 @@
ifeq ($(OPENJDK_BUILD_OS), windows)
CYGPATH := cygpath
endif
+
+################################################################################
+# Simple macros from spec.gmk.in
+SHARED_LIBRARY=$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX)
--- a/make/autoconf/lib-freetype.m4 Mon Nov 12 10:55:49 2018 +0530
+++ b/make/autoconf/lib-freetype.m4 Mon Nov 12 11:10:16 2018 +0530
@@ -186,6 +186,9 @@
FREETYPE_BASE_DIR="$SYSROOT/usr"
if (test "x$OPENJDK_TARGET_CPU_BITS" = "x64"); then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu], [well-known location])
+ if (test "x$FOUND_FREETYPE" != "xyes"); then
+ LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib64], [well-known location])
+ fi
else
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
if (test "x$FOUND_FREETYPE" != "xyes"); then
--- a/make/common/FindTests.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/common/FindTests.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -79,7 +79,7 @@
ALL_NAMED_TESTS += $(addprefix make-, $(MAKE_TEST_TARGETS))
# Add special tests
-ALL_NAMED_TESTS += hotspot-internal failure-handler make
+ALL_NAMED_TESTS += failure-handler make
################################################################################
--- a/make/conf/jib-profiles.js Mon Nov 12 10:55:49 2018 +0530
+++ b/make/conf/jib-profiles.js Mon Nov 12 11:10:16 2018 +0530
@@ -201,10 +201,15 @@
data.configuration_make_arg = "CONF_NAME=";
// Exclude list to use when Jib creates a source bundle
- data.src_bundle_excludes = "./build .build webrev* */webrev* */*/webrev* */*/*/webrev* .hg */.hg */*/.hg */*/*/.hg";
+ data.src_bundle_excludes = [
+ "build", "{,**/}webrev*", "{,**/}.hg", "{,**/}JTwork", "{,**/}JTreport",
+ "{,**/}.git"
+ ];
// Include list to use when creating a minimal jib source bundle which
// contains just the jib configuration files.
- data.conf_bundle_includes = "*/conf/jib-profiles.* make/autoconf/version-numbers"
+ data.conf_bundle_includes = [
+ "make/autoconf/version-numbers",
+ ];
// Define some common values
var common = getJibProfilesCommon(input, data);
@@ -485,7 +490,7 @@
.forEach(function (name) {
var maketestName = name + "-testmake";
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
- profiles[maketestName].default_make_targets = [ "test-make", "test-compile-commands" ];
+ profiles[maketestName].default_make_targets = [ "test-make" ];
});
// Profiles for building the zero jvm variant. These are used for verification.
@@ -522,6 +527,27 @@
profiles[debugName] = concatObjects(profiles[name], common.debug_profile_base);
});
+ // Define a profile with precompiled headers disabled. This is just used for
+ // verfication of this build configuration.
+ var noPchProfiles = {
+ "linux-x64-debug-nopch": {
+ target_os: "linux",
+ target_cpu: "x64",
+ dependencies: ["devkit"],
+ configure_args: concat(common.configure_args_64bit,
+ "--with-zlib=system", "--disable-precompiled-headers"),
+ },
+ };
+ profiles = concatObjects(profiles, noPchProfiles);
+ // Add base settings to noPch profiles
+ Object.keys(noPchProfiles).forEach(function (name) {
+ profiles[name] = concatObjects(common.main_profile_base, profiles[name]);
+ profiles[name] = concatObjects(common.debug_profile_base, profiles[name]);
+ // Override default make target with hotspot as that's the only part of
+ // the build using precompiled headers.
+ profiles[name].default_make_targets = ["hotspot"];
+ });
+
// Bootcycle profiles runs the build with itself as the boot jdk. This can
// be done in two ways. Either using the builtin bootcycle target in the
// build system. Or by supplying the main jdk build as bootjdk to configure.
@@ -709,7 +735,8 @@
"run-test-prebuilt": {
target_os: input.build_os,
target_cpu: input.build_cpu,
- dependencies: [ "jtreg", "gnumake", "boot_jdk", "jib", testedProfile + ".jdk",
+ dependencies: [
+ "jtreg", "gnumake", "boot_jdk", "devkit", "jib", testedProfile + ".jdk",
testedProfile + ".test"
],
src: "src.conf",
@@ -743,7 +770,6 @@
// This gives us a guaranteed working version of lldb for the jtreg failure handler.
if (input.build_os == "macosx") {
macosxRunTestExtra = {
- dependencies: [ "devkit" ],
environment_path: input.get("devkit", "install_path")
+ "/Xcode.app/Contents/Developer/usr/bin"
};
@@ -836,7 +862,10 @@
organization: common.organization,
ext: "tar.gz",
module: "devkit-" + devkit_platform,
- revision: devkit_platform_revisions[devkit_platform]
+ revision: devkit_platform_revisions[devkit_platform],
+ environment: {
+ "DEVKIT_HOME": input.get("devkit", "home_path"),
+ }
},
build_devkit: {
@@ -937,14 +966,6 @@
},
};
- // Need to add a value for the Visual Studio tools variable to make
- // jaot be able to pick up the Visual Studio linker in testing.
- if (input.target_os == "windows") {
- dependencies.devkit.environment = {
- VS120COMNTOOLS: input.get("devkit", "install_path") + "/Common7/Tools"
- };
- }
-
return dependencies;
};
--- a/make/data/docs-resources/resources/jdk-default.css Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/docs-resources/resources/jdk-default.css Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -127,3 +127,14 @@
th {
background: #DDF;
}
+
+table.centered {
+ margin-left: auto;
+ margin-right: auto;
+}
+table.centered td {
+ text-align: left;
+}
+.centered {
+ text-align: center;
+}
--- a/make/data/tzdata/VERSION Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/VERSION Mon Nov 12 11:10:16 2018 +0530
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2018e
+tzdata2018g
--- a/make/data/tzdata/africa Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/africa Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Africa and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -29,7 +31,7 @@
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
-# From Paul Eggert (2017-04-09):
+# From Paul Eggert (2018-05-27):
#
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -74,13 +76,15 @@
# I vaguely recall 'WAT' also being used for -01 in the past but
# cannot now come up with solid citations.
#
-# I invented the following abbreviations; corrections are welcome!
-# +02 WAST West Africa Summer Time (no longer used)
-# +03 CAST Central Africa Summer Time (no longer used)
-# +03 SAST South Africa Summer Time (no longer used)
+# I invented the following abbreviations in the 1990s:
+# +02 WAST West Africa Summer Time
+# +03 CAST Central Africa Summer Time
+# +03 SAST South Africa Summer Time
# +03 EAT East Africa Time
-# 'EAT' also seems to have caught on; the others are rare but are paired
-# with better-attested non-DST abbreviations.
+# 'EAT' seems to have caught on and is in current timestamps, and though
+# the other abbreviations are rarer and are only in past timestamps,
+# they are paired with better-attested non-DST abbreviations.
+# Corrections are welcome.
# Algeria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -385,6 +389,13 @@
# Eritrea
# Ethiopia
# See Africa/Nairobi.
+#
+# Unfortunately tzdb records only Western clock time in use in Ethiopia,
+# as the tzdb format is not up to properly recording a common Ethiopian
+# timekeeping practice that is based on solar time. See:
+# Mortada D. If you have a meeting in Ethiopia, you'd better double
+# check the time. PRI's The World. 2015-01-30 15:15 -05.
+# https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time
# Gabon
# See Africa/Lagos.
@@ -856,94 +867,61 @@
# <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
# with the patch.
-# From Paul Eggert (2015-06-08):
-# For now, guess that later spring and fall transitions will use 2015's rules,
-# and guess that Morocco will switch to standard time at 03:00 the last
-# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after
-# Ramadan. To implement this, transition dates for 2016 through 2037 were
-# determined by running the following program under GNU Emacs 24.3, with the
-# results integrated by hand into the table below.
-# (let ((islamic-year 1437))
-# (require 'cal-islam)
-# (while (< islamic-year 1460)
-# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
-# (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
-# (sunday 0))
-# (while (/= sunday (mod (setq a (1- a)) 7)))
-# (while (/= sunday (mod b 7))
-# (setq b (1+ b)))
-# (setq a (calendar-gregorian-from-absolute a))
-# (setq b (calendar-gregorian-from-absolute b))
-# (insert
-# (format
-# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n"
-# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n")
-# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a))
-# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
-# (setq islamic-year (+ 1 islamic-year))))
+# From Mohamed Essedik Najd (2018-10-26):
+# Today, a Moroccan government council approved the perpetual addition
+# of 60 minutes to the regular Moroccan timezone.
+# From Brian Inglis (2018-10-26):
+# http://www.maroc.ma/fr/actualites/le-conseil-de-gouvernement-adopte-un-projet-de-decret-relatif-lheure-legale-stipulant-le
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-
-Rule Morocco 1939 only - Sep 12 0:00 1:00 S
+Rule Morocco 1939 only - Sep 12 0:00 1:00 -
Rule Morocco 1939 only - Nov 19 0:00 0 -
-Rule Morocco 1940 only - Feb 25 0:00 1:00 S
+Rule Morocco 1940 only - Feb 25 0:00 1:00 -
Rule Morocco 1945 only - Nov 18 0:00 0 -
-Rule Morocco 1950 only - Jun 11 0:00 1:00 S
+Rule Morocco 1950 only - Jun 11 0:00 1:00 -
Rule Morocco 1950 only - Oct 29 0:00 0 -
-Rule Morocco 1967 only - Jun 3 12:00 1:00 S
+Rule Morocco 1967 only - Jun 3 12:00 1:00 -
Rule Morocco 1967 only - Oct 1 0:00 0 -
-Rule Morocco 1974 only - Jun 24 0:00 1:00 S
+Rule Morocco 1974 only - Jun 24 0:00 1:00 -
Rule Morocco 1974 only - Sep 1 0:00 0 -
-Rule Morocco 1976 1977 - May 1 0:00 1:00 S
+Rule Morocco 1976 1977 - May 1 0:00 1:00 -
Rule Morocco 1976 only - Aug 1 0:00 0 -
Rule Morocco 1977 only - Sep 28 0:00 0 -
-Rule Morocco 1978 only - Jun 1 0:00 1:00 S
+Rule Morocco 1978 only - Jun 1 0:00 1:00 -
Rule Morocco 1978 only - Aug 4 0:00 0 -
-Rule Morocco 2008 only - Jun 1 0:00 1:00 S
+Rule Morocco 2008 only - Jun 1 0:00 1:00 -
Rule Morocco 2008 only - Sep 1 0:00 0 -
-Rule Morocco 2009 only - Jun 1 0:00 1:00 S
+Rule Morocco 2009 only - Jun 1 0:00 1:00 -
Rule Morocco 2009 only - Aug 21 0:00 0 -
-Rule Morocco 2010 only - May 2 0:00 1:00 S
+Rule Morocco 2010 only - May 2 0:00 1:00 -
Rule Morocco 2010 only - Aug 8 0:00 0 -
-Rule Morocco 2011 only - Apr 3 0:00 1:00 S
+Rule Morocco 2011 only - Apr 3 0:00 1:00 -
Rule Morocco 2011 only - Jul 31 0:00 0 -
-Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S
+Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 -
Rule Morocco 2012 only - Jul 20 3:00 0 -
-Rule Morocco 2012 only - Aug 20 2:00 1:00 S
+Rule Morocco 2012 only - Aug 20 2:00 1:00 -
Rule Morocco 2012 only - Sep 30 3:00 0 -
Rule Morocco 2013 only - Jul 7 3:00 0 -
-Rule Morocco 2013 only - Aug 10 2:00 1:00 S
-Rule Morocco 2013 max - Oct lastSun 3:00 0 -
-Rule Morocco 2014 2021 - Mar lastSun 2:00 1:00 S
+Rule Morocco 2013 only - Aug 10 2:00 1:00 -
+Rule Morocco 2013 2018 - Oct lastSun 3:00 0 -
+Rule Morocco 2014 2018 - Mar lastSun 2:00 1:00 -
Rule Morocco 2014 only - Jun 28 3:00 0 -
-Rule Morocco 2014 only - Aug 2 2:00 1:00 S
+Rule Morocco 2014 only - Aug 2 2:00 1:00 -
Rule Morocco 2015 only - Jun 14 3:00 0 -
-Rule Morocco 2015 only - Jul 19 2:00 1:00 S
+Rule Morocco 2015 only - Jul 19 2:00 1:00 -
Rule Morocco 2016 only - Jun 5 3:00 0 -
-Rule Morocco 2016 only - Jul 10 2:00 1:00 S
+Rule Morocco 2016 only - Jul 10 2:00 1:00 -
Rule Morocco 2017 only - May 21 3:00 0 -
-Rule Morocco 2017 only - Jul 2 2:00 1:00 S
+Rule Morocco 2017 only - Jul 2 2:00 1:00 -
Rule Morocco 2018 only - May 13 3:00 0 -
-Rule Morocco 2018 only - Jun 17 2:00 1:00 S
-Rule Morocco 2019 only - May 5 3:00 0 -
-Rule Morocco 2019 only - Jun 9 2:00 1:00 S
-Rule Morocco 2020 only - Apr 19 3:00 0 -
-Rule Morocco 2020 only - May 24 2:00 1:00 S
-Rule Morocco 2021 only - Apr 11 3:00 0 -
-Rule Morocco 2021 only - May 16 2:00 1:00 S
-Rule Morocco 2022 only - May 8 2:00 1:00 S
-Rule Morocco 2023 only - Apr 23 2:00 1:00 S
-Rule Morocco 2024 only - Apr 14 2:00 1:00 S
-Rule Morocco 2025 only - Apr 6 2:00 1:00 S
-Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S
-Rule Morocco 2036 only - Oct 19 3:00 0 -
-Rule Morocco 2037 only - Oct 4 3:00 0 -
+Rule Morocco 2018 only - Jun 17 2:00 1:00 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
- 0:00 Morocco WE%sT 1984 Mar 16
- 1:00 - CET 1986
- 0:00 Morocco WE%sT
+ 0:00 Morocco +00/+01 1984 Mar 16
+ 1:00 - +01 1986
+ 0:00 Morocco +00/+01 2018 Oct 27
+ 1:00 - +01
# Western Sahara
#
@@ -958,7 +936,8 @@
Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
-1:00 - -01 1976 Apr 14
- 0:00 Morocco WE%sT
+ 0:00 Morocco +00/+01 2018 Oct 27
+ 1:00 - +01
# Mozambique
#
--- a/make/data/tzdata/antarctica Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/antarctica Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Antarctica and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/make/data/tzdata/asia Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/asia Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Asia and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -29,7 +31,7 @@
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
-# From Paul Eggert (2017-01-13):
+# From Paul Eggert (2018-06-19):
#
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -58,7 +60,8 @@
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
#
-# The following alphabetic abbreviations appear in these tables:
+# The following alphabetic abbreviations appear in these tables
+# (corrections are welcome):
# std dst
# LMT Local Mean Time
# 2:00 EET EEST Eastern European Time
@@ -67,11 +70,13 @@
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 CST China
+# 8:00 PST PDT* Philippine Standard Time
# 8:30 KST KDT Korea when at +0830
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
# 9:00 JST JDT Japan
# 9:00 KST KDT Korea when at +09
# 9:30 ACST Australian Central Standard Time
+# *I invented the abbreviation PDT; see "Philippines" below.
# Otherwise, these tables typically use numeric abbreviations like +03
# and +0330 for integer hour and minute UT offsets. Although earlier
# editions invented alphabetic time zone abbreviations for every
@@ -304,6 +309,29 @@
# China
+# From Paul Eggert (2018-10-02):
+# The following comes from Table 1 of:
+# Li Yu. Research on the daylight saving movement in 1940s Shanghai.
+# Nanjing Journal of Social Sciences. 2014;(2):144-50.
+# http://oversea.cnki.net/kns55/detail.aspx?dbname=CJFD2014&filename=NJSH201402020
+# The table lists dates only; I am guessing 00:00 and 24:00 transition times.
+# Also, the table lists the planned end of DST in 1949, but the corresponding
+# zone line cuts this off on May 28, when the Communists took power.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Shang 1940 only - Jun 1 0:00 1:00 D
+Rule Shang 1940 only - Oct 12 24:00 0 S
+Rule Shang 1941 only - Mar 15 0:00 1:00 D
+Rule Shang 1941 only - Nov 1 24:00 0 S
+Rule Shang 1942 only - Jan 31 0:00 1:00 D
+Rule Shang 1945 only - Sep 1 24:00 0 S
+Rule Shang 1946 only - May 15 0:00 1:00 D
+Rule Shang 1946 only - Sep 30 24:00 0 S
+Rule Shang 1947 only - Apr 15 0:00 1:00 D
+Rule Shang 1947 only - Oct 31 24:00 0 S
+Rule Shang 1948 1949 - May 1 0:00 1:00 D
+Rule Shang 1948 1949 - Sep 30 24:00 0 S #plan
+
# From Guy Harris:
# People's Republic of China. Yes, they really have only one time zone.
@@ -330,18 +358,33 @@
# time - sort of", Los Angeles Times, 1986-05-05 ... [says] that China began
# observing daylight saving time in 1986.
-# From Paul Eggert (2014-06-30):
-# Shanks & Pottenger have China switching to a single time zone in 1980, but
-# this doesn't seem to be correct. They also write that China observed summer
-# DST from 1986 through 1991, which seems to match the above commentary, so
-# go with them for DST rules as follows:
+# From P Chan (2018-05-07):
+# The start and end time of DST in China [from 1986 on] should be 2:00
+# (i.e. 2:00 to 3:00 at the start and 2:00 to 1:00 at the end)....
+# Government notices about summer time:
+#
+# 1986-04-12 http://www.zj.gov.cn/attach/zfgb/198608.pdf p.21-22
+# (To establish summer time from 1986. On 4 May, set the clocks ahead one hour
+# at 2 am. On 14 September, set the clocks backward one hour at 2 am.)
+#
+# 1987-02-15 http://www.gov.cn/gongbao/shuju/1987/gwyb198703.pdf p.114
+# (Summer time in 1987 to start from 12 April until 13 September)
+#
+# 1987-09-09 http://www.gov.cn/gongbao/shuju/1987/gwyb198721.pdf p.709
+# (From 1988, summer time to start from 2 am of the first Sunday of mid-April
+# until 2 am of the first Sunday of mid-September)
+#
+# 1992-03-03 http://www.gov.cn/gongbao/shuju/1992/gwyb199205.pdf p.152
+# (To suspend summer time from 1992)
+#
+# The first page of People's Daily on 12 April 1988 stating that summer time
+# to begin on 17 April.
+# http://data.people.com.cn/pic/101p/1988/04/1988041201.jpg
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Shang 1940 only - Jun 3 0:00 1:00 D
-Rule Shang 1940 1941 - Oct 1 0:00 0 S
-Rule Shang 1941 only - Mar 16 0:00 1:00 D
-Rule PRC 1986 only - May 4 0:00 1:00 D
-Rule PRC 1986 1991 - Sep Sun>=11 0:00 0 S
-Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
+Rule PRC 1986 only - May 4 2:00 1:00 D
+Rule PRC 1986 1991 - Sep Sun>=11 2:00 0 S
+Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D
# From Anthony Fok (2001-12-20):
# BTW, I did some research on-line and found some info regarding these five
@@ -363,10 +406,11 @@
# Alois Treindl kindly sent me translations of the following two sources:
#
# (1)
-# Guo Qingsheng (National Time-Service Center, CAS, Xi'an 710600, China)
+# Guo Qing-sheng (National Time-Service Center, CAS, Xi'an 710600, China)
# Beijing Time at the Beginning of the PRC
# China Historical Materials of Science and Technology
-# (Zhongguo ke ji shi liao, 中国科技史料), Vol. 24, No. 1 (2003)
+# (Zhongguo ke ji shi liao, 中国科技史料). 2003;24(1):5-9.
+# http://oversea.cnki.net/kcms/detail/detail.aspx?filename=ZGKS200301000&dbname=CJFD2003
# It gives evidence that at the beginning of the PRC, Beijing time was
# officially apparent solar time! However, Guo also says that the
# evidence is dubious, as the relevant institute of astronomy had not
@@ -543,7 +587,7 @@
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Beijing time, used throughout China; represented by Shanghai.
Zone Asia/Shanghai 8:05:43 - LMT 1901
- 8:00 Shang C%sT 1949
+ 8:00 Shang C%sT 1949 May 28
8:00 PRC C%sT
# Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi
# / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.)
@@ -772,24 +816,140 @@
8:00 Taiwan C%sT
# Macau (Macao, Aomen)
+#
+# From P Chan (2018-05-10):
+# * LegisMac
+# http://legismac.safp.gov.mo/legismac/descqry/Descqry.jsf?lang=pt
+# A database for searching titles of legal documents of Macau in
+# Chinese and Portuguese. The term "HORÁRIO DE VERÃO" can be used for
+# searching decrees about summer time.
+# * Archives of Macao
+# http://www.archives.gov.mo/en/bo/
+# It contains images of old official gazettes.
+# * The Macao Meteorological and Geophysical Bureau have a page listing the
+# summer time history. But it is not complete and has some mistakes.
+# http://www.smg.gov.mo/smg/geophysics/e_t_Summer%20Time.htm
+# Macau adopted GMT+8 on 30 Oct 1904 to follow Hong Kong. Clocks were
+# advanced by 25 minutes and 50 seconds. Which means the LMT used was
+# +7:34:10. As stated in the "Portaria No. 204" dated 21 October 1904
+# and published in the Official Gazette on 29 October 1904.
+# http://igallery.icm.gov.mo/Images/Archives/BO/MO_AH_PUB_BO_1904_10/MO_AH_PUB_BO_1904_10_00025_Grey.JPG
+#
+# Therefore the 1911 decree of Portugal did not change time in Macau.
+#
+# From LegisMac, here is a list of decrees that changed the time ...
+# [Decree Gazette-no. date; titles omitted in this quotation]
+# DIL 732 BOCM 51 1941.12.20
+# DIL 764 BOCM 9S 1942.04.30
+# DIL 781 BOCM 21 1942.10.10
+# PT 3434 BOCM 8S 1943.04.17
+# PT 3504 BOCM 20 1943.09.25
+# PT 3843 BOCM 39 1945.09.29
+# PT 3961 BOCM 17 1946.04.27
+# PT 4026 BOCM 39 1946.09.28
+# PT 4153 BOCM 16 1947.04.10
+# PT 4271 BOCM 48 1947.11.29
+# PT 4374 BOCM 18 1948.05.01
+# PT 4465 BOCM 44 1948.10.30
+# PT 4590 BOCM 14 1949.04.02
+# PT 4666 BOCM 44 1949.10.29
+# PT 4771 BOCM 12 1950.03.25
+# PT 4838 BOCM 43 1950.10.28
+# PT 4946 BOCM 12 1951.03.24
+# PT 5025 BO 43 1951.10.27
+# PT 5149 BO 14 1952.04.05
+# PT 5251 BO 43 1952.10.25
+# PT 5366 BO 13 1953.03.28
+# PT 5444 BO 44 1953.10.31
+# PT 5540 BO 12 1954.03.20
+# PT 5589 BO 44 1954.10.30
+# PT 5676 BO 12 1955.03.19
+# PT 5739 BO 45 1955.11.05
+# PT 5823 BO 11 1956.03.17
+# PT 5891 BO 44 1956.11.03
+# PT 5981 BO 12 1957.03.23
+# PT 6064 BO 43 1957.10.26
+# PT 6172 BO 12 1958.03.22
+# PT 6243 BO 43 1958.10.25
+# PT 6341 BO 12 1959.03.21
+# PT 6411 BO 43 1959.10.24
+# PT 6514 BO 11 1960.03.12
+# PT 6584 BO 44 1960.10.29
+# PT 6721 BO 10 1961.03.11
+# PT 6815 BO 43 1961.10.28
+# PT 6947 BO 10 1962.03.10
+# PT 7080 BO 43 1962.10.27
+# PT 7218 BO 12 1963.03.23
+# PT 7340 BO 43 1963.10.26
+# PT 7491 BO 11 1964.03.14
+# PT 7664 BO 43 1964.10.24
+# PT 7846 BO 15 1965.04.10
+# PT 7979 BO 42 1965.10.16
+# PT 8146 BO 15 1966.04.09
+# PT 8252 BO 41 1966.10.08
+# PT 8429 BO 15 1967.04.15
+# PT 8540 BO 41 1967.10.14
+# PT 8735 BO 15 1968.04.13
+# PT 8860 BO 41 1968.10.12
+# PT 9035 BO 16 1969.04.19
+# PT 9156 BO 42 1969.10.18
+# PT 9328 BO 15 1970.04.11
+# PT 9418 BO 41 1970.10.10
+# PT 9587 BO 14 1971.04.03
+# PT 9702 BO 41 1971.10.09
+# PT 38-A/72 BO 14 1972.04.01
+# PT 126-A/72 BO 41 1972.10.07
+# PT 61/73 BO 14 1973.04.07
+# PT 182/73 BO 40 1973.10.06
+# PT 282/73 BO 51 1973.12.22
+# PT 177/74 BO 41 1974.10.12
+# PT 51/75 BO 15 1975.04.12
+# PT 173/75 BO 41 1975.10.11
+# PT 67/76/M BO 14 1976.04.03
+# PT 169/76/M BO 41 1976.10.09
+# PT 78/79/M BO 19 1979.05.12
+# PT 166/79/M BO 42 1979.10.20
+# Note that DIL 732 does not belong to "HORÁRIO DE VERÃO" according to
+# LegisMac.... Note that between 1942 and 1945, the time switched
+# between GMT+9 and GMT+10. Also in 1965 and 1965 the DST ended at 2:30am.
+
+# From Paul Eggert (2018-05-10):
+# The 1904 decree says that Macau changed from the meridian of
+# Fortaleza do Monte, presumably the basis for the 7:34:10 for LMT.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D
-Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S
-Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D
-Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D
-Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D
-Rule Macau 1965 only - Oct 31 0:00 0 S
-Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D
-Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S
-Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D
-Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S
-Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S
-Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D
-Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D
-Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S
-# See Europe/Lisbon for info about the 1912 transition.
+Rule Macau 1942 1943 - Apr 30 23:00 1:00 -
+Rule Macau 1942 only - Nov 17 23:00 0 -
+Rule Macau 1943 only - Sep 30 23:00 0 S
+Rule Macau 1946 only - Apr 30 23:00s 1:00 D
+Rule Macau 1946 only - Sep 30 23:00s 0 S
+Rule Macau 1947 only - Apr 19 23:00s 1:00 D
+Rule Macau 1947 only - Nov 30 23:00s 0 S
+Rule Macau 1948 only - May 2 23:00s 1:00 D
+Rule Macau 1948 only - Oct 31 23:00s 0 S
+Rule Macau 1949 1950 - Apr Sat>=1 23:00s 1:00 D
+Rule Macau 1949 1950 - Oct lastSat 23:00s 0 S
+Rule Macau 1951 only - Mar 31 23:00s 1:00 D
+Rule Macau 1951 only - Oct 28 23:00s 0 S
+Rule Macau 1952 1953 - Apr Sat>=1 23:00s 1:00 D
+Rule Macau 1952 only - Nov 1 23:00s 0 S
+Rule Macau 1953 1954 - Oct lastSat 23:00s 0 S
+Rule Macau 1954 1956 - Mar Sat>=17 23:00s 1:00 D
+Rule Macau 1955 only - Nov 5 23:00s 0 S
+Rule Macau 1956 1964 - Nov Sun>=1 03:30 0 S
+Rule Macau 1957 1964 - Mar Sun>=18 03:30 1:00 D
+Rule Macau 1965 1973 - Apr Sun>=16 03:30 1:00 D
+Rule Macau 1965 1966 - Oct Sun>=16 02:30 0 S
+Rule Macau 1967 1976 - Oct Sun>=16 03:30 0 S
+Rule Macau 1973 only - Dec 30 03:30 1:00 D
+Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D
+Rule Macau 1979 only - May 13 03:30 1:00 D
+Rule Macau 1979 only - Oct Sun>=16 03:30 0 S
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Macau 7:34:20 - LMT 1911 Dec 31 16:00u
+Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30
+ 8:00 - CST 1941 Dec 21 23:00
+ 9:00 Macau +09/+10 1945 Sep 30 24:00
8:00 Macau C%sT
@@ -1494,9 +1654,29 @@
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
# ... In summary, it is written as follows. From 24:00 on the first Saturday
# in May, until 0:00 on the day after the second Saturday in September.
+
+# From Phake Nick (2018-09-27):
+# [T]he webpage authored by National Astronomical Observatory of Japan
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EF.html
+# ... mentioned that using Showa 23 (year 1948) as example, 13pm of September
+# 11 in summer time will equal to 0am of September 12 in standard time.
+# It cited a document issued by the Liaison Office which briefly existed
+# during the postwar period of Japan, where the detail on implementation
+# of the summer time is described in the document.
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EFB2C6BBFEB9EFA4CEBCC2BBDCA4CBA4C4A4A4A4C6.pdf
+# The text in the document do instruct a fall back to occur at
+# September 11, 13pm in summer time, while ordinary citizens can
+# change the clock before they sleep.
+#
+# From Paul Eggert (2018-09-27):
+# This instruction is equivalent to "Sat>=8 25:00", so use that. zic treats
+# it like "Sun>=9 01:00", which is not quite the same but is the best we can
+# do in any POSIX or C platform. The "25:00" assumes zic from 2007 or later,
+# which should be safe now.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Japan 1948 only - May Sat>=1 24:00 1:00 D
-Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S
+Rule Japan 1948 1951 - Sep Sun>=9 1:00 0 S
Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D
Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
@@ -1878,7 +2058,7 @@
5:00 - +05
# Mangghystaū (KZ-MAN)
# Aqtau was not founded until 1963, but it represents an inhabited region,
-# so include time stamps before 1963.
+# so include timestamps before 1963.
Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2
4:00 - +04 1930 Jun 21
5:00 - +05 1981 Oct 1
@@ -2018,6 +2198,10 @@
# Assembly, as published in Rodong Sinmun.
# From Tim Parenti (2018-04-29):
# It appears to be the front page story at the top in the right-most column.
+#
+# From Paul Eggert (2018-05-04):
+# The BBC reported that the transition was from 23:30 to 24:00 today.
+# https://www.bbc.com/news/world-asia-44010705
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
@@ -2030,7 +2214,7 @@
8:30 - KST 1912 Jan 1
9:00 - JST 1945 Aug 24
9:00 - KST 2015 Aug 15 00:00
- 8:30 - KST 2018 May 5
+ 8:30 - KST 2018 May 4 23:30
9:00 - KST
###############################################################################
@@ -2780,19 +2964,35 @@
# Philippine Star 2014-08-05
# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time
+# From Paul Goyette (2018-06-15):
+# In the Philippines, there is a national law, Republic Act No. 10535
+# which declares the official time here as "Philippine Standard Time".
+# The act [1] even specifies use of PST as the abbreviation, although
+# the FAQ provided by PAGASA [2] uses the "acronym PhST to distinguish
+# it from the Pacific Standard Time (PST)."
+# [1] http://www.officialgazette.gov.ph/2013/05/15/republic-act-no-10535/
+# [2] https://www1.pagasa.dost.gov.ph/index.php/astronomy/philippine-standard-time#republic-act-10535
+#
+# From Paul Eggert (2018-06-19):
+# I surveyed recent news reports, and my impression is that "PST" is
+# more popular among reliable English-language news sources. This is
+# not just a measure of Google hit counts: it's also the sizes and
+# influence of the sources. There is no current abbreviation for DST,
+# so use "PDT", the usual American style.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Phil 1936 only - Nov 1 0:00 1:00 -
-Rule Phil 1937 only - Feb 1 0:00 0 -
-Rule Phil 1954 only - Apr 12 0:00 1:00 -
-Rule Phil 1954 only - Jul 1 0:00 0 -
-Rule Phil 1978 only - Mar 22 0:00 1:00 -
-Rule Phil 1978 only - Sep 21 0:00 0 -
+Rule Phil 1936 only - Nov 1 0:00 1:00 D
+Rule Phil 1937 only - Feb 1 0:00 0 S
+Rule Phil 1954 only - Apr 12 0:00 1:00 D
+Rule Phil 1954 only - Jul 1 0:00 0 S
+Rule Phil 1978 only - Mar 22 0:00 1:00 D
+Rule Phil 1978 only - Sep 21 0:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
8:04:00 - LMT 1899 May 11
- 8:00 Phil +08/+09 1942 May
- 9:00 - +09 1944 Nov
- 8:00 Phil +08/+09
+ 8:00 Phil P%sT 1942 May
+ 9:00 - JST 1944 Nov
+ 8:00 Phil P%sT
# Qatar
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -2803,15 +3003,34 @@
# Saudi Arabia
#
-# From Paul Eggert (2014-07-15):
+# From Paul Eggert (2018-08-29):
# Time in Saudi Arabia and other countries in the Arabian peninsula was not
-# standardized until relatively recently; we don't know when, and possibly it
+# standardized until 1968 or so; we don't know exactly when, and possibly it
# has never been made official. Richard P Hunt, in "Islam city yielding to
# modern times", New York Times (1961-04-09), p 20, wrote that only airlines
# observed standard time, and that people in Jeddah mostly observed quasi-solar
# time, doing so by setting their watches at sunrise to 6 o'clock (or to 12
# o'clock for "Arab" time).
#
+# Timekeeping differed depending on who you were and which part of Saudi
+# Arabia you were in. In 1969, Elias Antar wrote that although a common
+# practice had been to set one's watch to 12:00 (i.e., midnight) at sunset -
+# which meant that the time on one side of a mountain could differ greatly from
+# the time on the other side - many foreigners set their watches to 6pm
+# instead, while airlines instead used UTC +03 (except in Dhahran, where they
+# used UTC +04), Aramco used UTC +03 with DST, and the Trans-Arabian Pipe Line
+# Company used Aramco time in eastern Saudi Arabia and airline time in western.
+# (The American Military Aid Advisory Group used plain UTC.) Antar writes,
+# "A man named Higgins, so the story goes, used to run a local power
+# station. One day, the whole thing became too much for Higgins and he
+# assembled his staff and laid down the law. 'I've had enough of this,' he
+# shrieked. 'It is now 12 o'clock Higgins Time, and from now on this station is
+# going to run on Higgins Time.' And so, until last year, it did." See:
+# Antar E. Dinner at When? Saudi Aramco World, 1969 March/April. 2-3.
+# http://archive.aramcoworld.com/issue/196902/dinner.at.when.htm
+# newspapers.com says a similar story about Higgins was published in the Port
+# Angeles (WA) Evening News, 1965-03-10, page 5, but I lack access to the text.
+#
# The TZ database cannot represent quasi-solar time; airline time is the best
# we can do. The 1946 foreign air news digest of the U.S. Civil Aeronautics
# Board (OCLC 42299995) reported that the "... Arabian Government, inaugurated
@@ -2821,7 +3040,8 @@
#
# Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two
# time zones; the other zone, at UT +04, was in the far eastern part of
-# the country. Ignore this, as it's before our 1970 cutoff.
+# the country. Presumably this is documenting airline time. Ignore this,
+# as it's before our 1970 cutoff.
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14
--- a/make/data/tzdata/australasia Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/australasia Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Australasia and environs, and for much of the Pacific
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -384,8 +386,15 @@
# Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
# Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
# [Legal Notice No. 41] of an order of the previous day by J Usamate.
+
+# From Raymond Kumar (2018-07-13):
+# http://www.fijitimes.com/government-approves-2018-daylight-saving/
+# ... The daylight saving period will end at 3am on Sunday January 13, 2019.
+#
+# From Paul Eggert (2018-07-15):
# For now, guess DST from 02:00 the first Sunday in November to 03:00
-# the first Sunday on or after January 14. Although ad hoc, it matches
+# the first Sunday on or after January 13. January transitions reportedly
+# depend on when school terms start. Although the guess is ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
@@ -399,7 +408,7 @@
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 -
-Rule Fiji 2015 max - Jan Sun>=14 3:00 0 -
+Rule Fiji 2015 max - Jan Sun>=13 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
--- a/make/data/tzdata/backward Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/backward Mon Nov 12 11:10:16 2018 +0530
@@ -21,10 +21,12 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb links for backward compatibility
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# This file provides links between current names for time zones
+# This file provides links between current names for timezones
# and their old names. Many names changed in late 1993.
# Link TARGET LINK-NAME
--- a/make/data/tzdata/etcetera Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/etcetera Mon Nov 12 11:10:16 2018 +0530
@@ -21,12 +21,14 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for ships at sea and other miscellany
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# These entries are mostly present for historical reasons, so that
# people in areas not otherwise covered by the tz files could "zic -l"
-# to a time zone that was right for their area. These days, the
+# to a timezone that was right for their area. These days, the
# tz files cover almost all the inhabited world, and the only practical
# need now for the entries that are not on UTC are for ships at sea
# that cannot use POSIX TZ settings.
--- a/make/data/tzdata/europe Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/europe Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Europe and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -540,7 +542,7 @@
#
# To work around this problem, the build procedure can translate the
# following data into two forms, one with negative SAVE values and the
-# other form with a traditional approximation for Irish time stamps
+# other form with a traditional approximation for Irish timestamps
# after 1971-10-31 02:00 UTC; although this approximation has tm_isdst
# flags that are reversed, its UTC offsets are correct and this often
# suffices. This source file currently uses only nonnegative SAVE
@@ -2450,6 +2452,33 @@
# administratively part of Sakhalin oblast', they appear to have
# remained on UTC+11 along with Magadan.
+# From Marat Nigametzianov (2018-07-16):
+# this is link to order from 1956 about timezone in USSR
+# http://astro.uni-altai.ru/~orion/blog/2011/11/novyie-granitsyi-chasovyih-poyasov-v-sssr/
+#
+# From Paul Eggert (2018-07-16):
+# Perhaps someone could translate the above-mentioned link and use it
+# to correct our data for the ex-Soviet Union. It cites the following:
+# «Поясное время и новые границы часовых поясов» / сост. П.Н. Долгов,
+# отв. ред. Г.Д. Бурдун - М: Комитет стандартов, мер и измерительных
+# приборов при Совете Министров СССР, Междуведомственная комиссия
+# единой службы времени, 1956 г.
+# This book looks like it would be a helpful resource for the Soviet
+# Union through 1956. Although a copy was in the Scientific Library
+# of Tomsk State University, I have not been able to track down a copy nearby.
+#
+# From Stepan Golosunov (2018-07-21):
+# http://astro.uni-altai.ru/~orion/blog/2015/05/center-reforma-ischisleniya-vremeni-br-na-territorii-sssr-v-1957-godu-center/
+# says that the 1956 decision to change time belts' borders was not
+# implemented as planned in 1956 and the change happened in 1957.
+# There is also the problem that actual time zones were different from
+# the official time belts (and from many time belts' maps) as there were
+# numerous exceptions to application of time belt rules. For example,
+# https://ru.wikipedia.org/wiki/Московское_время#Перемещение_границы_применения_московского_времени_на_восток
+# says that by 1962 there were many regions in the 3rd time belt that
+# were on Moscow time, referring to a 1962 map. By 1989 number of such
+# exceptions grew considerably.
+
# From Tim Parenti (2014-07-06):
# The comments detailing the coverage of each Russian zone are meant to assist
# with maintenance only and represent our best guesses as to which regions
@@ -2460,9 +2489,6 @@
# future stability. ISO 3166-2:RU codes are also listed for first-level
# divisions where available.
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-
-
# From Tim Parenti (2014-07-03):
# Europe/Kaliningrad covers...
# 39 RU-KGD Kaliningrad Oblast
@@ -2730,6 +2756,15 @@
# 34 RU-VGG Volgograd Oblast
# The 1988 transition is from USSR act No. 5 (1988-01-04).
+# From Alexander Fetisov (2018-09-20):
+# Volgograd region in southern Russia (Europe/Volgograd) change
+# timezone from UTC+3 to UTC+4 from 28oct2018.
+# http://sozd.parliament.gov.ru/bill/452878-7
+#
+# From Stepan Golosunov (2018-10-11):
+# The law has been published today on
+# http://publication.pravo.gov.ru/Document/View/0001201810110037
+
Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
3:00 - +03 1930 Jun 21
4:00 - +04 1961 Nov 11
@@ -2738,7 +2773,8 @@
4:00 - +04 1992 Mar 29 2:00s
3:00 Russia +03/+04 2011 Mar 27 2:00s
4:00 - +04 2014 Oct 26 2:00s
- 3:00 - +03
+ 3:00 - +03 2018 Oct 28 2:00s
+ 4:00 - +04
# From Paul Eggert (2016-11-11):
# Europe/Saratov covers:
@@ -3427,7 +3463,8 @@
#Rule NatSpain 1937 only - May 22 23:00 1:00 S
#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 -
#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S
-# The following rules are copied from Morocco from 1967 through 1978.
+# The following rules are copied from Morocco from 1967 through 1978,
+# except with "S" letters.
Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S
Rule SpainAfrica 1967 only - Oct 1 0:00 0 -
Rule SpainAfrica 1974 only - Jun 24 0:00 1:00 S
@@ -3447,6 +3484,7 @@
0:00 1:00 WEST 1918 Oct 7 23:00
0:00 - WET 1924
0:00 Spain WE%sT 1929
+ 0:00 - WET 1967 # Help zishrink.awk.
0:00 SpainAfrica WE%sT 1984 Mar 16
1:00 - CET 1986
1:00 EU CE%sT
@@ -3632,7 +3670,7 @@
# http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001
# http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006
# From Paul Eggert (2016-09-25):
-# Prefer the above sources to Shanks & Pottenger for time stamps after 1985.
+# Prefer the above sources to Shanks & Pottenger for timestamps after 1985.
# From Steffen Thorsen (2007-03-09):
# Starting 2007 though, it seems that they are adopting EU's 1:00 UTC
@@ -3842,10 +3880,29 @@
# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
+# From Paul Eggert (2018-10-03):
+# As is usual in tzdb, Ukrainian zones use the most common English spellings.
+# For example, tzdb uses Europe/Kiev, as "Kiev" is the most common spelling in
+# English for Ukraine's capital, even though it is certainly wrong as a
+# transliteration of the Ukrainian "Київ". This is similar to tzdb's use of
+# Europe/Prague, which is certainly wrong as a transliteration of the Czech
+# "Praha". ("Kiev" came from old Slavic via Russian to English, and "Prague"
+# came from old Slavic via French to English, so the two cases have something
+# in common.) Admittedly English-language spelling of Ukrainian names is
+# controversial, and some day "Kyiv" may become substantially more popular in
+# English; in the meantime, stick with the traditional English "Kiev" as that
+# means less disruption for our users.
+#
+# Anyway, none of the common English-language spellings (Kiev, Kyiv, Kieff,
+# Kijeff, Kijev, Kiyef, Kiyeff) do justice to the common pronunciation in
+# Ukrainian, namely [ˈkɪjiu̯] (IPA). This pronunciation has nothing like an
+# English "v" or "f", and instead trails off with what an English-speaker
+# would call a demure "oo" sound, and it would would be better anglicized as
+# "Kuiyu". Here's a sound file, if you would like to do as the Kuiyuvians do:
+# https://commons.wikimedia.org/wiki/File:Uk-Київ.ogg
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-# Most of Ukraine since 1970 has been like Kiev.
-# "Kyiv" is the transliteration of the Ukrainian name, but
-# "Kiev" is more common in English.
+# This represents most of Ukraine. See above for the spelling of "Kiev".
Zone Europe/Kiev 2:02:04 - LMT 1880
2:02:04 - KMT 1924 May 2 # Kiev Mean Time
2:00 - EET 1930 Jun 21
--- a/make/data/tzdata/factory Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/factory Mon Nov 12 11:10:16 2018 +0530
@@ -21,11 +21,13 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for noncommittal factory settings
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# For distributors who don't want to put time zone specification in
-# their installation procedures. Users that run 'date' will get the
+# For distributors who don't want to specify a timezone in their
+# installation procedures. Users who run 'date' will get the
# time zone abbreviation "-00", indicating that the actual time zone
# is unknown.
--- a/make/data/tzdata/leapseconds Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/leapseconds Mon Nov 12 11:10:16 2018 +0530
@@ -26,21 +26,25 @@
# This file is in the public domain.
# This file is generated automatically from the data in the public-domain
-# leap-seconds.list file, which is copied from:
-# ftp://ftp.nist.gov/pub/time/leap-seconds.list
+# leap-seconds.list file, which can be copied from
+# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
# For more about leap-seconds.list, please see
# The NTP Timescale and Leap Seconds
-# https://www.eecis.udel.edu/~mills/leap.html
+# <https://www.eecis.udel.edu/~mills/leap.html>.
# The International Earth Rotation and Reference Systems Service
# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
-# (which measures the true angular orientation of the earth in space); see
-# Levine J. Coordinated Universal Time and the leap second.
+# (which measures the true angular orientation of the earth in space)
+# and publishes leap second data in a copyrighted file
+# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
+# See: Levine J. Coordinated Universal Time and the leap second.
# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
-# http://ieeexplore.ieee.org/document/7909995/
+# <https://ieeexplore.ieee.org/document/7909995>.
# There were no leap seconds before 1972, because the official mechanism
# accounting for the discrepancy between atomic time and the earth's rotation
-# did not exist until the early 1970s.
+# did not exist.
# The correction (+ or -) is made at the given time, so lines
# will typically look like:
@@ -48,10 +52,7 @@
# or
# Leap YEAR MON DAY 23:59:59 - R/S
-# If the leapsecond is Rolling (R) the given time is local time.
-# If the leapsecond is Stationary (S) the given time is UTC.
-
-# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
+# If the leap second is Rolling (R) the given time is local time (unused here).
Leap 1972 Jun 30 23:59:60 + S
Leap 1972 Dec 31 23:59:60 + S
Leap 1973 Dec 31 23:59:60 + S
@@ -80,5 +81,9 @@
Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
-# Updated through IERS Bulletin C55
-# File expires on: 28 December 2018
+# POSIX timestamps for the data in this file:
+#updated 1467936000
+#expires 1561680000
+
+# Updated through IERS Bulletin C56
+# File expires on: 28 June 2019
--- a/make/data/tzdata/northamerica Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/northamerica Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for North and Central America and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -71,7 +73,7 @@
#
# Most of the US soon followed suit. See:
# Bartky IR. The adoption of standard time. Technol Cult 1989 Jan;30(1):25-56.
-# http://dx.doi.org/10.2307/3105430
+# https://dx.doi.org/10.2307/3105430
# From Paul Eggert (2005-04-16):
# That 1883 transition occurred at 12:00 new time, not at 12:00 old time.
@@ -460,6 +462,19 @@
# western South Dakota, far western Texas (El Paso County, Hudspeth County,
# and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming
#
+# From Paul Eggert (2018-10-25):
+# On 1921-03-04 federal law placed all of Texas into the central time zone.
+# However, El Paso ignored the law for decades and continued to observe
+# mountain time, on the grounds that that's what they had always done
+# and they weren't about to let the federal government tell them what to do.
+# Eventually the federal government gave in and changed the law on
+# 1970-04-10 to match what El Paso was actually doing. Although
+# that's slightly after our 1970 cutoff, there is no need to create a
+# separate zone for El Paso since they were ignoring the law anyway. See:
+# Long T. El Pasoans were time rebels, fought to stay in Mountain zone.
+# El Paso Times. 2018-10-24 06:40 -06.
+# https://www.elpasotimes.com/story/news/local/el-paso/2018/10/24/el-pasoans-were-time-rebels-fought-stay-mountain-zone/1744509002/
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Denver 1920 1921 - Mar lastSun 2:00 1:00 D
Rule Denver 1920 only - Oct lastSun 2:00 0 S
@@ -729,9 +744,7 @@
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
-10:30 - HST 1933 Apr 30 2:00
-10:30 1:00 HDT 1933 May 21 12:00
- -10:30 - HST 1942 Feb 9 2:00
- -10:30 1:00 HDT 1945 Sep 30 2:00
- -10:30 - HST 1947 Jun 8 2:00
+ -10:30 US H%sT 1947 Jun 8 2:00
-10:00 - HST
# Now we turn to US areas that have diverged from the consensus since 1970.
--- a/make/data/tzdata/pacificnew Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/pacificnew Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for proposed US election time (this file is obsolete)
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/make/data/tzdata/southamerica Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/southamerica Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for South America and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -415,7 +417,7 @@
# standard time, so let's do that here too. This does not change UTC
# offsets, only tm_isdst and the time zone abbreviations. One minor
# plus is that this silences a zic complaint that there's no POSIX TZ
-# setting for time stamps past 2038.
+# setting for timestamps past 2038.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
#
@@ -948,6 +950,14 @@
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
# From Steffen Thorsen (2017-12-20):
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
+#
+# From Fábio Gomes (2018-10-04):
+# The Brazilian president just announced a new change on this year DST.
+# It was scheduled to start on November 4th and it was changed to November 18th.
+# From Rodrigo Brüning Wessler (2018-10-15):
+# The Brazilian government just announced that the change in DST was
+# canceled.... Maybe the president Michel Temer also woke up one hour
+# earlier today. :)
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 -
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
@@ -1254,6 +1264,24 @@
# they will switch from -03 to -04 one hour after Santiago does that day.
# For now, assume that they will not revert.
+# From Juan Correa (2018-08-13):
+# As of moments ago, the Ministry of Energy in Chile has announced the new
+# schema for DST. ... Announcement in video (in Spanish):
+# https://twitter.com/MinEnergia/status/1029000399129374720
+# From Yonathan Dossow (2018-08-13):
+# The video says "first Saturday of September", we all know it means Sunday at
+# midnight.
+# From Tim Parenti (2018-08-13):
+# Translating the captions on the video at 0:44-0:55, "We want to announce as
+# Government that from 2019, Winter Time will be increased to 5 months, between
+# the first Saturday of April and the first Saturday of September."
+# At 2:08-2:20, "The Magallanes region will maintain its current time, as
+# decided by the citizens during 2017, but our Government will promote a
+# regional dialogue table to gather their opinion on this matter."
+# https://twitter.com/MinEnergia/status/1029009354001973248
+# "We will keep the new time policy unchanged for at least the next 4 years."
+# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1931 - Sep 1 0:00 1:00 -
Rule Chile 1928 1932 - Apr 1 0:00 0 -
@@ -1287,8 +1315,10 @@
Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 -
Rule Chile 2012 2014 - Apr Sun>=23 3:00u 0 -
Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 -
-Rule Chile 2016 max - May Sun>=9 3:00u 0 -
-Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 -
+Rule Chile 2016 2018 - May Sun>=9 3:00u 0 -
+Rule Chile 2016 2018 - Aug Sun>=9 4:00u 1:00 -
+Rule Chile 2019 max - Apr Sun>=2 3:00u 0 -
+Rule Chile 2019 max - Sep Sun>=2 4:00u 1:00 -
# IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
--- a/make/data/tzdata/systemv Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/systemv Mon Nov 12 11:10:16 2018 +0530
@@ -21,6 +21,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for System V rules (this file is obsolete)
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/make/data/tzdata/zone.tab Mon Nov 12 10:55:49 2018 +0530
+++ b/make/data/tzdata/zone.tab Mon Nov 12 11:10:16 2018 +0530
@@ -21,12 +21,12 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-# tz zone descriptions (deprecated version)
+# tzdb timezone descriptions (deprecated version)
#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
-# From Paul Eggert (2014-07-31):
+# From Paul Eggert (2018-06-27):
# This file is intended as a backward-compatibility aid for older programs.
# New programs should use zone1970.tab. This file is like zone1970.tab (see
# zone1970.tab's comments), but with the following additional restrictions:
@@ -35,13 +35,13 @@
# 2. The first data column contains exactly one country code.
#
# Because of (2), each row stands for an area that is the intersection
-# of a region identified by a country code and of a zone where civil
+# of a region identified by a country code and of a timezone where civil
# clocks have agreed since 1970; this is a narrower definition than
# that of zone1970.tab.
#
-# This table is intended as an aid for users, to help them select time
-# zone data entries appropriate for their practical needs. It is not
-# intended to take or endorse any position on legal or territorial claims.
+# This table is intended as an aid for users, to help them select timezones
+# appropriate for their practical needs. It is not intended to take or
+# endorse any position on legal or territorial claims.
#
#country-
#code coordinates TZ comments
@@ -291,7 +291,7 @@
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
-MO +2214+11335 Asia/Macau
+MO +221150+1133230 Asia/Macau
MP +1512+14545 Pacific/Saipan
MQ +1436-06105 America/Martinique
MR +1806-01557 Africa/Nouakchott
--- a/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, 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
@@ -67,7 +67,7 @@
PROC_SRCS := $(filter %.java, $(call CacheFind, $(PROC_SRC_DIRS)))
-ALL_SRC_DIRS := $(wildcard $(SRC_DIR)/*/src)
+ALL_SRC_DIRS := $(SRC_DIR) $(wildcard $(SRC_DIR)/*/src)
SOURCEPATH := $(call PathList, $(ALL_SRC_DIRS))
PROCESSOR_JARS := \
@@ -81,23 +81,23 @@
ADD_EXPORTS := \
--add-modules jdk.internal.vm.ci \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.events=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspotvmconfig=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.inittimer=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.services=ALL-UNNAMED \
- --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=ALL-UNNAMED \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.events=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspotvmconfig=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.inittimer=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.services=jdk.internal.vm.compiler \
+ --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \
#
$(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) $(PROCESSOR_JARS)
@@ -121,6 +121,7 @@
################################################################################
$(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
+ $(ECHO) "" > $@;
($(CD) $(GENSRC_DIR)/META-INF/providers && \
p=""; \
impl=""; \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/gensrc/Gensrc-jdk.internal.vm.compiler.management.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,101 @@
+#
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+
+GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)
+SRC_DIR := $(TOPDIR)/src/$(MODULE)/share/classes
+
+################################################################################
+
+PROC_SRC_SUBDIRS := \
+ org.graalvm.compiler.hotspot.management \
+ #
+
+PROC_SRC_DIRS := $(patsubst %, $(SRC_DIR)/%/src, $(PROC_SRC_SUBDIRS))
+
+PROC_SRCS := $(filter %.java, $(call CacheFind, $(PROC_SRC_DIRS)))
+
+ALL_SRC_DIRS := $(SRC_DIR) $(wildcard $(SRC_DIR)/*/src)
+SOURCEPATH := $(call PathList, $(ALL_SRC_DIRS))
+
+PROCESSOR_JARS := \
+ $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar \
+ #
+PROCESSOR_PATH := $(call PathList, $(PROCESSOR_JARS))
+
+$(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) $(PROCESSOR_JARS)
+ $(call MakeDir, $(@D))
+ $(eval $(call ListPathsSafely,PROC_SRCS,$(@D)/_gensrc_proc_files))
+ $(JAVA) $(NEW_JAVAC) \
+ -XDignore.symbol.file \
+ --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none \
+ -sourcepath $(SOURCEPATH) \
+ -implicit:none \
+ -proc:only \
+ -processorpath $(PROCESSOR_PATH) \
+ -d $(GENSRC_DIR) \
+ -s $(GENSRC_DIR) \
+ @$(@D)/_gensrc_proc_files
+ $(TOUCH) $@
+
+TARGETS += $(GENSRC_DIR)/_gensrc_proc_done
+
+################################################################################
+
+$(GENSRC_DIR)/module-info.java.extra: $(GENSRC_DIR)/_gensrc_proc_done
+ $(ECHO) "" > $@;
+ ($(CD) $(GENSRC_DIR)/META-INF/providers && \
+ p=""; \
+ impl=""; \
+ for i in $$($(GREP) '^' * | $(SORT) -t ':' -k 2 | $(SED) 's/:.*//'); do \
+ c=$$($(CAT) $$i | $(TR) -d '\n\r'); \
+ if test x$$p != x$$c; then \
+ if test x$$p != x; then \
+ $(ECHO) " ;" >> $@; \
+ fi; \
+ $(ECHO) "provides $$c with" >> $@; \
+ p=$$c; \
+ impl=""; \
+ fi; \
+ if test x$$impl != x; then \
+ $(ECHO) " , $$i" >> $@; \
+ else \
+ $(ECHO) " $$i" >> $@; \
+ fi; \
+ impl=$$i; \
+ done); \
+ $(ECHO) " ;" >> $@;
+
+TARGETS += $(GENSRC_DIR)/module-info.java.extra
+
+################################################################################
+
+all: $(TARGETS)
+
+.PHONY: default all
--- a/make/hotspot/symbols/symbols-unix Mon Nov 12 10:55:49 2018 +0530
+++ b/make/hotspot/symbols/symbols-unix Mon Nov 12 11:10:16 2018 +0530
@@ -52,7 +52,6 @@
JVM_DefineClass
JVM_DefineClassWithSource
JVM_DesiredAssertionStatus
-JVM_DoPrivileged
JVM_DumpAllStacks
JVM_DumpThreads
JVM_FillInStackTrace
--- a/make/launcher/Launcher-java.base.gmk Mon Nov 12 10:55:49 2018 +0530
+++ b/make/launcher/Launcher-java.base.gmk Mon Nov 12 11:10:16 2018 +0530
@@ -84,7 +84,7 @@
################################################################################
-ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
+ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix linux), )
$(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \
NAME := jspawnhelper, \
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
--- a/src/hotspot/.mx.jvmci/suite.py Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/.mx.jvmci/suite.py Mon Nov 12 11:10:16 2018 +0530
@@ -43,6 +43,9 @@
"jdk.vm.ci.services" : {
"subDir" : "../jdk.internal.vm.ci/share/classes",
"sourceDirs" : ["src"],
+ "imports" : [
+ "jdk.internal.misc"
+ ],
"javaCompliance" : "9+",
"checkstyleVersion" : "8.8",
"workingSets" : "API,JVMCI",
--- a/src/hotspot/cpu/aarch64/aarch64.ad Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/aarch64.ad Mon Nov 12 11:10:16 2018 +0530
@@ -1036,7 +1036,7 @@
}
};
- bool is_CAS(int opcode);
+ bool is_CAS(int opcode, bool maybe_volatile);
// predicates controlling emit of ldr<x>/ldar<x> and associated dmb
@@ -1259,12 +1259,12 @@
// relevant dmb instructions.
//
- // is_CAS(int opcode)
+ // is_CAS(int opcode, bool maybe_volatile)
//
// return true if opcode is one of the possible CompareAndSwapX
// values otherwise false.
- bool is_CAS(int opcode)
+ bool is_CAS(int opcode, bool maybe_volatile)
{
switch(opcode) {
// We handle these
@@ -1272,23 +1272,28 @@
case Op_CompareAndSwapL:
case Op_CompareAndSwapP:
case Op_CompareAndSwapN:
- // case Op_CompareAndSwapB:
- // case Op_CompareAndSwapS:
+ case Op_CompareAndSwapB:
+ case Op_CompareAndSwapS:
+ case Op_GetAndSetI:
+ case Op_GetAndSetL:
+ case Op_GetAndSetP:
+ case Op_GetAndSetN:
+ case Op_GetAndAddI:
+ case Op_GetAndAddL:
return true;
- // These are TBD
+ case Op_CompareAndExchangeI:
+ case Op_CompareAndExchangeN:
+ case Op_CompareAndExchangeB:
+ case Op_CompareAndExchangeS:
+ case Op_CompareAndExchangeL:
+ case Op_CompareAndExchangeP:
case Op_WeakCompareAndSwapB:
case Op_WeakCompareAndSwapS:
case Op_WeakCompareAndSwapI:
case Op_WeakCompareAndSwapL:
case Op_WeakCompareAndSwapP:
case Op_WeakCompareAndSwapN:
- case Op_CompareAndExchangeB:
- case Op_CompareAndExchangeS:
- case Op_CompareAndExchangeI:
- case Op_CompareAndExchangeL:
- case Op_CompareAndExchangeP:
- case Op_CompareAndExchangeN:
- return false;
+ return maybe_volatile;
default:
return false;
}
@@ -1318,7 +1323,7 @@
if (mb->trailing_load_store()) {
Node* load_store = mb->in(MemBarNode::Precedent);
assert(load_store->is_LoadStore(), "unexpected graph shape");
- return is_CAS(load_store->Opcode());
+ return is_CAS(load_store->Opcode(), true);
}
return false;
@@ -1365,7 +1370,7 @@
} else {
assert(mem->is_LoadStore(), "");
assert(trailing_mb->Opcode() == Op_MemBarAcquire, "");
- return is_CAS(mem->Opcode());
+ return is_CAS(mem->Opcode(), true);
}
}
return false;
@@ -1416,13 +1421,17 @@
bool needs_acquiring_load_exclusive(const Node *n)
{
- assert(is_CAS(n->Opcode()), "expecting a compare and swap");
+ assert(is_CAS(n->Opcode(), true), "expecting a compare and swap");
if (UseBarriersForVolatile) {
return false;
}
LoadStoreNode* ldst = n->as_LoadStore();
- assert(ldst->trailing_membar() != NULL, "expected trailing membar");
+ if (is_CAS(n->Opcode(), false)) {
+ assert(ldst->trailing_membar() != NULL, "expected trailing membar");
+ } else {
+ return ldst->trailing_membar() != NULL;
+ }
// so we can just return true here
return true;
@@ -2943,6 +2952,21 @@
/*weak*/ false, noreg);
%}
+ enc_class aarch64_enc_cmpxchgs_acq(memory mem, iRegINoSp oldval, iRegINoSp newval) %{
+ MacroAssembler _masm(&cbuf);
+ guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
+ __ cmpxchg($mem$$base$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::halfword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, noreg);
+ %}
+
+ enc_class aarch64_enc_cmpxchgb_acq(memory mem, iRegINoSp oldval, iRegINoSp newval) %{
+ MacroAssembler _masm(&cbuf);
+ guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
+ __ cmpxchg($mem$$base$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::byte, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, noreg);
+ %}
// auxiliary used for CompareAndSwapX to set result register
enc_class aarch64_enc_cset_eq(iRegINoSp res) %{
@@ -8240,6 +8264,44 @@
// alternative CompareAndSwapX when we are eliding barriers
+instruct compareAndSwapBAcq(iRegINoSp res, indirect mem, iRegINoSp oldval, iRegINoSp newval, rFlagsReg cr) %{
+
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndSwapB mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+
+ effect(KILL cr);
+
+ format %{
+ "cmpxchgb_acq $mem, $oldval, $newval\t# (int) if $mem == $oldval then $mem <-- $newval"
+ "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+
+ ins_encode(aarch64_enc_cmpxchgb_acq(mem, oldval, newval),
+ aarch64_enc_cset_eq(res));
+
+ ins_pipe(pipe_slow);
+%}
+
+instruct compareAndSwapSAcq(iRegINoSp res, indirect mem, iRegINoSp oldval, iRegINoSp newval, rFlagsReg cr) %{
+
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndSwapS mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+
+ effect(KILL cr);
+
+ format %{
+ "cmpxchgs_acq $mem, $oldval, $newval\t# (int) if $mem == $oldval then $mem <-- $newval"
+ "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+
+ ins_encode(aarch64_enc_cmpxchgs_acq(mem, oldval, newval),
+ aarch64_enc_cset_eq(res));
+
+ ins_pipe(pipe_slow);
+%}
+
instruct compareAndSwapIAcq(iRegINoSp res, indirect mem, iRegINoSp oldval, iRegINoSp newval, rFlagsReg cr) %{
predicate(needs_acquiring_load_exclusive(n));
@@ -8338,11 +8400,10 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(TEMP_DEF res, KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
- %}
- ins_encode %{
- __ uxtbw(rscratch2, $oldval$$Register);
- __ cmpxchg($mem$$Register, rscratch2, $newval$$Register,
+ "cmpxchgb $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
Assembler::byte, /*acquire*/ false, /*release*/ true,
/*weak*/ false, $res$$Register);
__ sxtbw($res$$Register, $res$$Register);
@@ -8355,11 +8416,10 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(TEMP_DEF res, KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
- %}
- ins_encode %{
- __ uxthw(rscratch2, $oldval$$Register);
- __ cmpxchg($mem$$Register, rscratch2, $newval$$Register,
+ "cmpxchgs $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
Assembler::halfword, /*acquire*/ false, /*release*/ true,
/*weak*/ false, $res$$Register);
__ sxthw($res$$Register, $res$$Register);
@@ -8372,7 +8432,7 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(TEMP_DEF res, KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgw $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
%}
ins_encode %{
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
@@ -8402,7 +8462,7 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(TEMP_DEF res, KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgw $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
%}
ins_encode %{
__ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
@@ -8427,17 +8487,116 @@
ins_pipe(pipe_slow);
%}
+instruct compareAndExchangeBAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeB mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchgb_acq $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::byte, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ __ sxtbw($res$$Register, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct compareAndExchangeSAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeS mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchgs_acq $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::halfword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ __ sxthw($res$$Register, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+
+instruct compareAndExchangeIAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeI mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchgw_acq $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::word, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct compareAndExchangeLAcq(iRegLNoSp res, indirect mem, iRegL oldval, iRegL newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeL mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchg_acq $res = $mem, $oldval, $newval\t# (long, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::xword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+
+instruct compareAndExchangeNAcq(iRegNNoSp res, indirect mem, iRegN oldval, iRegN newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeN mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchgw_acq $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::word, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct compareAndExchangePAcq(iRegPNoSp res, indirect mem, iRegP oldval, iRegP newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (CompareAndExchangeP mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(TEMP_DEF res, KILL cr);
+ format %{
+ "cmpxchg_acq $res = $mem, $oldval, $newval\t# (ptr, weak) if $mem == $oldval then $mem <-- $newval"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::xword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ false, $res$$Register);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
instruct weakCompareAndSwapB(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
match(Set res (WeakCompareAndSwapB mem (Binary oldval newval)));
ins_cost(2 * VOLATILE_REF_COST);
effect(KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgb $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
"csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
- __ uxtbw(rscratch2, $oldval$$Register);
- __ cmpxchg($mem$$Register, rscratch2, $newval$$Register,
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
Assembler::byte, /*acquire*/ false, /*release*/ true,
/*weak*/ true, noreg);
__ csetw($res$$Register, Assembler::EQ);
@@ -8450,12 +8609,11 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgs $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
"csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
- __ uxthw(rscratch2, $oldval$$Register);
- __ cmpxchg($mem$$Register, rscratch2, $newval$$Register,
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
Assembler::halfword, /*acquire*/ false, /*release*/ true,
/*weak*/ true, noreg);
__ csetw($res$$Register, Assembler::EQ);
@@ -8468,7 +8626,7 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgw $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
"csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
@@ -8502,7 +8660,7 @@
ins_cost(2 * VOLATILE_REF_COST);
effect(KILL cr);
format %{
- "cmpxchg $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
+ "cmpxchgw $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
"csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
%}
ins_encode %{
@@ -8531,11 +8689,120 @@
ins_pipe(pipe_slow);
%}
+instruct weakCompareAndSwapBAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapB mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchgb_acq $res = $mem, $oldval, $newval\t# (byte, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::byte, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct weakCompareAndSwapSAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapS mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchgs_acq $res = $mem, $oldval, $newval\t# (short, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::halfword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct weakCompareAndSwapIAcq(iRegINoSp res, indirect mem, iRegI oldval, iRegI newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapI mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchgw_acq $res = $mem, $oldval, $newval\t# (int, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::word, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct weakCompareAndSwapLAcq(iRegINoSp res, indirect mem, iRegL oldval, iRegL newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapL mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchg_acq $res = $mem, $oldval, $newval\t# (long, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::xword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct weakCompareAndSwapNAcq(iRegINoSp res, indirect mem, iRegN oldval, iRegN newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapN mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchgw_acq $res = $mem, $oldval, $newval\t# (narrow oop, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::word, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
+instruct weakCompareAndSwapPAcq(iRegINoSp res, indirect mem, iRegP oldval, iRegP newval, rFlagsReg cr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set res (WeakCompareAndSwapP mem (Binary oldval newval)));
+ ins_cost(VOLATILE_REF_COST);
+ effect(KILL cr);
+ format %{
+ "cmpxchg_acq $res = $mem, $oldval, $newval\t# (ptr, weak) if $mem == $oldval then $mem <-- $newval"
+ "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
+ %}
+ ins_encode %{
+ __ cmpxchg($mem$$Register, $oldval$$Register, $newval$$Register,
+ Assembler::xword, /*acquire*/ true, /*release*/ true,
+ /*weak*/ true, noreg);
+ __ csetw($res$$Register, Assembler::EQ);
+ %}
+ ins_pipe(pipe_slow);
+%}
+
// END This section of the file is automatically generated. Do not edit --------------
// ---------------------------------------------------------------------
instruct get_and_setI(indirect mem, iRegI newv, iRegINoSp prev) %{
match(Set prev (GetAndSetI mem newv));
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchgw $prev, $newv, [$mem]" %}
ins_encode %{
__ atomic_xchgw($prev$$Register, $newv$$Register, as_Register($mem$$base));
@@ -8545,6 +8812,7 @@
instruct get_and_setL(indirect mem, iRegL newv, iRegLNoSp prev) %{
match(Set prev (GetAndSetL mem newv));
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchg $prev, $newv, [$mem]" %}
ins_encode %{
__ atomic_xchg($prev$$Register, $newv$$Register, as_Register($mem$$base));
@@ -8554,6 +8822,7 @@
instruct get_and_setN(indirect mem, iRegN newv, iRegINoSp prev) %{
match(Set prev (GetAndSetN mem newv));
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchgw $prev, $newv, [$mem]" %}
ins_encode %{
__ atomic_xchgw($prev$$Register, $newv$$Register, as_Register($mem$$base));
@@ -8563,6 +8832,7 @@
instruct get_and_setP(indirect mem, iRegP newv, iRegPNoSp prev) %{
match(Set prev (GetAndSetP mem newv));
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "atomic_xchg $prev, $newv, [$mem]" %}
ins_encode %{
__ atomic_xchg($prev$$Register, $newv$$Register, as_Register($mem$$base));
@@ -8570,10 +8840,54 @@
ins_pipe(pipe_serial);
%}
+instruct get_and_setIAcq(indirect mem, iRegI newv, iRegINoSp prev) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set prev (GetAndSetI mem newv));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "atomic_xchgw_acq $prev, $newv, [$mem]" %}
+ ins_encode %{
+ __ atomic_xchgalw($prev$$Register, $newv$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_setLAcq(indirect mem, iRegL newv, iRegLNoSp prev) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set prev (GetAndSetL mem newv));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "atomic_xchg_acq $prev, $newv, [$mem]" %}
+ ins_encode %{
+ __ atomic_xchgal($prev$$Register, $newv$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_setNAcq(indirect mem, iRegN newv, iRegINoSp prev) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set prev (GetAndSetN mem newv));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "atomic_xchgw_acq $prev, $newv, [$mem]" %}
+ ins_encode %{
+ __ atomic_xchgalw($prev$$Register, $newv$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_setPAcq(indirect mem, iRegP newv, iRegPNoSp prev) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set prev (GetAndSetP mem newv));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "atomic_xchg_acq $prev, $newv, [$mem]" %}
+ ins_encode %{
+ __ atomic_xchgal($prev$$Register, $newv$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
instruct get_and_addL(indirect mem, iRegLNoSp newval, iRegL incr) %{
match(Set newval (GetAndAddL mem incr));
- ins_cost(INSN_COST * 10);
+ ins_cost(2 * VOLATILE_REF_COST + 1);
format %{ "get_and_addL $newval, [$mem], $incr" %}
ins_encode %{
__ atomic_add($newval$$Register, $incr$$Register, as_Register($mem$$base));
@@ -8584,7 +8898,7 @@
instruct get_and_addL_no_res(indirect mem, Universe dummy, iRegL incr) %{
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddL mem incr));
- ins_cost(INSN_COST * 9);
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "get_and_addL [$mem], $incr" %}
ins_encode %{
__ atomic_add(noreg, $incr$$Register, as_Register($mem$$base));
@@ -8594,7 +8908,7 @@
instruct get_and_addLi(indirect mem, iRegLNoSp newval, immLAddSub incr) %{
match(Set newval (GetAndAddL mem incr));
- ins_cost(INSN_COST * 10);
+ ins_cost(2 * VOLATILE_REF_COST + 1);
format %{ "get_and_addL $newval, [$mem], $incr" %}
ins_encode %{
__ atomic_add($newval$$Register, $incr$$constant, as_Register($mem$$base));
@@ -8605,7 +8919,7 @@
instruct get_and_addLi_no_res(indirect mem, Universe dummy, immLAddSub incr) %{
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddL mem incr));
- ins_cost(INSN_COST * 9);
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "get_and_addL [$mem], $incr" %}
ins_encode %{
__ atomic_add(noreg, $incr$$constant, as_Register($mem$$base));
@@ -8615,7 +8929,7 @@
instruct get_and_addI(indirect mem, iRegINoSp newval, iRegIorL2I incr) %{
match(Set newval (GetAndAddI mem incr));
- ins_cost(INSN_COST * 10);
+ ins_cost(2 * VOLATILE_REF_COST + 1);
format %{ "get_and_addI $newval, [$mem], $incr" %}
ins_encode %{
__ atomic_addw($newval$$Register, $incr$$Register, as_Register($mem$$base));
@@ -8626,7 +8940,7 @@
instruct get_and_addI_no_res(indirect mem, Universe dummy, iRegIorL2I incr) %{
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddI mem incr));
- ins_cost(INSN_COST * 9);
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "get_and_addI [$mem], $incr" %}
ins_encode %{
__ atomic_addw(noreg, $incr$$Register, as_Register($mem$$base));
@@ -8636,7 +8950,7 @@
instruct get_and_addIi(indirect mem, iRegINoSp newval, immIAddSub incr) %{
match(Set newval (GetAndAddI mem incr));
- ins_cost(INSN_COST * 10);
+ ins_cost(2 * VOLATILE_REF_COST + 1);
format %{ "get_and_addI $newval, [$mem], $incr" %}
ins_encode %{
__ atomic_addw($newval$$Register, $incr$$constant, as_Register($mem$$base));
@@ -8647,7 +8961,7 @@
instruct get_and_addIi_no_res(indirect mem, Universe dummy, immIAddSub incr) %{
predicate(n->as_LoadStore()->result_not_used());
match(Set dummy (GetAndAddI mem incr));
- ins_cost(INSN_COST * 9);
+ ins_cost(2 * VOLATILE_REF_COST);
format %{ "get_and_addI [$mem], $incr" %}
ins_encode %{
__ atomic_addw(noreg, $incr$$constant, as_Register($mem$$base));
@@ -8655,6 +8969,94 @@
ins_pipe(pipe_serial);
%}
+instruct get_and_addLAcq(indirect mem, iRegLNoSp newval, iRegL incr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set newval (GetAndAddL mem incr));
+ ins_cost(VOLATILE_REF_COST + 1);
+ format %{ "get_and_addL_acq $newval, [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addal($newval$$Register, $incr$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addL_no_resAcq(indirect mem, Universe dummy, iRegL incr) %{
+ predicate(n->as_LoadStore()->result_not_used() && needs_acquiring_load_exclusive(n));
+ match(Set dummy (GetAndAddL mem incr));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "get_and_addL_acq [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addal(noreg, $incr$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addLiAcq(indirect mem, iRegLNoSp newval, immLAddSub incr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set newval (GetAndAddL mem incr));
+ ins_cost(VOLATILE_REF_COST + 1);
+ format %{ "get_and_addL_acq $newval, [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addal($newval$$Register, $incr$$constant, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addLi_no_resAcq(indirect mem, Universe dummy, immLAddSub incr) %{
+ predicate(n->as_LoadStore()->result_not_used() && needs_acquiring_load_exclusive(n));
+ match(Set dummy (GetAndAddL mem incr));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "get_and_addL_acq [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addal(noreg, $incr$$constant, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addIAcq(indirect mem, iRegINoSp newval, iRegIorL2I incr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set newval (GetAndAddI mem incr));
+ ins_cost(VOLATILE_REF_COST + 1);
+ format %{ "get_and_addI_acq $newval, [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addalw($newval$$Register, $incr$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addI_no_resAcq(indirect mem, Universe dummy, iRegIorL2I incr) %{
+ predicate(n->as_LoadStore()->result_not_used() && needs_acquiring_load_exclusive(n));
+ match(Set dummy (GetAndAddI mem incr));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "get_and_addI_acq [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addalw(noreg, $incr$$Register, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addIiAcq(indirect mem, iRegINoSp newval, immIAddSub incr) %{
+ predicate(needs_acquiring_load_exclusive(n));
+ match(Set newval (GetAndAddI mem incr));
+ ins_cost(VOLATILE_REF_COST + 1);
+ format %{ "get_and_addI_acq $newval, [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addalw($newval$$Register, $incr$$constant, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
+instruct get_and_addIi_no_resAcq(indirect mem, Universe dummy, immIAddSub incr) %{
+ predicate(n->as_LoadStore()->result_not_used() && needs_acquiring_load_exclusive(n));
+ match(Set dummy (GetAndAddI mem incr));
+ ins_cost(VOLATILE_REF_COST);
+ format %{ "get_and_addI_acq [$mem], $incr" %}
+ ins_encode %{
+ __ atomic_addalw(noreg, $incr$$constant, as_Register($mem$$base));
+ %}
+ ins_pipe(pipe_serial);
+%}
+
// Manifest a CmpL result in an integer register.
// (src1 < src2) ? -1 : ((src1 > src2) ? 1 : 0)
instruct cmpL3_reg_reg(iRegINoSp dst, iRegL src1, iRegL src2, rFlagsReg flags)
--- a/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/compiledIC_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -179,10 +179,10 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
method_holder->set_data(0);
--- a/src/hotspot/cpu/aarch64/compiledIC_aot_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/compiledIC_aot_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -69,10 +69,10 @@
#ifdef NEVER_CALLED
void CompiledPltStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeLoadGot* method_loader = nativeLoadGot_at(stub);
NativeGotJump* jump = nativeGotJump_at(method_loader->next_instruction_address());
--- a/src/hotspot/cpu/aarch64/globals_aarch64.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/globals_aarch64.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -65,8 +65,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
define_pd_global(bool, PreserveFramePointer, false);
// GC Ergo Flags
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -288,10 +288,6 @@
return address(((uint64_t)insn_addr + (offset << 2)));
}
-void MacroAssembler::serialize_memory(Register thread, Register tmp) {
- dsb(Assembler::SY);
-}
-
void MacroAssembler::safepoint_poll(Label& slow_path) {
if (SafepointMechanism::uses_thread_local_poll()) {
ldr(rscratch1, Address(rthread, Thread::polling_page_offset()));
@@ -2367,21 +2363,18 @@
bool weak,
Register result) {
if (result == noreg) result = rscratch1;
+ BLOCK_COMMENT("cmpxchg {");
if (UseLSE) {
mov(result, expected);
lse_cas(result, new_val, addr, size, acquire, release, /*not_pair*/ true);
- cmp(result, expected);
+ compare_eq(result, expected, size);
} else {
- BLOCK_COMMENT("cmpxchg {");
Label retry_load, done;
if ((VM_Version::features() & VM_Version::CPU_STXR_PREFETCH))
prfm(Address(addr), PSTL1STRM);
bind(retry_load);
load_exclusive(result, addr, size, acquire);
- if (size == xword)
- cmp(result, expected);
- else
- cmpw(result, expected);
+ compare_eq(result, expected, size);
br(Assembler::NE, done);
store_exclusive(rscratch1, new_val, addr, size, release);
if (weak) {
@@ -2390,9 +2383,27 @@
cbnzw(rscratch1, retry_load);
}
bind(done);
- BLOCK_COMMENT("} cmpxchg");
}
-}
+ BLOCK_COMMENT("} cmpxchg");
+}
+
+// A generic comparison. Only compares for equality, clobbers rscratch1.
+void MacroAssembler::compare_eq(Register rm, Register rn, enum operand_size size) {
+ if (size == xword) {
+ cmp(rm, rn);
+ } else if (size == word) {
+ cmpw(rm, rn);
+ } else if (size == halfword) {
+ eorw(rscratch1, rm, rn);
+ ands(zr, rscratch1, 0xffff);
+ } else if (size == byte) {
+ eorw(rscratch1, rm, rn);
+ ands(zr, rscratch1, 0xff);
+ } else {
+ ShouldNotReachHere();
+ }
+}
+
static bool different(Register a, RegisterOrConstant b, Register c) {
if (b.is_constant())
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -582,6 +582,7 @@
virtual void null_check(Register reg, int offset = -1);
static bool needs_explicit_null_check(intptr_t offset);
+ static bool uses_implicit_null_check(void* address);
static address target_addr_for_insn(address insn_addr, unsigned insn);
static address target_addr_for_insn(address insn_addr) {
@@ -975,9 +976,6 @@
Register tmp,
int offset);
- // Support for serializing memory accesses between threads
- void serialize_memory(Register thread, Register tmp);
-
// Arithmetics
void addptr(const Address &dst, int32_t src);
@@ -1020,7 +1018,10 @@
enum operand_size size,
bool acquire, bool release, bool weak,
Register result);
+private:
+ void compare_eq(Register rn, Register rm, enum operand_size size);
+public:
// Calls
address trampoline_call(Address entry, CodeBuffer *cbuf = NULL);
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
+#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_aarch64.hpp"
#include "oops/oop.inline.hpp"
@@ -178,7 +179,8 @@
// during code generation, where no patching lock is needed.
void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
assert(!assert_lock ||
- (Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()),
+ (Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
+ CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");
ResourceMark rm;
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1950,21 +1950,10 @@
// didn't see any synchronization is progress, and escapes.
__ mov(rscratch1, _thread_in_native_trans);
- if (UseMembar) {
- __ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
-
- // Force this write out before the read below
- __ dmb(Assembler::ISH);
- } else {
- __ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
- __ stlrw(rscratch1, rscratch2);
-
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(rthread, r2);
- }
+ __ strw(rscratch1, Address(rthread, JavaThread::thread_state_offset()));
+
+ // Force this write out before the read below
+ __ dmb(Assembler::ISH);
// check for safepoint operation in progress and/or pending suspend requests
Label safepoint_in_progress, safepoint_in_progress_done;
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1394,16 +1394,8 @@
__ lea(rscratch2, Address(rthread, JavaThread::thread_state_offset()));
__ stlrw(rscratch1, rscratch2);
- if (UseMembar) {
- // Force this write out before the read below
- __ dmb(Assembler::ISH);
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(rthread, rscratch2);
- }
+ // Force this write out before the read below
+ __ dmb(Assembler::ISH);
// check for safepoint operation in progress and/or pending suspend requests
{
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -217,11 +217,6 @@
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
}
-#ifdef COMPILER2
- if (FLAG_IS_DEFAULT(UseFPUForSpilling)) {
- FLAG_SET_DEFAULT(UseFPUForSpilling, true);
- }
-#endif
}
// Cortex A53
--- a/src/hotspot/cpu/arm/compiledIC_arm.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/arm/compiledIC_arm.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -137,10 +137,10 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
--- a/src/hotspot/cpu/arm/globals_arm.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/arm/globals_arm.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -65,8 +65,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
define_pd_global(bool, PreserveFramePointer, false);
// GC Ergo Flags
--- a/src/hotspot/cpu/arm/macroAssembler_arm.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/arm/macroAssembler_arm.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -358,6 +358,7 @@
void zero_memory(Register start, Register end, Register tmp);
static bool needs_explicit_null_check(intptr_t offset);
+ static bool uses_implicit_null_check(void* address);
void arm_stack_overflow_check(int frame_size_in_bytes, Register tmp);
void arm_stack_overflow_check(Register Rsize, Register tmp);
@@ -1095,4 +1096,3 @@
#endif // CPU_ARM_VM_MACROASSEMBLER_ARM_HPP
-
--- a/src/hotspot/cpu/ppc/compiledIC_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/compiledIC_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -197,10 +197,10 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + IC_pos_in_java_to_interp_stub);
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
--- a/src/hotspot/cpu/ppc/globals_ppc.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/globals_ppc.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -69,8 +69,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
define_pd_global(bool, PreserveFramePointer, false);
// GC Ergo Flags
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1302,35 +1302,6 @@
#endif
}
-bool MacroAssembler::is_memory_serialization(int instruction, JavaThread* thread, void* ucontext) {
-#ifdef LINUX
- ucontext_t* uc = (ucontext_t*) ucontext;
-
- if (is_stwx(instruction) || is_stwux(instruction)) {
- int ra = inv_ra_field(instruction);
- int rb = inv_rb_field(instruction);
-
- // look up content of ra and rb in ucontext
- address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
- long rb_val=(long)uc->uc_mcontext.regs->gpr[rb];
- return os::is_memory_serialize_page(thread, ra_val+rb_val);
- } else if (is_stw(instruction) || is_stwu(instruction)) {
- int ra = inv_ra_field(instruction);
- int d1 = inv_d1_field(instruction);
-
- // look up content of ra in ucontext
- address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
- return os::is_memory_serialize_page(thread, ra_val+d1);
- } else {
- return false;
- }
-#else
- // workaround not needed on !LINUX :-)
- ShouldNotCallThis();
- return false;
-#endif
-}
-
void MacroAssembler::bang_stack_with_offset(int offset) {
// When increasing the stack, the old stack pointer will be written
// to the new top of stack according to the PPC64 abi.
@@ -3046,27 +3017,6 @@
// flag == NE indicates failure
}
-// Write serialization page so VM thread can do a pseudo remote membar.
-// We use the current thread pointer to calculate a thread specific
-// offset to write to within the page. This minimizes bus traffic
-// due to cache line collision.
-void MacroAssembler::serialize_memory(Register thread, Register tmp1, Register tmp2) {
- srdi(tmp2, thread, os::get_serialize_page_shift_count());
-
- int mask = os::vm_page_size() - sizeof(int);
- if (Assembler::is_simm(mask, 16)) {
- andi(tmp2, tmp2, mask);
- } else {
- lis(tmp1, (int)((signed short) (mask >> 16)));
- ori(tmp1, tmp1, mask & 0x0000ffff);
- andr(tmp2, tmp2, tmp1);
- }
-
- load_const(tmp1, (long) os::get_memory_serialize_page());
- release();
- stwx(R0, tmp1, tmp2);
-}
-
void MacroAssembler::safepoint_poll(Label& slow_path, Register temp_reg) {
if (SafepointMechanism::uses_thread_local_poll()) {
ld(temp_reg, in_bytes(Thread::polling_page_offset()), R16_thread);
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -395,11 +395,6 @@
static bool is_load_from_polling_page(int instruction, void* ucontext/*may be NULL*/,
address* polling_address_ptr = NULL);
- // Check whether instruction is a write access to the memory
- // serialization page realized by one of the instructions stw, stwu,
- // stwx, or stwux.
- static bool is_memory_serialization(int instruction, JavaThread* thread, void* ucontext);
-
// Support for NULL-checks
//
// Generates code that causes a NULL OS exception if the content of reg is NULL.
@@ -645,9 +640,6 @@
Register tmp1, Register tmp2, Register tmp3,
bool try_bias = UseBiasedLocking, bool use_rtm = false);
- // Support for serializing memory accesses between threads
- void serialize_memory(Register thread, Register tmp1, Register tmp2);
-
// Check if safepoint requested and if so branch
void safepoint_poll(Label& slow_path, Register temp_reg);
@@ -667,6 +659,7 @@
void get_vm_result_2(Register metadata_result);
static bool needs_explicit_null_check(intptr_t offset);
+ static bool uses_implicit_null_check(void* address);
// Trap-instruction-based checks.
// Range checks can be distinguished from zero checks as they check 32 bit,
--- a/src/hotspot/cpu/ppc/nativeInst_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/nativeInst_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
+#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_ppc.hpp"
#include "oops/compressedOops.inline.hpp"
@@ -94,7 +95,8 @@
// during code generation, where no patching lock is needed.
void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
assert(!assert_lock ||
- (Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()),
+ (Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
+ CompiledICLocker::is_safe(addr_at(0)),
"concurrent code patching");
ResourceMark rm;
--- a/src/hotspot/cpu/ppc/nativeInst_ppc.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/nativeInst_ppc.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -100,12 +100,6 @@
return MacroAssembler::is_load_from_polling_page(long_at(0), NULL);
}
- bool is_memory_serialization(JavaThread *thread, void *ucontext) {
- // Is the current instruction a write access of thread to the
- // memory serialization page?
- return MacroAssembler::is_memory_serialization(long_at(0), thread, ucontext);
- }
-
address get_stack_bang_address(void *ucontext) {
// If long_at(0) is not a stack bang, return 0. Otherwise, return
// banged address.
--- a/src/hotspot/cpu/ppc/ppc.ad Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/ppc.ad Mon Nov 12 11:10:16 2018 +0530
@@ -7629,7 +7629,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_reg(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7642,7 +7642,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_imm(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7675,7 +7675,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_reg(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7688,7 +7688,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_imm(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7722,7 +7722,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_reg(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7735,7 +7735,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_imm(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7768,7 +7768,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_reg(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7781,7 +7781,7 @@
format %{ "CMOVE $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_imm(dst, crx, src, cmp) );
ins_pipe(pipe_class_default);
%}
@@ -7794,7 +7794,7 @@
format %{ "CMOVEF $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmovef);
Label done;
@@ -7816,7 +7816,7 @@
format %{ "CMOVEF $cmp, $crx, $dst, $src\n\t" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmovef);
Label done;
@@ -9277,7 +9277,7 @@
format %{ "CMOVE $dst, neg($src1), $crx" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmove);
Label done;
@@ -9340,7 +9340,7 @@
format %{ "CMOVE $dst, neg($src1), $crx" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT (InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmove);
Label done;
@@ -11114,7 +11114,7 @@
format %{ "cmovI $crx, $dst, $src" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode( enc_cmove_bso_stackSlotL(dst, crx, src) );
ins_pipe(pipe_class_default);
%}
@@ -11128,7 +11128,7 @@
format %{ "cmovI $crx, $dst, $src" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 12 : 8));
ins_encode( enc_cmove_bso_reg(dst, crx, src) );
ins_pipe(pipe_class_default);
%}
@@ -11383,7 +11383,7 @@
format %{ "cmovL $crx, $dst, $src" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_bso_stackSlotL(dst, crx, src) );
ins_pipe(pipe_class_default);
%}
@@ -11397,7 +11397,7 @@
format %{ "cmovL $crx, $dst, $src" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8);
+ size((false /* TODO: PPC PORT Compile::current()->do_hb_scheduling()*/ ? 12 : 8));
ins_encode( enc_cmove_bso_reg(dst, crx, src) );
ins_pipe(pipe_class_default);
%}
@@ -11890,7 +11890,7 @@
format %{ "cmovI $crx, $dst, -1, 0, +1" %}
// Worst case is branch + move + branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORTInsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 20 : 16);
+ size((false /* TODO: PPC PORTInsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 20 : 16));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmove);
Label done;
@@ -12229,7 +12229,7 @@
format %{ "cmov $crx" %}
// Worst case is branch + move + stop, no stop without scheduler.
- size(false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 16 : 12);
+ size((false /* TODO: PPC PORT(InsertEndGroupPPC64 && Compile::current()->do_hb_scheduling())*/ ? 16 : 12));
ins_encode %{
// TODO: PPC port $archOpcode(ppc64Opcode_cmovecr);
Label done;
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2430,16 +2430,8 @@
{
Label no_block, sync;
- if (UseMembar) {
- // Force this write out before the read below.
- __ fence();
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(R16_thread, r_temp_4, r_temp_5);
- }
+ // Force this write out before the read below.
+ __ fence();
Register sync_state_addr = r_temp_4;
Register sync_state = r_temp_5;
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1486,16 +1486,7 @@
__ li(R0/*thread_state*/, _thread_in_native_trans);
__ release();
__ stw(R0/*thread_state*/, thread_(thread_state));
- if (UseMembar) {
- __ fence();
- }
- // Write serialization page so that the VM thread can do a pseudo remote
- // membar. We use the current thread pointer to calculate a thread
- // specific offset to write to within the page. This minimizes bus
- // traffic due to cache line collision.
- else {
- __ serialize_memory(R16_thread, R11_scratch1, R12_scratch2);
- }
+ __ fence();
// Now before we return to java we must look for a current safepoint
// (a new safepoint can not start since we entered native_trans).
--- a/src/hotspot/cpu/s390/compiledIC_s390.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/compiledIC_s390.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -127,10 +127,10 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub + NativeCall::get_IC_pos_in_java_to_interp_stub());
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
--- a/src/hotspot/cpu/s390/globals_s390.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/globals_s390.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -71,8 +71,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
define_pd_global(bool, PreserveFramePointer, false);
// GC Ergo Flags
--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2685,33 +2685,6 @@
return 0;
}
-bool MacroAssembler::is_memory_serialization(int instruction, JavaThread* thread, void* ucontext) {
- ShouldNotCallThis();
- return false;
-}
-
-// Write serialization page so VM thread can do a pseudo remote membar
-// We use the current thread pointer to calculate a thread specific
-// offset to write to within the page. This minimizes bus traffic
-// due to cache line collision.
-void MacroAssembler::serialize_memory(Register thread, Register tmp1, Register tmp2) {
- assert_different_registers(tmp1, tmp2);
- z_sllg(tmp2, thread, os::get_serialize_page_shift_count());
- load_const_optimized(tmp1, (long) os::get_memory_serialize_page());
-
- int mask = os::get_serialize_page_mask();
- if (Immediate::is_uimm16(mask)) {
- z_nill(tmp2, mask);
- z_llghr(tmp2, tmp2);
- } else {
- z_nilf(tmp2, mask);
- z_llgfr(tmp2, tmp2);
- }
-
- z_release();
- z_st(Z_R0, 0, tmp2, tmp1);
-}
-
void MacroAssembler::safepoint_poll(Label& slow_path, Register temp_reg) {
if (SafepointMechanism::uses_thread_local_poll()) {
const Address poll_byte_addr(Z_thread, in_bytes(Thread::polling_page_offset()) + 7 /* Big Endian */);
--- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -635,13 +635,6 @@
// Extract poll register from instruction.
static uint get_poll_register(address instr_loc);
- // Check if instruction is a write access to the memory serialization page
- // realized by one of the instructions stw, stwu, stwx, or stwux.
- static bool is_memory_serialization(int instruction, JavaThread* thread, void* ucontext);
-
- // Support for serializing memory accesses between threads.
- void serialize_memory(Register thread, Register tmp1, Register tmp2);
-
// Check if safepoint requested and if so branch
void safepoint_poll(Label& slow_path, Register temp_reg);
@@ -779,6 +772,7 @@
void null_check(Register reg, Register tmp = Z_R0, int64_t offset = -1);
static bool needs_explicit_null_check(intptr_t offset); // Implemented in shared file ?!
+ static bool uses_implicit_null_check(void* address);
// Klass oop manipulations if compressed.
void encode_klass_not_null(Register dst, Register src = noreg);
--- a/src/hotspot/cpu/s390/nativeInst_s390.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/nativeInst_s390.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -104,12 +104,6 @@
return MacroAssembler::get_poll_register(addr_at(0));
}
- bool is_memory_serialization(JavaThread *thread, void *ucontext) {
- // Is the current instruction a write access of thread to the
- // memory serialization page?
- return MacroAssembler::is_memory_serialization(long_at(0), thread, ucontext);
- }
-
public:
// The output of __ breakpoint_trap().
--- a/src/hotspot/cpu/s390/s390.ad Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/s390.ad Mon Nov 12 11:10:16 2018 +0530
@@ -6480,7 +6480,7 @@
match(DivModI dst1src1 src2);
effect(KILL cr);
ins_cost(2 * DEFAULT_COST + BRANCH_COST);
- size(VM_Version::has_CompareBranch() ? 24 : 26);
+ size((VM_Version::has_CompareBranch() ? 24 : 26));
format %{ "DIVMODI ($dst1src1, $dst2) $src2" %}
ins_encode %{
Register d1s1 = $dst1src1$$Register;
@@ -6513,7 +6513,7 @@
match(Set dst (DivI src1 src2));
effect(KILL tmp, KILL cr);
ins_cost(2 * DEFAULT_COST + BRANCH_COST);
- size(VM_Version::has_CompareBranch() ? 20 : 22);
+ size((VM_Version::has_CompareBranch() ? 20 : 22));
format %{ "DIV_checked $dst, $src1,$src2\t # treats special case 0x80../-1" %}
ins_encode %{
Register a = $src1$$Register;
@@ -6564,7 +6564,7 @@
match(DivModL dst1src1 src2);
effect(KILL cr);
ins_cost(2 * DEFAULT_COST + BRANCH_COST);
- size(VM_Version::has_CompareBranch() ? 22 : 24);
+ size((VM_Version::has_CompareBranch() ? 22 : 24));
format %{ "DIVMODL ($dst1src1, $dst2) $src2" %}
ins_encode %{
Register d1s1 = $dst1src1$$Register;
@@ -6594,7 +6594,7 @@
match(Set dst (DivL dst src));
effect(KILL tmp, KILL cr);
ins_cost(2 * DEFAULT_COST + BRANCH_COST);
- size(VM_Version::has_CompareBranch() ? 18 : 20);
+ size((VM_Version::has_CompareBranch() ? 18 : 20));
format %{ "DIVG_checked $dst, $src\t # long, treats special case 0x80../-1" %}
ins_encode %{
Register b = $src$$Register;
--- a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2161,16 +2161,8 @@
save_native_result(masm, ret_type, workspace_slot_offset); // Make Z_R2 available as work reg.
- if (UseMembar) {
- // Force this write out before the read below.
- __ z_fence();
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(Z_thread, Z_R1, Z_R2);
- }
+ // Force this write out before the read below.
+ __ z_fence();
__ safepoint_poll(sync, Z_R1);
--- a/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/s390/templateInterpreterGenerator_s390.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1598,15 +1598,8 @@
// synchronization is progress, and escapes.
__ set_thread_state(_thread_in_native_trans);
- if (UseMembar) {
- __ z_fence();
- } else {
- // Write serialization page so VM thread can do a pseudo remote
- // membar. We use the current thread pointer to calculate a thread
- // specific offset to write to within the page. This minimizes bus
- // traffic due to cache line collision.
- __ serialize_memory(Z_thread, Z_R1, Z_R0);
- }
+ __ z_fence();
+
// Now before we return to java we must look for a current safepoint
// (a new safepoint can not start since we entered native_trans).
// We must check here because a current safepoint could be modifying
--- a/src/hotspot/cpu/sparc/compiledIC_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/compiledIC_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -124,10 +124,10 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeMovConstReg* method_holder = nativeMovConstReg_at(stub);
NativeJump* jump = nativeJump_at(method_holder->next_instruction_address());
--- a/src/hotspot/cpu/sparc/globals_sparc.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/globals_sparc.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -74,8 +74,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
define_pd_global(bool, PreserveFramePointer, false);
// GC Ergo Flags
--- a/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/macroAssembler_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -236,24 +236,6 @@
trap(ST_RESERVED_FOR_USER_0);
}
-// Write serialization page so VM thread can do a pseudo remote membar
-// We use the current thread pointer to calculate a thread specific
-// offset to write to within the page. This minimizes bus traffic
-// due to cache line collision.
-void MacroAssembler::serialize_memory(Register thread, Register tmp1, Register tmp2) {
- srl(thread, os::get_serialize_page_shift_count(), tmp2);
- if (Assembler::is_simm13(os::vm_page_size())) {
- and3(tmp2, (os::vm_page_size() - sizeof(int)), tmp2);
- }
- else {
- set((os::vm_page_size() - sizeof(int)), tmp1);
- and3(tmp2, tmp1, tmp2);
- }
- set(os::get_memory_serialize_page(), tmp1);
- st(G0, tmp1, tmp2);
-}
-
-
void MacroAssembler::safepoint_poll(Label& slow_path, bool a, Register thread_reg, Register temp_reg) {
if (SafepointMechanism::uses_thread_local_poll()) {
ldx(Address(thread_reg, Thread::polling_page_offset()), temp_reg, 0);
--- a/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/macroAssembler_sparc.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -575,6 +575,7 @@
void null_check(Register reg, int offset = -1);
static bool needs_explicit_null_check(intptr_t offset);
+ static bool uses_implicit_null_check(void* address);
// support for delayed instructions
MacroAssembler* delayed() { Assembler::delayed(); return this; }
@@ -951,9 +952,6 @@
void breakpoint_trap();
void breakpoint_trap(Condition c, CC cc);
- // Support for serializing memory accesses between threads
- void serialize_memory(Register thread, Register tmp1, Register tmp2);
-
void safepoint_poll(Label& slow_path, bool a, Register thread_reg, Register temp_reg);
// Stack frame creation/removal
--- a/src/hotspot/cpu/sparc/nativeInst_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/nativeInst_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.inline.hpp"
#include "code/codeCache.hpp"
+#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_sparc.hpp"
#include "oops/oop.inline.hpp"
@@ -189,8 +190,9 @@
//
// Used in the runtime linkage of calls; see class CompiledIC.
void NativeCall::set_destination_mt_safe(address dest) {
- assert(Patching_lock->is_locked() ||
- SafepointSynchronize::is_at_safepoint(), "concurrent code patching");
+ assert((Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
+ CompiledICLocker::is_safe(addr_at(0)),
+ "concurrent code patching");
// set_destination uses set_long_at which does the ICache::invalidate
set_destination(dest);
}
--- a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2372,16 +2372,8 @@
__ set(_thread_in_native_trans, G3_scratch);
__ st(G3_scratch, G2_thread, JavaThread::thread_state_offset());
- if (UseMembar) {
- // Force this write out before the read below
- __ membar(Assembler::StoreLoad);
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(G2_thread, G1_scratch, G3_scratch);
- }
+ // Force this write out before the read below
+ __ membar(Assembler::StoreLoad);
Label L;
Address suspend_state(G2_thread, JavaThread::suspend_flags_offset());
--- a/src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/sparc/templateInterpreterGenerator_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1374,16 +1374,8 @@
__ set(_thread_in_native_trans, G3_scratch);
__ st(G3_scratch, thread_state);
- if (UseMembar) {
- // Force this write out before the read below
- __ membar(Assembler::StoreLoad);
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(G2_thread, G1_scratch, G3_scratch);
- }
+ // Force this write out before the read below
+ __ membar(Assembler::StoreLoad);
Label L;
__ safepoint_poll(L, false, G2_thread, G3_scratch);
--- a/src/hotspot/cpu/x86/compiledIC_aot_x86_64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/compiledIC_aot_x86_64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -88,10 +88,10 @@
#ifdef NEVER_CALLED
void CompiledPltStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
+ assert(CompiledICLocker::is_safe(stub), "mt unsafe call");
// Creation also verifies the object.
NativeLoadGot* method_loader = nativeLoadGot_at(stub);
NativeGotJump* jump = nativeGotJump_at(method_loader->next_instruction_address());
--- a/src/hotspot/cpu/x86/compiledIC_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/compiledIC_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -177,7 +177,7 @@
}
void CompiledDirectStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
+ assert(CompiledICLocker::is_safe(static_stub->addr()), "mt unsafe call");
// Reset stub.
address stub = static_stub->addr();
assert(stub != NULL, "stub not found");
--- a/src/hotspot/cpu/x86/globals_x86.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/globals_x86.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -84,8 +84,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
// GC Ergo Flags
define_pd_global(size_t, CMSYoungGenPerWorker, 64*M); // default max size of CMS young gen, per GC worker thread
--- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -3517,22 +3517,6 @@
else if (tmp != rax) mov(tmp, rax);
}
-// Write serialization page so VM thread can do a pseudo remote membar.
-// We use the current thread pointer to calculate a thread specific
-// offset to write to within the page. This minimizes bus traffic
-// due to cache line collision.
-void MacroAssembler::serialize_memory(Register thread, Register tmp) {
- movl(tmp, thread);
- shrl(tmp, os::get_serialize_page_shift_count());
- andl(tmp, (os::vm_page_size() - sizeof(int)));
-
- Address index(noreg, tmp, Address::times_1);
- ExternalAddress page(os::get_memory_serialize_page());
-
- // Size of store must match masking code above
- movl(as_Address(ArrayAddress(page, index)), tmp);
-}
-
void MacroAssembler::safepoint_poll(Label& slow_path, Register thread_reg, Register temp_reg) {
if (SafepointMechanism::uses_thread_local_poll()) {
#ifdef _LP64
--- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -96,6 +96,7 @@
void null_check(Register reg, int offset = -1);
static bool needs_explicit_null_check(intptr_t offset);
+ static bool uses_implicit_null_check(void* address);
// Required platform-specific helpers for Label::patch_instructions.
// They _shadow_ the declarations in AbstractAssembler, which are undefined.
@@ -644,9 +645,6 @@
Register tmp,
int offset);
- // Support for serializing memory accesses between threads
- void serialize_memory(Register thread, Register tmp);
-
// If thread_reg is != noreg the code assumes the register passed contains
// the thread (required on 64 bit).
void safepoint_poll(Label& slow_path, Register thread_reg, Register temp_reg);
--- a/src/hotspot/cpu/x86/nativeInst_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/nativeInst_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
+#include "code/compiledIC.hpp"
#include "memory/resourceArea.hpp"
#include "nativeInst_x86.hpp"
#include "oops/oop.inline.hpp"
@@ -257,8 +258,8 @@
debug_only(verify());
// Make sure patching code is locked. No two threads can patch at the same
// time but one may be executing this code.
- assert(Patching_lock->is_locked() ||
- SafepointSynchronize::is_at_safepoint(), "concurrent code patching");
+ assert(Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint() ||
+ CompiledICLocker::is_safe(instruction_address()), "concurrent code patching");
// Both C1 and C2 should now be generating code which aligns the patched address
// to be within a single cache line.
bool is_aligned = ((uintptr_t)displacement_address() + 0) / cache_line_size ==
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2088,18 +2088,10 @@
// didn't see any synchronization is progress, and escapes.
__ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_native_trans);
- if (UseMembar) {
- // Force this write out before the read below
- __ membar(Assembler::Membar_mask_bits(
- Assembler::LoadLoad | Assembler::LoadStore |
- Assembler::StoreLoad | Assembler::StoreStore));
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(thread, rcx);
- }
+ // Force this write out before the read below
+ __ membar(Assembler::Membar_mask_bits(
+ Assembler::LoadLoad | Assembler::LoadStore |
+ Assembler::StoreLoad | Assembler::StoreStore));
if (AlwaysRestoreFPU) {
// Make sure the control word is correct.
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2560,18 +2560,10 @@
// didn't see any synchronization is progress, and escapes.
__ movl(Address(r15_thread, JavaThread::thread_state_offset()), _thread_in_native_trans);
- if (UseMembar) {
- // Force this write out before the read below
- __ membar(Assembler::Membar_mask_bits(
- Assembler::LoadLoad | Assembler::LoadStore |
- Assembler::StoreLoad | Assembler::StoreStore));
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(r15_thread, rcx);
- }
+ // Force this write out before the read below
+ __ membar(Assembler::Membar_mask_bits(
+ Assembler::LoadLoad | Assembler::LoadStore |
+ Assembler::StoreLoad | Assembler::StoreStore));
Label after_transition;
--- a/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1090,18 +1090,10 @@
__ movl(Address(thread, JavaThread::thread_state_offset()),
_thread_in_native_trans);
- if (UseMembar) {
- // Force this write out before the read below
- __ membar(Assembler::Membar_mask_bits(
- Assembler::LoadLoad | Assembler::LoadStore |
- Assembler::StoreLoad | Assembler::StoreStore));
- } else {
- // Write serialization page so VM thread can do a pseudo remote membar.
- // We use the current thread pointer to calculate a thread specific
- // offset to write to within the page. This minimizes bus traffic
- // due to cache line collision.
- __ serialize_memory(thread, rcx);
- }
+ // Force this write out before the read below
+ __ membar(Assembler::Membar_mask_bits(
+ Assembler::LoadLoad | Assembler::LoadStore |
+ Assembler::StoreLoad | Assembler::StoreStore));
#ifndef _LP64
if (AlwaysRestoreFPU) {
--- a/src/hotspot/cpu/x86/x86_64.ad Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/x86/x86_64.ad Mon Nov 12 11:10:16 2018 +0530
@@ -9263,6 +9263,18 @@
%}
// And Memory with Register
+instruct andB_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
+%{
+ match(Set dst (StoreB dst (AndI (LoadB dst) src)));
+ effect(KILL cr);
+
+ ins_cost(150);
+ format %{ "andb $dst, $src\t# byte" %}
+ opcode(0x20);
+ ins_encode(REX_breg_mem(src, dst), OpcP, reg_mem(src, dst));
+ ins_pipe(ialu_mem_reg);
+%}
+
instruct andI_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
%{
match(Set dst (StoreI dst (AndI (LoadI dst) src)));
@@ -9444,6 +9456,18 @@
%}
// Or Memory with Register
+instruct orB_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
+%{
+ match(Set dst (StoreB dst (OrI (LoadB dst) src)));
+ effect(KILL cr);
+
+ ins_cost(150);
+ format %{ "orb $dst, $src\t# byte" %}
+ opcode(0x08);
+ ins_encode(REX_breg_mem(src, dst), OpcP, reg_mem(src, dst));
+ ins_pipe(ialu_mem_reg);
+%}
+
instruct orI_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
%{
match(Set dst (StoreI dst (OrI (LoadI dst) src)));
@@ -9520,6 +9544,18 @@
%}
// Xor Memory with Register
+instruct xorB_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
+%{
+ match(Set dst (StoreB dst (XorI (LoadB dst) src)));
+ effect(KILL cr);
+
+ ins_cost(150);
+ format %{ "xorb $dst, $src\t# byte" %}
+ opcode(0x30);
+ ins_encode(REX_breg_mem(src, dst), OpcP, reg_mem(src, dst));
+ ins_pipe(ialu_mem_reg);
+%}
+
instruct xorI_mem_rReg(memory dst, rRegI src, rFlagsReg cr)
%{
match(Set dst (StoreI dst (XorI (LoadI dst) src)));
@@ -11889,9 +11925,9 @@
ins_pipe(ialu_cr_reg_mem);
%}
-instruct testB_mem_imm(rFlagsReg cr, memory mem, immI8 imm, immI0 zero)
-%{
- match(Set cr (CmpI (AndI (LoadB mem) imm) zero));
+instruct testUB_mem_imm(rFlagsReg cr, memory mem, immU8 imm, immI0 zero)
+%{
+ match(Set cr (CmpI (AndI (LoadUB mem) imm) zero));
ins_cost(125);
format %{ "testb $mem, $imm" %}
--- a/src/hotspot/cpu/zero/assembler_zero.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/zero/assembler_zero.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -47,6 +47,7 @@
void align(int modulus);
void bang_stack_with_offset(int offset);
bool needs_explicit_null_check(intptr_t offset);
+ bool uses_implicit_null_check(void* address);
RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
Register tmp, int offset);
public:
--- a/src/hotspot/cpu/zero/cppInterpreter_zero.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/zero/cppInterpreter_zero.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -381,7 +381,7 @@
// Handle safepoint operations, pending suspend requests,
// and pending asynchronous exceptions.
- if (SafepointMechanism::poll(thread) ||
+ if (SafepointMechanism::should_block(thread) ||
thread->has_special_condition_for_native_trans()) {
JavaThread::check_special_condition_for_native_trans(thread);
CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops());
@@ -513,7 +513,7 @@
intptr_t *locals = stack->sp();
// Drop into the slow path if we need a safepoint check
- if (SafepointMechanism::poll(THREAD)) {
+ if (SafepointMechanism::should_block(THREAD)) {
return normal_entry(method, 0, THREAD);
}
@@ -645,7 +645,7 @@
ZeroStack *stack = thread->zero_stack();
// Drop into the slow path if we need a safepoint check
- if (SafepointMechanism::poll(THREAD)) {
+ if (SafepointMechanism::should_block(THREAD)) {
return normal_entry(method, 0, THREAD);
}
--- a/src/hotspot/cpu/zero/globals_zero.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/cpu/zero/globals_zero.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -69,8 +69,6 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
-define_pd_global(bool, UseMembar, true);
-
// GC Ergo Flags
define_pd_global(size_t, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread
--- a/src/hotspot/os/linux/os_linux.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os/linux/os_linux.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -5956,14 +5956,6 @@
#ifndef PRODUCT
-#define test_log(...) \
- do { \
- if (VerboseInternalVMTests) { \
- tty->print_cr(__VA_ARGS__); \
- tty->flush(); \
- } \
- } while (false)
-
class TestReserveMemorySpecial : AllStatic {
public:
static void small_page_write(void* addr, size_t size) {
@@ -5980,8 +5972,6 @@
return;
}
- test_log("test_reserve_memory_special_huge_tlbfs_only(" SIZE_FORMAT ")", size);
-
char* addr = os::Linux::reserve_memory_special_huge_tlbfs_only(size, NULL, false);
if (addr != NULL) {
@@ -6040,15 +6030,10 @@
::munmap(mapping1, mapping_size);
// Case 1
- test_log("%s, req_addr NULL:", __FUNCTION__);
- test_log("size align result");
-
for (int i = 0; i < num_sizes; i++) {
const size_t size = sizes[i];
for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) {
char* p = os::Linux::reserve_memory_special_huge_tlbfs_mixed(size, alignment, NULL, false);
- test_log(SIZE_FORMAT_HEX " " SIZE_FORMAT_HEX " -> " PTR_FORMAT " %s",
- size, alignment, p2i(p), (p != NULL ? "" : "(failed)"));
if (p != NULL) {
assert(is_aligned(p, alignment), "must be");
small_page_write(p, size);
@@ -6058,17 +6043,11 @@
}
// Case 2
- test_log("%s, req_addr non-NULL:", __FUNCTION__);
- test_log("size align req_addr result");
-
for (int i = 0; i < num_sizes; i++) {
const size_t size = sizes[i];
for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) {
char* const req_addr = align_up(mapping1, alignment);
char* p = os::Linux::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false);
- test_log(SIZE_FORMAT_HEX " " SIZE_FORMAT_HEX " " PTR_FORMAT " -> " PTR_FORMAT " %s",
- size, alignment, p2i(req_addr), p2i(p),
- ((p != NULL ? (p == req_addr ? "(exact match)" : "") : "(failed)")));
if (p != NULL) {
assert(p == req_addr, "must be");
small_page_write(p, size);
@@ -6078,16 +6057,11 @@
}
// Case 3
- test_log("%s, req_addr non-NULL with preexisting mapping:", __FUNCTION__);
- test_log("size align req_addr result");
-
for (int i = 0; i < num_sizes; i++) {
const size_t size = sizes[i];
for (size_t alignment = ag; is_aligned(size, alignment); alignment *= 2) {
char* const req_addr = align_up(mapping2, alignment);
char* p = os::Linux::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false);
- test_log(SIZE_FORMAT_HEX " " SIZE_FORMAT_HEX " " PTR_FORMAT " -> " PTR_FORMAT " %s",
- size, alignment, p2i(req_addr), p2i(p), ((p != NULL ? "" : "(failed)")));
// as the area around req_addr contains already existing mappings, the API should always
// return NULL (as per contract, it cannot return another address)
assert(p == NULL, "must be");
@@ -6112,8 +6086,6 @@
return;
}
- test_log("test_reserve_memory_special_shm(" SIZE_FORMAT ", " SIZE_FORMAT ")", size, alignment);
-
char* addr = os::Linux::reserve_memory_special_shm(size, alignment, NULL, false);
if (addr != NULL) {
--- a/src/hotspot/os/posix/os_posix.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os/posix/os_posix.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -130,11 +130,6 @@
#endif
};
-// On POSIX platforms the signal handler is global so we just do the write.
-static void write_memory_serialize_page_with_handler(JavaThread* thread) {
- write_memory_serialize_page(thread);
-}
-
/*
* Crash protection for the watcher thread. Wrap the callback
* with a sigsetjmp and in case of a SIGSEGV/SIGBUS we siglongjmp
--- a/src/hotspot/os/windows/os_windows.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os/windows/os_windows.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2414,23 +2414,6 @@
}
#endif // _WIN64
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so just return.
- if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
- if (t != NULL && t->is_Java_thread()) {
- JavaThread* thread = (JavaThread*) t;
- PEXCEPTION_RECORD exceptionRecord = exceptionInfo->ExceptionRecord;
- address addr = (address) exceptionRecord->ExceptionInformation[1];
- if (os::is_memory_serialize_page(thread, addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return EXCEPTION_CONTINUE_EXECUTION;
- }
- }
- }
-
if ((exception_code == EXCEPTION_ACCESS_VIOLATION) &&
VM_Version::is_cpuinfo_segv_addr(pc)) {
// Verify that OS save/restore AVX registers.
@@ -2509,7 +2492,7 @@
#endif
{
// Null pointer exception.
- if (!MacroAssembler::needs_explicit_null_check((intptr_t)addr)) {
+ if (MacroAssembler::uses_implicit_null_check((void*)addr)) {
address stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
if (stub != NULL) return Handle_Exception(exceptionInfo, stub);
}
@@ -5330,22 +5313,6 @@
return result;
}
-LONG WINAPI os::win32::serialize_fault_filter(struct _EXCEPTION_POINTERS* e) {
- DWORD exception_code = e->ExceptionRecord->ExceptionCode;
-
- if (exception_code == EXCEPTION_ACCESS_VIOLATION) {
- JavaThread* thread = JavaThread::current();
- PEXCEPTION_RECORD exceptionRecord = e->ExceptionRecord;
- address addr = (address) exceptionRecord->ExceptionInformation[1];
-
- if (os::is_memory_serialize_page(thread, addr)) {
- return EXCEPTION_CONTINUE_EXECUTION;
- }
- }
-
- return EXCEPTION_CONTINUE_SEARCH;
-}
-
static jint initSock() {
WSADATA wsadata;
@@ -5557,12 +5524,8 @@
// that is reported is when the test tries to allocate at a particular location but gets a
// different valid one. A NULL return value at this point is not considered an error but may
// be legitimate.
-// If -XX:+VerboseInternalVMTests is enabled, print some explanatory messages.
void TestReserveMemorySpecial_test() {
if (!UseLargePages) {
- if (VerboseInternalVMTests) {
- tty->print("Skipping test because large pages are disabled");
- }
return;
}
// save current value of globals
@@ -5576,10 +5539,6 @@
const size_t large_allocation_size = os::large_page_size() * 4;
char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false);
if (result == NULL) {
- if (VerboseInternalVMTests) {
- tty->print("Failed to allocate control block with size " SIZE_FORMAT ". Skipping remainder of test.",
- large_allocation_size);
- }
} else {
os::release_memory_special(result, large_allocation_size);
@@ -5589,10 +5548,6 @@
char* expected_location = result + os::large_page_size();
char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false);
if (actual_location == NULL) {
- if (VerboseInternalVMTests) {
- tty->print("Failed to allocate any memory at " PTR_FORMAT " size " SIZE_FORMAT ". Skipping remainder of test.",
- expected_location, large_allocation_size);
- }
} else {
// release memory
os::release_memory_special(actual_location, expected_allocation_size);
--- a/src/hotspot/os/windows/os_windows.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os/windows/os_windows.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -108,9 +108,6 @@
static address fast_jni_accessor_wrapper(BasicType);
#endif
- // filter function to ignore faults on serializations page
- static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e);
-
// Fast access to current thread
protected:
static int _thread_ptr_offset;
@@ -123,21 +120,6 @@
static inline int get_thread_ptr_offset() { return _thread_ptr_offset; }
};
-static void write_memory_serialize_page_with_handler(JavaThread* thread) {
- // Due to chained nature of SEH handlers we have to be sure
- // that our handler is always last handler before an attempt to write
- // into serialization page - it can fault if we access this page
- // right in the middle of protect/unprotect sequence by remote
- // membar logic.
- // __try/__except are very lightweight operations (only several
- // instructions not affecting control flow directly on x86)
- // so we can use it here, on very time critical path
- __try {
- write_memory_serialize_page(thread);
- } __except (win32::serialize_fault_filter((_EXCEPTION_POINTERS*)_exception_info()))
- {}
-}
-
/*
* Crash protection for the watcher thread. Wrap the callback
* with a __try { call() }
--- a/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -409,7 +409,7 @@
// SIGSEGV-based implicit null check in compiled code.
else if (sig == SIGSEGV && ImplicitNullChecks &&
CodeCache::contains((void*) pc) &&
- !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
if (TraceTraps) {
tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", pc);
}
@@ -469,18 +469,6 @@
return 1;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) &&
- os::is_memory_serialize_page(thread, addr)) {
- // Synchronization problem in the pseudo memory barrier code (bug id 6546278)
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
run_stub:
@@ -624,5 +612,3 @@
AixNativeCallstack::print_callstack_for_context(st, (const ucontext_t*)context, true, buf, (size_t) buf_size);
return true;
}
-
-
--- a/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -580,7 +580,7 @@
// 64-bit Darwin may also use a SIGBUS (seen with compressed oops).
// Catching SIGBUS here prevents the implicit SIGBUS NULL check below from
// being called, so only do so if the implicit NULL check is not necessary.
- } else if (sig == SIGBUS && MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ } else if (sig == SIGBUS && !MacroAssembler::uses_implicit_null_check(info->si_addr)) {
#else
} else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) {
#endif
@@ -655,7 +655,7 @@
}
#endif // AMD64
} else if ((sig == SIGSEGV || sig == SIGBUS) &&
- !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
@@ -674,17 +674,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV || sig == SIGBUS) &&
- os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
#ifndef AMD64
--- a/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -206,17 +206,6 @@
stub = addr;
}
}*/
-
- // Check to see if we caught the safepoint code in the process
- // of write protecting the memory serialization page. It write
- // enables the page immediately after protecting it so we can
- // just return to retry the write.
- if ((sig == SIGSEGV || sig == SIGBUS) &&
- os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until permission is restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
// signal-chaining
--- a/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -357,10 +357,15 @@
}
#endif
+ address addr = (address) info->si_addr;
+
+ // Make sure the high order byte is sign extended, as it may be masked away by the hardware.
+ if ((uintptr_t(addr) & (uintptr_t(1) << 55)) != 0) {
+ addr = address(uintptr_t(addr) | (uintptr_t(0xFF) << 56));
+ }
+
// Handle ALL stack overflow variations here
if (sig == SIGSEGV) {
- address addr = (address) info->si_addr;
-
// check if fault address is within thread stack
if (thread->on_local_stack(addr)) {
// stack overflow
@@ -456,7 +461,7 @@
SharedRuntime::
IMPLICIT_DIVIDE_BY_ZERO);
} else if (sig == SIGSEGV &&
- !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check((void*)addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
@@ -475,17 +480,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) &&
- os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
if (stub != NULL) {
--- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -384,7 +384,8 @@
if (nm != NULL && nm->has_unsafe_access()) {
unsafe_access = true;
}
- } else if (sig == SIGSEGV && !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ } else if (sig == SIGSEGV &&
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
if (cb != NULL) {
@@ -407,16 +408,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if (sig == SIGSEGV && os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
if (unsafe_access && stub == NULL) {
@@ -692,4 +683,3 @@
// ARM does not require an additional stack bang.
return 0;
}
-
--- a/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -431,7 +431,7 @@
// SIGSEGV-based implicit null check in compiled code.
else if (sig == SIGSEGV && ImplicitNullChecks &&
CodeCache::contains((void*) pc) &&
- !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
if (TraceTraps) {
tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
}
@@ -477,20 +477,6 @@
return true;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) &&
- // Si_addr may not be valid due to a bug in the linux-ppc64 kernel (see comment above).
- // Use is_memory_serialization instead of si_addr.
- ((NativeInstruction*)pc)->is_memory_serialization(thread, ucVoid)) {
- // Synchronization problem in the pseudo memory barrier code (bug id 6546278)
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
if (stub != NULL) {
--- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -418,7 +418,7 @@
else if (sig == SIGSEGV && ImplicitNullChecks &&
CodeCache::contains((void*) pc) &&
- !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
if (TraceTraps) {
tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
}
@@ -477,19 +477,6 @@
return true;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- // Info->si_addr need not be the exact address, it is only
- // guaranteed to be on the same page as the address that caused
- // the SIGSEGV.
- if ((sig == SIGSEGV) && !UseMembar &&
- (os::get_memory_serialize_page() ==
- (address)((uintptr_t)info->si_addr & ~(os::vm_page_size()-1)))) {
- return true;
- }
}
if (stub != NULL) {
--- a/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -416,9 +416,9 @@
return false;
}
-inline static bool checkNullPointer(address pc, intptr_t fault,
+inline static bool checkNullPointer(address pc, void* fault,
JavaThread* thread, address* stub) {
- if (!MacroAssembler::needs_explicit_null_check(fault)) {
+ if (MacroAssembler::uses_implicit_null_check(fault)) {
// Determination of interpreter/vtable stub/compiled code null
// exception
*stub =
@@ -439,10 +439,6 @@
return false;
}
-inline static bool checkSerializePage(JavaThread* thread, address addr) {
- return os::is_memory_serialize_page(thread, addr);
-}
-
inline static bool checkZombie(sigcontext* uc, address* pc, address* stub) {
if (nativeInstruction_at(*pc)->is_zombie()) {
// zombie method (ld [%g0],%o7 instruction)
@@ -542,16 +538,6 @@
pc = address(SIG_PC(uc));
npc = address(SIG_NPC(uc));
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) && checkSerializePage(thread, (address)info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return 1;
- }
-
if (checkPrefetch(uc, pc)) {
return 1;
}
@@ -600,7 +586,7 @@
}
if ((sig == SIGSEGV) &&
- checkNullPointer(pc, (intptr_t)info->si_addr, thread, &stub)) {
+ checkNullPointer(pc, info->si_addr, thread, &stub)) {
break;
}
} while (0);
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -479,7 +479,7 @@
}
#endif // AMD64
} else if (sig == SIGSEGV &&
- !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
@@ -498,17 +498,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) &&
- os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
#ifndef AMD64
--- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -220,17 +220,6 @@
stub = addr;
}
}*/
-
- // Check to see if we caught the safepoint code in the process
- // of write protecting the memory serialization page. It write
- // enables the page immediately after protecting it so we can
- // just return to retry the write.
- if (sig == SIGSEGV &&
- os::is_memory_serialize_page(thread, (address) info->si_addr)) {
- // Block current thread until permission is restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
// signal-chaining
--- a/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -505,7 +505,7 @@
}
#endif // COMPILER2
- else if (sig == SIGSEGV && info->si_code > 0 && !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ else if (sig == SIGSEGV && info->si_code > 0 && MacroAssembler::uses_implicit_null_check(info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
@@ -519,17 +519,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so just return.
- if ((sig == SIGSEGV) &&
- os::is_memory_serialize_page(thread, (address)info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
if (stub != NULL) {
--- a/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -579,7 +579,8 @@
// QQQ It doesn't seem that we need to do this on x86 because we should be able
// to return properly from the handler without this extra stuff on the back side.
- else if (sig == SIGSEGV && info->si_code > 0 && !MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
+ else if (sig == SIGSEGV && info->si_code > 0 &&
+ MacroAssembler::uses_implicit_null_check(info->si_addr)) {
// Determination of interpreter/vtable stub/compiled code null exception
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
@@ -593,17 +594,6 @@
stub = addr;
}
}
-
- // Check to see if we caught the safepoint code in the
- // process of write protecting the memory serialization page.
- // It write enables the page immediately after protecting it
- // so we can just return to retry the write.
- if ((sig == SIGSEGV) &&
- os::is_memory_serialize_page(thread, (address)info->si_addr)) {
- // Block current thread until the memory serialize page permission restored.
- os::block_on_serialize_page_trap();
- return true;
- }
}
// Execution protection violation
--- a/src/hotspot/share/aot/aotCodeHeap.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/aot/aotCodeHeap.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -926,7 +926,7 @@
continue; // Skip uninitialized entries.
}
AOTCompiledMethod* aot = _code_to_aot[index]._aot;
- aot->cleanup_inline_caches();
+ aot->cleanup_inline_caches(false);
}
}
--- a/src/hotspot/share/aot/aotCompiledMethod.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/aot/aotCompiledMethod.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -75,10 +75,6 @@
return (address*) ((address)fr->unextended_sp() + _meta->orig_pc_offset());
}
-bool AOTCompiledMethod::do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive) {
- return false;
-}
-
oop AOTCompiledMethod::oop_at(int index) const {
if (index == 0) { // 0 is reserved
return NULL;
@@ -352,7 +348,7 @@
log->print(" aot='%2d'", _heap->dso_id());
}
-void AOTCompiledMethod::log_state_change(oop cause) const {
+void AOTCompiledMethod::log_state_change() const {
if (LogCompilation) {
ResourceMark m;
if (xtty != NULL) {
--- a/src/hotspot/share/aot/aotCompiledMethod.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/aot/aotCompiledMethod.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -193,7 +193,7 @@
virtual int comp_level() const { return CompLevel_aot; }
virtual address verified_entry_point() const { return _code + _meta->verified_entry_offset(); }
virtual void log_identity(xmlStream* stream) const;
- virtual void log_state_change(oop cause = NULL) const;
+ virtual void log_state_change() const;
virtual bool make_entrant() NOT_TIERED({ ShouldNotReachHere(); return false; });
virtual bool make_not_entrant() { return make_not_entrant_helper(not_entrant); }
virtual bool make_not_used() { return make_not_entrant_helper(not_used); }
@@ -277,11 +277,6 @@
CompiledStaticCall* compiledStaticCall_before(address addr) const;
private:
bool is_aot_runtime_stub() const { return _method == NULL; }
-
-protected:
- virtual bool do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive);
- virtual bool do_unloading_jvmci() { return false; }
-
};
class PltNativeCallWrapper: public NativeCallWrapper {
--- a/src/hotspot/share/asm/assembler.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/asm/assembler.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -26,6 +26,7 @@
#include "asm/codeBuffer.hpp"
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
+#include "gc/shared/collectedHeap.hpp"
#include "runtime/atomic.hpp"
#include "runtime/icache.hpp"
#include "runtime/os.hpp"
@@ -307,21 +308,32 @@
return NULL;
}
-bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
+bool MacroAssembler::uses_implicit_null_check(void* address) {
// Exception handler checks the nmethod's implicit null checks table
// only when this method returns false.
+ intptr_t int_address = reinterpret_cast<intptr_t>(address);
+ intptr_t cell_header_size = Universe::heap()->cell_header_size();
+ size_t region_size = os::vm_page_size() + cell_header_size;
#ifdef _LP64
if (UseCompressedOops && Universe::narrow_oop_base() != NULL) {
- assert (Universe::heap() != NULL, "java heap should be initialized");
- // The first page after heap_base is unmapped and
- // the 'offset' is equal to [heap_base + offset] for
- // narrow oop implicit null checks.
- uintptr_t base = (uintptr_t)Universe::narrow_oop_base();
- if ((uintptr_t)offset >= base) {
- // Normalize offset for the next check.
- offset = (intptr_t)(pointer_delta((void*)offset, (void*)base, 1));
+ // A SEGV can legitimately happen in C2 code at address
+ // (heap_base + offset) if Matcher::narrow_oop_use_complex_address
+ // is configured to allow narrow oops field loads to be implicitly
+ // null checked
+ intptr_t start = ((intptr_t)Universe::narrow_oop_base()) - cell_header_size;
+ intptr_t end = start + region_size;
+ if (int_address >= start && int_address < end) {
+ return true;
}
}
#endif
- return offset < 0 || os::vm_page_size() <= offset;
+ intptr_t start = -cell_header_size;
+ intptr_t end = start + region_size;
+ return int_address >= start && int_address < end;
}
+
+bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
+ // Check if offset is outside of [-cell_header_size, os::vm_page_size)
+ return offset < -Universe::heap()->cell_header_size() ||
+ offset >= os::vm_page_size();
+}
--- a/src/hotspot/share/ci/ciInstanceKlass.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/ci/ciInstanceKlass.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -554,6 +554,12 @@
_has_injected_fields = has_injected_fields;
}
+bool ciInstanceKlass::has_object_fields() const {
+ GUARDED_VM_ENTRY(
+ return get_instanceKlass()->nonstatic_oop_map_size() > 0;
+ );
+}
+
// ------------------------------------------------------------------
// ciInstanceKlass::find_method
//
--- a/src/hotspot/share/ci/ciInstanceKlass.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/ci/ciInstanceKlass.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -202,6 +202,8 @@
return _has_injected_fields > 0 ? true : false;
}
+ bool has_object_fields() const;
+
// nth nonstatic field (presented by ascending address)
ciField* nonstatic_field_at(int i) {
assert(_nonstatic_fields != NULL, "");
--- a/src/hotspot/share/classfile/classFileParser.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/classFileParser.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1066,7 +1066,7 @@
_method_DontInline,
_method_InjectedProfile,
_method_LambdaForm_Compiled,
- _method_LambdaForm_Hidden,
+ _method_Hidden,
_method_HotSpotIntrinsicCandidate,
_jdk_internal_vm_annotation_Contended,
_field_Stable,
@@ -2121,7 +2121,12 @@
case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_LambdaForm_Hidden_signature): {
if (_location != _in_method) break; // only allow for methods
if (!privileged) break; // only allow in privileged code
- return _method_LambdaForm_Hidden;
+ return _method_Hidden;
+ }
+ case vmSymbols::VM_SYMBOL_ENUM_NAME(java_security_AccessController_Hidden_signature): {
+ if (_location != _in_method) break; // only allow for methods
+ if (!privileged) break; // only allow in privileged code
+ return _method_Hidden;
}
case vmSymbols::VM_SYMBOL_ENUM_NAME(jdk_internal_HotSpotIntrinsicCandidate_signature): {
if (_location != _in_method) break; // only allow for methods
@@ -2178,7 +2183,7 @@
m->set_has_injected_profile(true);
if (has_annotation(_method_LambdaForm_Compiled) && m->intrinsic_id() == vmIntrinsics::_none)
m->set_intrinsic_id(vmIntrinsics::_compiledLambdaForm);
- if (has_annotation(_method_LambdaForm_Hidden))
+ if (has_annotation(_method_Hidden))
m->set_hidden(true);
if (has_annotation(_method_HotSpotIntrinsicCandidate) && !m->is_synthetic())
m->set_intrinsic_candidate(true);
--- a/src/hotspot/share/classfile/javaClasses.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/javaClasses.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -3732,10 +3732,10 @@
}
#endif
-oop java_lang_invoke_CallSite::context(oop call_site) {
+oop java_lang_invoke_CallSite::context_no_keepalive(oop call_site) {
assert(java_lang_invoke_CallSite::is_instance(call_site), "");
- oop dep_oop = call_site->obj_field(_context_offset);
+ oop dep_oop = call_site->obj_field_access<AS_NO_KEEPALIVE>(_context_offset);
return dep_oop;
}
@@ -3786,12 +3786,6 @@
}
#endif
-bool java_security_AccessControlContext::is_authorized(Handle context) {
- assert(context.not_null() && context->klass() == SystemDictionary::AccessControlContext_klass(), "Invalid type");
- assert(_isAuthorized_offset != -1, "should be set");
- return context->bool_field(_isAuthorized_offset) != 0;
-}
-
oop java_security_AccessControlContext::create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS) {
assert(_isPrivileged_offset != 0, "offsets should have been initialized");
// Ensure klass is initialized
@@ -3975,13 +3969,6 @@
int java_lang_System::out_offset_in_bytes() { return static_out_offset; }
int java_lang_System::err_offset_in_bytes() { return static_err_offset; }
-
-bool java_lang_System::has_security_manager() {
- InstanceKlass* ik = SystemDictionary::System_klass();
- oop base = ik->static_field_base_raw();
- return base->obj_field(static_security_offset) != NULL;
-}
-
int java_lang_Class::_klass_offset;
int java_lang_Class::_array_klass_offset;
int java_lang_Class::_oop_size_offset;
--- a/src/hotspot/share/classfile/javaClasses.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/javaClasses.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -912,6 +912,7 @@
static inline oop queue(oop ref);
static inline void set_queue(oop ref, oop value);
static bool is_referent_field(oop obj, ptrdiff_t offset);
+ static inline bool is_final(oop ref);
static inline bool is_phantom(oop ref);
};
@@ -1185,7 +1186,7 @@
static void set_target( oop site, oop target);
static void set_target_volatile( oop site, oop target);
- static oop context(oop site);
+ static oop context_no_keepalive(oop site);
// Testers
static bool is_subclass(Klass* klass) {
@@ -1240,8 +1241,6 @@
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
static oop create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS);
- static bool is_authorized(Handle context);
-
// Debugging/initialization
friend class JavaClasses;
};
@@ -1315,8 +1314,6 @@
static int out_offset_in_bytes();
static int err_offset_in_bytes();
- static bool has_security_manager();
-
static void compute_offsets();
static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
--- a/src/hotspot/share/classfile/javaClasses.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/javaClasses.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -127,6 +127,9 @@
HeapWord* java_lang_ref_Reference::discovered_addr_raw(oop ref) {
return ref->obj_field_addr_raw<HeapWord>(discovered_offset);
}
+bool java_lang_ref_Reference::is_final(oop ref) {
+ return InstanceKlass::cast(ref->klass())->reference_type() == REF_FINAL;
+}
bool java_lang_ref_Reference::is_phantom(oop ref) {
return InstanceKlass::cast(ref->klass())->reference_type() == REF_PHANTOM;
}
--- a/src/hotspot/share/classfile/stringTable.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/stringTable.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -78,7 +78,6 @@
// --------------------------------------------------------------------------
StringTable* StringTable::_the_table = NULL;
-volatile bool StringTable::_shared_string_mapped = false;
volatile bool StringTable::_alt_hash = false;
static juint murmur_seed = 0;
@@ -871,7 +870,7 @@
if (soc->writing()) {
// Sanity. Make sure we don't use the shared table at dump time
_shared_table.reset();
- } else if (!_shared_string_mapped) {
+ } else if (!HeapShared::closed_archive_heap_region_mapped()) {
_shared_table.reset();
}
}
--- a/src/hotspot/share/classfile/stringTable.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/stringTable.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -55,7 +55,6 @@
// The string table
static StringTable* _the_table;
- static volatile bool _shared_string_mapped;
static volatile bool _alt_hash;
private:
@@ -166,8 +165,6 @@
static void copy_shared_string_table(CompactHashtableWriter* ch_table) NOT_CDS_JAVA_HEAP_RETURN;
public:
static oop create_archived_string(oop s, Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN_(NULL);
- static void set_shared_string_mapped() { _shared_string_mapped = true; }
- static bool shared_string_mapped() { return _shared_string_mapped; }
static void shared_oops_do(OopClosure* f) NOT_CDS_JAVA_HEAP_RETURN;
static void write_to_archive() NOT_CDS_JAVA_HEAP_RETURN;
static void serialize_shared_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
--- a/src/hotspot/share/classfile/systemDictionary.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/systemDictionary.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -116,6 +116,7 @@
do_klass(SecurityManager_klass, java_lang_SecurityManager ) \
do_klass(ProtectionDomain_klass, java_security_ProtectionDomain ) \
do_klass(AccessControlContext_klass, java_security_AccessControlContext ) \
+ do_klass(AccessController_klass, java_security_AccessController ) \
do_klass(SecureClassLoader_klass, java_security_SecureClassLoader ) \
do_klass(ClassNotFoundException_klass, java_lang_ClassNotFoundException ) \
do_klass(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError ) \
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -27,6 +27,7 @@
#include "classfile/classListParser.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderData.inline.hpp"
+#include "classfile/classLoaderDataGraph.hpp"
#include "classfile/classLoaderExt.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/javaClasses.hpp"
@@ -782,8 +783,16 @@
}
}
+void SystemDictionaryShared::finalize_verification_constraints_for(InstanceKlass* k) {
+ if (!k->is_unsafe_anonymous()) {
+ SharedDictionaryEntry* entry = ((SharedDictionary*)(k->class_loader_data()->dictionary()))->find_entry_for(k);
+ entry->finalize_verification_constraints();
+ }
+}
+
void SystemDictionaryShared::finalize_verification_constraints() {
- boot_loader_dictionary()->finalize_verification_constraints();
+ MutexLocker mcld(ClassLoaderDataGraph_lock);
+ ClassLoaderDataGraph::dictionary_classes_do(finalize_verification_constraints_for);
}
void SystemDictionaryShared::check_verification_constraints(InstanceKlass* klass,
@@ -810,28 +819,6 @@
return NULL;
}
-void SharedDictionary::finalize_verification_constraints() {
- int bytes = 0, count = 0;
- for (int index = 0; index < table_size(); index++) {
- for (SharedDictionaryEntry *probe = bucket(index);
- probe != NULL;
- probe = probe->next()) {
- int n = probe->finalize_verification_constraints();
- if (n > 0) {
- bytes += n;
- count ++;
- }
- }
- }
- if (log_is_enabled(Info, cds, verification)) {
- double avg = 0;
- if (count > 0) {
- avg = double(bytes) / double(count);
- }
- log_info(cds, verification)("Recorded verification constraints for %d classes = %d bytes (avg = %.2f bytes) ", count, bytes, avg);
- }
-}
-
void SharedDictionaryEntry::add_verification_constraint(Symbol* name,
Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object) {
if (_verifier_constraints == NULL) {
--- a/src/hotspot/share/classfile/systemDictionaryShared.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/systemDictionaryShared.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -172,7 +172,6 @@
public:
SharedDictionaryEntry* find_entry_for(InstanceKlass* klass);
- void finalize_verification_constraints();
bool add_non_builtin_klass(const Symbol* class_name,
ClassLoaderData* loader_data,
@@ -283,7 +282,7 @@
Handle class_loader,
Handle protection_domain,
TRAPS);
-
+ static void finalize_verification_constraints_for(InstanceKlass* k);
public:
// Called by PLATFORM/APP loader only
static InstanceKlass* find_or_load_shared_class(Symbol* class_name,
--- a/src/hotspot/share/classfile/vmSymbols.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/classfile/vmSymbols.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -99,6 +99,8 @@
template(java_lang_CharSequence, "java/lang/CharSequence") \
template(java_lang_SecurityManager, "java/lang/SecurityManager") \
template(java_security_AccessControlContext, "java/security/AccessControlContext") \
+ template(java_security_AccessController, "java/security/AccessController") \
+ template(executePrivileged_name, "executePrivileged") \
template(java_security_CodeSource, "java/security/CodeSource") \
template(java_security_ProtectionDomain, "java/security/ProtectionDomain") \
template(java_security_SecureClassLoader, "java/security/SecureClassLoader") \
@@ -303,6 +305,7 @@
template(java_lang_invoke_LambdaForm_Compiled_signature, "Ljava/lang/invoke/LambdaForm$Compiled;") \
template(java_lang_invoke_LambdaForm_Hidden_signature, "Ljava/lang/invoke/LambdaForm$Hidden;") \
template(java_lang_invoke_MethodHandleNatives_CallSiteContext_signature, "Ljava/lang/invoke/MethodHandleNatives$CallSiteContext;") \
+ template(java_security_AccessController_Hidden_signature, "Ljava/security/AccessController$Hidden;") \
/* internal up-calls made only by the JVM, via class sun.invoke.MethodHandleNatives: */ \
template(findMethodHandleType_name, "findMethodHandleType") \
template(findMethodHandleType_signature, "(Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;") \
@@ -546,7 +549,6 @@
template(char_StringBuffer_signature, "(C)Ljava/lang/StringBuffer;") \
template(int_String_signature, "(I)Ljava/lang/String;") \
template(boolean_boolean_int_signature, "(ZZ)I") \
- template(codesource_permissioncollection_signature, "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V") \
/* signature symbols needed by intrinsics */ \
VM_INTRINSICS_DO(VM_INTRINSIC_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, template, VM_ALIAS_IGNORE) \
\
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/code/codeBehaviours.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "code/codeBehaviours.hpp"
+#include "runtime/mutexLocker.hpp"
+#include "runtime/safepoint.hpp"
+
+CompiledICProtectionBehaviour* CompiledICProtectionBehaviour::_current = NULL;
+
+bool DefaultICProtectionBehaviour::lock(CompiledMethod* method) {
+ if (CompiledIC_lock->owned_by_self()) {
+ return false;
+ }
+ CompiledIC_lock->lock();
+ return true;
+}
+
+void DefaultICProtectionBehaviour::unlock(CompiledMethod* method) {
+ CompiledIC_lock->unlock();
+}
+
+bool DefaultICProtectionBehaviour::is_safe(CompiledMethod* method) {
+ return SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->owned_by_self();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/code/codeBehaviours.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_CODE_CODEBEHAVIOURS_HPP
+#define SHARE_CODE_CODEBEHAVIOURS_HPP
+
+#include "memory/allocation.hpp"
+
+class CompiledMethod;
+
+class CompiledICProtectionBehaviour {
+ static CompiledICProtectionBehaviour* _current;
+
+public:
+ virtual bool lock(CompiledMethod* method) = 0;
+ virtual void unlock(CompiledMethod* method) = 0;
+ virtual bool is_safe(CompiledMethod* method) = 0;
+
+ static CompiledICProtectionBehaviour* current() { return _current; }
+ static void set_current(CompiledICProtectionBehaviour* current) { _current = current; }
+};
+
+class DefaultICProtectionBehaviour: public CompiledICProtectionBehaviour, public CHeapObj<mtInternal> {
+ virtual bool lock(CompiledMethod* method);
+ virtual void unlock(CompiledMethod* method);
+ virtual bool is_safe(CompiledMethod* method);
+};
+
+#endif // SHARE_CODE_CODEBEHAVIOURS_HPP
--- a/src/hotspot/share/code/codeCache.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/codeCache.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -144,8 +144,8 @@
address CodeCache::_low_bound = 0;
address CodeCache::_high_bound = 0;
int CodeCache::_number_of_nmethods_with_dependencies = 0;
-bool CodeCache::_needs_cache_clean = false;
nmethod* CodeCache::_scavenge_root_nmethods = NULL;
+ExceptionCache* volatile CodeCache::_exception_cache_purge_list = NULL;
// Initialize arrays of CodeHeap subsets
GrowableArray<CodeHeap*>* CodeCache::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<CodeHeap*> (CodeBlobType::All, true);
@@ -683,17 +683,11 @@
// Mark nmethods for unloading if they contain otherwise unreachable oops.
void CodeCache::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) {
assert_locked_or_safepoint(CodeCache_lock);
+ UnloadingScope scope(is_alive);
CompiledMethodIterator iter;
while(iter.next_alive()) {
- iter.method()->do_unloading(is_alive);
+ iter.method()->do_unloading(unloading_occurred);
}
-
- // Now that all the unloaded nmethods are known, cleanup caches
- // before CLDG is purged.
- // This is another code cache walk but it is moved from gc_epilogue.
- // G1 does a parallel walk of the nmethods so cleans them up
- // as it goes and doesn't call this.
- do_unloading_nmethod_caches(unloading_occurred);
}
void CodeCache::blobs_do(CodeBlobClosure* f) {
@@ -902,34 +896,48 @@
#endif
}
+// Defer freeing of concurrently cleaned ExceptionCache entries until
+// after a global handshake operation.
+void CodeCache::release_exception_cache(ExceptionCache* entry) {
+ if (SafepointSynchronize::is_at_safepoint()) {
+ delete entry;
+ } else {
+ for (;;) {
+ ExceptionCache* purge_list_head = Atomic::load(&_exception_cache_purge_list);
+ entry->set_purge_list_next(purge_list_head);
+ if (Atomic::cmpxchg(entry, &_exception_cache_purge_list, purge_list_head) == purge_list_head) {
+ break;
+ }
+ }
+ }
+}
+
+// Delete exception caches that have been concurrently unlinked,
+// followed by a global handshake operation.
+void CodeCache::purge_exception_caches() {
+ ExceptionCache* curr = _exception_cache_purge_list;
+ while (curr != NULL) {
+ ExceptionCache* next = curr->purge_list_next();
+ delete curr;
+ curr = next;
+ }
+ _exception_cache_purge_list = NULL;
+}
+
void CodeCache::gc_prologue() { }
void CodeCache::gc_epilogue() {
prune_scavenge_root_nmethods();
}
+uint8_t CodeCache::_unloading_cycle = 1;
-void CodeCache::do_unloading_nmethod_caches(bool class_unloading_occurred) {
- assert_locked_or_safepoint(CodeCache_lock);
- // Even if classes are not unloaded, there may have been some nmethods that are
- // unloaded because oops in them are no longer reachable.
- NOT_DEBUG(if (needs_cache_clean() || class_unloading_occurred)) {
- CompiledMethodIterator iter;
- while(iter.next_alive()) {
- CompiledMethod* cm = iter.method();
- assert(!cm->is_unloaded(), "Tautology");
- DEBUG_ONLY(if (needs_cache_clean() || class_unloading_occurred)) {
- // Clean up both unloaded klasses from nmethods and unloaded nmethods
- // from inline caches.
- cm->unload_nmethod_caches(/*parallel*/false, class_unloading_occurred);
- }
- DEBUG_ONLY(cm->verify());
- DEBUG_ONLY(cm->verify_oop_relocations());
- }
+void CodeCache::increment_unloading_cycle() {
+ if (_unloading_cycle == 1) {
+ _unloading_cycle = 2;
+ } else {
+ _unloading_cycle = 1;
}
-
- set_needs_cache_clean(false);
- verify_icholder_relocations();
}
void CodeCache::verify_oops() {
--- a/src/hotspot/share/code/codeCache.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/codeCache.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -27,6 +27,7 @@
#include "code/codeBlob.hpp"
#include "code/nmethod.hpp"
+#include "gc/shared/gcBehaviours.hpp"
#include "memory/allocation.hpp"
#include "memory/heap.hpp"
#include "oops/instanceKlass.hpp"
@@ -71,8 +72,9 @@
// existing ones, make sure to adapt the dtrace scripts (jhelper.d) for
// Solaris and BSD.
+class ExceptionCache;
+class KlassDepChange;
class OopClosure;
-class KlassDepChange;
class CodeCache : AllStatic {
friend class VMStructs;
@@ -90,8 +92,10 @@
static address _low_bound; // Lower bound of CodeHeap addresses
static address _high_bound; // Upper bound of CodeHeap addresses
static int _number_of_nmethods_with_dependencies; // Total number of nmethods with dependencies
- static bool _needs_cache_clean; // True if inline caches of the nmethods needs to be flushed
static nmethod* _scavenge_root_nmethods; // linked via nm->scavenge_root_link()
+ static uint8_t _unloading_cycle; // Global state for recognizing old nmethods that need to be unloaded
+
+ static ExceptionCache* volatile _exception_cache_purge_list;
static void mark_scavenge_root_nmethods() PRODUCT_RETURN;
static void verify_perm_nmethods(CodeBlobClosure* f_or_null) PRODUCT_RETURN;
@@ -172,8 +176,27 @@
// to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading"
// to "true" iff some code got unloaded.
// "unloading_occurred" controls whether metadata should be cleaned because of class unloading.
+ class UnloadingScope: StackObj {
+ ClosureIsUnloadingBehaviour _is_unloading_behaviour;
+
+ public:
+ UnloadingScope(BoolObjectClosure* is_alive)
+ : _is_unloading_behaviour(is_alive)
+ {
+ IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
+ increment_unloading_cycle();
+ }
+
+ ~UnloadingScope() {
+ IsUnloadingBehaviour::set_current(NULL);
+ }
+ };
static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
+ static uint8_t unloading_cycle() { return _unloading_cycle; }
+ static void increment_unloading_cycle();
static void asserted_non_scavengable_nmethods_do(CodeBlobClosure* f = NULL) PRODUCT_RETURN;
+ static void release_exception_cache(ExceptionCache* entry);
+ static void purge_exception_caches();
// Apply f to every live code blob in scavengable nmethods. Prune nmethods
// from the list of scavengable nmethods if f->fix_relocations() and a nmethod
@@ -222,12 +245,8 @@
static double reverse_free_ratio(int code_blob_type);
- static bool needs_cache_clean() { return _needs_cache_clean; }
- static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; }
-
static void clear_inline_caches(); // clear all inline caches
static void cleanup_inline_caches(); // clean unloaded/zombie nmethods from inline caches
- static void do_unloading_nmethod_caches(bool class_unloading_occurred); // clean all nmethod caches for unloading, including inline caches
// Returns true if an own CodeHeap for the given CodeBlobType is available
static bool heap_available(int code_blob_type);
--- a/src/hotspot/share/code/compiledIC.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/compiledIC.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/systemDictionary.hpp"
+#include "code/codeBehaviours.hpp"
#include "code/codeCache.hpp"
#include "code/compiledIC.hpp"
#include "code/icBuffer.hpp"
@@ -47,12 +48,35 @@
// Every time a compiled IC is changed or its type is being accessed,
// either the CompiledIC_lock must be set or we must be at a safe point.
+CompiledICLocker::CompiledICLocker(CompiledMethod* method)
+ : _method(method),
+ _behaviour(CompiledICProtectionBehaviour::current()),
+ _locked(_behaviour->lock(_method)){
+}
+
+CompiledICLocker::~CompiledICLocker() {
+ if (_locked) {
+ _behaviour->unlock(_method);
+ }
+}
+
+bool CompiledICLocker::is_safe(CompiledMethod* method) {
+ return CompiledICProtectionBehaviour::current()->is_safe(method);
+}
+
+bool CompiledICLocker::is_safe(address code) {
+ CodeBlob* cb = CodeCache::find_blob_unsafe(code);
+ assert(cb != NULL && cb->is_compiled(), "must be compiled");
+ CompiledMethod* cm = cb->as_compiled_method();
+ return CompiledICProtectionBehaviour::current()->is_safe(cm);
+}
+
//-----------------------------------------------------------------------------
// Low-level access to an inline cache. Private, since they might not be
// MT-safe to use.
void* CompiledIC::cached_value() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert (!is_optimized(), "an optimized virtual call does not have a cached metadata");
if (!is_in_transition_state()) {
@@ -69,7 +93,7 @@
void CompiledIC::internal_set_ic_destination(address entry_point, bool is_icstub, void* cache, bool is_icholder) {
assert(entry_point != NULL, "must set legal entry point");
- assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert (!is_optimized() || cache == NULL, "an optimized virtual call does not have a cached metadata");
assert (cache == NULL || cache != (Metadata*)badOopVal, "invalid metadata");
@@ -101,11 +125,9 @@
}
{
- MutexLockerEx pl(SafepointSynchronize::is_at_safepoint() ? NULL : Patching_lock, Mutex::_no_safepoint_check_flag);
-#ifdef ASSERT
CodeBlob* cb = CodeCache::find_blob_unsafe(_call->instruction_address());
+ MutexLockerEx pl(CompiledICLocker::is_safe(cb->as_compiled_method()) ? NULL : Patching_lock, Mutex::_no_safepoint_check_flag);
assert(cb != NULL && cb->is_compiled(), "must be compiled");
-#endif
_call->set_destination_mt_safe(entry_point);
}
@@ -130,23 +152,23 @@
address CompiledIC::ic_destination() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
- if (!is_in_transition_state()) {
- return _call->destination();
- } else {
- return InlineCacheBuffer::ic_destination_for((CompiledIC *)this);
- }
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
+ if (!is_in_transition_state()) {
+ return _call->destination();
+ } else {
+ return InlineCacheBuffer::ic_destination_for((CompiledIC *)this);
+ }
}
bool CompiledIC::is_in_transition_state() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
return InlineCacheBuffer::contains(_call->destination());;
}
bool CompiledIC::is_icholder_call() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
return !_is_optimized && is_icholder_entry(ic_destination());
}
@@ -216,7 +238,7 @@
}
bool CompiledIC::set_to_megamorphic(CallInfo* call_info, Bytecodes::Code bytecode, TRAPS) {
- assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert(!is_optimized(), "cannot set an optimized virtual call to megamorphic");
assert(is_call_to_compiled() || is_call_to_interpreted(), "going directly to megamorphic?");
@@ -270,7 +292,7 @@
// true if destination is megamorphic stub
bool CompiledIC::is_megamorphic() const {
- assert(CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
assert(!is_optimized(), "an optimized call cannot be megamorphic");
// Cannot rely on cached_value. It is either an interface or a method.
@@ -278,7 +300,7 @@
}
bool CompiledIC::is_call_to_compiled() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
// Use unsafe, since an inline cache might point to a zombie method. However, the zombie
// method is guaranteed to still exist, since we only remove methods after all inline caches
@@ -304,7 +326,7 @@
bool CompiledIC::is_call_to_interpreted() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
// Call to interpreter if destination is either calling to a stub (if it
// is optimized), or calling to an I2C blob
bool is_call_to_interpreted = false;
@@ -329,7 +351,7 @@
}
void CompiledIC::set_to_clean(bool in_use) {
- assert(SafepointSynchronize::is_at_safepoint() || CompiledIC_lock->is_locked() , "MT-unsafe call");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
if (TraceInlineCacheClearing || TraceICs) {
tty->print_cr("IC@" INTPTR_FORMAT ": set to clean", p2i(instruction_address()));
print();
@@ -339,7 +361,7 @@
// A zombie transition will always be safe, since the metadata has already been set to NULL, so
// we only need to patch the destination
- bool safe_transition = _call->is_safe_for_patching() || !in_use || is_optimized() || SafepointSynchronize::is_at_safepoint();
+ bool safe_transition = _call->is_safe_for_patching() || !in_use || is_optimized() || CompiledICLocker::is_safe(_method);
if (safe_transition) {
// Kill any leftover stub we might have too
@@ -363,7 +385,7 @@
}
bool CompiledIC::is_clean() const {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
bool is_clean = false;
address dest = ic_destination();
is_clean = dest == _call->get_resolve_call_stub(is_optimized());
@@ -372,7 +394,7 @@
}
void CompiledIC::set_to_monomorphic(CompiledICInfo& info) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "");
+ assert(CompiledICLocker::is_safe(_method), "mt unsafe call");
// Updating a cache to the wrong entry can cause bugs that are very hard
// to track down - if cache entry gets invalid - we just clean it. In
// this way it is always the same code path that is responsible for
@@ -555,14 +577,9 @@
void CompiledStaticCall::set_to_clean(bool in_use) {
// in_use is unused but needed to match template function in CompiledMethod
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
+ assert(CompiledICLocker::is_safe(instruction_address()), "mt unsafe call");
// Reset call site
MutexLockerEx pl(SafepointSynchronize::is_at_safepoint() ? NULL : Patching_lock, Mutex::_no_safepoint_check_flag);
-#ifdef ASSERT
- CodeBlob* cb = CodeCache::find_blob_unsafe(instruction_address());
- assert(cb != NULL && cb->is_compiled(), "must be compiled");
-#endif
-
set_destination_mt_safe(resolve_call_stub());
// Do not reset stub here: It is too expensive to call find_stub.
@@ -606,7 +623,7 @@
}
void CompiledStaticCall::set(const StaticCallInfo& info) {
- assert (CompiledIC_lock->is_locked() || SafepointSynchronize::is_at_safepoint(), "mt unsafe call");
+ assert(CompiledICLocker::is_safe(instruction_address()), "mt unsafe call");
MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag);
// Updating a cache to the wrong entry can cause bugs that are very hard
// to track down - if cache entry gets invalid - we just clean it. In
--- a/src/hotspot/share/code/compiledIC.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/compiledIC.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -59,8 +59,22 @@
// transition is made to a stub.
//
class CompiledIC;
+class CompiledICProtectionBehaviour;
+class CompiledMethod;
class ICStub;
+class CompiledICLocker: public StackObj {
+ CompiledMethod* _method;
+ CompiledICProtectionBehaviour* _behaviour;
+ bool _locked;
+
+public:
+ CompiledICLocker(CompiledMethod* method);
+ ~CompiledICLocker();
+ static bool is_safe(CompiledMethod* method);
+ static bool is_safe(address code);
+};
+
class CompiledICInfo : public StackObj {
private:
address _entry; // entry point for call
--- a/src/hotspot/share/code/compiledMethod.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/compiledMethod.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -27,6 +27,8 @@
#include "code/compiledMethod.inline.hpp"
#include "code/scopeDesc.hpp"
#include "code/codeCache.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/gcBehaviours.hpp"
#include "interpreter/bytecode.inline.hpp"
#include "logging/log.hpp"
#include "logging/logTag.hpp"
@@ -37,16 +39,29 @@
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
-CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments)
+CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, const CodeBlobLayout& layout,
+ int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps,
+ bool caller_must_gc_arguments)
: CodeBlob(name, type, layout, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
- _mark_for_deoptimization_status(not_marked), _method(method) {
+ _mark_for_deoptimization_status(not_marked),
+ _is_unloading_state(0),
+ _method(method)
+{
init_defaults();
+ clear_unloading_state();
}
-CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments)
- : CodeBlob(name, type, CodeBlobLayout((address) this, size, header_size, cb), cb, frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
- _mark_for_deoptimization_status(not_marked), _method(method) {
+CompiledMethod::CompiledMethod(Method* method, const char* name, CompilerType type, int size,
+ int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size,
+ OopMapSet* oop_maps, bool caller_must_gc_arguments)
+ : CodeBlob(name, type, CodeBlobLayout((address) this, size, header_size, cb), cb,
+ frame_complete_offset, frame_size, oop_maps, caller_must_gc_arguments),
+ _mark_for_deoptimization_status(not_marked),
+ _is_unloading_state(0),
+ _method(method)
+{
init_defaults();
+ clear_unloading_state();
}
void CompiledMethod::init_defaults() {
@@ -54,7 +69,6 @@
_has_method_handle_invokes = 0;
_lazy_critical_native = 0;
_has_wide_vectors = 0;
- _unloading_clock = 0;
}
bool CompiledMethod::is_method_handle_return(address return_pc) {
@@ -89,34 +103,84 @@
//-----------------------------------------------------------------------------
+ExceptionCache* CompiledMethod::exception_cache_acquire() const {
+ return OrderAccess::load_acquire(&_exception_cache);
+}
+
void CompiledMethod::add_exception_cache_entry(ExceptionCache* new_entry) {
assert(ExceptionCache_lock->owned_by_self(),"Must hold the ExceptionCache_lock");
assert(new_entry != NULL,"Must be non null");
assert(new_entry->next() == NULL, "Must be null");
- ExceptionCache *ec = exception_cache();
- if (ec != NULL) {
- new_entry->set_next(ec);
+ for (;;) {
+ ExceptionCache *ec = exception_cache();
+ if (ec != NULL) {
+ Klass* ex_klass = ec->exception_type();
+ if (!ex_klass->is_loader_alive()) {
+ // We must guarantee that entries are not inserted with new next pointer
+ // edges to ExceptionCache entries with dead klasses, due to bad interactions
+ // with concurrent ExceptionCache cleanup. Therefore, the inserts roll
+ // the head pointer forward to the first live ExceptionCache, so that the new
+ // next pointers always point at live ExceptionCaches, that are not removed due
+ // to concurrent ExceptionCache cleanup.
+ ExceptionCache* next = ec->next();
+ if (Atomic::cmpxchg(next, &_exception_cache, ec) == ec) {
+ CodeCache::release_exception_cache(ec);
+ }
+ continue;
+ }
+ ec = exception_cache();
+ if (ec != NULL) {
+ new_entry->set_next(ec);
+ }
+ }
+ if (Atomic::cmpxchg(new_entry, &_exception_cache, ec) == ec) {
+ return;
+ }
}
- release_set_exception_cache(new_entry);
}
void CompiledMethod::clean_exception_cache() {
+ // For each nmethod, only a single thread may call this cleanup function
+ // at the same time, whether called in STW cleanup or concurrent cleanup.
+ // Note that if the GC is processing exception cache cleaning in a concurrent phase,
+ // then a single writer may contend with cleaning up the head pointer to the
+ // first ExceptionCache node that has a Klass* that is alive. That is fine,
+ // as long as there is no concurrent cleanup of next pointers from concurrent writers.
+ // And the concurrent writers do not clean up next pointers, only the head.
+ // Also note that concurent readers will walk through Klass* pointers that are not
+ // alive. That does not cause ABA problems, because Klass* is deleted after
+ // a handshake with all threads, after all stale ExceptionCaches have been
+ // unlinked. That is also when the CodeCache::exception_cache_purge_list()
+ // is deleted, with all ExceptionCache entries that were cleaned concurrently.
+ // That similarly implies that CAS operations on ExceptionCache entries do not
+ // suffer from ABA problems as unlinking and deletion is separated by a global
+ // handshake operation.
ExceptionCache* prev = NULL;
- ExceptionCache* curr = exception_cache();
+ ExceptionCache* curr = exception_cache_acquire();
while (curr != NULL) {
ExceptionCache* next = curr->next();
- Klass* ex_klass = curr->exception_type();
- if (ex_klass != NULL && !ex_klass->is_loader_alive()) {
+ if (!curr->exception_type()->is_loader_alive()) {
if (prev == NULL) {
- set_exception_cache(next);
+ // Try to clean head; this is contended by concurrent inserts, that
+ // both lazily clean the head, and insert entries at the head. If
+ // the CAS fails, the operation is restarted.
+ if (Atomic::cmpxchg(next, &_exception_cache, curr) != curr) {
+ prev = NULL;
+ curr = exception_cache_acquire();
+ continue;
+ }
} else {
+ // It is impossible to during cleanup connect the next pointer to
+ // an ExceptionCache that has not been published before a safepoint
+ // prior to the cleanup. Therefore, release is not required.
prev->set_next(next);
}
- delete curr;
// prev stays the same.
+
+ CodeCache::release_exception_cache(curr);
} else {
prev = curr;
}
@@ -131,7 +195,7 @@
// We never grab a lock to read the exception cache, so we may
// have false negatives. This is okay, as it can only happen during
// the first few exception lookups for a given nmethod.
- ExceptionCache* ec = exception_cache();
+ ExceptionCache* ec = exception_cache_acquire();
while (ec != NULL) {
address ret_val;
if ((ret_val = ec->match(exception,pc)) != NULL) {
@@ -158,13 +222,11 @@
}
}
-//-------------end of code for ExceptionCache--------------
-
// private method for handling exception cache
// These methods are private, and used to manipulate the exception cache
// directly.
ExceptionCache* CompiledMethod::exception_cache_entry_for_exception(Handle exception) {
- ExceptionCache* ec = exception_cache();
+ ExceptionCache* ec = exception_cache_acquire();
while (ec != NULL) {
if (ec->match_exception_with_space(exception)) {
return ec;
@@ -174,6 +236,8 @@
return NULL;
}
+//-------------end of code for ExceptionCache--------------
+
bool CompiledMethod::is_at_poll_return(address pc) {
RelocIterator iter(this, pc, pc+1);
while (iter.next()) {
@@ -229,6 +293,20 @@
// first few bytes. If an oop in the old code was there, that oop
// should not get GC'd. Skip the first few bytes of oops on
// not-entrant methods.
+ if (frame_complete_offset() != CodeOffsets::frame_never_safe &&
+ code_begin() + frame_complete_offset() >
+ verified_entry_point() + NativeJump::instruction_size)
+ {
+ // If we have a frame_complete_offset after the native jump, then there
+ // is no point trying to look for oops before that. This is a requirement
+ // for being allowed to scan oops concurrently.
+ return code_begin() + frame_complete_offset();
+ }
+
+ // It is not safe to read oops concurrently using entry barriers, if their
+ // location depend on whether the nmethod is entrant or not.
+ assert(BarrierSet::barrier_set()->barrier_set_nmethod() == NULL, "Not safe oop scan");
+
address low_boundary = verified_entry_point();
if (!is_in_use() && is_nmethod()) {
low_boundary += NativeJump::instruction_size;
@@ -324,7 +402,7 @@
// Clear ICStubs of all compiled ICs
void CompiledMethod::clear_ic_stubs() {
- assert_locked_or_safepoint(CompiledIC_lock);
+ assert(CompiledICLocker::is_safe(this), "mt unsafe call");
ResourceMark rm;
RelocIterator iter(this);
while(iter.next()) {
@@ -385,26 +463,6 @@
ic->set_to_clean();
}
-unsigned char CompiledMethod::_global_unloading_clock = 0;
-
-void CompiledMethod::increase_unloading_clock() {
- _global_unloading_clock++;
- if (_global_unloading_clock == 0) {
- // _nmethods are allocated with _unloading_clock == 0,
- // so 0 is never used as a clock value.
- _global_unloading_clock = 1;
- }
-}
-
-void CompiledMethod::set_unloading_clock(unsigned char unloading_clock) {
- OrderAccess::release_store(&_unloading_clock, unloading_clock);
-}
-
-unsigned char CompiledMethod::unloading_clock() {
- return OrderAccess::load_acquire(&_unloading_clock);
-}
-
-
// static_stub_Relocations may have dangling references to
// nmethods so trim them out here. Otherwise it looks like
// compiled code is maintaining a link to dead metadata.
@@ -438,84 +496,30 @@
#endif
}
-// This is called at the end of the strong tracing/marking phase of a
-// GC to unload an nmethod if it contains otherwise unreachable
-// oops.
-
-void CompiledMethod::do_unloading(BoolObjectClosure* is_alive) {
- // Make sure the oop's ready to receive visitors
- assert(!is_zombie() && !is_unloaded(),
- "should not call follow on zombie or unloaded nmethod");
-
- address low_boundary = oops_reloc_begin();
-
- if (do_unloading_oops(low_boundary, is_alive)) {
- return;
- }
-
-#if INCLUDE_JVMCI
- if (do_unloading_jvmci()) {
- return;
- }
-#endif
-
- // Cleanup exception cache and inline caches happens
- // after all the unloaded methods are found.
-}
-
// Clean references to unloaded nmethods at addr from this one, which is not unloaded.
template <class CompiledICorStaticCall>
-static bool clean_if_nmethod_is_unloaded(CompiledICorStaticCall *ic, address addr, CompiledMethod* from,
- bool parallel, bool clean_all) {
+static void clean_if_nmethod_is_unloaded(CompiledICorStaticCall *ic, address addr, CompiledMethod* from,
+ bool clean_all) {
// Ok, to lookup references to zombies here
CodeBlob *cb = CodeCache::find_blob_unsafe(addr);
CompiledMethod* nm = (cb != NULL) ? cb->as_compiled_method_or_null() : NULL;
if (nm != NULL) {
- if (parallel && nm->unloading_clock() != CompiledMethod::global_unloading_clock()) {
- // The nmethod has not been processed yet.
- return true;
- }
-
// Clean inline caches pointing to both zombie and not_entrant methods
- if (clean_all || !nm->is_in_use() || (nm->method()->code() != nm)) {
+ if (clean_all || !nm->is_in_use() || nm->is_unloading() || (nm->method()->code() != nm)) {
ic->set_to_clean(from->is_alive());
assert(ic->is_clean(), "nmethod " PTR_FORMAT "not clean %s", p2i(from), from->method()->name_and_sig_as_C_string());
}
}
-
- return false;
-}
-
-static bool clean_if_nmethod_is_unloaded(CompiledIC *ic, CompiledMethod* from,
- bool parallel, bool clean_all = false) {
- return clean_if_nmethod_is_unloaded(ic, ic->ic_destination(), from, parallel, clean_all);
-}
-
-static bool clean_if_nmethod_is_unloaded(CompiledStaticCall *csc, CompiledMethod* from,
- bool parallel, bool clean_all = false) {
- return clean_if_nmethod_is_unloaded(csc, csc->destination(), from, parallel, clean_all);
}
-bool CompiledMethod::do_unloading_parallel(BoolObjectClosure* is_alive, bool unloading_occurred) {
- ResourceMark rm;
-
- // Make sure the oop's ready to receive visitors
- assert(!is_zombie() && !is_unloaded(),
- "should not call follow on zombie or unloaded nmethod");
-
- address low_boundary = oops_reloc_begin();
+static void clean_if_nmethod_is_unloaded(CompiledIC *ic, CompiledMethod* from,
+ bool clean_all) {
+ clean_if_nmethod_is_unloaded(ic, ic->ic_destination(), from, clean_all);
+}
- if (do_unloading_oops(low_boundary, is_alive)) {
- return false;
- }
-
-#if INCLUDE_JVMCI
- if (do_unloading_jvmci()) {
- return false;
- }
-#endif
-
- return unload_nmethod_caches(/*parallel*/true, unloading_occurred);
+static void clean_if_nmethod_is_unloaded(CompiledStaticCall *csc, CompiledMethod* from,
+ bool clean_all) {
+ clean_if_nmethod_is_unloaded(csc, csc->destination(), from, clean_all);
}
// Cleans caches in nmethods that point to either classes that are unloaded
@@ -525,29 +529,95 @@
// nmethods are unloaded. Return postponed=true in the parallel case for
// inline caches found that point to nmethods that are not yet visited during
// the do_unloading walk.
-bool CompiledMethod::unload_nmethod_caches(bool parallel, bool unloading_occurred) {
+void CompiledMethod::unload_nmethod_caches(bool unloading_occurred) {
+ ResourceMark rm;
// Exception cache only needs to be called if unloading occurred
if (unloading_occurred) {
clean_exception_cache();
}
- bool postponed = cleanup_inline_caches_impl(parallel, unloading_occurred, /*clean_all*/false);
+ cleanup_inline_caches_impl(unloading_occurred, false);
// All static stubs need to be cleaned.
clean_ic_stubs();
// Check that the metadata embedded in the nmethod is alive
DEBUG_ONLY(metadata_do(check_class));
+}
- return postponed;
+// The _is_unloading_state encodes a tuple comprising the unloading cycle
+// and the result of IsUnloadingBehaviour::is_unloading() fpr that cycle.
+// This is the bit layout of the _is_unloading_state byte: 00000CCU
+// CC refers to the cycle, which has 2 bits, and U refers to the result of
+// IsUnloadingBehaviour::is_unloading() for that unloading cycle.
+
+class IsUnloadingState: public AllStatic {
+ static const uint8_t _is_unloading_mask = 1;
+ static const uint8_t _is_unloading_shift = 0;
+ static const uint8_t _unloading_cycle_mask = 6;
+ static const uint8_t _unloading_cycle_shift = 1;
+
+ static uint8_t set_is_unloading(uint8_t state, bool value) {
+ state &= ~_is_unloading_mask;
+ if (value) {
+ state |= 1 << _is_unloading_shift;
+ }
+ assert(is_unloading(state) == value, "unexpected unloading cycle overflow");
+ return state;
+ }
+
+ static uint8_t set_unloading_cycle(uint8_t state, uint8_t value) {
+ state &= ~_unloading_cycle_mask;
+ state |= value << _unloading_cycle_shift;
+ assert(unloading_cycle(state) == value, "unexpected unloading cycle overflow");
+ return state;
+ }
+
+public:
+ static bool is_unloading(uint8_t state) { return (state & _is_unloading_mask) >> _is_unloading_shift == 1; }
+ static uint8_t unloading_cycle(uint8_t state) { return (state & _unloading_cycle_mask) >> _unloading_cycle_shift; }
+
+ static uint8_t create(bool is_unloading, uint8_t unloading_cycle) {
+ uint8_t state = 0;
+ state = set_is_unloading(state, is_unloading);
+ state = set_unloading_cycle(state, unloading_cycle);
+ return state;
+ }
+};
+
+bool CompiledMethod::is_unloading() {
+ uint8_t state = RawAccess<MO_RELAXED>::load(&_is_unloading_state);
+ bool state_is_unloading = IsUnloadingState::is_unloading(state);
+ uint8_t state_unloading_cycle = IsUnloadingState::unloading_cycle(state);
+ if (state_is_unloading) {
+ return true;
+ }
+ if (state_unloading_cycle == CodeCache::unloading_cycle()) {
+ return false;
+ }
+
+ // The IsUnloadingBehaviour is responsible for checking if there are any dead
+ // oops in the CompiledMethod, by calling oops_do on it.
+ state_unloading_cycle = CodeCache::unloading_cycle();
+ state_is_unloading = IsUnloadingBehaviour::current()->is_unloading(this);
+
+ state = IsUnloadingState::create(state_is_unloading, state_unloading_cycle);
+
+ RawAccess<MO_RELAXED>::store(&_is_unloading_state, state);
+
+ return state_is_unloading;
+}
+
+void CompiledMethod::clear_unloading_state() {
+ uint8_t state = IsUnloadingState::create(false, CodeCache::unloading_cycle());
+ RawAccess<MO_RELAXED>::store(&_is_unloading_state, state);
}
// Called to clean up after class unloading for live nmethods and from the sweeper
// for all methods.
-bool CompiledMethod::cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all) {
- assert_locked_or_safepoint(CompiledIC_lock);
- bool postponed = false;
+void CompiledMethod::cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all) {
+ assert(CompiledICLocker::is_safe(this), "mt unsafe call");
ResourceMark rm;
// Find all calls in an nmethod and clear the ones that point to non-entrant,
@@ -564,19 +634,18 @@
clean_ic_if_metadata_is_dead(CompiledIC_at(&iter));
}
- postponed |= clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, parallel, clean_all);
+ clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, clean_all);
break;
case relocInfo::opt_virtual_call_type:
- postponed |= clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, parallel, clean_all);
+ clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, clean_all);
break;
case relocInfo::static_call_type:
- postponed |= clean_if_nmethod_is_unloaded(compiledStaticCall_at(iter.reloc()), this, parallel, clean_all);
+ clean_if_nmethod_is_unloaded(compiledStaticCall_at(iter.reloc()), this, clean_all);
break;
case relocInfo::oop_type:
- // handled by do_unloading_oops already
break;
case relocInfo::metadata_type:
@@ -586,38 +655,6 @@
break;
}
}
-
- return postponed;
-}
-
-void CompiledMethod::do_unloading_parallel_postponed() {
- ResourceMark rm;
-
- // Make sure the oop's ready to receive visitors
- assert(!is_zombie(),
- "should not call follow on zombie nmethod");
-
- RelocIterator iter(this, oops_reloc_begin());
- while(iter.next()) {
-
- switch (iter.type()) {
-
- case relocInfo::virtual_call_type:
- clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, true);
- break;
-
- case relocInfo::opt_virtual_call_type:
- clean_if_nmethod_is_unloaded(CompiledIC_at(&iter), this, true);
- break;
-
- case relocInfo::static_call_type:
- clean_if_nmethod_is_unloaded(compiledStaticCall_at(iter.reloc()), this, true);
- break;
-
- default:
- break;
- }
- }
}
// Iterating over all nmethods, e.g. with the help of CodeCache::nmethods_do(fun) was found
--- a/src/hotspot/share/code/compiledMethod.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/compiledMethod.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -48,7 +48,8 @@
address _pc[cache_size];
address _handler[cache_size];
volatile int _count;
- ExceptionCache* _next;
+ ExceptionCache* volatile _next;
+ ExceptionCache* _purge_list_next;
inline address pc_at(int index);
void set_pc_at(int index, address a) { assert(index >= 0 && index < cache_size,""); _pc[index] = a; }
@@ -65,8 +66,10 @@
ExceptionCache(Handle exception, address pc, address handler);
Klass* exception_type() { return _exception_type; }
- ExceptionCache* next() { return _next; }
- void set_next(ExceptionCache *ec) { _next = ec; }
+ ExceptionCache* next();
+ void set_next(ExceptionCache *ec);
+ ExceptionCache* purge_list_next() { return _purge_list_next; }
+ void set_purge_list_next(ExceptionCache *ec) { _purge_list_next = ec; }
address match(Handle exception, address pc);
bool match_exception_with_space(Handle exception) ;
@@ -147,6 +150,9 @@
bool _is_far_code; // Code is far from CodeCache.
// Have to use far call instructions to call it from code in CodeCache.
+
+ volatile uint8_t _is_unloading_state; // Local state used to keep track of whether unloading is happening or not
+
// set during construction
unsigned int _has_unsafe_access:1; // May fault due to unsafe access.
unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
@@ -202,7 +208,7 @@
virtual address verified_entry_point() const = 0;
virtual void log_identity(xmlStream* log) const = 0;
- virtual void log_state_change(oop cause = NULL) const = 0;
+ virtual void log_state_change() const = 0;
virtual bool make_not_used() = 0;
virtual bool make_not_entrant() = 0;
virtual bool make_entrant() = 0;
@@ -290,11 +296,14 @@
virtual Metadata** metadata_addr_at(int index) const = 0;
virtual void set_original_pc(const frame* fr, address pc) = 0;
+protected:
// Exception cache support
- // Note: _exception_cache may be read concurrently. We rely on memory_order_consume here.
+ // Note: _exception_cache may be read and cleaned concurrently.
ExceptionCache* exception_cache() const { return _exception_cache; }
+ ExceptionCache* exception_cache_acquire() const;
void set_exception_cache(ExceptionCache *ec) { _exception_cache = ec; }
- void release_set_exception_cache(ExceptionCache *ec);
+
+public:
address handler_for_exception_and_pc(Handle exception, address pc);
void add_handler_for_exception_and_pc(Handle exception, address pc, address handler);
void clean_exception_cache();
@@ -333,17 +342,13 @@
static address get_deopt_original_pc(const frame* fr);
- // GC unloading support
- // Cleans unloaded klasses and unloaded nmethods in inline caches
- bool unload_nmethod_caches(bool parallel, bool class_unloading_occurred);
-
// Inline cache support for class unloading and nmethod unloading
private:
- bool cleanup_inline_caches_impl(bool parallel, bool unloading_occurred, bool clean_all);
+ void cleanup_inline_caches_impl(bool unloading_occurred, bool clean_all);
public:
- bool cleanup_inline_caches(bool clean_all = false) {
+ void cleanup_inline_caches(bool clean_all) {
// Serial version used by sweeper and whitebox test
- return cleanup_inline_caches_impl(false, false, clean_all);
+ cleanup_inline_caches_impl(false, clean_all);
}
virtual void clear_inline_caches();
@@ -373,53 +378,32 @@
virtual void metadata_do(void f(Metadata*)) = 0;
// GC support
-
- void set_unloading_next(CompiledMethod* next) { _unloading_next = next; }
- CompiledMethod* unloading_next() { return _unloading_next; }
-
protected:
address oops_reloc_begin() const;
+
private:
void static clean_ic_if_metadata_is_dead(CompiledIC *ic);
void clean_ic_stubs();
public:
- virtual void do_unloading(BoolObjectClosure* is_alive);
- // The parallel versions are used by G1.
- virtual bool do_unloading_parallel(BoolObjectClosure* is_alive, bool unloading_occurred);
- virtual void do_unloading_parallel_postponed();
-
- static unsigned char global_unloading_clock() { return _global_unloading_clock; }
- static void increase_unloading_clock();
+ // GC unloading support
+ // Cleans unloaded klasses and unloaded nmethods in inline caches
- void set_unloading_clock(unsigned char unloading_clock);
- unsigned char unloading_clock();
+ bool is_unloading();
-protected:
- virtual bool do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive) = 0;
-#if INCLUDE_JVMCI
- virtual bool do_unloading_jvmci() = 0;
-#endif
+ void unload_nmethod_caches(bool class_unloading_occurred);
+ void clear_unloading_state();
+ virtual void do_unloading(bool unloading_occurred) { }
private:
- // GC support to help figure out if an nmethod has been
- // cleaned/unloaded by the current GC.
- static unsigned char _global_unloading_clock;
-
- volatile unsigned char _unloading_clock; // Incremented after GC unloaded/cleaned the nmethod
-
PcDesc* find_pc_desc(address pc, bool approximate) {
return _pc_desc_container.find_pc_desc(pc, approximate, PcDescSearch(code_begin(), scopes_pcs_begin(), scopes_pcs_end()));
}
protected:
- union {
- // Used by G1 to chain nmethods.
- CompiledMethod* _unloading_next;
- // Used by non-G1 GCs to chain nmethods.
- nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods
- };
+ // Used by some GCs to chain nmethods.
+ nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods
};
#endif //SHARE_VM_CODE_COMPILEDMETHOD_HPP
--- a/src/hotspot/share/code/compiledMethod.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/compiledMethod.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -41,10 +41,6 @@
;
}
-inline void CompiledMethod::release_set_exception_cache(ExceptionCache *ec) {
- OrderAccess::release_store(&_exception_cache, ec);
-}
-
// -----------------------------------------------------------------------------
// CompiledMethod::get_deopt_original_pc
//
--- a/src/hotspot/share/code/icBuffer.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/icBuffer.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -170,8 +170,9 @@
void InlineCacheBuffer::create_transition_stub(CompiledIC *ic, void* cached_value, address entry) {
+ MutexLockerEx ml(CompiledIC_lock->owned_by_self() ? NULL : CompiledIC_lock);
assert(!SafepointSynchronize::is_at_safepoint(), "should not be called during a safepoint");
- assert (CompiledIC_lock->is_locked(), "");
+ assert(CompiledICLocker::is_safe(ic->instruction_address()), "mt unsafe call");
if (TraceICBuffer) {
tty->print_cr(" create transition stub for " INTPTR_FORMAT " destination " INTPTR_FORMAT " cached value " INTPTR_FORMAT,
p2i(ic->instruction_address()), p2i(entry), p2i(cached_value));
@@ -224,7 +225,9 @@
// not safe to free them until them since they might be visible to
// another thread.
void InlineCacheBuffer::queue_for_release(CompiledICHolder* icholder) {
- MutexLockerEx mex(InlineCacheBuffer_lock);
+ MutexLockerEx mex1((CompiledIC_lock->owned_by_self() ||
+ SafepointSynchronize::is_at_safepoint()) ? NULL : CompiledIC_lock);
+ MutexLockerEx mex2(InlineCacheBuffer_lock);
icholder->set_next(_pending_released);
_pending_released = icholder;
_pending_count++;
--- a/src/hotspot/share/code/nmethod.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/nmethod.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -42,6 +42,7 @@
#include "logging/logStream.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
+#include "oops/access.inline.hpp"
#include "oops/method.inline.hpp"
#include "oops/methodData.hpp"
#include "oops/oop.inline.hpp"
@@ -244,6 +245,7 @@
_count = 0;
_exception_type = exception->klass();
_next = NULL;
+ _purge_list_next = NULL;
add_address_and_handler(pc,handler);
}
@@ -293,6 +295,14 @@
return false;
}
+ExceptionCache* ExceptionCache::next() {
+ return Atomic::load(&_next);
+}
+
+void ExceptionCache::set_next(ExceptionCache *ec) {
+ Atomic::store(ec, &_next);
+}
+
//-----------------------------------------------------------------------------
@@ -413,7 +423,6 @@
_oops_do_mark_link = NULL;
_jmethod_id = NULL;
_osr_link = NULL;
- _unloading_next = NULL;
_scavenge_root_link = NULL;
_scavenge_root_state = 0;
#if INCLUDE_RTM_OPT
@@ -599,6 +608,7 @@
code_buffer->copy_code_and_locs_to(this);
code_buffer->copy_values_to(this);
+
if (ScavengeRootsInCode) {
Universe::heap()->register_nmethod(this);
}
@@ -757,6 +767,7 @@
code_buffer->copy_values_to(this);
debug_info->copy_to(this);
dependencies->copy_to(this);
+ clear_unloading_state();
if (ScavengeRootsInCode) {
Universe::heap()->register_nmethod(this);
}
@@ -953,7 +964,7 @@
void nmethod::verify_clean_inline_caches() {
- assert_locked_or_safepoint(CompiledIC_lock);
+ assert(CompiledICLocker::is_safe(this), "mt unsafe call");
ResourceMark rm;
RelocIterator iter(this, oops_reloc_begin());
@@ -1025,8 +1036,7 @@
mdo->inc_decompile_count();
}
-void nmethod::make_unloaded(oop cause) {
-
+void nmethod::make_unloaded() {
post_compiled_method_unload();
// This nmethod is being unloaded, make sure that dependencies
@@ -1042,11 +1052,8 @@
LogStream ls(lt);
ls.print("making nmethod " INTPTR_FORMAT
" unloadable, Method*(" INTPTR_FORMAT
- "), cause(" INTPTR_FORMAT ") ",
- p2i(this), p2i(_method), p2i(cause));
- if (cause != NULL) {
- cause->print_value_on(&ls);
- }
+ ") ",
+ p2i(this), p2i(_method));
ls.cr();
}
// Unlink the osr method, so we do not look this up again
@@ -1079,12 +1086,6 @@
// Make the class unloaded - i.e., change state and notify sweeper
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
- if (is_in_use()) {
- // Transitioning directly from live to unloaded -- so
- // we need to force a cache clean-up; remember this
- // for later on.
- CodeCache::set_needs_cache_clean(true);
- }
// Unregister must be done before the state change
Universe::heap()->unregister_nmethod(this);
@@ -1092,7 +1093,7 @@
_state = unloaded;
// Log the unloading.
- log_state_change(cause);
+ log_state_change();
#if INCLUDE_JVMCI
// The method can only be unloaded after the pointer to the installed code
@@ -1116,7 +1117,7 @@
}
}
-void nmethod::log_state_change(oop cause) const {
+void nmethod::log_state_change() const {
if (LogCompilation) {
if (xtty != NULL) {
ttyLocker ttyl; // keep the following output all in one block
@@ -1129,9 +1130,6 @@
(_state == zombie ? " zombie='1'" : ""));
}
log_identity(xtty);
- if (cause != NULL) {
- xtty->print(" cause='%s'", cause->klass()->external_name());
- }
xtty->stamp();
xtty->end_elem();
}
@@ -1337,6 +1335,13 @@
CodeCache::free(this);
}
+oop nmethod::oop_at(int index) const {
+ if (index == 0) {
+ return NULL;
+ }
+ return NativeAccess<AS_NO_KEEPALIVE>::oop_load(oop_addr_at(index));
+}
+
//
// Notify all classes this nmethod is dependent on that it is no
// longer dependent. This should only be called in two situations.
@@ -1380,21 +1385,6 @@
}
}
-
-// If this oop is not live, the nmethod can be unloaded.
-bool nmethod::can_unload(BoolObjectClosure* is_alive, oop* root) {
- assert(root != NULL, "just checking");
- oop obj = *root;
- if (obj == NULL || is_alive->do_object_b(obj)) {
- return false;
- }
-
- // An nmethod might be unloaded simply because one of its constant oops has gone dead.
- // No actual classes need to be unloaded in order for this to occur.
- make_unloaded(obj);
- return true;
-}
-
// ------------------------------------------------------------------
// post_compiled_method_load_event
// new method for install_code() path
@@ -1468,70 +1458,6 @@
set_unload_reported();
}
-bool nmethod::unload_if_dead_at(RelocIterator* iter_at_oop, BoolObjectClosure *is_alive) {
- assert(iter_at_oop->type() == relocInfo::oop_type, "Wrong relocation type");
-
- oop_Relocation* r = iter_at_oop->oop_reloc();
- // Traverse those oops directly embedded in the code.
- // Other oops (oop_index>0) are seen as part of scopes_oops.
- assert(1 == (r->oop_is_immediate()) +
- (r->oop_addr() >= oops_begin() && r->oop_addr() < oops_end()),
- "oop must be found in exactly one place");
- if (r->oop_is_immediate() && r->oop_value() != NULL) {
- // Unload this nmethod if the oop is dead.
- if (can_unload(is_alive, r->oop_addr())) {
- return true;;
- }
- }
-
- return false;
-}
-
-bool nmethod::do_unloading_scopes(BoolObjectClosure* is_alive) {
- // Scopes
- for (oop* p = oops_begin(); p < oops_end(); p++) {
- if (*p == Universe::non_oop_word()) continue; // skip non-oops
- if (can_unload(is_alive, p)) {
- return true;
- }
- }
- return false;
-}
-
-bool nmethod::do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive) {
- // Compiled code
-
- // Prevent extra code cache walk for platforms that don't have immediate oops.
- if (relocInfo::mustIterateImmediateOopsInCode()) {
- RelocIterator iter(this, low_boundary);
- while (iter.next()) {
- if (iter.type() == relocInfo::oop_type) {
- if (unload_if_dead_at(&iter, is_alive)) {
- return true;
- }
- }
- }
- }
-
- return do_unloading_scopes(is_alive);
-}
-
-#if INCLUDE_JVMCI
-bool nmethod::do_unloading_jvmci() {
- if (_jvmci_installed_code != NULL) {
- if (JNIHandles::is_global_weak_cleared(_jvmci_installed_code)) {
- if (_jvmci_installed_code_triggers_invalidation) {
- // The reference to the installed code has been dropped so invalidate
- // this nmethod and allow the sweeper to reclaim it.
- make_not_entrant();
- }
- clear_jvmci_installed_code();
- }
- }
- return false;
-}
-#endif
-
// Iterate over metadata calling this function. Used by RedefineClasses
void nmethod::metadata_do(void f(Metadata*)) {
{
@@ -1579,6 +1505,34 @@
if (_method != NULL) f(_method);
}
+
+// This is called at the end of the strong tracing/marking phase of a
+// GC to unload an nmethod if it contains otherwise unreachable
+// oops.
+
+void nmethod::do_unloading(bool unloading_occurred) {
+ // Make sure the oop's ready to receive visitors
+ assert(!is_zombie() && !is_unloaded(),
+ "should not call follow on zombie or unloaded nmethod");
+
+ if (is_unloading()) {
+ make_unloaded();
+ } else {
+#if INCLUDE_JVMCI
+ if (_jvmci_installed_code != NULL) {
+ if (JNIHandles::is_global_weak_cleared(_jvmci_installed_code)) {
+ if (_jvmci_installed_code_triggers_invalidation) {
+ make_not_entrant();
+ }
+ clear_jvmci_installed_code();
+ }
+ }
+#endif
+
+ unload_nmethod_caches(unloading_occurred);
+ }
+}
+
void nmethod::oops_do(OopClosure* f, bool allow_zombie) {
// make sure the oops ready to receive visitors
assert(allow_zombie || !is_zombie(), "should not call follow on zombie nmethod");
@@ -2115,14 +2069,11 @@
void nmethod::verify_interrupt_point(address call_site) {
// Verify IC only when nmethod installation is finished.
if (!is_not_installed()) {
- Thread *cur = Thread::current();
- if (CompiledIC_lock->owner() == cur ||
- ((cur->is_VM_thread() || cur->is_ConcurrentGC_thread()) &&
- SafepointSynchronize::is_at_safepoint())) {
+ if (CompiledICLocker::is_safe(this)) {
CompiledIC_at(this, call_site);
CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
} else {
- MutexLocker ml_verify (CompiledIC_lock);
+ CompiledICLocker ml_verify(this);
CompiledIC_at(this, call_site);
}
}
@@ -2819,7 +2770,7 @@
switch (iter.type()) {
case relocInfo::virtual_call_type:
case relocInfo::opt_virtual_call_type: {
- VerifyMutexLocker mc(CompiledIC_lock);
+ CompiledICLocker ml_verify(this);
CompiledIC_at(&iter)->print();
break;
}
--- a/src/hotspot/share/code/nmethod.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/code/nmethod.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -323,6 +323,8 @@
bool is_zombie() const { return _state == zombie; }
bool is_unloaded() const { return _state == unloaded; }
+ virtual void do_unloading(bool unloading_occurred);
+
#if INCLUDE_RTM_OPT
// rtm state accessing and manipulating
RTMState rtm_state() const { return _rtm_state; }
@@ -349,7 +351,7 @@
return _state;
}
- void make_unloaded(oop cause);
+ void make_unloaded();
bool has_dependencies() { return dependencies_size() != 0; }
void flush_dependencies(bool delete_immediately);
@@ -363,7 +365,7 @@
// Support for oops in scopes and relocs:
// Note: index 0 is reserved for null.
- oop oop_at(int index) const { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
+ oop oop_at(int index) const;
oop* oop_addr_at(int index) const { // for GC
// relocation indexes are biased by 1 (because 0 is reserved)
assert(index > 0 && index <= oops_count(), "must be a valid non-zero index");
@@ -483,20 +485,6 @@
public:
#endif
- protected:
- virtual bool do_unloading_oops(address low_boundary, BoolObjectClosure* is_alive);
-#if INCLUDE_JVMCI
- // See comment for _jvmci_installed_code_triggers_invalidation field.
- // Returns whether this nmethod was unloaded.
- virtual bool do_unloading_jvmci();
-#endif
-
- private:
- bool do_unloading_scopes(BoolObjectClosure* is_alive);
- // Unload a nmethod if the *root object is dead.
- bool can_unload(BoolObjectClosure* is_alive, oop* root);
- bool unload_if_dead_at(RelocIterator *iter_at_oop, BoolObjectClosure* is_alive);
-
public:
void oops_do(OopClosure* f) { oops_do(f, false); }
void oops_do(OopClosure* f, bool allow_zombie);
@@ -555,7 +543,7 @@
// Logging
void log_identity(xmlStream* log) const;
void log_new_nmethod() const;
- void log_state_change(oop cause = NULL) const;
+ void log_state_change() const;
// Prints block-level comments, including nmethod specific block labels:
virtual void print_block_comment(outputStream* stream, address block_begin) const {
--- a/src/hotspot/share/compiler/compileBroker.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/compiler/compileBroker.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -740,12 +740,11 @@
}
-JavaThread* CompileBroker::make_thread(jobject thread_handle, CompileQueue* queue,
- AbstractCompiler* comp, bool compiler_thread, TRAPS) {
+JavaThread* CompileBroker::make_thread(jobject thread_handle, CompileQueue* queue, AbstractCompiler* comp, TRAPS) {
JavaThread* thread = NULL;
{
MutexLocker mu(Threads_lock, THREAD);
- if (compiler_thread) {
+ if (comp != NULL) {
if (!InjectCompilerCreationFailure || comp->num_compiler_threads() == 0) {
CompilerCounters* counters = new CompilerCounters();
thread = new CompilerThread(queue, counters);
@@ -794,7 +793,7 @@
java_lang_Thread::set_daemon(JNIHandles::resolve_non_null(thread_handle));
thread->set_threadObj(JNIHandles::resolve_non_null(thread_handle));
- if (compiler_thread) {
+ if (comp != NULL) {
thread->as_CompilerThread()->set_compiler(comp);
}
Threads::add(thread);
@@ -804,7 +803,7 @@
// First release lock before aborting VM.
if (thread == NULL || thread->osthread() == NULL) {
- if (UseDynamicNumberOfCompilerThreads && comp->num_compiler_threads() > 0) {
+ if (UseDynamicNumberOfCompilerThreads && comp != NULL && comp->num_compiler_threads() > 0) {
if (thread != NULL) {
thread->smr_delete();
}
@@ -844,12 +843,13 @@
for (int i = 0; i < _c2_count; i++) {
// Create a name for our thread.
sprintf(name_buffer, "%s CompilerThread%d", _compilers[1]->name(), i);
- jobject thread_handle = JNIHandles::make_global(create_thread_oop(name_buffer, THREAD));
+ Handle thread_oop = create_thread_oop(name_buffer, CHECK);
+ jobject thread_handle = JNIHandles::make_global(thread_oop);
_compiler2_objects[i] = thread_handle;
_compiler2_logs[i] = NULL;
if (!UseDynamicNumberOfCompilerThreads || i == 0) {
- JavaThread *ct = make_thread(thread_handle, _c2_compile_queue, _compilers[1], /* compiler_thread */ true, CHECK);
+ JavaThread *ct = make_thread(thread_handle, _c2_compile_queue, _compilers[1], CHECK);
assert(ct != NULL, "should have been handled for initial thread");
_compilers[1]->set_num_compiler_threads(i + 1);
if (TraceCompilerThreads) {
@@ -863,12 +863,13 @@
for (int i = 0; i < _c1_count; i++) {
// Create a name for our thread.
sprintf(name_buffer, "C1 CompilerThread%d", i);
- jobject thread_handle = JNIHandles::make_global(create_thread_oop(name_buffer, THREAD));
+ Handle thread_oop = create_thread_oop(name_buffer, CHECK);
+ jobject thread_handle = JNIHandles::make_global(thread_oop);
_compiler1_objects[i] = thread_handle;
_compiler1_logs[i] = NULL;
if (!UseDynamicNumberOfCompilerThreads || i == 0) {
- JavaThread *ct = make_thread(thread_handle, _c1_compile_queue, _compilers[0], /* compiler_thread */ true, CHECK);
+ JavaThread *ct = make_thread(thread_handle, _c1_compile_queue, _compilers[0], CHECK);
assert(ct != NULL, "should have been handled for initial thread");
_compilers[0]->set_num_compiler_threads(i + 1);
if (TraceCompilerThreads) {
@@ -885,8 +886,9 @@
if (MethodFlushing) {
// Initialize the sweeper thread
- jobject thread_handle = JNIHandles::make_local(THREAD, create_thread_oop("Sweeper thread", THREAD)());
- make_thread(thread_handle, NULL, NULL, /* compiler_thread */ false, CHECK);
+ Handle thread_oop = create_thread_oop("Sweeper thread", CHECK);
+ jobject thread_handle = JNIHandles::make_local(THREAD, thread_oop());
+ make_thread(thread_handle, NULL, NULL, CHECK);
}
}
@@ -909,7 +911,7 @@
(int)(available_cc_np / (128*K)));
for (int i = old_c2_count; i < new_c2_count; i++) {
- JavaThread *ct = make_thread(compiler2_object(i), _c2_compile_queue, _compilers[1], true, CHECK);
+ JavaThread *ct = make_thread(compiler2_object(i), _c2_compile_queue, _compilers[1], CHECK);
if (ct == NULL) break;
_compilers[1]->set_num_compiler_threads(i + 1);
if (TraceCompilerThreads) {
@@ -929,7 +931,7 @@
(int)(available_cc_p / (128*K)));
for (int i = old_c1_count; i < new_c1_count; i++) {
- JavaThread *ct = make_thread(compiler1_object(i), _c1_compile_queue, _compilers[0], true, CHECK);
+ JavaThread *ct = make_thread(compiler1_object(i), _c1_compile_queue, _compilers[0], CHECK);
if (ct == NULL) break;
_compilers[0]->set_num_compiler_threads(i + 1);
if (TraceCompilerThreads) {
--- a/src/hotspot/share/compiler/compileBroker.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/compiler/compileBroker.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -230,8 +230,7 @@
static volatile int _print_compilation_warning;
static Handle create_thread_oop(const char* name, TRAPS);
- static JavaThread* make_thread(jobject thread_oop, CompileQueue* queue,
- AbstractCompiler* comp, bool compiler_thread, TRAPS);
+ static JavaThread* make_thread(jobject thread_oop, CompileQueue* queue, AbstractCompiler* comp, TRAPS);
static void init_compiler_sweeper_threads();
static void possibly_add_compiler_threads();
static bool compilation_is_complete (const methodHandle& method, int osr_bci, int comp_level);
--- a/src/hotspot/share/gc/cms/parNewGeneration.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/cms/parNewGeneration.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -888,11 +888,6 @@
init_assuming_no_promotion_failure();
- if (UseAdaptiveSizePolicy) {
- set_survivor_overflow(false);
- size_policy->minor_collection_begin();
- }
-
GCTraceTime(Trace, gc, phases) t1("ParNew", NULL, gch->gc_cause());
age_table()->clear();
@@ -1017,11 +1012,6 @@
TASKQUEUE_STATS_ONLY(thread_state_set.print_termination_stats());
TASKQUEUE_STATS_ONLY(thread_state_set.print_taskqueue_stats());
- if (UseAdaptiveSizePolicy) {
- size_policy->minor_collection_end(gch->gc_cause());
- size_policy->avg_survived()->sample(from()->used());
- }
-
// We need to use a monotonically non-decreasing time in ms
// or we will see time-warp warnings and os::javaTimeMillis()
// does not guarantee monotonicity.
@@ -1108,9 +1098,6 @@
// Try allocating obj in to-space (unless too old)
if (dummyOld.age() < tenuring_threshold()) {
new_obj = (oop)par_scan_state->alloc_in_to_space(sz);
- if (new_obj == NULL) {
- set_survivor_overflow(true);
- }
}
if (new_obj == NULL) {
--- a/src/hotspot/share/gc/cms/parNewGeneration.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/cms/parNewGeneration.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -346,11 +346,6 @@
protected:
- bool _survivor_overflow;
-
- bool survivor_overflow() { return _survivor_overflow; }
- void set_survivor_overflow(bool v) { _survivor_overflow = v; }
-
void restore_preserved_marks();
public:
--- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -30,9 +30,11 @@
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/heapRegion.hpp"
#include "opto/arraycopynode.hpp"
+#include "opto/compile.hpp"
#include "opto/graphKit.hpp"
#include "opto/idealKit.hpp"
#include "opto/macro.hpp"
+#include "opto/rootnode.hpp"
#include "opto/type.hpp"
#include "utilities/macros.hpp"
@@ -594,8 +596,6 @@
Node* G1BarrierSetC2::load_at_resolved(C2Access& access, const Type* val_type) const {
DecoratorSet decorators = access.decorators();
- GraphKit* kit = access.kit();
-
Node* adr = access.addr().node();
Node* obj = access.base();
@@ -606,7 +606,8 @@
bool is_unordered = (decorators & MO_UNORDERED) != 0;
bool need_cpu_mem_bar = !is_unordered || mismatched || !in_heap;
- Node* offset = adr->is_AddP() ? adr->in(AddPNode::Offset) : kit->top();
+ Node* top = Compile::current()->top();
+ Node* offset = adr->is_AddP() ? adr->in(AddPNode::Offset) : top;
Node* load = CardTableBarrierSetC2::load_at_resolved(access, val_type);
// If we are reading the value of the referent field of a Reference
@@ -616,12 +617,16 @@
// Also we need to add memory barrier to prevent commoning reads
// from this field across safepoint since GC can change its value.
bool need_read_barrier = in_heap && (on_weak ||
- (unknown && offset != kit->top() && obj != kit->top()));
+ (unknown && offset != top && obj != top));
if (!access.is_oop() || !need_read_barrier) {
return load;
}
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
+
if (on_weak) {
// Use the pre-barrier to record the value in the referent field
pre_barrier(kit, false /* do_load */,
@@ -770,3 +775,68 @@
}
return c;
}
+
+#ifdef ASSERT
+void G1BarrierSetC2::verify_gc_barriers(Compile* compile, CompilePhase phase) const {
+ if (phase != BarrierSetC2::BeforeCodeGen) {
+ return;
+ }
+ // Verify G1 pre-barriers
+ const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
+
+ ResourceArea *area = Thread::current()->resource_area();
+ Unique_Node_List visited(area);
+ Node_List worklist(area);
+ // We're going to walk control flow backwards starting from the Root
+ worklist.push(compile->root());
+ while (worklist.size() > 0) {
+ Node* x = worklist.pop();
+ if (x == NULL || x == compile->top()) continue;
+ if (visited.member(x)) {
+ continue;
+ } else {
+ visited.push(x);
+ }
+
+ if (x->is_Region()) {
+ for (uint i = 1; i < x->req(); i++) {
+ worklist.push(x->in(i));
+ }
+ } else {
+ worklist.push(x->in(0));
+ // We are looking for the pattern:
+ // /->ThreadLocal
+ // If->Bool->CmpI->LoadB->AddP->ConL(marking_offset)
+ // \->ConI(0)
+ // We want to verify that the If and the LoadB have the same control
+ // See GraphKit::g1_write_barrier_pre()
+ if (x->is_If()) {
+ IfNode *iff = x->as_If();
+ if (iff->in(1)->is_Bool() && iff->in(1)->in(1)->is_Cmp()) {
+ CmpNode *cmp = iff->in(1)->in(1)->as_Cmp();
+ if (cmp->Opcode() == Op_CmpI && cmp->in(2)->is_Con() && cmp->in(2)->bottom_type()->is_int()->get_con() == 0
+ && cmp->in(1)->is_Load()) {
+ LoadNode* load = cmp->in(1)->as_Load();
+ if (load->Opcode() == Op_LoadB && load->in(2)->is_AddP() && load->in(2)->in(2)->Opcode() == Op_ThreadLocal
+ && load->in(2)->in(3)->is_Con()
+ && load->in(2)->in(3)->bottom_type()->is_intptr_t()->get_con() == marking_offset) {
+
+ Node* if_ctrl = iff->in(0);
+ Node* load_ctrl = load->in(0);
+
+ if (if_ctrl != load_ctrl) {
+ // Skip possible CProj->NeverBranch in infinite loops
+ if ((if_ctrl->is_Proj() && if_ctrl->Opcode() == Op_CProj)
+ && (if_ctrl->in(0)->is_MultiBranch() && if_ctrl->in(0)->Opcode() == Op_NeverBranch)) {
+ if_ctrl = if_ctrl->in(0)->in(0);
+ }
+ }
+ assert(load_ctrl != NULL && if_ctrl == load_ctrl, "controls must match");
+ }
+ }
+ }
+ }
+ }
+ }
+}
+#endif
--- a/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/g1/c2/g1BarrierSetC2.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -88,6 +88,10 @@
virtual bool is_gc_barrier_node(Node* node) const;
virtual void eliminate_gc_barrier(PhaseMacroExpand* macro, Node* node) const;
virtual Node* step_over_gc_barrier(Node* c) const;
+
+#ifdef ASSERT
+ virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
+#endif
};
#endif // SHARE_GC_SHARED_C2_G1BARRIERSETC2_HPP
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -62,6 +62,7 @@
#include "gc/g1/heapRegionSet.inline.hpp"
#include "gc/g1/vm_operations_g1.hpp"
#include "gc/shared/adaptiveSizePolicy.hpp"
+#include "gc/shared/gcBehaviours.hpp"
#include "gc/shared/gcHeapSummary.hpp"
#include "gc/shared/gcId.hpp"
#include "gc/shared/gcLocker.hpp"
--- a/src/hotspot/share/gc/shared/accessBarrierSupport.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/accessBarrierSupport.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -28,8 +28,16 @@
#include "oops/access.hpp"
DecoratorSet AccessBarrierSupport::resolve_unknown_oop_ref_strength(DecoratorSet decorators, oop base, ptrdiff_t offset) {
+ // Note that the referent in a FinalReference is technically not strong.
+ // However, it always behaves like one in practice. The two cases are:
+ // 1) A mutator calls Reference.get(). However, a mutator can only ever
+ // see inactive FinalReferences, whose referents really are strong.
+ // 2) A GC heap walking operation. In this case the GC can see active
+ // FinalReferences, but the GC always wants to follow the referent
+ // as if it was strong.
DecoratorSet ds = decorators & ~ON_UNKNOWN_OOP_REF;
- if (!java_lang_ref_Reference::is_referent_field(base, offset)) {
+ if (!java_lang_ref_Reference::is_referent_field(base, offset) ||
+ java_lang_ref_Reference::is_final(base)) {
ds |= ON_STRONG_OOP_REF;
} else if (java_lang_ref_Reference::is_phantom(base)) {
ds |= ON_PHANTOM_OOP_REF;
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -35,10 +35,12 @@
// By default this is a no-op.
void BarrierSetC2::resolve_address(C2Access& access) const { }
-void* C2Access::barrier_set_state() const {
+void* C2ParseAccess::barrier_set_state() const {
return _kit->barrier_set_state();
}
+PhaseGVN& C2ParseAccess::gvn() const { return _kit->gvn(); }
+
bool C2Access::needs_cpu_membar() const {
bool mismatched = (_decorators & C2_MISMATCHED) != 0;
bool is_unordered = (_decorators & MO_UNORDERED) != 0;
@@ -70,7 +72,6 @@
Node* BarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const {
DecoratorSet decorators = access.decorators();
- GraphKit* kit = access.kit();
bool mismatched = (decorators & C2_MISMATCHED) != 0;
bool unaligned = (decorators & C2_UNALIGNED) != 0;
@@ -79,22 +80,49 @@
bool in_native = (decorators & IN_NATIVE) != 0;
assert(!in_native, "not supported yet");
- if (access.type() == T_DOUBLE) {
- Node* new_val = kit->dstore_rounding(val.node());
- val.set_node(new_val);
- }
-
MemNode::MemOrd mo = access.mem_node_mo();
- Node* store = kit->store_to_memory(kit->control(), access.addr().node(), val.node(), access.type(),
+ Node* store;
+ if (access.is_parse_access()) {
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+
+ GraphKit* kit = parse_access.kit();
+ if (access.type() == T_DOUBLE) {
+ Node* new_val = kit->dstore_rounding(val.node());
+ val.set_node(new_val);
+ }
+
+ store = kit->store_to_memory(kit->control(), access.addr().node(), val.node(), access.type(),
access.addr().type(), mo, requires_atomic_access, unaligned, mismatched);
- access.set_raw_access(store);
+ access.set_raw_access(store);
+ } else {
+ assert(!requires_atomic_access, "not yet supported");
+ assert(access.is_opt_access(), "either parse or opt access");
+ C2OptAccess& opt_access = static_cast<C2OptAccess&>(access);
+ Node* ctl = opt_access.ctl();
+ MergeMemNode* mm = opt_access.mem();
+ PhaseGVN& gvn = opt_access.gvn();
+ const TypePtr* adr_type = access.addr().type();
+ int alias = gvn.C->get_alias_index(adr_type);
+ Node* mem = mm->memory_at(alias);
+
+ StoreNode* st = StoreNode::make(gvn, ctl, mem, access.addr().node(), adr_type, val.node(), access.type(), mo);
+ if (unaligned) {
+ st->set_unaligned_access();
+ }
+ if (mismatched) {
+ st->set_mismatched_access();
+ }
+ store = gvn.transform(st);
+ if (store == st) {
+ mm->set_memory_at(alias, st);
+ }
+ }
return store;
}
Node* BarrierSetC2::load_at_resolved(C2Access& access, const Type* val_type) const {
DecoratorSet decorators = access.decorators();
- GraphKit* kit = access.kit();
Node* adr = access.addr().node();
const TypePtr* adr_type = access.addr().type();
@@ -109,16 +137,31 @@
MemNode::MemOrd mo = access.mem_node_mo();
LoadNode::ControlDependency dep = pinned ? LoadNode::Pinned : LoadNode::DependsOnlyOnTest;
- Node* control = control_dependent ? kit->control() : NULL;
Node* load;
- if (in_native) {
- load = kit->make_load(control, adr, val_type, access.type(), mo);
+ if (access.is_parse_access()) {
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
+ Node* control = control_dependent ? kit->control() : NULL;
+
+ if (in_native) {
+ load = kit->make_load(control, adr, val_type, access.type(), mo);
+ } else {
+ load = kit->make_load(control, adr, val_type, access.type(), adr_type, mo,
+ dep, requires_atomic_access, unaligned, mismatched);
+ }
+ access.set_raw_access(load);
} else {
- load = kit->make_load(control, adr, val_type, access.type(), adr_type, mo,
- dep, requires_atomic_access, unaligned, mismatched);
+ assert(!requires_atomic_access, "not yet supported");
+ assert(access.is_opt_access(), "either parse or opt access");
+ C2OptAccess& opt_access = static_cast<C2OptAccess&>(access);
+ Node* control = control_dependent ? opt_access.ctl() : NULL;
+ MergeMemNode* mm = opt_access.mem();
+ PhaseGVN& gvn = opt_access.gvn();
+ Node* mem = mm->memory_at(gvn.C->get_alias_index(adr_type));
+ load = LoadNode::make(gvn, control, mem, adr, adr_type, val_type, access.type(), mo, dep, unaligned, mismatched);
+ load = gvn.transform(load);
}
- access.set_raw_access(load);
return load;
}
@@ -130,7 +173,11 @@
public:
C2AccessFence(C2Access& access) :
_access(access), _leading_membar(NULL) {
- GraphKit* kit = access.kit();
+ GraphKit* kit = NULL;
+ if (access.is_parse_access()) {
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ kit = parse_access.kit();
+ }
DecoratorSet decorators = access.decorators();
bool is_write = (decorators & C2_WRITE_ACCESS) != 0;
@@ -141,6 +188,7 @@
bool is_release = (decorators & MO_RELEASE) != 0;
if (is_atomic) {
+ assert(kit != NULL, "unsupported at optimization time");
// Memory-model-wise, a LoadStore acts like a little synchronized
// block, so needs barriers on each side. These don't translate
// into actual barriers on most machines, but we still need rest of
@@ -159,6 +207,7 @@
// floating down past the volatile write. Also prevents commoning
// another volatile read.
if (is_volatile || is_release) {
+ assert(kit != NULL, "unsupported at optimization time");
_leading_membar = kit->insert_mem_bar(Op_MemBarRelease);
}
} else {
@@ -168,11 +217,13 @@
// so there's no problems making a strong assert about mixing users
// of safe & unsafe memory.
if (is_volatile && support_IRIW_for_not_multiple_copy_atomic_cpu) {
+ assert(kit != NULL, "unsupported at optimization time");
_leading_membar = kit->insert_mem_bar(Op_MemBarVolatile);
}
}
if (access.needs_cpu_membar()) {
+ assert(kit != NULL, "unsupported at optimization time");
kit->insert_mem_bar(Op_MemBarCPUOrder);
}
@@ -185,7 +236,11 @@
}
~C2AccessFence() {
- GraphKit* kit = _access.kit();
+ GraphKit* kit = NULL;
+ if (_access.is_parse_access()) {
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(_access);
+ kit = parse_access.kit();
+ }
DecoratorSet decorators = _access.decorators();
bool is_write = (decorators & C2_WRITE_ACCESS) != 0;
@@ -202,6 +257,7 @@
}
if (is_atomic) {
+ assert(kit != NULL, "unsupported at optimization time");
if (is_acquire || is_volatile) {
Node* n = _access.raw_access();
Node* mb = kit->insert_mem_bar(Op_MemBarAcquire, n);
@@ -212,6 +268,7 @@
} else if (is_write) {
// If not multiple copy atomic, we do the MemBarVolatile before the load.
if (is_volatile && !support_IRIW_for_not_multiple_copy_atomic_cpu) {
+ assert(kit != NULL, "unsupported at optimization time");
Node* n = _access.raw_access();
Node* mb = kit->insert_mem_bar(Op_MemBarVolatile, n); // Use fat membar
if (_leading_membar != NULL) {
@@ -220,6 +277,7 @@
}
} else {
if (is_volatile || is_acquire) {
+ assert(kit != NULL, "unsupported at optimization time");
Node* n = _access.raw_access();
assert(_leading_membar == NULL || support_IRIW_for_not_multiple_copy_atomic_cpu, "no leading membar expected");
Node* mb = kit->insert_mem_bar(Op_MemBarAcquire, n);
@@ -295,7 +353,7 @@
if (!needs_cpu_membar() && adr_type->isa_instptr()) {
assert(adr_type->meet(TypePtr::NULL_PTR) != adr_type->remove_speculative(), "should be not null");
intptr_t offset = Type::OffsetBot;
- AddPNode::Ideal_base_and_offset(adr, &_kit->gvn(), offset);
+ AddPNode::Ideal_base_and_offset(adr, &gvn(), offset);
if (offset >= 0) {
int s = Klass::layout_helper_size_in_bytes(adr_type->isa_instptr()->klass()->layout_helper());
if (offset < s) {
@@ -310,26 +368,28 @@
//--------------------------- atomic operations---------------------------------
-void BarrierSetC2::pin_atomic_op(C2AtomicAccess& access) const {
+void BarrierSetC2::pin_atomic_op(C2AtomicParseAccess& access) const {
if (!access.needs_pinning()) {
return;
}
// SCMemProjNodes represent the memory state of a LoadStore. Their
// main role is to prevent LoadStore nodes from being optimized away
// when their results aren't used.
- GraphKit* kit = access.kit();
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
Node* load_store = access.raw_access();
assert(load_store != NULL, "must pin atomic op");
Node* proj = kit->gvn().transform(new SCMemProjNode(load_store));
kit->set_memory(proj, access.alias_idx());
}
-void C2AtomicAccess::set_memory() {
+void C2AtomicParseAccess::set_memory() {
Node *mem = _kit->memory(_alias_idx);
_memory = mem;
}
-Node* BarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* BarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
MemNode::MemOrd mo = access.mem_node_mo();
@@ -386,7 +446,7 @@
return load_store;
}
-Node* BarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* BarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
DecoratorSet decorators = access.decorators();
@@ -460,7 +520,7 @@
return load_store;
}
-Node* BarrierSetC2::atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* value_type) const {
+Node* BarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
Node* mem = access.memory();
Node* adr = access.addr().node();
@@ -508,7 +568,7 @@
return load_store;
}
-Node* BarrierSetC2::atomic_add_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* value_type) const {
+Node* BarrierSetC2::atomic_add_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const {
Node* load_store = NULL;
GraphKit* kit = access.kit();
Node* adr = access.addr().node();
@@ -538,27 +598,27 @@
return load_store;
}
-Node* BarrierSetC2::atomic_cmpxchg_val_at(C2AtomicAccess& access, Node* expected_val,
+Node* BarrierSetC2::atomic_cmpxchg_val_at(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
C2AccessFence fence(access);
resolve_address(access);
return atomic_cmpxchg_val_at_resolved(access, expected_val, new_val, value_type);
}
-Node* BarrierSetC2::atomic_cmpxchg_bool_at(C2AtomicAccess& access, Node* expected_val,
+Node* BarrierSetC2::atomic_cmpxchg_bool_at(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
C2AccessFence fence(access);
resolve_address(access);
return atomic_cmpxchg_bool_at_resolved(access, expected_val, new_val, value_type);
}
-Node* BarrierSetC2::atomic_xchg_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const {
+Node* BarrierSetC2::atomic_xchg_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const {
C2AccessFence fence(access);
resolve_address(access);
return atomic_xchg_at_resolved(access, new_val, value_type);
}
-Node* BarrierSetC2::atomic_add_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const {
+Node* BarrierSetC2::atomic_add_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const {
C2AccessFence fence(access);
resolve_address(access);
return atomic_add_at_resolved(access, new_val, value_type);
@@ -594,7 +654,7 @@
const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
- ArrayCopyNode* ac = ArrayCopyNode::make(kit, false, src_base, NULL, dst_base, NULL, countx, false, false);
+ ArrayCopyNode* ac = ArrayCopyNode::make(kit, false, src_base, NULL, dst_base, NULL, countx, true, false);
ac->set_clonebasic();
Node* n = kit->gvn().transform(ac);
if (n == ac) {
@@ -731,3 +791,8 @@
}
return fast_oop;
}
+
+void BarrierSetC2::clone_barrier_at_expansion(ArrayCopyNode* ac, Node* call, PhaseIterGVN& igvn) const {
+ // no barrier
+ igvn.replace_node(ac, call);
+}
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -49,7 +49,12 @@
const DecoratorSet C2_WRITE_ACCESS = DECORATOR_LAST << 7;
// This denotes that the access reads state.
const DecoratorSet C2_READ_ACCESS = DECORATOR_LAST << 8;
+// A nearby allocation?
+const DecoratorSet C2_TIGHLY_COUPLED_ALLOC = DECORATOR_LAST << 9;
+// Loads and stores from an arraycopy being optimized
+const DecoratorSet C2_ARRAY_COPY = DECORATOR_LAST << 10;
+class Compile;
class GraphKit;
class IdealKit;
class Node;
@@ -88,7 +93,6 @@
// BarrierSetC2 backend hierarchy, for loads and stores, to reduce boiler plate.
class C2Access: public StackObj {
protected:
- GraphKit* _kit;
DecoratorSet _decorators;
BasicType _type;
Node* _base;
@@ -96,22 +100,17 @@
Node* _raw_access;
void fixup_decorators();
- void* barrier_set_state() const;
public:
- C2Access(GraphKit* kit, DecoratorSet decorators,
+ C2Access(DecoratorSet decorators,
BasicType type, Node* base, C2AccessValuePtr& addr) :
- _kit(kit),
_decorators(decorators),
_type(type),
_base(base),
_addr(addr),
_raw_access(NULL)
- {
- fixup_decorators();
- }
+ {}
- GraphKit* kit() const { return _kit; }
DecoratorSet decorators() const { return _decorators; }
Node* base() const { return _base; }
C2AccessValuePtr& addr() const { return _addr; }
@@ -126,23 +125,48 @@
MemNode::MemOrd mem_node_mo() const;
bool needs_cpu_membar() const;
+ virtual PhaseGVN& gvn() const = 0;
+ virtual bool is_parse_access() const { return false; }
+ virtual bool is_opt_access() const { return false; }
+};
+
+// C2Access for parse time calls to the BarrierSetC2 backend.
+class C2ParseAccess: public C2Access {
+protected:
+ GraphKit* _kit;
+
+ void* barrier_set_state() const;
+
+public:
+ C2ParseAccess(GraphKit* kit, DecoratorSet decorators,
+ BasicType type, Node* base, C2AccessValuePtr& addr) :
+ C2Access(decorators, type, base, addr),
+ _kit(kit) {
+ fixup_decorators();
+ }
+
+ GraphKit* kit() const { return _kit; }
+
template <typename T>
T barrier_set_state_as() const {
return reinterpret_cast<T>(barrier_set_state());
}
+
+ virtual PhaseGVN& gvn() const;
+ virtual bool is_parse_access() const { return true; }
};
// This class wraps a bunch of context parameters thare are passed around in the
// BarrierSetC2 backend hierarchy, for atomic accesses, to reduce boiler plate.
-class C2AtomicAccess: public C2Access {
+class C2AtomicParseAccess: public C2ParseAccess {
Node* _memory;
uint _alias_idx;
bool _needs_pinning;
public:
- C2AtomicAccess(GraphKit* kit, DecoratorSet decorators, BasicType type,
+ C2AtomicParseAccess(GraphKit* kit, DecoratorSet decorators, BasicType type,
Node* base, C2AccessValuePtr& addr, uint alias_idx) :
- C2Access(kit, decorators, type, base, addr),
+ C2ParseAccess(kit, decorators, type, base, addr),
_memory(NULL),
_alias_idx(alias_idx),
_needs_pinning(true) {}
@@ -157,6 +181,31 @@
void set_needs_pinning(bool value) { _needs_pinning = value; }
};
+// C2Access for optimization time calls to the BarrierSetC2 backend.
+class C2OptAccess: public C2Access {
+ PhaseGVN& _gvn;
+ MergeMemNode* _mem;
+ Node* _ctl;
+
+public:
+ C2OptAccess(PhaseGVN& gvn, Node* ctl, MergeMemNode* mem, DecoratorSet decorators,
+ BasicType type, Node* base, C2AccessValuePtr& addr) :
+ C2Access(decorators, type, base, addr),
+ _gvn(gvn), _mem(mem), _ctl(ctl) {
+ fixup_decorators();
+ }
+
+
+ MergeMemNode* mem() const { return _mem; }
+ Node* ctl() const { return _ctl; }
+ // void set_mem(Node* mem) { _mem = mem; }
+ void set_ctl(Node* ctl) { _ctl = ctl; }
+
+ virtual PhaseGVN& gvn() const { return _gvn; }
+ virtual bool is_opt_access() const { return true; }
+};
+
+
// This is the top-level class for the backend of the Access API in C2.
// The top-level class is responsible for performing raw accesses. The
// various GC barrier sets inherit from the BarrierSetC2 class to sprinkle
@@ -167,25 +216,25 @@
virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
virtual Node* load_at_resolved(C2Access& access, const Type* val_type) const;
- virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* val_type) const;
- virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const;
- virtual Node* atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
- virtual Node* atomic_add_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const;
- void pin_atomic_op(C2AtomicAccess& access) const;
+ virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
+ virtual Node* atomic_add_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const;
+ void pin_atomic_op(C2AtomicParseAccess& access) const;
public:
// This is the entry-point for the backend to perform accesses through the Access API.
virtual Node* store_at(C2Access& access, C2AccessValue& val) const;
virtual Node* load_at(C2Access& access, const Type* val_type) const;
- virtual Node* atomic_cmpxchg_val_at(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_val_at(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* val_type) const;
- virtual Node* atomic_cmpxchg_bool_at(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_bool_at(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* val_type) const;
- virtual Node* atomic_xchg_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
- virtual Node* atomic_add_at(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
+ virtual Node* atomic_xchg_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
+ virtual Node* atomic_add_at(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
virtual void clone(GraphKit* kit, Node* src, Node* dst, Node* size, bool is_array) const;
@@ -196,6 +245,9 @@
Node*& fast_oop_ctrl, Node*& fast_oop_rawmem,
intx prefetch_lines) const;
+ virtual Node* ideal_node(PhaseGVN* phase, Node* n, bool can_reshape) const { return NULL; }
+ virtual Node* identity_node(PhaseGVN* phase, Node* n) const { return n; }
+
// These are general helper methods used by C2
enum ArrayCopyPhase {
Parsing,
@@ -203,6 +255,7 @@
Expansion
};
virtual bool array_copy_requires_gc_barriers(bool tightly_coupled_alloc, BasicType type, bool is_clone, ArrayCopyPhase phase) const { return false; }
+ virtual void clone_barrier_at_expansion(ArrayCopyNode* ac, Node* call, PhaseIterGVN& igvn) const;
// Support for GC barriers emitted during parsing
virtual bool has_load_barriers() const { return false; }
@@ -223,7 +276,21 @@
// If the BarrierSetC2 state has kept macro nodes in its compilation unit state to be
// expanded later, then now is the time to do so.
virtual bool expand_macro_nodes(PhaseMacroExpand* macro) const { return false; }
- virtual void verify_gc_barriers(bool post_parse) const {}
+
+ enum CompilePhase {
+ BeforeOptimize, /* post_parse = true */
+ BeforeExpand, /* post_parse = false */
+ BeforeCodeGen
+ };
+ virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const {}
+
+ virtual bool flatten_gc_alias_type(const TypePtr*& adr_type) const { return false; }
+#ifdef ASSERT
+ virtual bool verify_gc_alias_type(const TypePtr* adr_type, int offset) const { return false; }
+#endif
+
+ virtual bool final_graph_reshaping(Compile* compile, Node* n, uint opcode) const { return false; }
+
};
#endif // SHARE_GC_SHARED_C2_BARRIERSETC2_HPP
--- a/src/hotspot/share/gc/shared/c2/modRefBarrierSetC2.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/c2/modRefBarrierSetC2.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -32,7 +32,6 @@
Node* ModRefBarrierSetC2::store_at_resolved(C2Access& access, C2AccessValue& val) const {
DecoratorSet decorators = access.decorators();
- GraphKit* kit = access.kit();
const TypePtr* adr_type = access.addr().type();
Node* adr = access.addr().node();
@@ -41,11 +40,16 @@
bool anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
bool in_heap = (decorators & IN_HEAP) != 0;
bool use_precise = is_array || anonymous;
+ bool tighly_coupled_alloc = (decorators & C2_TIGHLY_COUPLED_ALLOC) != 0;
- if (!access.is_oop() || (!in_heap && !anonymous)) {
+ if (!access.is_oop() || tighly_coupled_alloc || (!in_heap && !anonymous)) {
return BarrierSetC2::store_at_resolved(access, val);
}
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
+
uint adr_idx = kit->C->get_alias_index(adr_type);
assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
@@ -58,7 +62,7 @@
return store;
}
-Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* ModRefBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
@@ -78,7 +82,7 @@
return result;
}
-Node* ModRefBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* ModRefBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
@@ -114,7 +118,7 @@
return load_store;
}
-Node* ModRefBarrierSetC2::atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* value_type) const {
+Node* ModRefBarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const {
GraphKit* kit = access.kit();
Node* result = BarrierSetC2::atomic_xchg_at_resolved(access, new_val, value_type);
--- a/src/hotspot/share/gc/shared/c2/modRefBarrierSetC2.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/c2/modRefBarrierSetC2.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -54,11 +54,11 @@
virtual Node* store_at_resolved(C2Access& access, C2AccessValue& val) const;
- virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const;
- virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
+ virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const;
- virtual Node* atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* value_type) const;
+ virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* value_type) const;
};
#endif // SHARE_GC_SHARED_C2_MODREFBARRIERSETC2_HPP
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -580,6 +580,11 @@
virtual size_t obj_size(oop obj) const;
+ // Cells are memory slices allocated by the allocator. Objects are initialized
+ // in cells. The cell itself may have a header, found at a negative offset of
+ // oops. Usually, the size of the cell header is 0, but it may be larger.
+ virtual ptrdiff_t cell_header_size() const { return 0; }
+
// Non product verification and debugging.
#ifndef PRODUCT
// Support for PromotionFailureALot. Return true if it's time to cause a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/gc/shared/gcBehaviours.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "code/compiledMethod.hpp"
+#include "code/nmethod.hpp"
+#include "gc/shared/gcBehaviours.hpp"
+
+IsUnloadingBehaviour* IsUnloadingBehaviour::_current = NULL;
+
+class IsCompiledMethodUnloadingOopClosure: public OopClosure {
+ BoolObjectClosure *_cl;
+ bool _is_unloading;
+
+public:
+ IsCompiledMethodUnloadingOopClosure(BoolObjectClosure* cl)
+ : _cl(cl),
+ _is_unloading(false)
+ { }
+
+ virtual void do_oop(oop* p) {
+ if (_is_unloading) {
+ return;
+ }
+ oop obj = *p;
+ if (obj == NULL) {
+ return;
+ }
+ if (!_cl->do_object_b(obj)) {
+ _is_unloading = true;
+ }
+ }
+
+ virtual void do_oop(narrowOop* p) {
+ ShouldNotReachHere();
+ }
+
+ bool is_unloading() const {
+ return _is_unloading;
+ }
+};
+
+bool ClosureIsUnloadingBehaviour::is_unloading(CompiledMethod* cm) const {
+ if (cm->is_nmethod()) {
+ IsCompiledMethodUnloadingOopClosure cl(_cl);
+ static_cast<nmethod*>(cm)->oops_do(&cl);
+ return cl.is_unloading();
+ } else {
+ return false;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/gc/shared/gcBehaviours.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_GC_SHARED_BEHAVIOURS_HPP
+#define SHARE_GC_SHARED_BEHAVIOURS_HPP
+
+#include "memory/iterator.hpp"
+#include "oops/oopsHierarchy.hpp"
+
+// This is the behaviour for checking if a CompiledMethod is unloading
+// or has unloaded due to having phantomly dead oops in it after a GC.
+class IsUnloadingBehaviour {
+ static IsUnloadingBehaviour* _current;
+
+public:
+ virtual bool is_unloading(CompiledMethod* cm) const = 0;
+ static IsUnloadingBehaviour* current() { return _current; }
+ static void set_current(IsUnloadingBehaviour* current) { _current = current; }
+};
+
+class ClosureIsUnloadingBehaviour: public IsUnloadingBehaviour {
+ BoolObjectClosure *const _cl;
+
+public:
+ ClosureIsUnloadingBehaviour(BoolObjectClosure* is_alive)
+ : _cl(is_alive)
+ { }
+
+ virtual bool is_unloading(CompiledMethod* cm) const;
+};
+
+#endif // SHARE_GC_SHARED_BEHAVIOURS_HPP
--- a/src/hotspot/share/gc/shared/gc_globals.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/gc_globals.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -372,12 +372,6 @@
develop(uintx, MetadataAllocationFailALotInterval, 1000, \
"Metadata allocation failure a lot interval") \
\
- notproduct(bool, ExecuteInternalVMTests, false, \
- "Enable execution of internal VM tests") \
- \
- notproduct(bool, VerboseInternalVMTests, false, \
- "Turn on logging for internal VM tests.") \
- \
product(bool, ExecutingUnitTests, false, \
"Whether the JVM is running unit tests or not") \
\
--- a/src/hotspot/share/gc/shared/oopStorage.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/oopStorage.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -31,6 +31,7 @@
#include "runtime/atomic.hpp"
#include "runtime/globals.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/mutex.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/orderAccess.hpp"
@@ -254,15 +255,15 @@
return bitmask_for_index(get_index(ptr));
}
-// A block is deletable if
-// (1) It is empty.
-// (2) There is not a release() operation currently operating on it.
-// (3) It is not in the deferred updates list.
-// The order of tests is important for proper interaction between release()
-// and concurrent deletion.
-bool OopStorage::Block::is_deletable() const {
- return (OrderAccess::load_acquire(&_allocated_bitmask) == 0) &&
- (OrderAccess::load_acquire(&_release_refcount) == 0) &&
+// An empty block is not yet deletable if either:
+// (1) There is a release() operation currently operating on it.
+// (2) It is in the deferred updates list.
+// For interaction with release(), these must follow the empty check,
+// and the order of these checks is important.
+bool OopStorage::Block::is_safe_to_delete() const {
+ assert(is_empty(), "precondition");
+ OrderAccess::loadload();
+ return (OrderAccess::load_acquire(&_release_refcount) == 0) &&
(OrderAccess::load_acquire(&_deferred_updates_next) == NULL);
}
@@ -373,7 +374,7 @@
// kept at the end of the _allocation_list, to make it easy for empty block
// deletion to find them.
//
-// allocate(), and delete_empty_blocks_concurrent() lock the
+// allocate(), and delete_empty_blocks() lock the
// _allocation_mutex while performing any list and array modifications.
//
// allocate() and release() update a block's _allocated_bitmask using CAS
@@ -386,7 +387,10 @@
// removed from the _allocation_list so it won't be considered by future
// allocations until some entries in it are released.
//
-// release() is performed lock-free. release() first looks up the block for
+// release() is performed lock-free. (Note: This means it can't notify the
+// service thread of pending cleanup work. It must be lock-free because
+// it is called in all kinds of contexts where even quite low ranked locks
+// may be held.) release() first looks up the block for
// the entry, using address alignment to find the enclosing block (thereby
// avoiding iteration over the _active_array). Once the block has been
// determined, its _allocated_bitmask needs to be updated, and its position in
@@ -400,7 +404,7 @@
// locking the _allocation_mutex. To keep the release() operation lock-free,
// rather than updating the _allocation_list itself, it instead performs a
// lock-free push of the block onto the _deferred_updates list. Entries on
-// that list are processed by allocate() and delete_empty_blocks_XXX(), while
+// that list are processed by allocate() and delete_empty_blocks(), while
// they already hold the necessary lock. That processing makes the block's
// list state consistent with its current _allocated_bitmask. The block is
// added to the _allocation_list if not already present and the bitmask is not
@@ -409,54 +413,17 @@
oop* OopStorage::allocate() {
MutexLockerEx ml(_allocation_mutex, Mutex::_no_safepoint_check_flag);
- // Do some deferred update processing every time we allocate.
- // Continue processing deferred updates if _allocation_list is empty,
- // in the hope that we'll get a block from that, rather than
- // allocating a new block.
- while (reduce_deferred_updates() && (_allocation_list.head() == NULL)) {}
- // Use the first block in _allocation_list for the allocation.
- Block* block = _allocation_list.head();
- if (block == NULL) {
- // No available blocks; make a new one, and add to storage.
- {
- MutexUnlockerEx mul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
- block = Block::new_block(this);
- }
- if (block == NULL) {
- while (_allocation_list.head() == NULL) {
- if (!reduce_deferred_updates()) {
- // Failed to make new block, no other thread made a block
- // available while the mutex was released, and didn't get
- // one from a deferred update either, so return failure.
- log_debug(oopstorage, blocks)("%s: failed block allocation", name());
- return NULL;
- }
- }
- } else {
- // Add new block to storage.
- log_debug(oopstorage, blocks)("%s: new block " PTR_FORMAT, name(), p2i(block));
+ // Note: Without this we might never perform cleanup. As it is,
+ // cleanup is only requested here, when completing a concurrent
+ // iteration, or when someone entirely else wakes up the service
+ // thread, which isn't ideal. But we can't notify in release().
+ if (reduce_deferred_updates()) {
+ notify_needs_cleanup();
+ }
- // Add new block to the _active_array, growing if needed.
- if (!_active_array->push(block)) {
- if (expand_active_array()) {
- guarantee(_active_array->push(block), "push failed after expansion");
- } else {
- log_debug(oopstorage, blocks)("%s: failed active array expand", name());
- Block::delete_block(*block);
- return NULL;
- }
- }
- // Add to end of _allocation_list. The mutex release allowed
- // other threads to add blocks to the _allocation_list. We prefer
- // to allocate from non-empty blocks, to allow empty blocks to
- // be deleted.
- _allocation_list.push_back(*block);
- }
- block = _allocation_list.head();
- }
- // Allocate from first block.
- assert(block != NULL, "invariant");
+ Block* block = block_for_allocation();
+ if (block == NULL) return NULL; // Block allocation failed.
assert(!block->is_full(), "invariant");
if (block->is_empty()) {
// Transitioning from empty to not empty.
@@ -476,6 +443,62 @@
return result;
}
+bool OopStorage::try_add_block() {
+ assert_lock_strong(_allocation_mutex);
+ Block* block;
+ {
+ MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
+ block = Block::new_block(this);
+ }
+ if (block == NULL) return false;
+
+ // Add new block to the _active_array, growing if needed.
+ if (!_active_array->push(block)) {
+ if (expand_active_array()) {
+ guarantee(_active_array->push(block), "push failed after expansion");
+ } else {
+ log_debug(oopstorage, blocks)("%s: failed active array expand", name());
+ Block::delete_block(*block);
+ return false;
+ }
+ }
+ // Add to end of _allocation_list. The mutex release allowed other
+ // threads to add blocks to the _allocation_list. We prefer to
+ // allocate from non-empty blocks, to allow empty blocks to be
+ // deleted. But we don't bother notifying about the empty block
+ // because we're (probably) about to allocate an entry from it.
+ _allocation_list.push_back(*block);
+ log_debug(oopstorage, blocks)("%s: new block " PTR_FORMAT, name(), p2i(block));
+ return true;
+}
+
+OopStorage::Block* OopStorage::block_for_allocation() {
+ assert_lock_strong(_allocation_mutex);
+
+ while (true) {
+ // Use the first block in _allocation_list for the allocation.
+ Block* block = _allocation_list.head();
+ if (block != NULL) {
+ return block;
+ } else if (reduce_deferred_updates()) {
+ MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
+ notify_needs_cleanup();
+ } else if (try_add_block()) {
+ block = _allocation_list.head();
+ assert(block != NULL, "invariant");
+ return block;
+ } else if (reduce_deferred_updates()) { // Once more before failure.
+ MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
+ notify_needs_cleanup();
+ } else {
+ // Attempt to add a block failed, no other thread added a block,
+ // and no deferred updated added a block, then allocation failed.
+ log_debug(oopstorage, blocks)("%s: failed block allocation", name());
+ return NULL;
+ }
+ }
+}
+
// Create a new, larger, active array with the same content as the
// current array, and then replace, relinquishing the old array.
// Return true if the array was successfully expanded, false to
@@ -572,7 +595,7 @@
}
}
-void OopStorage::Block::release_entries(uintx releasing, Block* volatile* deferred_list) {
+void OopStorage::Block::release_entries(uintx releasing, OopStorage* owner) {
assert(releasing != 0, "preconditon");
// Prevent empty block deletion when transitioning to empty.
Atomic::inc(&_release_refcount);
@@ -591,8 +614,8 @@
// (updated bitmask is empty or old bitmask was full), atomically push
// this block onto the deferred updates list. Some future call to
// reduce_deferred_updates will make any needed changes related to this
- // block and _allocation_list. This deferral avoids list updates and the
- // associated locking here.
+ // block and _allocation_list. This deferral avoids _allocation_list
+ // updates and the associated locking here.
if ((releasing == old_allocated) || is_full_bitmask(old_allocated)) {
// Log transitions. Both transitions are possible in a single update.
if (log_is_enabled(Debug, oopstorage, blocks)) {
@@ -605,13 +628,14 @@
// anything further.
if (Atomic::replace_if_null(this, &_deferred_updates_next)) {
// Successfully claimed. Push, with self-loop for end-of-list.
- Block* head = *deferred_list;
+ Block* head = owner->_deferred_updates;
while (true) {
_deferred_updates_next = (head == NULL) ? this : head;
- Block* fetched = Atomic::cmpxchg(this, deferred_list, head);
+ Block* fetched = Atomic::cmpxchg(this, &owner->_deferred_updates, head);
if (fetched == head) break; // Successful update.
head = fetched; // Retry with updated head.
}
+ owner->record_needs_cleanup();
log_debug(oopstorage, blocks)("%s: deferred update " PTR_FORMAT,
_owner->name(), p2i(this));
}
@@ -622,7 +646,7 @@
// Process one available deferred update. Returns true if one was processed.
bool OopStorage::reduce_deferred_updates() {
- assert_locked_or_safepoint(_allocation_mutex);
+ assert_lock_strong(_allocation_mutex);
// Atomically pop a block off the list, if any available.
// No ABA issue because this is only called by one thread at a time.
// The atomicity is wrto pushes by release().
@@ -641,7 +665,7 @@
// ordering with release(). Without this, we may be processing a stale
// bitmask state here while blocking a release() operation from recording
// the deferred update needed for its bitmask change.
- OrderAccess::storeload();
+ OrderAccess::fence();
// Process popped block.
uintx allocated = block->allocated_bitmask();
@@ -660,6 +684,7 @@
if (is_empty_bitmask(allocated)) {
_allocation_list.unlink(*block);
_allocation_list.push_back(*block);
+ notify_needs_cleanup();
}
log_debug(oopstorage, blocks)("%s: processed deferred update " PTR_FORMAT,
@@ -677,7 +702,7 @@
Block* block = find_block_or_null(ptr);
assert(block != NULL, "%s: invalid release " PTR_FORMAT, name(), p2i(ptr));
log_trace(oopstorage, ref)("%s: released " PTR_FORMAT, name(), p2i(ptr));
- block->release_entries(block->bitmask_for_entry(ptr), &_deferred_updates);
+ block->release_entries(block->bitmask_for_entry(ptr), this);
Atomic::dec(&_allocation_count);
}
@@ -704,7 +729,7 @@
++count;
}
// Release the contiguous entries that are in block.
- block->release_entries(releasing, &_deferred_updates);
+ block->release_entries(releasing, this);
Atomic::sub(count, &_allocation_count);
}
}
@@ -715,6 +740,11 @@
return dup;
}
+// Possible values for OopStorage::_needs_cleanup.
+const uint needs_cleanup_none = 0; // No cleanup needed.
+const uint needs_cleanup_marked = 1; // Requested, but no notification made.
+const uint needs_cleanup_notified = 2; // Requested and Service thread notified.
+
const size_t initial_active_array_size = 8;
OopStorage::OopStorage(const char* name,
@@ -727,11 +757,14 @@
_allocation_mutex(allocation_mutex),
_active_mutex(active_mutex),
_allocation_count(0),
- _concurrent_iteration_count(0)
+ _concurrent_iteration_count(0),
+ _needs_cleanup(needs_cleanup_none)
{
_active_array->increment_refcount();
assert(_active_mutex->rank() < _allocation_mutex->rank(),
"%s: active_mutex must have lower rank than allocation_mutex", _name);
+ assert(Service_lock->rank() < _active_mutex->rank(),
+ "%s: active_mutex must have higher rank than Service_lock", _name);
assert(_active_mutex->_safepoint_check_required != Mutex::_safepoint_check_always,
"%s: active mutex requires safepoint check", _name);
assert(_allocation_mutex->_safepoint_check_required != Mutex::_safepoint_check_always,
@@ -763,56 +796,82 @@
FREE_C_HEAP_ARRAY(char, _name);
}
-void OopStorage::delete_empty_blocks_safepoint() {
- assert_at_safepoint();
- // Process any pending release updates, which may make more empty
- // blocks available for deletion.
- while (reduce_deferred_updates()) {}
- // Don't interfere with a concurrent iteration.
- if (_concurrent_iteration_count > 0) return;
- // Delete empty (and otherwise deletable) blocks from end of _allocation_list.
- for (Block* block = _allocation_list.tail();
- (block != NULL) && block->is_deletable();
- block = _allocation_list.tail()) {
- _active_array->remove(block);
- _allocation_list.unlink(*block);
- delete_empty_block(*block);
+// Called by service thread to check for pending work.
+bool OopStorage::needs_delete_empty_blocks() const {
+ return Atomic::load(&_needs_cleanup) != needs_cleanup_none;
+}
+
+// Record that cleanup is needed, without notifying the Service thread.
+// Used by release(), where we can't lock even Service_lock.
+void OopStorage::record_needs_cleanup() {
+ Atomic::cmpxchg(needs_cleanup_marked, &_needs_cleanup, needs_cleanup_none);
+}
+
+// Record that cleanup is needed, and notify the Service thread.
+void OopStorage::notify_needs_cleanup() {
+ // Avoid re-notification if already notified.
+ const uint notified = needs_cleanup_notified;
+ if (Atomic::xchg(notified, &_needs_cleanup) != notified) {
+ MonitorLockerEx ml(Service_lock, Monitor::_no_safepoint_check_flag);
+ ml.notify_all();
}
}
-void OopStorage::delete_empty_blocks_concurrent() {
+bool OopStorage::delete_empty_blocks() {
MutexLockerEx ml(_allocation_mutex, Mutex::_no_safepoint_check_flag);
- // Other threads could be adding to the empty block count while we
- // release the mutex across the block deletions. Set an upper bound
- // on how many blocks we'll try to release, so other threads can't
- // cause an unbounded stay in this function.
+
+ // Clear the request before processing.
+ Atomic::store(needs_cleanup_none, &_needs_cleanup);
+ OrderAccess::fence();
+
+ // Other threads could be adding to the empty block count or the
+ // deferred update list while we're working. Set an upper bound on
+ // how many updates we'll process and blocks we'll try to release,
+ // so other threads can't cause an unbounded stay in this function.
size_t limit = block_count();
+ if (limit == 0) return false; // Empty storage; nothing at all to do.
for (size_t i = 0; i < limit; ++i) {
- // Additional updates might become available while we dropped the
- // lock. But limit number processed to limit lock duration.
- reduce_deferred_updates();
-
- Block* block = _allocation_list.tail();
- if ((block == NULL) || !block->is_deletable()) {
- // No block to delete, so done. There could be more pending
- // deferred updates that could give us more work to do; deal with
- // that in some later call, to limit lock duration here.
- return;
- }
+ // Process deferred updates, which might make empty blocks available.
+ // Continue checking once deletion starts, since additional updates
+ // might become available while we're working.
+ if (reduce_deferred_updates()) {
+ // Be safepoint-polite while looping.
+ MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
+ ThreadBlockInVM tbiv(JavaThread::current());
+ } else {
+ Block* block = _allocation_list.tail();
+ if ((block == NULL) || !block->is_empty()) {
+ return false;
+ } else if (!block->is_safe_to_delete()) {
+ // Look for other work while waiting for block to be deletable.
+ break;
+ }
- {
- MutexLockerEx aml(_active_mutex, Mutex::_no_safepoint_check_flag);
- // Don't interfere with a concurrent iteration.
- if (_concurrent_iteration_count > 0) return;
- _active_array->remove(block);
+ // Try to delete the block. First, try to remove from _active_array.
+ {
+ MutexLockerEx aml(_active_mutex, Mutex::_no_safepoint_check_flag);
+ // Don't interfere with an active concurrent iteration.
+ // Instead, give up immediately. There is more work to do,
+ // but don't re-notify, to avoid useless spinning of the
+ // service thread. Instead, iteration completion notifies.
+ if (_concurrent_iteration_count > 0) return true;
+ _active_array->remove(block);
+ }
+ // Remove block from _allocation_list and delete it.
+ _allocation_list.unlink(*block);
+ // Be safepoint-polite while deleting and looping.
+ MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
+ delete_empty_block(*block);
+ ThreadBlockInVM tbiv(JavaThread::current());
}
- // Remove block from _allocation_list and delete it.
- _allocation_list.unlink(*block);
- // Release mutex while deleting block.
- MutexUnlockerEx ul(_allocation_mutex, Mutex::_no_safepoint_check_flag);
- delete_empty_block(*block);
}
+ // Exceeded work limit or can't delete last block. This will
+ // cause the service thread to loop, giving other subtasks an
+ // opportunity to run too. There's no need for a notification,
+ // because we are part of the service thread (unless gtesting).
+ record_needs_cleanup();
+ return true;
}
OopStorage::EntryStatus OopStorage::allocation_status(const oop* ptr) const {
@@ -886,6 +945,10 @@
OopStorage::BasicParState::~BasicParState() {
_storage->relinquish_block_array(_active_array);
update_concurrent_iteration_count(-1);
+ if (_concurrent) {
+ // We may have deferred some work.
+ const_cast<OopStorage*>(_storage)->notify_needs_cleanup();
+ }
}
void OopStorage::BasicParState::update_concurrent_iteration_count(int value) {
--- a/src/hotspot/share/gc/shared/oopStorage.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/oopStorage.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -151,11 +151,19 @@
// Other clients must use serial iteration.
template<bool concurrent, bool is_const> class ParState;
- // Block cleanup functions are for the exclusive use of the GC.
- // Both stop deleting if there is an in-progress concurrent iteration.
- // Concurrent deletion locks both the _allocation_mutex and the _active_mutex.
- void delete_empty_blocks_safepoint();
- void delete_empty_blocks_concurrent();
+ // Service thread cleanup support.
+ // Stops deleting if there is an in-progress concurrent iteration.
+ // Locks both the _allocation_mutex and the _active_mutex, and may
+ // safepoint. Deletion may be throttled, with only some available
+ // work performed, in order to allow other Service thread subtasks
+ // to run. Returns true if there may be more work to do, false if
+ // nothing to do.
+ bool delete_empty_blocks();
+
+ // Service thread cleanup support.
+ // Called by the service thread (while holding Service_lock) to test
+ // whether a call to delete_empty_blocks should be made.
+ bool needs_delete_empty_blocks() const;
// Debugging and logging support.
const char* name() const;
@@ -208,7 +216,9 @@
const char* _name;
ActiveArray* _active_array;
AllocationList _allocation_list;
+AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45.
Block* volatile _deferred_updates;
+AIX_ONLY(private:)
Mutex* _allocation_mutex;
Mutex* _active_mutex;
@@ -222,9 +232,18 @@
// mutable because this gets set even for const iteration.
mutable int _concurrent_iteration_count;
+ volatile uint _needs_cleanup;
+
+ bool try_add_block();
+ Block* block_for_allocation();
+
Block* find_block_or_null(const oop* ptr) const;
void delete_empty_block(const Block& block);
bool reduce_deferred_updates();
+ void notify_needs_cleanup();
+AIX_ONLY(public:) // xlC 12 on AIX doesn't implement C++ DR45.
+ void record_needs_cleanup();
+AIX_ONLY(private:)
// Managing _active_array.
bool expand_active_array();
--- a/src/hotspot/share/gc/shared/oopStorage.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/oopStorage.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -173,7 +173,8 @@
bool is_full() const;
bool is_empty() const;
uintx allocated_bitmask() const;
- bool is_deletable() const;
+
+ bool is_safe_to_delete() const;
Block* deferred_updates_next() const;
void set_deferred_updates_next(Block* new_next);
@@ -191,7 +192,7 @@
static Block* new_block(const OopStorage* owner);
static void delete_block(const Block& block);
- void release_entries(uintx releasing, Block* volatile* deferred_list);
+ void release_entries(uintx releasing, OopStorage* owner);
template<typename F> bool iterate(F f);
template<typename F> bool iterate(F f) const;
--- a/src/hotspot/share/gc/shared/oopStorageParState.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/oopStorageParState.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -45,7 +45,7 @@
// locked. This prevents concurrent iteration and empty block deletion from
// interfering with with each other.
//
-// Both allocate() and delete_empty_blocks_concurrent() lock the
+// Both allocate() and delete_empty_blocks() lock the
// _allocation_mutex while performing their respective list and array
// manipulations, preventing them from interfering with each other.
//
@@ -71,11 +71,6 @@
// iteration. To help with this, allocate() and release() have an invariant
// that an entry's value must be NULL when it is not in use.
//
-// An in-progress delete_empty_blocks_concurrent() operation can contend with
-// the start of a concurrent iteration over the _active_mutex. Since both are
-// under GC control, that potential contention can be eliminated by never
-// scheduling both operations to run at the same time.
-//
// ParState<concurrent, is_const>
// concurrent must be true if iteration may be concurrent with the
// mutators.
--- a/src/hotspot/share/gc/shared/parallelCleaning.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/parallelCleaning.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -27,6 +27,7 @@
#include "classfile/stringTable.hpp"
#include "code/codeCache.hpp"
#include "gc/shared/parallelCleaning.hpp"
+#include "logging/log.hpp"
#include "memory/resourceArea.hpp"
#include "logging/log.hpp"
@@ -67,14 +68,11 @@
}
CodeCacheUnloadingTask::CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred) :
- _is_alive(is_alive),
+ _unloading_scope(is_alive),
_unloading_occurred(unloading_occurred),
_num_workers(num_workers),
_first_nmethod(NULL),
- _claimed_nmethod(NULL),
- _postponed_list(NULL),
- _num_entered_barrier(0) {
- CompiledMethod::increase_unloading_clock();
+ _claimed_nmethod(NULL) {
// Get first alive nmethod
CompiledMethodIterator iter = CompiledMethodIterator();
if(iter.next_alive()) {
@@ -86,39 +84,11 @@
CodeCacheUnloadingTask::~CodeCacheUnloadingTask() {
CodeCache::verify_clean_inline_caches();
- CodeCache::set_needs_cache_clean(false);
guarantee(CodeCache::scavenge_root_nmethods() == NULL, "Must be");
CodeCache::verify_icholder_relocations();
}
-Monitor* CodeCacheUnloadingTask::_lock = new Monitor(Mutex::leaf, "Code Cache Unload lock", false, Monitor::_safepoint_check_never);
-
-void CodeCacheUnloadingTask::add_to_postponed_list(CompiledMethod* nm) {
- CompiledMethod* old;
- do {
- old = _postponed_list;
- nm->set_unloading_next(old);
- } while (Atomic::cmpxchg(nm, &_postponed_list, old) != old);
-}
-
-void CodeCacheUnloadingTask::clean_nmethod(CompiledMethod* nm) {
- bool postponed = nm->do_unloading_parallel(_is_alive, _unloading_occurred);
-
- if (postponed) {
- // This nmethod referred to an nmethod that has not been cleaned/unloaded yet.
- add_to_postponed_list(nm);
- }
-
- // Mark that this nmethod has been cleaned/unloaded.
- // After this call, it will be safe to ask if this nmethod was unloaded or not.
- nm->set_unloading_clock(CompiledMethod::global_unloading_clock());
-}
-
-void CodeCacheUnloadingTask::clean_nmethod_postponed(CompiledMethod* nm) {
- nm->do_unloading_parallel_postponed();
-}
-
void CodeCacheUnloadingTask::claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods) {
CompiledMethod* first;
CompiledMethodIterator last;
@@ -143,44 +113,10 @@
} while (Atomic::cmpxchg(last.method(), &_claimed_nmethod, first) != first);
}
-CompiledMethod* CodeCacheUnloadingTask::claim_postponed_nmethod() {
- CompiledMethod* claim;
- CompiledMethod* next;
-
- do {
- claim = _postponed_list;
- if (claim == NULL) {
- return NULL;
- }
-
- next = claim->unloading_next();
-
- } while (Atomic::cmpxchg(next, &_postponed_list, claim) != claim);
-
- return claim;
-}
-
-void CodeCacheUnloadingTask::barrier_mark(uint worker_id) {
- MonitorLockerEx ml(_lock, Mutex::_no_safepoint_check_flag);
- _num_entered_barrier++;
- if (_num_entered_barrier == _num_workers) {
- ml.notify_all();
- }
-}
-
-void CodeCacheUnloadingTask::barrier_wait(uint worker_id) {
- if (_num_entered_barrier < _num_workers) {
- MonitorLockerEx ml(_lock, Mutex::_no_safepoint_check_flag);
- while (_num_entered_barrier < _num_workers) {
- ml.wait(Mutex::_no_safepoint_check_flag, 0, false);
- }
- }
-}
-
-void CodeCacheUnloadingTask::work_first_pass(uint worker_id) {
+void CodeCacheUnloadingTask::work(uint worker_id) {
// The first nmethods is claimed by the first worker.
if (worker_id == 0 && _first_nmethod != NULL) {
- clean_nmethod(_first_nmethod);
+ _first_nmethod->do_unloading(_unloading_occurred);
_first_nmethod = NULL;
}
@@ -195,19 +131,11 @@
}
for (int i = 0; i < num_claimed_nmethods; i++) {
- clean_nmethod(claimed_nmethods[i]);
+ claimed_nmethods[i]->do_unloading(_unloading_occurred);
}
}
}
-void CodeCacheUnloadingTask::work_second_pass(uint worker_id) {
- CompiledMethod* nm;
- // Take care of postponed nmethods.
- while ((nm = claim_postponed_nmethod()) != NULL) {
- clean_nmethod_postponed(nm);
- }
-}
-
KlassCleaningTask::KlassCleaningTask() :
_clean_klass_tree_claimed(0),
_klass_iterator() {
@@ -257,21 +185,11 @@
// The parallel work done by all worker threads.
void ParallelCleaningTask::work(uint worker_id) {
- // Do first pass of code cache cleaning.
- _code_cache_task.work_first_pass(worker_id);
-
- // Let the threads mark that the first pass is done.
- _code_cache_task.barrier_mark(worker_id);
+ // Do first pass of code cache cleaning.
+ _code_cache_task.work(worker_id);
- // Clean the Strings and Symbols.
- _string_task.work(worker_id);
-
- // Wait for all workers to finish the first code cache cleaning pass.
- _code_cache_task.barrier_wait(worker_id);
-
- // Do the second code cache cleaning work, which realize on
- // the liveness information gathered during the first pass.
- _code_cache_task.work_second_pass(worker_id);
+ // Clean the Strings and Symbols.
+ _string_task.work(worker_id);
// Clean all klasses that were not unloaded.
// The weak metadata in klass doesn't need to be
--- a/src/hotspot/share/gc/shared/parallelCleaning.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/parallelCleaning.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -56,46 +56,26 @@
};
class CodeCacheUnloadingTask {
-private:
- static Monitor* _lock;
- BoolObjectClosure* const _is_alive;
- const bool _unloading_occurred;
- const uint _num_workers;
+ CodeCache::UnloadingScope _unloading_scope;
+ const bool _unloading_occurred;
+ const uint _num_workers;
// Variables used to claim nmethods.
CompiledMethod* _first_nmethod;
CompiledMethod* volatile _claimed_nmethod;
- // The list of nmethods that need to be processed by the second pass.
- CompiledMethod* volatile _postponed_list;
- volatile uint _num_entered_barrier;
-
public:
CodeCacheUnloadingTask(uint num_workers, BoolObjectClosure* is_alive, bool unloading_occurred);
~CodeCacheUnloadingTask();
private:
- void add_to_postponed_list(CompiledMethod* nm);
- void clean_nmethod(CompiledMethod* nm);
- void clean_nmethod_postponed(CompiledMethod* nm);
+ static const int MaxClaimNmethods = 16;
+ void claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods);
- static const int MaxClaimNmethods = 16;
-
- void claim_nmethods(CompiledMethod** claimed_nmethods, int *num_claimed_nmethods);
- CompiledMethod* claim_postponed_nmethod();
public:
- // Mark that we're done with the first pass of nmethod cleaning.
- void barrier_mark(uint worker_id);
-
- // See if we have to wait for the other workers to
- // finish their first-pass nmethod cleaning work.
- void barrier_wait(uint worker_id);
-
- // Cleaning and unloading of nmethods. Some work has to be postponed
- // to the second pass, when we know which nmethods survive.
- void work_first_pass(uint worker_id);
- void work_second_pass(uint worker_id);
+ // Cleaning and unloading of nmethods.
+ void work(uint worker_id);
};
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -474,10 +474,10 @@
// == Accesses ==
-Node* ZBarrierSetC2::make_cas_loadbarrier(C2AtomicAccess& access) const {
+Node* ZBarrierSetC2::make_cas_loadbarrier(C2AtomicParseAccess& access) const {
assert(!UseCompressedOops, "Not allowed");
CompareAndSwapNode* cas = (CompareAndSwapNode*)access.raw_access();
- PhaseGVN& gvn = access.kit()->gvn();
+ PhaseGVN& gvn = access.gvn();
Compile* C = Compile::current();
GraphKit* kit = access.kit();
@@ -566,7 +566,7 @@
return phi;
}
-Node* ZBarrierSetC2::make_cmpx_loadbarrier(C2AtomicAccess& access) const {
+Node* ZBarrierSetC2::make_cmpx_loadbarrier(C2AtomicParseAccess& access) const {
CompareAndExchangePNode* cmpx = (CompareAndExchangePNode*)access.raw_access();
GraphKit* kit = access.kit();
PhaseGVN& gvn = kit->gvn();
@@ -665,7 +665,7 @@
}
}
-static bool barrier_needed(C2Access access) {
+static bool barrier_needed(C2Access& access) {
return ZBarrierSet::barrier_needed(access.decorators(), access.type());
}
@@ -677,7 +677,9 @@
bool weak = (access.decorators() & ON_WEAK_OOP_REF) != 0;
- GraphKit* kit = access.kit();
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
PhaseGVN& gvn = kit->gvn();
Node* adr = access.addr().node();
Node* heap_base_oop = access.base();
@@ -707,11 +709,11 @@
}
return p;
} else {
- return load_barrier(access.kit(), p, access.addr().node(), weak, true, true);
+ return load_barrier(parse_access.kit(), p, access.addr().node(), weak, true, true);
}
}
-Node* ZBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* ZBarrierSetC2::atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* val_type) const {
Node* result = BarrierSetC2::atomic_cmpxchg_val_at_resolved(access, expected_val, new_val, val_type);
if (!barrier_needed(access)) {
@@ -722,7 +724,7 @@
return make_cmpx_loadbarrier(access);
}
-Node* ZBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access, Node* expected_val,
+Node* ZBarrierSetC2::atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access, Node* expected_val,
Node* new_val, const Type* value_type) const {
Node* result = BarrierSetC2::atomic_cmpxchg_bool_at_resolved(access, expected_val, new_val, value_type);
if (!barrier_needed(access)) {
@@ -746,7 +748,7 @@
return load_store;
}
-Node* ZBarrierSetC2::atomic_xchg_at_resolved(C2AtomicAccess& access, Node* new_val, const Type* val_type) const {
+Node* ZBarrierSetC2::atomic_xchg_at_resolved(C2AtomicParseAccess& access, Node* new_val, const Type* val_type) const {
Node* result = BarrierSetC2::atomic_xchg_at_resolved(access, new_val, val_type);
if (!barrier_needed(access)) {
return result;
@@ -755,7 +757,9 @@
Node* load_store = access.raw_access();
Node* adr = access.addr().node();
- return load_barrier(access.kit(), load_store, adr, false, false, false);
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ return load_barrier(parse_access.kit(), load_store, adr, false, false, false);
}
// == Macro Expansion ==
@@ -1431,6 +1435,29 @@
return type == T_OBJECT || type == T_ARRAY;
}
+bool ZBarrierSetC2::final_graph_reshaping(Compile* compile, Node* n, uint opcode) const {
+ bool handled;
+ switch (opcode) {
+ case Op_LoadBarrierSlowReg:
+ case Op_LoadBarrierWeakSlowReg:
+#ifdef ASSERT
+ if (VerifyOptoOopOffsets) {
+ MemNode* mem = n->as_Mem();
+ // Check to see if address types have grounded out somehow.
+ const TypeInstPtr* tp = mem->in(MemNode::Address)->bottom_type()->isa_instptr();
+ ciInstanceKlass* k = tp->klass()->as_instance_klass();
+ bool oop_offset_is_sane = k->contains_field_offset(tp->offset());
+ assert(!tp || oop_offset_is_sane, "");
+ }
+#endif
+ handled = true;
+ break;
+ default:
+ handled = false;
+ }
+ return handled;
+}
+
// == Verification ==
#ifdef ASSERT
@@ -1460,6 +1487,12 @@
return true;
}
+void ZBarrierSetC2::verify_gc_barriers(Compile* compile, CompilePhase phase) const {
+ if (phase == BarrierSetC2::BeforeCodeGen) return;
+ bool post_parse = phase == BarrierSetC2::BeforeOptimize;
+ verify_gc_barriers(post_parse);
+}
+
void ZBarrierSetC2::verify_gc_barriers(bool post_parse) const {
ZBarrierSetC2State* s = state();
Compile* C = Compile::current();
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -156,24 +156,28 @@
class ZBarrierSetC2 : public BarrierSetC2 {
private:
ZBarrierSetC2State* state() const;
- Node* make_cas_loadbarrier(C2AtomicAccess& access) const;
- Node* make_cmpx_loadbarrier(C2AtomicAccess& access) const;
+ Node* make_cas_loadbarrier(C2AtomicParseAccess& access) const;
+ Node* make_cmpx_loadbarrier(C2AtomicParseAccess& access) const;
void expand_loadbarrier_basic(PhaseMacroExpand* phase, LoadBarrierNode *barrier) const;
void expand_loadbarrier_node(PhaseMacroExpand* phase, LoadBarrierNode* barrier) const;
void expand_loadbarrier_optimized(PhaseMacroExpand* phase, LoadBarrierNode *barrier) const;
const TypeFunc* load_barrier_Type() const;
+#ifdef ASSERT
+ void verify_gc_barriers(bool post_parse) const;
+#endif
+
protected:
virtual Node* load_at_resolved(C2Access& access, const Type* val_type) const;
- virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicAccess& access,
+ virtual Node* atomic_cmpxchg_val_at_resolved(C2AtomicParseAccess& access,
Node* expected_val,
Node* new_val,
const Type* val_type) const;
- virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicAccess& access,
+ virtual Node* atomic_cmpxchg_bool_at_resolved(C2AtomicParseAccess& access,
Node* expected_val,
Node* new_val,
const Type* value_type) const;
- virtual Node* atomic_xchg_at_resolved(C2AtomicAccess& access,
+ virtual Node* atomic_xchg_at_resolved(C2AtomicParseAccess& access,
Node* new_val,
const Type* val_type) const;
@@ -203,8 +207,10 @@
static void find_dominating_barriers(PhaseIterGVN& igvn);
static void loop_optimize_gc_barrier(PhaseIdealLoop* phase, Node* node, bool last_round);
+ virtual bool final_graph_reshaping(Compile* compile, Node* n, uint opcode) const;
+
#ifdef ASSERT
- virtual void verify_gc_barriers(bool post_parse) const;
+ virtual void verify_gc_barriers(Compile* compile, CompilePhase phase) const;
#endif
};
--- a/src/hotspot/share/gc/z/zAddress.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zAddress.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -37,6 +37,7 @@
static bool is_weak_good_or_null(uintptr_t value);
static bool is_marked(uintptr_t value);
static bool is_finalizable(uintptr_t value);
+ static bool is_finalizable_good(uintptr_t value);
static bool is_remapped(uintptr_t value);
static uintptr_t address(uintptr_t value);
--- a/src/hotspot/share/gc/z/zAddress.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zAddress.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -74,6 +74,10 @@
return value & ZAddressMetadataFinalizable;
}
+inline bool ZAddress::is_finalizable_good(uintptr_t value) {
+ return is_finalizable(value) && is_good(value ^ ZAddressMetadataFinalizable);
+}
+
inline bool ZAddress::is_remapped(uintptr_t value) {
return value & ZAddressMetadataRemapped;
}
--- a/src/hotspot/share/gc/z/zDriver.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zDriver.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -33,6 +33,7 @@
#include "gc/z/zServiceability.hpp"
#include "gc/z/zStat.hpp"
#include "logging/log.hpp"
+#include "memory/universe.hpp"
#include "runtime/vm_operations.hpp"
#include "runtime/vmThread.hpp"
@@ -44,6 +45,7 @@
static const ZStatPhaseConcurrent ZPhaseConcurrentProcessNonStrongReferences("Concurrent Process Non-Strong References");
static const ZStatPhaseConcurrent ZPhaseConcurrentResetRelocationSet("Concurrent Reset Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentDestroyDetachedPages("Concurrent Destroy Detached Pages");
+static const ZStatPhasePause ZPhasePauseVerify("Pause Verify");
static const ZStatPhaseConcurrent ZPhaseConcurrentSelectRelocationSet("Concurrent Select Relocation Set");
static const ZStatPhaseConcurrent ZPhaseConcurrentPrepareRelocationSet("Concurrent Prepare Relocation Set");
static const ZStatPhasePause ZPhasePauseRelocateStart("Pause Relocate Start");
@@ -210,6 +212,19 @@
}
};
+class ZVerifyClosure : public ZOperationClosure {
+public:
+ virtual const char* name() const {
+ return "ZVerify";
+ }
+
+ virtual bool do_operation() {
+ ZStatTimer timer(ZPhasePauseVerify);
+ Universe::verify();
+ return true;
+ }
+};
+
class ZRelocateStartClosure : public ZOperationClosure {
public:
virtual const char* name() const {
@@ -367,25 +382,31 @@
ZHeap::heap()->destroy_detached_pages();
}
- // Phase 7: Concurrent Select Relocation Set
+ // Phase 7: Pause Verify
+ if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
+ ZVerifyClosure cl;
+ vm_operation(&cl);
+ }
+
+ // Phase 8: Concurrent Select Relocation Set
{
ZStatTimer timer(ZPhaseConcurrentSelectRelocationSet);
ZHeap::heap()->select_relocation_set();
}
- // Phase 8: Concurrent Prepare Relocation Set
+ // Phase 9: Concurrent Prepare Relocation Set
{
ZStatTimer timer(ZPhaseConcurrentPrepareRelocationSet);
ZHeap::heap()->prepare_relocation_set();
}
- // Phase 9: Pause Relocate Start
+ // Phase 10: Pause Relocate Start
{
ZRelocateStartClosure cl;
vm_operation(&cl);
}
- // Phase 10: Concurrent Relocate
+ // Phase 11: Concurrent Relocate
{
ZStatTimer timer(ZPhaseConcurrentRelocated);
ZHeap::heap()->relocate();
--- a/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zHeap.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -366,11 +366,6 @@
// Process weak roots
_weak_roots_processor.process_weak_roots();
- // Verification
- if (VerifyBeforeGC || VerifyDuringGC || VerifyAfterGC) {
- Universe::verify();
- }
-
return true;
}
@@ -570,7 +565,7 @@
_weak_roots() {}
virtual void work() {
- ZVerifyRootOopClosure cl;
+ ZVerifyOopClosure cl;
_strong_roots.oops_do(&cl);
_weak_roots.oops_do(&cl);
}
--- a/src/hotspot/share/gc/z/zNMethodTable.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zNMethodTable.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -51,7 +51,6 @@
nmethod* method() const;
size_t immediate_oops_count() const;
oop** immediate_oops_begin() const;
- oop** immediate_oops_begin_safe() const;
oop** immediate_oops_end() const;
};
@@ -95,24 +94,6 @@
return (oop**)((uintptr_t)this + header_size());
}
-oop** ZNMethodWithImmediateOops::immediate_oops_begin_safe() const {
- // Non-entrant nmethods have a jump instruction patched into the beginning
- // of the verified entry point, which could have overwritten an immediate
- // oop. If so, make sure we skip over that oop.
- if (_nm->is_not_entrant()) {
- oop* const first_immediate_oop = *immediate_oops_begin();
- oop* const safe_begin = (oop*)(_nm->verified_entry_point() + NativeJump::instruction_size);
- if (first_immediate_oop < safe_begin) {
- // First immediate oop overwritten, skip it
- return immediate_oops_begin() + 1;
- }
- }
-
- // First immediate oop not overwritten
- return immediate_oops_begin();
-}
-
-
oop** ZNMethodWithImmediateOops::immediate_oops_end() const {
return immediate_oops_begin() + immediate_oops_count();
}
@@ -429,7 +410,7 @@
if (entry.immediate_oops()) {
// Process immediate oops
const ZNMethodWithImmediateOops* const nmi = entry.method_with_immediate_oops();
- oop** const begin = nmi->immediate_oops_begin_safe();
+ oop** const begin = nmi->immediate_oops_begin();
oop** const end = nmi->immediate_oops_end();
for (oop** p = begin; p < end; p++) {
cl->do_oop(*p);
--- a/src/hotspot/share/gc/z/zOop.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zOop.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -33,7 +33,7 @@
static uintptr_t to_address(oop o);
static bool is_good(oop o);
- static bool is_good_or_null(oop o);
+ static bool is_finalizable_good(oop o);
static oop good(oop);
};
--- a/src/hotspot/share/gc/z/zOop.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zOop.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -40,8 +40,8 @@
return ZAddress::is_good(to_address(o));
}
-inline bool ZOop::is_good_or_null(oop o) {
- return ZAddress::is_good_or_null(to_address(o));
+inline bool ZOop::is_finalizable_good(oop o) {
+ return ZAddress::is_finalizable_good(to_address(o));
}
inline oop ZOop::good(oop o) {
--- a/src/hotspot/share/gc/z/zOopClosures.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zOopClosures.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -28,54 +28,31 @@
#include "memory/iterator.inline.hpp"
#include "oops/access.inline.hpp"
#include "oops/oop.inline.hpp"
+#include "runtime/safepoint.hpp"
#include "utilities/debug.hpp"
#include "utilities/globalDefinitions.hpp"
-static void z_verify_loaded_object(const oop* p, const oop obj) {
- guarantee(ZOop::is_good_or_null(obj),
- "Bad oop " PTR_FORMAT " found at " PTR_FORMAT ", expected " PTR_FORMAT,
- p2i(obj), p2i(p), p2i(ZOop::good(obj)));
- guarantee(oopDesc::is_oop_or_null(obj),
- "Bad object " PTR_FORMAT " found at " PTR_FORMAT,
- p2i(obj), p2i(p));
-}
+void ZVerifyOopClosure::do_oop(oop* p) {
+ guarantee(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
+ guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase");
+ guarantee(!ZResurrection::is_blocked(), "Invalid phase");
-OopIterateClosure::ReferenceIterationMode ZVerifyHeapOopClosure::reference_iteration_mode() {
- // Don't visit the j.l.Reference.referents for this verification closure,
- // since they are cleaned concurrently after ZHeap::mark_end(), and can
- // therefore not be verified at this point.
- return DO_FIELDS_EXCEPT_REFERENT;
+ const oop o = RawAccess<>::oop_load(p);
+ if (o != NULL) {
+ guarantee(ZOop::is_good(o) || ZOop::is_finalizable_good(o),
+ "Bad oop " PTR_FORMAT " found at " PTR_FORMAT ", expected " PTR_FORMAT,
+ p2i(o), p2i(p), p2i(ZOop::good(o)));
+ guarantee(oopDesc::is_oop(ZOop::good(o)),
+ "Bad object " PTR_FORMAT " found at " PTR_FORMAT,
+ p2i(o), p2i(p));
+ }
}
-void ZVerifyHeapOopClosure::do_oop(oop* p) {
- guarantee(ZHeap::heap()->is_in((uintptr_t)p), "oop* " PTR_FORMAT " not in heap", p2i(p));
-
- const oop obj = RawAccess<>::oop_load(p);
- z_verify_loaded_object(p, obj);
-}
-
-void ZVerifyHeapOopClosure::do_oop(narrowOop* p) {
- ShouldNotReachHere();
-}
-
-ZVerifyRootOopClosure::ZVerifyRootOopClosure() {
- // This closure should only be used from ZHeap::mark_end(),
- // when all roots should have been fixed by the fixup_partial_loads().
- guarantee(ZGlobalPhase == ZPhaseMarkCompleted, "Invalid phase");
-}
-
-void ZVerifyRootOopClosure::do_oop(oop* p) {
- guarantee(!ZHeap::heap()->is_in((uintptr_t)p), "oop* " PTR_FORMAT " in heap", p2i(p));
-
- const oop obj = RawAccess<>::oop_load(p);
- z_verify_loaded_object(p, obj);
-}
-
-void ZVerifyRootOopClosure::do_oop(narrowOop* p) {
+void ZVerifyOopClosure::do_oop(narrowOop* p) {
ShouldNotReachHere();
}
void ZVerifyObjectClosure::do_object(oop o) {
- ZVerifyHeapOopClosure cl;
+ ZVerifyOopClosure cl;
o->oop_iterate(&cl);
}
--- a/src/hotspot/share/gc/z/zOopClosures.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/gc/z/zOopClosures.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -71,29 +71,23 @@
virtual void do_oop(narrowOop* p);
};
-class ZVerifyHeapOopClosure : public BasicOopIterateClosure {
+class ZVerifyOopClosure : public ZRootsIteratorClosure, public BasicOopIterateClosure {
public:
- virtual ReferenceIterationMode reference_iteration_mode();
-
virtual void do_oop(oop* p);
virtual void do_oop(narrowOop* p);
+ virtual ReferenceIterationMode reference_iteration_mode() {
+ return DO_FIELDS;
+ }
+
#ifdef ASSERT
- // Verification handled by the closure itself.
+ // Verification handled by the closure itself
virtual bool should_verify_oops() {
return false;
}
#endif
};
-class ZVerifyRootOopClosure : public ZRootsIteratorClosure {
-public:
- ZVerifyRootOopClosure();
-
- virtual void do_oop(oop* p);
- virtual void do_oop(narrowOop* p);
-};
-
class ZVerifyObjectClosure : public ObjectClosure {
public:
virtual void do_object(oop o);
--- a/src/hotspot/share/include/jvm.h Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/include/jvm.h Mon Nov 12 11:10:16 2018 +0530
@@ -621,10 +621,6 @@
*/
JNIEXPORT jobject JNICALL
-JVM_DoPrivileged(JNIEnv *env, jclass cls,
- jobject action, jobject context, jboolean wrapException);
-
-JNIEXPORT jobject JNICALL
JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls);
JNIEXPORT jobject JNICALL
--- a/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -446,6 +446,12 @@
assert(element != NULL, "invariant");
JfrJavaSupport::set_array_element(settings, element, i, CHECK);
}
+ } else {
+ settings = JfrJavaSupport::new_string_array(1, CHECK);
+ assert(settings != NULL, "invariant");
+ jobject element = JfrJavaSupport::new_string("default", CHECK);
+ assert(element != NULL, "invariant");
+ JfrJavaSupport::set_array_element(settings, element, 0, CHECK);
}
static const char klass[] = "jdk/jfr/internal/dcmd/DCmdStart";
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -34,7 +34,6 @@
#include "oops/markOop.hpp"
#include "oops/oop.hpp"
#include "prims/jvmtiThreadState.hpp"
-#include "prims/privilegedStack.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/threadSMR.inline.hpp"
@@ -323,14 +322,6 @@
ReferenceLocateClosure rcl(_callback, OldObjectRoot::_threads, OldObjectRoot::_stack_variable, jt);
if (jt->has_last_Java_frame()) {
- PrivilegedElement* const pelem = jt->privileged_stack_top();
- if (pelem != NULL) {
- pelem->oops_do(&rcl);
- if (rcl.complete()) {
- return true;
- }
- }
-
// traverse the registered growable array gc_array
// can't do this as it is not reachable from outside
--- a/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -321,7 +321,6 @@
int _cur_index;
const u4 _max_frames;
volatile bool _disenrolled;
- static Monitor* _transition_block_lock;
JavaThread* next_thread(ThreadsList* t_list, JavaThread* first_sampled, JavaThread* current);
void task_stacktrace(JfrSampleType type, JavaThread** last_thread);
@@ -339,12 +338,10 @@
public:
void run();
- static Monitor* transition_block() { return _transition_block_lock; }
+ static Monitor* transition_block() { return JfrThreadSampler_lock; }
static void on_javathread_suspend(JavaThread* thread);
};
-Monitor* JfrThreadSampler::_transition_block_lock = new Monitor(Mutex::leaf, "Trace block", true, Monitor::_safepoint_check_never);
-
static void clear_transition_block(JavaThread* jt) {
jt->clear_trace_flag();
JfrThreadLocal* const tl = jt->jfr_thread_local();
@@ -362,9 +359,6 @@
bool ret = false;
thread->set_trace_flag();
- if (!UseMembar) {
- os::serialize_thread_states();
- }
if (JAVA_SAMPLE == type) {
if (thread_state_in_java(thread)) {
ret = sample_thread_in_java(thread, frames, max_frames);
--- a/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -209,6 +209,7 @@
return map;
}
+#if INCLUDE_AOT
AOTOopRecorder::AOTOopRecorder(Arena* arena, bool deduplicate) : OopRecorder(arena, deduplicate) {
_meta_refs = new GrowableArray<jobject>();
}
@@ -268,6 +269,7 @@
assert(index == _meta_refs->length(), "must be last");
_meta_refs->append(o);
}
+#endif // INCLUDE_AOT
void* CodeInstaller::record_metadata_reference(CodeSection* section, address dest, Handle constant, TRAPS) {
/*
@@ -555,6 +557,7 @@
}
}
+#if INCLUDE_AOT
RelocBuffer::~RelocBuffer() {
if (_buffer != NULL) {
FREE_C_HEAP_ARRAY(char, _buffer);
@@ -593,9 +596,7 @@
// Get instructions and constants CodeSections early because we need it.
_instructions = buffer.insts();
_constants = buffer.consts();
-#if INCLUDE_AOT
buffer.set_immutable_PIC(_immutable_pic_compilation);
-#endif
initialize_fields(target(), JNIHandles::resolve(compiled_code_obj), CHECK_OK);
JVMCIEnv::CodeInstallResult result = initialize_buffer(buffer, false, CHECK_OK);
@@ -618,6 +619,7 @@
reloc_buffer->set_size(size);
return JVMCIEnv::ok;
}
+#endif // INCLUDE_AOT
// constructor used to create a method
JVMCIEnv::CodeInstallResult CodeInstaller::install(JVMCICompiler* compiler, Handle target, Handle compiled_code, CodeBlob*& cb, Handle installed_code, Handle speculation_log, TRAPS) {
@@ -769,6 +771,7 @@
}
}
}
+#if INCLUDE_AOT
if (UseAOT && site->is_a(site_Call::klass())) {
oop target = site_Call::target(site);
InstanceKlass* target_klass = InstanceKlass::cast(target->klass());
@@ -777,6 +780,7 @@
aot_call_stubs++;
}
}
+#endif
}
}
int size = static_call_stubs * CompiledStaticCall::to_interp_stub_size();
@@ -914,7 +918,7 @@
last_pc_offset = pc_offset;
JavaThread* thread = JavaThread::current();
- if (SafepointMechanism::poll(thread)) {
+ if (SafepointMechanism::should_block(thread)) {
// this is a hacky way to force a safepoint check but nothing else was jumping out at me.
ThreadToNativeFromVM ttnfv(thread);
}
@@ -1278,10 +1282,12 @@
if (!_immutable_pic_compilation) {
pd_patch_MetaspaceConstant(pc_offset, constant, CHECK);
}
+#if INCLUDE_AOT
} else if (constant->is_a(HotSpotSentinelConstant::klass())) {
if (!_immutable_pic_compilation) {
JVMCI_ERROR("sentinel constant not supported for normal compiles: %s", constant->klass()->signature_name());
}
+#endif
} else {
JVMCI_ERROR("unknown constant type in data patch: %s", constant->klass()->signature_name());
}
--- a/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jvmci/jvmciCodeInstaller.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -28,6 +28,7 @@
#include "jvmci/jvmciEnv.hpp"
#include "code/nativeInst.hpp"
+#if INCLUDE_AOT
class RelocBuffer : public StackObj {
enum { stack_size = 1024 };
public:
@@ -106,6 +107,7 @@
AOTOopRecorder* _oop_recorder;
ExceptionHandlerTable* _exception_table;
};
+#endif // INCLUDE_AOT
/*
* This class handles the conversion from a InstalledCode to a CodeBlob or an nmethod.
@@ -202,7 +204,9 @@
CodeInstaller(bool immutable_pic_compilation) : _arena(mtCompiler), _immutable_pic_compilation(immutable_pic_compilation) {}
+#if INCLUDE_AOT
JVMCIEnv::CodeInstallResult gather_metadata(Handle target, Handle compiled_code, CodeMetadata& metadata, TRAPS);
+#endif
JVMCIEnv::CodeInstallResult install(JVMCICompiler* compiler, Handle target, Handle compiled_code, CodeBlob*& cb, Handle installed_code, Handle speculation_log, TRAPS);
static address runtime_call_target_address(oop runtime_call);
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -714,6 +714,7 @@
C2V_END
C2V_VMENTRY(jint, getMetadata, (JNIEnv *jniEnv, jobject, jobject target, jobject compiled_code, jobject metadata))
+#if INCLUDE_AOT
ResourceMark rm;
HandleMark hm;
@@ -783,6 +784,9 @@
HotSpotMetaData::set_exceptionBytes(metadata_handle, exceptionArrayOop());
return result;
+#else
+ THROW_MSG_0(vmSymbols::java_lang_InternalError(), "unimplemented");
+#endif
C2V_END
C2V_VMENTRY(void, resetCompilationStatistics, (JNIEnv *jniEnv, jobject))
@@ -1426,12 +1430,16 @@
C2V_END
C2V_VMENTRY(jlong, getFingerprint, (JNIEnv*, jobject, jlong metaspace_klass))
+#if INCLUDE_AOT
Klass *k = CompilerToVM::asKlass(metaspace_klass);
if (k->is_instance_klass()) {
return InstanceKlass::cast(k)->get_stored_fingerprint();
} else {
return 0;
}
+#else
+ THROW_MSG_0(vmSymbols::java_lang_InternalError(), "unimplemented");
+#endif
C2V_END
C2V_VMENTRY(jobject, getHostClass, (JNIEnv*, jobject, jobject jvmci_type))
--- a/src/hotspot/share/memory/filemap.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/filemap.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,6 @@
#include "jvm.h"
#include "classfile/classLoader.inline.hpp"
#include "classfile/classLoaderExt.hpp"
-#include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/altHashing.hpp"
@@ -615,7 +614,7 @@
} else {
si->_file_offset = _file_offset;
}
- if (MetaspaceShared::is_heap_region(region)) {
+ if (HeapShared::is_heap_region(region)) {
assert((base - (char*)Universe::narrow_oop_base()) % HeapWordSize == 0, "Sanity");
if (base != NULL) {
si->_addr._offset = (intx)CompressedOops::encode_not_null((oop)base);
@@ -814,7 +813,7 @@
"String1", "String2", "OpenArchive1", "OpenArchive2" };
char* FileMapInfo::map_region(int i, char** top_ret) {
- assert(!MetaspaceShared::is_heap_region(i), "sanity");
+ assert(!HeapShared::is_heap_region(i), "sanity");
CDSFileMapRegion* si = space_at(i);
size_t used = si->_used;
size_t alignment = os::vm_allocation_granularity();
@@ -857,14 +856,14 @@
}
}
-static MemRegion *string_ranges = NULL;
+static MemRegion *closed_archive_heap_ranges = NULL;
static MemRegion *open_archive_heap_ranges = NULL;
-static int num_string_ranges = 0;
+static int num_closed_archive_heap_ranges = 0;
static int num_open_archive_heap_ranges = 0;
#if INCLUDE_CDS_JAVA_HEAP
bool FileMapInfo::has_heap_regions() {
- return (_header->_space[MetaspaceShared::first_string]._used > 0);
+ return (_header->_space[MetaspaceShared::first_closed_archive_heap_region]._used > 0);
}
// Returns the address range of the archived heap regions computed using the
@@ -875,7 +874,9 @@
address start = (address) max_uintx;
address end = NULL;
- for (int i = MetaspaceShared::first_string; i <= MetaspaceShared::last_valid_region; i++) {
+ for (int i = MetaspaceShared::first_closed_archive_heap_region;
+ i <= MetaspaceShared::last_valid_region;
+ i++) {
CDSFileMapRegion* si = space_at(i);
size_t size = si->_used;
if (size > 0) {
@@ -894,16 +895,16 @@
}
//
-// Map the shared string objects and open archive heap objects to the runtime
-// java heap.
+// Map the closed and open archive heap objects to the runtime java heap.
//
-// The shared strings are mapped close to the end of the java heap top in
-// closed archive regions. The mapped strings contain no out-going references
-// to any other java heap regions. GC does not write into the mapped shared strings.
+// The shared objects are mapped at (or close to ) the java heap top in
+// closed archive regions. The mapped objects contain no out-going
+// references to any other java heap regions. GC does not write into the
+// mapped closed archive heap region.
//
-// The open archive heap objects are mapped below the shared strings in
-// the runtime java heap. The mapped open archive heap data only contain
-// references to the shared strings and open archive objects initially.
+// The open archive heap objects are mapped below the shared objects in
+// the runtime java heap. The mapped open archive heap data only contains
+// references to the shared objects and open archive objects initially.
// During runtime execution, out-going references to any other java heap
// regions may be added. GC may mark and update references in the mapped
// open archive objects.
@@ -983,29 +984,31 @@
log_info(cds)("CDS heap data relocation delta = " INTX_FORMAT " bytes", delta);
HeapShared::init_narrow_oop_decoding(narrow_oop_base() + delta, narrow_oop_shift());
- CDSFileMapRegion* si = space_at(MetaspaceShared::first_string);
- address relocated_strings_bottom = start_address_as_decoded_from_archive(si);
- if (!is_aligned(relocated_strings_bottom, HeapRegion::GrainBytes)) {
- // Align the bottom of the string regions at G1 region boundary. This will avoid
- // the situation where the highest open region and the lowest string region sharing
- // the same G1 region. Otherwise we will fail to map the open regions.
- size_t align = size_t(relocated_strings_bottom) % HeapRegion::GrainBytes;
+ CDSFileMapRegion* si = space_at(MetaspaceShared::first_closed_archive_heap_region);
+ address relocated_closed_heap_region_bottom = start_address_as_decoded_from_archive(si);
+ if (!is_aligned(relocated_closed_heap_region_bottom, HeapRegion::GrainBytes)) {
+ // Align the bottom of the closed archive heap regions at G1 region boundary.
+ // This will avoid the situation where the highest open region and the lowest
+ // closed region sharing the same G1 region. Otherwise we will fail to map the
+ // open regions.
+ size_t align = size_t(relocated_closed_heap_region_bottom) % HeapRegion::GrainBytes;
delta -= align;
log_info(cds)("CDS heap data need to be relocated lower by a further " SIZE_FORMAT
- " bytes to " INTX_FORMAT " to be aligned with HeapRegion::GrainBytes", align, delta);
+ " bytes to " INTX_FORMAT " to be aligned with HeapRegion::GrainBytes",
+ align, delta);
HeapShared::init_narrow_oop_decoding(narrow_oop_base() + delta, narrow_oop_shift());
_heap_pointers_need_patching = true;
- relocated_strings_bottom = start_address_as_decoded_from_archive(si);
+ relocated_closed_heap_region_bottom = start_address_as_decoded_from_archive(si);
}
- assert(is_aligned(relocated_strings_bottom, HeapRegion::GrainBytes), "must be");
+ assert(is_aligned(relocated_closed_heap_region_bottom, HeapRegion::GrainBytes),
+ "must be");
- // First, map string regions as closed archive heap regions.
- // GC does not write into the regions.
- if (map_heap_data(&string_ranges,
- MetaspaceShared::first_string,
- MetaspaceShared::max_strings,
- &num_string_ranges)) {
- StringTable::set_shared_string_mapped();
+ // Map the closed_archive_heap regions, GC does not write into the regions.
+ if (map_heap_data(&closed_archive_heap_ranges,
+ MetaspaceShared::first_closed_archive_heap_region,
+ MetaspaceShared::max_closed_archive_heap_region,
+ &num_closed_archive_heap_ranges)) {
+ HeapShared::set_closed_archive_heap_region_mapped();
// Now, map open_archive heap regions, GC can write into the regions.
if (map_heap_data(&open_archive_heap_ranges,
@@ -1023,8 +1026,9 @@
map_heap_regions_impl();
}
- if (!StringTable::shared_string_mapped()) {
- assert(string_ranges == NULL && num_string_ranges == 0, "sanity");
+ if (!HeapShared::closed_archive_heap_region_mapped()) {
+ assert(closed_archive_heap_ranges == NULL &&
+ num_closed_archive_heap_ranges == 0, "sanity");
}
if (!HeapShared::open_archive_heap_region_mapped()) {
@@ -1115,9 +1119,9 @@
return;
}
- patch_archived_heap_embedded_pointers(string_ranges,
- num_string_ranges,
- MetaspaceShared::first_string);
+ patch_archived_heap_embedded_pointers(closed_archive_heap_ranges,
+ num_closed_archive_heap_ranges,
+ MetaspaceShared::first_closed_archive_heap_region);
patch_archived_heap_embedded_pointers(open_archive_heap_ranges,
num_open_archive_heap_ranges,
@@ -1136,11 +1140,13 @@
// This internally allocates objects using SystemDictionary::Object_klass(), so it
// must be called after the well-known classes are resolved.
void FileMapInfo::fixup_mapped_heap_regions() {
- // If any string regions were found, call the fill routine to make them parseable.
- // Note that string_ranges may be non-NULL even if no ranges were found.
- if (num_string_ranges != 0) {
- assert(string_ranges != NULL, "Null string_ranges array with non-zero count");
- G1CollectedHeap::heap()->fill_archive_regions(string_ranges, num_string_ranges);
+ // If any closed regions were found, call the fill routine to make them parseable.
+ // Note that closed_archive_heap_ranges may be non-NULL even if no ranges were found.
+ if (num_closed_archive_heap_ranges != 0) {
+ assert(closed_archive_heap_ranges != NULL,
+ "Null closed_archive_heap_ranges array with non-zero count");
+ G1CollectedHeap::heap()->fill_archive_regions(closed_archive_heap_ranges,
+ num_closed_archive_heap_ranges);
}
// do the same for mapped open archive heap regions
@@ -1170,9 +1176,9 @@
if (sz == 0) {
return true; // no data
}
- if ((MetaspaceShared::is_string_region(i) &&
- !StringTable::shared_string_mapped()) ||
- (MetaspaceShared::is_open_archive_heap_region(i) &&
+ if ((HeapShared::is_closed_archive_heap_region(i) &&
+ !HeapShared::closed_archive_heap_region_mapped()) ||
+ (HeapShared::is_open_archive_heap_region(i) &&
!HeapShared::open_archive_heap_region_mapped())) {
return true; // archived heap data is not mapped
}
@@ -1188,7 +1194,7 @@
// Unmap a memory region in the address space.
void FileMapInfo::unmap_region(int i) {
- assert(!MetaspaceShared::is_heap_region(i), "sanity");
+ assert(!HeapShared::is_heap_region(i), "sanity");
CDSFileMapRegion* si = space_at(i);
size_t used = si->_used;
size_t size = align_up(used, os::vm_allocation_granularity());
@@ -1259,7 +1265,7 @@
char* FileMapInfo::region_addr(int idx) {
CDSFileMapRegion* si = space_at(idx);
- if (MetaspaceShared::is_heap_region(idx)) {
+ if (HeapShared::is_heap_region(idx)) {
assert(DumpSharedSpaces, "The following doesn't work at runtime");
return si->_used > 0 ?
(char*)start_address_as_decoded_with_current_oop_encoding_mode(si) : NULL;
@@ -1326,7 +1332,7 @@
if (prop != NULL) {
warning("Archived non-system classes are disabled because the "
"java.system.class.loader property is specified (value = \"%s\"). "
- "To use archived non-system classes, this property must be not be set", prop);
+ "To use archived non-system classes, this property must not be set", prop);
_has_platform_or_app_classes = false;
}
@@ -1383,7 +1389,7 @@
if (map_info) {
map_info->fail_continue("%s", msg);
for (int i = 0; i < MetaspaceShared::num_non_heap_spaces; i++) {
- if (!MetaspaceShared::is_heap_region(i)) {
+ if (!HeapShared::is_heap_region(i)) {
char *addr = map_info->region_addr(i);
if (addr != NULL) {
map_info->unmap_region(i);
@@ -1395,7 +1401,8 @@
// of the java heap. Unmapping of the heap regions are managed by GC.
map_info->dealloc_archive_heap_regions(open_archive_heap_ranges,
num_open_archive_heap_ranges);
- map_info->dealloc_archive_heap_regions(string_ranges, num_string_ranges);
+ map_info->dealloc_archive_heap_regions(closed_archive_heap_ranges,
+ num_closed_archive_heap_ranges);
} else if (DumpSharedSpaces) {
fail_stop("%s", msg);
}
--- a/src/hotspot/share/memory/heapShared.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/heapShared.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -37,6 +37,7 @@
#include "memory/metaspaceClosure.hpp"
#include "memory/resourceArea.hpp"
#include "oops/compressedOops.inline.hpp"
+#include "oops/fieldStreams.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/safepointVerifiers.hpp"
@@ -47,12 +48,40 @@
#if INCLUDE_CDS_JAVA_HEAP
+bool HeapShared::_closed_archive_heap_region_mapped = false;
bool HeapShared::_open_archive_heap_region_mapped = false;
bool HeapShared::_archive_heap_region_fixed = false;
address HeapShared::_narrow_oop_base;
int HeapShared::_narrow_oop_shift;
+//
+// If you add new entries to the following tables, you should know what you're doing!
+//
+
+// Entry fields for shareable subgraphs archived in the closed archive heap
+// region. Warning: Objects in the subgraphs should not have reference fields
+// assigned at runtime.
+static ArchivableStaticFieldInfo closed_archive_subgraph_entry_fields[] = {
+ {"java/lang/Integer$IntegerCache", "archivedCache"},
+};
+// Entry fields for subgraphs archived in the open archive heap region.
+static ArchivableStaticFieldInfo open_archive_subgraph_entry_fields[] = {
+ {"jdk/internal/module/ArchivedModuleGraph", "archivedSystemModules"},
+ {"jdk/internal/module/ArchivedModuleGraph", "archivedModuleFinder"},
+ {"jdk/internal/module/ArchivedModuleGraph", "archivedMainModule"},
+ {"jdk/internal/module/ArchivedModuleGraph", "archivedConfiguration"},
+ {"java/util/ImmutableCollections$ListN", "EMPTY_LIST"},
+ {"java/util/ImmutableCollections$MapN", "EMPTY_MAP"},
+ {"java/util/ImmutableCollections$SetN", "EMPTY_SET"},
+ {"java/lang/module/Configuration", "EMPTY_CONFIGURATION"},
+};
+
+const static int num_closed_archive_subgraph_entry_fields =
+ sizeof(closed_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
+const static int num_open_archive_subgraph_entry_fields =
+ sizeof(open_archive_subgraph_entry_fields) / sizeof(ArchivableStaticFieldInfo);
+
////////////////////////////////////////////////////////////////
//
// Java heap object archiving support
@@ -189,6 +218,10 @@
// Archive interned string objects
StringTable::write_to_archive();
+ archive_object_subgraphs(closed_archive_subgraph_entry_fields,
+ num_closed_archive_subgraph_entry_fields,
+ true /* is_closed_archive */, THREAD);
+
G1CollectedHeap::heap()->end_archive_alloc_range(closed_archive,
os::vm_allocation_granularity());
}
@@ -204,7 +237,10 @@
archive_klass_objects(THREAD);
- archive_object_subgraphs(THREAD);
+ archive_object_subgraphs(open_archive_subgraph_entry_fields,
+ num_open_archive_subgraph_entry_fields,
+ false /* is_closed_archive */,
+ THREAD);
G1CollectedHeap::heap()->end_archive_alloc_range(open_archive,
os::vm_allocation_granularity());
@@ -237,7 +273,8 @@
}
// Add an entry field to the current KlassSubGraphInfo.
-void KlassSubGraphInfo::add_subgraph_entry_field(int static_field_offset, oop v) {
+void KlassSubGraphInfo::add_subgraph_entry_field(
+ int static_field_offset, oop v, bool is_closed_archive) {
assert(DumpSharedSpaces, "dump time only");
if (_subgraph_entry_fields == NULL) {
_subgraph_entry_fields =
@@ -245,6 +282,7 @@
}
_subgraph_entry_fields->append((juint)static_field_offset);
_subgraph_entry_fields->append(CompressedOops::encode(v));
+ _subgraph_entry_fields->append(is_closed_archive ? 1 : 0);
}
// Add the Klass* for an object in the current KlassSubGraphInfo's subgraphs.
@@ -315,7 +353,7 @@
GrowableArray<juint>* entry_fields = info->subgraph_entry_fields();
if (entry_fields != NULL) {
int num_entry_fields = entry_fields->length();
- assert(num_entry_fields % 2 == 0, "sanity");
+ assert(num_entry_fields % 3 == 0, "sanity");
_entry_field_records =
MetaspaceShared::new_ro_array<juint>(num_entry_fields);
for (int i = 0 ; i < num_entry_fields; i++) {
@@ -365,8 +403,8 @@
// Build the records of archived subgraph infos, which include:
// - Entry points to all subgraphs from the containing class mirror. The entry
// points are static fields in the mirror. For each entry point, the field
-// offset and value are recorded in the sub-graph info. The value are stored
-// back to the corresponding field at runtime.
+// offset, value and is_closed_archive flag are recorded in the sub-graph
+// info. The value is stored back to the corresponding field at runtime.
// - A list of klasses that need to be loaded/initialized before archived
// java object sub-graph can be accessed at runtime.
void HeapShared::write_subgraph_info_table() {
@@ -448,15 +486,25 @@
Array<juint>* entry_field_records = record->entry_field_records();
if (entry_field_records != NULL) {
int efr_len = entry_field_records->length();
- assert(efr_len % 2 == 0, "sanity");
+ assert(efr_len % 3 == 0, "sanity");
for (i = 0; i < efr_len;) {
int field_offset = entry_field_records->at(i);
- // The object refereced by the field becomes 'known' by GC from this
- // point. All objects in the subgraph reachable from the object are
- // also 'known' by GC.
- oop v = materialize_archived_object(entry_field_records->at(i+1));
+ narrowOop nv = entry_field_records->at(i+1);
+ int is_closed_archive = entry_field_records->at(i+2);
+ oop v;
+ if (is_closed_archive == 0) {
+ // It's an archived object in the open archive heap regions, not shared.
+ // The object refereced by the field becomes 'known' by GC from this
+ // point. All objects in the subgraph reachable from the object are
+ // also 'known' by GC.
+ v = materialize_archived_object(nv);
+ } else {
+ // Shared object in the closed archive heap regions. Decode directly.
+ assert(!CompressedOops::is_null(nv), "shared object is null");
+ v = HeapShared::decode_from_archive(nv);
+ }
m->obj_field_put(field_offset, v);
- i += 2;
+ i += 3;
log_debug(cds, heap)(" " PTR_FORMAT " init field @ %2d = " PTR_FORMAT, p2i(k), field_offset, p2i(v));
}
@@ -469,16 +517,20 @@
class WalkOopAndArchiveClosure: public BasicOopIterateClosure {
int _level;
+ bool _is_closed_archive;
bool _record_klasses_only;
KlassSubGraphInfo* _subgraph_info;
oop _orig_referencing_obj;
oop _archived_referencing_obj;
Thread* _thread;
public:
- WalkOopAndArchiveClosure(int level, bool record_klasses_only,
+ WalkOopAndArchiveClosure(int level,
+ bool is_closed_archive,
+ bool record_klasses_only,
KlassSubGraphInfo* subgraph_info,
oop orig, oop archived, TRAPS) :
- _level(level), _record_klasses_only(record_klasses_only),
+ _level(level), _is_closed_archive(is_closed_archive),
+ _record_klasses_only(record_klasses_only),
_subgraph_info(subgraph_info),
_orig_referencing_obj(orig), _archived_referencing_obj(archived),
_thread(THREAD) {}
@@ -506,7 +558,8 @@
obj->print_on(&out);
}
- oop archived = HeapShared::archive_reachable_objects_from(_level + 1, _subgraph_info, obj, THREAD);
+ oop archived = HeapShared::archive_reachable_objects_from(
+ _level + 1, _subgraph_info, obj, _is_closed_archive, THREAD);
assert(archived != NULL, "VM should have exited with unarchivable objects for _level > 1");
assert(HeapShared::is_archived_object(archived), "must be");
@@ -520,11 +573,32 @@
}
};
+void HeapShared::check_closed_archive_heap_region_object(InstanceKlass* k,
+ Thread* THREAD) {
+ // Check fields in the object
+ for (JavaFieldStream fs(k); !fs.done(); fs.next()) {
+ if (!fs.access_flags().is_static()) {
+ BasicType ft = fs.field_descriptor().field_type();
+ if (!fs.access_flags().is_final() && (ft == T_ARRAY || T_OBJECT)) {
+ ResourceMark rm(THREAD);
+ log_warning(cds, heap)(
+ "Please check reference field in %s instance in closed archive heap region: %s %s",
+ k->external_name(), (fs.name())->as_C_string(),
+ (fs.signature())->as_C_string());
+ }
+ }
+ }
+}
+
// (1) If orig_obj has not been archived yet, archive it.
// (2) If orig_obj has not been seen yet (since start_recording_subgraph() was called),
// trace all objects that are reachable from it, and make sure these objects are archived.
// (3) Record the klasses of all orig_obj and all reachable objects.
-oop HeapShared::archive_reachable_objects_from(int level, KlassSubGraphInfo* subgraph_info, oop orig_obj, TRAPS) {
+oop HeapShared::archive_reachable_objects_from(int level,
+ KlassSubGraphInfo* subgraph_info,
+ oop orig_obj,
+ bool is_closed_archive,
+ TRAPS) {
assert(orig_obj != NULL, "must be");
assert(!is_archived_object(orig_obj), "sanity");
@@ -578,8 +652,12 @@
Klass *relocated_k = archived_obj->klass();
subgraph_info->add_subgraph_object_klass(orig_k, relocated_k);
- WalkOopAndArchiveClosure walker(level, record_klasses_only, subgraph_info, orig_obj, archived_obj, THREAD);
+ WalkOopAndArchiveClosure walker(level, is_closed_archive, record_klasses_only,
+ subgraph_info, orig_obj, archived_obj, THREAD);
orig_obj->oop_iterate(&walker);
+ if (is_closed_archive && orig_k->is_instance_klass()) {
+ check_closed_archive_heap_region_object(InstanceKlass::cast(orig_k), THREAD);
+ }
return archived_obj;
}
@@ -621,15 +699,12 @@
const char* klass_name,
int field_offset,
const char* field_name,
+ bool is_closed_archive,
TRAPS) {
assert(DumpSharedSpaces, "dump time only");
assert(k->is_shared_boot_class(), "must be boot class");
oop m = k->java_mirror();
- oop archived_m = find_archived_heap_object(m);
- if (CompressedOops::is_null(archived_m)) {
- return;
- }
KlassSubGraphInfo* subgraph_info = get_subgraph_info(k);
oop f = m->obj_field(field_offset);
@@ -643,7 +718,8 @@
f->print_on(&out);
}
- oop af = archive_reachable_objects_from(1, subgraph_info, f, CHECK);
+ oop af = archive_reachable_objects_from(1, subgraph_info, f,
+ is_closed_archive, CHECK);
if (af == NULL) {
log_error(cds, heap)("Archiving failed %s::%s (some reachable objects cannot be archived)",
@@ -652,13 +728,13 @@
// Note: the field value is not preserved in the archived mirror.
// Record the field as a new subGraph entry point. The recorded
// information is restored from the archive at runtime.
- subgraph_info->add_subgraph_entry_field(field_offset, af);
+ subgraph_info->add_subgraph_entry_field(field_offset, af, is_closed_archive);
log_info(cds, heap)("Archived field %s::%s => " PTR_FORMAT, klass_name, field_name, p2i(af));
}
} else {
// The field contains null, we still need to record the entry point,
// so it can be restored at runtime.
- subgraph_info->add_subgraph_entry_field(field_offset, NULL);
+ subgraph_info->add_subgraph_entry_field(field_offset, NULL, false);
}
}
@@ -687,10 +763,6 @@
assert(k->is_shared_boot_class(), "must be boot class");
oop m = k->java_mirror();
- oop archived_m = find_archived_heap_object(m);
- if (CompressedOops::is_null(archived_m)) {
- return;
- }
oop f = m->obj_field(field_offset);
if (!CompressedOops::is_null(f)) {
verify_subgraph_from(f);
@@ -783,30 +855,6 @@
_num_total_recorded_klasses += num_new_recorded_klasses;
}
-struct ArchivableStaticFieldInfo {
- const char* klass_name;
- const char* field_name;
- InstanceKlass* klass;
- int offset;
- BasicType type;
-};
-
-// If you add new entries to this table, you should know what you're doing!
-static ArchivableStaticFieldInfo archivable_static_fields[] = {
- {"jdk/internal/module/ArchivedModuleGraph", "archivedSystemModules"},
- {"jdk/internal/module/ArchivedModuleGraph", "archivedModuleFinder"},
- {"jdk/internal/module/ArchivedModuleGraph", "archivedMainModule"},
- {"jdk/internal/module/ArchivedModuleGraph", "archivedConfiguration"},
- {"java/util/ImmutableCollections$ListN", "EMPTY_LIST"},
- {"java/util/ImmutableCollections$MapN", "EMPTY_MAP"},
- {"java/util/ImmutableCollections$SetN", "EMPTY_SET"},
- {"java/lang/Integer$IntegerCache", "archivedCache"},
- {"java/lang/module/Configuration", "EMPTY_CONFIGURATION"},
-};
-
-const static int num_archivable_static_fields =
- sizeof(archivable_static_fields) / sizeof(ArchivableStaticFieldInfo);
-
class ArchivableStaticFieldFinder: public FieldClosure {
InstanceKlass* _ik;
Symbol* _field_name;
@@ -828,17 +876,20 @@
int offset() { return _offset; }
};
-void HeapShared::init_archivable_static_fields(Thread* THREAD) {
- _dump_time_subgraph_info_table = new (ResourceObj::C_HEAP, mtClass)DumpTimeKlassSubGraphInfoTable();
-
- for (int i = 0; i < num_archivable_static_fields; i++) {
- ArchivableStaticFieldInfo* info = &archivable_static_fields[i];
+void HeapShared::init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[],
+ int num, Thread* THREAD) {
+ for (int i = 0; i < num; i++) {
+ ArchivableStaticFieldInfo* info = &fields[i];
TempNewSymbol klass_name = SymbolTable::new_symbol(info->klass_name, THREAD);
TempNewSymbol field_name = SymbolTable::new_symbol(info->field_name, THREAD);
Klass* k = SystemDictionary::resolve_or_null(klass_name, THREAD);
assert(k != NULL && !HAS_PENDING_EXCEPTION, "class must exist");
InstanceKlass* ik = InstanceKlass::cast(k);
+ assert(InstanceKlass::cast(ik)->is_shared_boot_class(),
+ "Only support boot classes");
+ ik->initialize(THREAD);
+ guarantee(!HAS_PENDING_EXCEPTION, "exception in initialize");
ArchivableStaticFieldFinder finder(ik, field_name);
ik->do_local_static_fields(&finder);
@@ -849,7 +900,26 @@
}
}
-void HeapShared::archive_object_subgraphs(Thread* THREAD) {
+void HeapShared::init_subgraph_entry_fields(Thread* THREAD) {
+ _dump_time_subgraph_info_table = new (ResourceObj::C_HEAP, mtClass)DumpTimeKlassSubGraphInfoTable();
+
+ init_subgraph_entry_fields(closed_archive_subgraph_entry_fields,
+ num_closed_archive_subgraph_entry_fields,
+ THREAD);
+ init_subgraph_entry_fields(open_archive_subgraph_entry_fields,
+ num_open_archive_subgraph_entry_fields,
+ THREAD);
+}
+
+void HeapShared::archive_object_subgraphs(ArchivableStaticFieldInfo fields[],
+ int num, bool is_closed_archive,
+ Thread* THREAD) {
+ _num_total_subgraph_recordings = 0;
+ _num_total_walked_objs = 0;
+ _num_total_archived_objs = 0;
+ _num_total_recorded_klasses = 0;
+ _num_total_verifications = 0;
+
// For each class X that has one or more archived fields:
// [1] Dump the subgraph of each archived field
// [2] Create a list of all the class of the objects that can be reached
@@ -857,38 +927,40 @@
// At runtime, these classes are initialized before X's archived fields
// are restored by HeapShared::initialize_from_archived_subgraph().
int i;
- for (i = 0; i < num_archivable_static_fields; ) {
- ArchivableStaticFieldInfo* info = &archivable_static_fields[i];
+ for (i = 0; i < num; ) {
+ ArchivableStaticFieldInfo* info = &fields[i];
const char* klass_name = info->klass_name;
start_recording_subgraph(info->klass, klass_name);
// If you have specified consecutive fields of the same klass in
- // archivable_static_fields[], these will be archived in the same
+ // fields[], these will be archived in the same
// {start_recording_subgraph ... done_recording_subgraph} pass to
// save time.
- for (; i < num_archivable_static_fields; i++) {
- ArchivableStaticFieldInfo* f = &archivable_static_fields[i];
+ for (; i < num; i++) {
+ ArchivableStaticFieldInfo* f = &fields[i];
if (f->klass_name != klass_name) {
break;
}
archive_reachable_objects_from_static_field(f->klass, f->klass_name,
- f->offset, f->field_name, CHECK);
+ f->offset, f->field_name,
+ is_closed_archive, CHECK);
}
done_recording_subgraph(info->klass, klass_name);
}
- log_info(cds, heap)("Performed subgraph records = %d times", _num_total_subgraph_recordings);
- log_info(cds, heap)("Walked %d objects", _num_total_walked_objs);
- log_info(cds, heap)("Archived %d objects", _num_total_archived_objs);
- log_info(cds, heap)("Recorded %d klasses", _num_total_recorded_klasses);
-
+ log_info(cds, heap)("Archived subgraph records in %s archive heap region = %d",
+ is_closed_archive ? "closed" : "open",
+ _num_total_subgraph_recordings);
+ log_info(cds, heap)(" Walked %d objects", _num_total_walked_objs);
+ log_info(cds, heap)(" Archived %d objects", _num_total_archived_objs);
+ log_info(cds, heap)(" Recorded %d klasses", _num_total_recorded_klasses);
#ifndef PRODUCT
- for (int i = 0; i < num_archivable_static_fields; i++) {
- ArchivableStaticFieldInfo* f = &archivable_static_fields[i];
+ for (int i = 0; i < num; i++) {
+ ArchivableStaticFieldInfo* f = &fields[i];
verify_subgraph_from_static_field(f->klass, f->offset);
}
- log_info(cds, heap)("Verified %d references", _num_total_verifications);
+ log_info(cds, heap)(" Verified %d references", _num_total_verifications);
#endif
}
--- a/src/hotspot/share/memory/heapShared.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/heapShared.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -28,6 +28,7 @@
#include "classfile/compactHashtable.hpp"
#include "classfile/systemDictionary.hpp"
#include "memory/allocation.hpp"
+#include "memory/metaspaceShared.hpp"
#include "memory/universe.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.hpp"
@@ -37,6 +38,14 @@
#include "utilities/resourceHash.hpp"
#if INCLUDE_CDS_JAVA_HEAP
+struct ArchivableStaticFieldInfo {
+ const char* klass_name;
+ const char* field_name;
+ InstanceKlass* klass;
+ int offset;
+ BasicType type;
+};
+
// A dump time sub-graph info for Klass _k. It includes the entry points
// (static fields in _k's mirror) of the archived sub-graphs reachable
// from _k's mirror. It also contains a list of Klasses of the objects
@@ -50,7 +59,8 @@
// object sub-graphs can be accessed at runtime.
GrowableArray<Klass*>* _subgraph_object_klasses;
// A list of _k's static fields as the entry points of archived sub-graphs.
- // For each entry field, it is a pair of field_offset and field_value.
+ // For each entry field, it is a tuple of field_offset, field_value and
+ // is_closed_archive flag.
GrowableArray<juint>* _subgraph_entry_fields;
public:
@@ -73,7 +83,8 @@
GrowableArray<juint>* subgraph_entry_fields() {
return _subgraph_entry_fields;
}
- void add_subgraph_entry_field(int static_field_offset, oop v);
+ void add_subgraph_entry_field(int static_field_offset, oop v,
+ bool is_closed_archive);
void add_subgraph_object_klass(Klass *orig_k, Klass *relocated_k);
int num_subgraph_object_klasses() {
return _subgraph_object_klasses == NULL ? 0 :
@@ -109,6 +120,7 @@
private:
#if INCLUDE_CDS_JAVA_HEAP
+ static bool _closed_archive_heap_region_mapped;
static bool _open_archive_heap_region_mapped;
static bool _archive_heap_region_fixed;
@@ -160,21 +172,34 @@
static DumpTimeKlassSubGraphInfoTable* _dump_time_subgraph_info_table;
static RunTimeKlassSubGraphInfoTable _run_time_subgraph_info_table;
+ static void check_closed_archive_heap_region_object(InstanceKlass* k,
+ Thread* THREAD);
+
+ static void archive_object_subgraphs(ArchivableStaticFieldInfo fields[],
+ int num,
+ bool is_closed_archive,
+ Thread* THREAD);
+
// Archive object sub-graph starting from the given static field
// in Klass k's mirror.
static void archive_reachable_objects_from_static_field(
InstanceKlass* k, const char* klass_name,
- int field_offset, const char* field_name, TRAPS);
+ int field_offset, const char* field_name,
+ bool is_closed_archive, TRAPS);
+
static void verify_subgraph_from_static_field(
InstanceKlass* k, int field_offset) PRODUCT_RETURN;
-
static void verify_reachable_objects_from(oop obj, bool is_archived) PRODUCT_RETURN;
+ static void verify_subgraph_from(oop orig_obj) PRODUCT_RETURN;
static KlassSubGraphInfo* get_subgraph_info(Klass *k);
static int num_of_subgraph_infos();
static void build_archived_subgraph_info_records(int num_records);
+ static void init_subgraph_entry_fields(ArchivableStaticFieldInfo fields[],
+ int num, Thread* THREAD);
+
// Used by decode_from_archive
static address _narrow_oop_base;
static int _narrow_oop_shift;
@@ -245,6 +270,14 @@
GrowableArray<MemRegion> *open);
static void copy_closed_archive_heap_objects(GrowableArray<MemRegion> * closed_archive);
static void copy_open_archive_heap_objects(GrowableArray<MemRegion> * open_archive);
+
+ static oop archive_reachable_objects_from(int level,
+ KlassSubGraphInfo* subgraph_info,
+ oop orig_obj,
+ bool is_closed_archive,
+ TRAPS);
+
+ static ResourceBitMap calculate_oopmap(MemRegion region);
#endif // INCLUDE_CDS_JAVA_HEAP
public:
@@ -253,6 +286,30 @@
NOT_CDS_JAVA_HEAP(return false;)
}
+ static bool is_heap_region(int idx) {
+ CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_closed_archive_heap_region &&
+ idx <= MetaspaceShared::last_open_archive_heap_region));
+ NOT_CDS_JAVA_HEAP_RETURN_(false);
+ }
+ static bool is_closed_archive_heap_region(int idx) {
+ CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_closed_archive_heap_region &&
+ idx <= MetaspaceShared::last_closed_archive_heap_region));
+ NOT_CDS_JAVA_HEAP_RETURN_(false);
+ }
+ static bool is_open_archive_heap_region(int idx) {
+ CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_open_archive_heap_region &&
+ idx <= MetaspaceShared::last_open_archive_heap_region));
+ NOT_CDS_JAVA_HEAP_RETURN_(false);
+ }
+
+ static void set_closed_archive_heap_region_mapped() {
+ CDS_JAVA_HEAP_ONLY(_closed_archive_heap_region_mapped = true);
+ NOT_CDS_JAVA_HEAP_RETURN;
+ }
+ static bool closed_archive_heap_region_mapped() {
+ CDS_JAVA_HEAP_ONLY(return _closed_archive_heap_region_mapped);
+ NOT_CDS_JAVA_HEAP_RETURN_(false);
+ }
static void set_open_archive_heap_region_mapped() {
CDS_JAVA_HEAP_ONLY(_open_archive_heap_region_mapped = true);
NOT_CDS_JAVA_HEAP_RETURN;
@@ -283,15 +340,8 @@
static void patch_archived_heap_embedded_pointers(MemRegion mem, address oopmap,
size_t oopmap_in_bits) NOT_CDS_JAVA_HEAP_RETURN;
- static void init_archivable_static_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
- static void archive_object_subgraphs(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
+ static void init_subgraph_entry_fields(Thread* THREAD) NOT_CDS_JAVA_HEAP_RETURN;
static void write_subgraph_info_table() NOT_CDS_JAVA_HEAP_RETURN;
static void serialize_subgraph_info_table_header(SerializeClosure* soc) NOT_CDS_JAVA_HEAP_RETURN;
-
-#if INCLUDE_CDS_JAVA_HEAP
- static ResourceBitMap calculate_oopmap(MemRegion region);
- static oop archive_reachable_objects_from(int level, KlassSubGraphInfo* subgraph_info, oop orig_obj, TRAPS);
- static void verify_subgraph_from(oop orig_obj) PRODUCT_RETURN;
-#endif
};
#endif // SHARE_VM_MEMORY_HEAPSHARED_HPP
--- a/src/hotspot/share/memory/metaspace.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/metaspace.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1260,6 +1260,8 @@
MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
MetaspaceObj::Type type, TRAPS) {
assert(!_frozen, "sanity");
+ assert(!(DumpSharedSpaces && THREAD->is_VM_thread()), "sanity");
+
if (HAS_PENDING_EXCEPTION) {
assert(false, "Should not allocate with exception pending");
return NULL; // caller does a CHECK_NULL too
@@ -1277,12 +1279,10 @@
tracer()->report_metaspace_allocation_failure(loader_data, word_size, type, mdtype);
// Allocation failed.
- if (is_init_completed() && !(DumpSharedSpaces && THREAD->is_VM_thread())) {
+ if (is_init_completed()) {
// Only start a GC if the bootstrapping has completed.
- // Also, we cannot GC if we are at the end of the CDS dumping stage which runs inside
- // the VM thread.
-
- // Try to clean out some memory and retry.
+ // Try to clean out some heap memory and retry. This can prevent premature
+ // expansion of the metaspace.
result = Universe::heap()->satisfy_failed_metadata_allocation(loader_data, word_size, mdtype);
}
}
@@ -1408,6 +1408,7 @@
}
ClassLoaderMetaspace::~ClassLoaderMetaspace() {
+ Metaspace::assert_not_frozen();
DEBUG_ONLY(Atomic::inc(&g_internal_statistics.num_metaspace_deaths));
delete _vsm;
if (Metaspace::using_class_space()) {
@@ -1627,165 +1628,6 @@
TestMetaspaceUtilsTest::test();
}
-class TestVirtualSpaceNodeTest {
- static void chunk_up(size_t words_left, size_t& num_medium_chunks,
- size_t& num_small_chunks,
- size_t& num_specialized_chunks) {
- num_medium_chunks = words_left / MediumChunk;
- words_left = words_left % MediumChunk;
-
- num_small_chunks = words_left / SmallChunk;
- words_left = words_left % SmallChunk;
- // how many specialized chunks can we get?
- num_specialized_chunks = words_left / SpecializedChunk;
- assert(words_left % SpecializedChunk == 0, "should be nothing left");
- }
-
- public:
- static void test() {
- MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
- const size_t vsn_test_size_words = MediumChunk * 4;
- const size_t vsn_test_size_bytes = vsn_test_size_words * BytesPerWord;
-
- // The chunk sizes must be multiples of eachother, or this will fail
- STATIC_ASSERT(MediumChunk % SmallChunk == 0);
- STATIC_ASSERT(SmallChunk % SpecializedChunk == 0);
-
- { // No committed memory in VSN
- ChunkManager cm(false);
- VirtualSpaceNode vsn(false, vsn_test_size_bytes);
- vsn.initialize();
- vsn.retire(&cm);
- assert(cm.sum_free_chunks_count() == 0, "did not commit any memory in the VSN");
- }
-
- { // All of VSN is committed, half is used by chunks
- ChunkManager cm(false);
- VirtualSpaceNode vsn(false, vsn_test_size_bytes);
- vsn.initialize();
- vsn.expand_by(vsn_test_size_words, vsn_test_size_words);
- vsn.get_chunk_vs(MediumChunk);
- vsn.get_chunk_vs(MediumChunk);
- vsn.retire(&cm);
- assert(cm.sum_free_chunks_count() == 2, "should have been memory left for 2 medium chunks");
- assert(cm.sum_free_chunks() == 2*MediumChunk, "sizes should add up");
- }
-
- const size_t page_chunks = 4 * (size_t)os::vm_page_size() / BytesPerWord;
- // This doesn't work for systems with vm_page_size >= 16K.
- if (page_chunks < MediumChunk) {
- // 4 pages of VSN is committed, some is used by chunks
- ChunkManager cm(false);
- VirtualSpaceNode vsn(false, vsn_test_size_bytes);
-
- vsn.initialize();
- vsn.expand_by(page_chunks, page_chunks);
- vsn.get_chunk_vs(SmallChunk);
- vsn.get_chunk_vs(SpecializedChunk);
- vsn.retire(&cm);
-
- // committed - used = words left to retire
- const size_t words_left = page_chunks - SmallChunk - SpecializedChunk;
-
- size_t num_medium_chunks, num_small_chunks, num_spec_chunks;
- chunk_up(words_left, num_medium_chunks, num_small_chunks, num_spec_chunks);
-
- assert(num_medium_chunks == 0, "should not get any medium chunks");
- assert(cm.sum_free_chunks_count() == (num_small_chunks + num_spec_chunks), "should be space for 3 chunks");
- assert(cm.sum_free_chunks() == words_left, "sizes should add up");
- }
-
- { // Half of VSN is committed, a humongous chunk is used
- ChunkManager cm(false);
- VirtualSpaceNode vsn(false, vsn_test_size_bytes);
- vsn.initialize();
- vsn.expand_by(MediumChunk * 2, MediumChunk * 2);
- vsn.get_chunk_vs(MediumChunk + SpecializedChunk); // Humongous chunks will be aligned up to MediumChunk + SpecializedChunk
- vsn.retire(&cm);
-
- const size_t words_left = MediumChunk * 2 - (MediumChunk + SpecializedChunk);
- size_t num_medium_chunks, num_small_chunks, num_spec_chunks;
- chunk_up(words_left, num_medium_chunks, num_small_chunks, num_spec_chunks);
-
- assert(num_medium_chunks == 0, "should not get any medium chunks");
- assert(cm.sum_free_chunks_count() == (num_small_chunks + num_spec_chunks), "should be space for 3 chunks");
- assert(cm.sum_free_chunks() == words_left, "sizes should add up");
- }
-
- }
-
-#define assert_is_available_positive(word_size) \
- assert(vsn.is_available(word_size), \
- #word_size ": " PTR_FORMAT " bytes were not available in " \
- "VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \
- (uintptr_t)(word_size * BytesPerWord), p2i(vsn.bottom()), p2i(vsn.end()));
-
-#define assert_is_available_negative(word_size) \
- assert(!vsn.is_available(word_size), \
- #word_size ": " PTR_FORMAT " bytes should not be available in " \
- "VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")", \
- (uintptr_t)(word_size * BytesPerWord), p2i(vsn.bottom()), p2i(vsn.end()));
-
- static void test_is_available_positive() {
- // Reserve some memory.
- VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
- assert(vsn.initialize(), "Failed to setup VirtualSpaceNode");
-
- // Commit some memory.
- size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
- bool expanded = vsn.expand_by(commit_word_size, commit_word_size);
- assert(expanded, "Failed to commit");
-
- // Check that is_available accepts the committed size.
- assert_is_available_positive(commit_word_size);
-
- // Check that is_available accepts half the committed size.
- size_t expand_word_size = commit_word_size / 2;
- assert_is_available_positive(expand_word_size);
- }
-
- static void test_is_available_negative() {
- // Reserve some memory.
- VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
- assert(vsn.initialize(), "Failed to setup VirtualSpaceNode");
-
- // Commit some memory.
- size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
- bool expanded = vsn.expand_by(commit_word_size, commit_word_size);
- assert(expanded, "Failed to commit");
-
- // Check that is_available doesn't accept a too large size.
- size_t two_times_commit_word_size = commit_word_size * 2;
- assert_is_available_negative(two_times_commit_word_size);
- }
-
- static void test_is_available_overflow() {
- // Reserve some memory.
- VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
- assert(vsn.initialize(), "Failed to setup VirtualSpaceNode");
-
- // Commit some memory.
- size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
- bool expanded = vsn.expand_by(commit_word_size, commit_word_size);
- assert(expanded, "Failed to commit");
-
- // Calculate a size that will overflow the virtual space size.
- void* virtual_space_max = (void*)(uintptr_t)-1;
- size_t bottom_to_max = pointer_delta(virtual_space_max, vsn.bottom(), 1);
- size_t overflow_size = bottom_to_max + BytesPerWord;
- size_t overflow_word_size = overflow_size / BytesPerWord;
-
- // Check that is_available can handle the overflow.
- assert_is_available_negative(overflow_word_size);
- }
-
- static void test_is_available() {
- TestVirtualSpaceNodeTest::test_is_available_positive();
- TestVirtualSpaceNodeTest::test_is_available_negative();
- TestVirtualSpaceNodeTest::test_is_available_overflow();
- }
-};
-
#endif // !PRODUCT
struct chunkmanager_statistics_t {
--- a/src/hotspot/share/memory/metaspace/chunkManager.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/metaspace/chunkManager.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -33,7 +33,7 @@
#include "memory/metaspaceChunkFreeListSummary.hpp"
#include "utilities/globalDefinitions.hpp"
-class TestVirtualSpaceNodeTest;
+class ChunkManagerTest;
namespace metaspace {
@@ -42,7 +42,7 @@
// Manages the global free lists of chunks.
class ChunkManager : public CHeapObj<mtInternal> {
- friend class ::TestVirtualSpaceNodeTest;
+ friend class ::ChunkManagerTest;
// Free list of chunks of different sizes.
// SpecializedChunk
--- a/src/hotspot/share/memory/metaspaceShared.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/metaspaceShared.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -86,8 +86,8 @@
// md - misc data (the c++ vtables)
// od - optional data (original class files)
//
-// s0 - shared strings(closed archive heap space) #0
-// s1 - shared strings(closed archive heap space) #1 (may be empty)
+// ca0 - closed archive heap space #0
+// ca1 - closed archive heap space #1 (may be empty)
// oa0 - open archive heap space #0
// oa1 - open archive heap space #1 (may be empty)
//
@@ -198,7 +198,7 @@
DumpRegion _mc_region("mc"), _ro_region("ro"), _rw_region("rw"), _md_region("md"), _od_region("od");
-size_t _total_string_region_size = 0, _total_open_archive_region_size = 0;
+size_t _total_closed_archive_region_size = 0, _total_open_archive_region_size = 0;
char* MetaspaceShared::misc_code_space_alloc(size_t num_bytes) {
return _mc_region.allocate(num_bytes);
@@ -1207,10 +1207,6 @@
public:
static void copy_and_compact() {
- // We should no longer allocate anything from the metaspace, so that
- // we can have a stable set of MetaspaceObjs to work with.
- Metaspace::freeze();
-
ResourceMark rm;
SortedSymbolClosure the_ssc; // StackObj
_ssc = &the_ssc;
@@ -1274,9 +1270,8 @@
// NOTE: after this point, we shouldn't have any globals that can reach the old
// objects.
- // We cannot use any of the objects in the heap anymore (except for the objects
- // in the CDS shared string regions) because their headers no longer point to
- // valid Klasses.
+ // We cannot use any of the objects in the heap anymore (except for the
+ // shared strings) because their headers no longer point to valid Klasses.
}
static void iterate_roots(MetaspaceClosure* it) {
@@ -1357,6 +1352,14 @@
}
void VM_PopulateDumpSharedSpace::doit() {
+ // We should no longer allocate anything from the metaspace, so that:
+ //
+ // (1) Metaspace::allocate might trigger GC if we have run out of
+ // committed metaspace, but we can't GC because we're running
+ // in the VM thread.
+ // (2) ArchiveCompactor needs to work with a stable set of MetaspaceObjs.
+ Metaspace::freeze();
+
Thread* THREAD = VMThread::vm_thread();
FileMapInfo::check_nonempty_dir_in_shared_path_table();
@@ -1421,8 +1424,6 @@
// any dictionaries.
NOT_PRODUCT(assert_no_unsafe_anonymous_classes_in_dictionaries());
- SystemDictionaryShared::finalize_verification_constraints();
-
ArchiveCompactor::initialize();
ArchiveCompactor::copy_and_compact();
@@ -1491,11 +1492,11 @@
write_region(mapinfo, MetaspaceShared::md, &_md_region, /*read_only=*/false,/*allow_exec=*/false);
write_region(mapinfo, MetaspaceShared::od, &_od_region, /*read_only=*/true, /*allow_exec=*/false);
- _total_string_region_size = mapinfo->write_archive_heap_regions(
+ _total_closed_archive_region_size = mapinfo->write_archive_heap_regions(
_closed_archive_heap_regions,
_closed_archive_heap_oopmaps,
- MetaspaceShared::first_string,
- MetaspaceShared::max_strings);
+ MetaspaceShared::first_closed_archive_heap_region,
+ MetaspaceShared::max_closed_archive_heap_region);
_total_open_archive_region_size = mapinfo->write_archive_heap_regions(
_open_archive_heap_regions,
_open_archive_heap_oopmaps,
@@ -1529,12 +1530,12 @@
const size_t total_reserved = _ro_region.reserved() + _rw_region.reserved() +
_mc_region.reserved() + _md_region.reserved() +
_od_region.reserved() +
- _total_string_region_size +
+ _total_closed_archive_region_size +
_total_open_archive_region_size;
const size_t total_bytes = _ro_region.used() + _rw_region.used() +
_mc_region.used() + _md_region.used() +
_od_region.used() +
- _total_string_region_size +
+ _total_closed_archive_region_size +
_total_open_archive_region_size;
const double total_u_perc = percent_of(total_bytes, total_reserved);
@@ -1543,7 +1544,7 @@
_ro_region.print(total_reserved);
_md_region.print(total_reserved);
_od_region.print(total_reserved);
- print_heap_region_stats(_closed_archive_heap_regions, "st", total_reserved);
+ print_heap_region_stats(_closed_archive_heap_regions, "ca", total_reserved);
print_heap_region_stats(_open_archive_heap_regions, "oa", total_reserved);
tty->print_cr("total : " SIZE_FORMAT_W(9) " [100.0%% of total] out of " SIZE_FORMAT_W(9) " bytes [%5.1f%% used]",
@@ -1645,13 +1646,8 @@
ClassLoaderDataGraph::unlocked_loaded_classes_do(&check_closure);
} while (check_closure.made_progress());
- if (IgnoreUnverifiableClassesDuringDump) {
- // IgnoreUnverifiableClassesDuringDump is enabled by default.
- // Unverifiable classes will not be included in the CDS archive.
- SystemDictionary::remove_classes_in_error_state();
- } else {
- vm_exit_during_cds_dumping("Please remove the unverifiable classes from your class list and try again");
- }
+ // Unverifiable classes will not be included in the CDS archive.
+ SystemDictionary::remove_classes_in_error_state();
}
}
@@ -1709,6 +1705,8 @@
log_info(cds)("Shared spaces: preloaded %d classes", class_count);
+ HeapShared::init_subgraph_entry_fields(THREAD);
+
// Rewrite and link classes
tty->print_cr("Rewriting and linking classes ...");
@@ -1720,7 +1718,8 @@
tty->print_cr("Rewriting and linking classes: done");
SystemDictionary::clear_invoke_method_table();
- HeapShared::init_archivable_static_fields(THREAD);
+
+ SystemDictionaryShared::finalize_verification_constraints();
VM_PopulateDumpSharedSpace op;
VMThread::execute(&op);
--- a/src/hotspot/share/memory/metaspaceShared.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/metaspaceShared.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -76,13 +76,14 @@
num_non_heap_spaces = od + 1,
// mapped java heap regions
- first_string = od + 1, // index of first string region
- max_strings = 2, // max number of string regions in string space
- last_string = first_string + max_strings - 1,
- first_open_archive_heap_region = first_string + max_strings,
+ first_closed_archive_heap_region = od + 1,
+ max_closed_archive_heap_region = 2,
+ last_closed_archive_heap_region = first_closed_archive_heap_region + max_closed_archive_heap_region - 1,
+ first_open_archive_heap_region = last_closed_archive_heap_region + 1,
max_open_archive_heap_region = 2,
+ last_open_archive_heap_region = first_open_archive_heap_region + max_open_archive_heap_region - 1,
- last_valid_region = first_open_archive_heap_region + max_open_archive_heap_region - 1,
+ last_valid_region = last_open_archive_heap_region,
n_regions = last_valid_region + 1 // total number of regions
};
@@ -131,23 +132,6 @@
// Return true if given address is in the shared region corresponding to the idx
static bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false);
- static bool is_heap_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_string &&
- idx < MetaspaceShared::first_open_archive_heap_region +
- MetaspaceShared::max_open_archive_heap_region));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
- static bool is_string_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_string &&
- idx < MetaspaceShared::first_string + MetaspaceShared::max_strings));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
- static bool is_open_archive_heap_region(int idx) {
- CDS_JAVA_HEAP_ONLY(return (idx >= MetaspaceShared::first_open_archive_heap_region &&
- idx < MetaspaceShared::first_open_archive_heap_region +
- MetaspaceShared::max_open_archive_heap_region));
- NOT_CDS_JAVA_HEAP_RETURN_(false);
- }
static bool is_in_trampoline_frame(address addr) NOT_CDS_RETURN_(false);
static void allocate_cpp_vtable_clones();
--- a/src/hotspot/share/memory/universe.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/universe.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -30,6 +30,7 @@
#include "classfile/stringTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/vmSymbols.hpp"
+#include "code/codeBehaviours.hpp"
#include "code/codeCache.hpp"
#include "code/dependencies.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
@@ -60,9 +61,9 @@
#include "prims/resolvedMethodTable.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
+#include "runtime/deoptimization.hpp"
#include "runtime/flags/flagSetting.hpp"
#include "runtime/flags/jvmFlagConstraintList.hpp"
-#include "runtime/deoptimization.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/init.hpp"
#include "runtime/java.hpp"
@@ -105,7 +106,6 @@
oop Universe::_the_min_jint_string = NULL;
LatestMethodCache* Universe::_finalizer_register_cache = NULL;
LatestMethodCache* Universe::_loader_addClass_cache = NULL;
-LatestMethodCache* Universe::_pd_implies_cache = NULL;
LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL;
LatestMethodCache* Universe::_do_stack_walk_cache = NULL;
oop Universe::_out_of_memory_error_java_heap = NULL;
@@ -229,7 +229,6 @@
_finalizer_register_cache->metaspace_pointers_do(it);
_loader_addClass_cache->metaspace_pointers_do(it);
- _pd_implies_cache->metaspace_pointers_do(it);
_throw_illegal_access_error_cache->metaspace_pointers_do(it);
_do_stack_walk_cache->metaspace_pointers_do(it);
}
@@ -271,7 +270,6 @@
f->do_ptr((void**)&_the_empty_instance_klass_array);
_finalizer_register_cache->serialize(f);
_loader_addClass_cache->serialize(f);
- _pd_implies_cache->serialize(f);
_throw_illegal_access_error_cache->serialize(f);
_do_stack_walk_cache->serialize(f);
}
@@ -640,6 +638,10 @@
return (void*)_non_oop_bits;
}
+static void initialize_global_behaviours() {
+ CompiledICProtectionBehaviour::set_current(new DefaultICProtectionBehaviour());
+}
+
jint universe_init() {
assert(!Universe::_fully_initialized, "called after initialize_vtables");
guarantee(1 << LogHeapWordSize == sizeof(HeapWord),
@@ -652,6 +654,8 @@
JavaClasses::compute_hard_coded_offsets();
+ initialize_global_behaviours();
+
jint status = Universe::initialize_heap();
if (status != JNI_OK) {
return status;
@@ -680,7 +684,6 @@
// Metaspace::initialize_shared_spaces() tries to populate them.
Universe::_finalizer_register_cache = new LatestMethodCache();
Universe::_loader_addClass_cache = new LatestMethodCache();
- Universe::_pd_implies_cache = new LatestMethodCache();
Universe::_throw_illegal_access_error_cache = new LatestMethodCache();
Universe::_do_stack_walk_cache = new LatestMethodCache();
@@ -934,12 +937,6 @@
"addClass",
vmSymbols::class_void_signature(), false, CHECK);
- // Set up method for checking protection domain
- initialize_known_method(_pd_implies_cache,
- SystemDictionary::ProtectionDomain_klass(),
- "impliesCreateAccessControlContext",
- vmSymbols::void_boolean_signature(), false, CHECK);
-
// Set up method for stack walking
initialize_known_method(_do_stack_walk_cache,
SystemDictionary::AbstractStackWalker_klass(),
--- a/src/hotspot/share/memory/universe.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/universe.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -137,7 +137,6 @@
static oop _the_min_jint_string; // A cache of "-2147483648" as a Java string
static LatestMethodCache* _finalizer_register_cache; // static method for registering finalizable objects
static LatestMethodCache* _loader_addClass_cache; // method for registering loaded classes in class loader vector
- static LatestMethodCache* _pd_implies_cache; // method for checking protection domain attributes
static LatestMethodCache* _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError() method
static LatestMethodCache* _do_stack_walk_cache; // method for stack walker callback
@@ -322,7 +321,6 @@
static Method* finalizer_register_method() { return _finalizer_register_cache->get_method(); }
static Method* loader_addClass_method() { return _loader_addClass_cache->get_method(); }
- static Method* protection_domain_implies_method() { return _pd_implies_cache->get_method(); }
static Method* throw_illegal_access_error() { return _throw_illegal_access_error_cache->get_method(); }
static Method* do_stack_walk_method() { return _do_stack_walk_cache->get_method(); }
--- a/src/hotspot/share/memory/virtualspace.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/memory/virtualspace.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1059,14 +1059,6 @@
#ifndef PRODUCT
-#define test_log(...) \
- do {\
- if (VerboseInternalVMTests) { \
- tty->print_cr(__VA_ARGS__); \
- tty->flush(); \
- }\
- } while (false)
-
class TestReservedSpace : AllStatic {
public:
static void small_page_write(void* addr, size_t size) {
@@ -1087,8 +1079,6 @@
}
static void test_reserved_space1(size_t size, size_t alignment) {
- test_log("test_reserved_space1(%p)", (void*) (uintptr_t) size);
-
assert(is_aligned(size, alignment), "Incorrect input parameters");
ReservedSpace rs(size, // size
@@ -1096,8 +1086,6 @@
UseLargePages, // large
(char *)NULL); // requested_address
- test_log(" rs.special() == %d", rs.special());
-
assert(rs.base() != NULL, "Must be");
assert(rs.size() == size, "Must be");
@@ -1112,14 +1100,10 @@
}
static void test_reserved_space2(size_t size) {
- test_log("test_reserved_space2(%p)", (void*)(uintptr_t)size);
-
assert(is_aligned(size, os::vm_allocation_granularity()), "Must be at least AG aligned");
ReservedSpace rs(size);
- test_log(" rs.special() == %d", rs.special());
-
assert(rs.base() != NULL, "Must be");
assert(rs.size() == size, "Must be");
@@ -1131,9 +1115,6 @@
}
static void test_reserved_space3(size_t size, size_t alignment, bool maybe_large) {
- test_log("test_reserved_space3(%p, %p, %d)",
- (void*)(uintptr_t)size, (void*)(uintptr_t)alignment, maybe_large);
-
if (size < alignment) {
// Tests might set -XX:LargePageSizeInBytes=<small pages> and cause unexpected input arguments for this test.
assert((size_t)os::vm_page_size() == os::large_page_size(), "Test needs further refinement");
@@ -1147,8 +1128,6 @@
ReservedSpace rs(size, alignment, large, false);
- test_log(" rs.special() == %d", rs.special());
-
assert(rs.base() != NULL, "Must be");
assert(rs.size() == size, "Must be");
--- a/src/hotspot/share/oops/klass.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/oops/klass.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -894,9 +894,18 @@
if (include_parent_loader &&
!cld->is_builtin_class_loader_data()) {
oop parent_loader = java_lang_ClassLoader::parent(class_loader());
- ClassLoaderData *parent_cld = ClassLoaderData::class_loader_data(parent_loader);
- assert(parent_cld != NULL, "parent's class loader data should not be null");
- parent_loader_name_and_id = parent_cld->loader_name_and_id();
+ ClassLoaderData *parent_cld = ClassLoaderData::class_loader_data_or_null(parent_loader);
+ // The parent loader's ClassLoaderData could be null if it is
+ // a delegating class loader that has never defined a class.
+ // In this case the loader's name must be obtained via the parent loader's oop.
+ if (parent_cld == NULL) {
+ oop cl_name_and_id = java_lang_ClassLoader::nameAndId(parent_loader);
+ if (cl_name_and_id != NULL) {
+ parent_loader_name_and_id = java_lang_String::as_utf8_string(cl_name_and_id);
+ }
+ } else {
+ parent_loader_name_and_id = parent_cld->loader_name_and_id();
+ }
parent_loader_phrase = ", parent loader ";
len += strlen(parent_loader_phrase) + strlen(parent_loader_name_and_id);
}
--- a/src/hotspot/share/opto/arraycopynode.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/arraycopynode.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -148,6 +148,28 @@
return get_length_if_constant(phase);
}
+Node* ArrayCopyNode::load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* adr, const TypePtr* adr_type, const Type *type, BasicType bt) {
+ DecoratorSet decorators = C2_READ_ACCESS | C2_CONTROL_DEPENDENT_LOAD | IN_HEAP | C2_ARRAY_COPY;
+ C2AccessValuePtr addr(adr, adr_type);
+ C2OptAccess access(*phase, ctl, mem, decorators, bt, adr->in(AddPNode::Base), addr);
+ Node* res = bs->load_at(access, type);
+ ctl = access.ctl();
+ return res;
+}
+
+void ArrayCopyNode::store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* adr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt) {
+ DecoratorSet decorators = C2_WRITE_ACCESS | IN_HEAP | C2_ARRAY_COPY;
+ if (is_alloc_tightly_coupled()) {
+ decorators |= C2_TIGHLY_COUPLED_ALLOC;
+ }
+ C2AccessValuePtr addr(adr, adr_type);
+ C2AccessValue value(val, type);
+ C2OptAccess access(*phase, ctl, mem, decorators, bt, adr->in(AddPNode::Base), addr);
+ bs->store_at(access, value);
+ ctl = access.ctl();
+}
+
+
Node* ArrayCopyNode::try_clone_instance(PhaseGVN *phase, bool can_reshape, int count) {
if (!is_clonebasic()) {
return NULL;
@@ -182,6 +204,7 @@
ciInstanceKlass* ik = inst_src->klass()->as_instance_klass();
assert(ik->nof_nonstatic_fields() <= ArrayCopyLoadStoreMaxElem, "too many fields");
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
for (int i = 0; i < count; i++) {
ciField* field = ik->nonstatic_field_at(i);
int fieldidx = phase->C->alias_type(field)->index();
@@ -203,11 +226,8 @@
type = Type::get_const_basic_type(bt);
}
- Node* v = LoadNode::make(*phase, ctl, mem->memory_at(fieldidx), next_src, adr_type, type, bt, MemNode::unordered);
- v = phase->transform(v);
- Node* s = StoreNode::make(*phase, ctl, mem->memory_at(fieldidx), next_dest, adr_type, v, bt, MemNode::unordered);
- s = phase->transform(s);
- mem->set_memory_at(fieldidx, s);
+ Node* v = load(bs, phase, ctl, mem, next_src, adr_type, type, bt);
+ store(bs, phase, ctl, mem, next_dest, adr_type, v, type, bt);
}
if (!finish_transform(phase, can_reshape, ctl, mem)) {
@@ -368,28 +388,18 @@
if (!forward_ctl->is_top()) {
// copy forward
mm = mm->clone()->as_MergeMem();
- uint alias_idx_src = phase->C->get_alias_index(atp_src);
- uint alias_idx_dest = phase->C->get_alias_index(atp_dest);
- Node *start_mem_src = mm->memory_at(alias_idx_src);
- Node *start_mem_dest = mm->memory_at(alias_idx_dest);
- Node* mem = start_mem_dest;
- bool same_alias = (alias_idx_src == alias_idx_dest);
if (count > 0) {
- Node* v = LoadNode::make(*phase, forward_ctl, start_mem_src, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
- v = phase->transform(v);
- mem = StoreNode::make(*phase, forward_ctl, mem, adr_dest, atp_dest, v, copy_type, MemNode::unordered);
- mem = phase->transform(mem);
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ Node* v = load(bs, phase, forward_ctl, mm, adr_src, atp_src, value_type, copy_type);
+ store(bs, phase, forward_ctl, mm, adr_dest, atp_dest, v, value_type, copy_type);
for (int i = 1; i < count; i++) {
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
- v = LoadNode::make(*phase, forward_ctl, same_alias ? mem : start_mem_src, next_src, atp_src, value_type, copy_type, MemNode::unordered);
- v = phase->transform(v);
- mem = StoreNode::make(*phase, forward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
- mem = phase->transform(mem);
+ v = load(bs, phase, forward_ctl, mm, next_src, atp_src, value_type, copy_type);
+ store(bs, phase, forward_ctl, mm, next_dest, atp_dest, v, value_type, copy_type);
}
- mm->set_memory_at(alias_idx_dest, mem);
} else if(can_reshape) {
PhaseIterGVN* igvn = phase->is_IterGVN();
igvn->_worklist.push(adr_src);
@@ -416,31 +426,20 @@
if (!backward_ctl->is_top()) {
// copy backward
mm = mm->clone()->as_MergeMem();
- uint alias_idx_src = phase->C->get_alias_index(atp_src);
- uint alias_idx_dest = phase->C->get_alias_index(atp_dest);
- Node *start_mem_src = mm->memory_at(alias_idx_src);
- Node *start_mem_dest = mm->memory_at(alias_idx_dest);
- Node* mem = start_mem_dest;
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
assert(copy_type != T_OBJECT || !bs->array_copy_requires_gc_barriers(false, T_OBJECT, false, BarrierSetC2::Optimization), "only tightly coupled allocations for object arrays");
- bool same_alias = (alias_idx_src == alias_idx_dest);
if (count > 0) {
for (int i = count-1; i >= 1; i--) {
Node* off = phase->MakeConX(type2aelembytes(copy_type) * i);
Node* next_src = phase->transform(new AddPNode(base_src,adr_src,off));
Node* next_dest = phase->transform(new AddPNode(base_dest,adr_dest,off));
- Node* v = LoadNode::make(*phase, backward_ctl, same_alias ? mem : start_mem_src, next_src, atp_src, value_type, copy_type, MemNode::unordered);
- v = phase->transform(v);
- mem = StoreNode::make(*phase, backward_ctl,mem,next_dest,atp_dest,v, copy_type, MemNode::unordered);
- mem = phase->transform(mem);
+ Node* v = load(bs, phase, backward_ctl, mm, next_src, atp_src, value_type, copy_type);
+ store(bs, phase, backward_ctl, mm, next_dest, atp_dest, v, value_type, copy_type);
}
- Node* v = LoadNode::make(*phase, backward_ctl, same_alias ? mem : start_mem_src, adr_src, atp_src, value_type, copy_type, MemNode::unordered);
- v = phase->transform(v);
- mem = StoreNode::make(*phase, backward_ctl, mem, adr_dest, atp_dest, v, copy_type, MemNode::unordered);
- mem = phase->transform(mem);
- mm->set_memory_at(alias_idx_dest, mem);
+ Node* v = load(bs, phase, backward_ctl, mm, adr_src, atp_src, value_type, copy_type);
+ store(bs, phase, backward_ctl, mm, adr_dest, atp_dest, v, value_type, copy_type);
} else if(can_reshape) {
PhaseIterGVN* igvn = phase->is_IterGVN();
igvn->_worklist.push(adr_src);
--- a/src/hotspot/share/opto/arraycopynode.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/arraycopynode.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -25,6 +25,7 @@
#ifndef SHARE_VM_OPTO_ARRAYCOPYNODE_HPP
#define SHARE_VM_OPTO_ARRAYCOPYNODE_HPP
+#include "gc/shared/c2/barrierSetC2.hpp"
#include "opto/callnode.hpp"
class GraphKit;
@@ -110,6 +111,9 @@
Node* ctl, Node *mem);
static bool may_modify_helper(const TypeOopPtr *t_oop, Node* n, PhaseTransform *phase, CallNode*& call);
+ static Node* load(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, const Type *type, BasicType bt);
+ void store(BarrierSetC2* bs, PhaseGVN *phase, Node*& ctl, MergeMemNode* mem, Node* addr, const TypePtr* adr_type, Node* val, const Type *type, BasicType bt);
+
public:
enum {
--- a/src/hotspot/share/opto/callnode.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/callnode.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -26,6 +26,8 @@
#include "compiler/compileLog.hpp"
#include "ci/bcEscapeAnalyzer.hpp"
#include "compiler/oopMap.hpp"
+#include "gc/shared/barrierSet.hpp"
+#include "gc/shared/c2/barrierSetC2.hpp"
#include "interpreter/interpreter.hpp"
#include "opto/callGenerator.hpp"
#include "opto/callnode.hpp"
@@ -1623,7 +1625,10 @@
Node *n = ctrl_proj->in(0);
if (n != NULL && n->is_Unlock()) {
UnlockNode *unlock = n->as_Unlock();
- if (lock->obj_node()->eqv_uncast(unlock->obj_node()) &&
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ Node* lock_obj = bs->step_over_gc_barrier(lock->obj_node());
+ Node* unlock_obj = bs->step_over_gc_barrier(unlock->obj_node());
+ if (lock_obj->eqv_uncast(unlock_obj) &&
BoxLockNode::same_slot(lock->box_node(), unlock->box_node()) &&
!unlock->is_eliminated()) {
lock_ops.append(unlock);
@@ -1668,7 +1673,10 @@
}
if (ctrl->is_Lock()) {
LockNode *lock = ctrl->as_Lock();
- if (lock->obj_node()->eqv_uncast(unlock->obj_node()) &&
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ Node* lock_obj = bs->step_over_gc_barrier(lock->obj_node());
+ Node* unlock_obj = bs->step_over_gc_barrier(unlock->obj_node());
+ if (lock_obj->eqv_uncast(unlock_obj) &&
BoxLockNode::same_slot(lock->box_node(), unlock->box_node())) {
lock_result = lock;
}
@@ -1699,7 +1707,10 @@
}
if (lock1_node != NULL && lock1_node->is_Lock()) {
LockNode *lock1 = lock1_node->as_Lock();
- if (lock->obj_node()->eqv_uncast(lock1->obj_node()) &&
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ Node* lock_obj = bs->step_over_gc_barrier(lock->obj_node());
+ Node* lock1_obj = bs->step_over_gc_barrier(lock1->obj_node());
+ if (lock_obj->eqv_uncast(lock1_obj) &&
BoxLockNode::same_slot(lock->box_node(), lock1->box_node()) &&
!lock1->is_eliminated()) {
lock_ops.append(lock1);
@@ -1916,6 +1927,8 @@
return false;
}
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ obj = bs->step_over_gc_barrier(obj);
// Look for external lock for the same object.
SafePointNode* sfn = this->as_SafePoint();
JVMState* youngest_jvms = sfn->jvms();
@@ -1926,6 +1939,7 @@
// Loop over monitors
for (int idx = 0; idx < num_mon; idx++) {
Node* obj_node = sfn->monitor_obj(jvms, idx);
+ obj_node = bs->step_over_gc_barrier(obj_node);
BoxLockNode* box_node = sfn->monitor_box(jvms, idx)->as_BoxLock();
if ((box_node->stack_slot() < stk_slot) && obj_node->eqv_uncast(obj)) {
return true;
--- a/src/hotspot/share/opto/compile.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/compile.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -76,9 +76,6 @@
#include "utilities/align.hpp"
#include "utilities/copy.hpp"
#include "utilities/macros.hpp"
-#if INCLUDE_G1GC
-#include "gc/g1/g1ThreadLocalData.hpp"
-#endif // INCLUDE_G1GC
#if INCLUDE_ZGC
#include "gc/z/c2/zBarrierSetC2.hpp"
#endif
@@ -892,7 +889,10 @@
}
#endif
- NOT_PRODUCT( verify_barriers(); )
+#ifdef ASSERT
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->verify_gc_barriers(this, BarrierSetC2::BeforeCodeGen);
+#endif
// Dump compilation data to replay it.
if (directive->DumpReplayOption) {
@@ -1465,6 +1465,8 @@
tj = TypeInstPtr::MARK;
ta = TypeAryPtr::RANGE; // generic ignored junk
ptr = TypePtr::BotPTR;
+ } else if (BarrierSet::barrier_set()->barrier_set_c2()->flatten_gc_alias_type(tj)) {
+ ta = tj->isa_aryptr();
} else { // Random constant offset into array body
offset = Type::OffsetBot; // Flatten constant access into array body
tj = ta = TypeAryPtr::make(ptr,ta->ary(),ta->klass(),false,offset);
@@ -1529,6 +1531,8 @@
if (!is_known_inst) { // Do it only for non-instance types
tj = to = TypeInstPtr::make(TypePtr::BotPTR, env()->Object_klass(), false, NULL, offset);
}
+ } else if (BarrierSet::barrier_set()->barrier_set_c2()->flatten_gc_alias_type(tj)) {
+ to = tj->is_instptr();
} else if (offset < 0 || offset >= k->size_helper() * wordSize) {
// Static fields are in the space above the normal instance
// fields in the java.lang.Class instance.
@@ -1627,7 +1631,8 @@
(offset == Type::OffsetBot && tj == TypePtr::BOTTOM) ||
(offset == oopDesc::mark_offset_in_bytes() && tj->base() == Type::AryPtr) ||
(offset == oopDesc::klass_offset_in_bytes() && tj->base() == Type::AryPtr) ||
- (offset == arrayOopDesc::length_offset_in_bytes() && tj->base() == Type::AryPtr) ,
+ (offset == arrayOopDesc::length_offset_in_bytes() && tj->base() == Type::AryPtr) ||
+ (BarrierSet::barrier_set()->barrier_set_c2()->verify_gc_alias_type(tj, offset)),
"For oops, klasses, raw offset must be constant; for arrays the offset is never known" );
assert( tj->ptr() != TypePtr::TopPTR &&
tj->ptr() != TypePtr::AnyNull &&
@@ -2193,7 +2198,7 @@
#ifdef ASSERT
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
- bs->verify_gc_barriers(true);
+ bs->verify_gc_barriers(this, BarrierSetC2::BeforeOptimize);
#endif
ResourceMark rm;
@@ -2386,7 +2391,7 @@
#ifdef ASSERT
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
- bs->verify_gc_barriers(false);
+ bs->verify_gc_barriers(this, BarrierSetC2::BeforeExpand);
#endif
{
@@ -2787,6 +2792,18 @@
}
#endif
// Count FPU ops and common calls, implements item (3)
+ bool gc_handled = BarrierSet::barrier_set()->barrier_set_c2()->final_graph_reshaping(this, n, nop);
+ if (!gc_handled) {
+ final_graph_reshaping_main_switch(n, frc, nop);
+ }
+
+ // Collect CFG split points
+ if (n->is_MultiBranch() && !n->is_RangeCheck()) {
+ frc._tests.push(n);
+ }
+}
+
+void Compile::final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& frc, uint nop) {
switch( nop ) {
// Count all float operations that may use FPU
case Op_AddF:
@@ -2933,18 +2950,13 @@
case Op_LoadL_unaligned:
case Op_LoadPLocked:
case Op_LoadP:
-#if INCLUDE_ZGC
- case Op_LoadBarrierSlowReg:
- case Op_LoadBarrierWeakSlowReg:
-#endif
case Op_LoadN:
case Op_LoadRange:
case Op_LoadS: {
handle_mem:
#ifdef ASSERT
if( VerifyOptoOopOffsets ) {
- assert( n->is_Mem(), "" );
- MemNode *mem = (MemNode*)n;
+ MemNode* mem = n->as_Mem();
// Check to see if address types have grounded out somehow.
const TypeInstPtr *tp = mem->in(MemNode::Address)->bottom_type()->isa_instptr();
assert( !tp || oop_offset_is_sane(tp), "" );
@@ -3462,16 +3474,11 @@
break;
}
default:
- assert( !n->is_Call(), "" );
- assert( !n->is_Mem(), "" );
- assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
+ assert(!n->is_Call(), "");
+ assert(!n->is_Mem(), "");
+ assert(nop != Op_ProfileBoolean, "should be eliminated during IGVN");
break;
}
-
- // Collect CFG split points
- if (n->is_MultiBranch() && !n->is_RangeCheck()) {
- frc._tests.push(n);
- }
}
//------------------------------final_graph_reshaping_walk---------------------
@@ -3831,74 +3838,6 @@
}
}
}
-
-// Verify GC barriers consistency
-// Currently supported:
-// - G1 pre-barriers (see GraphKit::g1_write_barrier_pre())
-void Compile::verify_barriers() {
-#if INCLUDE_G1GC
- if (UseG1GC) {
- // Verify G1 pre-barriers
- const int marking_offset = in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset());
-
- ResourceArea *area = Thread::current()->resource_area();
- Unique_Node_List visited(area);
- Node_List worklist(area);
- // We're going to walk control flow backwards starting from the Root
- worklist.push(_root);
- while (worklist.size() > 0) {
- Node* x = worklist.pop();
- if (x == NULL || x == top()) continue;
- if (visited.member(x)) {
- continue;
- } else {
- visited.push(x);
- }
-
- if (x->is_Region()) {
- for (uint i = 1; i < x->req(); i++) {
- worklist.push(x->in(i));
- }
- } else {
- worklist.push(x->in(0));
- // We are looking for the pattern:
- // /->ThreadLocal
- // If->Bool->CmpI->LoadB->AddP->ConL(marking_offset)
- // \->ConI(0)
- // We want to verify that the If and the LoadB have the same control
- // See GraphKit::g1_write_barrier_pre()
- if (x->is_If()) {
- IfNode *iff = x->as_If();
- if (iff->in(1)->is_Bool() && iff->in(1)->in(1)->is_Cmp()) {
- CmpNode *cmp = iff->in(1)->in(1)->as_Cmp();
- if (cmp->Opcode() == Op_CmpI && cmp->in(2)->is_Con() && cmp->in(2)->bottom_type()->is_int()->get_con() == 0
- && cmp->in(1)->is_Load()) {
- LoadNode* load = cmp->in(1)->as_Load();
- if (load->Opcode() == Op_LoadB && load->in(2)->is_AddP() && load->in(2)->in(2)->Opcode() == Op_ThreadLocal
- && load->in(2)->in(3)->is_Con()
- && load->in(2)->in(3)->bottom_type()->is_intptr_t()->get_con() == marking_offset) {
-
- Node* if_ctrl = iff->in(0);
- Node* load_ctrl = load->in(0);
-
- if (if_ctrl != load_ctrl) {
- // Skip possible CProj->NeverBranch in infinite loops
- if ((if_ctrl->is_Proj() && if_ctrl->Opcode() == Op_CProj)
- && (if_ctrl->in(0)->is_MultiBranch() && if_ctrl->in(0)->Opcode() == Op_NeverBranch)) {
- if_ctrl = if_ctrl->in(0)->in(0);
- }
- }
- assert(load_ctrl != NULL && if_ctrl == load_ctrl, "controls must match");
- }
- }
- }
- }
- }
- }
- }
-#endif
-}
-
#endif
// The Compile object keeps track of failure reasons separately from the ciEnv.
--- a/src/hotspot/share/opto/compile.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/compile.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1304,6 +1304,7 @@
// Function calls made by the public function final_graph_reshaping.
// No need to be made public as they are not called elsewhere.
void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc);
+ void final_graph_reshaping_main_switch(Node* n, Final_Reshape_Counts& frc, uint nop);
void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc );
void eliminate_redundant_card_marks(Node* n);
@@ -1329,9 +1330,6 @@
// graph is strongly connected from root in both directions.
void verify_graph_edges(bool no_dead_code = false) PRODUCT_RETURN;
- // Verify GC barrier patterns
- void verify_barriers() PRODUCT_RETURN;
-
// End-of-run dumps.
static void print_statistics() PRODUCT_RETURN;
--- a/src/hotspot/share/opto/graphKit.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/graphKit.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1566,7 +1566,7 @@
C2AccessValuePtr addr(adr, adr_type);
C2AccessValue value(val, val_type);
- C2Access access(this, decorators | C2_WRITE_ACCESS, bt, obj, addr);
+ C2ParseAccess access(this, decorators | C2_WRITE_ACCESS, bt, obj, addr);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::store_at(access, value);
} else {
@@ -1585,7 +1585,7 @@
}
C2AccessValuePtr addr(adr, adr_type);
- C2Access access(this, decorators | C2_READ_ACCESS, bt, obj, addr);
+ C2ParseAccess access(this, decorators | C2_READ_ACCESS, bt, obj, addr);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::load_at(access, val_type);
} else {
@@ -1602,7 +1602,7 @@
}
C2AccessValuePtr addr(adr, NULL);
- C2Access access(this, decorators | C2_READ_ACCESS, bt, NULL, addr);
+ C2ParseAccess access(this, decorators | C2_READ_ACCESS, bt, NULL, addr);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::load_at(access, val_type);
} else {
@@ -1620,7 +1620,7 @@
BasicType bt,
DecoratorSet decorators) {
C2AccessValuePtr addr(adr, adr_type);
- C2AtomicAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
+ C2AtomicParseAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
bt, obj, addr, alias_idx);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::atomic_cmpxchg_val_at(access, expected_val, new_val, value_type);
@@ -1639,7 +1639,7 @@
BasicType bt,
DecoratorSet decorators) {
C2AccessValuePtr addr(adr, adr_type);
- C2AtomicAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
+ C2AtomicParseAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
bt, obj, addr, alias_idx);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::atomic_cmpxchg_bool_at(access, expected_val, new_val, value_type);
@@ -1657,7 +1657,7 @@
BasicType bt,
DecoratorSet decorators) {
C2AccessValuePtr addr(adr, adr_type);
- C2AtomicAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
+ C2AtomicParseAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS,
bt, obj, addr, alias_idx);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::atomic_xchg_at(access, new_val, value_type);
@@ -1675,7 +1675,7 @@
BasicType bt,
DecoratorSet decorators) {
C2AccessValuePtr addr(adr, adr_type);
- C2AtomicAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS, bt, obj, addr, alias_idx);
+ C2AtomicParseAccess access(this, decorators | C2_READ_ACCESS | C2_WRITE_ACCESS, bt, obj, addr, alias_idx);
if (access.is_raw()) {
return _barrier_set->BarrierSetC2::atomic_add_at(access, new_val, value_type);
} else {
--- a/src/hotspot/share/opto/loopPredicate.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/loopPredicate.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -301,6 +301,73 @@
return clone_loop_predicates(old_entry, new_entry, clone_limit_check, this, &this->_igvn);
}
+void PhaseIdealLoop::clone_loop_predicates_fix_mem(ProjNode* dom_proj , ProjNode* proj,
+ PhaseIdealLoop* loop_phase,
+ PhaseIterGVN* igvn) {
+ Compile* C = NULL;
+ if (loop_phase != NULL) {
+ igvn = &loop_phase->igvn();
+ }
+ C = igvn->C;
+ ProjNode* other_dom_proj = dom_proj->in(0)->as_Multi()->proj_out(1-dom_proj->_con);
+ Node* dom_r = other_dom_proj->unique_ctrl_out();
+ if (dom_r->is_Region()) {
+ assert(dom_r->unique_ctrl_out()->is_Call(), "unc expected");
+ ProjNode* other_proj = proj->in(0)->as_Multi()->proj_out(1-proj->_con);
+ Node* r = other_proj->unique_ctrl_out();
+ assert(r->is_Region() && r->unique_ctrl_out()->is_Call(), "cloned predicate should have caused region to be added");
+ for (DUIterator_Fast imax, i = dom_r->fast_outs(imax); i < imax; i++) {
+ Node* dom_use = dom_r->fast_out(i);
+ if (dom_use->is_Phi() && dom_use->bottom_type() == Type::MEMORY) {
+ assert(dom_use->in(0) == dom_r, "");
+ Node* phi = NULL;
+ for (DUIterator_Fast jmax, j = r->fast_outs(jmax); j < jmax; j++) {
+ Node* use = r->fast_out(j);
+ if (use->is_Phi() && use->bottom_type() == Type::MEMORY &&
+ use->adr_type() == dom_use->adr_type()) {
+ assert(use->in(0) == r, "");
+ assert(phi == NULL, "only one phi");
+ phi = use;
+ }
+ }
+ if (phi == NULL) {
+ const TypePtr* adr_type = dom_use->adr_type();
+ int alias = C->get_alias_index(adr_type);
+ Node* call = r->unique_ctrl_out();
+ Node* mem = call->in(TypeFunc::Memory);
+ MergeMemNode* mm = NULL;
+ if (mem->is_MergeMem()) {
+ mm = mem->clone()->as_MergeMem();
+ if (adr_type == TypePtr::BOTTOM) {
+ mem = mem->as_MergeMem()->base_memory();
+ } else {
+ mem = mem->as_MergeMem()->memory_at(alias);
+ }
+ } else {
+ mm = MergeMemNode::make(mem);
+ }
+ phi = PhiNode::make(r, mem, Type::MEMORY, adr_type);
+ if (adr_type == TypePtr::BOTTOM) {
+ mm->set_base_memory(phi);
+ } else {
+ mm->set_memory_at(alias, phi);
+ }
+ if (loop_phase != NULL) {
+ loop_phase->register_new_node(mm, r);
+ loop_phase->register_new_node(phi, r);
+ } else {
+ igvn->register_new_node_with_optimizer(mm);
+ igvn->register_new_node_with_optimizer(phi);
+ }
+ igvn->replace_input_of(call, TypeFunc::Memory, mm);
+ }
+ igvn->replace_input_of(phi, r->find_edge(other_proj), dom_use->in(dom_r->find_edge(other_dom_proj)));
+ }
+ }
+ }
+}
+
+
// Clone loop predicates to cloned loops (peeled, unswitched, split_if).
Node* PhaseIdealLoop::clone_loop_predicates(Node* old_entry, Node* new_entry,
bool clone_limit_check,
@@ -333,14 +400,24 @@
}
if (predicate_proj != NULL) { // right pattern that can be used by loop predication
// clone predicate
- new_entry = clone_predicate(predicate_proj, new_entry,
- Deoptimization::Reason_predicate,
- loop_phase, igvn);
- assert(new_entry != NULL && new_entry->is_Proj(), "IfTrue or IfFalse after clone predicate");
+ ProjNode* proj = clone_predicate(predicate_proj, new_entry,
+ Deoptimization::Reason_predicate,
+ loop_phase, igvn);
+ assert(proj != NULL, "IfTrue or IfFalse after clone predicate");
+ new_entry = proj;
if (TraceLoopPredicate) {
tty->print("Loop Predicate cloned: ");
debug_only( new_entry->in(0)->dump(); );
}
+ if (profile_predicate_proj != NULL) {
+ // A node that produces memory may be out of loop and depend on
+ // a profiled predicates. In that case the memory state at the
+ // end of profiled predicates and at the end of predicates are
+ // not the same. The cloned predicates are dominated by the
+ // profiled predicates but may have the wrong memory
+ // state. Update it.
+ clone_loop_predicates_fix_mem(profile_predicate_proj, proj, loop_phase, igvn);
+ }
}
if (profile_predicate_proj != NULL) { // right pattern that can be used by loop predication
// clone predicate
--- a/src/hotspot/share/opto/loopnode.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/loopnode.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1750,7 +1750,7 @@
// disappear it. In JavaGrande I have a case where this useless
// Phi is the loop limit and prevents recognizing a CountedLoop
// which in turn prevents removing an empty loop.
- Node *id_old_phi = old_phi->Identity( &igvn );
+ Node *id_old_phi = igvn.apply_identity(old_phi);
if( id_old_phi != old_phi ) { // Found a simple identity?
// Note that I cannot call 'replace_node' here, because
// that will yank the edge from old_phi to the Region and
--- a/src/hotspot/share/opto/loopnode.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/loopnode.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1081,6 +1081,10 @@
PhaseIdealLoop* loop_phase,
PhaseIterGVN* igvn);
+ static void clone_loop_predicates_fix_mem(ProjNode* dom_proj , ProjNode* proj,
+ PhaseIdealLoop* loop_phase,
+ PhaseIterGVN* igvn);
+
static Node* clone_loop_predicates(Node* old_entry, Node* new_entry,
bool clone_limit_check,
PhaseIdealLoop* loop_phase,
--- a/src/hotspot/share/opto/loopopts.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/loopopts.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -129,7 +129,7 @@
// otherwise it will be not updated during igvn->transform since
// igvn->type(x) is set to x->Value() already.
x->raise_bottom_type(t);
- Node *y = x->Identity(&_igvn);
+ Node *y = _igvn.apply_identity(x);
if (y != x) {
wins++;
x = y;
--- a/src/hotspot/share/opto/macro.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/macro.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -940,6 +940,7 @@
}
k -= (oc2 - use->outcnt());
}
+ _igvn.remove_dead_node(use);
} else if (use->is_ArrayCopy()) {
// Disconnect ArrayCopy node
ArrayCopyNode* ac = use->as_ArrayCopy();
--- a/src/hotspot/share/opto/macroArrayCopy.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/macroArrayCopy.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -72,7 +72,6 @@
Node* parm2, Node* parm3,
Node* parm4, Node* parm5,
Node* parm6, Node* parm7) {
- int size = call_type->domain()->cnt();
Node* call = new CallLeafNoFPNode(call_type, call_addr, call_name, adr_type);
call->init_req(TypeFunc::Control, ctrl);
call->init_req(TypeFunc::I_O , top());
@@ -1107,7 +1106,9 @@
Node* call = make_leaf_call(ctrl, mem, call_type, copyfunc_addr, copyfunc_name, raw_adr_type, src, dest, length XTOP);
transform_later(call);
- _igvn.replace_node(ac, call);
+ BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
+ bs->clone_barrier_at_expansion(ac, call, _igvn);
+
return;
} else if (ac->is_copyof() || ac->is_copyofrange() || ac->is_cloneoop()) {
Node* mem = ac->in(TypeFunc::Memory);
--- a/src/hotspot/share/opto/memnode.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/memnode.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1404,7 +1404,7 @@
// Do nothing here if Identity will find a value
// (to avoid infinite chain of value phis generation).
- if (!phase->eqv(this, this->Identity(phase)))
+ if (!phase->eqv(this, phase->apply_identity(this)))
return NULL;
// Select Region to split through.
@@ -1494,7 +1494,7 @@
// otherwise it will be not updated during igvn->transform since
// igvn->type(x) is set to x->Value() already.
x->raise_bottom_type(t);
- Node *y = x->Identity(igvn);
+ Node *y = igvn->apply_identity(x);
if (y != x) {
x = y;
} else {
@@ -1697,7 +1697,7 @@
// as to alignment, which will therefore produce the smallest
// possible base offset.
const int min_base_off = arrayOopDesc::base_offset_in_bytes(T_BYTE);
- const bool off_beyond_header = ((uint)off >= (uint)min_base_off);
+ const bool off_beyond_header = (off >= min_base_off);
// Try to constant-fold a stable array element.
if (FoldStableValues && !is_mismatched_access() && ary->is_stable()) {
@@ -1734,7 +1734,7 @@
&& Opcode() != Op_LoadKlass && Opcode() != Op_LoadNKlass) {
// t might actually be lower than _type, if _type is a unique
// concrete subclass of abstract class t.
- if (off_beyond_header) { // is the offset beyond the header?
+ if (off_beyond_header || off == Type::OffsetBot) { // is the offset beyond the header?
const Type* jt = t->join_speculative(_type);
// In any case, do not allow the join, per se, to empty out the type.
if (jt->empty() && !t->empty()) {
--- a/src/hotspot/share/opto/node.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/node.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -899,13 +899,6 @@
return (Node*) this;
}
-bool Node::eqv_uncast(const Node* n) const {
- BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
- Node* obj1 = bs->step_over_gc_barrier(const_cast<Node*>(this));
- Node* obj2 = bs->step_over_gc_barrier(const_cast<Node*>(n));
- return (obj1->uncast() == obj2->uncast());
-}
-
// Find out of current node that matches opcode.
Node* Node::find_out_with(int opcode) {
for (DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++) {
--- a/src/hotspot/share/opto/node.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/node.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -457,9 +457,10 @@
// Strip away casting. (It is depth-limited.)
Node* uncast() const;
- // Return whether two Nodes are equivalent, after stripping casting
- // and GC barriers.
- bool eqv_uncast(const Node* n) const;
+ // Return whether two Nodes are equivalent, after stripping casting.
+ bool eqv_uncast(const Node* n) const {
+ return (this->uncast() == n->uncast());
+ }
// Find out of current node that matches opcode.
Node* find_out_with(int opcode);
--- a/src/hotspot/share/opto/phaseX.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/phaseX.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -769,6 +769,22 @@
//=============================================================================
+Node* PhaseGVN::apply_ideal(Node* k, bool can_reshape) {
+ Node* i = BarrierSet::barrier_set()->barrier_set_c2()->ideal_node(this, k, can_reshape);
+ if (i == NULL) {
+ i = k->Ideal(this, can_reshape);
+ }
+ return i;
+}
+
+Node* PhaseGVN::apply_identity(Node* k) {
+ Node* i = BarrierSet::barrier_set()->barrier_set_c2()->identity_node(this, k);
+ if (i == k) {
+ i = k->Identity(this);
+ }
+ return i;
+}
+
//------------------------------transform--------------------------------------
// Return a node which computes the same function as this node, but in a
// faster or cheaper fashion.
@@ -786,7 +802,7 @@
Node *k = n;
NOT_PRODUCT( uint loop_count = 0; )
while( 1 ) {
- Node *i = k->Ideal(this, /*can_reshape=*/false);
+ Node *i = apply_ideal(k, /*can_reshape=*/false);
if( !i ) break;
assert( i->_idx >= k->_idx, "Idealize should return new nodes, use Identity to return old nodes" );
k = i;
@@ -823,7 +839,7 @@
}
// Now check for Identities
- Node *i = k->Identity(this); // Look for a nearby replacement
+ Node *i = apply_identity(k); // Look for a nearby replacement
if( i != k ) { // Found? Return replacement!
NOT_PRODUCT( set_progress(); )
return i;
@@ -1213,7 +1229,7 @@
DEBUG_ONLY(dead_loop_check(k);)
DEBUG_ONLY(bool is_new = (k->outcnt() == 0);)
C->remove_modified_node(k);
- Node* i = k->Ideal(this, /*can_reshape=*/true);
+ Node* i = apply_ideal(k, /*can_reshape=*/true);
assert(i != k || is_new || i->outcnt() > 0, "don't return dead nodes");
#ifndef PRODUCT
verify_step(k);
@@ -1255,7 +1271,7 @@
// Try idealizing again
DEBUG_ONLY(is_new = (k->outcnt() == 0);)
C->remove_modified_node(k);
- i = k->Ideal(this, /*can_reshape=*/true);
+ i = apply_ideal(k, /*can_reshape=*/true);
assert(i != k || is_new || (i->outcnt() > 0), "don't return dead nodes");
#ifndef PRODUCT
verify_step(k);
@@ -1297,7 +1313,7 @@
}
// Now check for Identities
- i = k->Identity(this); // Look for a nearby replacement
+ i = apply_identity(k); // Look for a nearby replacement
if (i != k) { // Found? Return replacement!
NOT_PRODUCT(set_progress();)
add_users_to_worklist(k);
--- a/src/hotspot/share/opto/phaseX.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/phaseX.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -425,6 +425,12 @@
bool is_dominator(Node *d, Node *n) { return is_dominator_helper(d, n, true); }
+ // Helper to call Node::Ideal() and BarrierSetC2::ideal_node().
+ Node* apply_ideal(Node* i, bool can_reshape);
+
+ // Helper to call Node::Identity() and BarrierSetC2::identity_node().
+ Node* apply_identity(Node* n);
+
// Check for a simple dead loop when a data node references itself.
DEBUG_ONLY(void dead_loop_check(Node *n);)
};
--- a/src/hotspot/share/opto/type.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/opto/type.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -2960,7 +2960,7 @@
_is_ptr_to_boxed_value = k->as_instance_klass()->is_boxed_value_offset(offset);
}
#ifdef _LP64
- if (_offset != 0) {
+ if (_offset > 0 || _offset == Type::OffsetTop || _offset == Type::OffsetBot) {
if (_offset == oopDesc::klass_offset_in_bytes()) {
_is_ptr_to_narrowklass = UseCompressedClassPointers;
} else if (klass() == NULL) {
--- a/src/hotspot/share/precompiled/precompiled.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/precompiled/precompiled.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -22,316 +22,60 @@
*
*/
-// Precompiled headers are turned off for Sun Studion,
+// Precompiled headers are turned off for Solaris Studio,
// or if the user passes --disable-precompiled-headers to configure.
#ifndef DONT_USE_PRECOMPILED_HEADER
-# include "jni.h"
-# include "jvm.h"
-# include "asm/assembler.hpp"
-# include "asm/assembler.inline.hpp"
-# include "asm/codeBuffer.hpp"
-# include "asm/register.hpp"
-# include "ci/ciArray.hpp"
-# include "ci/ciArrayKlass.hpp"
-# include "ci/ciClassList.hpp"
-# include "ci/ciConstant.hpp"
-# include "ci/ciConstantPoolCache.hpp"
-# include "ci/ciEnv.hpp"
-# include "ci/ciExceptionHandler.hpp"
-# include "ci/ciField.hpp"
-# include "ci/ciFlags.hpp"
-# include "ci/ciInstance.hpp"
-# include "ci/ciInstanceKlass.hpp"
-# include "ci/ciKlass.hpp"
-# include "ci/ciMethod.hpp"
-# include "ci/ciNullObject.hpp"
-# include "ci/ciObjArrayKlass.hpp"
-# include "ci/ciObject.hpp"
-# include "ci/ciObjectFactory.hpp"
-# include "ci/ciSignature.hpp"
-# include "ci/ciStreams.hpp"
-# include "ci/ciSymbol.hpp"
-# include "ci/ciType.hpp"
-# include "ci/ciTypeArrayKlass.hpp"
-# include "ci/ciUtilities.inline.hpp"
-# include "ci/compilerInterface.hpp"
-# include "classfile/classFileParser.hpp"
-# include "classfile/classFileStream.hpp"
-# include "classfile/classLoader.hpp"
-# include "classfile/javaClasses.hpp"
-# include "classfile/moduleEntry.hpp"
-# include "classfile/modules.hpp"
-# include "classfile/packageEntry.hpp"
-# include "classfile/symbolTable.hpp"
-# include "classfile/systemDictionary.hpp"
-# include "classfile/vmSymbols.hpp"
-# include "code/codeBlob.hpp"
-# include "code/codeCache.hpp"
-# include "code/compressedStream.hpp"
-# include "code/debugInfo.hpp"
-# include "code/debugInfoRec.hpp"
-# include "code/dependencies.hpp"
-# include "code/exceptionHandlerTable.hpp"
-# include "code/location.hpp"
-# include "code/nativeInst.hpp"
-# include "code/nmethod.hpp"
-# include "code/oopRecorder.hpp"
-# include "code/pcDesc.hpp"
-# include "code/relocInfo.hpp"
-# include "code/stubs.hpp"
-# include "code/vmreg.hpp"
-# include "compiler/disassembler.hpp"
-# include "compiler/methodLiveness.hpp"
-# include "compiler/oopMap.hpp"
-# include "gc/shared/adaptiveSizePolicy.hpp"
-# include "gc/shared/ageTable.hpp"
-# include "gc/shared/barrierSet.hpp"
-# include "gc/shared/blockOffsetTable.hpp"
-# include "gc/shared/cardTableBarrierSet.hpp"
-# include "gc/shared/collectedHeap.hpp"
-# include "gc/shared/collectorCounters.hpp"
-# include "gc/shared/collectorPolicy.hpp"
-# include "gc/shared/gcCause.hpp"
-# include "gc/shared/gcLocker.hpp"
-# include "gc/shared/gcStats.hpp"
-# include "gc/shared/gcUtil.hpp"
-# include "gc/shared/genCollectedHeap.hpp"
-# include "gc/shared/generation.hpp"
-# include "gc/shared/generationCounters.hpp"
-# include "gc/shared/jvmFlagConstraintsGC.hpp"
-# include "gc/shared/modRefBarrierSet.hpp"
-# include "gc/shared/ptrQueue.hpp"
-# include "gc/shared/referencePolicy.hpp"
-# include "gc/shared/referenceProcessor.hpp"
-# include "gc/shared/satbMarkQueue.hpp"
-# include "gc/shared/space.hpp"
-# include "gc/shared/spaceDecorator.hpp"
-# include "gc/shared/taskqueue.hpp"
-# include "gc/shared/threadLocalAllocBuffer.hpp"
-# include "gc/shared/workgroup.hpp"
-# include "interpreter/abstractInterpreter.hpp"
-# include "interpreter/bytecode.hpp"
-# include "interpreter/bytecodeHistogram.hpp"
-# include "interpreter/bytecodeInterpreter.hpp"
-# include "interpreter/bytecodeInterpreter.inline.hpp"
-# include "interpreter/bytecodeTracer.hpp"
-# include "interpreter/bytecodes.hpp"
-# include "interpreter/cppInterpreter.hpp"
-# include "interpreter/interp_masm.hpp"
-# include "interpreter/interpreter.hpp"
-# include "interpreter/invocationCounter.hpp"
-# include "interpreter/linkResolver.hpp"
-# include "interpreter/templateInterpreter.hpp"
-# include "interpreter/templateTable.hpp"
-# include "jvmtifiles/jvmti.h"
-# include "logging/log.hpp"
-# include "memory/allocation.hpp"
-# include "memory/arena.hpp"
-# include "memory/heap.hpp"
-# include "memory/iterator.hpp"
-# include "memory/memRegion.hpp"
-# include "memory/oopFactory.hpp"
-# include "memory/resourceArea.hpp"
-# include "memory/universe.hpp"
-# include "memory/universe.hpp"
-# include "memory/virtualspace.hpp"
-# include "oops/array.hpp"
-# include "oops/arrayKlass.hpp"
-# include "oops/arrayOop.hpp"
-# include "oops/constMethod.hpp"
-# include "oops/instanceKlass.hpp"
-# include "oops/instanceOop.hpp"
-# include "oops/instanceRefKlass.hpp"
-# include "oops/klass.hpp"
-# include "oops/klassVtable.hpp"
-# include "oops/markOop.hpp"
-# include "oops/markOop.inline.hpp"
-# include "oops/method.hpp"
-# include "oops/methodData.hpp"
-# include "oops/objArrayKlass.hpp"
-# include "oops/objArrayOop.hpp"
-# include "oops/oop.hpp"
-# include "oops/oopsHierarchy.hpp"
-# include "oops/symbol.hpp"
-# include "oops/typeArrayKlass.hpp"
-# include "oops/typeArrayOop.hpp"
-# include "prims/jvmtiExport.hpp"
-# include "prims/methodHandles.hpp"
-# include "runtime/arguments.hpp"
-# include "runtime/atomic.hpp"
-# include "runtime/deoptimization.hpp"
-# include "runtime/extendedPC.hpp"
-# include "runtime/fieldDescriptor.hpp"
-# include "runtime/fieldType.hpp"
-# include "runtime/flags/flagSetting.hpp"
-# include "runtime/flags/jvmFlag.hpp"
-# include "runtime/flags/jvmFlagConstraintList.hpp"
-# include "runtime/flags/jvmFlagConstraintsCompiler.hpp"
-# include "runtime/flags/jvmFlagConstraintsRuntime.hpp"
-# include "runtime/flags/jvmFlagRangeList.hpp"
-# include "runtime/flags/jvmFlagWriteableList.hpp"
-# include "runtime/frame.hpp"
-# include "runtime/frame.inline.hpp"
-# include "runtime/globals.hpp"
-# include "runtime/globals_extension.hpp"
-# include "runtime/handles.hpp"
-# include "runtime/handles.inline.hpp"
-# include "runtime/icache.hpp"
-# include "runtime/init.hpp"
-# include "runtime/interfaceSupport.inline.hpp"
-# include "runtime/java.hpp"
-# include "runtime/javaCalls.hpp"
-# include "runtime/javaFrameAnchor.hpp"
-# include "runtime/jniHandles.hpp"
-# include "runtime/monitorChunk.hpp"
-# include "runtime/mutex.hpp"
-# include "runtime/mutexLocker.hpp"
-# include "runtime/objectMonitor.hpp"
-# include "runtime/orderAccess.hpp"
-# include "runtime/orderAccess.hpp"
-# include "runtime/os.hpp"
-# include "runtime/osThread.hpp"
-# include "runtime/perfData.hpp"
-# include "runtime/perfMemory.hpp"
-# include "runtime/prefetch.hpp"
-# include "runtime/prefetch.inline.hpp"
-# include "runtime/reflection.hpp"
-# include "runtime/reflectionUtils.hpp"
-# include "runtime/registerMap.hpp"
-# include "runtime/safepoint.hpp"
-# include "runtime/sharedRuntime.hpp"
-# include "runtime/signature.hpp"
-# include "runtime/stackValue.hpp"
-# include "runtime/stackValueCollection.hpp"
-# include "runtime/stubCodeGenerator.hpp"
-# include "runtime/stubRoutines.hpp"
-# include "runtime/synchronizer.hpp"
-# include "runtime/thread.hpp"
-# include "runtime/timer.hpp"
-# include "runtime/unhandledOops.hpp"
-# include "runtime/vframe.hpp"
-# include "runtime/vmThread.hpp"
-# include "runtime/vm_operations.hpp"
-# include "runtime/vm_version.hpp"
-# include "services/allocationSite.hpp"
-# include "services/lowMemoryDetector.hpp"
-# include "services/mallocTracker.hpp"
-# include "services/memBaseline.hpp"
-# include "services/memReporter.hpp"
-# include "services/memTracker.hpp"
-# include "services/memoryPool.hpp"
-# include "services/memoryService.hpp"
-# include "services/memoryUsage.hpp"
-# include "services/nmtCommon.hpp"
-# include "services/virtualMemoryTracker.hpp"
-# include "utilities/accessFlags.hpp"
-# include "utilities/bitMap.hpp"
-# include "utilities/bitMap.inline.hpp"
-# include "utilities/bytes.hpp"
-# include "utilities/constantTag.hpp"
-# include "utilities/copy.hpp"
-# include "utilities/debug.hpp"
-# include "utilities/exceptions.hpp"
-# include "utilities/globalDefinitions.hpp"
-# include "utilities/growableArray.hpp"
-# include "utilities/hashtable.hpp"
-# include "utilities/histogram.hpp"
-# include "utilities/macros.hpp"
-# include "utilities/nativeCallStack.hpp"
-# include "utilities/numberSeq.hpp"
-# include "utilities/ostream.hpp"
-# include "utilities/preserveException.hpp"
-# include "utilities/sizes.hpp"
-# include "utilities/utf8.hpp"
-#ifdef COMPILER2
-# include "libadt/dict.hpp"
-# include "libadt/set.hpp"
-# include "libadt/vectset.hpp"
-# include "opto/ad.hpp"
-# include "opto/addnode.hpp"
-# include "opto/adlcVMDeps.hpp"
-# include "opto/block.hpp"
-# include "opto/c2_globals.hpp"
-# include "opto/callnode.hpp"
-# include "opto/castnode.hpp"
-# include "opto/cfgnode.hpp"
-# include "opto/compile.hpp"
-# include "opto/connode.hpp"
-# include "opto/convertnode.hpp"
-# include "opto/countbitsnode.hpp"
-# include "opto/idealGraphPrinter.hpp"
-# include "opto/intrinsicnode.hpp"
-# include "opto/loopnode.hpp"
-# include "opto/machnode.hpp"
-# include "opto/matcher.hpp"
-# include "opto/memnode.hpp"
-# include "opto/movenode.hpp"
-# include "opto/mulnode.hpp"
-# include "opto/multnode.hpp"
-# include "opto/narrowptrnode.hpp"
-# include "opto/opaquenode.hpp"
-# include "opto/opcodes.hpp"
-# include "opto/optoreg.hpp"
-# include "opto/phase.hpp"
-# include "opto/phaseX.hpp"
-# include "opto/regalloc.hpp"
-# include "opto/regmask.hpp"
-# include "opto/runtime.hpp"
-# include "opto/subnode.hpp"
-# include "opto/type.hpp"
-# include "opto/vectornode.hpp"
-#endif // COMPILER2
-#ifdef COMPILER1
-# include "c1/c1_Compilation.hpp"
-# include "c1/c1_Defs.hpp"
-# include "c1/c1_FrameMap.hpp"
-# include "c1/c1_LIR.hpp"
-# include "c1/c1_MacroAssembler.hpp"
-# include "c1/c1_ValueType.hpp"
-# include "c1/c1_globals.hpp"
-#endif // COMPILER1
-#if INCLUDE_JVMCI
-# include "jvmci/jvmci_globals.hpp"
-#endif // INCLUDE_JVMCI
-#if INCLUDE_CMSGC
-# include "gc/cms/allocationStats.hpp"
-# include "gc/cms/compactibleFreeListSpace.hpp"
-# include "gc/cms/concurrentMarkSweepGeneration.hpp"
-# include "gc/cms/freeChunk.hpp"
-# include "gc/cms/gSpaceCounters.hpp"
-# include "gc/cms/jvmFlagConstraintsCMS.hpp"
-# include "gc/cms/parOopClosures.hpp"
-# include "gc/cms/promotionInfo.hpp"
-# include "gc/cms/yieldingWorkgroup.hpp"
-#endif // INCLUDE_CMSGC
-#if INCLUDE_G1GC
-# include "gc/g1/dirtyCardQueue.hpp"
-# include "gc/g1/g1BlockOffsetTable.hpp"
-# include "gc/g1/g1OopClosures.hpp"
-# include "gc/g1/g1_globals.hpp"
-# include "gc/g1/jvmFlagConstraintsG1.hpp"
-#endif // INCLUDE_G1GC
-#if INCLUDE_PARALLELGC
-# include "gc/parallel/gcAdaptivePolicyCounters.hpp"
-# include "gc/parallel/immutableSpace.hpp"
-# include "gc/parallel/jvmFlagConstraintsParallel.hpp"
-# include "gc/parallel/mutableSpace.hpp"
-# include "gc/parallel/objectStartArray.hpp"
-# include "gc/parallel/parMarkBitMap.hpp"
-# include "gc/parallel/parallelScavengeHeap.hpp"
-# include "gc/parallel/psAdaptiveSizePolicy.hpp"
-# include "gc/parallel/psCompactionManager.hpp"
-# include "gc/parallel/psGCAdaptivePolicyCounters.hpp"
-# include "gc/parallel/psGenerationCounters.hpp"
-# include "gc/parallel/psOldGen.hpp"
-# include "gc/parallel/psVirtualspace.hpp"
-# include "gc/parallel/psYoungGen.hpp"
-# include "gc/parallel/spaceCounters.hpp"
-#endif // INCLUDE_PARALLELGC
-#if INCLUDE_SERIALGC
-# include "gc/serial/cSpaceCounters.hpp"
-# include "gc/serial/defNewGeneration.hpp"
-#endif // INCLUDE_SERIALGC
+
+// These header files are included in at least 130 C++ files, as of
+// measurements made in November 2018. This list excludes files named
+// *.include.hpp, since including them decreased build performance.
+
+#include "classfile/classLoaderData.hpp"
+#include "classfile/javaClasses.hpp"
+#include "classfile/systemDictionary.hpp"
+#include "gc/shared/collectedHeap.hpp"
+#include "gc/shared/gcCause.hpp"
+#include "logging/log.hpp"
+#include "memory/allocation.hpp"
+#include "memory/iterator.hpp"
+#include "memory/memRegion.hpp"
+#include "memory/resourceArea.hpp"
+#include "memory/universe.hpp"
+#include "oops/instanceKlass.hpp"
+#include "oops/klass.hpp"
+#include "oops/method.hpp"
+#include "oops/objArrayKlass.hpp"
+#include "oops/objArrayOop.hpp"
+#include "oops/oop.hpp"
+#include "oops/oopsHierarchy.hpp"
+#include "runtime/atomic.hpp"
+#include "runtime/globals.hpp"
+#include "runtime/handles.hpp"
+#include "runtime/mutex.hpp"
+#include "runtime/orderAccess.hpp"
+#include "runtime/os.hpp"
+#include "runtime/thread.hpp"
+#include "runtime/timer.hpp"
+#include "services/memTracker.hpp"
+#include "utilities/align.hpp"
+#include "utilities/bitMap.hpp"
+#include "utilities/copy.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/exceptions.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "utilities/growableArray.hpp"
+#include "utilities/macros.hpp"
+#include "utilities/ostream.hpp"
+#include "utilities/ticks.hpp"
+
+#ifdef TARGET_COMPILER_visCPP
+// For Visual Studio, including the *.inline.hpp files actually
+// increased performance.
+#include "memory/allocation.inline.hpp"
+#include "oops/access.inline.hpp"
+#include "oops/oop.inline.hpp"
+#include "runtime/handles.inline.hpp"
+#endif // TARGET_COMPILER_visCPP
#endif // !DONT_USE_PRECOMPILED_HEADER
--- a/src/hotspot/share/prims/jni.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/jni.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -86,7 +86,6 @@
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/histogram.hpp"
-#include "utilities/internalVMTests.hpp"
#include "utilities/macros.hpp"
#include "utilities/vmError.hpp"
#if INCLUDE_JVMCI
@@ -3977,9 +3976,6 @@
// Some platforms (like Win*) need a wrapper around these test
// functions in order to properly handle error conditions.
VMError::test_error_handler();
- if (ExecuteInternalVMTests) {
- InternalVMTests::run();
- }
#endif
// Since this is not a JVM_ENTRY we have to set the thread state manually before leaving.
--- a/src/hotspot/share/prims/jvm.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/jvm.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -55,7 +55,6 @@
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "prims/nativeLookup.hpp"
-#include "prims/privilegedStack.hpp"
#include "prims/stackwalk.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
@@ -365,6 +364,8 @@
// System property list includes both user set via -D option and
// jvm system specific properties.
for (SystemProperty* p = Arguments::system_properties(); p != NULL; p = p->next()) {
+ if (strcmp(p->key(), "sun.nio.MaxDirectMemorySize") == 0) // Can not be defined with -D
+ continue;
PUTPROP(props, p->key(), p->value());
}
@@ -372,14 +373,11 @@
// to the sun.nio.MaxDirectMemorySize property.
// Do this after setting user properties to prevent people
// from setting the value with a -D option, as requested.
- {
- if (FLAG_IS_DEFAULT(MaxDirectMemorySize)) {
- PUTPROP(props, "sun.nio.MaxDirectMemorySize", "-1");
- } else {
- char as_chars[256];
- jio_snprintf(as_chars, sizeof(as_chars), JULONG_FORMAT, MaxDirectMemorySize);
- PUTPROP(props, "sun.nio.MaxDirectMemorySize", as_chars);
- }
+ // Leave empty if not supplied
+ if (!FLAG_IS_DEFAULT(MaxDirectMemorySize)) {
+ char as_chars[256];
+ jio_snprintf(as_chars, sizeof(as_chars), JULONG_FORMAT, MaxDirectMemorySize);
+ PUTPROP(props, "sun.nio.MaxDirectMemorySize", as_chars);
}
// JVM monitoring and management support
@@ -1166,155 +1164,6 @@
JVM_END
-static bool is_authorized(Handle context, InstanceKlass* klass, TRAPS) {
- // If there is a security manager and protection domain, check the access
- // in the protection domain, otherwise it is authorized.
- if (java_lang_System::has_security_manager()) {
-
- // For bootstrapping, if pd implies method isn't in the JDK, allow
- // this context to revert to older behavior.
- // In this case the isAuthorized field in AccessControlContext is also not
- // present.
- if (Universe::protection_domain_implies_method() == NULL) {
- return true;
- }
-
- // Whitelist certain access control contexts
- if (java_security_AccessControlContext::is_authorized(context)) {
- return true;
- }
-
- oop prot = klass->protection_domain();
- if (prot != NULL) {
- // Call pd.implies(new SecurityPermission("createAccessControlContext"))
- // in the new wrapper.
- methodHandle m(THREAD, Universe::protection_domain_implies_method());
- Handle h_prot(THREAD, prot);
- JavaValue result(T_BOOLEAN);
- JavaCallArguments args(h_prot);
- JavaCalls::call(&result, m, &args, CHECK_false);
- return (result.get_jboolean() != 0);
- }
- }
- return true;
-}
-
-// Create an AccessControlContext with a protection domain with null codesource
-// and null permissions - which gives no permissions.
-oop create_dummy_access_control_context(TRAPS) {
- InstanceKlass* pd_klass = SystemDictionary::ProtectionDomain_klass();
- // Call constructor ProtectionDomain(null, null);
- Handle obj = JavaCalls::construct_new_instance(pd_klass,
- vmSymbols::codesource_permissioncollection_signature(),
- Handle(), Handle(), CHECK_NULL);
-
- // new ProtectionDomain[] {pd};
- objArrayOop context = oopFactory::new_objArray(pd_klass, 1, CHECK_NULL);
- context->obj_at_put(0, obj());
-
- // new AccessControlContext(new ProtectionDomain[] {pd})
- objArrayHandle h_context(THREAD, context);
- oop acc = java_security_AccessControlContext::create(h_context, false, Handle(), CHECK_NULL);
- return acc;
-}
-
-JVM_ENTRY(jobject, JVM_DoPrivileged(JNIEnv *env, jclass cls, jobject action, jobject context, jboolean wrapException))
- JVMWrapper("JVM_DoPrivileged");
-
- if (action == NULL) {
- THROW_MSG_0(vmSymbols::java_lang_NullPointerException(), "Null action");
- }
-
- // Compute the frame initiating the do privileged operation and setup the privileged stack
- vframeStream vfst(thread);
- vfst.security_get_caller_frame(1);
-
- if (vfst.at_end()) {
- THROW_MSG_0(vmSymbols::java_lang_InternalError(), "no caller?");
- }
-
- Method* method = vfst.method();
- InstanceKlass* klass = method->method_holder();
-
- // Check that action object understands "Object run()"
- Handle h_context;
- if (context != NULL) {
- h_context = Handle(THREAD, JNIHandles::resolve(context));
- bool authorized = is_authorized(h_context, klass, CHECK_NULL);
- if (!authorized) {
- // Create an unprivileged access control object and call it's run function
- // instead.
- oop noprivs = create_dummy_access_control_context(CHECK_NULL);
- h_context = Handle(THREAD, noprivs);
- }
- }
-
- // Check that action object understands "Object run()"
- Handle object (THREAD, JNIHandles::resolve(action));
-
- // get run() method
- Method* m_oop = object->klass()->uncached_lookup_method(
- vmSymbols::run_method_name(),
- vmSymbols::void_object_signature(),
- Klass::find_overpass);
-
- // See if there is a default method for "Object run()".
- if (m_oop == NULL && object->klass()->is_instance_klass()) {
- InstanceKlass* iklass = InstanceKlass::cast(object->klass());
- m_oop = iklass->lookup_method_in_ordered_interfaces(
- vmSymbols::run_method_name(),
- vmSymbols::void_object_signature());
- }
-
- methodHandle m (THREAD, m_oop);
- if (m.is_null() || !m->is_method() || !m()->is_public() || m()->is_static() || m()->is_abstract()) {
- THROW_MSG_0(vmSymbols::java_lang_InternalError(), "No run method");
- }
-
- // Stack allocated list of privileged stack elements
- PrivilegedElement pi;
- if (!vfst.at_end()) {
- pi.initialize(&vfst, h_context(), thread->privileged_stack_top(), CHECK_NULL);
- thread->set_privileged_stack_top(&pi);
- }
-
-
- // invoke the Object run() in the action object. We cannot use call_interface here, since the static type
- // is not really known - it is either java.security.PrivilegedAction or java.security.PrivilegedExceptionAction
- Handle pending_exception;
- JavaValue result(T_OBJECT);
- JavaCallArguments args(object);
- JavaCalls::call(&result, m, &args, THREAD);
-
- // done with action, remove ourselves from the list
- if (!vfst.at_end()) {
- assert(thread->privileged_stack_top() != NULL && thread->privileged_stack_top() == &pi, "wrong top element");
- thread->set_privileged_stack_top(thread->privileged_stack_top()->next());
- }
-
- if (HAS_PENDING_EXCEPTION) {
- pending_exception = Handle(THREAD, PENDING_EXCEPTION);
- CLEAR_PENDING_EXCEPTION;
- // JVMTI has already reported the pending exception
- // JVMTI internal flag reset is needed in order to report PrivilegedActionException
- if (THREAD->is_Java_thread()) {
- JvmtiExport::clear_detected_exception((JavaThread*) THREAD);
- }
- if ( pending_exception->is_a(SystemDictionary::Exception_klass()) &&
- !pending_exception->is_a(SystemDictionary::RuntimeException_klass())) {
- // Throw a java.security.PrivilegedActionException(Exception e) exception
- JavaCallArguments args(pending_exception);
- THROW_ARG_0(vmSymbols::java_security_PrivilegedActionException(),
- vmSymbols::exception_void_signature(),
- &args);
- }
- }
-
- if (pending_exception.not_null()) THROW_OOP_0(pending_exception());
- return JNIHandles::make_local(env, (oop) result.get_jobject());
-JVM_END
-
-
// Returns the inherited_access_control_context field of the running thread.
JVM_ENTRY(jobject, JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls))
JVMWrapper("JVM_GetInheritedAccessControlContext");
@@ -1349,25 +1198,35 @@
// duplicate consecutive protection domains into a single one, as
// well as stopping when we hit a privileged frame.
- // Use vframeStream to iterate through Java frames
- vframeStream vfst(thread);
-
oop previous_protection_domain = NULL;
Handle privileged_context(thread, NULL);
bool is_privileged = false;
oop protection_domain = NULL;
- for(; !vfst.at_end(); vfst.next()) {
+ // Iterate through Java frames
+ RegisterMap reg_map(thread);
+ javaVFrame *vf = thread->last_java_vframe(®_map);
+ for (; vf != NULL; vf = vf->java_sender()) {
// get method of frame
- Method* method = vfst.method();
- intptr_t* frame_id = vfst.frame_id();
-
- // check the privileged frames to see if we have a match
- if (thread->privileged_stack_top() && thread->privileged_stack_top()->frame_id() == frame_id) {
+ Method* method = vf->method();
+
+ // stop at the first privileged frame
+ if (method->method_holder() == SystemDictionary::AccessController_klass() &&
+ method->name() == vmSymbols::executePrivileged_name())
+ {
// this frame is privileged
is_privileged = true;
- privileged_context = Handle(thread, thread->privileged_stack_top()->privileged_context());
- protection_domain = thread->privileged_stack_top()->protection_domain();
+
+ javaVFrame *priv = vf; // executePrivileged
+ javaVFrame *caller_fr = priv->java_sender(); // doPrivileged
+ caller_fr = caller_fr->java_sender(); // caller
+
+ StackValueCollection* locals = priv->locals();
+ privileged_context = locals->obj_at(1);
+ Handle caller = locals->obj_at(2);
+
+ Klass *caller_klass = java_lang_Class::as_Klass(caller());
+ protection_domain = caller_klass->protection_domain();
} else {
protection_domain = method->method_holder()->protection_domain();
}
--- a/src/hotspot/share/prims/jvmtiImpl.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -635,18 +635,8 @@
// JVMTI_ERROR_TYPE_MISMATCH
// Returns: 'true' - everything is Ok, 'false' - error code
-bool VM_GetOrSetLocal::check_slot_type(javaVFrame* jvf) {
+bool VM_GetOrSetLocal::check_slot_type_lvt(javaVFrame* jvf) {
Method* method_oop = jvf->method();
- if (!method_oop->has_localvariable_table()) {
- // Just to check index boundaries
- jint extra_slot = (_type == T_LONG || _type == T_DOUBLE) ? 1 : 0;
- if (_index < 0 || _index + extra_slot >= method_oop->max_locals()) {
- _result = JVMTI_ERROR_INVALID_SLOT;
- return false;
- }
- return true;
- }
-
jint num_entries = method_oop->localvariable_table_length();
if (num_entries == 0) {
_result = JVMTI_ERROR_INVALID_SLOT;
@@ -711,6 +701,35 @@
return true;
}
+bool VM_GetOrSetLocal::check_slot_type_no_lvt(javaVFrame* jvf) {
+ Method* method_oop = jvf->method();
+ jint extra_slot = (_type == T_LONG || _type == T_DOUBLE) ? 1 : 0;
+
+ if (_index < 0 || _index + extra_slot >= method_oop->max_locals()) {
+ _result = JVMTI_ERROR_INVALID_SLOT;
+ return false;
+ }
+ StackValueCollection *locals = _jvf->locals();
+ BasicType slot_type = locals->at(_index)->type();
+
+ if (slot_type == T_CONFLICT) {
+ _result = JVMTI_ERROR_INVALID_SLOT;
+ return false;
+ }
+ if (extra_slot) {
+ BasicType extra_slot_type = locals->at(_index + 1)->type();
+ if (extra_slot_type != T_INT) {
+ _result = JVMTI_ERROR_INVALID_SLOT;
+ return false;
+ }
+ }
+ if (_type != slot_type && (_type == T_OBJECT || slot_type != T_INT)) {
+ _result = JVMTI_ERROR_TYPE_MISMATCH;
+ return false;
+ }
+ return true;
+}
+
static bool can_be_deoptimized(vframe* vf) {
return (vf->is_compiled_frame() && vf->fr().can_be_deoptimized());
}
@@ -719,8 +738,9 @@
_jvf = get_java_vframe();
NULL_CHECK(_jvf, false);
- if (_jvf->method()->is_native()) {
- if (getting_receiver() && !_jvf->method()->is_static()) {
+ Method* method_oop = _jvf->method();
+ if (method_oop->is_native()) {
+ if (getting_receiver() && !method_oop->is_static()) {
return true;
} else {
_result = JVMTI_ERROR_OPAQUE_FRAME;
@@ -728,8 +748,10 @@
}
}
- if (!check_slot_type(_jvf)) {
- return false;
+ if (method_oop->has_localvariable_table()) {
+ return check_slot_type_lvt(_jvf);
+ } else {
+ return check_slot_type_no_lvt(_jvf);
}
return true;
}
@@ -796,12 +818,6 @@
} else {
StackValueCollection *locals = _jvf->locals();
- if (locals->at(_index)->type() == T_CONFLICT) {
- memset(&_value, 0, sizeof(_value));
- _value.l = NULL;
- return;
- }
-
switch (_type) {
case T_INT: _value.i = locals->int_at (_index); break;
case T_LONG: _value.j = locals->long_at (_index); break;
--- a/src/hotspot/share/prims/jvmtiImpl.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/jvmtiImpl.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -382,7 +382,8 @@
vframe* get_vframe();
javaVFrame* get_java_vframe();
- bool check_slot_type(javaVFrame* vf);
+ bool check_slot_type_lvt(javaVFrame* vf);
+ bool check_slot_type_no_lvt(javaVFrame* vf);
public:
// Constructor for non-object getter
--- a/src/hotspot/share/prims/methodHandles.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/methodHandles.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1075,7 +1075,7 @@
void MethodHandles::add_dependent_nmethod(oop call_site, nmethod* nm) {
assert_locked_or_safepoint(CodeCache_lock);
- oop context = java_lang_invoke_CallSite::context(call_site);
+ oop context = java_lang_invoke_CallSite::context_no_keepalive(call_site);
DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
// Try to purge stale entries on updates.
// Since GC doesn't clean dependency contexts rooted at CallSiteContext objects,
@@ -1088,7 +1088,7 @@
void MethodHandles::remove_dependent_nmethod(oop call_site, nmethod* nm) {
assert_locked_or_safepoint(CodeCache_lock);
- oop context = java_lang_invoke_CallSite::context(call_site);
+ oop context = java_lang_invoke_CallSite::context_no_keepalive(call_site);
DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
deps.remove_dependent_nmethod(nm, /*expunge_stale_entries=*/safe_to_expunge());
}
@@ -1102,7 +1102,7 @@
NoSafepointVerifier nsv;
MutexLockerEx mu2(CodeCache_lock, Mutex::_no_safepoint_check_flag);
- oop context = java_lang_invoke_CallSite::context(call_site());
+ oop context = java_lang_invoke_CallSite::context_no_keepalive(call_site());
DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
marked = deps.mark_dependent_nmethods(changes);
}
--- a/src/hotspot/share/prims/privilegedStack.cpp Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-#include "memory/allocation.inline.hpp"
-#include "oops/instanceKlass.hpp"
-#include "oops/method.hpp"
-#include "oops/oop.inline.hpp"
-#include "prims/privilegedStack.hpp"
-#include "runtime/thread.inline.hpp"
-#include "runtime/vframe.inline.hpp"
-
-void PrivilegedElement::initialize(vframeStream* vfst, oop context, PrivilegedElement* next, TRAPS) {
- Method* method = vfst->method();
- _klass = method->method_holder();
- _privileged_context = context;
-#ifdef CHECK_UNHANDLED_OOPS
- THREAD->allow_unhandled_oop(&_privileged_context);
-#endif // CHECK_UNHANDLED_OOPS
- _frame_id = vfst->frame_id();
- _next = next;
- assert(oopDesc::is_oop_or_null(_privileged_context), "must be an oop");
- assert(oopDesc::is_oop_or_null(protection_domain()), "must be an oop");
-}
-
-void PrivilegedElement::oops_do(OopClosure* f) {
- PrivilegedElement *cur = this;
- do {
- f->do_oop((oop*) &cur->_privileged_context);
- cur = cur->_next;
- } while(cur != NULL);
-}
-
-//-------------------------------------------------------------------------------
-#ifndef PRODUCT
-
-void PrivilegedElement::print_on(outputStream* st) const {
- st->print(" " PTR_FORMAT " ", p2i(_frame_id));
- _klass->print_value_on(st);
- if (protection_domain() != NULL) {
- st->print(" ");
- protection_domain()->print_value_on(st);
- }
- st->cr();
-}
-
-bool PrivilegedElement::contains(address addr) {
- PrivilegedElement *e = (PrivilegedElement *)addr;
- if (e >= this && e < this+1) return true;
-
- if (_next != NULL) {
- return _next->contains(addr);
- } else {
- return false;
- }
-}
-
-#endif
--- a/src/hotspot/share/prims/privilegedStack.hpp Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_PRIMS_PRIVILEGEDSTACK_HPP
-#define SHARE_VM_PRIMS_PRIVILEGEDSTACK_HPP
-
-#include "oops/oopsHierarchy.hpp"
-#include "runtime/vframe.hpp"
-#include "utilities/growableArray.hpp"
-
-class PrivilegedElement {
- private:
- Klass* _klass; // klass for method
- oop _privileged_context; // context for operation
- intptr_t* _frame_id; // location on stack
- PrivilegedElement* _next; // Link to next one on stack
- public:
- void initialize(vframeStream* vf, oop context, PrivilegedElement* next, TRAPS);
- void oops_do(OopClosure* f);
- intptr_t* frame_id() const { return _frame_id; }
- oop privileged_context() const { return _privileged_context; }
- oop class_loader() const { return InstanceKlass::cast(_klass)->class_loader(); }
- oop protection_domain() const { return InstanceKlass::cast(_klass)->protection_domain(); }
- PrivilegedElement *next() const { return _next; }
-
- // debugging (used for find)
- void print_on(outputStream* st) const PRODUCT_RETURN;
- bool contains(address addr) PRODUCT_RETURN0;
-};
-
-#endif // SHARE_VM_PRIMS_PRIVILEGEDSTACK_HPP
--- a/src/hotspot/share/prims/whitebox.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/prims/whitebox.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1774,7 +1774,7 @@
WB_END
WB_ENTRY(jboolean, WB_AreSharedStringsIgnored(JNIEnv* env))
- return !StringTable::shared_string_mapped();
+ return !HeapShared::closed_archive_heap_region_mapped();
WB_END
WB_ENTRY(jobject, WB_GetResolvedReferences(JNIEnv* env, jobject wb, jclass clazz))
--- a/src/hotspot/share/runtime/arguments.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/arguments.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -532,8 +532,7 @@
{ "MaxRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
- { "UseMembar", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
- { "IgnoreUnverifiableClassesDuringDump", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "UseMembar", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::undefined() },
{ "CompilerThreadHintNoPreempt", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "VMThreadHintNoPreempt", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
@@ -555,6 +554,7 @@
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
{ "SharedMiscCodeSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
{ "AssumeMP", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::jdk(13) },
+ { "IgnoreUnverifiableClassesDuringDump", JDK_Version::jdk(10), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "UnlinkSymbolsALot", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "AllowNonVirtualCalls", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
{ "PrintSafepointStatistics", JDK_Version::jdk(11), JDK_Version::jdk(12), JDK_Version::jdk(13) },
--- a/src/hotspot/share/runtime/globals.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/globals.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -247,12 +247,6 @@
range(8, 256) \
constraint(ObjectAlignmentInBytesConstraintFunc,AtParse) \
\
- /* UseMembar is theoretically a temp flag used for memory barrier */ \
- /* removal testing. It was supposed to be removed before FCS but has */ \
- /* been re-added (see 6401008) */ \
- product_pd(bool, UseMembar, \
- "(Unstable) Issues membars on thread state transitions") \
- \
develop(bool, CleanChunkPoolAsync, true, \
"Clean the chunk pool asynchronously") \
\
@@ -1264,6 +1258,10 @@
"If an error occurs, save the error data to this file " \
"[default: ./hs_err_pid%p.log] (%p replaced with pid)") \
\
+ product(bool, ExtensiveErrorReports, \
+ PRODUCT_ONLY(false) NOT_PRODUCT(true), \
+ "Error reports are more extensive.") \
+ \
product(bool, DisplayVMOutputToStderr, false, \
"If DisplayVMOutput is true, display all VM output to stderr") \
\
@@ -2433,10 +2431,6 @@
"Average number of symbols per bucket in shared table") \
range(2, 246) \
\
- diagnostic(bool, IgnoreUnverifiableClassesDuringDump, true, \
- "Do not quit -Xshare:dump even if we encounter unverifiable " \
- "classes. Just exclude them from the shared dictionary.") \
- \
diagnostic(bool, PrintMethodHandleStubs, false, \
"Print generated stub code for method handles") \
\
--- a/src/hotspot/share/runtime/handshake.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/handshake.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -126,10 +126,6 @@
return;
}
- if (!UseMembar) {
- os::serialize_thread_states();
- }
-
log_trace(handshake)("Thread signaled, begin processing by VMThtread");
jlong start_time = os::elapsed_counter();
do {
@@ -173,10 +169,6 @@
return;
}
- if (!UseMembar) {
- os::serialize_thread_states();
- }
-
log_debug(handshake)("Threads signaled, begin processing blocked threads by VMThtread");
const jlong start_time = os::elapsed_counter();
int number_of_threads_completed = 0;
--- a/src/hotspot/share/runtime/interfaceSupport.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/interfaceSupport.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -79,17 +79,7 @@
private:
static void serialize_thread_state_internal(JavaThread* thread, bool needs_exception_handler) {
// Make sure new state is seen by VM thread
- if (UseMembar) {
- // Force a fence between the write above and read below
- OrderAccess::fence();
- } else {
- // store to serialize page so VM thread can do pseudo remote membar
- if (needs_exception_handler) {
- os::write_memory_serialize_page_with_handler(thread);
- } else {
- os::write_memory_serialize_page(thread);
- }
- }
+ OrderAccess::fence();
}
};
@@ -126,9 +116,7 @@
// transition_and_fence must be used on any thread state transition
// where there might not be a Java call stub on the stack, in
// particular on Windows where the Structured Exception Handler is
- // set up in the call stub. os::write_memory_serialize_page() can
- // fault and we can't recover from it on Windows without a SEH in
- // place.
+ // set up in the call stub.
static inline void transition_and_fence(JavaThread *thread, JavaThreadState from, JavaThreadState to) {
assert(thread->thread_state() == from, "coming from wrong thread state");
assert((from & 1) == 0 && (to & 1) == 0, "odd numbers are transitions states");
@@ -162,7 +150,7 @@
// We never install asynchronous exceptions when coming (back) in
// to the runtime from native code because the runtime is not set
// up to handle exceptions floating around at arbitrary points.
- if (SafepointMechanism::poll(thread) || thread->is_suspend_after_native()) {
+ if (SafepointMechanism::should_block(thread) || thread->is_suspend_after_native()) {
JavaThread::check_safepoint_and_suspend_for_native_trans(thread);
// Clear unhandled oops anywhere where we could block, even if we don't.
--- a/src/hotspot/share/runtime/mutex.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/mutex.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -383,7 +383,7 @@
jint rv = Self->rng[0];
for (int k = Delay; --k >= 0;) {
rv = MarsagliaXORV(rv);
- if (SafepointMechanism::poll(Self)) return 0;
+ if (SafepointMechanism::should_block(Self)) return 0;
}
Self->rng[0] = rv;
} else {
--- a/src/hotspot/share/runtime/mutexLocker.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/mutexLocker.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -106,7 +106,7 @@
Mutex* ProfilePrint_lock = NULL;
Mutex* ExceptionCache_lock = NULL;
Mutex* OsrList_lock = NULL;
-
+Mutex* NMethodSweeperStats_lock = NULL;
#ifndef PRODUCT
Mutex* FullGCALot_lock = NULL;
#endif
@@ -138,6 +138,7 @@
Monitor* JfrMsg_lock = NULL;
Mutex* JfrBuffer_lock = NULL;
Mutex* JfrStream_lock = NULL;
+Monitor* JfrThreadSampler_lock = NULL;
#endif
#ifndef SUPPORTS_NATIVE_CX8
@@ -147,6 +148,9 @@
Mutex* MetaspaceExpand_lock = NULL;
Mutex* ClassLoaderDataGraph_lock = NULL;
+Monitor* ThreadsSMRDelete_lock = NULL;
+Mutex* SharedDecoder_lock = NULL;
+Mutex* DCmdFactory_lock = NULL;
#define MAX_NUM_MUTEX 128
static Monitor * _mutex_array[MAX_NUM_MUTEX];
@@ -243,7 +247,7 @@
def(JmethodIdCreation_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always); // used for creating jmethodIDs.
def(SystemDictionary_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
- def(SharedDictionary_lock , PaddedMutex, leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
+ def(SharedDictionary_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always); // lookups done by VM thread
def(Module_lock , PaddedMutex , leaf+2, true, Monitor::_safepoint_check_always);
def(InlineCacheBuffer_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_always);
def(VMStatistic_lock , PaddedMutex , leaf, false, Monitor::_safepoint_check_always);
@@ -318,6 +322,7 @@
def(JfrBuffer_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
def(JfrStream_lock , PaddedMutex , leaf+1, true, Monitor::_safepoint_check_never); // ensure to rank lower than 'safepoint'
def(JfrStacktrace_lock , PaddedMutex , special, true, Monitor::_safepoint_check_sometimes);
+ def(JfrThreadSampler_lock , PaddedMonitor, leaf, true, Monitor::_safepoint_check_never);
#endif
#ifndef SUPPORTS_NATIVE_CX8
@@ -325,6 +330,11 @@
#endif
def(CodeHeapStateAnalytics_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
+
+ def(NMethodSweeperStats_lock , PaddedMutex , special, true, Monitor::_safepoint_check_sometimes);
+ def(ThreadsSMRDelete_lock , PaddedMonitor, special, false, Monitor::_safepoint_check_never);
+ def(SharedDecoder_lock , PaddedMutex , native, false, Monitor::_safepoint_check_never);
+ def(DCmdFactory_lock , PaddedMutex , leaf, true, Monitor::_safepoint_check_never);
}
GCMutexLocker::GCMutexLocker(Monitor * mutex) {
--- a/src/hotspot/share/runtime/mutexLocker.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/mutexLocker.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -110,6 +110,7 @@
extern Mutex* ProfilePrint_lock; // a lock used to serialize the printing of profiles
extern Mutex* ExceptionCache_lock; // a lock used to synchronize exception cache updates
extern Mutex* OsrList_lock; // a lock used to serialize access to OSR queues
+extern Mutex* NMethodSweeperStats_lock; // a lock used to serialize access to sweeper statistics
#ifndef PRODUCT
extern Mutex* FullGCALot_lock; // a lock to make FullGCALot MT safe
@@ -132,12 +133,15 @@
extern Monitor* Service_lock; // a lock used for service thread operation
extern Monitor* PeriodicTask_lock; // protects the periodic task structure
extern Monitor* RedefineClasses_lock; // locks classes from parallel redefinition
-
+extern Monitor* ThreadsSMRDelete_lock; // Used by ThreadsSMRSupport to take pressure off the Threads_lock
+extern Mutex* SharedDecoder_lock; // serializes access to the decoder during normal (not error reporting) use
+extern Mutex* DCmdFactory_lock; // serialize access to DCmdFactory information
#if INCLUDE_JFR
extern Mutex* JfrStacktrace_lock; // used to guard access to the JFR stacktrace table
extern Monitor* JfrMsg_lock; // protects JFR messaging
extern Mutex* JfrBuffer_lock; // protects JFR buffer operations
extern Mutex* JfrStream_lock; // protects JFR stream access
+extern Monitor* JfrThreadSampler_lock; // used to suspend/resume JFR thread sampler
#endif
#ifndef SUPPORTS_NATIVE_CX8
@@ -346,38 +350,4 @@
}
};
-#ifndef PRODUCT
-//
-// A special MutexLocker that allows:
-// - reentrant locking
-// - locking out of order
-//
-// Only to be used for verify code, where we can relax out dead-lock
-// detection code a bit (unsafe, but probably ok). This code is NEVER to
-// be included in a product version.
-//
-class VerifyMutexLocker: StackObj {
- private:
- Monitor * _mutex;
- bool _reentrant;
- public:
- VerifyMutexLocker(Monitor * mutex) {
- _mutex = mutex;
- _reentrant = mutex->owned_by_self();
- if (!_reentrant) {
- // We temp. disable strict safepoint checking, while we require the lock
- FlagSetting fs(StrictSafepointChecks, false);
- _mutex->lock();
- }
- }
-
- ~VerifyMutexLocker() {
- if (!_reentrant) {
- _mutex->unlock();
- }
- }
-};
-
-#endif
-
#endif // SHARE_VM_RUNTIME_MUTEXLOCKER_HPP
--- a/src/hotspot/share/runtime/objectMonitor.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/objectMonitor.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1641,7 +1641,7 @@
// This is in keeping with the "no loitering in runtime" rule.
// We periodically check to see if there's a safepoint pending.
if ((ctr & 0xFF) == 0) {
- if (SafepointMechanism::poll(Self)) {
+ if (SafepointMechanism::should_block(Self)) {
goto Abort; // abrupt spin egress
}
SpinPause();
--- a/src/hotspot/share/runtime/os.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/os.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -44,7 +44,6 @@
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvm_misc.hpp"
-#include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/frame.inline.hpp"
@@ -72,8 +71,6 @@
OSThread* os::_starting_thread = NULL;
address os::_polling_page = NULL;
-volatile int32_t* os::_mem_serialize_page = NULL;
-uintptr_t os::_serialize_page_mask = 0;
volatile unsigned int os::_rand_seed = 1;
int os::_processor_count = 0;
int os::_initial_active_processor_count = 0;
@@ -1091,14 +1088,6 @@
// Check if addr belongs to a Java thread.
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
- // Check for privilege stack
- if (thread->privileged_stack_top() != NULL &&
- thread->privileged_stack_top()->contains(addr)) {
- st->print_cr(INTPTR_FORMAT " is pointing into the privilege stack "
- "for thread: " INTPTR_FORMAT, p2i(addr), p2i(thread));
- if (verbose) thread->print_on(st);
- return;
- }
// If the addr is a java thread print information about that.
if (addr == (address)thread) {
if (verbose) {
@@ -1360,49 +1349,6 @@
return opath;
}
-void os::set_memory_serialize_page(address page) {
- int count = log2_intptr(sizeof(class JavaThread)) - log2_intptr(64);
- _mem_serialize_page = (volatile int32_t *)page;
- // We initialize the serialization page shift count here
- // We assume a cache line size of 64 bytes
- assert(SerializePageShiftCount == count, "JavaThread size changed; "
- "SerializePageShiftCount constant should be %d", count);
- set_serialize_page_mask((uintptr_t)(vm_page_size() - sizeof(int32_t)));
-}
-
-static volatile intptr_t SerializePageLock = 0;
-
-// This method is called from signal handler when SIGSEGV occurs while the current
-// thread tries to store to the "read-only" memory serialize page during state
-// transition.
-void os::block_on_serialize_page_trap() {
- log_debug(safepoint)("Block until the serialize page permission restored");
-
- // When VMThread is holding the SerializePageLock during modifying the
- // access permission of the memory serialize page, the following call
- // will block until the permission of that page is restored to rw.
- // Generally, it is unsafe to manipulate locks in signal handlers, but in
- // this case, it's OK as the signal is synchronous and we know precisely when
- // it can occur.
- Thread::muxAcquire(&SerializePageLock, "set_memory_serialize_page");
- Thread::muxRelease(&SerializePageLock);
-}
-
-// Serialize all thread state variables
-void os::serialize_thread_states() {
- // On some platforms such as Solaris & Linux, the time duration of the page
- // permission restoration is observed to be much longer than expected due to
- // scheduler starvation problem etc. To avoid the long synchronization
- // time and expensive page trap spinning, 'SerializePageLock' is used to block
- // the mutator thread if such case is encountered. See bug 6546278 for details.
- Thread::muxAcquire(&SerializePageLock, "serialize_thread_states");
- os::protect_memory((char *)os::get_memory_serialize_page(),
- os::vm_page_size(), MEM_PROT_READ);
- os::protect_memory((char *)os::get_memory_serialize_page(),
- os::vm_page_size(), MEM_PROT_RW);
- Thread::muxRelease(&SerializePageLock);
-}
-
// Returns true if the current stack pointer is above the stack shadow
// pages, false otherwise.
bool os::stack_shadow_pages_available(Thread *thread, const methodHandle& method, address sp) {
--- a/src/hotspot/share/runtime/os.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/os.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -100,8 +100,6 @@
private:
static OSThread* _starting_thread;
static address _polling_page;
- static volatile int32_t * _mem_serialize_page;
- static uintptr_t _serialize_page_mask;
public:
static size_t _page_sizes[page_sizes_max];
@@ -420,54 +418,6 @@
static bool is_readable_pointer(const void* p);
static bool is_readable_range(const void* from, const void* to);
- // Routines used to serialize the thread state without using membars
- static void serialize_thread_states();
-
- // Since we write to the serialize page from every thread, we
- // want stores to be on unique cache lines whenever possible
- // in order to minimize CPU cross talk. We pre-compute the
- // amount to shift the thread* to make this offset unique to
- // each thread.
- static int get_serialize_page_shift_count() {
- return SerializePageShiftCount;
- }
-
- static void set_serialize_page_mask(uintptr_t mask) {
- _serialize_page_mask = mask;
- }
-
- static unsigned int get_serialize_page_mask() {
- return _serialize_page_mask;
- }
-
- static void set_memory_serialize_page(address page);
-
- static address get_memory_serialize_page() {
- return (address)_mem_serialize_page;
- }
-
- static inline void write_memory_serialize_page(JavaThread *thread) {
- uintptr_t page_offset = ((uintptr_t)thread >>
- get_serialize_page_shift_count()) &
- get_serialize_page_mask();
- *(volatile int32_t *)((uintptr_t)_mem_serialize_page+page_offset) = 1;
- }
-
- static bool is_memory_serialize_page(JavaThread *thread, address addr) {
- if (UseMembar) return false;
- // Previously this function calculated the exact address of this
- // thread's serialize page, and checked if the faulting address
- // was equal. However, some platforms mask off faulting addresses
- // to the page size, so now we just check that the address is
- // within the page. This makes the thread argument unnecessary,
- // but we retain the NULL check to preserve existing behavior.
- if (thread == NULL) return false;
- address page = (address) _mem_serialize_page;
- return addr >= page && addr < (page + os::vm_page_size());
- }
-
- static void block_on_serialize_page_trap();
-
// threads
enum ThreadType {
--- a/src/hotspot/share/runtime/safepoint.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/safepoint.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -213,16 +213,7 @@
// writes and reads of both the safepoint state and the Java
// threads state is critical. In order to guarantee that the
// memory writes are serialized with respect to each other,
- // the VM thread issues a memory barrier instruction
- // (on MP systems). In order to avoid the overhead of issuing
- // a memory barrier for each Java thread making native calls, each Java
- // thread performs a write to a single memory page after changing
- // the thread state. The VM thread performs a sequence of
- // mprotect OS calls which forces all previous writes from all
- // Java threads to be serialized. This is done in the
- // os::serialize_thread_states() call. This has proven to be
- // much more efficient than executing a membar instruction
- // on every call to native code.
+ // the VM thread issues a memory barrier instruction.
// 3. Running compiled Code
// Compiled code reads a global (Safepoint Polling) page that
// is set to fault if we are trying to get to a safepoint.
@@ -251,11 +242,6 @@
}
OrderAccess::fence(); // storestore|storeload, global state -> local state
- // Flush all thread states to memory
- if (!UseMembar) {
- os::serialize_thread_states();
- }
-
if (SafepointMechanism::uses_global_page_poll()) {
// Make interpreter safepoint aware
Interpreter::notice_safepoints();
--- a/src/hotspot/share/runtime/safepointMechanism.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/safepointMechanism.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -87,17 +87,6 @@
disarm_local_poll(thread);
}
-void SafepointMechanism::initialize_serialize_page() {
- if (!UseMembar) {
- const size_t page_size = os::vm_page_size();
- char* serialize_page = os::reserve_memory(page_size, NULL, page_size);
- os::commit_memory_or_exit(serialize_page, page_size, false, "Unable to commit memory serialization page");
- log_info(os)("Memory Serialize Page address: " INTPTR_FORMAT, p2i(serialize_page));
- os::set_memory_serialize_page((address)(serialize_page));
- }
-}
-
void SafepointMechanism::initialize() {
pd_initialize();
- initialize_serialize_page();
}
--- a/src/hotspot/share/runtime/safepointMechanism.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/safepointMechanism.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -52,7 +52,6 @@
static inline void block_if_requested_local_poll(JavaThread *thread);
static void default_initialize();
- static void initialize_serialize_page();
static void pd_initialize() NOT_AIX({ default_initialize(); });
@@ -73,8 +72,8 @@
#endif
}
- // Call this method to see if this thread has depending poll and appropriate action should be taken
- static inline bool poll(Thread* thread);
+ // Call this method to see if this thread should block for a safepoint.
+ static inline bool should_block(Thread* thread);
// Blocks a thread until safepoint is completed
static inline void block_if_requested(JavaThread* thread);
--- a/src/hotspot/share/runtime/safepointMechanism.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/safepointMechanism.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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,7 +47,7 @@
}
}
-bool SafepointMechanism::poll(Thread* thread) {
+bool SafepointMechanism::should_block(Thread* thread) {
if (uses_thread_local_poll()) {
return local_poll(thread);
} else {
--- a/src/hotspot/share/runtime/serviceThread.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/serviceThread.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -29,6 +29,7 @@
#include "classfile/systemDictionary.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/javaCalls.hpp"
+#include "runtime/jniHandles.hpp"
#include "runtime/serviceThread.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/os.hpp"
@@ -80,7 +81,39 @@
}
}
+static bool needs_oopstorage_cleanup(OopStorage* const* storages,
+ bool* needs_cleanup,
+ size_t size) {
+ bool any_needs_cleanup = false;
+ for (size_t i = 0; i < size; ++i) {
+ assert(!needs_cleanup[i], "precondition");
+ if (storages[i]->needs_delete_empty_blocks()) {
+ needs_cleanup[i] = true;
+ any_needs_cleanup = true;
+ }
+ }
+ return any_needs_cleanup;
+}
+
+static void cleanup_oopstorages(OopStorage* const* storages,
+ const bool* needs_cleanup,
+ size_t size) {
+ for (size_t i = 0; i < size; ++i) {
+ if (needs_cleanup[i]) {
+ storages[i]->delete_empty_blocks();
+ }
+ }
+}
+
void ServiceThread::service_thread_entry(JavaThread* jt, TRAPS) {
+ OopStorage* const oopstorages[] = {
+ JNIHandles::global_handles(),
+ JNIHandles::weak_global_handles(),
+ StringTable::weak_storage(),
+ SystemDictionary::vm_weak_oop_storage()
+ };
+ const size_t oopstorage_count = ARRAY_SIZE(oopstorages);
+
while (true) {
bool sensors_changed = false;
bool has_jvmti_events = false;
@@ -90,6 +123,8 @@
bool symboltable_work = false;
bool resolved_method_table_work = false;
bool protection_domain_table_work = false;
+ bool oopstorage_work = false;
+ bool oopstorages_cleanup[oopstorage_count] = {}; // Zero (false) initialize.
JvmtiDeferredEvent jvmti_event;
{
// Need state transition ThreadBlockInVM so that this thread
@@ -102,7 +137,7 @@
ThreadBlockInVM tbivm(jt);
- MutexLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
+ MonitorLockerEx ml(Service_lock, Mutex::_no_safepoint_check_flag);
// Process all available work on each (outer) iteration, rather than
// only the first recognized bit of work, to avoid frequently true early
// tests from potentially starving later work. Hence the use of
@@ -114,10 +149,14 @@
(stringtable_work = StringTable::has_work()) |
(symboltable_work = SymbolTable::has_work()) |
(resolved_method_table_work = ResolvedMethodTable::has_work()) |
- (protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()))
+ (protection_domain_table_work = SystemDictionary::pd_cache_table()->has_work()) |
+ (oopstorage_work = needs_oopstorage_cleanup(oopstorages,
+ oopstorages_cleanup,
+ oopstorage_count)))
+
== 0) {
// Wait until notified that there is some work to do.
- Service_lock->wait(Mutex::_no_safepoint_check_flag);
+ ml.wait(Mutex::_no_safepoint_check_flag);
}
if (has_jvmti_events) {
@@ -156,6 +195,10 @@
if (protection_domain_table_work) {
SystemDictionary::pd_cache_table()->unlink();
}
+
+ if (oopstorage_work) {
+ cleanup_oopstorages(oopstorages, oopstorages_cleanup, oopstorage_count);
+ }
}
}
--- a/src/hotspot/share/runtime/sharedRuntime.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1351,7 +1351,7 @@
// grab lock, check for deoptimization and potentially patch caller
{
- MutexLocker ml_patch(CompiledIC_lock);
+ CompiledICLocker ml(caller_nm);
// Lock blocks for safepoint during which both nmethods can change state.
@@ -1382,7 +1382,7 @@
}
}
- } // unlock CompiledIC_lock
+ } // unlock CompiledICLocker
return callee_method;
}
@@ -1585,11 +1585,13 @@
JvmtiDynamicCodeEventCollector event_collector;
// Update inline cache to megamorphic. Skip update if we are called from interpreted.
- { MutexLocker ml_patch (CompiledIC_lock);
+ {
RegisterMap reg_map(thread, false);
frame caller_frame = thread->last_frame().sender(®_map);
CodeBlob* cb = caller_frame.cb();
CompiledMethod* caller_nm = cb->as_compiled_method_or_null();
+ CompiledICLocker ml(caller_nm);
+
if (cb->is_compiled()) {
CompiledIC* inline_cache = CompiledIC_before(((CompiledMethod*)cb), caller_frame.pc());
bool should_be_mono = false;
@@ -1647,7 +1649,7 @@
} else {
fatal("Unimplemented");
}
- } // Release CompiledIC_lock
+ } // Release CompiledICLocker
return callee_method;
}
@@ -1731,8 +1733,7 @@
// to a wrong method). It should not be performance critical, since the
// resolve is only done once.
- bool is_nmethod = caller_nm->is_nmethod();
- MutexLocker ml(CompiledIC_lock);
+ CompiledICLocker ml(caller_nm);
if (is_static_call) {
CompiledStaticCall* ssc = caller_nm->compiledStaticCall_at(call_addr);
ssc->set_to_clean();
--- a/src/hotspot/share/runtime/sweeper.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/sweeper.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -164,8 +164,6 @@
Tickspan NMethodSweeper::_peak_sweep_time; // Peak time for a full sweep
Tickspan NMethodSweeper::_peak_sweep_fraction_time; // Peak time sweeping one fraction
-Monitor* NMethodSweeper::_stat_lock = new Monitor(Mutex::special, "Sweeper::Statistics", true, Monitor::_safepoint_check_sometimes);
-
class MarkActivationClosure: public CodeBlobClosure {
public:
virtual void do_code_blob(CodeBlob* cb) {
@@ -387,13 +385,13 @@
* Handle a safepoint request
*/
void NMethodSweeper::handle_safepoint_request() {
- if (SafepointSynchronize::is_synchronizing()) {
+ JavaThread* thread = JavaThread::current();
+ if (SafepointMechanism::should_block(thread)) {
if (PrintMethodFlushing && Verbose) {
tty->print_cr("### Sweep at %d out of %d, yielding to safepoint", _seen, CodeCache::nmethod_count());
}
MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
- JavaThread* thread = JavaThread::current();
ThreadBlockInVM tbivm(thread);
thread->java_suspend_self();
}
@@ -578,7 +576,7 @@
const Ticks sweep_end_counter = Ticks::now();
const Tickspan sweep_time = sweep_end_counter - sweep_start_counter;
{
- MutexLockerEx mu(_stat_lock, Mutex::_no_safepoint_check_flag);
+ MutexLockerEx mu(NMethodSweeperStats_lock, Mutex::_no_safepoint_check_flag);
_total_time_sweeping += sweep_time;
_total_time_this_sweep += sweep_time;
_peak_sweep_fraction_time = MAX2(sweep_time, _peak_sweep_fraction_time);
@@ -673,8 +671,8 @@
// Clean up any CompiledICHolders
{
ResourceMark rm;
- MutexLocker ml_patch(CompiledIC_lock);
RelocIterator iter(nm);
+ CompiledICLocker ml(nm);
while (iter.next()) {
if (iter.type() == relocInfo::virtual_call_type) {
CompiledIC::cleanup_call_site(iter.virtual_call_reloc(), nm);
@@ -701,8 +699,8 @@
// But still remember to clean-up inline caches for alive nmethods
if (cm->is_alive()) {
// Clean inline caches that point to zombie/non-entrant/unloaded nmethods
- MutexLocker cl(CompiledIC_lock);
- cm->cleanup_inline_caches();
+ CompiledICLocker ml(cm);
+ cm->cleanup_inline_caches(false);
SWEEP(cm);
}
return result;
@@ -723,7 +721,7 @@
// Clear ICStubs to prevent back patching stubs of zombie or flushed
// nmethods during the next safepoint (see ICStub::finalize).
{
- MutexLocker cl(CompiledIC_lock);
+ CompiledICLocker ml(cm);
cm->clear_ic_stubs();
}
// Code cache state change is tracked in make_zombie()
@@ -747,8 +745,8 @@
}
} else {
// Still alive, clean up its inline caches
- MutexLocker cl(CompiledIC_lock);
- cm->cleanup_inline_caches();
+ CompiledICLocker ml(cm);
+ cm->cleanup_inline_caches(false);
SWEEP(cm);
}
} else if (cm->is_unloaded()) {
@@ -757,8 +755,8 @@
{
// Clean ICs of unloaded nmethods as well because they may reference other
// unloaded nmethods that may be flushed earlier in the sweeper cycle.
- MutexLocker cl(CompiledIC_lock);
- cm->cleanup_inline_caches();
+ CompiledICLocker ml(cm);
+ cm->cleanup_inline_caches(false);
}
if (cm->is_osr_method()) {
SWEEP(cm);
@@ -778,8 +776,8 @@
possibly_flush((nmethod*)cm);
}
// Clean inline caches that point to zombie/non-entrant/unloaded nmethods
- MutexLocker cl(CompiledIC_lock);
- cm->cleanup_inline_caches();
+ CompiledICLocker ml(cm);
+ cm->cleanup_inline_caches(false);
SWEEP(cm);
}
return result;
--- a/src/hotspot/share/runtime/sweeper.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/sweeper.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -88,8 +88,6 @@
static Tickspan _peak_sweep_time; // Peak time for a full sweep
static Tickspan _peak_sweep_fraction_time; // Peak time sweeping one fraction
- static Monitor* _stat_lock;
-
static MethodStateChange process_compiled_method(CompiledMethod *nm);
static void release_compiled_method(CompiledMethod* nm);
--- a/src/hotspot/share/runtime/synchronizer.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/synchronizer.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1528,10 +1528,6 @@
// which in turn can mean large(r) numbers of objectmonitors in circulation.
// This is an unfortunate aspect of this design.
-enum ManifestConstants {
- ClearResponsibleAtSTW = 0
-};
-
// Deflate a single monitor if not in-use
// Return true if deflated, false if in-use
bool ObjectSynchronizer::deflate_monitor(ObjectMonitor* mid, oop obj,
@@ -1544,7 +1540,6 @@
guarantee(mid->header()->is_neutral(), "invariant");
if (mid->is_busy()) {
- if (ClearResponsibleAtSTW) mid->_Responsible = NULL;
deflated = false;
} else {
// Deflate the monitor if it is no longer being used
--- a/src/hotspot/share/runtime/thread.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/thread.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -61,7 +61,6 @@
#include "prims/jvm_misc.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
-#include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/biasedLocking.hpp"
@@ -1558,7 +1557,6 @@
_on_thread_list = false;
set_thread_state(_thread_new);
_terminated = _not_terminated;
- _privileged_stack_top = NULL;
_array_for_gc = NULL;
_suspend_equivalent = false;
_in_deopt_handler = 0;
@@ -1990,7 +1988,6 @@
// These things needs to be done while we are still a Java Thread. Make sure that thread
// is in a consistent state, in case GC happens
- assert(_privileged_stack_top == NULL, "must be NULL when we get here");
if (active_handles() != NULL) {
JNIHandleBlock* block = active_handles();
@@ -2840,11 +2837,6 @@
// Record JavaThread to GC thread
RememberProcessedThread rpt(this);
- // Traverse the privileged stack
- if (_privileged_stack_top != NULL) {
- _privileged_stack_top->oops_do(f);
- }
-
// traverse the registered growable array
if (_array_for_gc != NULL) {
for (int index = 0; index < _array_for_gc->length(); index++) {
@@ -4286,7 +4278,7 @@
// queue until after the vm thread is dead. After this point,
// we'll never emerge out of the safepoint before the VM exits.
- MutexLocker ml(Heap_lock);
+ MutexLockerEx ml(Heap_lock, Mutex::_no_safepoint_check_flag);
VMThread::wait_for_vm_thread_exit();
assert(SafepointSynchronize::is_at_safepoint(), "VM thread should exit at Safepoint");
--- a/src/hotspot/share/runtime/thread.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/thread.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1882,14 +1882,9 @@
void thread_main_inner();
private:
- // PRIVILEGED STACK
- PrivilegedElement* _privileged_stack_top;
GrowableArray<oop>* _array_for_gc;
public:
- // Returns the privileged_stack information.
- PrivilegedElement* privileged_stack_top() const { return _privileged_stack_top; }
- void set_privileged_stack_top(PrivilegedElement *e) { _privileged_stack_top = e; }
void register_array_for_gc(GrowableArray<oop>* array) { _array_for_gc = array; }
public:
--- a/src/hotspot/share/runtime/threadSMR.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/threadSMR.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -36,10 +36,6 @@
#include "utilities/resourceHash.hpp"
#include "utilities/vmError.hpp"
-Monitor* ThreadsSMRSupport::_delete_lock =
- new Monitor(Monitor::special, "Thread_SMR_delete_lock",
- false /* allow_vm_block */,
- Monitor::_safepoint_check_never);
// The '_cnt', '_max' and '_times" fields are enabled via
// -XX:+EnableThreadSMRStatistics:
@@ -74,7 +70,16 @@
// isn't available everywhere (or is it?).
volatile uint ThreadsSMRSupport::_deleted_thread_times = 0;
-ThreadsList* volatile ThreadsSMRSupport::_java_thread_list = new ThreadsList(0);
+// The bootstrap list is empty and cannot be freed.
+ThreadsList ThreadsSMRSupport::_bootstrap_list = ThreadsList(0);
+
+// This is the VM's current "threads list" and it contains all of
+// the JavaThreads the VM considers to be alive at this moment in
+// time. The other ThreadsList objects in the VM contain past
+// snapshots of the "threads list". _java_thread_list is initially
+// set to _bootstrap_list so that we can detect when we have a very
+// early use of a ThreadsListHandle.
+ThreadsList* volatile ThreadsSMRSupport::_java_thread_list = &_bootstrap_list;
// # of ThreadsLists allocated over VM lifetime.
// Impl note: We allocate a new ThreadsList for every thread create and
@@ -139,6 +144,10 @@
_java_thread_list_alloc_cnt++;
}
+inline bool ThreadsSMRSupport::is_bootstrap_list(ThreadsList* list) {
+ return list == &_bootstrap_list;
+}
+
inline void ThreadsSMRSupport::update_deleted_thread_time_max(uint new_value) {
while (true) {
uint cur_value = _deleted_thread_time_max;
@@ -163,7 +172,6 @@
return (ThreadsList*)Atomic::xchg(new_list, &_java_thread_list);
}
-
// Hash table of pointers found by a scan. Used for collecting hazard
// pointers (ThreadsList references). Also used for collecting JavaThreads
// that are indirectly referenced by hazard ptrs. An instance of this
@@ -514,6 +522,11 @@
#ifdef ASSERT
assert(_list != NULL, "_list must not be NULL");
+ if (ThreadsSMRSupport::is_bootstrap_list(_list)) {
+ // We are early in VM bootstrapping so nothing to do here.
+ return;
+ }
+
// The closure will attempt to verify that the calling thread can
// be found by threads_do() on the specified ThreadsList. If it
// is successful, then the specified ThreadsList was acquired as
@@ -766,6 +779,13 @@
void ThreadsSMRSupport::free_list(ThreadsList* threads) {
assert_locked_or_safepoint(Threads_lock);
+ if (is_bootstrap_list(threads)) {
+ // The bootstrap list cannot be freed and is empty so
+ // it does not need to be scanned. Nothing to do here.
+ log_debug(thread, smr)("tid=" UINTX_FORMAT ": ThreadsSMRSupport::free_list: bootstrap ThreadsList=" INTPTR_FORMAT " is no longer in use.", os::current_thread_id(), p2i(threads));
+ return;
+ }
+
threads->set_next_list(_to_delete_list);
_to_delete_list = threads;
if (EnableThreadSMRStatistics) {
--- a/src/hotspot/share/runtime/threadSMR.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/threadSMR.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -91,7 +91,8 @@
// The coordination between ThreadsSMRSupport::release_stable_list() and
// ThreadsSMRSupport::smr_delete() uses the delete_lock in order to
// reduce the traffic on the Threads_lock.
- static Monitor* _delete_lock;
+ static Monitor* delete_lock() { return ThreadsSMRDelete_lock; }
+
// The '_cnt', '_max' and '_times" fields are enabled via
// -XX:+EnableThreadSMRStatistics (see thread.cpp for a
// description about each field):
@@ -104,6 +105,7 @@
static volatile uint _deleted_thread_cnt;
static volatile uint _deleted_thread_time_max;
static volatile uint _deleted_thread_times;
+ static ThreadsList _bootstrap_list;
static ThreadsList* volatile _java_thread_list;
static uint64_t _java_thread_list_alloc_cnt;
static uint64_t _java_thread_list_free_cnt;
@@ -121,7 +123,6 @@
static void add_deleted_thread_times(uint add_value);
static void add_tlh_times(uint add_value);
static void clear_delete_notify();
- static Monitor* delete_lock() { return _delete_lock; }
static bool delete_notify();
static void free_list(ThreadsList* threads);
static void inc_deleted_thread_cnt();
@@ -142,6 +143,7 @@
static void add_thread(JavaThread *thread);
static ThreadsList* get_java_thread_list();
static bool is_a_protected_JavaThread_with_lock(JavaThread *thread);
+ static bool is_bootstrap_list(ThreadsList* list);
static void remove_thread(JavaThread *thread);
static void smr_delete(JavaThread *thread);
static void update_tlh_stats(uint millis);
--- a/src/hotspot/share/runtime/vframe_hp.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/vframe_hp.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -102,7 +102,8 @@
}
void compiledVFrame::update_deferred_value(BasicType type, int index, jvalue value) {
- assert(fr().is_deoptimized_frame(), "frame must be scheduled for deoptimization");
+ assert(fr().is_deoptimized_frame() || thread()->must_deopt_id() == fr().id(),
+ "frame must be scheduled for deoptimization");
GrowableArray<jvmtiDeferredLocalVariableSet*>* deferred = thread()->deferred_locals();
jvmtiDeferredLocalVariableSet* locals = NULL;
if (deferred != NULL ) {
--- a/src/hotspot/share/runtime/vmThread.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/runtime/vmThread.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -319,7 +319,9 @@
// Notify the VMThread that the last non-daemon JavaThread has terminated,
// and wait until operation is performed.
void VMThread::wait_for_vm_thread_exit() {
- { MutexLocker mu(VMOperationQueue_lock);
+ assert(Thread::current()->is_Java_thread(), "Should be a JavaThread");
+ assert(((JavaThread*)Thread::current())->is_terminated(), "Should be terminated");
+ { MutexLockerEx mu(VMOperationQueue_lock, Mutex::_no_safepoint_check_flag);
_should_terminate = true;
VMOperationQueue_lock->notify();
}
--- a/src/hotspot/share/services/diagnosticFramework.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/services/diagnosticFramework.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -491,11 +491,10 @@
}
}
-Mutex* DCmdFactory::_dcmdFactory_lock = new Mutex(Mutex::leaf, "DCmdFactory", true, Monitor::_safepoint_check_never);
bool DCmdFactory::_send_jmx_notification = false;
DCmdFactory* DCmdFactory::factory(DCmdSource source, const char* name, size_t len) {
- MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag);
+ MutexLockerEx ml(DCmdFactory_lock, Mutex::_no_safepoint_check_flag);
DCmdFactory* factory = _DCmdFactoryList;
while (factory != NULL) {
if (strlen(factory->name()) == len &&
@@ -512,7 +511,7 @@
}
int DCmdFactory::register_DCmdFactory(DCmdFactory* factory) {
- MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag);
+ MutexLockerEx ml(DCmdFactory_lock, Mutex::_no_safepoint_check_flag);
factory->_next = _DCmdFactoryList;
_DCmdFactoryList = factory;
if (_send_jmx_notification && !factory->_hidden
@@ -537,7 +536,7 @@
}
GrowableArray<const char*>* DCmdFactory::DCmd_list(DCmdSource source) {
- MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag);
+ MutexLockerEx ml(DCmdFactory_lock, Mutex::_no_safepoint_check_flag);
GrowableArray<const char*>* array = new GrowableArray<const char*>();
DCmdFactory* factory = _DCmdFactoryList;
while (factory != NULL) {
@@ -550,7 +549,7 @@
}
GrowableArray<DCmdInfo*>* DCmdFactory::DCmdInfo_list(DCmdSource source ) {
- MutexLockerEx ml(_dcmdFactory_lock, Mutex::_no_safepoint_check_flag);
+ MutexLockerEx ml(DCmdFactory_lock, Mutex::_no_safepoint_check_flag);
GrowableArray<DCmdInfo*>* array = new GrowableArray<DCmdInfo*>();
DCmdFactory* factory = _DCmdFactoryList;
while (factory != NULL) {
--- a/src/hotspot/share/services/diagnosticFramework.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/services/diagnosticFramework.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -344,7 +344,6 @@
// management.cpp)
class DCmdFactory: public CHeapObj<mtInternal> {
private:
- static Mutex* _dcmdFactory_lock;
static bool _send_jmx_notification;
static bool _has_pending_jmx_notification;
static DCmdFactory* _DCmdFactoryList;
--- a/src/hotspot/share/services/writeableFlags.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/services/writeableFlags.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -116,7 +116,7 @@
JVMFlag::Error WriteableFlags::set_int_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
int value;
- if (sscanf(arg, "%d", &value)) {
+ if (sscanf(arg, "%d", &value) == 1) {
return set_int_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an integer");
@@ -133,7 +133,7 @@
JVMFlag::Error WriteableFlags::set_uint_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
uint value;
- if (sscanf(arg, "%u", &value)) {
+ if (sscanf(arg, "%u", &value) == 1) {
return set_uint_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an unsigned integer");
@@ -150,7 +150,7 @@
JVMFlag::Error WriteableFlags::set_intx_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
intx value;
- if (sscanf(arg, INTX_FORMAT, &value)) {
+ if (sscanf(arg, INTX_FORMAT, &value) == 1) {
return set_intx_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an integer");
@@ -167,7 +167,7 @@
JVMFlag::Error WriteableFlags::set_uintx_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
uintx value;
- if (sscanf(arg, UINTX_FORMAT, &value)) {
+ if (sscanf(arg, UINTX_FORMAT, &value) == 1) {
return set_uintx_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an unsigned integer");
@@ -184,7 +184,7 @@
JVMFlag::Error WriteableFlags::set_uint64_t_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
uint64_t value;
- if (sscanf(arg, UINT64_FORMAT, &value)) {
+ if (sscanf(arg, UINT64_FORMAT, &value) == 1) {
return set_uint64_t_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an unsigned 64-bit integer");
@@ -201,7 +201,7 @@
JVMFlag::Error WriteableFlags::set_size_t_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
size_t value;
- if (sscanf(arg, SIZE_FORMAT, &value)) {
+ if (sscanf(arg, SIZE_FORMAT, &value) == 1) {
return set_size_t_flag(name, value, origin, err_msg);
}
err_msg.print("flag value must be an unsigned integer");
@@ -214,6 +214,23 @@
return err;
}
+// set a double global flag
+JVMFlag::Error WriteableFlags::set_double_flag(const char* name, const char* arg, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
+ double value;
+
+ if (sscanf(arg, "%lf", &value) == 1) {
+ return set_double_flag(name, value, origin, err_msg);
+ }
+ err_msg.print("flag value must be a double");
+ return JVMFlag::WRONG_FORMAT;
+}
+
+JVMFlag::Error WriteableFlags::set_double_flag(const char* name, double value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
+ JVMFlag::Error err = JVMFlag::doubleAtPut(name, &value, origin);
+ print_flag_error_message_if_needed(err, name, err_msg);
+ return err;
+}
+
// set a string global flag using value from AttachOperation
JVMFlag::Error WriteableFlags::set_ccstr_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg) {
JVMFlag::Error err = JVMFlag::ccstrAtPut((char*)name, &value, origin);
@@ -286,6 +303,8 @@
return set_uint64_t_flag(f->_name, flag_value, origin, err_msg);
} else if (f->is_size_t()) {
return set_size_t_flag(f->_name, flag_value, origin, err_msg);
+ } else if (f->is_double()) {
+ return set_double_flag(f->_name, flag_value, origin, err_msg);
} else if (f->is_ccstr()) {
return set_ccstr_flag(f->_name, flag_value, origin, err_msg);
} else {
@@ -319,6 +338,9 @@
} else if (f->is_size_t()) {
size_t svalue = (size_t)new_value.j;
return set_size_t_flag(f->_name, svalue, origin, err_msg);
+ } else if (f->is_double()) {
+ double dvalue = (double)new_value.d;
+ return set_double_flag(f->_name, dvalue, origin, err_msg);
} else if (f->is_ccstr()) {
oop str = JNIHandles::resolve_external_guard(new_value.l);
if (str == NULL) {
--- a/src/hotspot/share/services/writeableFlags.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/services/writeableFlags.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -52,6 +52,8 @@
static JVMFlag::Error set_uint64_t_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
// set a size_t global flag using value from AttachOperation
static JVMFlag::Error set_size_t_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
+ // set a double global flag using value from AttachOperation
+ static JVMFlag::Error set_double_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
// set a boolean global flag
static JVMFlag::Error set_bool_flag(const char* name, bool value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
// set a int global flag
@@ -66,6 +68,8 @@
static JVMFlag::Error set_uint64_t_flag(const char* name, uint64_t value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
// set a size_t global flag using value from AttachOperation
static JVMFlag::Error set_size_t_flag(const char* name, size_t value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
+ // set a double global flag using value from AttachOperation
+ static JVMFlag::Error set_double_flag(const char* name, double value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
// set a string global flag
static JVMFlag::Error set_ccstr_flag(const char* name, const char* value, JVMFlag::Flags origin, FormatBuffer<80>& err_msg);
--- a/src/hotspot/share/utilities/bitMap.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/bitMap.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -263,14 +263,24 @@
}
}
+bool BitMap::is_small_range_of_words(idx_t beg_full_word, idx_t end_full_word) {
+ // There is little point to call large version on small ranges.
+ // Need to check carefully, keeping potential idx_t underflow in mind.
+ // The threshold should be at least one word.
+ STATIC_ASSERT(small_range_words >= 1);
+ return (beg_full_word + small_range_words >= end_full_word);
+}
+
void BitMap::set_large_range(idx_t beg, idx_t end) {
verify_range(beg, end);
idx_t beg_full_word = word_index_round_up(beg);
idx_t end_full_word = word_index(end);
- assert(end_full_word - beg_full_word >= 32,
- "the range must include at least 32 bytes");
+ if (is_small_range_of_words(beg_full_word, end_full_word)) {
+ set_range(beg, end);
+ return;
+ }
// The range includes at least one full word.
set_range_within_word(beg, bit_index(beg_full_word));
@@ -284,7 +294,7 @@
idx_t beg_full_word = word_index_round_up(beg);
idx_t end_full_word = word_index(end);
- if (end_full_word - beg_full_word < 32) {
+ if (is_small_range_of_words(beg_full_word, end_full_word)) {
clear_range(beg, end);
return;
}
@@ -368,8 +378,10 @@
idx_t beg_full_word = word_index_round_up(beg);
idx_t end_full_word = word_index(end);
- assert(end_full_word - beg_full_word >= 32,
- "the range must include at least 32 bytes");
+ if (is_small_range_of_words(beg_full_word, end_full_word)) {
+ par_at_put_range(beg, end, value);
+ return;
+ }
// The range includes at least one full word.
par_put_range_within_word(beg, bit_index(beg_full_word), value);
--- a/src/hotspot/share/utilities/bitMap.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/bitMap.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -61,6 +61,21 @@
bm_word_t* _map; // First word in bitmap
idx_t _size; // Size of bitmap (in bits)
+ // Helper for get_next_{zero,one}_bit variants.
+ // - flip designates whether searching for 1s or 0s. Must be one of
+ // find_{zeros,ones}_flip.
+ // - aligned_right is true if r_index is a priori on a bm_word_t boundary.
+ template<bm_word_t flip, bool aligned_right>
+ inline idx_t get_next_bit_impl(idx_t l_index, idx_t r_index) const;
+
+ // Values for get_next_bit_impl flip parameter.
+ static const bm_word_t find_ones_flip = 0;
+ static const bm_word_t find_zeros_flip = ~(bm_word_t)0;
+
+ // Threshold for performing small range operation, even when large range
+ // operation was requested. Measured in words.
+ static const size_t small_range_words = 32;
+
protected:
// Return the position of bit within the word that contains it (e.g., if
// bitmap words are 32 bits, return a number 0 <= n <= 31).
@@ -106,6 +121,8 @@
static void clear_range_of_words(bm_word_t* map, idx_t beg, idx_t end);
+ static bool is_small_range_of_words(idx_t beg_full_word, idx_t end_full_word);
+
// The index of the first full word in a range.
idx_t word_index_round_up(idx_t bit) const;
--- a/src/hotspot/share/utilities/bitMap.inline.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/bitMap.inline.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -27,6 +27,7 @@
#include "runtime/atomic.hpp"
#include "utilities/bitMap.hpp"
+#include "utilities/count_trailing_zeros.hpp"
inline void BitMap::set_bit(idx_t bit) {
verify_index(bit);
@@ -141,152 +142,84 @@
}
}
+template<BitMap::bm_word_t flip, bool aligned_right>
+inline BitMap::idx_t BitMap::get_next_bit_impl(idx_t l_index, idx_t r_index) const {
+ STATIC_ASSERT(flip == find_ones_flip || flip == find_zeros_flip);
+ verify_range(l_index, r_index);
+ assert(!aligned_right || is_word_aligned(r_index), "r_index not aligned");
+
+ // The first word often contains an interesting bit, either due to
+ // density or because of features of the calling algorithm. So it's
+ // important to examine that first word with a minimum of fuss,
+ // minimizing setup time for later words that will be wasted if the
+ // first word is indeed interesting.
+
+ // The benefit from aligned_right being true is relatively small.
+ // It saves a couple instructions in the setup for the word search
+ // loop. It also eliminates the range check on the final result.
+ // However, callers often have a comparison with r_index, and
+ // inlining often allows the two comparisons to be combined; it is
+ // important when !aligned_right that return paths either return
+ // r_index or a value dominated by a comparison with r_index.
+ // aligned_right is still helpful when the caller doesn't have a
+ // range check because features of the calling algorithm guarantee
+ // an interesting bit will be present.
+
+ if (l_index < r_index) {
+ // Get the word containing l_index, and shift out low bits.
+ idx_t index = word_index(l_index);
+ bm_word_t cword = (map(index) ^ flip) >> bit_in_word(l_index);
+ if ((cword & 1) != 0) {
+ // The first bit is similarly often interesting. When it matters
+ // (density or features of the calling algorithm make it likely
+ // the first bit is set), going straight to the next clause compares
+ // poorly with doing this check first; count_trailing_zeros can be
+ // relatively expensive, plus there is the additional range check.
+ // But when the first bit isn't set, the cost of having tested for
+ // it is relatively small compared to the rest of the search.
+ return l_index;
+ } else if (cword != 0) {
+ // Flipped and shifted first word is non-zero.
+ idx_t result = l_index + count_trailing_zeros(cword);
+ if (aligned_right || (result < r_index)) return result;
+ // Result is beyond range bound; return r_index.
+ } else {
+ // Flipped and shifted first word is zero. Word search through
+ // aligned up r_index for a non-zero flipped word.
+ idx_t limit = aligned_right
+ ? word_index(r_index)
+ : (word_index(r_index - 1) + 1); // Align up, knowing r_index > 0.
+ while (++index < limit) {
+ cword = map(index) ^ flip;
+ if (cword != 0) {
+ idx_t result = bit_index(index) + count_trailing_zeros(cword);
+ if (aligned_right || (result < r_index)) return result;
+ // Result is beyond range bound; return r_index.
+ assert((index + 1) == limit, "invariant");
+ break;
+ }
+ }
+ // No bits in range; return r_index.
+ }
+ }
+ return r_index;
+}
+
inline BitMap::idx_t
BitMap::get_next_one_offset(idx_t l_offset, idx_t r_offset) const {
- assert(l_offset <= size(), "BitMap index out of bounds");
- assert(r_offset <= size(), "BitMap index out of bounds");
- assert(l_offset <= r_offset, "l_offset > r_offset ?");
-
- if (l_offset == r_offset) {
- return l_offset;
- }
- idx_t index = word_index(l_offset);
- idx_t r_index = word_index(r_offset-1) + 1;
- idx_t res_offset = l_offset;
-
- // check bits including and to the _left_ of offset's position
- idx_t pos = bit_in_word(res_offset);
- bm_word_t res = map(index) >> pos;
- if (res != 0) {
- // find the position of the 1-bit
- for (; !(res & 1); res_offset++) {
- res = res >> 1;
- }
-
-#ifdef ASSERT
- // In the following assert, if r_offset is not bitamp word aligned,
- // checking that res_offset is strictly less than r_offset is too
- // strong and will trip the assert.
- //
- // Consider the case where l_offset is bit 15 and r_offset is bit 17
- // of the same map word, and where bits [15:16:17:18] == [00:00:00:01].
- // All the bits in the range [l_offset:r_offset) are 0.
- // The loop that calculates res_offset, above, would yield the offset
- // of bit 18 because it's in the same map word as l_offset and there
- // is a set bit in that map word above l_offset (i.e. res != NoBits).
- //
- // In this case, however, we can assert is that res_offset is strictly
- // less than size() since we know that there is at least one set bit
- // at an offset above, but in the same map word as, r_offset.
- // Otherwise, if r_offset is word aligned then it will not be in the
- // same map word as l_offset (unless it equals l_offset). So either
- // there won't be a set bit between l_offset and the end of it's map
- // word (i.e. res == NoBits), or res_offset will be less than r_offset.
-
- idx_t limit = is_word_aligned(r_offset) ? r_offset : size();
- assert(res_offset >= l_offset && res_offset < limit, "just checking");
-#endif // ASSERT
- return MIN2(res_offset, r_offset);
- }
- // skip over all word length 0-bit runs
- for (index++; index < r_index; index++) {
- res = map(index);
- if (res != 0) {
- // found a 1, return the offset
- for (res_offset = bit_index(index); !(res & 1); res_offset++) {
- res = res >> 1;
- }
- assert(res & 1, "tautology; see loop condition");
- assert(res_offset >= l_offset, "just checking");
- return MIN2(res_offset, r_offset);
- }
- }
- return r_offset;
+ return get_next_bit_impl<find_ones_flip, false>(l_offset, r_offset);
}
inline BitMap::idx_t
BitMap::get_next_zero_offset(idx_t l_offset, idx_t r_offset) const {
- assert(l_offset <= size(), "BitMap index out of bounds");
- assert(r_offset <= size(), "BitMap index out of bounds");
- assert(l_offset <= r_offset, "l_offset > r_offset ?");
-
- if (l_offset == r_offset) {
- return l_offset;
- }
- idx_t index = word_index(l_offset);
- idx_t r_index = word_index(r_offset-1) + 1;
- idx_t res_offset = l_offset;
-
- // check bits including and to the _left_ of offset's position
- idx_t pos = bit_in_word(res_offset);
- bm_word_t res = ~map(index) >> pos; // flip bits and shift for l_offset
-
- if (res != 0) {
- // find the position of the 1-bit
- for (; !(res & 1); res_offset++) {
- res = res >> 1;
- }
- assert(res_offset >= l_offset, "just checking");
- return MIN2(res_offset, r_offset);
- }
- // skip over all word length 1-bit runs
- for (index++; index < r_index; index++) {
- res = map(index);
- if (res != ~(bm_word_t)0) {
- // found a 0, return the offset
- for (res_offset = index << LogBitsPerWord; res & 1;
- res_offset++) {
- res = res >> 1;
- }
- assert(!(res & 1), "tautology; see loop condition");
- assert(res_offset >= l_offset, "just checking");
- return MIN2(res_offset, r_offset);
- }
- }
- return r_offset;
+ return get_next_bit_impl<find_zeros_flip, false>(l_offset, r_offset);
}
inline BitMap::idx_t
-BitMap::get_next_one_offset_aligned_right(idx_t l_offset, idx_t r_offset) const
-{
- verify_range(l_offset, r_offset);
- assert(bit_in_word(r_offset) == 0, "r_offset not word-aligned");
-
- if (l_offset == r_offset) {
- return l_offset;
- }
- idx_t index = word_index(l_offset);
- idx_t r_index = word_index(r_offset);
- idx_t res_offset = l_offset;
-
- // check bits including and to the _left_ of offset's position
- bm_word_t res = map(index) >> bit_in_word(res_offset);
- if (res != 0) {
- // find the position of the 1-bit
- for (; !(res & 1); res_offset++) {
- res = res >> 1;
- }
- assert(res_offset >= l_offset &&
- res_offset < r_offset, "just checking");
- return res_offset;
- }
- // skip over all word length 0-bit runs
- for (index++; index < r_index; index++) {
- res = map(index);
- if (res != 0) {
- // found a 1, return the offset
- for (res_offset = bit_index(index); !(res & 1); res_offset++) {
- res = res >> 1;
- }
- assert(res & 1, "tautology; see loop condition");
- assert(res_offset >= l_offset && res_offset < r_offset, "just checking");
- return res_offset;
- }
- }
- return r_offset;
+BitMap::get_next_one_offset_aligned_right(idx_t l_offset, idx_t r_offset) const {
+ return get_next_bit_impl<find_ones_flip, true>(l_offset, r_offset);
}
-
// Returns a bit mask for a range of bits [beg, end) within a single word. Each
// bit in the mask is 0 if the bit is in the range, 1 if not in the range. The
// returned mask can be used directly to clear the range, or inverted to set the
@@ -304,10 +237,12 @@
}
inline void BitMap::set_large_range_of_words(idx_t beg, idx_t end) {
+ assert(beg <= end, "underflow");
memset(_map + beg, ~(unsigned char)0, (end - beg) * sizeof(bm_word_t));
}
inline void BitMap::clear_large_range_of_words(idx_t beg, idx_t end) {
+ assert(beg <= end, "underflow");
memset(_map + beg, 0, (end - beg) * sizeof(bm_word_t));
}
--- a/src/hotspot/share/utilities/debug.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/debug.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -37,7 +37,6 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
-#include "prims/privilegedStack.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/flags/flagSetting.hpp"
--- a/src/hotspot/share/utilities/decoder.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/decoder.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -41,14 +41,9 @@
AbstractDecoder* Decoder::_shared_decoder = NULL;
AbstractDecoder* Decoder::_error_handler_decoder = NULL;
NullDecoder Decoder::_do_nothing_decoder;
-Mutex* Decoder::_shared_decoder_lock = new Mutex(Mutex::native,
- "SharedDecoderLock",
- false,
- Monitor::_safepoint_check_never);
AbstractDecoder* Decoder::get_shared_instance() {
- assert(_shared_decoder_lock != NULL && _shared_decoder_lock->owned_by_self(),
- "Require DecoderLock to enter");
+ assert(shared_decoder_lock()->owned_by_self(), "Require DecoderLock to enter");
if (_shared_decoder == NULL) {
_shared_decoder = create_decoder();
@@ -89,21 +84,22 @@
DecoderLocker::DecoderLocker() :
MutexLockerEx(DecoderLocker::is_first_error_thread() ?
- NULL : Decoder::shared_decoder_lock(), true) {
+ NULL : Decoder::shared_decoder_lock(),
+ Mutex::_no_safepoint_check_flag) {
_decoder = is_first_error_thread() ?
Decoder::get_error_handler_instance() : Decoder::get_shared_instance();
assert(_decoder != NULL, "null decoder");
}
Mutex* Decoder::shared_decoder_lock() {
- assert(_shared_decoder_lock != NULL, "Just check");
- return _shared_decoder_lock;
+ assert(SharedDecoder_lock != NULL, "Just check");
+ return SharedDecoder_lock;
}
bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const char* modulepath, bool demangle) {
- assert(_shared_decoder_lock != NULL, "Just check");
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
- MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
+ MutexLockerEx locker(error_handling_thread ? NULL : shared_decoder_lock(),
+ Mutex::_no_safepoint_check_flag);
AbstractDecoder* decoder = error_handling_thread ?
get_error_handler_instance(): get_shared_instance();
assert(decoder != NULL, "null decoder");
@@ -112,9 +108,9 @@
}
bool Decoder::decode(address addr, char* buf, int buflen, int* offset, const void* base) {
- assert(_shared_decoder_lock != NULL, "Just check");
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
- MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
+ MutexLockerEx locker(error_handling_thread ? NULL : shared_decoder_lock(),
+ Mutex::_no_safepoint_check_flag);
AbstractDecoder* decoder = error_handling_thread ?
get_error_handler_instance(): get_shared_instance();
assert(decoder != NULL, "null decoder");
@@ -124,9 +120,9 @@
bool Decoder::demangle(const char* symbol, char* buf, int buflen) {
- assert(_shared_decoder_lock != NULL, "Just check");
bool error_handling_thread = os::current_thread_id() == VMError::first_error_tid;
- MutexLockerEx locker(error_handling_thread ? NULL : _shared_decoder_lock, true);
+ MutexLockerEx locker(error_handling_thread ? NULL : shared_decoder_lock(),
+ Mutex::_no_safepoint_check_flag);
AbstractDecoder* decoder = error_handling_thread ?
get_error_handler_instance(): get_shared_instance();
assert(decoder != NULL, "null decoder");
--- a/src/hotspot/share/utilities/decoder.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/decoder.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -131,7 +131,6 @@
static NullDecoder _do_nothing_decoder;
protected:
- static Mutex* _shared_decoder_lock;
static Mutex* shared_decoder_lock();
friend class DecoderLocker;
--- a/src/hotspot/share/utilities/globalCounter.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/globalCounter.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -61,11 +61,6 @@
// Atomic::add must provide fence since we have storeload dependency.
uintx gbl_cnt = Atomic::add(COUNTER_INCREMENT, &_global_counter._counter);
- // Handle bootstrap
- if (Threads::number_of_threads() == 0) {
- return;
- }
-
// Do all RCU threads.
CounterThreadCheck ctc(gbl_cnt);
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
--- a/src/hotspot/share/utilities/globalDefinitions.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/globalDefinitions.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -164,15 +164,6 @@
// Size of a char[] needed to represent a jint as a string in decimal.
const int jintAsStringSize = 12;
-// In fact this should be
-// log2_intptr(sizeof(class JavaThread)) - log2_intptr(64);
-// see os::set_memory_serialize_page()
-#ifdef _LP64
-const int SerializePageShiftCount = 4;
-#else
-const int SerializePageShiftCount = 3;
-#endif
-
// An opaque struct of heap-word width, so that HeapWord* can be a generic
// pointer into the heap. We require that object sizes be measured in
// units of heap words, so that that
@@ -925,7 +916,6 @@
class ConstantValue;
class IllegalValue;
-class PrivilegedElement;
class MonitorArray;
class MonitorInfo;
--- a/src/hotspot/share/utilities/hashtable.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/hashtable.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -97,67 +97,6 @@
return entry;
}
-// Check to see if the hashtable is unbalanced. The caller set a flag to
-// rehash at the next safepoint. If this bucket is 60 times greater than the
-// expected average bucket length, it's an unbalanced hashtable.
-// This is somewhat an arbitrary heuristic but if one bucket gets to
-// rehash_count which is currently 100, there's probably something wrong.
-
-template <class T, MEMFLAGS F> bool RehashableHashtable<T, F>::check_rehash_table(int count) {
- assert(this->table_size() != 0, "underflow");
- if (count > (((double)this->number_of_entries()/(double)this->table_size())*rehash_multiple)) {
- // Set a flag for the next safepoint, which should be at some guaranteed
- // safepoint interval.
- return true;
- }
- return false;
-}
-
-// Create a new table and using alternate hash code, populate the new table
-// with the existing elements. This can be used to change the hash code
-// and could in the future change the size of the table.
-
-template <class T, MEMFLAGS F> void RehashableHashtable<T, F>::move_to(RehashableHashtable<T, F>* new_table) {
-
- // Initialize the global seed for hashing.
- _seed = AltHashing::compute_seed();
- assert(seed() != 0, "shouldn't be zero");
-
- int saved_entry_count = this->number_of_entries();
-
- // Iterate through the table and create a new entry for the new table
- for (int i = 0; i < new_table->table_size(); ++i) {
- for (HashtableEntry<T, F>* p = this->bucket(i); p != NULL; ) {
- HashtableEntry<T, F>* next = p->next();
- T string = p->literal();
- // Use alternate hashing algorithm on the symbol in the first table
- unsigned int hashValue = string->new_hash(seed());
- // Get a new index relative to the new table (can also change size)
- int index = new_table->hash_to_index(hashValue);
- p->set_hash(hashValue);
- // Keep the shared bit in the Hashtable entry to indicate that this entry
- // can't be deleted. The shared bit is the LSB in the _next field so
- // walking the hashtable past these entries requires
- // BasicHashtableEntry::make_ptr() call.
- bool keep_shared = p->is_shared();
- this->unlink_entry(p);
- new_table->add_entry(index, p);
- if (keep_shared) {
- p->set_shared();
- }
- p = next;
- }
- }
- // give the new table the free list as well
- new_table->copy_freelist(this);
-
- // Destroy memory used by the buckets in the hashtable. The memory
- // for the elements has been used in a new table and is not
- // destroyed. The memory reuse will benefit resizing the SystemDictionary
- // to avoid a memory allocation spike at safepoint.
- BasicHashtable<F>::free_buckets();
-}
-
template <MEMFLAGS F> void BasicHashtable<F>::free_buckets() {
if (NULL != _buckets) {
// Don't delete the buckets in the shared space. They aren't
@@ -452,8 +391,6 @@
template class HashtableEntry<nmethod*, mtGC>;
template class BasicHashtable<mtGC>;
template class Hashtable<ConstantPool*, mtClass>;
-template class RehashableHashtable<Symbol*, mtSymbol>;
-template class RehashableHashtable<oop, mtSymbol>;
template class Hashtable<Symbol*, mtSymbol>;
template class Hashtable<Klass*, mtClass>;
template class Hashtable<InstanceKlass*, mtClass>;
--- a/src/hotspot/share/utilities/hashtable.hpp Mon Nov 12 10:55:49 2018 +0530
+++ b/src/hotspot/share/utilities/hashtable.hpp Mon Nov 12 11:10:16 2018 +0530
@@ -285,38 +285,4 @@
}
};
-template <class T, MEMFLAGS F> class RehashableHashtable : public Hashtable<T, F> {
- friend class VMStructs;
- protected:
-
- enum {
- rehash_count = 100,
- rehash_multiple = 60
- };
-
- // Check that the table is unbalanced
- bool check_rehash_table(int count);
-
- public:
- RehashableHashtable(int table_size, int entry_size)
- : Hashtable<T, F>(table_size, entry_size) { }
-
- RehashableHashtable(int table_size, int entry_size,
- HashtableBucket<F>* buckets, int number_of_entries)
- : Hashtable<T, F>(table_size, entry_size, buckets, number_of_entries) { }
-
-
- // Function to move these elements into the new table.
- void move_to(RehashableHashtable<T, F>* new_table);
- static bool use_alternate_hashcode();
- static juint seed();
-
- private:
- static juint _seed;
-};
-
-template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::_seed = 0;
-template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::seed() { return _seed; };
-template <class T, MEMFLAGS F> bool RehashableHashtable<T, F>::use_alternate_hashcode() { return _seed != 0; };
-
#endif // SHARE_VM_UTILITIES_HASHTABLE_HPP
--- a/src/hotspot/share/utilities/internalVMTests.cpp Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-
-#ifndef PRODUCT
-#include <locale.h>
-
-#include "utilities/internalVMTests.hpp"
-#include "utilities/macros.hpp"
-#include "utilities/ostream.hpp"
-
-#define run_unit_test(unit_test_function_call) \
- void unit_test_function_call(); \
- run_test(#unit_test_function_call, unit_test_function_call);
-
-void InternalVMTests::run_test(const char* name, void (*test)()) {
- tty->print_cr("Running test: %s", name);
- test();
-}
-
-void InternalVMTests::run() {
- tty->print_cr("Running internal VM tests");
- run_unit_test(TestReserveMemorySpecial_test);
- tty->print_cr("All internal VM tests passed");
-}
-
-#endif
--- a/src/hotspot/share/utilities/internalVMTests.hpp Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP
-#define SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP
-
-#ifndef PRODUCT
-
-#include "memory/allocation.hpp"
-
-class InternalVMTests : public AllStatic {
- static void run_test(const char* name, void (*test)());
- public:
- static void run();
-};
-
-#endif
-
-#endif // SHARE_VM_UTILITIES_INTERNALVMTESTS_HPP
--- a/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/com/sun/crypto/provider/SealedObjectForKeyProtector.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
package com.sun.crypto.provider;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import java.io.*;
import java.security.*;
--- a/src/java.base/share/classes/java/io/Console.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/Console.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -27,8 +27,8 @@
import java.util.*;
import java.nio.charset.Charset;
-import jdk.internal.misc.JavaIOAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOAccess;
+import jdk.internal.access.SharedSecrets;
import sun.nio.cs.StreamDecoder;
import sun.nio.cs.StreamEncoder;
--- a/src/java.base/share/classes/java/io/DeleteOnExitHook.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/DeleteOnExitHook.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
package java.io;
import java.util.*;
-import java.io.File;
-import jdk.internal.misc.SharedSecrets;
+
+import jdk.internal.access.SharedSecrets;
/**
* This class holds a set of filenames to be deleted on VM exit through a shutdown hook.
--- a/src/java.base/share/classes/java/io/FileCleanable.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/FileCleanable.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,8 +25,8 @@
package java.io;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.CleanerFactory;
import jdk.internal.ref.PhantomCleanable;
--- a/src/java.base/share/classes/java/io/FileDescriptor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/FileDescriptor.java Mon Nov 12 11:10:16 2018 +0530
@@ -29,8 +29,8 @@
import java.util.List;
import java.util.Objects;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.PhantomCleanable;
/**
--- a/src/java.base/share/classes/java/io/FileOutputStream.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/FileOutputStream.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,8 +26,8 @@
package java.io;
import java.nio.channels.FileChannel;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
import sun.nio.ch.FileChannelImpl;
--- a/src/java.base/share/classes/java/io/FilePermission.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/FilePermission.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -34,8 +34,8 @@
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
-import jdk.internal.misc.JavaIOFilePermissionAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFilePermissionAccess;
+import jdk.internal.access.SharedSecrets;
import sun.nio.fs.DefaultFileSystemProvider;
import sun.security.action.GetPropertyAction;
import sun.security.util.FilePermCompat;
--- a/src/java.base/share/classes/java/io/ObjectInputFilter.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -34,7 +34,7 @@
import java.util.Optional;
import java.util.function.Function;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* Filter classes, array lengths, and graph metrics during deserialization.
--- a/src/java.base/share/classes/java/io/ObjectInputStream.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/ObjectInputStream.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -44,7 +44,7 @@
import static java.io.ObjectStreamClass.processQueue;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.Unsafe;
import sun.reflect.misc.ReflectUtil;
--- a/src/java.base/share/classes/java/io/ObjectStreamClass.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/ObjectStreamClass.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -57,9 +57,9 @@
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import jdk.internal.reflect.ReflectionFactory;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
import sun.reflect.misc.ReflectUtil;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaSecurityAccess;
import static java.io.ObjectStreamField.*;
/**
--- a/src/java.base/share/classes/java/io/RandomAccessFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/io/RandomAccessFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, 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
@@ -26,9 +26,9 @@
package java.io;
import java.nio.channels.FileChannel;
-import java.util.concurrent.atomic.AtomicBoolean;
-import jdk.internal.misc.JavaIORandomAccessFileAccess;
-import jdk.internal.misc.SharedSecrets;
+
+import jdk.internal.access.JavaIORandomAccessFileAccess;
+import jdk.internal.access.SharedSecrets;
import sun.nio.ch.FileChannelImpl;
--- a/src/java.base/share/classes/java/lang/Character.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/Character.java Mon Nov 12 11:10:16 2018 +0530
@@ -55,6 +55,14 @@
* <ul>
* <li><a href="http://www.unicode.org">http://www.unicode.org</a>
* </ul>
+ * <p>
+ * The code point, U+32FF, is reserved by the Unicode Consortium
+ * to represent the Japanese square character for the new era that begins
+ * May 2019. Relevant methods in the Character class return the same
+ * properties as for the existing Japanese era characters (e.g., U+337E for
+ * "Meizi"). For the details of the code point, refer to
+ * <a href="http://blog.unicode.org/2018/09/new-japanese-era.html">
+ * http://blog.unicode.org/2018/09/new-japanese-era.html</a>.
*
* <h3><a id="unicode">Unicode Character Representations</a></h3>
*
--- a/src/java.base/share/classes/java/lang/Class.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/Class.java Mon Nov 12 11:10:16 2018 +0530
@@ -59,6 +59,8 @@
import java.util.Map;
import java.util.Objects;
import java.util.StringJoiner;
+import java.util.stream.Stream;
+import java.util.stream.Collectors;
import jdk.internal.HotSpotIntrinsicCandidate;
import jdk.internal.loader.BootLoader;
@@ -200,7 +202,8 @@
* and {@code class}, {@code enum}, {@code interface}, or
* <code>@</code>{@code interface}, as appropriate), followed
* by the type's name, followed by an angle-bracketed
- * comma-separated list of the type's type parameters, if any.
+ * comma-separated list of the type's type parameters, if any,
+ * including informative bounds on the type parameters, if any.
*
* A space is used to separate modifiers from one another and to
* separate any modifiers from the kind of type. The modifiers
@@ -262,11 +265,8 @@
TypeVariable<?>[] typeparms = component.getTypeParameters();
if (typeparms.length > 0) {
- StringJoiner sj = new StringJoiner(",", "<", ">");
- for(TypeVariable<?> typeparm: typeparms) {
- sj.add(typeparm.getTypeName());
- }
- sb.append(sj.toString());
+ sb.append(Stream.of(typeparms).map(Class::typeVarBounds).
+ collect(Collectors.joining(",", "<", ">")));
}
for (int i = 0; i < arrayDepth; i++)
@@ -276,6 +276,17 @@
}
}
+ static String typeVarBounds(TypeVariable<?> typeVar) {
+ Type[] bounds = typeVar.getBounds();
+ if (bounds.length == 1 && bounds[0].equals(Object.class)) {
+ return typeVar.getName();
+ } else {
+ return typeVar.getName() + " extends " +
+ Stream.of(bounds).map(Type::getTypeName).
+ collect(Collectors.joining(" & "));
+ }
+ }
+
/**
* Returns the {@code Class} object associated with the class or
* interface with the given string name. Invoking this method is
@@ -3399,14 +3410,14 @@
* Helper method to get the method name from arguments.
*/
private String methodToString(String name, Class<?>[] argTypes) {
- StringJoiner sj = new StringJoiner(", ", getName() + "." + name + "(", ")");
+ StringBuilder sb = new StringBuilder();
+ sb.append(getName() + "." + name + "(");
if (argTypes != null) {
- for (int i = 0; i < argTypes.length; i++) {
- Class<?> c = argTypes[i];
- sj.add((c == null) ? "null" : c.getName());
- }
+ Stream.of(argTypes).map(c -> {return (c == null) ? "null" : c.getName();}).
+ collect(Collectors.joining(","));
}
- return sj.toString();
+ sb.append(")");
+ return sb.toString();
}
/** use serialVersionUID from JDK 1.1 for interoperability */
--- a/src/java.base/share/classes/java/lang/Integer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/Integer.java Mon Nov 12 11:10:16 2018 +0530
@@ -992,6 +992,12 @@
* During VM initialization, java.lang.Integer.IntegerCache.high property
* may be set and saved in the private system properties in the
* jdk.internal.misc.VM class.
+ *
+ * WARNING: The cache is archived with CDS and reloaded from the shared
+ * archive at runtime. The archived cache (Integer[]) and Integer objects
+ * reside in the closed archive heap regions. Care should be taken when
+ * changing the implementation and the cache array should not be assigned
+ * with new Integer object(s) after initialization.
*/
private static class IntegerCache {
--- a/src/java.base/share/classes/java/lang/Runtime.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/Runtime.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,16 +27,14 @@
import java.io.*;
import java.math.BigInteger;
-import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
-import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.StringTokenizer;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
--- a/src/java.base/share/classes/java/lang/StackFrameInfo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/StackFrameInfo.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -24,10 +24,9 @@
*/
package java.lang;
-import jdk.internal.misc.JavaLangInvokeAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangInvokeAccess;
+import jdk.internal.access.SharedSecrets;
-import static java.lang.StackWalker.Option.*;
import java.lang.StackWalker.StackFrame;
import java.lang.invoke.MethodType;
--- a/src/java.base/share/classes/java/lang/System.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/System.java Mon Nov 12 11:10:16 2018 +0530
@@ -66,8 +66,8 @@
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import jdk.internal.HotSpotIntrinsicCandidate;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.logger.LoggerFinderLoader;
import jdk.internal.logger.LazyLoggers;
@@ -802,6 +802,7 @@
if (props == null) {
props = new Properties();
initProperties(props);
+ VersionProps.init(props);
}
System.props = props;
}
@@ -1973,6 +1974,7 @@
// be put into it directly.
props = new Properties(84);
initProperties(props); // initialized by the VM
+ VersionProps.init(props);
// There are certain system configurations that may be controlled by
// VM options such as the maximum amount of direct memory and
@@ -1992,7 +1994,6 @@
lineSeparator = props.getProperty("line.separator");
StaticProperty.javaHome(); // Load StaticProperty to cache the property values
- VersionProps.init();
FileInputStream fdIn = new FileInputStream(FileDescriptor.in);
FileOutputStream fdOut = new FileOutputStream(FileDescriptor.out);
--- a/src/java.base/share/classes/java/lang/Thread.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/Thread.java Mon Nov 12 11:10:16 2018 +0530
@@ -230,7 +230,7 @@
private volatile Interruptible blocker;
private final Object blockerLock = new Object();
- /* Set the blocker field; invoked via jdk.internal.misc.SharedSecrets
+ /* Set the blocker field; invoked via jdk.internal.access.SharedSecrets
* from java.nio code
*/
static void blockedOn(Interruptible b) {
--- a/src/java.base/share/classes/java/lang/VersionProps.java.template Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/VersionProps.java.template Mon Nov 12 11:10:16 2018 +0530
@@ -29,6 +29,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
+import java.util.Properties;
class VersionProps {
@@ -69,17 +70,13 @@
(VENDOR_VERSION_STRING.length() > 0
? " " + VENDOR_VERSION_STRING : "");
- static {
- init();
- }
-
- public static void init() {
- System.setProperty("java.version", java_version);
- System.setProperty("java.version.date", java_version_date);
- System.setProperty("java.runtime.version", java_runtime_version);
- System.setProperty("java.runtime.name", java_runtime_name);
+ public static void init(Properties props) {
+ props.setProperty("java.version", java_version);
+ props.setProperty("java.version.date", java_version_date);
+ props.setProperty("java.runtime.version", java_runtime_version);
+ props.setProperty("java.runtime.name", java_runtime_name);
if (VENDOR_VERSION_STRING.length() > 0)
- System.setProperty("java.vendor.version", VENDOR_VERSION_STRING);
+ props.setProperty("java.vendor.version", VENDOR_VERSION_STRING);
}
private static int parseVersionNumber(String version, int prevIndex, int index) {
--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormEditor.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,6 +30,8 @@
import java.lang.ref.SoftReference;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Comparator;
+import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import static java.lang.invoke.LambdaForm.*;
@@ -86,7 +88,8 @@
LOCAL_TYPES = 14,
FOLD_SELECT_ARGS = 15,
FOLD_SELECT_ARGS_TO_VOID = 16,
- FILTER_SELECT_ARGS = 17;
+ FILTER_SELECT_ARGS = 17,
+ REPEAT_FILTER_ARGS = 18;
private static final boolean STRESS_TEST = false; // turn on to disable most packing
private static final int
@@ -641,6 +644,104 @@
return putInCache(key, form);
}
+ /**
+ * This creates a LF that will repeatedly invoke some unary filter function
+ * at each of the given positions. This allows fewer LFs and BMH species
+ * classes to be generated in typical cases compared to building up the form
+ * by reapplying of {@code filterArgumentForm(int,BasicType)}, and should do
+ * no worse in the worst case.
+ */
+ LambdaForm filterRepeatedArgumentForm(BasicType newType, int... argPositions) {
+ assert (argPositions.length > 1);
+ byte[] keyArgs = new byte[argPositions.length + 2];
+ keyArgs[0] = Transform.REPEAT_FILTER_ARGS;
+ keyArgs[argPositions.length + 1] = (byte)newType.ordinal();
+ for (int i = 0; i < argPositions.length; i++) {
+ keyArgs[i + 1] = (byte)argPositions[i];
+ }
+ Transform key = new Transform(keyArgs);
+ LambdaForm form = getInCache(key);
+ if (form != null) {
+ assert(form.arity == lambdaForm.arity &&
+ formParametersMatch(form, newType, argPositions));
+ return form;
+ }
+ BasicType oldType = lambdaForm.parameterType(argPositions[0]);
+ MethodType filterType = MethodType.methodType(oldType.basicTypeClass(),
+ newType.basicTypeClass());
+ form = makeRepeatedFilterForm(filterType, argPositions);
+ assert (formParametersMatch(form, newType, argPositions));
+ return putInCache(key, form);
+ }
+
+ private boolean formParametersMatch(LambdaForm form, BasicType newType, int... argPositions) {
+ for (int i : argPositions) {
+ if (form.parameterType(i) != newType) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private LambdaForm makeRepeatedFilterForm(MethodType combinerType, int... positions) {
+ assert (combinerType.parameterCount() == 1 &&
+ combinerType == combinerType.basicType() &&
+ combinerType.returnType() != void.class);
+ LambdaFormBuffer buf = buffer();
+ buf.startEdit();
+
+ BoundMethodHandle.SpeciesData oldData = oldSpeciesData();
+ BoundMethodHandle.SpeciesData newData = newSpeciesData(L_TYPE);
+
+ // The newly created LF will run with a different BMH.
+ // Switch over any pre-existing BMH field references to the new BMH class.
+ Name oldBaseAddress = lambdaForm.parameter(0); // BMH holding the values
+ buf.replaceFunctions(oldData.getterFunctions(), newData.getterFunctions(), oldBaseAddress);
+ Name newBaseAddress = oldBaseAddress.withConstraint(newData);
+ buf.renameParameter(0, newBaseAddress);
+
+ // Insert the new expressions at the end
+ int exprPos = lambdaForm.arity();
+ Name getCombiner = new Name(newData.getterFunction(oldData.fieldCount()), newBaseAddress);
+ buf.insertExpression(exprPos++, getCombiner);
+
+ // After inserting expressions, we insert parameters in order
+ // from lowest to highest, simplifying the calculation of where parameters
+ // and expressions are
+ var newParameters = new TreeMap<Name, Integer>(new Comparator<>() {
+ public int compare(Name n1, Name n2) {
+ return n1.index - n2.index;
+ }
+ });
+
+ // Insert combiner expressions in reverse order so that the invocation of
+ // the resulting form will invoke the combiners in left-to-right order
+ for (int i = positions.length - 1; i >= 0; --i) {
+ int pos = positions[i];
+ assert (pos > 0 && pos <= MethodType.MAX_JVM_ARITY && pos < lambdaForm.arity);
+
+ Name newParameter = new Name(pos, basicType(combinerType.parameterType(0)));
+ Object[] combinerArgs = {getCombiner, newParameter};
+
+ Name callCombiner = new Name(combinerType, combinerArgs);
+ buf.insertExpression(exprPos++, callCombiner);
+ newParameters.put(newParameter, exprPos);
+ }
+
+ // Mix in new parameters from left to right in the buffer (this doesn't change
+ // execution order
+ int offset = 0;
+ for (var entry : newParameters.entrySet()) {
+ Name newParameter = entry.getKey();
+ int from = entry.getValue();
+ buf.insertParameter(newParameter.index() + 1 + offset, newParameter);
+ buf.replaceParameterByCopy(newParameter.index() + offset, from + offset);
+ offset++;
+ }
+ return buf.endEdit();
+ }
+
+
private LambdaForm makeArgumentCombinationForm(int pos,
MethodType combinerType,
boolean keepArguments, boolean dropResult) {
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,8 +25,8 @@
package java.lang.invoke;
-import jdk.internal.misc.JavaLangInvokeAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangInvokeAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.org.objectweb.asm.AnnotationVisitor;
import jdk.internal.org.objectweb.asm.ClassWriter;
import jdk.internal.org.objectweb.asm.MethodVisitor;
@@ -42,6 +42,7 @@
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -257,14 +258,19 @@
private static int countNonNull(Object[] array) {
int count = 0;
- for (Object x : array) {
- if (x != null) ++count;
+ if (array != null) {
+ for (Object x : array) {
+ if (x != null) ++count;
+ }
}
return count;
}
static MethodHandle makePairwiseConvertByEditor(MethodHandle target, MethodType srcType,
boolean strict, boolean monobox) {
+ // In method types arguments start at index 0, while the LF
+ // editor have the MH receiver at position 0 - adjust appropriately.
+ final int MH_RECEIVER_OFFSET = 1;
Object[] convSpecs = computeValueConversions(srcType, target.type(), strict, monobox);
int convCount = countNonNull(convSpecs);
if (convCount == 0)
@@ -272,27 +278,52 @@
MethodType basicSrcType = srcType.basicType();
MethodType midType = target.type().basicType();
BoundMethodHandle mh = target.rebind();
- // FIXME: Reduce number of bindings when there is more than one Class conversion.
- // FIXME: Reduce number of bindings when there are repeated conversions.
- for (int i = 0; i < convSpecs.length-1; i++) {
+
+ // Match each unique conversion to the positions at which it is to be applied
+ var convSpecMap = new HashMap<Object, int[]>(((4 * convCount) / 3) + 1);
+ for (int i = 0; i < convSpecs.length - MH_RECEIVER_OFFSET; i++) {
Object convSpec = convSpecs[i];
- if (convSpec == null) continue;
+ if (convSpec == null) continue;
+ int[] positions = convSpecMap.get(convSpec);
+ if (positions == null) {
+ positions = new int[] { i + MH_RECEIVER_OFFSET };
+ } else {
+ positions = Arrays.copyOf(positions, positions.length + 1);
+ positions[positions.length - 1] = i + MH_RECEIVER_OFFSET;
+ }
+ convSpecMap.put(convSpec, positions);
+ }
+ for (var entry : convSpecMap.entrySet()) {
+ Object convSpec = entry.getKey();
+
MethodHandle fn;
if (convSpec instanceof Class) {
fn = getConstantHandle(MH_cast).bindTo(convSpec);
} else {
fn = (MethodHandle) convSpec;
}
- Class<?> newType = basicSrcType.parameterType(i);
- if (--convCount == 0)
+ int[] positions = entry.getValue();
+ Class<?> newType = basicSrcType.parameterType(positions[0] - MH_RECEIVER_OFFSET);
+ BasicType newBasicType = BasicType.basicType(newType);
+ convCount -= positions.length;
+ if (convCount == 0) {
midType = srcType;
- else
- midType = midType.changeParameterType(i, newType);
- LambdaForm form2 = mh.editor().filterArgumentForm(1+i, BasicType.basicType(newType));
+ } else {
+ Class<?>[] ptypes = midType.ptypes().clone();
+ for (int pos : positions) {
+ ptypes[pos - 1] = newType;
+ }
+ midType = MethodType.makeImpl(midType.rtype(), ptypes, true);
+ }
+ LambdaForm form2;
+ if (positions.length > 1) {
+ form2 = mh.editor().filterRepeatedArgumentForm(newBasicType, positions);
+ } else {
+ form2 = mh.editor().filterArgumentForm(positions[0], newBasicType);
+ }
mh = mh.copyWithExtendL(midType, form2, fn);
- mh = mh.rebind();
}
- Object convSpec = convSpecs[convSpecs.length-1];
+ Object convSpec = convSpecs[convSpecs.length - 1];
if (convSpec != null) {
MethodHandle fn;
if (convSpec instanceof Class) {
@@ -320,98 +351,18 @@
return mh;
}
- static MethodHandle makePairwiseConvertIndirect(MethodHandle target, MethodType srcType,
- boolean strict, boolean monobox) {
- assert(target.type().parameterCount() == srcType.parameterCount());
- // Calculate extra arguments (temporaries) required in the names array.
- Object[] convSpecs = computeValueConversions(srcType, target.type(), strict, monobox);
- final int INARG_COUNT = srcType.parameterCount();
- int convCount = countNonNull(convSpecs);
- boolean retConv = (convSpecs[INARG_COUNT] != null);
- boolean retVoid = srcType.returnType() == void.class;
- if (retConv && retVoid) {
- convCount -= 1;
- retConv = false;
- }
-
- final int IN_MH = 0;
- final int INARG_BASE = 1;
- final int INARG_LIMIT = INARG_BASE + INARG_COUNT;
- final int NAME_LIMIT = INARG_LIMIT + convCount + 1;
- final int RETURN_CONV = (!retConv ? -1 : NAME_LIMIT - 1);
- final int OUT_CALL = (!retConv ? NAME_LIMIT : RETURN_CONV) - 1;
- final int RESULT = (retVoid ? -1 : NAME_LIMIT - 1);
-
- // Now build a LambdaForm.
- MethodType lambdaType = srcType.basicType().invokerType();
- Name[] names = arguments(NAME_LIMIT - INARG_LIMIT, lambdaType);
-
- // Collect the arguments to the outgoing call, maybe with conversions:
- final int OUTARG_BASE = 0; // target MH is Name.function, name Name.arguments[0]
- Object[] outArgs = new Object[OUTARG_BASE + INARG_COUNT];
-
- int nameCursor = INARG_LIMIT;
- for (int i = 0; i < INARG_COUNT; i++) {
- Object convSpec = convSpecs[i];
- if (convSpec == null) {
- // do nothing: difference is trivial
- outArgs[OUTARG_BASE + i] = names[INARG_BASE + i];
- continue;
- }
-
- Name conv;
- if (convSpec instanceof Class) {
- Class<?> convClass = (Class<?>) convSpec;
- conv = new Name(getConstantHandle(MH_cast), convClass, names[INARG_BASE + i]);
- } else {
- MethodHandle fn = (MethodHandle) convSpec;
- conv = new Name(fn, names[INARG_BASE + i]);
- }
- assert(names[nameCursor] == null);
- names[nameCursor++] = conv;
- assert(outArgs[OUTARG_BASE + i] == null);
- outArgs[OUTARG_BASE + i] = conv;
- }
-
- // Build argument array for the call.
- assert(nameCursor == OUT_CALL);
- names[OUT_CALL] = new Name(target, outArgs);
-
- Object convSpec = convSpecs[INARG_COUNT];
- if (!retConv) {
- assert(OUT_CALL == names.length-1);
- } else {
- Name conv;
- if (convSpec == void.class) {
- conv = new Name(LambdaForm.constantZero(BasicType.basicType(srcType.returnType())));
- } else if (convSpec instanceof Class) {
- Class<?> convClass = (Class<?>) convSpec;
- conv = new Name(getConstantHandle(MH_cast), convClass, names[OUT_CALL]);
- } else {
- MethodHandle fn = (MethodHandle) convSpec;
- if (fn.type().parameterCount() == 0)
- conv = new Name(fn); // don't pass retval to void conversion
- else
- conv = new Name(fn, names[OUT_CALL]);
- }
- assert(names[RETURN_CONV] == null);
- names[RETURN_CONV] = conv;
- assert(RETURN_CONV == names.length-1);
- }
-
- LambdaForm form = new LambdaForm(lambdaType.parameterCount(), names, RESULT, Kind.CONVERT);
- return SimpleMethodHandle.make(srcType, form);
- }
-
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
boolean strict, boolean monobox) {
final int INARG_COUNT = srcType.parameterCount();
- Object[] convSpecs = new Object[INARG_COUNT+1];
+ Object[] convSpecs = null;
for (int i = 0; i <= INARG_COUNT; i++) {
boolean isRet = (i == INARG_COUNT);
Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
+ if (convSpecs == null) {
+ convSpecs = new Object[INARG_COUNT + 1];
+ }
convSpecs[i] = valueConversion(src, dst, strict, monobox);
}
}
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
package java.lang.invoke;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.IllegalAccessLogger;
import jdk.internal.org.objectweb.asm.ClassReader;
import jdk.internal.reflect.CallerSensitive;
@@ -3864,18 +3864,63 @@
*/
public static
MethodHandle filterArguments(MethodHandle target, int pos, MethodHandle... filters) {
+ // In method types arguments start at index 0, while the LF
+ // editor have the MH receiver at position 0 - adjust appropriately.
+ final int MH_RECEIVER_OFFSET = 1;
filterArgumentsCheckArity(target, pos, filters);
MethodHandle adapter = target;
+
+ // keep track of currently matched filters, as to optimize repeated filters
+ int index = 0;
+ int[] positions = new int[filters.length];
+ MethodHandle filter = null;
+
// process filters in reverse order so that the invocation of
// the resulting adapter will invoke the filters in left-to-right order
for (int i = filters.length - 1; i >= 0; --i) {
- MethodHandle filter = filters[i];
- if (filter == null) continue; // ignore null elements of filters
- adapter = filterArgument(adapter, pos + i, filter);
+ MethodHandle newFilter = filters[i];
+ if (newFilter == null) continue; // ignore null elements of filters
+
+ // flush changes on update
+ if (filter != newFilter) {
+ if (filter != null) {
+ if (index > 1) {
+ adapter = filterRepeatedArgument(adapter, filter, Arrays.copyOf(positions, index));
+ } else {
+ adapter = filterArgument(adapter, positions[0] - 1, filter);
+ }
+ }
+ filter = newFilter;
+ index = 0;
+ }
+
+ filterArgumentChecks(target, pos + i, newFilter);
+ positions[index++] = pos + i + MH_RECEIVER_OFFSET;
+ }
+ if (index > 1) {
+ adapter = filterRepeatedArgument(adapter, filter, Arrays.copyOf(positions, index));
+ } else if (index == 1) {
+ adapter = filterArgument(adapter, positions[0] - 1, filter);
}
return adapter;
}
+ private static MethodHandle filterRepeatedArgument(MethodHandle adapter, MethodHandle filter, int[] positions) {
+ MethodType targetType = adapter.type();
+ MethodType filterType = filter.type();
+ BoundMethodHandle result = adapter.rebind();
+ Class<?> newParamType = filterType.parameterType(0);
+
+ Class<?>[] ptypes = targetType.ptypes().clone();
+ for (int pos : positions) {
+ ptypes[pos - 1] = newParamType;
+ }
+ MethodType newType = MethodType.makeImpl(targetType.rtype(), ptypes, true);
+
+ LambdaForm lform = result.editor().filterRepeatedArgumentForm(BasicType.basicType(newParamType), positions);
+ return result.copyWithExtendL(newType, lform, filter);
+ }
+
/*non-public*/ static
MethodHandle filterArgument(MethodHandle target, int pos, MethodHandle filter) {
filterArgumentChecks(target, pos, filter);
--- a/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, 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
@@ -2603,8 +2603,8 @@
* Setup the shared secret to allow code in other packages access
* private package methods in java.lang.module.
*/
- jdk.internal.misc.SharedSecrets
- .setJavaLangModuleAccess(new jdk.internal.misc.JavaLangModuleAccess() {
+ jdk.internal.access.SharedSecrets
+ .setJavaLangModuleAccess(new jdk.internal.access.JavaLangModuleAccess() {
@Override
public Builder newModuleBuilder(String mn,
boolean strict,
--- a/src/java.base/share/classes/java/lang/ref/Finalizer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/ref/Finalizer.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,8 +27,8 @@
import java.security.PrivilegedAction;
import java.security.AccessController;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
final class Finalizer extends FinalReference<Object> { /* Package-private; must be in
--- a/src/java.base/share/classes/java/lang/ref/Reference.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/ref/Reference.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,8 +27,8 @@
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.HotSpotIntrinsicCandidate;
-import jdk.internal.misc.JavaLangRefAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangRefAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.Cleaner;
/**
--- a/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/AnnotatedElement.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -74,7 +74,7 @@
* exactly one annotation whose value element contains <i>A</i> and whose
* type is the containing annotation type of <i>A</i> 's type.
*
- * <li>An annotation <i>A</i> is present on an element <i>E</i> if either:
+ * <li>An annotation <i>A</i> is <em>present</em> on an element <i>E</i> if either:
*
* <ul>
*
@@ -145,8 +145,8 @@
* </tbody>
* </table>
*
- * <p>For an invocation of {@code get[Declared]AnnotationsByType( Class <
- * T >)}, the order of annotations which are directly or indirectly
+ * <p>For an invocation of {@code get[Declared]AnnotationsByType(Class <T>)},
+ * the order of annotations which are directly or indirectly
* present on an element <i>E</i> is computed as if indirectly present
* annotations on <i>E</i> are directly present on <i>E</i> in place
* of their container annotation, in the order in which they appear in
--- a/src/java.base/share/classes/java/lang/reflect/Constructor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/Constructor.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
package java.lang.reflect;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.ConstructorAccessor;
import jdk.internal.reflect.Reflection;
@@ -382,7 +382,8 @@
* including type parameters. The string is formatted as the
* constructor access modifiers, if any, followed by an
* angle-bracketed comma separated list of the constructor's type
- * parameters, if any, followed by the fully-qualified name of the
+ * parameters, if any, including informative bounds of the
+ * type parameters, if any, followed by the fully-qualified name of the
* declaring class, followed by a parenthesized, comma-separated
* list of the constructor's generic formal parameter types.
*
--- a/src/java.base/share/classes/java/lang/reflect/Executable.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/Executable.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -26,11 +26,14 @@
package java.lang.reflect;
import java.lang.annotation.*;
+import java.util.Arrays;
import java.util.Map;
import java.util.Objects;
import java.util.StringJoiner;
+import java.util.stream.Stream;
+import java.util.stream.Collectors;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import sun.reflect.annotation.AnnotationParser;
import sun.reflect.annotation.AnnotationSupport;
import sun.reflect.annotation.TypeAnnotationParser;
@@ -109,19 +112,15 @@
printModifiersIfNonzero(sb, modifierMask, isDefault);
specificToStringHeader(sb);
sb.append('(');
- StringJoiner sj = new StringJoiner(",");
- for (Class<?> parameterType : parameterTypes) {
- sj.add(parameterType.getTypeName());
- }
- sb.append(sj.toString());
+
+ sb.append(Stream.of(parameterTypes).map(Type::getTypeName).
+ collect(Collectors.joining(",")));
+
sb.append(')');
if (exceptionTypes.length > 0) {
- StringJoiner joiner = new StringJoiner(",", " throws ", "");
- for (Class<?> exceptionType : exceptionTypes) {
- joiner.add(exceptionType.getTypeName());
- }
- sb.append(joiner.toString());
+ sb.append(Stream.of(exceptionTypes).map(Type::getTypeName).
+ collect(Collectors.joining(",", " throws ", "")));
}
return sb.toString();
} catch (Exception e) {
@@ -135,6 +134,17 @@
*/
abstract void specificToStringHeader(StringBuilder sb);
+ static String typeVarBounds(TypeVariable<?> typeVar) {
+ Type[] bounds = typeVar.getBounds();
+ if (bounds.length == 1 && bounds[0].equals(Object.class)) {
+ return typeVar.getName();
+ } else {
+ return typeVar.getName() + " extends " +
+ Stream.of(bounds).map(Type::getTypeName).
+ collect(Collectors.joining(" & "));
+ }
+ }
+
String sharedToGenericString(int modifierMask, boolean isDefault) {
try {
StringBuilder sb = new StringBuilder();
@@ -143,11 +153,8 @@
TypeVariable<?>[] typeparms = getTypeParameters();
if (typeparms.length > 0) {
- StringJoiner sj = new StringJoiner(",", "<", "> ");
- for(TypeVariable<?> typeparm: typeparms) {
- sj.add(typeparm.getTypeName());
- }
- sb.append(sj.toString());
+ sb.append(Stream.of(typeparms).map(Executable::typeVarBounds).
+ collect(Collectors.joining(",", "<", "> ")));
}
specificToGenericStringHeader(sb);
@@ -166,11 +173,8 @@
Type[] exceptionTypes = getGenericExceptionTypes();
if (exceptionTypes.length > 0) {
- StringJoiner joiner = new StringJoiner(",", " throws ", "");
- for (Type exceptionType : exceptionTypes) {
- joiner.add(exceptionType.getTypeName());
- }
- sb.append(joiner.toString());
+ sb.append(Stream.of(exceptionTypes).map(Type::getTypeName).
+ collect(Collectors.joining(",", " throws ", "")));
}
return sb.toString();
} catch (Exception e) {
--- a/src/java.base/share/classes/java/lang/reflect/Field.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/Field.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
package java.lang.reflect;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.FieldAccessor;
import jdk.internal.reflect.Reflection;
--- a/src/java.base/share/classes/java/lang/reflect/Method.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/Method.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,7 @@
package java.lang.reflect;
import jdk.internal.HotSpotIntrinsicCandidate;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.MethodAccessor;
import jdk.internal.reflect.Reflection;
@@ -436,10 +436,11 @@
}
/**
- * Returns a string describing this {@code Method}, including
- * type parameters. The string is formatted as the method access
+ * Returns a string describing this {@code Method}, including type
+ * parameters. The string is formatted as the method access
* modifiers, if any, followed by an angle-bracketed
* comma-separated list of the method's type parameters, if any,
+ * including informative bounds of the type parameters, if any,
* followed by the method's generic return type, followed by a
* space, followed by the class declaring the method, followed by
* a period, followed by the method name, followed by a
--- a/src/java.base/share/classes/java/lang/reflect/Proxy.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/Proxy.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -40,9 +40,9 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.loader.BootLoader;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
import jdk.internal.module.Modules;
import jdk.internal.misc.VM;
import jdk.internal.reflect.CallerSensitive;
--- a/src/java.base/share/classes/java/lang/reflect/UndeclaredThrowableException.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/lang/reflect/UndeclaredThrowableException.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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,7 +29,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamField;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* Thrown by a method invocation on a proxy instance if its invocation
--- a/src/java.base/share/classes/java/net/HttpCookie.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/HttpCookie.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -32,11 +32,10 @@
import java.util.TimeZone;
import java.util.Calendar;
import java.util.GregorianCalendar;
-import java.util.Date;
import java.util.Locale;
import java.util.Objects;
-import jdk.internal.misc.JavaNetHttpCookieAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetHttpCookieAccess;
+import jdk.internal.access.SharedSecrets;
/**
* An HttpCookie object represents an HTTP cookie, which carries state
--- a/src/java.base/share/classes/java/net/InetAddress.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/InetAddress.java Mon Nov 12 11:10:16 2018 +0530
@@ -46,8 +46,8 @@
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.atomic.AtomicLong;
-import jdk.internal.misc.JavaNetInetAddressAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetInetAddressAccess;
+import jdk.internal.access.SharedSecrets;
import sun.security.action.*;
import sun.net.InetAddressCachePolicy;
import sun.net.util.IPAddressUtil;
--- a/src/java.base/share/classes/java/net/SecureCacheResponse.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/SecureCacheResponse.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -26,9 +26,11 @@
package java.net;
import java.security.cert.Certificate;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLPeerUnverifiedException;
import java.security.Principal;
import java.util.List;
+import java.util.Optional;
/**
* Represents a cache response originally retrieved through secure
@@ -105,4 +107,27 @@
* @see #getPeerPrincipal()
*/
public abstract Principal getLocalPrincipal();
+
+ /**
+ * Returns an {@link Optional} containing the {@code SSLSession} in
+ * use on the original connection that retrieved the network resource.
+ * Returns an empty {@code Optional} if the underlying implementation
+ * does not support this method.
+ *
+ * @implSpec For compatibility, the default implementation of this
+ * method returns an empty {@code Optional}. Subclasses
+ * should override this method with an appropriate
+ * implementation since an application may need to access
+ * additional parameters associated with the SSL session.
+ *
+ * @return an {@link Optional} containing the {@code SSLSession} in
+ * use on the original connection
+ *
+ * @see SSLSession
+ *
+ * @since 12
+ */
+ public Optional<SSLSession> getSSLSession() {
+ return Optional.empty();
+ }
}
--- a/src/java.base/share/classes/java/net/ServerSocket.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/ServerSocket.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,8 +25,8 @@
package java.net;
-import jdk.internal.misc.JavaNetSocketAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetSocketAccess;
+import jdk.internal.access.SharedSecrets;
import java.io.FileDescriptor;
import java.io.IOException;
@@ -76,10 +76,15 @@
private boolean oldImpl = false;
/**
- * Package-private constructor to create a ServerSocket associated with
- * the given SocketImpl.
+ * Creates a server socket with a user-specified {@code SocketImpl}.
+ *
+ * @param impl an instance of a SocketImpl to use on the ServerSocket.
+ *
+ * @throws NullPointerException if impl is {@code null}.
+ *
+ * @since 12
*/
- ServerSocket(SocketImpl impl) {
+ protected ServerSocket(SocketImpl impl) {
this.impl = impl;
impl.setServerSocket(this);
}
@@ -988,8 +993,8 @@
return getImpl().getOption(name);
}
- private static Set<SocketOption<?>> options;
- private static boolean optionsSet = false;
+ // cache of unmodifiable impl options. Possibly set racy, in impl we trust
+ private volatile Set<SocketOption<?>> options;
/**
* Returns a set of the socket options supported by this server socket.
@@ -1003,19 +1008,17 @@
* @since 9
*/
public Set<SocketOption<?>> supportedOptions() {
- synchronized (ServerSocket.class) {
- if (optionsSet) {
- return options;
- }
- try {
- SocketImpl impl = getImpl();
- options = Collections.unmodifiableSet(impl.supportedOptions());
- } catch (IOException e) {
- options = Collections.emptySet();
- }
- optionsSet = true;
- return options;
+ Set<SocketOption<?>> so = options;
+ if (so != null)
+ return so;
+
+ try {
+ SocketImpl impl = getImpl();
+ options = Collections.unmodifiableSet(impl.supportedOptions());
+ } catch (IOException e) {
+ options = Collections.emptySet();
}
+ return options;
}
static {
--- a/src/java.base/share/classes/java/net/Socket.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/Socket.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -1789,8 +1789,8 @@
return getImpl().getOption(name);
}
- private static Set<SocketOption<?>> options;
- private static boolean optionsSet = false;
+ // cache of unmodifiable impl options. Possibly set racy, in impl we trust
+ private volatile Set<SocketOption<?>> options;
/**
* Returns a set of the socket options supported by this socket.
@@ -1804,18 +1804,16 @@
* @since 9
*/
public Set<SocketOption<?>> supportedOptions() {
- synchronized (Socket.class) {
- if (optionsSet) {
- return options;
- }
- try {
- SocketImpl impl = getImpl();
- options = Collections.unmodifiableSet(impl.supportedOptions());
- } catch (IOException e) {
- options = Collections.emptySet();
- }
- optionsSet = true;
- return options;
+ Set<SocketOption<?>> so = options;
+ if (so != null)
+ return so;
+
+ try {
+ SocketImpl impl = getImpl();
+ options = Collections.unmodifiableSet(impl.supportedOptions());
+ } catch (IOException e) {
+ options = Collections.emptySet();
}
+ return options;
}
}
--- a/src/java.base/share/classes/java/net/SocketCleanable.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/SocketCleanable.java Mon Nov 12 11:10:16 2018 +0530
@@ -24,8 +24,8 @@
*/
package java.net;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.CleanerFactory;
import jdk.internal.ref.PhantomCleanable;
--- a/src/java.base/share/classes/java/net/URI.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/URI.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -37,8 +37,8 @@
import java.nio.charset.CodingErrorAction;
import java.nio.charset.CharacterCodingException;
import java.text.Normalizer;
-import jdk.internal.misc.JavaNetUriAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetUriAccess;
+import jdk.internal.access.SharedSecrets;
import sun.nio.cs.ThreadLocalCoders;
import java.lang.Character; // for javadoc
--- a/src/java.base/share/classes/java/net/URL.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/URL.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -41,8 +41,8 @@
import java.util.ServiceConfigurationError;
import java.util.ServiceLoader;
-import jdk.internal.misc.JavaNetURLAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetURLAccess;
+import jdk.internal.access.SharedSecrets;
import sun.security.util.SecurityConstants;
import sun.security.action.GetPropertyAction;
--- a/src/java.base/share/classes/java/net/URLClassLoader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/net/URLClassLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -52,8 +52,8 @@
import jdk.internal.loader.Resource;
import jdk.internal.loader.URLClassPath;
-import jdk.internal.misc.JavaNetURLClassLoaderAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetURLClassLoaderAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.perf.PerfCounter;
import sun.net.www.ParseUtil;
import sun.security.util.SecurityConstants;
--- a/src/java.base/share/classes/java/nio/Bits.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/nio/Bits.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
package java.nio;
-import jdk.internal.misc.JavaLangRefAccess;
-import jdk.internal.misc.JavaNioAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangRefAccess;
+import jdk.internal.access.JavaNioAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.Unsafe;
import jdk.internal.misc.VM;
--- a/src/java.base/share/classes/java/nio/Buffer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/nio/Buffer.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,8 +26,8 @@
package java.nio;
import jdk.internal.HotSpotIntrinsicCandidate;
-import jdk.internal.misc.JavaNioAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNioAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.Unsafe;
import java.util.Spliterator;
--- a/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,7 +30,7 @@
import java.io.IOException;
import java.nio.channels.*;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import sun.nio.ch.Interruptible;
@@ -203,7 +203,7 @@
}
- // -- jdk.internal.misc.SharedSecrets --
+ // -- jdk.internal.access.SharedSecrets --
static void blockedOn(Interruptible intr) { // package-private
SharedSecrets.getJavaLangAccess().blockedOn(intr);
}
--- a/src/java.base/share/classes/java/nio/file/Files.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/nio/file/Files.java Mon Nov 12 11:10:16 2018 +0530
@@ -91,6 +91,9 @@
*/
public final class Files {
+ // buffer size used for reading and writing
+ private static final int BUFFER_SIZE = 8192;
+
private Files() { }
/**
@@ -1531,6 +1534,80 @@
}
/**
+ * Finds and returns the position of the first mismatched byte in the content
+ * of two files, or {@code -1L} if there is no mismatch. The position will be
+ * in the inclusive range of {@code 0L} up to the size (in bytes) of the
+ * smaller file.
+ *
+ * <p> Two files are considered to match if they satisfy one of the following
+ * conditions:
+ * <ul>
+ * <li> The two paths locate the {@linkplain #isSameFile(Path, Path) same file},
+ * even if two {@linkplain Path#equals(Object) equal} paths locate a file
+ * does not exist, or </li>
+ * <li> The two files are the same size, and every byte in the first file
+ * is identical to the corresponding byte in the second file. </li>
+ * </ul>
+ *
+ * <p> Otherwise there is a mismatch between the two files and the value
+ * returned by this method is:
+ * <ul>
+ * <li> The position of the first mismatched byte, or </li>
+ * <li> The size of the smaller file (in bytes) when the files are different
+ * sizes and every byte of the smaller file is identical to the
+ * corresponding byte of the larger file. </li>
+ * </ul>
+ *
+ * <p> This method may not be atomic with respect to other file system
+ * operations. This method is always <i>reflexive</i> (for {@code Path f},
+ * {@code mismatch(f,f)} returns {@code -1L}). If the file system and files
+ * remain static, then this method is <i>symmetric</i> (for two {@code Paths f}
+ * and {@code g}, {@code mismatch(f,g)} will return the same value as
+ * {@code mismatch(g,f)}).
+ *
+ * @param path
+ * the path to the first file
+ * @param path2
+ * the path to the second file
+ *
+ * @return the position of the first mismatch or {@code -1L} if no mismatch
+ *
+ * @throws IOException
+ * if an I/O error occurs
+ * @throws SecurityException
+ * In the case of the default provider, and a security manager is
+ * installed, the {@link SecurityManager#checkRead(String) checkRead}
+ * method is invoked to check read access to both files.
+ *
+ * @since 12
+ */
+ public static long mismatch(Path path, Path path2) throws IOException {
+ if (isSameFile(path, path2)) {
+ return -1;
+ }
+ byte[] buffer1 = new byte[BUFFER_SIZE];
+ byte[] buffer2 = new byte[BUFFER_SIZE];
+ try (InputStream in1 = Files.newInputStream(path);
+ InputStream in2 = Files.newInputStream(path2);) {
+ long totalRead = 0;
+ while (true) {
+ int nRead1 = in1.readNBytes(buffer1, 0, BUFFER_SIZE);
+ int nRead2 = in2.readNBytes(buffer2, 0, BUFFER_SIZE);
+
+ int i = Arrays.mismatch(buffer1, 0, nRead1, buffer2, 0, nRead2);
+ if (i > -1) {
+ return totalRead + i;
+ }
+ if (nRead1 < BUFFER_SIZE) {
+ // we've reached the end of the files, but found no mismatch
+ return -1;
+ }
+ totalRead += nRead1;
+ }
+ }
+ }
+
+ /**
* Tells whether or not a file is considered <em>hidden</em>. The exact
* definition of hidden is platform or provider dependent. On UNIX for
* example a file is considered to be hidden if its name begins with a
@@ -2802,8 +2879,6 @@
// -- Utility methods for simple usages --
- // buffer size used for reading and writing
- private static final int BUFFER_SIZE = 8192;
/**
* Opens a file for reading, returning a {@code BufferedReader} that may be
@@ -3128,8 +3203,8 @@
*/
private static final int MAX_BUFFER_SIZE = Integer.MAX_VALUE - 8;
- private static final jdk.internal.misc.JavaLangAccess JLA =
- jdk.internal.misc.SharedSecrets.getJavaLangAccess();
+ private static final jdk.internal.access.JavaLangAccess JLA =
+ jdk.internal.access.SharedSecrets.getJavaLangAccess();
/**
* Reads all the bytes from an input stream. Uses {@code initialSize} as a hint
--- a/src/java.base/share/classes/java/security/AccessController.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/security/AccessController.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,18 @@
package java.security;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.ref.Reference;
import sun.security.util.Debug;
+import sun.security.util.SecurityConstants;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
+import jdk.internal.vm.annotation.DontInline;
+import jdk.internal.vm.annotation.ForceInline;
+import jdk.internal.vm.annotation.ReservedStackAccess;
/**
* <p> The AccessController class is used for access control operations
@@ -296,7 +305,10 @@
*/
@CallerSensitive
- public static native <T> T doPrivileged(PrivilegedAction<T> action);
+ public static <T> T doPrivileged(PrivilegedAction<T> action)
+ {
+ return executePrivileged(action, null, Reflection.getCallerClass());
+ }
/**
* Performs the specified {@code PrivilegedAction} with privileges
@@ -369,8 +381,13 @@
* @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
*/
@CallerSensitive
- public static native <T> T doPrivileged(PrivilegedAction<T> action,
- AccessControlContext context);
+ public static <T> T doPrivileged(PrivilegedAction<T> action,
+ AccessControlContext context)
+ {
+ Class<?> caller = Reflection.getCallerClass();
+ context = checkContext(context, caller);
+ return executePrivileged(action, context, caller);
+ }
/**
@@ -425,7 +442,7 @@
if (perms == null) {
throw new NullPointerException("null permissions parameter");
}
- Class <?> caller = Reflection.getCallerClass();
+ Class<?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(null,
caller, parent, context, perms));
}
@@ -491,7 +508,7 @@
if (perms == null) {
throw new NullPointerException("null permissions parameter");
}
- Class <?> caller = Reflection.getCallerClass();
+ Class<?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(dc, caller,
parent, context, perms));
}
@@ -524,10 +541,20 @@
* @see java.security.DomainCombiner
*/
@CallerSensitive
- public static native <T> T
+ public static <T> T
doPrivileged(PrivilegedExceptionAction<T> action)
- throws PrivilegedActionException;
-
+ throws PrivilegedActionException
+ {
+ AccessControlContext context = null;
+ Class<?> caller = Reflection.getCallerClass();
+ try {
+ return executePrivileged(action, context, caller);
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw wrapException(e);
+ }
+ }
/**
* Performs the specified {@code PrivilegedExceptionAction} with
@@ -587,11 +614,11 @@
AccessControlContext parent, AccessControlContext context,
Permission[] perms)
{
- ProtectionDomain callerPD = getCallerPD(caller);
+ ProtectionDomain callerPD = getProtectionDomain(caller);
// check if caller is authorized to create context
- if (context != null && !context.isAuthorized() &&
- System.getSecurityManager() != null &&
- !callerPD.impliesCreateAccessControlContext())
+ if (System.getSecurityManager() != null &&
+ context != null && !context.isAuthorized() &&
+ !callerPD.implies(SecurityConstants.CREATE_ACC_PERMISSION))
{
return getInnocuousAcc();
} else {
@@ -611,16 +638,7 @@
return AccHolder.innocuousAcc;
}
- private static ProtectionDomain getCallerPD(final Class <?> caller) {
- ProtectionDomain callerPd = doPrivileged
- (new PrivilegedAction<>() {
- public ProtectionDomain run() {
- return caller.getProtectionDomain();
- }
- });
-
- return callerPd;
- }
+ private static native ProtectionDomain getProtectionDomain(final Class<?> caller);
/**
* Performs the specified {@code PrivilegedExceptionAction} with
@@ -659,11 +677,125 @@
* @see #doPrivileged(PrivilegedAction,AccessControlContext)
*/
@CallerSensitive
- public static native <T> T
+ public static <T> T
doPrivileged(PrivilegedExceptionAction<T> action,
AccessControlContext context)
- throws PrivilegedActionException;
+ throws PrivilegedActionException
+ {
+ Class<?> caller = Reflection.getCallerClass();
+ context = checkContext(context, caller);
+ try {
+ return executePrivileged(action, context, caller);
+ } catch (RuntimeException e) {
+ throw e;
+ } catch (Exception e) {
+ throw wrapException(e);
+ }
+ }
+
+ private static AccessControlContext checkContext(AccessControlContext context,
+ Class<?> caller)
+ {
+ // check if caller is authorized to create context
+ if (System.getSecurityManager() != null &&
+ context != null && !context.isAuthorized() &&
+ context != getInnocuousAcc())
+ {
+ ProtectionDomain callerPD = getProtectionDomain(caller);
+ if (callerPD != null && !callerPD.implies(SecurityConstants.CREATE_ACC_PERMISSION)) {
+ return getInnocuousAcc();
+ }
+ }
+ return context;
+ }
+
+ /**
+ * Sanity check that the caller context is indeed privileged.
+ *
+ * Used by executePrivileged to make sure the frame is properly
+ * recognized by the VM.
+ */
+ private static boolean isPrivileged() {
+ AccessControlContext ctx = getStackAccessControlContext();
+ return ctx == null || ctx.isPrivileged();
+ }
+
+ /**
+ * Execute the action as privileged.
+ *
+ * The VM recognizes this method as special, so any changes to the
+ * name or signature require corresponding changes in
+ * getStackAccessControlContext().
+ */
+ @Hidden
+ @ForceInline
+ private static <T> T
+ executePrivileged(PrivilegedAction<T> action,
+ AccessControlContext context,
+ Class<?> caller)
+ {
+ assert isPrivileged(); // sanity check invariant
+ T result = action.run();
+ assert isPrivileged(); // sanity check invariant
+ // Keep these alive across the run() call so they can be
+ // retrieved by getStackAccessControlContext().
+ Reference.reachabilityFence(context);
+ Reference.reachabilityFence(caller);
+ Reference.reachabilityFence(action);
+ return result;
+ }
+
+ /**
+ * Execute the action as privileged.
+ *
+ * The VM recognizes this method as special, so any changes to the
+ * name or signature require corresponding changes in
+ * getStackAccessControlContext().
+ */
+ @Hidden
+ @ForceInline
+ private static <T> T
+ executePrivileged(PrivilegedExceptionAction<T> action,
+ AccessControlContext context,
+ Class<?> caller)
+ throws Exception
+ {
+ assert isPrivileged(); // sanity check invariant
+ T result = action.run();
+ assert isPrivileged(); // sanity check invariant
+
+ // Keep these alive across the run() call so they can be
+ // retrieved by getStackAccessControlContext().
+ Reference.reachabilityFence(context);
+ Reference.reachabilityFence(caller);
+ Reference.reachabilityFence(action);
+ return result;
+ }
+
+
+ /**
+ * Internal marker for hidden implementation frames.
+ */
+ /*non-public*/
+ @Target(ElementType.METHOD)
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface Hidden {
+ }
+
+
+ /**
+ * Wrap an exception. The annotations are used in a best effort to
+ * avoid StackOverflowError in the caller. Inlining the callees as
+ * well and tail-call elimination could also help here, but are not
+ * needed for correctness, only quality of implementation.
+ */
+ @Hidden
+ @ForceInline
+ @ReservedStackAccess
+ private static PrivilegedActionException wrapException(Exception e) {
+ return new PrivilegedActionException(e);
+ }
/**
* Performs the specified {@code PrivilegedExceptionAction} with
@@ -720,7 +852,7 @@
if (perms == null) {
throw new NullPointerException("null permissions parameter");
}
- Class <?> caller = Reflection.getCallerClass();
+ Class<?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(null, caller, parent, context, perms));
}
@@ -789,7 +921,7 @@
if (perms == null) {
throw new NullPointerException("null permissions parameter");
}
- Class <?> caller = Reflection.getCallerClass();
+ Class<?> caller = Reflection.getCallerClass();
return AccessController.doPrivileged(action, createWrapper(dc, caller,
parent, context, perms));
}
--- a/src/java.base/share/classes/java/security/PrivilegedActionException.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/security/PrivilegedActionException.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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,7 +29,7 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.ObjectStreamField;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* This exception is thrown by
--- a/src/java.base/share/classes/java/security/ProtectionDomain.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/security/ProtectionDomain.java Mon Nov 12 11:10:16 2018 +0530
@@ -32,8 +32,8 @@
import java.util.Map;
import java.util.Objects;
import java.util.WeakHashMap;
-import jdk.internal.misc.JavaSecurityAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
+import jdk.internal.access.SharedSecrets;
import sun.security.action.GetPropertyAction;
import sun.security.provider.PolicyFile;
import sun.security.util.Debug;
@@ -394,11 +394,6 @@
return false;
}
- // called by the VM -- do not remove
- boolean impliesCreateAccessControlContext() {
- return implies(SecurityConstants.CREATE_ACC_PERMISSION);
- }
-
/**
* Convert a ProtectionDomain to a String.
*/
--- a/src/java.base/share/classes/java/security/Security.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/security/Security.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,7 +30,7 @@
import java.io.*;
import java.net.URL;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.util.StaticProperty;
import sun.security.util.Debug;
import sun.security.util.PropertyExpander;
--- a/src/java.base/share/classes/java/util/ArrayDeque.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/ArrayDeque.java Mon Nov 12 11:10:16 2018 +0530
@@ -37,8 +37,8 @@
import java.io.Serializable;
import java.util.function.Consumer;
import java.util.function.Predicate;
-import java.util.function.UnaryOperator;
-import jdk.internal.misc.SharedSecrets;
+
+import jdk.internal.access.SharedSecrets;
/**
* Resizable-array implementation of the {@link Deque} interface. Array
--- a/src/java.base/share/classes/java/util/ArrayList.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/ArrayList.java Mon Nov 12 11:10:16 2018 +0530
@@ -28,7 +28,7 @@
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* Resizable-array implementation of the {@code List} interface. Implements
--- a/src/java.base/share/classes/java/util/EnumMap.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/EnumMap.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
package java.util;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* A specialized {@link Map} implementation for use with enum type keys. All
--- a/src/java.base/share/classes/java/util/EnumSet.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/EnumSet.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
package java.util;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* A specialized {@link Set} implementation for use with enum types. All of
--- a/src/java.base/share/classes/java/util/HashMap.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/HashMap.java Mon Nov 12 11:10:16 2018 +0530
@@ -34,7 +34,7 @@
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* Hash table based implementation of the {@code Map} interface. This
--- a/src/java.base/share/classes/java/util/HashSet.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/HashSet.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,7 @@
package java.util;
import java.io.InvalidObjectException;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* This class implements the {@code Set} interface, backed by a hash table
--- a/src/java.base/share/classes/java/util/Hashtable.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/Hashtable.java Mon Nov 12 11:10:16 2018 +0530
@@ -29,7 +29,7 @@
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.function.BiFunction;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* This class implements a hash table, which maps keys to values. Any
--- a/src/java.base/share/classes/java/util/IdentityHashMap.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/IdentityHashMap.java Mon Nov 12 11:10:16 2018 +0530
@@ -29,7 +29,7 @@
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* This class implements the {@code Map} interface with a hash table, using
--- a/src/java.base/share/classes/java/util/ImmutableCollections.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/ImmutableCollections.java Mon Nov 12 11:10:16 2018 +0530
@@ -35,7 +35,7 @@
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.vm.annotation.Stable;
--- a/src/java.base/share/classes/java/util/PriorityQueue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/PriorityQueue.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,7 +27,7 @@
import java.util.function.Consumer;
import java.util.function.Predicate;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* An unbounded priority {@linkplain Queue queue} based on a priority heap.
--- a/src/java.base/share/classes/java/util/Properties.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/Properties.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -46,7 +46,7 @@
import java.util.function.BiFunction;
import java.util.function.Function;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.Unsafe;
import jdk.internal.util.xml.PropertiesDefaultHandler;
--- a/src/java.base/share/classes/java/util/ResourceBundle.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java Mon Nov 12 11:10:16 2018 +0530
@@ -66,8 +66,8 @@
import java.util.stream.Stream;
import jdk.internal.loader.BootLoader;
-import jdk.internal.misc.JavaUtilResourceBundleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaUtilResourceBundleAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import sun.security.action.GetPropertyAction;
--- a/src/java.base/share/classes/java/util/ServiceLoader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/ServiceLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -47,8 +47,8 @@
import jdk.internal.loader.BootLoader;
import jdk.internal.loader.ClassLoaders;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.module.ServicesCatalog;
import jdk.internal.module.ServicesCatalog.ServiceProvider;
--- a/src/java.base/share/classes/java/util/UUID.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/UUID.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -27,8 +27,8 @@
import java.security.*;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
/**
* A class that represents an immutable universally unique identifier (UUID).
--- a/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java Mon Nov 12 11:10:16 2018 +0530
@@ -51,7 +51,7 @@
import java.util.function.Consumer;
import java.util.function.Predicate;
import java.util.function.UnaryOperator;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* A thread-safe variant of {@link java.util.ArrayList} in which all mutative
--- a/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/concurrent/PriorityBlockingQueue.java Mon Nov 12 11:10:16 2018 +0530
@@ -52,7 +52,7 @@
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Consumer;
import java.util.function.Predicate;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* An unbounded {@linkplain BlockingQueue blocking queue} that uses
--- a/src/java.base/share/classes/java/util/jar/JarFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/jar/JarFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,8 +25,8 @@
package java.util.jar;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaUtilZipFileAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaUtilZipFileAccess;
import sun.security.action.GetPropertyAction;
import sun.security.util.ManifestEntryVerifier;
import sun.security.util.SignatureFileVerifier;
@@ -172,7 +172,7 @@
// Set up JavaUtilJarAccess in SharedSecrets
SharedSecrets.setJavaUtilJarAccess(new JavaUtilJarAccessImpl());
// Get JavaUtilZipFileAccess from SharedSecrets
- JUZFA = jdk.internal.misc.SharedSecrets.getJavaUtilZipFileAccess();
+ JUZFA = SharedSecrets.getJavaUtilZipFileAccess();
// multi-release jar file versions >= 9
BASE_VERSION = Runtime.Version.parse(Integer.toString(8));
BASE_VERSION_FEATURE = BASE_VERSION.feature();
--- a/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/jar/JavaUtilJarAccessImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,7 +30,7 @@
import java.security.CodeSource;
import java.util.Enumeration;
import java.util.List;
-import jdk.internal.misc.JavaUtilJarAccess;
+import jdk.internal.access.JavaUtilJarAccess;
class JavaUtilJarAccessImpl implements JavaUtilJarAccess {
public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException {
--- a/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/spi/AbstractResourceBundleProvider.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
package java.util.spi;
-import jdk.internal.misc.JavaUtilResourceBundleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaUtilResourceBundleAccess;
+import jdk.internal.access.SharedSecrets;
import java.io.IOException;
import java.io.InputStream;
--- a/src/java.base/share/classes/java/util/zip/ZipCoder.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/zip/ZipCoder.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, 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
@@ -41,8 +41,8 @@
class ZipCoder {
- private static final jdk.internal.misc.JavaLangAccess JLA =
- jdk.internal.misc.SharedSecrets.getJavaLangAccess();
+ private static final jdk.internal.access.JavaLangAccess JLA =
+ jdk.internal.access.SharedSecrets.getJavaLangAccess();
static final class UTF8 extends ZipCoder {
--- a/src/java.base/share/classes/java/util/zip/ZipFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/java/util/zip/ZipFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -58,9 +58,9 @@
import java.util.jar.JarEntry;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.JavaUtilZipFileAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.JavaUtilZipFileAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.perf.PerfCounter;
import jdk.internal.ref.CleanerFactory;
@@ -1071,7 +1071,7 @@
}
}
);
- JLA = jdk.internal.misc.SharedSecrets.getJavaLangAccess();
+ JLA = SharedSecrets.getJavaLangAccess();
isWindows = VM.getSavedProperty("os.name").contains("Windows");
}
--- a/src/java.base/share/classes/javax/crypto/Cipher.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/javax/crypto/Cipher.java Mon Nov 12 11:10:16 2018 +0530
@@ -492,6 +492,12 @@
* <p> Note that the list of registered providers may be retrieved via
* the {@link Security#getProviders() Security.getProviders()} method.
*
+ * @apiNote
+ * It is recommended to use a transformation that fully specifies the
+ * algorithm, mode, and padding. By not doing so, the provider will
+ * use a default for the mode and padding which may not meet the security
+ * requirements of your application.
+ *
* @implNote
* The JDK Reference Implementation additionally uses the
* {@code jdk.security.provider.preferred}
@@ -499,6 +505,9 @@
* the preferred provider order for the specified algorithm. This
* may be different than the order of providers returned by
* {@link Security#getProviders() Security.getProviders()}.
+ * See also the Cipher Transformations section of the {@extLink
+ * security_guide_jdk_providers JDK Providers} document for information
+ * on the transformation defaults used by JDK providers.
*
* @param transformation the name of the transformation, e.g.,
* <i>AES/CBC/PKCS5Padding</i>.
@@ -578,6 +587,17 @@
* <p> Note that the list of registered providers may be retrieved via
* the {@link Security#getProviders() Security.getProviders()} method.
*
+ * @apiNote
+ * It is recommended to use a transformation that fully specifies the
+ * algorithm, mode, and padding. By not doing so, the provider will
+ * use a default for the mode and padding which may not meet the security
+ * requirements of your application.
+ *
+ * @implNote
+ * See the Cipher Transformations section of the {@extLink
+ * security_guide_jdk_providers JDK Providers} document for information
+ * on the transformation defaults used by JDK providers.
+ *
* @param transformation the name of the transformation,
* e.g., <i>AES/CBC/PKCS5Padding</i>.
* See the Cipher section in the <a href=
@@ -638,6 +658,17 @@
* object is returned. Note that the specified Provider object
* does not have to be registered in the provider list.
*
+ * @apiNote
+ * It is recommended to use a transformation that fully specifies the
+ * algorithm, mode, and padding. By not doing so, the provider will
+ * use a default for the mode and padding which may not meet the security
+ * requirements of your application.
+ *
+ * @implNote
+ * See the Cipher Transformations section of the {@extLink
+ * security_guide_jdk_providers JDK Providers} document for information
+ * on the transformation defaults used by JDK providers.
+ *
* @param transformation the name of the transformation,
* e.g., <i>AES/CBC/PKCS5Padding</i>.
* See the Cipher section in the <a href=
--- a/src/java.base/share/classes/javax/crypto/SealedObject.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/javax/crypto/SealedObject.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
package javax.crypto;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import java.io.*;
import java.security.AlgorithmParameters;
--- a/src/java.base/share/classes/javax/net/ssl/HttpsURLConnection.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/javax/net/ssl/HttpsURLConnection.java Mon Nov 12 11:10:16 2018 +0530
@@ -29,6 +29,7 @@
import java.net.HttpURLConnection;
import java.security.Principal;
import java.security.cert.X509Certificate;
+import java.util.Optional;
/**
* <code>HttpsURLConnection</code> extends <code>HttpURLConnection</code>
@@ -52,9 +53,7 @@
*
* @since 1.4
*/
-public abstract
-class HttpsURLConnection extends HttpURLConnection
-{
+public abstract class HttpsURLConnection extends HttpURLConnection {
/**
* Creates an <code>HttpsURLConnection</code> using the
* URL specified.
@@ -378,4 +377,29 @@
public SSLSocketFactory getSSLSocketFactory() {
return sslSocketFactory;
}
+
+ /**
+ * Returns an {@link Optional} containing the {@code SSLSession} in
+ * use on this connection. Returns an empty {@code Optional} if the
+ * underlying implementation does not support this method.
+ *
+ * @implSpec For compatibility, the default implementation of this
+ * method returns an empty {@code Optional}. Subclasses
+ * should override this method with an appropriate
+ * implementation since an application may need to access
+ * additional parameters associated with the SSL session.
+ *
+ * @return an {@link Optional} containing the {@code SSLSession} in
+ * use on this connection.
+ *
+ * @throws IllegalStateException if this method is called before
+ * the connection has been established
+ *
+ * @see SSLSession
+ *
+ * @since 12
+ */
+ public Optional<SSLSession> getSSLSession() {
+ return Optional.empty();
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaAWTAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+public interface JavaAWTAccess {
+
+ // Returns the AppContext used for applet logging isolation, or null if
+ // no isolation is required.
+ // If there's no applet, or if the caller is a stand alone application,
+ // or running in the main app context, returns null.
+ // Otherwise, returns the AppContext of the calling applet.
+ public Object getAppletContext();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaAWTFontAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * SharedSecrets interface used for the access from java.text.Bidi
+ */
+
+package jdk.internal.access;
+
+public interface JavaAWTFontAccess {
+
+ // java.awt.font.TextAttribute constants
+ public Object getTextAttributeConstant(String name);
+
+ // java.awt.font.NumericShaper
+ public void shape(Object shaper, char[] text, int start, int count);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaBeansAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+public interface JavaBeansAccess {
+ /**
+ * Returns the getter method for a property of the given name
+ * @param clazz The JavaBeans class
+ * @param property The property name
+ * @return The resolved property getter method
+ * @throws Exception
+ */
+ Method getReadMethod(Class<?> clazz, String property) throws Exception;
+
+ /**
+ * Return the <b>value</b> attribute of the associated
+ * <code>@ConstructorProperties</code> annotation if that is present.
+ * @param ctr The constructor to extract the annotation value from
+ * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
+ * annotation or {@code null} if the constructor is not annotated by
+ * this annotation or the annotation is not accessible.
+ */
+ String[] getConstructorPropertiesValue(Constructor<?> ctr);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaIOAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.Console;
+import java.nio.charset.Charset;
+
+public interface JavaIOAccess {
+ public Console console();
+ public Charset charset();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaIOFileDescriptorAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.access;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+
+import jdk.internal.ref.PhantomCleanable;
+
+/*
+ * @author Chris Hegarty
+ */
+
+public interface JavaIOFileDescriptorAccess {
+ public void set(FileDescriptor fdo, int fd);
+ public int get(FileDescriptor fdo);
+ public void setAppend(FileDescriptor fdo, boolean append);
+ public boolean getAppend(FileDescriptor fdo);
+ public void close(FileDescriptor fdo) throws IOException;
+ public void registerCleanup(FileDescriptor fdo);
+ public void registerCleanup(FileDescriptor fdo, PhantomCleanable<FileDescriptor> cleanable);
+ public void unregisterCleanup(FileDescriptor fdo);
+
+ // Only valid on Windows
+ public void setHandle(FileDescriptor fdo, long handle);
+ public long getHandle(FileDescriptor fdo);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaIOFilePermissionAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.access;
+
+import java.io.FilePermission;
+
+public interface JavaIOFilePermissionAccess {
+
+ /**
+ * Returns a new FilePermission plus an alternative path.
+ *
+ * @param input the input
+ * @return the new FilePermission plus the alt path (as npath2)
+ * or the input itself if no alt path is available.
+ */
+ FilePermission newPermPlusAltPath(FilePermission input);
+
+ /**
+ * Returns a new FilePermission using an alternative path.
+ *
+ * @param input the input
+ * @return the new FilePermission using the alt path (as npath)
+ * or null if no alt path is available
+ */
+ FilePermission newPermUsingAltPath(FilePermission input);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaIORandomAccessFileAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+public interface JavaIORandomAccessFileAccess {
+ public RandomAccessFile openAndDelete(File file, String mode)
+ throws IOException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.lang.annotation.Annotation;
+import java.lang.module.ModuleDescriptor;
+import java.lang.reflect.Executable;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.security.AccessControlContext;
+import java.security.ProtectionDomain;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Stream;
+
+import jdk.internal.module.ServicesCatalog;
+import jdk.internal.reflect.ConstantPool;
+import sun.reflect.annotation.AnnotationType;
+import sun.nio.ch.Interruptible;
+
+public interface JavaLangAccess {
+
+ /**
+ * Returns the list of {@code Method} objects for the declared public
+ * methods of this class or interface that have the specified method name
+ * and parameter types.
+ */
+ List<Method> getDeclaredPublicMethods(Class<?> klass, String name, Class<?>... parameterTypes);
+
+ /**
+ * Return the constant pool for a class.
+ */
+ ConstantPool getConstantPool(Class<?> klass);
+
+ /**
+ * Compare-And-Set the AnnotationType instance corresponding to this class.
+ * (This method only applies to annotation types.)
+ */
+ boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
+
+ /**
+ * Get the AnnotationType instance corresponding to this class.
+ * (This method only applies to annotation types.)
+ */
+ AnnotationType getAnnotationType(Class<?> klass);
+
+ /**
+ * Get the declared annotations for a given class, indexed by their types.
+ */
+ Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
+
+ /**
+ * Get the array of bytes that is the class-file representation
+ * of this Class' annotations.
+ */
+ byte[] getRawClassAnnotations(Class<?> klass);
+
+ /**
+ * Get the array of bytes that is the class-file representation
+ * of this Class' type annotations.
+ */
+ byte[] getRawClassTypeAnnotations(Class<?> klass);
+
+ /**
+ * Get the array of bytes that is the class-file representation
+ * of this Executable's type annotations.
+ */
+ byte[] getRawExecutableTypeAnnotations(Executable executable);
+
+ /**
+ * Returns the elements of an enum class or null if the
+ * Class object does not represent an enum type;
+ * the result is uncloned, cached, and shared by all callers.
+ */
+ <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
+
+ /**
+ * Set current thread's blocker field.
+ */
+ void blockedOn(Interruptible b);
+
+ /**
+ * Registers a shutdown hook.
+ *
+ * It is expected that this method with registerShutdownInProgress=true
+ * is only used to register DeleteOnExitHook since the first file
+ * may be added to the delete on exit list by the application shutdown
+ * hooks.
+ *
+ * @param slot the slot in the shutdown hook array, whose element
+ * will be invoked in order during shutdown
+ * @param registerShutdownInProgress true to allow the hook
+ * to be registered even if the shutdown is in progress.
+ * @param hook the hook to be registered
+ *
+ * @throws IllegalStateException if shutdown is in progress and
+ * the slot is not valid to register.
+ */
+ void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
+
+ /**
+ * Returns a new Thread with the given Runnable and an
+ * inherited AccessControlContext.
+ */
+ Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
+
+ /**
+ * Invokes the finalize method of the given object.
+ */
+ void invokeFinalize(Object o) throws Throwable;
+
+ /**
+ * Returns the ConcurrentHashMap used as a storage for ClassLoaderValue(s)
+ * associated with the given class loader, creating it if it doesn't already exist.
+ */
+ ConcurrentHashMap<?, ?> createOrGetClassLoaderValueMap(ClassLoader cl);
+
+ /**
+ * Defines a class with the given name to a class loader.
+ */
+ Class<?> defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source);
+
+ /**
+ * Returns a class loaded by the bootstrap class loader.
+ */
+ Class<?> findBootstrapClassOrNull(ClassLoader cl, String name);
+
+ /**
+ * Define a Package of the given name and module by the given class loader.
+ */
+ Package definePackage(ClassLoader cl, String name, Module module);
+
+ /**
+ * Invokes Long.fastUUID
+ */
+ String fastUUID(long lsb, long msb);
+
+ /**
+ * Record the non-exported packages of the modules in the given layer
+ */
+ void addNonExportedPackages(ModuleLayer layer);
+
+ /**
+ * Invalidate package access cache
+ */
+ void invalidatePackageAccessCache();
+
+ /**
+ * Defines a new module to the Java virtual machine. The module
+ * is defined to the given class loader.
+ *
+ * The URI is for information purposes only, it can be {@code null}.
+ */
+ Module defineModule(ClassLoader loader, ModuleDescriptor descriptor, URI uri);
+
+ /**
+ * Defines the unnamed module for the given class loader.
+ */
+ Module defineUnnamedModule(ClassLoader loader);
+
+ /**
+ * Updates the readability so that module m1 reads m2. The new read edge
+ * does not result in a strong reference to m2 (m2 can be GC'ed).
+ *
+ * This method is the same as m1.addReads(m2) but without a permission check.
+ */
+ void addReads(Module m1, Module m2);
+
+ /**
+ * Updates module m to read all unnamed modules.
+ */
+ void addReadsAllUnnamed(Module m);
+
+ /**
+ * Updates module m1 to export a package to module m2. The export does
+ * not result in a strong reference to m2 (m2 can be GC'ed).
+ */
+ void addExports(Module m1, String pkg, Module m2);
+
+ /**
+ * Updates a module m to export a package to all unnamed modules.
+ */
+ void addExportsToAllUnnamed(Module m, String pkg);
+
+ /**
+ * Updates module m1 to open a package to module m2. Opening the
+ * package does not result in a strong reference to m2 (m2 can be GC'ed).
+ */
+ void addOpens(Module m1, String pkg, Module m2);
+
+ /**
+ * Updates module m to open a package to all unnamed modules.
+ */
+ void addOpensToAllUnnamed(Module m, String pkg);
+
+ /**
+ * Updates module m to open all packages returned by the given iterator.
+ */
+ void addOpensToAllUnnamed(Module m, Iterator<String> packages);
+
+ /**
+ * Updates module m to use a service.
+ */
+ void addUses(Module m, Class<?> service);
+
+ /**
+ * Returns true if module m reflectively exports a package to other
+ */
+ boolean isReflectivelyExported(Module module, String pn, Module other);
+
+ /**
+ * Returns true if module m reflectively opens a package to other
+ */
+ boolean isReflectivelyOpened(Module module, String pn, Module other);
+
+ /**
+ * Returns the ServicesCatalog for the given Layer.
+ */
+ ServicesCatalog getServicesCatalog(ModuleLayer layer);
+
+ /**
+ * Returns an ordered stream of layers. The first element is the
+ * given layer, the remaining elements are its parents, in DFS order.
+ */
+ Stream<ModuleLayer> layers(ModuleLayer layer);
+
+ /**
+ * Returns a stream of the layers that have modules defined to the
+ * given class loader.
+ */
+ Stream<ModuleLayer> layers(ClassLoader loader);
+
+ /**
+ * Constructs a new {@code String} by decoding the specified subarray of
+ * bytes using the specified {@linkplain java.nio.charset.Charset charset}.
+ *
+ * The caller of this method shall relinquish and transfer the ownership of
+ * the byte array to the callee since the later will not make a copy.
+ *
+ * @param bytes the byte array source
+ * @param cs the Charset
+ * @return the newly created string
+ * @throws CharacterCodingException for malformed or unmappable bytes
+ */
+ String newStringNoRepl(byte[] bytes, Charset cs) throws CharacterCodingException;
+
+ /**
+ * Encode the given string into a sequence of bytes using the specified Charset.
+ *
+ * This method avoids copying the String's internal representation if the input
+ * is ASCII.
+ *
+ * This method throws CharacterCodingException instead of replacing when
+ * malformed input or unmappable characters are encountered.
+ *
+ * @param s the string to encode
+ * @param cs the charset
+ * @return the encoded bytes
+ * @throws CharacterCodingException for malformed input or unmappable characters
+ */
+ byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
+
+ /**
+ * Returns a new string by decoding from the given utf8 bytes array.
+ *
+ * @param off the index of the first byte to decode
+ * @param len the number of bytes to decode
+ * @return the newly created string
+ * @throws IllegalArgumentException for malformed or unmappable bytes.
+ */
+ String newStringUTF8NoRepl(byte[] bytes, int off, int len);
+
+ /**
+ * Encode the given string into a sequence of bytes using utf8.
+ *
+ * @param s the string to encode
+ * @return the encoded bytes in utf8
+ * @throws IllegalArgumentException for malformed surrogates
+ */
+ byte[] getBytesUTF8NoRepl(String s);
+
+ /**
+ * Set the cause of Throwable
+ * @param cause set t's cause to new value
+ */
+ void setCause(Throwable t, Throwable cause);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaLangInvokeAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.lang.invoke.MethodType;
+import java.util.Map;
+
+public interface JavaLangInvokeAccess {
+ /**
+ * Create a new MemberName instance. Used by {@code StackFrameInfo}.
+ */
+ Object newMemberName();
+
+ /**
+ * Returns the name for the given MemberName. Used by {@code StackFrameInfo}.
+ */
+ String getName(Object mname);
+
+ /**
+ * Returns the {@code MethodType} for the given MemberName.
+ * Used by {@code StackFrameInfo}.
+ */
+ MethodType getMethodType(Object mname);
+
+ /**
+ * Returns the descriptor for the given MemberName.
+ * Used by {@code StackFrameInfo}.
+ */
+ String getMethodDescriptor(Object mname);
+
+ /**
+ * Returns {@code true} if the given MemberName is a native method.
+ * Used by {@code StackFrameInfo}.
+ */
+ boolean isNative(Object mname);
+
+ /**
+ * Returns the declaring class for the given MemberName.
+ * Used by {@code StackFrameInfo}.
+ */
+ Class<?> getDeclaringClass(Object mname);
+
+ /**
+ * Returns a {@code byte[]} representation of a class implementing
+ * DirectMethodHandle of each pairwise combination of {@code MethodType} and
+ * an {@code int} representing method type. Used by
+ * GenerateJLIClassesPlugin to generate such a class during the jlink phase.
+ */
+ byte[] generateDirectMethodHandleHolderClassBytes(String className,
+ MethodType[] methodTypes, int[] types);
+
+ /**
+ * Returns a {@code byte[]} representation of a class implementing
+ * DelegatingMethodHandles of each {@code MethodType} kind in the
+ * {@code methodTypes} argument. Used by GenerateJLIClassesPlugin to
+ * generate such a class during the jlink phase.
+ */
+ byte[] generateDelegatingMethodHandleHolderClassBytes(String className,
+ MethodType[] methodTypes);
+
+ /**
+ * Returns a {@code byte[]} representation of {@code BoundMethodHandle}
+ * species class implementing the signature defined by {@code types}. Used
+ * by GenerateJLIClassesPlugin to enable generation of such classes during
+ * the jlink phase. Should do some added validation since this string may be
+ * user provided.
+ */
+ Map.Entry<String, byte[]> generateConcreteBMHClassBytes(
+ final String types);
+
+ /**
+ * Returns a {@code byte[]} representation of a class implementing
+ * the zero and identity forms of all {@code LambdaForm.BasicType}s.
+ */
+ byte[] generateBasicFormsClassBytes(final String className);
+
+ /**
+ * Returns a {@code byte[]} representation of a class implementing
+ * the invoker forms for the set of supplied {@code invokerMethodTypes}
+ * and {@code callSiteMethodTypes}.
+ */
+ byte[] generateInvokersHolderClassBytes(String className,
+ MethodType[] invokerMethodTypes,
+ MethodType[] callSiteMethodTypes);
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaLangModuleAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.PrintStream;
+import java.lang.module.Configuration;
+import java.lang.module.ModuleDescriptor;
+import java.lang.module.ModuleDescriptor.Exports;
+import java.lang.module.ModuleDescriptor.Opens;
+import java.lang.module.ModuleDescriptor.Requires;
+import java.lang.module.ModuleDescriptor.Provides;
+import java.lang.module.ModuleDescriptor.Version;
+import java.lang.module.ModuleFinder;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Provides access to non-public methods in java.lang.module.
+ */
+
+public interface JavaLangModuleAccess {
+
+ /**
+ * Creates a builder for building a module with the given module name.
+ *
+ * @param strict
+ * Indicates whether module names are checked or not
+ */
+ ModuleDescriptor.Builder newModuleBuilder(String mn,
+ boolean strict,
+ Set<ModuleDescriptor.Modifier> ms);
+
+ /**
+ * Returns a snapshot of the packages in the module.
+ */
+ Set<String> packages(ModuleDescriptor.Builder builder);
+
+ /**
+ * Adds a dependence on a module with the given (possibly un-parsable)
+ * version string.
+ */
+ void requires(ModuleDescriptor.Builder builder,
+ Set<Requires.Modifier> ms,
+ String mn,
+ String rawCompiledVersion);
+
+ /**
+ * Returns a {@code ModuleDescriptor.Requires} of the given modifiers
+ * and module name.
+ */
+ Requires newRequires(Set<Requires.Modifier> ms, String mn, Version v);
+
+ /**
+ * Returns an unqualified {@code ModuleDescriptor.Exports}
+ * of the given modifiers and package name source.
+ */
+ Exports newExports(Set<Exports.Modifier> ms,
+ String source);
+
+ /**
+ * Returns a qualified {@code ModuleDescriptor.Exports}
+ * of the given modifiers, package name source and targets.
+ */
+ Exports newExports(Set<Exports.Modifier> ms,
+ String source,
+ Set<String> targets);
+
+ /**
+ * Returns an unqualified {@code ModuleDescriptor.Opens}
+ * of the given modifiers and package name source.
+ */
+ Opens newOpens(Set<Opens.Modifier> ms, String source);
+
+ /**
+ * Returns a qualified {@code ModuleDescriptor.Opens}
+ * of the given modifiers, package name source and targets.
+ */
+ Opens newOpens(Set<Opens.Modifier> ms, String source, Set<String> targets);
+
+ /**
+ * Returns a {@code ModuleDescriptor.Provides}
+ * of the given service name and providers.
+ */
+ Provides newProvides(String service, List<String> providers);
+
+ /**
+ * Returns a new {@code ModuleDescriptor} instance.
+ */
+ ModuleDescriptor newModuleDescriptor(String name,
+ Version version,
+ Set<ModuleDescriptor.Modifier> ms,
+ Set<Requires> requires,
+ Set<Exports> exports,
+ Set<Opens> opens,
+ Set<String> uses,
+ Set<Provides> provides,
+ Set<String> packages,
+ String mainClass,
+ int hashCode);
+
+ /**
+ * Resolves a collection of root modules, with service binding
+ * and the empty configuration as the parent.
+ */
+ Configuration resolveAndBind(ModuleFinder finder,
+ Collection<String> roots,
+ PrintStream traceOutput);
+
+ /**
+ * Creates a configuration from a pre-generated readability graph.
+ */
+ Configuration newConfiguration(ModuleFinder finder,
+ Map<String, Set<String>> graph);
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaLangRefAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+public interface JavaLangRefAccess {
+
+ /**
+ * Wait for progress in {@link java.lang.ref.Reference}
+ * processing. If there aren't any pending {@link
+ * java.lang.ref.Reference}s, return immediately.
+ *
+ * @return {@code true} if there were any pending
+ * {@link java.lang.ref.Reference}s, {@code false} otherwise.
+ */
+ boolean waitForReferenceProcessing() throws InterruptedException;
+
+ /**
+ * Runs the finalization methods of any objects pending finalization.
+ *
+ * Invoked by Runtime.runFinalization()
+ */
+ void runFinalization();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetHttpCookieAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.net.HttpCookie;
+import java.util.List;
+
+public interface JavaNetHttpCookieAccess {
+ /*
+ * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
+ * retaining the original header String in the cookie itself.
+ */
+ public List<HttpCookie> parse(String header);
+
+ /*
+ * Returns the original header this cookie was constructed from, if it was
+ * constructed by parsing a header, otherwise null.
+ */
+ public String header(HttpCookie cookie);
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetInetAddressAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public interface JavaNetInetAddressAccess {
+ /**
+ * Return the original application specified hostname of
+ * the given InetAddress object.
+ */
+ String getOriginalHostName(InetAddress ia);
+
+ /**
+ * Get the InetAddress of the provided host. If an InetAddress is provided
+ * then it will be the default address returned for all calls to either
+ * form of getByName. This is required to maintain consistency when
+ * caching addresses and hostnames.
+ */
+ InetAddress getByName(String hostName, InetAddress hostAddress)
+ throws UnknownHostException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetSocketAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.net.ServerSocket;
+import java.net.SocketImpl;
+
+public interface JavaNetSocketAccess {
+ /**
+ * Creates a ServerSocket associated with the given SocketImpl.
+ */
+ ServerSocket newServerSocket(SocketImpl impl);
+
+ /*
+ * Constructs a SocketImpl instance of the given class.
+ */
+ SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetURLAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.access;
+
+import java.net.URL;
+import java.net.URLStreamHandler;
+
+public interface JavaNetURLAccess {
+ URLStreamHandler getHandler(URL u);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetURLClassLoaderAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.net.URLClassLoader;
+import java.security.AccessControlContext;
+
+public interface JavaNetURLClassLoaderAccess {
+ AccessControlContext getAccessControlContext(URLClassLoader u);;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNetUriAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.net.URI;
+
+public interface JavaNetUriAccess {
+ /**
+ * Create a URI of pre-validated scheme and path.
+ */
+ URI create(String scheme, String path);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.nio.Buffer;
+import java.nio.ByteBuffer;
+
+public interface JavaNioAccess {
+ /**
+ * Provides access to information on buffer usage.
+ */
+ interface BufferPool {
+ String getName();
+ long getCount();
+ long getTotalCapacity();
+ long getMemoryUsed();
+ }
+ BufferPool getDirectBufferPool();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaObjectInputFilterAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.ObjectInputFilter;
+
+/**
+ * Access to the alternative ObjectInputFilter.Config.createFilter2 for RMI.
+ */
+public interface JavaObjectInputFilterAccess {
+ /**
+ * Creates a filter from the pattern.
+ */
+ ObjectInputFilter createFilter2(String pattern);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaObjectInputStreamAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.InvalidClassException;
+import java.io.ObjectInputStream;
+
+/**
+ * Interface to specify methods for accessing {@code ObjectInputStream}.
+ */
+@FunctionalInterface
+public interface JavaObjectInputStreamAccess {
+ void checkArray(ObjectInputStream ois, Class<?> arrayType, int arrayLength)
+ throws InvalidClassException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaSecurityAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.security.AccessControlContext;
+import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
+import java.security.ProtectionDomain;
+
+public interface JavaSecurityAccess {
+
+ <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+ AccessControlContext stack,
+ AccessControlContext context);
+
+ <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
+ AccessControlContext context);
+
+ ProtectionDomain[] getProtectDomains(AccessControlContext context);
+
+ interface ProtectionDomainCache {
+ void put(ProtectionDomain pd, PermissionCollection pc);
+ PermissionCollection get(ProtectionDomain pd);
+ }
+
+ /**
+ * Returns the ProtectionDomainCache.
+ */
+ ProtectionDomainCache getProtectionDomainCache();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaUtilJarAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.IOException;
+import java.net.URL;
+import java.security.CodeSource;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.jar.Attributes;
+import java.util.jar.JarEntry;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+public interface JavaUtilJarAccess {
+ public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
+ public CodeSource[] getCodeSources(JarFile jar, URL url);
+ public CodeSource getCodeSource(JarFile jar, URL url, String name);
+ public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
+ public Enumeration<JarEntry> entries2(JarFile jar);
+ public void setEagerValidation(JarFile jar, boolean eager);
+ public List<Object> getManifestDigests(JarFile jar);
+ public Attributes getTrustedAttributes(Manifest man, String name);
+ public void ensureInitialization(JarFile jar);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaUtilResourceBundleAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+/**
+ * Provides access to non-public methods in java.util.ResourceBundle.
+ */
+public interface JavaUtilResourceBundleAccess {
+ /**
+ * Sets the bundle's parent to the given parent.
+ */
+ void setParent(ResourceBundle bundle, ResourceBundle parent);
+
+ /**
+ * Returns the parent of the given bundle or null if the bundle has no parent.
+ */
+ ResourceBundle getParent(ResourceBundle bundle);
+
+ /**
+ * Sets the bundle's locale to the given locale.
+ */
+ void setLocale(ResourceBundle bundle, Locale locale);
+
+ /**
+ * Sets the bundle's base name to the given name.
+ */
+ void setName(ResourceBundle bundle, String name);
+
+ /**
+ * Returns a {@code ResourceBundle} of the given baseName and locale
+ * loaded on behalf of the given module with no caller module
+ * access check.
+ */
+ ResourceBundle getBundle(String baseName, Locale locale, Module module);
+
+ /**
+ * Instantiates a {@code ResourceBundle} of the given bundle class.
+ */
+ ResourceBundle newResourceBundle(Class<? extends ResourceBundle> bundleClass);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaUtilZipFileAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.function.Function;
+import java.util.jar.JarEntry;
+import java.util.stream.Stream;
+import java.util.zip.ZipFile;
+
+public interface JavaUtilZipFileAccess {
+ public boolean startsWithLocHeader(ZipFile zip);
+ public String[] getMetaInfEntryNames(ZipFile zip);
+ public JarEntry getEntry(ZipFile zip, String name, Function<String, JarEntry> func);
+ public Enumeration<JarEntry> entries(ZipFile zip, Function<String, JarEntry> func);
+ public Stream<JarEntry> stream(ZipFile zip, Function<String, JarEntry> func);
+ public Stream<String> entryNameStream(ZipFile zip);
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/JavaxCryptoSealedObjectAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package jdk.internal.access;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.SealedObject;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+
+public interface JavaxCryptoSealedObjectAccess {
+ ObjectInputStream getExtObjectInputStream(
+ SealedObject sealed, Cipher cipher)
+ throws BadPaddingException, IllegalBlockSizeException, IOException;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/access/SharedSecrets.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.access;
+
+import javax.crypto.SealedObject;
+import java.io.ObjectInputFilter;
+import java.lang.module.ModuleDescriptor;
+import java.util.ResourceBundle;
+import java.util.jar.JarFile;
+import java.io.Console;
+import java.io.FileDescriptor;
+import java.io.FilePermission;
+import java.io.ObjectInputStream;
+import java.io.RandomAccessFile;
+import java.security.ProtectionDomain;
+import jdk.internal.misc.Unsafe;
+
+/** A repository of "shared secrets", which are a mechanism for
+ calling implementation-private methods in another package without
+ using reflection. A package-private class implements a public
+ interface and provides the ability to call package-private methods
+ within that package; the object implementing that interface is
+ provided through a third package to which access is restricted.
+ This framework avoids the primary disadvantage of using reflection
+ for this purpose, namely the loss of compile-time checking. */
+
+public class SharedSecrets {
+ private static final Unsafe unsafe = Unsafe.getUnsafe();
+ private static JavaUtilJarAccess javaUtilJarAccess;
+ private static JavaLangAccess javaLangAccess;
+ private static JavaLangModuleAccess javaLangModuleAccess;
+ private static JavaLangInvokeAccess javaLangInvokeAccess;
+ private static JavaLangRefAccess javaLangRefAccess;
+ private static JavaIOAccess javaIOAccess;
+ private static JavaNetInetAddressAccess javaNetInetAddressAccess;
+ private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+ private static JavaNetSocketAccess javaNetSocketAccess;
+ private static JavaNetUriAccess javaNetUriAccess;
+ private static JavaNetURLAccess javaNetURLAccess;
+ private static JavaNetURLClassLoaderAccess javaNetURLClassLoaderAccess;
+ private static JavaNioAccess javaNioAccess;
+ private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
+ private static JavaIOFilePermissionAccess javaIOFilePermissionAccess;
+ private static JavaSecurityAccess javaSecurityAccess;
+ private static JavaUtilZipFileAccess javaUtilZipFileAccess;
+ private static JavaUtilResourceBundleAccess javaUtilResourceBundleAccess;
+ private static JavaAWTAccess javaAWTAccess;
+ private static JavaAWTFontAccess javaAWTFontAccess;
+ private static JavaBeansAccess javaBeansAccess;
+ private static JavaObjectInputStreamAccess javaObjectInputStreamAccess;
+ private static JavaObjectInputFilterAccess javaObjectInputFilterAccess;
+ private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess;
+ private static JavaxCryptoSealedObjectAccess javaxCryptoSealedObjectAccess;
+
+ public static JavaUtilJarAccess javaUtilJarAccess() {
+ if (javaUtilJarAccess == null) {
+ // Ensure JarFile is initialized; we know that that class
+ // provides the shared secret
+ unsafe.ensureClassInitialized(JarFile.class);
+ }
+ return javaUtilJarAccess;
+ }
+
+ public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
+ javaUtilJarAccess = access;
+ }
+
+ public static void setJavaLangAccess(JavaLangAccess jla) {
+ javaLangAccess = jla;
+ }
+
+ public static JavaLangAccess getJavaLangAccess() {
+ return javaLangAccess;
+ }
+
+ public static void setJavaLangInvokeAccess(JavaLangInvokeAccess jlia) {
+ javaLangInvokeAccess = jlia;
+ }
+
+ public static JavaLangInvokeAccess getJavaLangInvokeAccess() {
+ if (javaLangInvokeAccess == null) {
+ try {
+ Class<?> c = Class.forName("java.lang.invoke.MethodHandleImpl");
+ unsafe.ensureClassInitialized(c);
+ } catch (ClassNotFoundException e) {};
+ }
+ return javaLangInvokeAccess;
+ }
+
+ public static void setJavaLangModuleAccess(JavaLangModuleAccess jlrma) {
+ javaLangModuleAccess = jlrma;
+ }
+
+ public static JavaLangModuleAccess getJavaLangModuleAccess() {
+ if (javaLangModuleAccess == null) {
+ unsafe.ensureClassInitialized(ModuleDescriptor.class);
+ }
+ return javaLangModuleAccess;
+ }
+
+ public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
+ javaLangRefAccess = jlra;
+ }
+
+ public static JavaLangRefAccess getJavaLangRefAccess() {
+ return javaLangRefAccess;
+ }
+
+ public static void setJavaNetUriAccess(JavaNetUriAccess jnua) {
+ javaNetUriAccess = jnua;
+ }
+
+ public static JavaNetUriAccess getJavaNetUriAccess() {
+ if (javaNetUriAccess == null)
+ unsafe.ensureClassInitialized(java.net.URI.class);
+ return javaNetUriAccess;
+ }
+
+ public static void setJavaNetURLAccess(JavaNetURLAccess jnua) {
+ javaNetURLAccess = jnua;
+ }
+
+ public static JavaNetURLAccess getJavaNetURLAccess() {
+ if (javaNetURLAccess == null)
+ unsafe.ensureClassInitialized(java.net.URL.class);
+ return javaNetURLAccess;
+ }
+
+ public static void setJavaNetURLClassLoaderAccess(JavaNetURLClassLoaderAccess jnua) {
+ javaNetURLClassLoaderAccess = jnua;
+ }
+
+ public static JavaNetURLClassLoaderAccess getJavaNetURLClassLoaderAccess() {
+ if (javaNetURLClassLoaderAccess == null)
+ unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
+ return javaNetURLClassLoaderAccess;
+ }
+
+ public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
+ javaNetInetAddressAccess = jna;
+ }
+
+ public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
+ if (javaNetInetAddressAccess == null)
+ unsafe.ensureClassInitialized(java.net.InetAddress.class);
+ return javaNetInetAddressAccess;
+ }
+
+ public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
+ javaNetHttpCookieAccess = a;
+ }
+
+ public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
+ if (javaNetHttpCookieAccess == null)
+ unsafe.ensureClassInitialized(java.net.HttpCookie.class);
+ return javaNetHttpCookieAccess;
+ }
+
+ public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
+ javaNetSocketAccess = jnsa;
+ }
+
+ public static JavaNetSocketAccess getJavaNetSocketAccess() {
+ if (javaNetSocketAccess == null)
+ unsafe.ensureClassInitialized(java.net.ServerSocket.class);
+ return javaNetSocketAccess;
+ }
+
+ public static void setJavaNioAccess(JavaNioAccess jna) {
+ javaNioAccess = jna;
+ }
+
+ public static JavaNioAccess getJavaNioAccess() {
+ if (javaNioAccess == null) {
+ // Ensure java.nio.Buffer is initialized, which provides the
+ // shared secret.
+ unsafe.ensureClassInitialized(java.nio.Buffer.class);
+ }
+ return javaNioAccess;
+ }
+
+ public static void setJavaIOAccess(JavaIOAccess jia) {
+ javaIOAccess = jia;
+ }
+
+ public static JavaIOAccess getJavaIOAccess() {
+ if (javaIOAccess == null) {
+ unsafe.ensureClassInitialized(Console.class);
+ }
+ return javaIOAccess;
+ }
+
+ public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
+ javaIOFileDescriptorAccess = jiofda;
+ }
+
+ public static JavaIOFilePermissionAccess getJavaIOFilePermissionAccess() {
+ if (javaIOFilePermissionAccess == null)
+ unsafe.ensureClassInitialized(FilePermission.class);
+
+ return javaIOFilePermissionAccess;
+ }
+
+ public static void setJavaIOFilePermissionAccess(JavaIOFilePermissionAccess jiofpa) {
+ javaIOFilePermissionAccess = jiofpa;
+ }
+
+ public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
+ if (javaIOFileDescriptorAccess == null)
+ unsafe.ensureClassInitialized(FileDescriptor.class);
+
+ return javaIOFileDescriptorAccess;
+ }
+
+ public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
+ javaSecurityAccess = jsa;
+ }
+
+ public static JavaSecurityAccess getJavaSecurityAccess() {
+ if (javaSecurityAccess == null) {
+ unsafe.ensureClassInitialized(ProtectionDomain.class);
+ }
+ return javaSecurityAccess;
+ }
+
+ public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
+ if (javaUtilZipFileAccess == null)
+ unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
+ return javaUtilZipFileAccess;
+ }
+
+ public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
+ javaUtilZipFileAccess = access;
+ }
+
+ public static void setJavaAWTAccess(JavaAWTAccess jaa) {
+ javaAWTAccess = jaa;
+ }
+
+ public static JavaAWTAccess getJavaAWTAccess() {
+ // this may return null in which case calling code needs to
+ // provision for.
+ return javaAWTAccess;
+ }
+
+ public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
+ javaAWTFontAccess = jafa;
+ }
+
+ public static JavaAWTFontAccess getJavaAWTFontAccess() {
+ // this may return null in which case calling code needs to
+ // provision for.
+ return javaAWTFontAccess;
+ }
+
+ public static JavaBeansAccess getJavaBeansAccess() {
+ return javaBeansAccess;
+ }
+
+ public static void setJavaBeansAccess(JavaBeansAccess access) {
+ javaBeansAccess = access;
+ }
+
+ public static JavaUtilResourceBundleAccess getJavaUtilResourceBundleAccess() {
+ if (javaUtilResourceBundleAccess == null)
+ unsafe.ensureClassInitialized(ResourceBundle.class);
+ return javaUtilResourceBundleAccess;
+ }
+
+ public static void setJavaUtilResourceBundleAccess(JavaUtilResourceBundleAccess access) {
+ javaUtilResourceBundleAccess = access;
+ }
+
+ public static JavaObjectInputStreamAccess getJavaObjectInputStreamAccess() {
+ if (javaObjectInputStreamAccess == null) {
+ unsafe.ensureClassInitialized(ObjectInputStream.class);
+ }
+ return javaObjectInputStreamAccess;
+ }
+
+ public static void setJavaObjectInputStreamAccess(JavaObjectInputStreamAccess access) {
+ javaObjectInputStreamAccess = access;
+ }
+
+ public static JavaObjectInputFilterAccess getJavaObjectInputFilterAccess() {
+ if (javaObjectInputFilterAccess == null) {
+ unsafe.ensureClassInitialized(ObjectInputFilter.Config.class);
+ }
+ return javaObjectInputFilterAccess;
+ }
+
+ public static void setJavaObjectInputFilterAccess(JavaObjectInputFilterAccess access) {
+ javaObjectInputFilterAccess = access;
+ }
+
+ public static void setJavaIORandomAccessFileAccess(JavaIORandomAccessFileAccess jirafa) {
+ javaIORandomAccessFileAccess = jirafa;
+ }
+
+ public static JavaIORandomAccessFileAccess getJavaIORandomAccessFileAccess() {
+ if (javaIORandomAccessFileAccess == null) {
+ unsafe.ensureClassInitialized(RandomAccessFile.class);
+ }
+ return javaIORandomAccessFileAccess;
+ }
+
+ public static void setJavaxCryptoSealedObjectAccess(JavaxCryptoSealedObjectAccess jcsoa) {
+ javaxCryptoSealedObjectAccess = jcsoa;
+ }
+
+ public static JavaxCryptoSealedObjectAccess getJavaxCryptoSealedObjectAccess() {
+ if (javaxCryptoSealedObjectAccess == null) {
+ unsafe.ensureClassInitialized(SealedObject.class);
+ }
+ return javaxCryptoSealedObjectAccess;
+ }
+}
--- a/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/AbstractClassLoaderValue.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
package jdk.internal.loader;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.Iterator;
--- a/src/java.base/share/classes/jdk/internal/loader/BootLoader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/BootLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -36,14 +36,13 @@
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.Enumeration;
-import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
import java.util.stream.Stream;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.Modules;
import jdk.internal.module.ServicesCatalog;
import jdk.internal.util.StaticProperty;
--- a/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -60,7 +60,7 @@
import java.util.jar.Manifest;
import java.util.stream.Stream;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
import jdk.internal.module.ModulePatcher.PatchedModuleReader;
import jdk.internal.module.Resources;
--- a/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java Mon Nov 12 11:10:16 2018 +0530
@@ -33,8 +33,8 @@
import java.security.PermissionCollection;
import java.util.jar.Manifest;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.VM;
/**
--- a/src/java.base/share/classes/jdk/internal/loader/Loader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/Loader.java Mon Nov 12 11:10:16 2018 +0530
@@ -60,7 +60,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.Resources;
/**
--- a/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/loader/URLClassPath.java Mon Nov 12 11:10:16 2018 +0530
@@ -68,9 +68,9 @@
import java.util.jar.Attributes.Name;
import java.util.zip.ZipFile;
-import jdk.internal.misc.JavaNetURLAccess;
-import jdk.internal.misc.JavaUtilZipFileAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetURLAccess;
+import jdk.internal.access.JavaUtilZipFileAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.util.jar.InvalidJarIndexError;
import jdk.internal.util.jar.JarIndex;
import sun.net.util.URLUtil;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.base/share/classes/jdk/internal/misc/FileSystemOption.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.misc;
+
+import sun.nio.fs.ExtendedOptions;
+
+import java.nio.file.CopyOption;
+import java.nio.file.OpenOption;
+import java.nio.file.WatchEvent;
+
+/**
+ * Internal file system options for jdk.unsupported com.sun.nio.file API use.
+ */
+public final class FileSystemOption<T> {
+ public static final FileSystemOption<Void> INTERRUPTIBLE =
+ new FileSystemOption<>(ExtendedOptions.INTERRUPTIBLE);
+ public static final FileSystemOption<Void> NOSHARE_READ =
+ new FileSystemOption<>(ExtendedOptions.NOSHARE_READ);
+ public static final FileSystemOption<Void> NOSHARE_WRITE =
+ new FileSystemOption<>(ExtendedOptions.NOSHARE_WRITE);
+ public static final FileSystemOption<Void> NOSHARE_DELETE =
+ new FileSystemOption<>(ExtendedOptions.NOSHARE_DELETE);
+ public static final FileSystemOption<Void> FILE_TREE =
+ new FileSystemOption<>(ExtendedOptions.FILE_TREE);
+ public static final FileSystemOption<Void> DIRECT =
+ new FileSystemOption<>(ExtendedOptions.DIRECT);
+ public static final FileSystemOption<Integer> SENSITIVITY_HIGH =
+ new FileSystemOption<>(ExtendedOptions.SENSITIVITY_HIGH);
+ public static final FileSystemOption<Integer> SENSITIVITY_MEDIUM =
+ new FileSystemOption<>(ExtendedOptions.SENSITIVITY_MEDIUM);
+ public static final FileSystemOption<Integer> SENSITIVITY_LOW =
+ new FileSystemOption<>(ExtendedOptions.SENSITIVITY_LOW);
+
+ private final ExtendedOptions.InternalOption<T> internalOption;
+ private FileSystemOption(ExtendedOptions.InternalOption<T> option) {
+ this.internalOption = option;
+ }
+
+ /**
+ * Register this internal option as an OpenOption.
+ */
+ public void register(OpenOption option) {
+ internalOption.register(option);
+ }
+
+ /**
+ * Register this internal option as a CopyOption.
+ */
+ public void register(CopyOption option) {
+ internalOption.register(option);
+ }
+
+ /**
+ * Register this internal option as a WatchEvent.Modifier.
+ */
+ public void register(WatchEvent.Modifier option) {
+ internalOption.register(option);
+ }
+
+ /**
+ * Register this internal option as a WatchEvent.Modifier with the
+ * given parameter.
+ */
+ public void register(WatchEvent.Modifier option, T param) {
+ internalOption.register(option, param);
+ }
+}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaAWTAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-public interface JavaAWTAccess {
-
- // Returns the AppContext used for applet logging isolation, or null if
- // no isolation is required.
- // If there's no applet, or if the caller is a stand alone application,
- // or running in the main app context, returns null.
- // Otherwise, returns the AppContext of the calling applet.
- public Object getAppletContext();
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaAWTFontAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/**
- * SharedSecrets interface used for the access from java.text.Bidi
- */
-
-package jdk.internal.misc;
-
-public interface JavaAWTFontAccess {
-
- // java.awt.font.TextAttribute constants
- public Object getTextAttributeConstant(String name);
-
- // java.awt.font.NumericShaper
- public void shape(Object shaper, char[] text, int start, int count);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaBeansAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-
-public interface JavaBeansAccess {
- /**
- * Returns the getter method for a property of the given name
- * @param clazz The JavaBeans class
- * @param property The property name
- * @return The resolved property getter method
- * @throws Exception
- */
- Method getReadMethod(Class<?> clazz, String property) throws Exception;
-
- /**
- * Return the <b>value</b> attribute of the associated
- * <code>@ConstructorProperties</code> annotation if that is present.
- * @param ctr The constructor to extract the annotation value from
- * @return The {@code value} attribute of the <code>@ConstructorProperties</code>
- * annotation or {@code null} if the constructor is not annotated by
- * this annotation or the annotation is not accessible.
- */
- String[] getConstructorPropertiesValue(Constructor<?> ctr);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaIOAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.Console;
-import java.nio.charset.Charset;
-
-public interface JavaIOAccess {
- public Console console();
- public Charset charset();
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaIOFileDescriptorAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.misc;
-
-import java.io.FileDescriptor;
-import java.io.IOException;
-
-import jdk.internal.ref.PhantomCleanable;
-
-/*
- * @author Chris Hegarty
- */
-
-public interface JavaIOFileDescriptorAccess {
- public void set(FileDescriptor fdo, int fd);
- public int get(FileDescriptor fdo);
- public void setAppend(FileDescriptor fdo, boolean append);
- public boolean getAppend(FileDescriptor fdo);
- public void close(FileDescriptor fdo) throws IOException;
- public void registerCleanup(FileDescriptor fdo);
- public void registerCleanup(FileDescriptor fdo, PhantomCleanable<FileDescriptor> cleanable);
- public void unregisterCleanup(FileDescriptor fdo);
-
- // Only valid on Windows
- public void setHandle(FileDescriptor fdo, long handle);
- public long getHandle(FileDescriptor fdo);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaIOFilePermissionAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.misc;
-
-import java.io.FilePermission;
-
-public interface JavaIOFilePermissionAccess {
-
- /**
- * Returns a new FilePermission plus an alternative path.
- *
- * @param input the input
- * @return the new FilePermission plus the alt path (as npath2)
- * or the input itself if no alt path is available.
- */
- FilePermission newPermPlusAltPath(FilePermission input);
-
- /**
- * Returns a new FilePermission using an alternative path.
- *
- * @param input the input
- * @return the new FilePermission using the alt path (as npath)
- * or null if no alt path is available
- */
- FilePermission newPermUsingAltPath(FilePermission input);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaIORandomAccessFileAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-public interface JavaIORandomAccessFileAccess {
- public RandomAccessFile openAndDelete(File file, String mode)
- throws IOException;
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaLangAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.lang.annotation.Annotation;
-import java.lang.module.ModuleDescriptor;
-import java.lang.reflect.Executable;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.Charset;
-import java.security.AccessControlContext;
-import java.security.ProtectionDomain;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.stream.Stream;
-
-import jdk.internal.module.ServicesCatalog;
-import jdk.internal.reflect.ConstantPool;
-import sun.reflect.annotation.AnnotationType;
-import sun.nio.ch.Interruptible;
-
-public interface JavaLangAccess {
-
- /**
- * Returns the list of {@code Method} objects for the declared public
- * methods of this class or interface that have the specified method name
- * and parameter types.
- */
- List<Method> getDeclaredPublicMethods(Class<?> klass, String name, Class<?>... parameterTypes);
-
- /**
- * Return the constant pool for a class.
- */
- ConstantPool getConstantPool(Class<?> klass);
-
- /**
- * Compare-And-Set the AnnotationType instance corresponding to this class.
- * (This method only applies to annotation types.)
- */
- boolean casAnnotationType(Class<?> klass, AnnotationType oldType, AnnotationType newType);
-
- /**
- * Get the AnnotationType instance corresponding to this class.
- * (This method only applies to annotation types.)
- */
- AnnotationType getAnnotationType(Class<?> klass);
-
- /**
- * Get the declared annotations for a given class, indexed by their types.
- */
- Map<Class<? extends Annotation>, Annotation> getDeclaredAnnotationMap(Class<?> klass);
-
- /**
- * Get the array of bytes that is the class-file representation
- * of this Class' annotations.
- */
- byte[] getRawClassAnnotations(Class<?> klass);
-
- /**
- * Get the array of bytes that is the class-file representation
- * of this Class' type annotations.
- */
- byte[] getRawClassTypeAnnotations(Class<?> klass);
-
- /**
- * Get the array of bytes that is the class-file representation
- * of this Executable's type annotations.
- */
- byte[] getRawExecutableTypeAnnotations(Executable executable);
-
- /**
- * Returns the elements of an enum class or null if the
- * Class object does not represent an enum type;
- * the result is uncloned, cached, and shared by all callers.
- */
- <E extends Enum<E>> E[] getEnumConstantsShared(Class<E> klass);
-
- /**
- * Set current thread's blocker field.
- */
- void blockedOn(Interruptible b);
-
- /**
- * Registers a shutdown hook.
- *
- * It is expected that this method with registerShutdownInProgress=true
- * is only used to register DeleteOnExitHook since the first file
- * may be added to the delete on exit list by the application shutdown
- * hooks.
- *
- * @param slot the slot in the shutdown hook array, whose element
- * will be invoked in order during shutdown
- * @param registerShutdownInProgress true to allow the hook
- * to be registered even if the shutdown is in progress.
- * @param hook the hook to be registered
- *
- * @throws IllegalStateException if shutdown is in progress and
- * the slot is not valid to register.
- */
- void registerShutdownHook(int slot, boolean registerShutdownInProgress, Runnable hook);
-
- /**
- * Returns a new Thread with the given Runnable and an
- * inherited AccessControlContext.
- */
- Thread newThreadWithAcc(Runnable target, AccessControlContext acc);
-
- /**
- * Invokes the finalize method of the given object.
- */
- void invokeFinalize(Object o) throws Throwable;
-
- /**
- * Returns the ConcurrentHashMap used as a storage for ClassLoaderValue(s)
- * associated with the given class loader, creating it if it doesn't already exist.
- */
- ConcurrentHashMap<?, ?> createOrGetClassLoaderValueMap(ClassLoader cl);
-
- /**
- * Defines a class with the given name to a class loader.
- */
- Class<?> defineClass(ClassLoader cl, String name, byte[] b, ProtectionDomain pd, String source);
-
- /**
- * Returns a class loaded by the bootstrap class loader.
- */
- Class<?> findBootstrapClassOrNull(ClassLoader cl, String name);
-
- /**
- * Define a Package of the given name and module by the given class loader.
- */
- Package definePackage(ClassLoader cl, String name, Module module);
-
- /**
- * Invokes Long.fastUUID
- */
- String fastUUID(long lsb, long msb);
-
- /**
- * Record the non-exported packages of the modules in the given layer
- */
- void addNonExportedPackages(ModuleLayer layer);
-
- /**
- * Invalidate package access cache
- */
- void invalidatePackageAccessCache();
-
- /**
- * Defines a new module to the Java virtual machine. The module
- * is defined to the given class loader.
- *
- * The URI is for information purposes only, it can be {@code null}.
- */
- Module defineModule(ClassLoader loader, ModuleDescriptor descriptor, URI uri);
-
- /**
- * Defines the unnamed module for the given class loader.
- */
- Module defineUnnamedModule(ClassLoader loader);
-
- /**
- * Updates the readability so that module m1 reads m2. The new read edge
- * does not result in a strong reference to m2 (m2 can be GC'ed).
- *
- * This method is the same as m1.addReads(m2) but without a permission check.
- */
- void addReads(Module m1, Module m2);
-
- /**
- * Updates module m to read all unnamed modules.
- */
- void addReadsAllUnnamed(Module m);
-
- /**
- * Updates module m1 to export a package to module m2. The export does
- * not result in a strong reference to m2 (m2 can be GC'ed).
- */
- void addExports(Module m1, String pkg, Module m2);
-
- /**
- * Updates a module m to export a package to all unnamed modules.
- */
- void addExportsToAllUnnamed(Module m, String pkg);
-
- /**
- * Updates module m1 to open a package to module m2. Opening the
- * package does not result in a strong reference to m2 (m2 can be GC'ed).
- */
- void addOpens(Module m1, String pkg, Module m2);
-
- /**
- * Updates module m to open a package to all unnamed modules.
- */
- void addOpensToAllUnnamed(Module m, String pkg);
-
- /**
- * Updates module m to open all packages returned by the given iterator.
- */
- void addOpensToAllUnnamed(Module m, Iterator<String> packages);
-
- /**
- * Updates module m to use a service.
- */
- void addUses(Module m, Class<?> service);
-
- /**
- * Returns true if module m reflectively exports a package to other
- */
- boolean isReflectivelyExported(Module module, String pn, Module other);
-
- /**
- * Returns true if module m reflectively opens a package to other
- */
- boolean isReflectivelyOpened(Module module, String pn, Module other);
-
- /**
- * Returns the ServicesCatalog for the given Layer.
- */
- ServicesCatalog getServicesCatalog(ModuleLayer layer);
-
- /**
- * Returns an ordered stream of layers. The first element is the
- * given layer, the remaining elements are its parents, in DFS order.
- */
- Stream<ModuleLayer> layers(ModuleLayer layer);
-
- /**
- * Returns a stream of the layers that have modules defined to the
- * given class loader.
- */
- Stream<ModuleLayer> layers(ClassLoader loader);
-
- /**
- * Constructs a new {@code String} by decoding the specified subarray of
- * bytes using the specified {@linkplain java.nio.charset.Charset charset}.
- *
- * The caller of this method shall relinquish and transfer the ownership of
- * the byte array to the callee since the later will not make a copy.
- *
- * @param bytes the byte array source
- * @param cs the Charset
- * @return the newly created string
- * @throws CharacterCodingException for malformed or unmappable bytes
- */
- String newStringNoRepl(byte[] bytes, Charset cs) throws CharacterCodingException;
-
- /**
- * Encode the given string into a sequence of bytes using the specified Charset.
- *
- * This method avoids copying the String's internal representation if the input
- * is ASCII.
- *
- * This method throws CharacterCodingException instead of replacing when
- * malformed input or unmappable characters are encountered.
- *
- * @param s the string to encode
- * @param cs the charset
- * @return the encoded bytes
- * @throws CharacterCodingException for malformed input or unmappable characters
- */
- byte[] getBytesNoRepl(String s, Charset cs) throws CharacterCodingException;
-
- /**
- * Returns a new string by decoding from the given utf8 bytes array.
- *
- * @param off the index of the first byte to decode
- * @param len the number of bytes to decode
- * @return the newly created string
- * @throws IllegalArgumentException for malformed or unmappable bytes.
- */
- String newStringUTF8NoRepl(byte[] bytes, int off, int len);
-
- /**
- * Encode the given string into a sequence of bytes using utf8.
- *
- * @param s the string to encode
- * @return the encoded bytes in utf8
- * @throws IllegalArgumentException for malformed surrogates
- */
- byte[] getBytesUTF8NoRepl(String s);
-
- /**
- * Set the cause of Throwable
- * @param cause set t's cause to new value
- */
- void setCause(Throwable t, Throwable cause);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaLangInvokeAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.lang.invoke.MethodType;
-import java.util.Map;
-
-public interface JavaLangInvokeAccess {
- /**
- * Create a new MemberName instance. Used by {@code StackFrameInfo}.
- */
- Object newMemberName();
-
- /**
- * Returns the name for the given MemberName. Used by {@code StackFrameInfo}.
- */
- String getName(Object mname);
-
- /**
- * Returns the {@code MethodType} for the given MemberName.
- * Used by {@code StackFrameInfo}.
- */
- MethodType getMethodType(Object mname);
-
- /**
- * Returns the descriptor for the given MemberName.
- * Used by {@code StackFrameInfo}.
- */
- String getMethodDescriptor(Object mname);
-
- /**
- * Returns {@code true} if the given MemberName is a native method.
- * Used by {@code StackFrameInfo}.
- */
- boolean isNative(Object mname);
-
- /**
- * Returns the declaring class for the given MemberName.
- * Used by {@code StackFrameInfo}.
- */
- Class<?> getDeclaringClass(Object mname);
-
- /**
- * Returns a {@code byte[]} representation of a class implementing
- * DirectMethodHandle of each pairwise combination of {@code MethodType} and
- * an {@code int} representing method type. Used by
- * GenerateJLIClassesPlugin to generate such a class during the jlink phase.
- */
- byte[] generateDirectMethodHandleHolderClassBytes(String className,
- MethodType[] methodTypes, int[] types);
-
- /**
- * Returns a {@code byte[]} representation of a class implementing
- * DelegatingMethodHandles of each {@code MethodType} kind in the
- * {@code methodTypes} argument. Used by GenerateJLIClassesPlugin to
- * generate such a class during the jlink phase.
- */
- byte[] generateDelegatingMethodHandleHolderClassBytes(String className,
- MethodType[] methodTypes);
-
- /**
- * Returns a {@code byte[]} representation of {@code BoundMethodHandle}
- * species class implementing the signature defined by {@code types}. Used
- * by GenerateJLIClassesPlugin to enable generation of such classes during
- * the jlink phase. Should do some added validation since this string may be
- * user provided.
- */
- Map.Entry<String, byte[]> generateConcreteBMHClassBytes(
- final String types);
-
- /**
- * Returns a {@code byte[]} representation of a class implementing
- * the zero and identity forms of all {@code LambdaForm.BasicType}s.
- */
- byte[] generateBasicFormsClassBytes(final String className);
-
- /**
- * Returns a {@code byte[]} representation of a class implementing
- * the invoker forms for the set of supplied {@code invokerMethodTypes}
- * and {@code callSiteMethodTypes}.
- */
- byte[] generateInvokersHolderClassBytes(String className,
- MethodType[] invokerMethodTypes,
- MethodType[] callSiteMethodTypes);
-
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaLangModuleAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.PrintStream;
-import java.lang.module.Configuration;
-import java.lang.module.ModuleDescriptor;
-import java.lang.module.ModuleDescriptor.Exports;
-import java.lang.module.ModuleDescriptor.Opens;
-import java.lang.module.ModuleDescriptor.Requires;
-import java.lang.module.ModuleDescriptor.Provides;
-import java.lang.module.ModuleDescriptor.Version;
-import java.lang.module.ModuleFinder;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Provides access to non-public methods in java.lang.module.
- */
-
-public interface JavaLangModuleAccess {
-
- /**
- * Creates a builder for building a module with the given module name.
- *
- * @param strict
- * Indicates whether module names are checked or not
- */
- ModuleDescriptor.Builder newModuleBuilder(String mn,
- boolean strict,
- Set<ModuleDescriptor.Modifier> ms);
-
- /**
- * Returns a snapshot of the packages in the module.
- */
- Set<String> packages(ModuleDescriptor.Builder builder);
-
- /**
- * Adds a dependence on a module with the given (possibly un-parsable)
- * version string.
- */
- void requires(ModuleDescriptor.Builder builder,
- Set<Requires.Modifier> ms,
- String mn,
- String rawCompiledVersion);
-
- /**
- * Returns a {@code ModuleDescriptor.Requires} of the given modifiers
- * and module name.
- */
- Requires newRequires(Set<Requires.Modifier> ms, String mn, Version v);
-
- /**
- * Returns an unqualified {@code ModuleDescriptor.Exports}
- * of the given modifiers and package name source.
- */
- Exports newExports(Set<Exports.Modifier> ms,
- String source);
-
- /**
- * Returns a qualified {@code ModuleDescriptor.Exports}
- * of the given modifiers, package name source and targets.
- */
- Exports newExports(Set<Exports.Modifier> ms,
- String source,
- Set<String> targets);
-
- /**
- * Returns an unqualified {@code ModuleDescriptor.Opens}
- * of the given modifiers and package name source.
- */
- Opens newOpens(Set<Opens.Modifier> ms, String source);
-
- /**
- * Returns a qualified {@code ModuleDescriptor.Opens}
- * of the given modifiers, package name source and targets.
- */
- Opens newOpens(Set<Opens.Modifier> ms, String source, Set<String> targets);
-
- /**
- * Returns a {@code ModuleDescriptor.Provides}
- * of the given service name and providers.
- */
- Provides newProvides(String service, List<String> providers);
-
- /**
- * Returns a new {@code ModuleDescriptor} instance.
- */
- ModuleDescriptor newModuleDescriptor(String name,
- Version version,
- Set<ModuleDescriptor.Modifier> ms,
- Set<Requires> requires,
- Set<Exports> exports,
- Set<Opens> opens,
- Set<String> uses,
- Set<Provides> provides,
- Set<String> packages,
- String mainClass,
- int hashCode);
-
- /**
- * Resolves a collection of root modules, with service binding
- * and the empty configuration as the parent.
- */
- Configuration resolveAndBind(ModuleFinder finder,
- Collection<String> roots,
- PrintStream traceOutput);
-
- /**
- * Creates a configuration from a pre-generated readability graph.
- */
- Configuration newConfiguration(ModuleFinder finder,
- Map<String, Set<String>> graph);
-
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-public interface JavaLangRefAccess {
-
- /**
- * Wait for progress in {@link java.lang.ref.Reference}
- * processing. If there aren't any pending {@link
- * java.lang.ref.Reference}s, return immediately.
- *
- * @return {@code true} if there were any pending
- * {@link java.lang.ref.Reference}s, {@code false} otherwise.
- */
- boolean waitForReferenceProcessing() throws InterruptedException;
-
- /**
- * Runs the finalization methods of any objects pending finalization.
- *
- * Invoked by Runtime.runFinalization()
- */
- void runFinalization();
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetHttpCookieAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.net.HttpCookie;
-import java.util.List;
-
-public interface JavaNetHttpCookieAccess {
- /*
- * Constructs cookies from Set-Cookie or Set-Cookie2 header string,
- * retaining the original header String in the cookie itself.
- */
- public List<HttpCookie> parse(String header);
-
- /*
- * Returns the original header this cookie was constructed from, if it was
- * constructed by parsing a header, otherwise null.
- */
- public String header(HttpCookie cookie);
-}
-
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetInetAddressAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-public interface JavaNetInetAddressAccess {
- /**
- * Return the original application specified hostname of
- * the given InetAddress object.
- */
- String getOriginalHostName(InetAddress ia);
-
- /**
- * Get the InetAddress of the provided host. If an InetAddress is provided
- * then it will be the default address returned for all calls to either
- * form of getByName. This is required to maintain consistency when
- * caching addresses and hostnames.
- */
- InetAddress getByName(String hostName, InetAddress hostAddress)
- throws UnknownHostException;
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.net.ServerSocket;
-import java.net.SocketImpl;
-
-public interface JavaNetSocketAccess {
- /**
- * Creates a ServerSocket associated with the given SocketImpl.
- */
- ServerSocket newServerSocket(SocketImpl impl);
-
- /*
- * Constructs a SocketImpl instance of the given class.
- */
- SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetURLAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.misc;
-
-import java.net.URL;
-import java.net.URLStreamHandler;
-
-public interface JavaNetURLAccess {
- URLStreamHandler getHandler(URL u);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetURLClassLoaderAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.net.URLClassLoader;
-import java.security.AccessControlContext;
-
-public interface JavaNetURLClassLoaderAccess {
- AccessControlContext getAccessControlContext(URLClassLoader u);;
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNetUriAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.net.URI;
-
-public interface JavaNetUriAccess {
- /**
- * Create a URI of pre-validated scheme and path.
- */
- URI create(String scheme, String path);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaNioAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.nio.Buffer;
-import java.nio.ByteBuffer;
-
-public interface JavaNioAccess {
- /**
- * Provides access to information on buffer usage.
- */
- interface BufferPool {
- String getName();
- long getCount();
- long getTotalCapacity();
- long getMemoryUsed();
- }
- BufferPool getDirectBufferPool();
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaObjectInputFilterAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.ObjectInputFilter;
-
-/**
- * Access to the alternative ObjectInputFilter.Config.createFilter2 for RMI.
- */
-public interface JavaObjectInputFilterAccess {
- /**
- * Creates a filter from the pattern.
- */
- ObjectInputFilter createFilter2(String pattern);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaObjectInputStreamAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.InvalidClassException;
-import java.io.ObjectInputStream;
-
-/**
- * Interface to specify methods for accessing {@code ObjectInputStream}.
- */
-@FunctionalInterface
-public interface JavaObjectInputStreamAccess {
- void checkArray(ObjectInputStream ois, Class<?> arrayType, int arrayLength)
- throws InvalidClassException;
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaSecurityAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.security.AccessControlContext;
-import java.security.PermissionCollection;
-import java.security.PrivilegedAction;
-import java.security.ProtectionDomain;
-
-public interface JavaSecurityAccess {
-
- <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
- AccessControlContext stack,
- AccessControlContext context);
-
- <T> T doIntersectionPrivilege(PrivilegedAction<T> action,
- AccessControlContext context);
-
- ProtectionDomain[] getProtectDomains(AccessControlContext context);
-
- interface ProtectionDomainCache {
- void put(ProtectionDomain pd, PermissionCollection pc);
- PermissionCollection get(ProtectionDomain pd);
- }
-
- /**
- * Returns the ProtectionDomainCache.
- */
- ProtectionDomainCache getProtectionDomainCache();
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaUtilJarAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.IOException;
-import java.net.URL;
-import java.security.CodeSource;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.jar.Attributes;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-public interface JavaUtilJarAccess {
- public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException;
- public CodeSource[] getCodeSources(JarFile jar, URL url);
- public CodeSource getCodeSource(JarFile jar, URL url, String name);
- public Enumeration<String> entryNames(JarFile jar, CodeSource[] cs);
- public Enumeration<JarEntry> entries2(JarFile jar);
- public void setEagerValidation(JarFile jar, boolean eager);
- public List<Object> getManifestDigests(JarFile jar);
- public Attributes getTrustedAttributes(Manifest man, String name);
- public void ensureInitialization(JarFile jar);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaUtilResourceBundleAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-/**
- * Provides access to non-public methods in java.util.ResourceBundle.
- */
-public interface JavaUtilResourceBundleAccess {
- /**
- * Sets the bundle's parent to the given parent.
- */
- void setParent(ResourceBundle bundle, ResourceBundle parent);
-
- /**
- * Returns the parent of the given bundle or null if the bundle has no parent.
- */
- ResourceBundle getParent(ResourceBundle bundle);
-
- /**
- * Sets the bundle's locale to the given locale.
- */
- void setLocale(ResourceBundle bundle, Locale locale);
-
- /**
- * Sets the bundle's base name to the given name.
- */
- void setName(ResourceBundle bundle, String name);
-
- /**
- * Returns a {@code ResourceBundle} of the given baseName and locale
- * loaded on behalf of the given module with no caller module
- * access check.
- */
- ResourceBundle getBundle(String baseName, Locale locale, Module module);
-
- /**
- * Instantiates a {@code ResourceBundle} of the given bundle class.
- */
- ResourceBundle newResourceBundle(Class<? extends ResourceBundle> bundleClass);
-}
--- a/src/java.base/share/classes/jdk/internal/misc/JavaUtilZipFileAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.function.Function;
-import java.util.jar.JarEntry;
-import java.util.stream.Stream;
-import java.util.zip.ZipFile;
-
-public interface JavaUtilZipFileAccess {
- public boolean startsWithLocHeader(ZipFile zip);
- public String[] getMetaInfEntryNames(ZipFile zip);
- public JarEntry getEntry(ZipFile zip, String name, Function<String, JarEntry> func);
- public Enumeration<JarEntry> entries(ZipFile zip, Function<String, JarEntry> func);
- public Stream<JarEntry> stream(ZipFile zip, Function<String, JarEntry> func);
- public Stream<String> entryNameStream(ZipFile zip);
-}
-
--- a/src/java.base/share/classes/jdk/internal/misc/JavaxCryptoSealedObjectAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.internal.misc;
-
-import javax.crypto.BadPaddingException;
-import javax.crypto.Cipher;
-import javax.crypto.IllegalBlockSizeException;
-import javax.crypto.SealedObject;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-
-public interface JavaxCryptoSealedObjectAccess {
- ObjectInputStream getExtObjectInputStream(
- SealedObject sealed, Cipher cipher)
- throws BadPaddingException, IllegalBlockSizeException, IOException;
-}
--- a/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.internal.misc;
-
-import javax.crypto.SealedObject;
-import java.io.ObjectInputFilter;
-import java.lang.module.ModuleDescriptor;
-import java.util.ResourceBundle;
-import java.util.jar.JarFile;
-import java.io.Console;
-import java.io.FileDescriptor;
-import java.io.FilePermission;
-import java.io.ObjectInputStream;
-import java.io.RandomAccessFile;
-import java.security.ProtectionDomain;
-
-/** A repository of "shared secrets", which are a mechanism for
- calling implementation-private methods in another package without
- using reflection. A package-private class implements a public
- interface and provides the ability to call package-private methods
- within that package; the object implementing that interface is
- provided through a third package to which access is restricted.
- This framework avoids the primary disadvantage of using reflection
- for this purpose, namely the loss of compile-time checking. */
-
-public class SharedSecrets {
- private static final Unsafe unsafe = Unsafe.getUnsafe();
- private static JavaUtilJarAccess javaUtilJarAccess;
- private static JavaLangAccess javaLangAccess;
- private static JavaLangModuleAccess javaLangModuleAccess;
- private static JavaLangInvokeAccess javaLangInvokeAccess;
- private static JavaLangRefAccess javaLangRefAccess;
- private static JavaIOAccess javaIOAccess;
- private static JavaNetInetAddressAccess javaNetInetAddressAccess;
- private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
- private static JavaNetSocketAccess javaNetSocketAccess;
- private static JavaNetUriAccess javaNetUriAccess;
- private static JavaNetURLAccess javaNetURLAccess;
- private static JavaNetURLClassLoaderAccess javaNetURLClassLoaderAccess;
- private static JavaNioAccess javaNioAccess;
- private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
- private static JavaIOFilePermissionAccess javaIOFilePermissionAccess;
- private static JavaSecurityAccess javaSecurityAccess;
- private static JavaUtilZipFileAccess javaUtilZipFileAccess;
- private static JavaUtilResourceBundleAccess javaUtilResourceBundleAccess;
- private static JavaAWTAccess javaAWTAccess;
- private static JavaAWTFontAccess javaAWTFontAccess;
- private static JavaBeansAccess javaBeansAccess;
- private static JavaObjectInputStreamAccess javaObjectInputStreamAccess;
- private static JavaObjectInputFilterAccess javaObjectInputFilterAccess;
- private static JavaIORandomAccessFileAccess javaIORandomAccessFileAccess;
- private static JavaxCryptoSealedObjectAccess javaxCryptoSealedObjectAccess;
-
- public static JavaUtilJarAccess javaUtilJarAccess() {
- if (javaUtilJarAccess == null) {
- // Ensure JarFile is initialized; we know that that class
- // provides the shared secret
- unsafe.ensureClassInitialized(JarFile.class);
- }
- return javaUtilJarAccess;
- }
-
- public static void setJavaUtilJarAccess(JavaUtilJarAccess access) {
- javaUtilJarAccess = access;
- }
-
- public static void setJavaLangAccess(JavaLangAccess jla) {
- javaLangAccess = jla;
- }
-
- public static JavaLangAccess getJavaLangAccess() {
- return javaLangAccess;
- }
-
- public static void setJavaLangInvokeAccess(JavaLangInvokeAccess jlia) {
- javaLangInvokeAccess = jlia;
- }
-
- public static JavaLangInvokeAccess getJavaLangInvokeAccess() {
- if (javaLangInvokeAccess == null) {
- try {
- Class<?> c = Class.forName("java.lang.invoke.MethodHandleImpl");
- unsafe.ensureClassInitialized(c);
- } catch (ClassNotFoundException e) {};
- }
- return javaLangInvokeAccess;
- }
-
- public static void setJavaLangModuleAccess(JavaLangModuleAccess jlrma) {
- javaLangModuleAccess = jlrma;
- }
-
- public static JavaLangModuleAccess getJavaLangModuleAccess() {
- if (javaLangModuleAccess == null) {
- unsafe.ensureClassInitialized(ModuleDescriptor.class);
- }
- return javaLangModuleAccess;
- }
-
- public static void setJavaLangRefAccess(JavaLangRefAccess jlra) {
- javaLangRefAccess = jlra;
- }
-
- public static JavaLangRefAccess getJavaLangRefAccess() {
- return javaLangRefAccess;
- }
-
- public static void setJavaNetUriAccess(JavaNetUriAccess jnua) {
- javaNetUriAccess = jnua;
- }
-
- public static JavaNetUriAccess getJavaNetUriAccess() {
- if (javaNetUriAccess == null)
- unsafe.ensureClassInitialized(java.net.URI.class);
- return javaNetUriAccess;
- }
-
- public static void setJavaNetURLAccess(JavaNetURLAccess jnua) {
- javaNetURLAccess = jnua;
- }
-
- public static JavaNetURLAccess getJavaNetURLAccess() {
- if (javaNetURLAccess == null)
- unsafe.ensureClassInitialized(java.net.URL.class);
- return javaNetURLAccess;
- }
-
- public static void setJavaNetURLClassLoaderAccess(JavaNetURLClassLoaderAccess jnua) {
- javaNetURLClassLoaderAccess = jnua;
- }
-
- public static JavaNetURLClassLoaderAccess getJavaNetURLClassLoaderAccess() {
- if (javaNetURLClassLoaderAccess == null)
- unsafe.ensureClassInitialized(java.net.URLClassLoader.class);
- return javaNetURLClassLoaderAccess;
- }
-
- public static void setJavaNetInetAddressAccess(JavaNetInetAddressAccess jna) {
- javaNetInetAddressAccess = jna;
- }
-
- public static JavaNetInetAddressAccess getJavaNetInetAddressAccess() {
- if (javaNetInetAddressAccess == null)
- unsafe.ensureClassInitialized(java.net.InetAddress.class);
- return javaNetInetAddressAccess;
- }
-
- public static void setJavaNetHttpCookieAccess(JavaNetHttpCookieAccess a) {
- javaNetHttpCookieAccess = a;
- }
-
- public static JavaNetHttpCookieAccess getJavaNetHttpCookieAccess() {
- if (javaNetHttpCookieAccess == null)
- unsafe.ensureClassInitialized(java.net.HttpCookie.class);
- return javaNetHttpCookieAccess;
- }
-
- public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
- javaNetSocketAccess = jnsa;
- }
-
- public static JavaNetSocketAccess getJavaNetSocketAccess() {
- if (javaNetSocketAccess == null)
- unsafe.ensureClassInitialized(java.net.ServerSocket.class);
- return javaNetSocketAccess;
- }
-
- public static void setJavaNioAccess(JavaNioAccess jna) {
- javaNioAccess = jna;
- }
-
- public static JavaNioAccess getJavaNioAccess() {
- if (javaNioAccess == null) {
- // Ensure java.nio.Buffer is initialized, which provides the
- // shared secret.
- unsafe.ensureClassInitialized(java.nio.Buffer.class);
- }
- return javaNioAccess;
- }
-
- public static void setJavaIOAccess(JavaIOAccess jia) {
- javaIOAccess = jia;
- }
-
- public static JavaIOAccess getJavaIOAccess() {
- if (javaIOAccess == null) {
- unsafe.ensureClassInitialized(Console.class);
- }
- return javaIOAccess;
- }
-
- public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) {
- javaIOFileDescriptorAccess = jiofda;
- }
-
- public static JavaIOFilePermissionAccess getJavaIOFilePermissionAccess() {
- if (javaIOFilePermissionAccess == null)
- unsafe.ensureClassInitialized(FilePermission.class);
-
- return javaIOFilePermissionAccess;
- }
-
- public static void setJavaIOFilePermissionAccess(JavaIOFilePermissionAccess jiofpa) {
- javaIOFilePermissionAccess = jiofpa;
- }
-
- public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() {
- if (javaIOFileDescriptorAccess == null)
- unsafe.ensureClassInitialized(FileDescriptor.class);
-
- return javaIOFileDescriptorAccess;
- }
-
- public static void setJavaSecurityAccess(JavaSecurityAccess jsa) {
- javaSecurityAccess = jsa;
- }
-
- public static JavaSecurityAccess getJavaSecurityAccess() {
- if (javaSecurityAccess == null) {
- unsafe.ensureClassInitialized(ProtectionDomain.class);
- }
- return javaSecurityAccess;
- }
-
- public static JavaUtilZipFileAccess getJavaUtilZipFileAccess() {
- if (javaUtilZipFileAccess == null)
- unsafe.ensureClassInitialized(java.util.zip.ZipFile.class);
- return javaUtilZipFileAccess;
- }
-
- public static void setJavaUtilZipFileAccess(JavaUtilZipFileAccess access) {
- javaUtilZipFileAccess = access;
- }
-
- public static void setJavaAWTAccess(JavaAWTAccess jaa) {
- javaAWTAccess = jaa;
- }
-
- public static JavaAWTAccess getJavaAWTAccess() {
- // this may return null in which case calling code needs to
- // provision for.
- return javaAWTAccess;
- }
-
- public static void setJavaAWTFontAccess(JavaAWTFontAccess jafa) {
- javaAWTFontAccess = jafa;
- }
-
- public static JavaAWTFontAccess getJavaAWTFontAccess() {
- // this may return null in which case calling code needs to
- // provision for.
- return javaAWTFontAccess;
- }
-
- public static JavaBeansAccess getJavaBeansAccess() {
- return javaBeansAccess;
- }
-
- public static void setJavaBeansAccess(JavaBeansAccess access) {
- javaBeansAccess = access;
- }
-
- public static JavaUtilResourceBundleAccess getJavaUtilResourceBundleAccess() {
- if (javaUtilResourceBundleAccess == null)
- unsafe.ensureClassInitialized(ResourceBundle.class);
- return javaUtilResourceBundleAccess;
- }
-
- public static void setJavaUtilResourceBundleAccess(JavaUtilResourceBundleAccess access) {
- javaUtilResourceBundleAccess = access;
- }
-
- public static JavaObjectInputStreamAccess getJavaObjectInputStreamAccess() {
- if (javaObjectInputStreamAccess == null) {
- unsafe.ensureClassInitialized(ObjectInputStream.class);
- }
- return javaObjectInputStreamAccess;
- }
-
- public static void setJavaObjectInputStreamAccess(JavaObjectInputStreamAccess access) {
- javaObjectInputStreamAccess = access;
- }
-
- public static JavaObjectInputFilterAccess getJavaObjectInputFilterAccess() {
- if (javaObjectInputFilterAccess == null) {
- unsafe.ensureClassInitialized(ObjectInputFilter.Config.class);
- }
- return javaObjectInputFilterAccess;
- }
-
- public static void setJavaObjectInputFilterAccess(JavaObjectInputFilterAccess access) {
- javaObjectInputFilterAccess = access;
- }
-
- public static void setJavaIORandomAccessFileAccess(JavaIORandomAccessFileAccess jirafa) {
- javaIORandomAccessFileAccess = jirafa;
- }
-
- public static JavaIORandomAccessFileAccess getJavaIORandomAccessFileAccess() {
- if (javaIORandomAccessFileAccess == null) {
- unsafe.ensureClassInitialized(RandomAccessFile.class);
- }
- return javaIORandomAccessFileAccess;
- }
-
- public static void setJavaxCryptoSealedObjectAccess(JavaxCryptoSealedObjectAccess jcsoa) {
- javaxCryptoSealedObjectAccess = jcsoa;
- }
-
- public static JavaxCryptoSealedObjectAccess getJavaxCryptoSealedObjectAccess() {
- if (javaxCryptoSealedObjectAccess == null) {
- unsafe.ensureClassInitialized(SealedObject.class);
- }
- return javaxCryptoSealedObjectAccess;
- }
-}
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -26,7 +26,9 @@
package jdk.internal.misc;
import jdk.internal.HotSpotIntrinsicCandidate;
+import jdk.internal.ref.Cleaner;
import jdk.internal.vm.annotation.ForceInline;
+import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.security.ProtectionDomain;
@@ -3718,6 +3720,29 @@
private native boolean isBigEndian0();
+ /**
+ * Invokes the given direct byte buffer's cleaner, if any.
+ *
+ * @param directBuffer a direct byte buffer
+ * @throws NullPointerException if {@code directBuffer} is null
+ * @throws IllegalArgumentException if {@code directBuffer} is non-direct,
+ * or is a {@link java.nio.Buffer#slice slice}, or is a
+ * {@link java.nio.Buffer#duplicate duplicate}
+ */
+ public void invokeCleaner(java.nio.ByteBuffer directBuffer) {
+ if (!directBuffer.isDirect())
+ throw new IllegalArgumentException("buffer is non-direct");
+
+ DirectBuffer db = (DirectBuffer) directBuffer;
+ if (db.attachment() != null)
+ throw new IllegalArgumentException("duplicate or slice");
+
+ Cleaner cleaner = db.cleaner();
+ if (cleaner != null) {
+ cleaner.clean();
+ }
+ }
+
// The following deprecated methods are used by JSR 166.
@Deprecated(since="12", forRemoval=true)
--- a/src/java.base/share/classes/jdk/internal/misc/VM.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/misc/VM.java Mon Nov 12 11:10:16 2018 +0530
@@ -199,17 +199,16 @@
// by the vm option -XX:MaxDirectMemorySize=<size>.
// The maximum amount of allocatable direct buffer memory (in bytes)
// from the system property sun.nio.MaxDirectMemorySize set by the VM.
+ // If not set or set to -1, the max memory will be used
// The system property will be removed.
String s = (String)props.remove("sun.nio.MaxDirectMemorySize");
- if (s != null) {
- if (s.equals("-1")) {
- // -XX:MaxDirectMemorySize not given, take default
- directMemory = Runtime.getRuntime().maxMemory();
- } else {
- long l = Long.parseLong(s);
- if (l > -1)
- directMemory = l;
- }
+ if (s == null || s.isEmpty() || s.equals("-1")) {
+ // -XX:MaxDirectMemorySize not given, take default
+ directMemory = Runtime.getRuntime().maxMemory();
+ } else {
+ long l = Long.parseLong(s);
+ if (l > -1)
+ directMemory = l;
}
// Check if direct buffers should be page aligned
--- a/src/java.base/share/classes/jdk/internal/module/Builder.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/Builder.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -33,8 +33,8 @@
import java.util.List;
import java.util.Set;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
/**
* This builder is optimized for reconstituting the {@code ModuleDescriptor}s
--- a/src/java.base/share/classes/jdk/internal/module/IllegalAccessLogger.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/IllegalAccessLogger.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -44,8 +44,8 @@
import java.util.stream.Collectors;
import static java.util.Collections.*;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
/**
* Supports logging of access to members of exported and concealed packages
--- a/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleBootstrap.java Mon Nov 12 11:10:16 2018 +0530
@@ -51,10 +51,9 @@
import jdk.internal.loader.BootLoader;
import jdk.internal.loader.BuiltinClassLoader;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.VM;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.perf.PerfCounter;
/**
--- a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java Mon Nov 12 11:10:16 2018 +0530
@@ -47,8 +47,8 @@
import java.util.Set;
import java.util.function.Supplier;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
import static jdk.internal.module.ClassFileConstants.*;
--- a/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/ModulePatcher.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -54,8 +54,8 @@
import java.util.stream.Stream;
import jdk.internal.loader.Resource;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
import sun.net.www.ParseUtil;
--- a/src/java.base/share/classes/jdk/internal/module/Modules.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/Modules.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -43,8 +43,8 @@
import jdk.internal.loader.BootLoader;
import jdk.internal.loader.BuiltinClassLoader;
import jdk.internal.loader.ClassLoaders;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
/**
* A helper class for creating and updating modules. This class is intended to
--- a/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java Mon Nov 12 11:10:16 2018 +0530
@@ -59,8 +59,8 @@
import jdk.internal.jimage.ImageLocation;
import jdk.internal.jimage.ImageReader;
import jdk.internal.jimage.ImageReaderFactory;
-import jdk.internal.misc.JavaNetUriAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetUriAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.util.StaticProperty;
import jdk.internal.module.ModuleHashes.HashSupplier;
--- a/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/jdk/internal/reflect/ClassDefiner.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -28,8 +28,8 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
/** Utility class which assists in calling defineClass() by
creating a new class loader which delegates to the one needed in
--- a/src/java.base/share/classes/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -136,6 +136,14 @@
java.security.sasl;
exports jdk.internal to
jdk.jfr;
+ exports jdk.internal.access to
+ java.desktop,
+ java.logging,
+ java.management,
+ java.naming,
+ java.rmi,
+ jdk.jlink,
+ jdk.net;
exports jdk.internal.event to
jdk.jfr;
exports jdk.internal.jimage to
@@ -175,18 +183,15 @@
java.logging,
java.management,
java.naming,
+ java.net.http,
java.rmi,
java.security.jgss,
- java.sql,
java.xml,
jdk.attach,
jdk.charsets,
jdk.compiler,
- java.net.http,
jdk.jfr,
- jdk.jlink,
jdk.jshell,
- jdk.net,
jdk.scripting.nashorn,
jdk.scripting.nashorn.shell,
jdk.unsupported,
@@ -202,8 +207,7 @@
jdk.management.agent,
jdk.internal.jvmstat;
exports jdk.internal.ref to
- java.desktop,
- jdk.unsupported;
+ java.desktop;
exports jdk.internal.reflect to
java.logging,
java.sql,
@@ -244,12 +248,9 @@
java.management,
jdk.crypto.cryptoki,
jdk.net,
- jdk.sctp,
- jdk.unsupported;
+ jdk.sctp;
exports sun.nio.cs to
jdk.charsets;
- exports sun.nio.fs to
- jdk.unsupported;
exports sun.reflect.annotation to
jdk.compiler;
exports sun.reflect.generics.reflectiveObjects to
--- a/src/java.base/share/classes/sun/net/sdp/SdpSupport.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/net/sdp/SdpSupport.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, 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,8 +29,8 @@
import java.io.FileDescriptor;
import java.security.AccessController;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
import sun.security.action.GetPropertyAction;
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Mon Nov 12 11:10:16 2018 +0530
@@ -65,8 +65,8 @@
import java.util.HashMap;
import java.util.Set;
import java.util.StringJoiner;
-import jdk.internal.misc.JavaNetHttpCookieAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetHttpCookieAccess;
+import jdk.internal.access.SharedSecrets;
import sun.net.*;
import sun.net.www.*;
import sun.net.www.http.HttpClient;
--- a/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/net/www/protocol/https/AbstractDelegateHttpsURLConnection.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -31,6 +31,8 @@
import java.security.Principal;
import java.io.IOException;
import java.util.List;
+import java.util.Optional;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLPeerUnverifiedException;
import sun.net.www.http.*;
import sun.net.www.protocol.http.HttpURLConnection;
@@ -296,4 +298,19 @@
}
}
+ SSLSession getSSLSession() {
+ if (cachedResponse != null) {
+ Optional<SSLSession> option =
+ ((SecureCacheResponse)cachedResponse).getSSLSession();
+ if (option.isPresent()) {
+ return option.orElseThrow();
+ }
+ }
+
+ if (http == null) {
+ throw new IllegalStateException("connection not yet open");
+ }
+
+ return ((HttpsClient)http).getSSLSession();
+ }
}
--- a/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -739,6 +739,13 @@
}
/**
+ * Returns the {@code SSLSession} in use on this connection.
+ */
+ SSLSession getSSLSession() {
+ return session;
+ }
+
+ /**
* This method implements the SSL HandshakeCompleted callback,
* remembering the resulting session so that it may be queried
* for the current cipher suite and peer certificates. Servers
--- a/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/net/www/protocol/https/HttpsURLConnectionImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -46,6 +46,7 @@
import java.security.Principal;
import java.util.Map;
import java.util.List;
+import java.util.Optional;
import sun.net.www.http.HttpClient;
/**
@@ -533,4 +534,9 @@
public void setAuthenticator(Authenticator auth) {
delegate.setAuthenticator(auth);
}
+
+ @Override
+ public Optional<SSLSession> getSSLSession() {
+ return Optional.ofNullable(delegate.getSSLSession());
+ }
}
--- a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -43,9 +43,9 @@
import java.nio.channels.SelectableChannel;
import java.nio.channels.WritableByteChannel;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.JavaNioAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.JavaNioAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.Cleaner;
import jdk.internal.ref.CleanerFactory;
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationSupport.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -35,8 +35,8 @@
import java.util.Map;
import java.util.Objects;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
import jdk.internal.reflect.ReflectionFactory;
public final class AnnotationSupport {
--- a/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/reflect/annotation/AnnotationType.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -30,8 +30,8 @@
import java.util.*;
import java.security.AccessController;
import java.security.PrivilegedAction;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
/**
* Represents an annotation type at run time. Used to type-check annotations
--- a/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/reflect/annotation/TypeAnnotationParser.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -34,8 +34,8 @@
import java.util.List;
import java.util.LinkedHashMap;
import java.util.Map;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaLangAccess;
import jdk.internal.reflect.ConstantPool;
import static sun.reflect.annotation.TypeAnnotation.*;
--- a/src/java.base/share/classes/sun/security/provider/PolicyFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/provider/PolicyFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -41,9 +41,9 @@
import java.net.SocketPermission;
import java.net.NetPermission;
import java.util.concurrent.ConcurrentHashMap;
-import jdk.internal.misc.JavaSecurityAccess;
-import static jdk.internal.misc.JavaSecurityAccess.ProtectionDomainCache;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
+import static jdk.internal.access.JavaSecurityAccess.ProtectionDomainCache;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.util.StaticProperty;
import sun.security.util.*;
import sun.net.www.ParseUtil;
--- a/src/java.base/share/classes/sun/security/rsa/RSAKeyPairGenerator.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/rsa/RSAKeyPairGenerator.java Mon Nov 12 11:10:16 2018 +0530
@@ -70,7 +70,7 @@
public void initialize(int keySize, SecureRandom random) {
try {
initialize(new RSAKeyGenParameterSpec(keySize,
- RSAKeyGenParameterSpec.F4), null);
+ RSAKeyGenParameterSpec.F4), random);
} catch (InvalidAlgorithmParameterException iape) {
throw new InvalidParameterException(iape.getMessage());
}
--- a/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -47,8 +47,8 @@
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
-import jdk.internal.misc.JavaNetInetAddressAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetInetAddressAccess;
+import jdk.internal.access.SharedSecrets;
/**
* Implementation of an SSL socket.
@@ -1229,7 +1229,7 @@
// identification. Use the application original specified
// hostname or IP address instead.
- // Get the original hostname via jdk.internal.misc.SharedSecrets
+ // Get the original hostname via jdk.internal.access.SharedSecrets
InetAddress inetAddress = getInetAddress();
if (inetAddress == null) { // not connected
return;
--- a/src/java.base/share/classes/sun/security/util/FilePermCompat.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/util/FilePermCompat.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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,7 +29,7 @@
import java.io.FilePermission;
import java.security.Permission;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* Take care of FilePermission compatibility after JDK-8164705.
--- a/src/java.base/share/classes/sun/security/util/HostnameChecker.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/util/HostnameChecker.java Mon Nov 12 11:10:16 2018 +0530
@@ -92,6 +92,10 @@
*/
public void match(String expectedName, X509Certificate cert,
boolean chainsToPublicCA) throws CertificateException {
+ if (expectedName == null) {
+ throw new CertificateException("Hostname or IP address is " +
+ "undefined.");
+ }
if (isIpAddress(expectedName)) {
matchIP(expectedName, cert);
} else {
--- a/src/java.base/share/classes/sun/security/util/Password.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/security/util/Password.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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,7 +29,7 @@
import java.nio.*;
import java.nio.charset.*;
import java.util.Arrays;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* A utility class for reading passwords
--- a/src/java.base/share/classes/sun/text/bidi/BidiBase.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/text/bidi/BidiBase.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, 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
@@ -52,8 +52,8 @@
import java.text.AttributedCharacterIterator;
import java.text.Bidi;
import java.util.Arrays;
-import jdk.internal.misc.JavaAWTFontAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTFontAccess;
+import jdk.internal.access.SharedSecrets;
import sun.text.normalizer.UBiDiProps;
import sun.text.normalizer.UCharacter;
import sun.text.normalizer.UTF16;
--- a/src/java.base/share/classes/sun/util/resources/Bundles.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/util/resources/Bundles.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -56,8 +56,8 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.spi.ResourceBundleProvider;
-import jdk.internal.misc.JavaUtilResourceBundleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaUtilResourceBundleAccess;
+import jdk.internal.access.SharedSecrets;
/**
*/
--- a/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/classes/sun/util/resources/TimeZoneNames.java Mon Nov 12 11:10:16 2018 +0530
@@ -674,9 +674,9 @@
"Magadan Summer Time", "MAGST",
"Magadan Time", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Philippines Time", "PHT",
- "Philippines Summer Time", "PHST",
- "Philippines Time", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/java.base/share/native/libjava/AccessController.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/native/libjava/AccessController.c Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -34,48 +34,13 @@
#include "jvm.h"
#include "java_security_AccessController.h"
-/*
- * Class: java_security_AccessController
- * Method: doPrivileged
- * Signature: (Ljava/security/PrivilegedAction;)Ljava/lang/Object;
- */
-JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2
- (JNIEnv *env, jclass cls, jobject action)
-{
- return JVM_DoPrivileged(env, cls, action, NULL, JNI_FALSE);
-}
-
-/*
- * Class: java_security_AccessController
- * Method: doPrivileged
- * Signature: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
- */
-JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2
- (JNIEnv *env, jclass cls, jobject action, jobject context)
+JNIEXPORT jobject JNICALL
+Java_java_security_AccessController_getProtectionDomain(
+ JNIEnv *env,
+ jclass cls,
+ jclass caller)
{
- return JVM_DoPrivileged(env, cls, action, context, JNI_FALSE);
-}
-
-/*
- * Class: java_security_AccessController
- * Method: doPrivileged
- * Signature: (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;
- */
-JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2
- (JNIEnv *env, jclass cls, jobject action)
-{
- return JVM_DoPrivileged(env, cls, action, NULL, JNI_TRUE);
-}
-
-/*
- * Class: java_security_AccessController
- * Method: doPrivileged
- * Signature: (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
- */
-JNIEXPORT jobject JNICALL Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2
- (JNIEnv *env, jclass cls, jobject action, jobject context)
-{
- return JVM_DoPrivileged(env, cls, action, context, JNI_TRUE);
+ return JVM_GetProtectionDomain(env, caller);
}
JNIEXPORT jobject JNICALL
--- a/src/java.base/share/native/libjava/System.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/native/libjava/System.c Mon Nov 12 11:10:16 2018 +0530
@@ -211,7 +211,6 @@
PUTPROP(props, "java.specification.vendor",
JAVA_SPECIFICATION_VENDOR);
- PUTPROP(props, "java.version", VERSION_SHORT);
PUTPROP(props, "java.vendor", VENDOR);
PUTPROP(props, "java.vendor.url", VENDOR_URL);
PUTPROP(props, "java.vendor.url.bug", VENDOR_URL_BUG);
@@ -255,8 +254,10 @@
/* unicode_encoding specifies the default endianness */
PUTPROP(props, "sun.io.unicode.encoding", sprops->unicode_encoding);
- PUTPROP(props, "sun.cpu.isalist",
- (sprops->cpu_isalist ? sprops->cpu_isalist : ""));
+ if (sprops->cpu_isalist != NULL) {
+ // leave undefined if none
+ PUTPROP(props, "sun.cpu.isalist", sprops->cpu_isalist);
+ }
PUTPROP(props, "sun.cpu.endian", sprops->cpu_endian);
@@ -330,8 +331,10 @@
sprops->data_model);
/* patch level */
- PUTPROP(props, "sun.os.patch.level", \
+ if (sprops->patch_level != NULL) {
+ PUTPROP(props, "sun.os.patch.level", \
sprops->patch_level);
+ }
/* Java2D properties */
/* Note: java.awt.graphicsenv is an implementation private property which
@@ -354,9 +357,6 @@
PUTPROP_ForPlatformNString(props, "user.name", sprops->user_name);
PUTPROP_ForPlatformNString(props, "user.home", sprops->user_home);
-
- PUTPROP(props, "user.timezone", sprops->timezone);
-
PUTPROP_ForPlatformNString(props, "user.dir", sprops->user_dir);
/* This is a sun. property as it is currently only set for Gnome and
--- a/src/java.base/share/native/libjava/java_props.h Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/share/native/libjava/java_props.h Mon Nov 12 11:10:16 2018 +0530
@@ -56,23 +56,18 @@
nchar *user_name;
nchar *user_home;
- char *language;
char *format_language;
char *display_language;
- char *script;
char *format_script;
char *display_script;
- char *country;
char *format_country;
char *display_country;
- char *variant;
char *format_variant;
char *display_variant;
char *encoding;
char *sun_jnu_encoding;
char *sun_stdout_encoding;
char *sun_stderr_encoding;
- char *timezone;
char *printerJob;
char *graphics_env;
--- a/src/java.base/unix/classes/java/lang/ProcessImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/classes/java/lang/ProcessImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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,8 +47,8 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.util.Properties;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.util.StaticProperty;
import sun.security.action.GetPropertyAction;
@@ -89,7 +89,7 @@
private static enum Platform {
- LINUX(LaunchMechanism.VFORK, LaunchMechanism.FORK),
+ LINUX(LaunchMechanism.VFORK, LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
BSD(LaunchMechanism.POSIX_SPAWN, LaunchMechanism.FORK),
--- a/src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/classes/sun/nio/ch/FileDispatcherImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -28,8 +28,8 @@
import java.io.FileDescriptor;
import java.io.IOException;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
class FileDispatcherImpl extends FileDispatcher {
--- a/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -30,8 +30,8 @@
import java.io.FileDescriptor;
import java.util.Set;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
import sun.nio.ch.FileChannelImpl;
import sun.nio.ch.ThreadPool;
import sun.nio.ch.SimpleAsynchronousFileChannelImpl;
--- a/src/java.base/unix/native/libjava/ProcessImpl_md.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/native/libjava/ProcessImpl_md.c Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -44,9 +44,7 @@
#include <signal.h>
#include <string.h>
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
#include <spawn.h>
-#endif
#include "childproc.h"
@@ -390,7 +388,6 @@
return resultPid;
}
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
static pid_t
spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
pid_t resultPid;
@@ -473,7 +470,6 @@
* via the statement below */
return resultPid;
}
-#endif
/*
* Start a child process running function childProcess.
@@ -489,10 +485,8 @@
#endif
case MODE_FORK:
return forkChild(c);
-#if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
case MODE_POSIX_SPAWN:
return spawnChild(env, process, c, helperpath);
-#endif
default:
return -1;
}
--- a/src/java.base/unix/native/libjava/java_props_md.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/native/libjava/java_props_md.c Mon Nov 12 11:10:16 2018 +0530
@@ -399,7 +399,7 @@
#endif
/* patches/service packs installed */
- sprops.patch_level = "unknown";
+ sprops.patch_level = NULL; // leave it undefined
/* Java 2D/AWT properties */
#ifdef MACOSX
@@ -488,19 +488,15 @@
&(sprops.format_variant),
&(sprops.encoding))) {
ParseLocale(env, LC_MESSAGES,
- &(sprops.language),
- &(sprops.script),
- &(sprops.country),
- &(sprops.variant),
+ &(sprops.display_language),
+ &(sprops.display_script),
+ &(sprops.display_country),
+ &(sprops.display_variant),
NULL);
} else {
- sprops.language = "en";
+ sprops.display_language = "en";
sprops.encoding = "ISO8859-1";
}
- sprops.display_language = sprops.language;
- sprops.display_script = sprops.script;
- sprops.display_country = sprops.country;
- sprops.display_variant = sprops.variant;
/* ParseLocale failed with OOME */
JNU_CHECK_EXCEPTION_RETURN(env, NULL);
@@ -543,18 +539,12 @@
}
}
- /* User TIMEZONE */
- {
- /*
- * We defer setting up timezone until it's actually necessary.
- * Refer to TimeZone.getDefault(). However, the system
- * property is necessary to be able to be set by the command
- * line interface -D. Here temporarily set a null string to
- * timezone.
- */
- tzset(); /* for compatibility */
- sprops.timezone = "";
- }
+ /* User TIMEZONE
+ * We defer setting up timezone until it's actually necessary.
+ * Refer to TimeZone.getDefault(). The system property
+ * is able to be set by the command line interface -Duser.timezone.
+ */
+ tzset(); /* for compatibility */
/* Current directory */
{
--- a/src/java.base/unix/native/libjsig/jsig.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/unix/native/libjsig/jsig.c Mon Nov 12 11:10:16 2018 +0530
@@ -77,7 +77,7 @@
/* Used to synchronize the installation of signal handlers. */
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
-static pthread_t tid = 0;
+static pthread_t tid;
typedef void (*sa_handler_t)(int);
typedef void (*sa_sigaction_t)(int, siginfo_t *, void *);
@@ -110,8 +110,11 @@
/* When the jvm is installing its set of signal handlers, threads
* other than the jvm thread should wait. */
if (jvm_signal_installing) {
- if (tid != pthread_self()) {
- pthread_cond_wait(&cond, &mutex);
+ /* tid is not initialized until jvm_signal_installing is set to true. */
+ if (pthread_equal(tid, pthread_self()) == 0) {
+ do {
+ pthread_cond_wait(&cond, &mutex);
+ } while (jvm_signal_installing);
}
}
}
--- a/src/java.base/windows/classes/java/lang/ProcessImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/java/lang/ProcessImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2018, 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
@@ -43,8 +43,8 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.ref.CleanerFactory;
/* This class is for the exclusive use of ProcessBuilder.start() to
--- a/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/java/net/DualStackPlainDatagramSocketImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,8 +25,8 @@
package java.net;
import java.io.IOException;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
/**
* This class defines the plain DatagramSocketImpl that is used on
--- a/src/java.base/windows/classes/java/net/PlainSocketImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/java/net/PlainSocketImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,10 +27,10 @@
import java.io.IOException;
import java.io.FileDescriptor;
import java.security.AccessController;
-import java.security.PrivilegedAction;
+
import sun.security.action.GetPropertyAction;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
/**
* On Windows system we simply delegate to native methods.
--- a/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/sun/nio/ch/FileDispatcherImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,8 +27,8 @@
import java.io.FileDescriptor;
import java.io.IOException;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
import sun.security.action.GetPropertyAction;
import java.io.File;
import java.nio.CharBuffer;
--- a/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/sun/nio/ch/WindowsAsynchronousFileChannelImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -31,8 +31,8 @@
import java.nio.BufferOverflowException;
import java.io.IOException;
import java.io.FileDescriptor;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
/**
* Windows implementation of AsynchronousFileChannel using overlapped I/O.
--- a/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/classes/sun/nio/fs/WindowsChannelFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -34,8 +34,8 @@
import java.nio.file.StandardOpenOption;
import java.util.Set;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
import sun.nio.ch.FileChannelImpl;
import sun.nio.ch.ThreadPool;
import sun.nio.ch.WindowsAsynchronousFileChannelImpl;
--- a/src/java.base/windows/native/libjava/java_props_md.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/native/libjava/java_props_md.c Mon Nov 12 11:10:16 2018 +0530
@@ -661,12 +661,6 @@
userDefaultUILang = userDefaultLCID;
}
- SetupI18nProps(userDefaultUILang,
- &sprops.language,
- &sprops.script,
- &sprops.country,
- &sprops.variant,
- &display_encoding);
SetupI18nProps(userDefaultLCID,
&sprops.format_language,
&sprops.format_script,
@@ -710,17 +704,12 @@
}
sprops.unicode_encoding = "UnicodeLittle";
- /* User TIMEZONE */
- {
- /*
- * We defer setting up timezone until it's actually necessary.
- * Refer to TimeZone.getDefault(). However, the system
- * property is necessary to be able to be set by the command
- * line interface -D. Here temporarily set a null string to
- * timezone.
- */
- sprops.timezone = "";
- }
+
+ /* User TIMEZONE
+ * We defer setting up timezone until it's actually necessary.
+ * Refer to TimeZone.getDefault(). The system property
+ * is able to be set by the command line interface -Duser.timezone.
+ */
/* Current directory */
{
--- a/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.base/windows/native/libnio/fs/WindowsNativeDispatcher.c Mon Nov 12 11:10:16 2018 +0530
@@ -311,8 +311,10 @@
HANDLE handle = FindFirstFileW(lpFileName, &data);
if (handle != INVALID_HANDLE_VALUE) {
jstring name = (*env)->NewString(env, data.cFileName, (jsize)wcslen(data.cFileName));
- if (name == NULL)
+ if (name == NULL) {
+ FindClose(handle);
return;
+ }
(*env)->SetLongField(env, obj, findFirst_handle, ptr_to_jlong(handle));
(*env)->SetObjectField(env, obj, findFirst_name, name);
(*env)->SetIntField(env, obj, findFirst_attributes, data.dwFileAttributes);
@@ -362,8 +364,10 @@
handle = FindFirstStreamW(lpFileName, FindStreamInfoStandard, &data, 0);
if (handle != INVALID_HANDLE_VALUE) {
jstring name = (*env)->NewString(env, data.cStreamName, (jsize)wcslen(data.cStreamName));
- if (name == NULL)
+ if (name == NULL) {
+ FindClose(handle);
return;
+ }
(*env)->SetLongField(env, obj, findStream_handle, ptr_to_jlong(handle));
(*env)->SetObjectField(env, obj, findStream_name, name);
} else {
--- a/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.compiler/share/classes/javax/annotation/processing/RoundEnvironment.java Mon Nov 12 11:10:16 2018 +0530
@@ -143,11 +143,26 @@
* simply because a {@code module-info} file for that module was
* created.
*
+ * <p> Note: An implementation of this method typically performs
+ * an internal conversion from the runtime reflective
+ * representation of an annotation type as a {@code Class} object
+ * to a different representation used for annotation
+ * processing. The set of annotation types present in the runtime
+ * context may differ from the set of annotation types present in
+ * the context of annotation processing in a particular
+ * environmental configuration. If an runtime annotation type is
+ * not present in the annotation processing context, the situation
+ * is not treated as an error and no elements are found for that
+ * annotation type.
+ *
* @param a annotation type being requested
* @return the elements annotated with the given annotation type,
* or an empty set if there are none
* @throws IllegalArgumentException if the argument does not
* represent an annotation type
+ *
+ * @see javax.lang.model.AnnotatedConstruct#getAnnotation(Class)
+ * @see javax.lang.model.AnnotatedConstruct#getAnnotationsByType(Class)
*/
Set<? extends Element> getElementsAnnotatedWith(Class<? extends Annotation> a);
@@ -155,6 +170,18 @@
* Returns the elements annotated with one or more of the given
* annotation types.
*
+ * <p> Note: An implementation of this method typically performs
+ * an internal conversion from the runtime reflective
+ * representation of an annotation type as a {@code Class} object
+ * to a different representation used for annotation
+ * processing. The set of annotation types present in the runtime
+ * context may differ from the set of annotation types present in
+ * the context of annotation processing in a particular
+ * environmental configuration. If an runtime annotation type is
+ * not present in the annotation processing context, the situation
+ * is not treated as an error and no elements are found for that
+ * annotation type.
+ *
* @apiNote This method may be useful when processing repeating
* annotations by looking for an annotation type and its
* containing annotation type at the same time.
@@ -172,6 +199,10 @@
* @throws IllegalArgumentException if the any elements of the
* argument set do not represent an annotation type
* @jls 9.6.3 Repeatable Annotation Types
+ *
+ * @see javax.lang.model.AnnotatedConstruct#getAnnotation(Class)
+ * @see javax.lang.model.AnnotatedConstruct#getAnnotationsByType(Class)
+ *
* @since 9
*/
default Set<? extends Element> getElementsAnnotatedWithAny(Set<Class<? extends Annotation>> annotations){
--- a/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/com/sun/beans/decoder/DocumentHandler.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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
@@ -50,7 +50,7 @@
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* The main class to parse JavaBeans XML archive.
--- a/src/java.desktop/share/classes/java/awt/EventQueue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/java/awt/EventQueue.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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,8 +47,8 @@
import java.security.AccessControlContext;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaSecurityAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
/**
* {@code EventQueue} is a platform-independent class
--- a/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
package java.awt.font;
-import jdk.internal.misc.JavaAWTFontAccess;
+import jdk.internal.access.JavaAWTFontAccess;
class JavaAWTFontAccessImpl implements JavaAWTFontAccess {
--- a/src/java.desktop/share/classes/java/awt/font/NumericShaper.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/java/awt/font/NumericShaper.java Mon Nov 12 11:10:16 2018 +0530
@@ -31,7 +31,7 @@
import java.util.Comparator;
import java.util.EnumSet;
import java.util.Set;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* The {@code NumericShaper} class is used to convert Latin-1 (European)
--- a/src/java.desktop/share/classes/java/awt/font/TextAttribute.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/java/awt/font/TextAttribute.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -44,7 +44,7 @@
import java.text.AttributedCharacterIterator.Attribute;
import java.util.Map;
import java.util.HashMap;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/**
* The {@code TextAttribute} class defines attribute keys and
--- a/src/java.desktop/share/classes/java/beans/Introspector.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/java/beans/Introspector.java Mon Nov 12 11:10:16 2018 +0530
@@ -42,15 +42,14 @@
import java.util.Map;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.EventObject;
import java.util.List;
import java.util.TreeMap;
-import jdk.internal.misc.JavaBeansAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaBeansAccess;
+import jdk.internal.access.SharedSecrets;
import sun.reflect.misc.ReflectUtil;
/**
--- a/src/java.desktop/share/classes/javax/swing/RepaintManager.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/javax/swing/RepaintManager.java Mon Nov 12 11:10:16 2018 +0530
@@ -35,8 +35,8 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.applet.*;
-import jdk.internal.misc.JavaSecurityAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
+import jdk.internal.access.SharedSecrets;
import sun.awt.AWTAccessor;
import sun.awt.AppContext;
import sun.awt.DisplayChangedListener;
--- a/src/java.desktop/share/classes/javax/swing/TransferHandler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/javax/swing/TransferHandler.java Mon Nov 12 11:10:16 2018 +0530
@@ -46,9 +46,9 @@
import java.security.PrivilegedAction;
import java.security.AccessControlContext;
-import java.security.ProtectionDomain;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaSecurityAccess;
+
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
import sun.awt.AWTAccessor;
--- a/src/java.desktop/share/classes/sun/awt/AppContext.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.desktop/share/classes/sun/awt/AppContext.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -44,8 +44,8 @@
import java.beans.PropertyChangeListener;
import java.lang.ref.SoftReference;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
import sun.util.logging.PlatformLogger;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
--- a/src/java.logging/share/classes/java/util/logging/Level.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.logging/share/classes/java/util/logging/Level.java Mon Nov 12 11:10:16 2018 +0530
@@ -40,8 +40,8 @@
import java.util.ResourceBundle;
import java.util.function.Function;
import jdk.internal.loader.ClassLoaderValue;
-import jdk.internal.misc.JavaUtilResourceBundleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaUtilResourceBundleAccess;
+import jdk.internal.access.SharedSecrets;
/**
* The Level class defines a set of standard logging levels that
--- a/src/java.logging/share/classes/java/util/logging/LogManager.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.logging/share/classes/java/util/logging/LogManager.java Mon Nov 12 11:10:16 2018 +0530
@@ -39,8 +39,8 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
import sun.util.logging.internal.LoggingProviderImpl;
import static jdk.internal.logger.DefaultLoggerFinder.isSystem;
--- a/src/java.logging/share/classes/java/util/logging/Logger.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.logging/share/classes/java/util/logging/Logger.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -37,8 +37,8 @@
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.Supplier;
-import jdk.internal.misc.JavaUtilResourceBundleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaUtilResourceBundleAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
import static jdk.internal.logger.DefaultLoggerFinder.isSystem;
--- a/src/java.management/share/classes/com/sun/jmx/mbeanserver/JavaBeansAccessor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/com/sun/jmx/mbeanserver/JavaBeansAccessor.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -26,8 +26,8 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
-import jdk.internal.misc.JavaBeansAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaBeansAccess;
+import jdk.internal.access.SharedSecrets;
/**
* A centralized place for gaining access to java.beans related functionality -
--- a/src/java.management/share/classes/java/lang/management/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/java/lang/management/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
<!--
- Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2003, 2018, 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
@@ -69,7 +69,7 @@
this allows interoperation across versions.
A data type used by the MXBean interfaces are mapped to an
open type when being accessed via MBeanServer interface.
-See the <a href="{@docRoot}/javax/management/MXBean.html#MXBean-spec">
+See the <a href="{@docRoot}/java.management/javax/management/MXBean.html#MXBean-spec">
MXBean</a> specification for details.
<h3><a id="examples">Ways to Access MXBeans</a></h3>
--- a/src/java.management/share/classes/javax/management/Query.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/javax/management/Query.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -128,7 +128,7 @@
*
* @return The conjunction of the two arguments. The returned object
* will be serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.AndQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.AndQueryExp">
* javax.management.AndQueryExp</a>.
*/
public static QueryExp and(QueryExp q1, QueryExp q2) {
@@ -144,7 +144,7 @@
*
* @return The disjunction of the two arguments. The returned object
* will be serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.OrQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.OrQueryExp">
* javax.management.OrQueryExp</a>.
*/
public static QueryExp or(QueryExp q1, QueryExp q2) {
@@ -161,7 +161,7 @@
* @return A "greater than" constraint on the arguments. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp">
* javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal
* to {@link #GT}.
*/
@@ -179,7 +179,7 @@
* @return A "greater than or equal to" constraint on the
* arguments. The returned object will be serialized as an
* instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp">
* javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal
* to {@link #GE}.
*/
@@ -197,7 +197,7 @@
* @return A "less than or equal to" constraint on the arguments.
* The returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp">
* javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal
* to {@link #LE}.
*/
@@ -215,7 +215,7 @@
* @return A "less than" constraint on the arguments. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp">
* javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal
* to {@link #LT}.
*/
@@ -233,7 +233,7 @@
* @return A "equal to" constraint on the arguments. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryRelQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryRelQueryExp">
* javax.management.BinaryRelQueryExp</a> with a {@code relOp} equal
* to {@link #EQ}.
*/
@@ -252,7 +252,7 @@
* @return The constraint that v1 lies between v2 and v3. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BetweenQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BetweenQueryExp">
* javax.management.BetweenQueryExp</a>.
*/
public static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3) {
@@ -280,7 +280,7 @@
* @return A query expression that represents the matching
* constraint on the string argument. The returned object will
* be serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.MatchQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp">
* javax.management.MatchQueryExp</a>.
*/
public static QueryExp match(AttributeValueExp a, StringValueExp s) {
@@ -320,7 +320,7 @@
* @return An attribute expression for the attribute named name.
* The returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.QualifiedAttributeValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.QualifiedAttributeValueExp">
* javax.management.QualifiedAttributeValueExp</a>.
*/
public static AttributeValueExp attr(String className, String name) {
@@ -338,7 +338,7 @@
*
* @return A class attribute expression. The returned object
* will be serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.ClassAttributeValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.ClassAttributeValueExp">
* javax.management.ClassAttributeValueExp</a>.
*/
public static AttributeValueExp classattr() {
@@ -352,7 +352,7 @@
*
* @return A negated constraint. The returned object will be
* serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.NotQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NotQueryExp">
* javax.management.NotQueryExp</a>.
*/
public static QueryExp not(QueryExp queryExp) {
@@ -368,7 +368,7 @@
* @return A QueryExp that represents the constraint. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.InQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.InQueryExp">
* javax.management.InQueryExp</a>.
*/
public static QueryExp in(ValueExp val, ValueExp valueList[]) {
@@ -395,7 +395,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.NumericValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp">
* javax.management.NumericValueExp</a>.
*/
public static ValueExp value(Number val) {
@@ -411,7 +411,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.NumericValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp">
* javax.management.NumericValueExp</a>.
*/
public static ValueExp value(int val) {
@@ -427,7 +427,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.NumericValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp">
* javax.management.NumericValueExp</a>.
*/
public static ValueExp value(long val) {
@@ -443,7 +443,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.NumericValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp">
* javax.management.NumericValueExp</a>.
*/
public static ValueExp value(float val) {
@@ -459,7 +459,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.NumericValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.NumericValueExp">
* javax.management.NumericValueExp</a>.
*/
public static ValueExp value(double val) {
@@ -475,7 +475,7 @@
* @return A ValueExp object containing the argument. The
* returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BooleanValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BooleanValueExp">
* javax.management.BooleanValueExp</a>.
*/
public static ValueExp value(boolean val) {
@@ -492,7 +492,7 @@
* @return A ValueExp representing the sum or concatenation of
* the two arguments. The returned object will be serialized as
* an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp">
* javax.management.BinaryOpValueExp</a> with an {@code op} equal to
* {@link #PLUS}.
*/
@@ -510,7 +510,7 @@
* @return A ValueExp representing the product. The returned
* object will be serialized as an instance of the non-public
* class
- * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp">
* javax.management.BinaryOpValueExp</a> with an {@code op} equal to
* {@link #TIMES}.
*/
@@ -528,7 +528,7 @@
* @return A ValueExp representing the difference between two
* arguments. The returned object will be serialized as an
* instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp">
* javax.management.BinaryOpValueExp</a> with an {@code op} equal to
* {@link #MINUS}.
*/
@@ -546,7 +546,7 @@
* @return A ValueExp representing the quotient of two arguments.
* The returned object will be serialized as an instance of the
* non-public class
- * <a href="../../serialized-form.html#javax.management.BinaryOpValueExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.BinaryOpValueExp">
* javax.management.BinaryOpValueExp</a> with an {@code op} equal to
* {@link #DIV}.
*/
@@ -566,7 +566,7 @@
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
*
- * <a href="../../serialized-form.html#javax.management.MatchQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp">
* javax.management.MatchQueryExp</a>.
*/
public static QueryExp initialSubString(AttributeValueExp a, StringValueExp s) {
@@ -585,7 +585,7 @@
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
*
- * <a href="../../serialized-form.html#javax.management.MatchQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp">
* javax.management.MatchQueryExp</a>.
*/
public static QueryExp anySubString(AttributeValueExp a, StringValueExp s) {
@@ -605,7 +605,7 @@
* @return The constraint that a matches s. The returned object
* will be serialized as an instance of the non-public class
*
- * <a href="../../serialized-form.html#javax.management.MatchQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.MatchQueryExp">
* javax.management.MatchQueryExp</a>.
*/
public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s) {
@@ -630,7 +630,7 @@
* @return a query expression that represents an inheritance
* constraint on an MBean class. The returned object will be
* serialized as an instance of the non-public class
- * <a href="../../serialized-form.html#javax.management.InstanceOfQueryExp">
+ * <a href="{@docRoot}/serialized-form.html#javax.management.InstanceOfQueryExp">
* javax.management.InstanceOfQueryExp</a>.
* @since 1.6
*/
--- a/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/javax/management/modelmbean/RequiredModelMBean.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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
@@ -80,8 +80,8 @@
import javax.management.RuntimeOperationsException;
import javax.management.ServiceNotFoundException;
import javax.management.loading.ClassLoaderRepository;
-import jdk.internal.misc.JavaSecurityAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaSecurityAccess;
+import jdk.internal.access.SharedSecrets;
import sun.reflect.misc.MethodUtil;
import sun.reflect.misc.ReflectUtil;
--- a/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/javax/management/openmbean/TabularDataSupport.java Mon Nov 12 11:10:16 2018 +0530
@@ -45,7 +45,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
// jmx import
//
--- a/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/javax/management/remote/JMXConnectorFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, 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
@@ -137,7 +137,7 @@
* <code>MalformedURLException</code> if there is none. An
* implementation may choose to find providers by other means. For
* example, it may support <a
- * href="{@docRoot}/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
+ * href="{@docRoot}/java.base/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
* where the service interface is <code>JMXConnectorProvider</code>.</p>
*
* <p>Every implementation must support the RMI connector protocol with
--- a/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/javax/management/remote/JMXConnectorServerFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, 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
@@ -128,7 +128,7 @@
* <code>MalformedURLException</code> if there is none. An
* implementation may choose to find providers by other means. For
* example, it may support <a
- * href="{@docRoot}/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
+ * href="{@docRoot}/java.base/java/util/ServiceLoader.html#developing-service-providers">service providers</a>,
* where the service interface is <code>JMXConnectorServerProvider</code>.</p>
*
* <p>Every implementation must support the RMI connector protocol with
--- a/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.management/share/classes/sun/management/ManagementFactoryHelper.java Mon Nov 12 11:10:16 2018 +0530
@@ -39,8 +39,8 @@
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
-import jdk.internal.misc.JavaNioAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNioAccess;
+import jdk.internal.access.SharedSecrets;
import java.util.ArrayList;
import java.util.List;
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/VersionHelper.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/VersionHelper.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
package com.sun.jndi.ldap;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import java.net.MalformedURLException;
import java.net.URL;
--- a/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2018, 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
@@ -57,7 +57,7 @@
import java.security.ProtectionDomain;
import java.text.MessageFormat;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import sun.rmi.runtime.Log;
import sun.rmi.server.UnicastRef;
import sun.rmi.server.UnicastServerRef;
--- a/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.security.jgss/share/classes/sun/security/jgss/wrapper/NativeGSSContext.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, 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
@@ -63,12 +63,14 @@
private GSSNameElement srcName;
private GSSNameElement targetName;
private GSSCredElement cred;
+ private GSSCredElement disposeCred;
private boolean isInitiator;
private boolean isEstablished;
private Oid actualMech; // Assigned during context establishment
private ChannelBinding cb;
private GSSCredElement delegatedCred;
+ private GSSCredElement disposeDelegatedCred;
private int flags;
private int lifetime = GSSCredential.DEFAULT_LIFETIME;
private final GSSLibStub cStub;
@@ -192,6 +194,7 @@
}
cStub = stub;
cred = myCred;
+ disposeCred = null;
targetName = peer;
isInitiator = true;
lifetime = time;
@@ -199,8 +202,9 @@
if (GSSUtil.isKerberosMech(cStub.getMech())) {
doServicePermCheck();
if (cred == null) {
- cred = new GSSCredElement(null, lifetime,
- GSSCredential.INITIATE_ONLY, cStub);
+ disposeCred = cred =
+ new GSSCredElement(null, lifetime,
+ GSSCredential.INITIATE_ONLY, cStub);
}
srcName = cred.getName();
}
@@ -211,6 +215,7 @@
throws GSSException {
cStub = stub;
cred = myCred;
+ disposeCred = null;
if (cred != null) targetName = cred.getName();
@@ -297,9 +302,9 @@
(cStub.getContextName(pContext, true), cStub);
}
if (cred == null) {
- cred = new GSSCredElement(srcName, lifetime,
- GSSCredential.INITIATE_ONLY,
- cStub);
+ disposeCred = cred =
+ new GSSCredElement(srcName, lifetime,
+ GSSCredential.INITIATE_ONLY, cStub);
}
}
}
@@ -315,6 +320,7 @@
inToken.length);
long pCred = (cred == null? 0 : cred.pCred);
outToken = cStub.acceptContext(pCred, cb, inToken, this);
+ disposeDelegatedCred = delegatedCred;
SunNativeProvider.debug("acceptSecContext=> outToken len=" +
(outToken == null? 0 : outToken.length));
@@ -323,9 +329,12 @@
(cStub.getContextName(pContext, false), cStub);
// Replace the current default acceptor cred now that
// the context acceptor name is available
- if (cred != null) cred.dispose();
- cred = new GSSCredElement(targetName, lifetime,
- GSSCredential.ACCEPT_ONLY, cStub);
+ if (disposeCred != null) {
+ disposeCred.dispose();
+ }
+ disposeCred = cred =
+ new GSSCredElement(targetName, lifetime,
+ GSSCredential.ACCEPT_ONLY, cStub);
}
// Only inspect token when the permission check has not
@@ -346,9 +355,15 @@
}
public void dispose() throws GSSException {
+ if (disposeCred != null) {
+ disposeCred.dispose();
+ }
+ if (disposeDelegatedCred != null) {
+ disposeDelegatedCred.dispose();
+ }
+ disposeDelegatedCred = disposeCred = cred = null;
srcName = null;
targetName = null;
- cred = null;
delegatedCred = null;
if (pContext != 0) {
pContext = cStub.deleteContext(pContext);
@@ -612,6 +627,7 @@
}
}
public GSSCredentialSpi getDelegCred() throws GSSException {
+ disposeDelegatedCred = null;
return delegatedCred;
}
public boolean isInitiator() {
--- a/src/java.xml/share/classes/javax/xml/namespace/package-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.xml/share/classes/javax/xml/namespace/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -35,10 +35,10 @@
* <li><a href="http://www.w3.org/TR/xmlschema-2/#QName">
* XML Schema Part2: Datatypes specification</a>
* </li>
- * <li><a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
+ * <li><a href="https://www.w3.org/TR/REC-xml-names/">
* Namespaces in XML</a>
* </li>
- * <li><a href="http://www.w3.org/XML/xml-names-19990114-errata">
+ * <li><a href="https://www.w3.org/XML/xml-names-19990114-errata.html">
* Namespaces in XML Errata</a>
* </li>
* </ul>
--- a/src/java.xml/share/classes/org/w3c/dom/ls/LSOutput.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/java.xml/share/classes/org/w3c/dom/ls/LSOutput.java Mon Nov 12 11:10:16 2018 +0530
@@ -117,19 +117,19 @@
/**
* The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * string acceptable for an XML encoding declaration ([<a href='https://www.w3.org/TR/xml/'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities"), it is recommended that
* character encodings registered (as charsets) with the Internet
- * Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
+ * Assigned Numbers Authority [<a href='http://www.iana.org/assignments/character-sets/character-sets.xhtml'>IANA-CHARSETS</a>]
* should be referred to using their registered names.
*/
public String getEncoding();
/**
* The character encoding to use for the output. The encoding must be a
- * string acceptable for an XML encoding declaration ([<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>] section
+ * string acceptable for an XML encoding declaration ([<a href='https://www.w3.org/TR/xml/'>XML 1.0</a>] section
* 4.3.3 "Character Encoding in Entities"), it is recommended that
* character encodings registered (as charsets) with the Internet
- * Assigned Numbers Authority [<a href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>IANA-CHARSETS</a>]
+ * Assigned Numbers Authority [<a href='http://www.iana.org/assignments/character-sets/character-sets.xhtml'>IANA-CHARSETS</a>]
* should be referred to using their registered names.
*/
public void setEncoding(String encoding);
--- a/src/jdk.charsets/share/classes/sun/nio/cs/ext/GB18030.java.template Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.charsets/share/classes/sun/nio/cs/ext/GB18030.java.template Mon Nov 12 11:10:16 2018 +0530
@@ -12519,7 +12519,7 @@
dst.put(getChar(offset));
else if (offset >= 0x830D && offset <= 0x93A8)
dst.put((char)(offset + 0x6557));
- else if (offset >= 0x93A9 && offset <= 0x99F9)
+ else if (offset >= 0x93A9 && offset <= 0x99FB)
dst.put(getChar(offset));
// Supplemental UCS planes handled via surrogates
else if (offset >= 0x2E248 && offset < 0x12E248) {
--- a/src/jdk.charsets/share/classes/sun/nio/cs/ext/ISO2022_JP.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.charsets/share/classes/sun/nio/cs/ext/ISO2022_JP.java Mon Nov 12 11:10:16 2018 +0530
@@ -312,7 +312,7 @@
break;
case JISX0201_1976_KANA:
case SHIFTOUT:
- if (b1 > 0x60) {
+ if (b1 > 0x5f) {
return CoderResult.malformedForLength(inputSize);
}
da[dp++] = (char)(b1 + 0xff40);
@@ -433,7 +433,7 @@
break;
case JISX0201_1976_KANA:
case SHIFTOUT:
- if (b1 > 0x60) {
+ if (b1 > 0x5f) {
return CoderResult.malformedForLength(inputSize);
}
dst.put((char)(b1 + 0xff40));
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, 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
@@ -2020,6 +2020,7 @@
for (IncorporationAction action : incorporationActions) {
uv2.incorporationActions.add(action.dup(uv2));
}
+ uv2.kind = kind;
}
@Override
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Mon Nov 12 11:10:16 2018 +0530
@@ -2419,7 +2419,7 @@
clazztype.getMetadata());
Env<AttrContext> diamondEnv = localEnv.dup(tree);
- diamondEnv.info.selectSuper = cdef != null;
+ diamondEnv.info.selectSuper = cdef != null || tree.classDeclRemoved();
diamondEnv.info.pendingResolutionPhase = null;
//if the type of the instance creation expression is a class type
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Mon Nov 12 11:10:16 2018 +0530
@@ -151,7 +151,7 @@
JCExpression clazz = copy(t.clazz, p);
List<JCExpression> args = copy(t.args, p);
JCClassDecl def = null;
- return make.at(t.pos).NewClass(encl, typeargs, clazz, args, def);
+ return make.at(t.pos).SpeculativeNewClass(encl, typeargs, clazz, args, def, t.def != null);
} else {
return super.visitNewClass(node, p);
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Nov 12 11:10:16 2018 +0530
@@ -31,6 +31,7 @@
import javax.lang.model.util.*;
import java.util.*;
+import com.sun.tools.javac.code.Source.Feature;
import com.sun.tools.javac.util.DefinedBy;
import com.sun.tools.javac.util.DefinedBy.Api;
@@ -53,17 +54,20 @@
private final ProcessingEnvironment processingEnv;
private final Elements eltUtils;
+ private final boolean allowModules;
+
// Caller must pass in an immutable set
private final Set<? extends Element> rootElements;
JavacRoundEnvironment(boolean processingOver,
boolean errorRaised,
Set<? extends Element> rootElements,
- ProcessingEnvironment processingEnv) {
+ JavacProcessingEnvironment processingEnv) {
this.processingOver = processingOver;
this.errorRaised = errorRaised;
this.rootElements = rootElements;
this.processingEnv = processingEnv;
+ this.allowModules = Feature.MODULES.allowedInSource(processingEnv.source);
this.eltUtils = processingEnv.getElementUtils();
}
@@ -287,9 +291,11 @@
TypeElement annotationElement = eltUtils.getTypeElement(name);
if (annotationElement != null)
return annotationElement;
- else {
+ else if (allowModules) {
String moduleName = Objects.requireNonNullElse(annotation.getModule().getName(), "");
return eltUtils.getTypeElement(eltUtils.getModuleElement(moduleName), name);
+ } else {
+ return null;
}
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java Mon Nov 12 11:10:16 2018 +0530
@@ -1787,6 +1787,10 @@
public Tag getTag() {
return NEWCLASS;
}
+
+ public boolean classDeclRemoved() {
+ return false;
+ }
}
/**
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java Mon Nov 12 11:10:16 2018 +0530
@@ -378,7 +378,24 @@
List<JCExpression> args,
JCClassDecl def)
{
- JCNewClass tree = new JCNewClass(encl, typeargs, clazz, args, def);
+ return SpeculativeNewClass(encl, typeargs, clazz, args, def, false);
+ }
+
+ public JCNewClass SpeculativeNewClass(JCExpression encl,
+ List<JCExpression> typeargs,
+ JCExpression clazz,
+ List<JCExpression> args,
+ JCClassDecl def,
+ boolean classDefRemoved)
+ {
+ JCNewClass tree = classDefRemoved ?
+ new JCNewClass(encl, typeargs, clazz, args, def) {
+ @Override
+ public boolean classDeclRemoved() {
+ return true;
+ }
+ } :
+ new JCNewClass(encl, typeargs, clazz, args, def);
tree.pos = pos;
return tree;
}
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS12_KEY_MAT_PARAMS.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS12_KEY_MAT_PARAMS.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. and/or its affiliates.
- *
+ * Copyright (c) 2018, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS12_MASTER_KEY_DERIVE_PARAMS.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS12_MASTER_KEY_DERIVE_PARAMS.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. and/or its affiliates.
- *
+ * Copyright (c) 2018, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS_MAC_PARAMS.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/CK_TLS_MAC_PARAMS.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,11 +1,12 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. and/or its affiliates.
- *
+ * Copyright (c) 2018, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.aarch64/src/jdk/vm/ci/aarch64/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The AArch64 platform independent portions of the JVMCI API.
+ */
+package jdk.vm.ci.aarch64;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.amd64/src/jdk/vm/ci/amd64/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The AMD64 platform independent portions of the JVMCI API.
+ */
+package jdk.vm.ci.amd64;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java Mon Nov 12 11:10:16 2018 +0530
@@ -43,13 +43,19 @@
*
* @param caller the parent position
* @param method the method
- * @param bci a BCI within the method
+ * @param bci a BCI such that {@code method.codeSize() == 0 || bci < method.getCodeSize()}. That
+ * is, if code size is 0 then allow any value, otherwise the bci must be less than
+ * the code size.
*/
public BytecodePosition(BytecodePosition caller, ResolvedJavaMethod method, int bci) {
assert method != null;
this.caller = caller;
this.method = method;
this.bci = bci;
+ int codeSize = method.getCodeSize();
+ if (codeSize != 0 && bci >= codeSize) {
+ throw new IllegalArgumentException(String.format("bci %d is out of range for %s %d bytes", bci, method.format("%H.%n(%p)"), codeSize));
+ }
}
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/site/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * Package that defines the information associated with various {@link jdk.vm.ci.code.site.Site
+ * sites} in generated code.
+ */
+package jdk.vm.ci.code.site;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.code/src/jdk/vm/ci/code/stack/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/**
+ * Package that defines the interface for runtime stack introspection.
+ */
+package jdk.vm.ci.code.stack;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Common utility classes used by the JVMCI API.
+ */
+package jdk.vm.ci.common;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotJVMCIBackendFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -43,7 +43,7 @@
public class AArch64HotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory {
- protected EnumSet<AArch64.CPUFeature> computeFeatures(@SuppressWarnings("unused") AArch64HotSpotVMConfig config) {
+ private static EnumSet<AArch64.CPUFeature> computeFeatures(@SuppressWarnings("unused") AArch64HotSpotVMConfig config) {
// Configure the feature set using the HotSpot flag settings.
EnumSet<AArch64.CPUFeature> features = EnumSet.noneOf(AArch64.CPUFeature.class);
@@ -87,7 +87,7 @@
return features;
}
- protected EnumSet<AArch64.Flag> computeFlags(@SuppressWarnings("unused") AArch64HotSpotVMConfig config) {
+ private static EnumSet<AArch64.Flag> computeFlags(@SuppressWarnings("unused") AArch64HotSpotVMConfig config) {
EnumSet<AArch64.Flag> flags = EnumSet.noneOf(AArch64.Flag.class);
if (config.useBarriersForVolatile) {
@@ -115,7 +115,7 @@
return flags;
}
- protected TargetDescription createTarget(AArch64HotSpotVMConfig config) {
+ private static TargetDescription createTarget(AArch64HotSpotVMConfig config) {
final int stackFrameAlignment = 16;
final int implicitNullCheckLimit = 4096;
final boolean inlineObjects = true;
@@ -127,12 +127,12 @@
return new HotSpotConstantReflectionProvider(runtime);
}
- protected RegisterConfig createRegisterConfig(AArch64HotSpotVMConfig config, TargetDescription target) {
+ private static RegisterConfig createRegisterConfig(AArch64HotSpotVMConfig config, TargetDescription target) {
return new AArch64HotSpotRegisterConfig(target, config.useCompressedOops);
}
protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntime runtime, TargetDescription target, RegisterConfig regConfig) {
- return new HotSpotCodeCacheProvider(runtime, runtime.getConfig(), target, regConfig);
+ return new HotSpotCodeCacheProvider(runtime, target, regConfig);
}
protected HotSpotMetaAccessProvider createMetaAccess(HotSpotJVMCIRuntime runtime) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotRegisterConfig.java Mon Nov 12 11:10:16 2018 +0530
@@ -126,8 +126,7 @@
public static final Register threadRegister = r28;
public static final Register fp = r29;
- private static final RegisterArray reservedRegisters
- = new RegisterArray(rscratch1, rscratch2, threadRegister, fp, lr, r31, zr, sp);
+ private static final RegisterArray reservedRegisters = new RegisterArray(rscratch1, rscratch2, threadRegister, fp, lr, r31, zr, sp);
private static RegisterArray initAllocatable(Architecture arch, boolean reserveForHeapBase) {
RegisterArray allRegisters = arch.getAvailableValueRegisters();
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/AArch64HotSpotVMConfig.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -58,6 +58,7 @@
/*
* These flags are set if the corresponding support is in the hardware.
*/
+ // Checkstyle: stop
final long aarch64FP = getConstant("VM_Version::CPU_FP", Long.class);
final long aarch64ASIMD = getConstant("VM_Version::CPU_ASIMD", Long.class);
final long aarch64EVTSTRM = getConstant("VM_Version::CPU_EVTSTRM", Long.class);
@@ -70,4 +71,5 @@
final long aarch64STXR_PREFETCH = getConstant("VM_Version::CPU_STXR_PREFETCH", Long.class);
final long aarch64A53MAC = getConstant("VM_Version::CPU_A53MAC", Long.class);
final long aarch64DMB_ATOMICS = getConstant("VM_Version::CPU_DMB_ATOMICS", Long.class);
+ // Checkstyle: resume
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.aarch64/src/jdk/vm/ci/hotspot/aarch64/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The AArch64 HotSpot specific portions of the JVMCI API.
+ */
+package jdk.vm.ci.hotspot.aarch64;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotJVMCIBackendFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -43,7 +43,7 @@
public class AMD64HotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory {
- protected EnumSet<AMD64.CPUFeature> computeFeatures(AMD64HotSpotVMConfig config) {
+ private static EnumSet<AMD64.CPUFeature> computeFeatures(AMD64HotSpotVMConfig config) {
// Configure the feature set using the HotSpot flag settings.
EnumSet<AMD64.CPUFeature> features = EnumSet.noneOf(AMD64.CPUFeature.class);
if ((config.vmVersionFeatures & config.amd643DNOWPREFETCH) != 0) {
@@ -130,7 +130,7 @@
return features;
}
- protected EnumSet<AMD64.Flag> computeFlags(AMD64HotSpotVMConfig config) {
+ private static EnumSet<AMD64.Flag> computeFlags(AMD64HotSpotVMConfig config) {
EnumSet<AMD64.Flag> flags = EnumSet.noneOf(AMD64.Flag.class);
if (config.useCountLeadingZerosInstruction) {
flags.add(AMD64.Flag.UseCountLeadingZerosInstruction);
@@ -141,7 +141,7 @@
return flags;
}
- protected TargetDescription createTarget(AMD64HotSpotVMConfig config) {
+ private static TargetDescription createTarget(AMD64HotSpotVMConfig config) {
final int stackFrameAlignment = 16;
final int implicitNullCheckLimit = 4096;
final boolean inlineObjects = true;
@@ -153,12 +153,12 @@
return new HotSpotConstantReflectionProvider(runtime);
}
- protected RegisterConfig createRegisterConfig(AMD64HotSpotVMConfig config, TargetDescription target) {
+ private static RegisterConfig createRegisterConfig(AMD64HotSpotVMConfig config, TargetDescription target) {
return new AMD64HotSpotRegisterConfig(target, config.useCompressedOops, config.windowsOs);
}
protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntime runtime, TargetDescription target, RegisterConfig regConfig) {
- return new HotSpotCodeCacheProvider(runtime, runtime.getConfig(), target, regConfig);
+ return new HotSpotCodeCacheProvider(runtime, target, regConfig);
}
protected HotSpotMetaAccessProvider createMetaAccess(HotSpotJVMCIRuntime runtime) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/AMD64HotSpotVMConfig.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
import jdk.vm.ci.hotspot.HotSpotVMConfigAccess;
import jdk.vm.ci.hotspot.HotSpotVMConfigStore;
+/**
+ * Used to access AMD64 specific native configuration details.
+ */
class AMD64HotSpotVMConfig extends HotSpotVMConfigAccess {
AMD64HotSpotVMConfig(HotSpotVMConfigStore config) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The AMD64 HotSpot specific portions of the JVMCI API.
+ */
+package jdk.vm.ci.hotspot.amd64;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotJVMCIBackendFactory.java Mon Nov 12 11:10:16 2018 +0530
@@ -43,7 +43,7 @@
public class SPARCHotSpotJVMCIBackendFactory implements HotSpotJVMCIBackendFactory {
- protected TargetDescription createTarget(SPARCHotSpotVMConfig config) {
+ private static TargetDescription createTarget(SPARCHotSpotVMConfig config) {
final int stackFrameAlignment = 16;
final int implicitNullCheckLimit = 4096;
final boolean inlineObjects = false;
@@ -52,10 +52,10 @@
}
protected HotSpotCodeCacheProvider createCodeCache(HotSpotJVMCIRuntime runtime, TargetDescription target, RegisterConfig regConfig) {
- return new HotSpotCodeCacheProvider(runtime, runtime.getConfig(), target, regConfig);
+ return new HotSpotCodeCacheProvider(runtime, target, regConfig);
}
- protected EnumSet<CPUFeature> computeFeatures(SPARCHotSpotVMConfig config) {
+ private static EnumSet<CPUFeature> computeFeatures(SPARCHotSpotVMConfig config) {
EnumSet<CPUFeature> features = EnumSet.noneOf(CPUFeature.class);
if ((config.vmVersionFeatures & 1L << config.sparc_ADI) != 0) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/SPARCHotSpotVMConfig.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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 @@
final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
+ // @formatter:off
// CPU capabilities:
//
// FIXME: Using a 64-bit value is insufficient to support future capability
// sets (including co-processor capabilities such as DAX).
final long vmVersionFeatures = getFieldValue("Abstract_VM_Version::_features", Long.class, "uint64_t");
+ //
// SPARC specific values:
//
// NOTE: Values changed into an enumeration (that do indeed fit within a
@@ -97,4 +99,5 @@
final boolean useBlockZeroing = getFlag("UseBlockZeroing", Boolean.class);
final int blockZeroingLowLimit = getFlag("BlockZeroingLowLimit", Integer.class);
+ // @formatter:on
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The SPARC HotSpot specific portions of the JVMCI API.
+ */
+package jdk.vm.ci.hotspot.sparc;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java Mon Nov 12 11:10:16 2018 +0530
@@ -261,9 +261,9 @@
/**
* If {@code cpi} denotes an entry representing a resolved dynamic adapter (see
- * {@code resolveInvokeDynamicInPool} and {@code resolveInvokeHandleInPool}), return the opcode
- * of the instruction for which the resolution was performed ({@code invokedynamic} or
- * {@code invokevirtual}}, or {@code -1} otherwise.
+ * {@link #resolveInvokeDynamicInPool} and {@link #resolveInvokeHandleInPool}), return the
+ * opcode of the instruction for which the resolution was performed ({@code invokedynamic} or
+ * {@code invokevirtual}), or {@code -1} otherwise.
*/
native int isResolvedInvokeHandleInPool(HotSpotConstantPool constantPool, int cpi);
@@ -543,12 +543,11 @@
native boolean shouldDebugNonSafepoints();
/**
- * Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to the
- * HotSpot's log stream.
+ * Writes {@code length} bytes from {@code bytes} starting at offset {@code offset} to HotSpot's
+ * log stream.
*
- * @exception NullPointerException if {@code bytes == null}
- * @exception IndexOutOfBoundsException if copying would cause access of data outside array
- * bounds
+ * @throws NullPointerException if {@code bytes == null}
+ * @throws IndexOutOfBoundsException if copying would cause access of data outside array bounds
*/
native void writeDebugOutput(byte[] bytes, int offset, int length);
@@ -620,7 +619,7 @@
native int methodDataProfileDataSize(long metaspaceMethodData, int position);
/**
- * Gets the fingerprint for a given Klass*
+ * Gets the fingerprint for a given Klass*.
*
* @param metaspaceKlass
* @return the value of the fingerprint (zero for arrays and synthetic classes).
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/EventProvider.java Mon Nov 12 11:10:16 2018 +0530
@@ -91,7 +91,7 @@
*
* @return a compilation event
*/
- public abstract CompilationEvent newCompilationEvent();
+ CompilationEvent newCompilationEvent();
/**
* A compilation event.
@@ -117,7 +117,7 @@
*
* @return a compiler failure event
*/
- public abstract CompilerFailureEvent newCompilerFailureEvent();
+ CompilerFailureEvent newCompilerFailureEvent();
/**
* A compiler failure event.
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java Mon Nov 12 11:10:16 2018 +0530
@@ -42,13 +42,13 @@
public class HotSpotCodeCacheProvider implements CodeCacheProvider {
protected final HotSpotJVMCIRuntime runtime;
- protected final HotSpotVMConfig config;
+ private final HotSpotVMConfig config;
protected final TargetDescription target;
protected final RegisterConfig regConfig;
- public HotSpotCodeCacheProvider(HotSpotJVMCIRuntime runtime, HotSpotVMConfig config, TargetDescription target, RegisterConfig regConfig) {
+ public HotSpotCodeCacheProvider(HotSpotJVMCIRuntime runtime, TargetDescription target, RegisterConfig regConfig) {
this.runtime = runtime;
- this.config = config;
+ this.config = runtime.getConfig();
this.target = target;
this.regConfig = regConfig;
}
@@ -91,7 +91,7 @@
@Override
public int getMinimumOutgoingSize() {
- return runtime.getConfig().runtimeCallStackSize;
+ return config.runtimeCallStackSize;
}
private InstalledCode logOrDump(InstalledCode installedCode, CompiledCode compiledCode) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java Mon Nov 12 11:10:16 2018 +0530
@@ -646,7 +646,7 @@
}
}
- /*
+ /**
* Converts a raw index from the bytecodes to a constant pool index (not a cache index).
*
* @param rawIndex index from the bytecode
@@ -760,6 +760,8 @@
/**
* Determines if {@code type} contains signature polymorphic methods.
*/
+ @SuppressFBWarnings(value = "LI_LAZY_INIT_STATIC", justification = "signaturePolymorphicHolders is a cache, not a singleton that must be constructed exactly once" +
+ "and compiler re-ordering is not an issue due to the VM call")
static boolean isSignaturePolymorphicHolder(final ResolvedJavaType type) {
String name = type.getName();
if (signaturePolymorphicHolders == null) {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPoolObject.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPoolObject.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -60,7 +60,7 @@
if (o instanceof HotSpotConstantPoolObject) {
if (super.equals(o)) {
HotSpotConstantPoolObject other = (HotSpotConstantPoolObject) o;
- return type == other.type && cpi == other.cpi;
+ return type.equals(other.type) && cpi == other.cpi;
}
}
return false;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantReflectionProvider.java Mon Nov 12 11:10:16 2018 +0530
@@ -42,7 +42,7 @@
protected final HotSpotJVMCIRuntime runtime;
protected final HotSpotMethodHandleAccessProvider methodHandleAccess;
- protected final HotSpotMemoryAccessProviderImpl memoryAccess;
+ private final HotSpotMemoryAccessProviderImpl memoryAccess;
public HotSpotConstantReflectionProvider(HotSpotJVMCIRuntime runtime) {
this.runtime = runtime;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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,8 @@
*/
package jdk.vm.ci.hotspot;
+import java.util.Set;
+
import jdk.vm.ci.code.CompilationRequest;
import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
@@ -30,7 +32,6 @@
import jdk.vm.ci.runtime.JVMCIRuntime;
import jdk.vm.ci.services.JVMCIPermission;
import jdk.vm.ci.services.JVMCIServiceLocator;
-import jdk.vm.ci.services.internal.ReflectionAccessJDK;
final class HotSpotJVMCICompilerConfig {
@@ -90,7 +91,7 @@
// Auto select a single available compiler
for (JVMCICompilerFactory f : JVMCIServiceLocator.getProviders(JVMCICompilerFactory.class)) {
if (factory == null) {
- ReflectionAccessJDK.openJVMCITo(f.getClass());
+ openJVMCITo(f.getClass().getModule());
factory = f;
} else {
// Multiple factories seen - cancel auto selection
@@ -107,4 +108,20 @@
}
return compilerFactory;
}
+
+ /**
+ * Opens all JVMCI packages to {@code otherModule}.
+ */
+ private static void openJVMCITo(Module otherModule) {
+ Module jvmci = HotSpotJVMCICompilerConfig.class.getModule();
+ if (jvmci != otherModule) {
+ Set<String> packages = jvmci.getPackages();
+ for (String pkg : packages) {
+ boolean opened = jvmci.isOpen(pkg, otherModule);
+ if (!opened) {
+ jvmci.addOpens(pkg, otherModule);
+ }
+ }
+ }
+ }
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java Mon Nov 12 11:10:16 2018 +0530
@@ -36,7 +36,6 @@
import java.util.Objects;
import java.util.ServiceLoader;
import java.util.Set;
-import java.util.TreeMap;
import java.util.function.Predicate;
import jdk.internal.misc.VM;
@@ -240,16 +239,16 @@
return runtime().getHostJVMCIBackend().getCodeCache().getTarget().wordJavaKind;
}
- protected final CompilerToVM compilerToVm;
+ final CompilerToVM compilerToVm;
protected final HotSpotVMConfigStore configStore;
- protected final HotSpotVMConfig config;
+ private final HotSpotVMConfig config;
private final JVMCIBackend hostBackend;
private final JVMCICompilerFactory compilerFactory;
private final HotSpotJVMCICompilerFactory hsCompilerFactory;
private volatile JVMCICompiler compiler;
- protected final HotSpotJVMCIMetaAccessContext metaAccessContext;
+ final HotSpotJVMCIMetaAccessContext metaAccessContext;
/**
* Stores the result of {@link HotSpotJVMCICompilerFactory#getCompilationLevelAdjustment} so
@@ -324,7 +323,7 @@
}
if (Option.PrintConfig.getBoolean()) {
- printConfig(configStore, compilerToVm);
+ configStore.printConfig();
}
}
@@ -343,11 +342,11 @@
return configStore;
}
- public HotSpotVMConfig getConfig() {
+ HotSpotVMConfig getConfig() {
return config;
}
- public CompilerToVM getCompilerToVM() {
+ CompilerToVM getCompilerToVM() {
return compilerToVm;
}
@@ -578,41 +577,6 @@
}
}
- @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING", justification = "no localization here please!")
- private static void printConfigLine(CompilerToVM vm, String format, Object... args) {
- String line = String.format(format, args);
- byte[] lineBytes = line.getBytes();
- vm.writeDebugOutput(lineBytes, 0, lineBytes.length);
- vm.flushDebugOutput();
- }
-
- private static void printConfig(HotSpotVMConfigStore store, CompilerToVM vm) {
- TreeMap<String, VMField> fields = new TreeMap<>(store.getFields());
- for (VMField field : fields.values()) {
- if (!field.isStatic()) {
- printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset);
- } else {
- String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value);
- printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address);
- }
- }
- TreeMap<String, VMFlag> flags = new TreeMap<>(store.getFlags());
- for (VMFlag flag : flags.values()) {
- printConfigLine(vm, "[vmconfig:flag] %s %s = %s%n", flag.type, flag.name, flag.value);
- }
- TreeMap<String, Long> addresses = new TreeMap<>(store.getAddresses());
- for (Map.Entry<String, Long> e : addresses.entrySet()) {
- printConfigLine(vm, "[vmconfig:address] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
- }
- TreeMap<String, Long> constants = new TreeMap<>(store.getConstants());
- for (Map.Entry<String, Long> e : constants.entrySet()) {
- printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
- }
- for (VMIntrinsicMethod e : store.getIntrinsics()) {
- printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor);
- }
- }
-
/**
* Gets an output stream that writes to HotSpot's {@code tty} stream.
*/
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodData.java Mon Nov 12 11:10:16 2018 +0530
@@ -579,8 +579,9 @@
totalCount += getMethodsNotRecordedExecutionCount(data, position);
- // Fixup the case of C1's inability to optimize profiling of a statically bindable call site.
- // If it's a monomorphic call site, attribute all the counts to the first type (if any is recorded).
+ // Fixup the case of C1's inability to optimize profiling of a statically bindable call
+ // site. If it's a monomorphic call site, attribute all the counts to the first type (if
+ // any is recorded).
if (entries == 1) {
counts[0] = totalCount;
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotMethodDataAccessor.java Mon Nov 12 11:10:16 2018 +0530
@@ -82,8 +82,8 @@
}
TriState getExceptionSeen(HotSpotMethodData data, int position) {
- final int EXCEPTIONS_MASK = 1 << config.bitDataExceptionSeenFlag;
- return TriState.get((getFlags(data, position) & EXCEPTIONS_MASK) != 0);
+ final int exceptionsMask = 1 << config.bitDataExceptionSeenFlag;
+ return TriState.get((getFlags(data, position) & exceptionsMask) != 0);
}
/**
@@ -148,4 +148,4 @@
abstract StringBuilder appendTo(StringBuilder sb, HotSpotMethodData data, int pos);
-}
\ No newline at end of file
+}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotObjectConstant.java Mon Nov 12 11:10:16 2018 +0530
@@ -91,4 +91,7 @@
* {@code null}
*/
Object asObject(ResolvedJavaType type);
+
+ @Override
+ String toValueString();
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java Mon Nov 12 11:10:16 2018 +0530
@@ -28,7 +28,7 @@
import jdk.vm.ci.meta.ProfilingInfo;
import jdk.vm.ci.meta.TriState;
-public final class HotSpotProfilingInfo implements ProfilingInfo {
+final class HotSpotProfilingInfo implements ProfilingInfo {
private final HotSpotMethodData methodData;
private final HotSpotResolvedJavaMethod method;
@@ -42,7 +42,7 @@
private boolean includeNormal;
private boolean includeOSR;
- public HotSpotProfilingInfo(HotSpotMethodData methodData, HotSpotResolvedJavaMethod method, boolean includeNormal, boolean includeOSR) {
+ HotSpotProfilingInfo(HotSpotMethodData methodData, HotSpotResolvedJavaMethod method, boolean includeNormal, boolean includeOSR) {
this.methodData = methodData;
this.method = method;
this.includeNormal = includeNormal;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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
@@ -28,8 +28,6 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
-import jdk.internal.vm.annotation.Stable;
-
import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.JavaType;
import jdk.vm.ci.meta.ResolvedJavaType;
@@ -125,7 +123,7 @@
if (currentType instanceof UnresolvedJavaType) {
// Don't allow unresolved types to hang around forever
UnresolvedJavaType unresolvedType = (UnresolvedJavaType) currentType;
- ResolvedJavaType resolved = unresolvedType.resolve(holder);
+ ResolvedJavaType resolved = holder.lookupType(unresolvedType, false);
if (resolved != null) {
type = resolved;
}
@@ -149,9 +147,9 @@
}
/**
- * Checks if this field has the {@link Stable} annotation.
+ * Checks if this field has the {@code Stable} annotation.
*
- * @return true if field has {@link Stable} annotation, false otherwise
+ * @return true if field has {@code Stable} annotation, false otherwise
*/
@Override
public boolean isStable() {
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethod.java Mon Nov 12 11:10:16 2018 +0530
@@ -58,7 +58,8 @@
boolean hasReservedStackAccess();
/**
- * Sets flags on {@code method} indicating that it should never be inlined or compiled by the VM.
+ * Sets flags on {@code method} indicating that it should never be inlined or compiled by the
+ * VM.
*/
void setNotInlinableOrCompilable();
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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,24 @@
*/
package jdk.vm.ci.hotspot;
+import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM;
+import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
+import static jdk.vm.ci.hotspot.HotSpotModifiers.BRIDGE;
+import static jdk.vm.ci.hotspot.HotSpotModifiers.SYNTHETIC;
+import static jdk.vm.ci.hotspot.HotSpotModifiers.VARARGS;
+import static jdk.vm.ci.hotspot.HotSpotModifiers.jvmMethodModifiers;
+import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
+import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Executable;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
import jdk.vm.ci.meta.Constant;
@@ -40,24 +58,6 @@
import jdk.vm.ci.meta.SpeculationLog;
import jdk.vm.ci.meta.TriState;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Executable;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM;
-import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
-import static jdk.vm.ci.hotspot.HotSpotModifiers.BRIDGE;
-import static jdk.vm.ci.hotspot.HotSpotModifiers.SYNTHETIC;
-import static jdk.vm.ci.hotspot.HotSpotModifiers.VARARGS;
-import static jdk.vm.ci.hotspot.HotSpotModifiers.jvmMethodModifiers;
-import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
-import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE;
-
/**
* Implementation of {@link JavaMethod} for resolved HotSpot methods.
*/
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectType.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2015, 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
@@ -102,8 +102,6 @@
int layoutHelper();
- long getFingerprint();
-
@Override
HotSpotResolvedObjectType getEnclosingType();
@@ -127,4 +125,11 @@
return isUnsafeAnonymous();
}
+ /**
+ * Gets the fingerprint for this type.
+ *
+ * @return the value of the fingerprint ({@code 0} for arrays and synthetic classes or if the VM
+ * does not support fingerprints)
+ */
+ long getFingerprint();
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java Mon Nov 12 11:10:16 2018 +0530
@@ -66,7 +66,7 @@
}
@Override
- public HotSpotResolvedObjectTypeImpl getArrayClass() {
+ public HotSpotResolvedObjectType getArrayClass() {
if (kind == JavaKind.Void) {
return null;
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotSpeculationLog.java Mon Nov 12 11:10:16 2018 +0530
@@ -24,8 +24,8 @@
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
-import java.util.Map;
import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.SpeculationLog;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java Mon Nov 12 11:10:16 2018 +0530
@@ -50,7 +50,8 @@
if (notPresent != null) {
return notPresent;
}
- throw new JVMCIError("expected VM symbol not found: " + name);
+ store.printConfig();
+ throw new JVMCIError("expected VM symbol not found in " + store + ": " + name);
}
return entry;
}
@@ -81,7 +82,8 @@
if (notPresent != null) {
return notPresent;
}
- throw new JVMCIError("expected VM constant not found: " + name);
+ store.printConfig();
+ throw new JVMCIError("expected VM constant not found in " + store + ": " + name);
}
return type.cast(convertValue(name, type, c, null));
}
@@ -241,7 +243,8 @@
if (!required) {
return null;
}
- throw new JVMCIError("expected VM field not found: " + name);
+ store.printConfig();
+ throw new JVMCIError("expected VM field not found in " + store + ": " + name);
}
// Make sure the native type is still the type we expect.
@@ -285,7 +288,8 @@
if (notPresent != null) {
return notPresent;
}
- throw new JVMCIError("expected VM flag not found: " + name);
+ store.printConfig();
+ throw new JVMCIError("expected VM flag not found in " + store + ": " + name);
} else {
cppType = null;
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigStore.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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,8 +29,10 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.TreeMap;
import jdk.vm.ci.common.InitTimer;
+import jdk.vm.ci.common.JVMCIError;
/**
* Access to VM configuration data.
@@ -108,7 +110,9 @@
try (InitTimer t = timer("CompilerToVm readConfiguration")) {
data = compilerToVm.readConfiguration();
}
- assert data.length == 5 : data.length;
+ if (data.length != 5) {
+ throw new JVMCIError("Expected data.length to be 5, not %d", data.length);
+ }
// @formatter:off
VMField[] vmFieldsInfo = (VMField[]) data[0];
@@ -145,4 +149,52 @@
}
}
}
+
+ @Override
+ public String toString() {
+ return String.format("%s[%d fields, %d constants, %d addresses, %d flags, %d intrinsics]",
+ getClass().getSimpleName(),
+ vmFields.size(),
+ vmConstants.size(),
+ vmAddresses.size(),
+ vmFlags.size(),
+ vmIntrinsics.size());
+ }
+
+ void printConfig() {
+ CompilerToVM vm = compilerToVm;
+ TreeMap<String, VMField> fields = new TreeMap<>(getFields());
+ for (VMField field : fields.values()) {
+ if (!field.isStatic()) {
+ printConfigLine(vm, "[vmconfig:instance field] %s %s {offset=%d[0x%x]}%n", field.type, field.name, field.offset, field.offset);
+ } else {
+ String value = field.value == null ? "null" : field.value instanceof Boolean ? field.value.toString() : String.format("%d[0x%x]", field.value, field.value);
+ printConfigLine(vm, "[vmconfig:static field] %s %s = %s {address=0x%x}%n", field.type, field.name, value, field.address);
+ }
+ }
+ TreeMap<String, VMFlag> flags = new TreeMap<>(getFlags());
+ for (VMFlag flag : flags.values()) {
+ printConfigLine(vm, "[vmconfig:flag] %s %s = %s%n", flag.type, flag.name, flag.value);
+ }
+ TreeMap<String, Long> addresses = new TreeMap<>(getAddresses());
+ for (Map.Entry<String, Long> e : addresses.entrySet()) {
+ printConfigLine(vm, "[vmconfig:address] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
+ }
+ TreeMap<String, Long> constants = new TreeMap<>(getConstants());
+ for (Map.Entry<String, Long> e : constants.entrySet()) {
+ printConfigLine(vm, "[vmconfig:constant] %s = %d[0x%x]%n", e.getKey(), e.getValue(), e.getValue());
+ }
+ for (VMIntrinsicMethod e : getIntrinsics()) {
+ printConfigLine(vm, "[vmconfig:intrinsic] %d = %s.%s %s%n", e.id, e.declaringClass, e.name, e.descriptor);
+ }
+ }
+
+ @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING", justification = "no localization here please!")
+ private static void printConfigLine(CompilerToVM vm, String format, Object... args) {
+ String line = String.format(format, args);
+ byte[] lineBytes = line.getBytes();
+ vm.writeDebugOutput(lineBytes, 0, lineBytes.length);
+ vm.flushDebugOutput();
+ }
+
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * HotSpot specific portions of the JVMCI API.
+ */
+package jdk.vm.ci.hotspot;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/Assumptions.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, 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
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java Mon Nov 12 11:10:16 2018 +0530
@@ -49,8 +49,8 @@
/**
* Looks up a reference to a field. If {@code opcode} is non-negative, then resolution checks
* specific to the bytecode it denotes are performed if the field is already resolved. Checks
- * for some bytecodes require the method that contains the bytecode to be specified. Should
- * any of these checks fail, an unresolved field reference is returned.
+ * for some bytecodes require the method that contains the bytecode to be specified. Should any
+ * of these checks fail, an unresolved field reference is returned.
*
* @param cpi the constant pool index
* @param opcode the opcode of the instruction for which the lookup is being performed or
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/LocalVariableTable.java Mon Nov 12 11:10:16 2018 +0530
@@ -47,7 +47,7 @@
/**
* Gets a description of a local variable that occupies the bytecode frame slot indexed by
- * {@code slot} and is live at the bytecode index {@code bci}
+ * {@code slot} and is live at the bytecode index {@code bci}.
*
* @return a description of the requested local variable or null if no such variable matches
* {@code slot} and {@code bci}
@@ -74,7 +74,7 @@
}
/**
- * Gets a description of all the local variables live at the bytecode index {@code bci}
+ * Gets a description of all the local variables live at the bytecode index {@code bci}.
*/
public Local[] getLocalsAt(int bci) {
List<Local> result = new ArrayList<>();
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ModifiersProvider.java Mon Nov 12 11:10:16 2018 +0530
@@ -22,12 +22,12 @@
*/
package jdk.vm.ci.meta;
+import java.lang.reflect.Modifier;
+
import static java.lang.reflect.Modifier.PRIVATE;
import static java.lang.reflect.Modifier.PROTECTED;
import static java.lang.reflect.Modifier.PUBLIC;
-import java.lang.reflect.Modifier;
-
/**
* A Java element (i.e., a class, interface, field or method) that is described by a set of Java
* language {@linkplain #getModifiers() modifiers}.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The core runtime interface of the JVMCI API.
+ */
+package jdk.vm.ci.runtime;
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/.checkstyle_checks.xml Mon Nov 12 11:10:16 2018 +0530
@@ -191,6 +191,16 @@
<property name="onCommentFormat" value="CheckStyle: stop generated"/>
<property name="checkFormat" value=".*Name|.*LineLength|.*Header"/>
</module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="Checkstyle: stop"/>
+ <property name="onCommentFormat" value="Checkstyle: resume"/>
+ <property name="checkFormat" value=".*"/>
+ </module>
+ <module name="SuppressionCommentFilter">
+ <property name="offCommentFormat" value="@formatter:off"/>
+ <property name="onCommentFormat" value="@formatter:on"/>
+ <property name="checkFormat" value=".*"/>
+ </module>
</module>
<module name="RegexpHeader">
<property name="header" value="/\*\n \* Copyright \(c\) (20[0-9][0-9], )?20[0-9][0-9], Oracle and/or its affiliates. All rights reserved.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n \*\n \* This code is free software; you can redistribute it and/or modify it\n \* under the terms of the GNU General Public License version 2 only, as\n \* published by the Free Software Foundation.\n \*\n \* This code is distributed in the hope that it will be useful, but WITHOUT\n \* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n \* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n \* version 2 for more details \(a copy is included in the LICENSE file that\n \* accompanied this code\).\n \*\n \* You should have received a copy of the GNU General Public License version\n \* 2 along with this work; if not, write to the Free Software Foundation,\n \* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n \*\n \* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n \* or visit www.oracle.com if you need additional information or have any\n \* questions.\n \*/\n"/>
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/JVMCIServiceLocator.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -26,8 +26,6 @@
import java.util.List;
import java.util.ServiceLoader;
-import jdk.vm.ci.services.internal.ReflectionAccessJDK;
-
/**
* Service-provider class for the runtime to locate providers of JVMCI services where the latter are
* not in packages exported by the JVMCI module. As part of instantiating a
@@ -61,7 +59,7 @@
protected JVMCIServiceLocator() {
this(checkPermission());
Services.checkJVMCIEnabled();
- ReflectionAccessJDK.openJVMCITo(getClass());
+ Services.openJVMCITo(getClass().getModule());
}
/**
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/Services.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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,8 +22,10 @@
*/
package jdk.vm.ci.services;
-import java.lang.reflect.Method;
import java.util.Map;
+import java.util.Set;
+
+import jdk.internal.misc.VM;
/**
* Provides utilities needed by JVMCI clients.
@@ -61,18 +63,7 @@
private Services() {
}
- @SuppressWarnings("unchecked")
- private static Map<String, String> initSavedProperties() throws InternalError {
- try {
- Class<?> vmClass = Class.forName("jdk.internal.misc.VM");
- Method m = vmClass.getMethod("getSavedProperties");
- return (Map<String, String>) m.invoke(null);
- } catch (Exception e) {
- throw new InternalError(e);
- }
- }
-
- static final Map<String, String> SAVED_PROPERTIES = initSavedProperties();
+ static final Map<String, String> SAVED_PROPERTIES = VM.getSavedProperties();
static final boolean JVMCI_ENABLED = Boolean.parseBoolean(SAVED_PROPERTIES.get("jdk.internal.vm.ci.enabled"));
/**
@@ -107,4 +98,20 @@
throw new InternalError(e);
}
}
+
+ /**
+ * Opens all JVMCI packages to {@code otherModule}.
+ */
+ static void openJVMCITo(Module otherModule) {
+ Module jvmci = Services.class.getModule();
+ if (jvmci != otherModule) {
+ Set<String> packages = jvmci.getPackages();
+ for (String pkg : packages) {
+ boolean opened = jvmci.isOpen(pkg, otherModule);
+ if (!opened) {
+ jvmci.addOpens(pkg, otherModule);
+ }
+ }
+ }
+ }
}
--- a/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/internal/ReflectionAccessJDK.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-package jdk.vm.ci.services.internal;
-
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import jdk.vm.ci.services.Services;
-
-/**
- * Reflection based access to API introduced in JDK 9. This allows the API to be used in code that
- * must be compiled (but not executed) on JDK 8.
- */
-public final class ReflectionAccessJDK {
-
- /**
- * {@code Class.getModule()}.
- */
- private static final Method getModule;
-
- /**
- * {@code java.lang.Module.addOpens(String, Module)}.
- */
- private static final Method addOpens;
-
- /**
- * {@code java.lang.Module.getPackages(Module, String, Module)}.
- */
- private static final Method getPackages;
-
- /**
- * {@code java.lang.Module.isOpen(String, Module)}.
- */
- private static final Method isOpenTo;
-
- /**
- * Opens all JVMCI packages to the module of a given class.
- *
- * @param other all JVMCI packages will be opened to the module of this class
- */
- @SuppressWarnings("unchecked")
- public static void openJVMCITo(Class<?> other) {
- try {
- Object jvmci = getModule.invoke(Services.class);
- Object otherModule = getModule.invoke(other);
- if (jvmci != otherModule) {
- Set<String> packages = (Set<String>) getPackages.invoke(jvmci);
- for (String pkg : packages) {
- boolean opened = (Boolean) isOpenTo.invoke(jvmci, pkg, otherModule);
- if (!opened) {
- addOpens.invoke(jvmci, pkg, otherModule);
- }
- }
- }
- } catch (Exception e) {
- throw new InternalError(e);
- }
- }
-
- static {
- try {
- getModule = Class.class.getMethod("getModule");
- Class<?> moduleClass = getModule.getReturnType();
- getPackages = moduleClass.getMethod("getPackages");
- isOpenTo = moduleClass.getMethod("isOpen", String.class, moduleClass);
- addOpens = moduleClass.getDeclaredMethod("addOpens", String.class, moduleClass);
- } catch (NoSuchMethodException | SecurityException e) {
- throw new InternalError(e);
- }
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.services/src/jdk/vm/ci/services/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The service related portions of the JVMCI API.
+ */
+package jdk.vm.ci.services;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.sparc/src/jdk/vm/ci/sparc/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * The SPARC platform independent portions of the JVMCI API.
+ */
+package jdk.vm.ci.sparc;
--- a/src/jdk.internal.vm.compiler.management/share/classes/org.graalvm.compiler.hotspot.management/src/org/graalvm/compiler/hotspot/management/HotSpotGraalRuntimeMBean.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.compiler.management/share/classes/org.graalvm.compiler.hotspot.management/src/org/graalvm/compiler/hotspot/management/HotSpotGraalRuntimeMBean.java Mon Nov 12 11:10:16 2018 +0530
@@ -80,7 +80,16 @@
return runtime;
}
- private static final boolean DEBUG = Boolean.getBoolean(HotSpotGraalRuntimeMBean.class.getSimpleName() + ".debug");
+ private static final boolean DEBUG = initDebug();
+
+ private static boolean initDebug() {
+ try {
+ return Boolean.getBoolean(HotSpotGraalRuntimeMBean.class.getSimpleName() + ".debug");
+ } catch (SecurityException e) {
+ // Swallow the exception
+ return false;
+ }
+ }
@Override
public Object getAttribute(String name) throws AttributeNotFoundException {
--- a/src/jdk.internal.vm.compiler/share/classes/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.compiler/share/classes/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -39,6 +39,7 @@
uses org.graalvm.compiler.hotspot.HotSpotCodeCacheListener;
uses org.graalvm.compiler.hotspot.HotSpotGraalManagementRegistration;
uses org.graalvm.compiler.nodes.graphbuilderconf.NodeIntrinsicPluginFactory;
+ uses org.graalvm.compiler.phases.common.jmx.HotSpotMBeanOperationProvider;
uses org.graalvm.compiler.serviceprovider.JMXService;
exports jdk.internal.vm.compiler.collections to jdk.internal.vm.compiler.management;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -75,7 +75,8 @@
}
private static Object getConstantPoolForObject() {
- String miscPackage = Java8OrEarlier ? "sun.misc" : "jdk.internal.misc";
+ String miscPackage = Java8OrEarlier ? "sun.misc"
+ : (Java11OrEarlier ? "jdk.internal.misc" : "jdk.internal.access");
try {
Class<?> sharedSecretsClass = Class.forName(miscPackage + ".SharedSecrets");
Class<?> javaLangAccessClass = Class.forName(miscPackage + ".JavaLangAccess");
@@ -114,7 +115,10 @@
Object javaBaseModule = JLModule.fromClass(String.class);
Object cModule = JLModule.fromClass(c);
uncheckedAddExports(javaBaseModule, "jdk.internal.reflect", cModule);
- uncheckedAddExports(javaBaseModule, "jdk.internal.misc", cModule);
+ if (Java11OrEarlier)
+ uncheckedAddExports(javaBaseModule, "jdk.internal.misc", cModule);
+ else
+ uncheckedAddExports(javaBaseModule, "jdk.internal.access", cModule);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/GraalTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -72,6 +72,7 @@
}
public static final boolean Java8OrEarlier = GraalServices.Java8OrEarlier;
+ public static final boolean Java11OrEarlier = GraalServices.Java11OrEarlier;
protected Method getMethod(String methodName) {
return getMethod(getClass(), methodName);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Mon Nov 12 11:10:16 2018 +0530
@@ -149,7 +149,7 @@
$(function() {
$("#search").catcomplete({
minLength: 1,
- delay: 100,
+ delay: 300,
source: function(request, response) {
var result = new Array();
var presult = new Array();
--- a/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java Mon Nov 12 11:10:16 2018 +0530
@@ -506,6 +506,7 @@
showPrompt = false;
evaluator.commandNext();
} else if (cmd.equals("kill")) {
+ showPrompt = false; // asynchronous command
evaluator.commandKill(t);
} else if (cmd.equals("interrupt")) {
evaluator.commandInterrupt(t);
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/JVMSupport.java Mon Nov 12 11:10:16 2018 +0530
@@ -81,4 +81,7 @@
public static boolean isNotAvailable() {
return notAvailable;
}
+
+ public static void tryToInitializeJVM() {
+ }
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/LogTag.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/LogTag.java Mon Nov 12 11:10:16 2018 +0530
@@ -80,19 +80,11 @@
JFR_DCMD(10);
/* set from native side */
- private volatile int tagSetLevel = 100; // prevent logging if JVM log system has not been initialized
+ volatile int tagSetLevel = 100; // prevent logging if JVM log system has not been initialized
final int id;
LogTag(int tagId) {
id = tagId;
}
-
- public boolean shouldLog(int level) {
- return level >= tagSetLevel;
- }
-
- public boolean shouldLog(LogLevel logLevel) {
- return shouldLog(logLevel.level);
- }
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Logger.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Logger.java Mon Nov 12 11:10:16 2018 +0530
@@ -35,15 +35,20 @@
public final class Logger {
private final static int MAX_SIZE = 10000;
+ static {
+ // This will try to initialize the JVM logging system
+ JVMSupport.tryToInitializeJVM();
+ }
+
public static void log(LogTag logTag, LogLevel logLevel, String message) {
- if (logTag.shouldLog(logLevel.level)) {
+ if (shouldLog(logTag, logLevel)) {
logInternal(logTag, logLevel, message);
}
}
public static void log(LogTag logTag, LogLevel logLevel, Supplier<String> messageSupplier) {
- if (logTag.shouldLog(logLevel.level)) {
+ if (shouldLog(logTag, logLevel)) {
logInternal(logTag, logLevel, messageSupplier.get());
}
}
@@ -55,4 +60,8 @@
JVM.log(logTag.id, logLevel.level, message.substring(0, MAX_SIZE));
}
}
+
+ public static boolean shouldLog(LogTag tag, LogLevel level) {
+ return level.level >= tag.tagSetLevel;
+ }
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataReader.java Mon Nov 12 11:10:16 2018 +0530
@@ -79,7 +79,7 @@
descriptor.gmtOffset = time.attribute(MetadataDescriptor.ATTRIBUTE_GMT_OFFSET, 1);
descriptor.locale = time.attribute(MetadataDescriptor.ATTRIBUTE_LOCALE, "");
descriptor.root = root;
- if (LogTag.JFR_SYSTEM_PARSER.shouldLog(LogLevel.TRACE.level)) {
+ if (Logger.shouldLog(LogTag.JFR_SYSTEM_PARSER, LogLevel.TRACE)) {
List<Type> ts = new ArrayList<>(types.values());
Collections.sort(ts, (x,y) -> x.getName().compareTo(y.getName()));
for (Type t : ts) {
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java Mon Nov 12 11:10:16 2018 +0530
@@ -453,7 +453,7 @@
}
private void setSettings(Map<String, String> settings, boolean update) {
- if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level) && update) {
+ if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO) && update) {
TreeMap<String, String> ordered = new TreeMap<>(settings);
Logger.log(LogTag.JFR_SETTING, LogLevel.INFO, "New settings for recording \"" + getName() + "\" (" + getId() + ")");
for (Map.Entry<String, String> entry : ordered.entrySet()) {
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java Mon Nov 12 11:10:16 2018 +0530
@@ -139,7 +139,7 @@
ec.disable();
}
} else {
- if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) {
+ if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) {
Collections.sort(eventControls, (x,y) -> x.getEventType().getName().compareTo(y.getEventType().getName()));
}
for (EventControl ec : eventControls) {
@@ -224,7 +224,7 @@
if (values != null) {
control.apply(values);
String after = control.getLastValue();
- if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) {
+ if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) {
if (Utils.isSettingVisible(control, ec.getEventType().hasEventHook())) {
if (values.size() > 1) {
StringJoiner sj = new StringJoiner(", ", "{", "}");
@@ -241,7 +241,7 @@
}
} else {
control.setDefault();
- if (LogTag.JFR_SETTING.shouldLog(LogLevel.INFO.level)) {
+ if (Logger.shouldLog(LogTag.JFR_SETTING, LogLevel.INFO)) {
String message = " " + settingName + "=\"" + control.getLastValue() + "\"";
Logger.log(LogTag.JFR_SETTING, LogLevel.INFO, message);
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Type.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Type.java Mon Nov 12 11:10:16 2018 +0530
@@ -271,7 +271,7 @@
}
void log(String action, LogTag logTag, LogLevel level) {
- if (logTag.shouldLog(level.level) && !isSimpleType()) {
+ if (Logger.shouldLog(logTag, level) && !isSimpleType()) {
Logger.log(logTag, LogLevel.TRACE, action + " " + typeText() + " " + getLogName() + " {");
for (ValueDescriptor v : getFields()) {
String array = v.isArray() ? "[]" : "";
@@ -279,7 +279,7 @@
}
Logger.log(logTag, LogLevel.TRACE, "}");
} else {
- if (logTag.shouldLog(LogLevel.INFO.level) && !isSimpleType()) {
+ if (Logger.shouldLog(logTag, LogLevel.INFO) && !isSimpleType()) {
Logger.log(logTag, LogLevel.INFO, action + " " + typeText() + " " + getLogName());
}
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/TypeLibrary.java Mon Nov 12 11:10:16 2018 +0530
@@ -68,7 +68,7 @@
private TypeLibrary(List<Type> jvmTypes) {
visitReachable(jvmTypes, t -> !types.containsKey(t.getId()), t -> types.put(t.getId(), t));
- if (LogTag.JFR_SYSTEM_METADATA.shouldLog(LogLevel.INFO.level)) {
+ if (Logger.shouldLog(LogTag.JFR_SYSTEM_METADATA, LogLevel.INFO)) {
Stream<Type> s = types.values().stream().sorted((x, y) -> Long.compare(x.getId(), y.getId()));
s.forEach(t -> t.log("Added", LogTag.JFR_SYSTEM_METADATA, LogLevel.INFO));
}
@@ -422,7 +422,7 @@
for (Type type : types.values()) {
if (type.getRemove() && !Type.isDefinedByJVM(type.getId())) {
removeIds.add(type.getId());
- if (LogTag.JFR_METADATA.shouldLog(LogLevel.TRACE.level)) {
+ if (Logger.shouldLog(LogTag.JFR_METADATA, LogLevel.TRACE)) {
Logger.log(LogTag.JFR_METADATA, LogLevel.TRACE, "Removed obsolete metadata " + type.getName());
}
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdCheck.java Mon Nov 12 11:10:16 2018 +0530
@@ -63,7 +63,7 @@
}
private void executeInternal(String name, Boolean verbose) throws DCmdException {
- if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) {
+ if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) {
Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdCheck: name=" + name + ", verbose=" + verbose);
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdConfigure.java Mon Nov 12 11:10:16 2018 +0530
@@ -70,7 +70,7 @@
Boolean sampleThreads
) throws DCmdException {
- if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) {
+ if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) {
Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdConfigure: repositorypath=" + repositoryPath +
", dumppath=" + dumpPath +
", stackdepth=" + stackDepth +
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdDump.java Mon Nov 12 11:10:16 2018 +0530
@@ -70,7 +70,7 @@
* @throws DCmdException if the dump could not be completed
*/
public String execute(String name, String filename, Long maxAge, Long maxSize, String begin, String end, Boolean pathToGcRoots) throws DCmdException {
- if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) {
+ if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) {
Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG,
"Executing DCmdDump: name=" + name +
", filename=" + filename +
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStart.java Mon Nov 12 11:10:16 2018 +0530
@@ -81,7 +81,7 @@
*/
@SuppressWarnings("resource")
public String execute(String name, String[] settings, Long delay, Long duration, Boolean disk, String path, Long maxAge, Long maxSize, Boolean dumpOnExit, Boolean pathToGcRoots) throws DCmdException {
- if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) {
+ if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) {
Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdStart: name=" + name +
", settings=" + Arrays.asList(settings) +
", delay=" + delay +
@@ -106,13 +106,7 @@
throw new DCmdException("Filename can only be set for a time bound recording or if dumponexit=true. Set duration/dumponexit or omit filename.");
}
-
Map<String, String> s = new HashMap<>();
-
- if (settings == null || settings.length == 0) {
- settings = new String[] { "default" };
- }
-
for (String configName : settings) {
try {
s.putAll(JFC.createKnown(configName).getSettings());
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/dcmd/DCmdStop.java Mon Nov 12 11:10:16 2018 +0530
@@ -56,7 +56,7 @@
* @throws DCmdException if recording could not be stopped
*/
public String execute(String name, String filename) throws DCmdException {
- if (LogTag.JFR_DCMD.shouldLog(LogLevel.DEBUG)) {
+ if (Logger.shouldLog(LogTag.JFR_DCMD, LogLevel.DEBUG)) {
Logger.log(LogTag.JFR_DCMD, LogLevel.DEBUG, "Executing DCmdStart: name=" + name + ", filename=" + filename);
}
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -30,18 +30,16 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.invoke.MethodType;
-import java.lang.module.ModuleDescriptor;
import java.nio.file.Files;
import java.util.EnumSet;
import java.util.Map;
-import java.util.Optional;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaLangInvokeAccess;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.access.JavaLangInvokeAccess;
import jdk.tools.jlink.plugin.ResourcePoolEntry;
import jdk.tools.jlink.plugin.PluginException;
import jdk.tools.jlink.plugin.ResourcePool;
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Magadanische Sommerzeit", "MAGST",
"Magadanische Zeit", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Philippinische Zeit", "PHT",
- "Philippinische Sommerzeit", "PHST",
- "Philippinische Zeit", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_es.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_es.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Hora de verano de Magad\u00e1n", "MAGST",
"Hora de Magad\u00E1n", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Hora de Filipinas", "PHT",
- "Hora de verano de Filipinas", "PHST",
- "Hora de Filipinas", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_fr.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_fr.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Heure d'\u00e9t\u00e9 de Magadan", "MAGST",
"Heure de Magadan", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Heure des Philippines", "PHT",
- "Heure d'\u00e9t\u00e9 des Philippines", "PHST",
- "Heure des Philippines", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_it.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_it.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Ora estiva di Magadan", "MAGST",
"Ora di Magadan", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Ora delle Filippine", "PHT",
- "Ora estiva delle Filippine", "PHST",
- "Ora delle Filippine", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ja.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ja.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"\u30de\u30ac\u30c0\u30f3\u590f\u6642\u9593", "MAGST",
"\u30DE\u30AC\u30C0\u30F3\u6642\u9593", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"\u30d5\u30a3\u30ea\u30d4\u30f3\u6642\u9593", "PHT",
- "\u30d5\u30a3\u30ea\u30d4\u30f3\u590f\u6642\u9593", "PHST",
- "\u30D5\u30A3\u30EA\u30D4\u30F3\u6642\u9593", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ko.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ko.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"\ub9c8\uac00\ub2e8 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "MAGST",
"\uB9C8\uAC00\uB2E8 \uD45C\uC900\uC2DC", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"\ud544\ub9ac\ud540 \uc2dc\uac04", "PHT",
- "\ud544\ub9ac\ud540 \uc77c\uad11\uc808\uc57d\uc2dc\uac04", "PHST",
- "\uD544\uB9AC\uD540 \uD45C\uC900\uC2DC", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_pt_BR.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_pt_BR.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Fuso hor\u00e1rio de ver\u00e3o de Magadan", "MAGST",
"Hor\u00E1rio de Magadan", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Fuso hor\u00e1rio das Filipinas", "PHT",
- "Fuso hor\u00e1rio de ver\u00e3o das Filipinas", "PHST",
- "Hor\u00E1rio das Filipinas", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_sv.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_sv.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Magadan, sommartid", "MAGST",
"Magadan-tid", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"Filippinerna, normaltid", "PHT",
- "Filippinerna, sommartid", "PHST",
- "Filippinsk tid", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_CN.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_CN.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Magadan \u590f\u4ee4\u65f6", "MAGST",
"Magadan \u65F6\u95F4", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"\u83f2\u5f8b\u5bbe\u65f6\u95f4", "PHT",
- "\u83f2\u5f8b\u5bbe\u590f\u4ee4\u65f6", "PHST",
- "\u83F2\u5F8B\u5BBE\u65F6\u95F4", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_TW.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_TW.java Mon Nov 12 11:10:16 2018 +0530
@@ -667,9 +667,9 @@
"Magadan \u590f\u4ee4\u6642\u9593", "MAGST",
"\u99AC\u52A0\u4E39\u6642\u9593", "MAGT"}},
{"Asia/Makassar", CIT},
- {"Asia/Manila", new String[] {"\u83f2\u5f8b\u8cd3\u6642\u9593", "PHT",
- "\u83f2\u5f8b\u8cd3\u590f\u4ee4\u6642\u9593", "PHST",
- "\u83F2\u5F8B\u8CD3\u6642\u9593", "PHT"}},
+ {"Asia/Manila", new String[] {"Philippines Standard Time", "PST",
+ "Philippines Daylight Time", "PDT",
+ "Philippines Time", "PT"}},
{"Asia/Muscat", GST},
{"Asia/Nicosia", EET},
{"Asia/Novokuznetsk", KRAT},
--- a/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.management/share/classes/com/sun/management/DiagnosticCommandMBean.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -213,7 +213,7 @@
* Virtual Machine is modified, the {@code DiagnosticCommandMBean} emits
* a {@link javax.management.Notification} with a
* {@linkplain javax.management.Notification#getType() type} of
- * <a href="{@docRoot}/javax/management/MBeanInfo.html#info-changed">
+ * <a href="{@docRoot}/java.management/javax/management/MBeanInfo.html#info-changed">
* {@code "jmx.mbean.info.changed"}</a> and a
* {@linkplain javax.management.Notification#getUserData() userData} that
* is the new {@code MBeanInfo}.
--- a/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.net/share/classes/jdk/net/ExtendedSocketOptions.java Mon Nov 12 11:10:16 2018 +0530
@@ -33,8 +33,8 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import jdk.internal.misc.JavaIOFileDescriptorAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaIOFileDescriptorAccess;
+import jdk.internal.access.SharedSecrets;
/**
* Defines extended socket options, beyond those defined in
--- a/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedCopyOption.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedCopyOption.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -26,7 +26,7 @@
package com.sun.nio.file;
import java.nio.file.CopyOption;
-import sun.nio.fs.ExtendedOptions;
+import jdk.internal.misc.FileSystemOption;
/**
* Defines <em>extended</em> copy options supported on some platforms
@@ -40,9 +40,9 @@
* The copy may be interrupted by the {@link Thread#interrupt interrupt}
* method.
*/
- INTERRUPTIBLE(ExtendedOptions.INTERRUPTIBLE);
+ INTERRUPTIBLE(FileSystemOption.INTERRUPTIBLE);
- ExtendedCopyOption(ExtendedOptions.InternalOption<Void> option) {
+ ExtendedCopyOption(FileSystemOption<Void> option) {
option.register(this);
}
}
--- a/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedOpenOption.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedOpenOption.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -26,7 +26,7 @@
package com.sun.nio.file;
import java.nio.file.OpenOption;
-import sun.nio.fs.ExtendedOptions;
+import jdk.internal.misc.FileSystemOption;
/**
* Defines <em>extended</em> open options supported on some platforms
@@ -39,15 +39,15 @@
/**
* Prevent operations on the file that request read access.
*/
- NOSHARE_READ(ExtendedOptions.NOSHARE_READ),
+ NOSHARE_READ(FileSystemOption.NOSHARE_READ),
/**
* Prevent operations on the file that request write access.
*/
- NOSHARE_WRITE(ExtendedOptions.NOSHARE_WRITE),
+ NOSHARE_WRITE(FileSystemOption.NOSHARE_WRITE),
/**
* Prevent operations on the file that request delete access.
*/
- NOSHARE_DELETE(ExtendedOptions.NOSHARE_DELETE),
+ NOSHARE_DELETE(FileSystemOption.NOSHARE_DELETE),
/**
* Requires that direct I/O be used for read or write access.
@@ -69,9 +69,9 @@
*
* @since 10
*/
- DIRECT(ExtendedOptions.DIRECT);
+ DIRECT(FileSystemOption.DIRECT);
- ExtendedOpenOption(ExtendedOptions.InternalOption<Void> option) {
+ ExtendedOpenOption(FileSystemOption<Void> option) {
option.register(this);
}
}
--- a/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.unsupported/share/classes/com/sun/nio/file/ExtendedWatchEventModifier.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -26,7 +26,7 @@
package com.sun.nio.file;
import java.nio.file.WatchEvent.Modifier;
-import sun.nio.fs.ExtendedOptions;
+import jdk.internal.misc.FileSystemOption;
/**
* Defines <em>extended</em> watch event modifiers supported on some platforms
@@ -40,9 +40,9 @@
/**
* Register a file tree instead of a single directory.
*/
- FILE_TREE(ExtendedOptions.FILE_TREE);
+ FILE_TREE(FileSystemOption.FILE_TREE);
- ExtendedWatchEventModifier(ExtendedOptions.InternalOption<Void> option) {
+ ExtendedWatchEventModifier(FileSystemOption<Void> option) {
option.register(this);
}
}
--- a/src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, 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
@@ -26,7 +26,7 @@
package com.sun.nio.file;
import java.nio.file.WatchEvent.Modifier;
-import sun.nio.fs.ExtendedOptions;
+import jdk.internal.misc.FileSystemOption;
/**
* Defines the <em>sensitivity levels</em> when registering objects with a
@@ -39,15 +39,15 @@
/**
* High sensitivity.
*/
- HIGH(ExtendedOptions.SENSITIVITY_HIGH, 2),
+ HIGH(FileSystemOption.SENSITIVITY_HIGH, 2),
/**
* Medium sensitivity.
*/
- MEDIUM(ExtendedOptions.SENSITIVITY_MEDIUM, 10),
+ MEDIUM(FileSystemOption.SENSITIVITY_MEDIUM, 10),
/**
* Low sensitivity.
*/
- LOW(ExtendedOptions.SENSITIVITY_LOW, 30);
+ LOW(FileSystemOption.SENSITIVITY_LOW, 30);
/**
* Returns the sensitivity in seconds.
@@ -57,7 +57,7 @@
}
private final int sensitivity;
- private SensitivityWatchEventModifier(ExtendedOptions.InternalOption<Integer> option,
+ private SensitivityWatchEventModifier(FileSystemOption<Integer> option,
int sensitivity) {
this.sensitivity = sensitivity;
option.register(this, sensitivity);
--- a/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.unsupported/share/classes/sun/misc/Unsafe.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,10 +27,8 @@
import jdk.internal.vm.annotation.ForceInline;
import jdk.internal.misc.VM;
-import jdk.internal.ref.Cleaner;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
-import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.util.Set;
@@ -1234,13 +1232,6 @@
if (!directBuffer.isDirect())
throw new IllegalArgumentException("buffer is non-direct");
- DirectBuffer db = (DirectBuffer)directBuffer;
- if (db.attachment() != null)
- throw new IllegalArgumentException("duplicate or slice");
-
- Cleaner cleaner = db.cleaner();
- if (cleaner != null) {
- cleaner.clean();
- }
+ theInternalUnsafe.invokeCleaner(directBuffer);
}
}
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathEvaluator.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathEvaluator.java Mon Nov 12 11:10:16 2018 +0530
@@ -61,7 +61,7 @@
* from other sources that could provide specific support for specialized
* extension functions or variables as would be defined by other
* specifications.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ * <p>See also the <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>Document Object Model (DOM) Level 3 XPath Specification</a>.
*/
public interface XPathEvaluator {
/**
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathException.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathException.java Mon Nov 12 11:10:16 2018 +0530
@@ -44,7 +44,14 @@
/**
* A new exception has been created for exceptions specific to these XPath
* interfaces.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ *
+ * See also <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>
+ * Document Object Model (DOM) Level 3 XPath Specification, Version 1.0,
+ * W3C Working Group Note 26 February 2004</a>
+ * Note that this class came from Document Object Model (DOM) Level 3 XPath
+ * Specification, Working Draft 20 August 2002 where the values of
+ * {@link #INVALID_EXPRESSION_ERR} and {@link #TYPE_ERR}
+ * are 1 and 2 respectively (instead of 51 and 52 as in the 2004 version).
*/
public class XPathException extends RuntimeException {
private static final long serialVersionUID = 3471034171575979943L;
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathExpression.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathExpression.java Mon Nov 12 11:10:16 2018 +0530
@@ -48,7 +48,7 @@
/**
* The <code>XPathExpression</code> interface represents a parsed and resolved
* XPath expression.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ * <p>See also the <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>Document Object Model (DOM) Level 3 XPath Specification</a>.
*/
public interface XPathExpression {
/**
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNSResolver.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNSResolver.java Mon Nov 12 11:10:16 2018 +0530
@@ -48,7 +48,7 @@
* <code>namespaceURI</code> strings. <code>XPathEvaluator</code> can
* construct an implementation of <code>XPathNSResolver</code> from a node,
* or the interface may be implemented by any application.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ * <p>See also the <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>Document Object Model (DOM) Level 3 XPath Specification</a>.
*/
public interface XPathNSResolver {
/**
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNamespace.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNamespace.java Mon Nov 12 11:10:16 2018 +0530
@@ -74,7 +74,7 @@
* future versions of the XPath specification, the definition of a namespace
* node may be changed incomatibly, in which case incompatible changes to
* field values may be required to implement versions beyond XPath 1.0.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ * <p>See also the <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>Document Object Model (DOM) Level 3 XPath Specification</a>.
*/
public interface XPathNamespace extends Node {
// XPathNodeType
--- a/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathResult.java Mon Nov 12 10:55:49 2018 +0530
+++ b/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathResult.java Mon Nov 12 11:10:16 2018 +0530
@@ -51,7 +51,7 @@
* node. Since evaluation of an XPath expression can result in various
* result types, this object makes it possible to discover and manipulate
* the type and value of the result.
- * <p>See also the <a href='http://www.w3.org/2002/08/WD-DOM-Level-3-XPath-20020820'>Document Object Model (DOM) Level 3 XPath Specification</a>.
+ * <p>See also the <a href='https://www.w3.org/TR/DOM-Level-3-XPath/'>Document Object Model (DOM) Level 3 XPath Specification</a>.
*/
public interface XPathResult {
// XPathResultType
--- a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -216,8 +216,6 @@
static const size_t _max_entries = 1000;
oop* _entries[_max_entries];
-
- class VM_DeleteBlocksAtSafepoint;
};
OopStorageTestWithAllocation::OopStorageTestWithAllocation() {
@@ -230,19 +228,6 @@
const size_t OopStorageTestWithAllocation::_max_entries;
-class OopStorageTestWithAllocation::VM_DeleteBlocksAtSafepoint
- : public VM_GTestExecuteAtSafepoint {
-public:
- VM_DeleteBlocksAtSafepoint(OopStorage* storage) : _storage(storage) {}
-
- void doit() {
- _storage->delete_empty_blocks_safepoint();
- }
-
-private:
- OopStorage* _storage;
-};
-
static bool is_allocation_list_sorted(const OopStorage& storage) {
// The allocation_list isn't strictly sorted. Rather, all empty
// blocks are segregated to the end of the list.
@@ -1027,7 +1012,7 @@
vstate.check();
}
-TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks_safepoint) {
+TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks) {
size_t initial_active_size = active_count(_storage);
EXPECT_EQ(initial_active_size, _storage.block_count());
ASSERT_LE(3u, initial_active_size); // Need at least 3 blocks for test
@@ -1040,37 +1025,15 @@
EXPECT_EQ(initial_active_size, active_count(_storage));
EXPECT_EQ(initial_active_size, _storage.block_count());
EXPECT_EQ(3u, empty_block_count(_storage));
-
{
ThreadInVMfromNative invm(JavaThread::current());
- VM_DeleteBlocksAtSafepoint op(&_storage);
- VMThread::execute(&op);
+ while (_storage.delete_empty_blocks()) {}
}
EXPECT_EQ(0u, empty_block_count(_storage));
EXPECT_EQ(initial_active_size - 3, active_count(_storage));
EXPECT_EQ(initial_active_size - 3, _storage.block_count());
}
-TEST_VM_F(OopStorageTestWithAllocation, delete_empty_blocks_concurrent) {
- size_t initial_active_size = active_count(_storage);
- EXPECT_EQ(initial_active_size, _storage.block_count());
- ASSERT_LE(3u, initial_active_size); // Need at least 3 blocks for test
-
- for (size_t i = 0; empty_block_count(_storage) < 3; ++i) {
- ASSERT_GT(_max_entries, i);
- release_entry(_storage, _entries[i]);
- }
-
- EXPECT_EQ(initial_active_size, active_count(_storage));
- EXPECT_EQ(initial_active_size, _storage.block_count());
- EXPECT_EQ(3u, empty_block_count(_storage));
-
- _storage.delete_empty_blocks_concurrent();
- EXPECT_EQ(0u, empty_block_count(_storage));
- EXPECT_EQ(initial_active_size - 3, active_count(_storage));
- EXPECT_EQ(initial_active_size - 3, _storage.block_count());
-}
-
TEST_VM_F(OopStorageTestWithAllocation, allocation_status) {
oop* retained = _entries[200];
oop* released = _entries[300];
@@ -1092,8 +1055,7 @@
{
ThreadInVMfromNative invm(JavaThread::current());
- VM_DeleteBlocksAtSafepoint op(&_storage);
- VMThread::execute(&op);
+ while (_storage.delete_empty_blocks()) {}
}
EXPECT_EQ(OopStorage::ALLOCATED_ENTRY, _storage.allocation_status(retained));
#ifndef DISABLE_GARBAGE_ALLOCATION_STATUS_TESTS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/memory/test_virtualSpaceNode.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "precompiled.hpp"
+#include "memory/metaspace/virtualSpaceList.hpp"
+#include "memory/metaspace/chunkManager.hpp"
+#include "runtime/mutexLocker.hpp"
+#include "utilities/formatBuffer.hpp"
+#include "unittest.hpp"
+
+using namespace metaspace;
+
+namespace {
+ static void chunk_up(size_t words_left, size_t& num_medium_chunks,
+ size_t& num_small_chunks,
+ size_t& num_specialized_chunks) {
+ num_medium_chunks = words_left / MediumChunk;
+ words_left = words_left % MediumChunk;
+
+ num_small_chunks = words_left / SmallChunk;
+ words_left = words_left % SmallChunk;
+ // how many specialized chunks can we get?
+ num_specialized_chunks = words_left / SpecializedChunk;
+ ASSERT_EQ(0UL, words_left % SpecializedChunk) << "should be nothing left"
+ << ", words_left = " << words_left
+ << ", SpecializedChunk = " << SpecializedChunk;
+ }
+ static const size_t vsn_test_size_words = MediumChunk * 4;
+ static const size_t vsn_test_size_bytes = vsn_test_size_words * BytesPerWord;
+ class MetachunkRemover {
+ Metachunk* const _m;
+ ChunkManager* const _c;
+ public:
+ MetachunkRemover(Metachunk* m, ChunkManager* c) : _m(m), _c(c) { }
+ ~MetachunkRemover() { _c->remove_chunk(_m); }
+ };
+}
+
+class ChunkManagerTest {
+ public:
+ static size_t sum_free_chunks(ChunkManager* cm) {
+ return cm->sum_free_chunks();
+ }
+ static size_t sum_free_chunks_count(ChunkManager* cm) {
+ return cm->sum_free_chunks_count();
+ }
+ static ChunkList* free_chunks(ChunkManager* cm, ChunkIndex i) {
+ return cm->free_chunks(i);
+ }
+};
+
+// removes all the chunks added to the ChunkManager since creation of ChunkManagerRestorer
+class ChunkManagerRestorer {
+ ChunkManager* const _cm;
+ Metachunk* _chunks[NumberOfFreeLists];
+ public:
+ ChunkManagerRestorer(ChunkManager* cm) : _cm(cm) {
+ for (ChunkIndex i = ZeroIndex; i < NumberOfFreeLists; i = next_chunk_index(i)) {
+ ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
+ _chunks[i] = l->tail();
+ }
+ }
+ ~ChunkManagerRestorer() {
+ for (ChunkIndex i = ZeroIndex; i < NumberOfFreeLists; i = next_chunk_index(i)) {
+ ChunkList* l = ChunkManagerTest::free_chunks(_cm, i);
+ Metachunk* t = l->tail();
+ while (t != _chunks[i]) {
+ _cm->remove_chunk(t);
+ t = l->tail();
+ }
+ }
+ }
+};
+
+TEST_VM(VirtualSpaceNodeTest, sanity) {
+ // The chunk sizes must be multiples of eachother, or this will fail
+ STATIC_ASSERT(MediumChunk % SmallChunk == 0);
+ STATIC_ASSERT(SmallChunk % SpecializedChunk == 0);
+
+ // just in case STATIC_ASSERT doesn't work
+ EXPECT_EQ(0, MediumChunk % SmallChunk);
+ EXPECT_EQ(0, SmallChunk % SpecializedChunk);
+}
+
+TEST_VM(VirtualSpaceNodeTest, four_pages_vsn_is_committed_some_is_used_by_chunks) {
+ const size_t page_chunks = 4 * (size_t)os::vm_page_size() / BytesPerWord;
+ if (page_chunks >= MediumChunk) {
+ SUCCEED() << "SKIP: This doesn't work for systems with vm_page_size >= 16K";
+ return;
+ }
+ MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ ChunkManager cm(false);
+ VirtualSpaceNode vsn(false, vsn_test_size_bytes);
+ ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
+
+ vsn.initialize();
+ EXPECT_TRUE(vsn.expand_by(page_chunks, page_chunks));
+ vsn.get_chunk_vs(SmallChunk);
+ vsn.get_chunk_vs(SpecializedChunk);
+ vsn.retire(&cm);
+
+ // committed - used = words left to retire
+ const size_t words_left = page_chunks - SmallChunk - SpecializedChunk;
+
+ size_t num_medium_chunks, num_small_chunks, num_spec_chunks;
+ chunk_up(words_left, num_medium_chunks, num_small_chunks, num_spec_chunks);
+
+ EXPECT_EQ(0UL, num_medium_chunks) << "should not get any medium chunks";
+ // DISABLED: checks started to fail after 8198423
+ // EXPECT_EQ((num_small_chunks + num_spec_chunks), ChunkManagerTest::sum_free_chunks_count(&cm)) << "should be space for 3 chunks";
+ // EXPECT_EQ(words_left, ChunkManagerTest::sum_free_chunks(&cm)) << "sizes should add up";
+}
+
+TEST_VM(VirtualSpaceNodeTest, half_vsn_is_committed_humongous_chunk_is_used) {
+ MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+ ChunkManager cm(false);
+ VirtualSpaceNode vsn(false, vsn_test_size_bytes);
+ ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
+
+ vsn.initialize();
+ EXPECT_TRUE(vsn.expand_by(MediumChunk * 2, MediumChunk * 2));
+ // Humongous chunks will be aligned up to MediumChunk + SpecializedChunk
+ vsn.get_chunk_vs(MediumChunk + SpecializedChunk);
+ vsn.retire(&cm);
+
+ const size_t words_left = MediumChunk * 2 - (MediumChunk + SpecializedChunk);
+ size_t num_medium_chunks, num_small_chunks, num_spec_chunks;
+ ASSERT_NO_FATAL_FAILURE(chunk_up(words_left, num_medium_chunks, num_small_chunks, num_spec_chunks));
+
+ EXPECT_EQ(0UL, num_medium_chunks) << "should not get any medium chunks";
+ // DISABLED: checks started to fail after 8198423
+ // EXPECT_EQ((num_small_chunks + num_spec_chunks), ChunkManagerTest::sum_free_chunks_count(&cm)) << "should be space for 3 chunks";
+ // EXPECT_EQ(words_left, ChunkManagerTest::sum_free_chunks(&cm)) << "sizes should add up";
+}
+
+TEST_VM(VirtualSpaceNodeTest, all_vsn_is_committed_half_is_used_by_chunks) {
+ MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+
+ ChunkManager cm(false);
+ VirtualSpaceNode vsn(false, vsn_test_size_bytes);
+ ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
+
+ vsn.initialize();
+ EXPECT_TRUE(vsn.expand_by(vsn_test_size_words, vsn_test_size_words));
+ vsn.get_chunk_vs(MediumChunk);
+ vsn.get_chunk_vs(MediumChunk);
+ vsn.retire(&cm);
+ // DISABLED: checks started to fail after 8198423
+ // EXPECT_EQ(2UL, ChunkManagerTest::sum_free_chunks_count(&cm)) << "should have been memory left for 2 chunks";
+ // EXPECT_EQ(2UL * MediumChunk, ChunkManagerTest::sum_free_chunks(&cm)) << "sizes should add up";
+}
+
+TEST_VM(VirtualSpaceNodeTest, no_committed_memory) {
+ MutexLockerEx ml(MetaspaceExpand_lock, Mutex::_no_safepoint_check_flag);
+
+ ChunkManager cm(false);
+ VirtualSpaceNode vsn(false, vsn_test_size_bytes);
+ ChunkManagerRestorer c(Metaspace::get_chunk_manager(false));
+
+ vsn.initialize();
+ vsn.retire(&cm);
+ ASSERT_EQ(0UL, ChunkManagerTest::sum_free_chunks_count(&cm)) << "did not commit any memory in the VSN";
+}
+
+TEST_VM(VirtualSpaceNodeTest, is_available_positive) {
+ // Reserve some memory.
+ VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
+ ASSERT_TRUE(vsn.initialize()) << "Failed to setup VirtualSpaceNode";
+
+ // Commit some memory.
+ size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
+ ASSERT_TRUE(vsn.expand_by(commit_word_size, commit_word_size))
+ << "Failed to commit, commit_word_size = " << commit_word_size;
+
+ SCOPED_TRACE(err_msg("VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")",
+ p2i(vsn.bottom()), p2i(vsn.end())).buffer());
+
+ // Check that is_available accepts the committed size.
+ EXPECT_TRUE(vsn.is_available(commit_word_size)) << " commit_word_size = " << commit_word_size;
+
+ // Check that is_available accepts half the committed size.
+ size_t expand_word_size = commit_word_size / 2;
+ EXPECT_TRUE(vsn.is_available(expand_word_size)) << " expand_word_size = " << expand_word_size;
+}
+
+TEST_VM(VirtualSpaceNodeTest, is_available_negative) {
+ // Reserve some memory.
+ VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
+ ASSERT_TRUE(vsn.initialize()) << "Failed to setup VirtualSpaceNode";
+
+ // Commit some memory.
+ size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
+ ASSERT_TRUE(vsn.expand_by(commit_word_size, commit_word_size))
+ << "Failed to commit, commit_word_size = " << commit_word_size;
+
+ SCOPED_TRACE(err_msg("VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")",
+ p2i(vsn.bottom()), p2i(vsn.end())).buffer());
+
+ // Check that is_available doesn't accept a too large size.
+ size_t two_times_commit_word_size = commit_word_size * 2;
+ EXPECT_FALSE(vsn.is_available(two_times_commit_word_size)) << " two_times_commit_word_size = " << two_times_commit_word_size;
+}
+
+TEST_VM(VirtualSpaceNodeTest, is_available_overflow) {
+ // Reserve some memory.
+ VirtualSpaceNode vsn(false, os::vm_allocation_granularity());
+ ASSERT_TRUE(vsn.initialize()) << "Failed to setup VirtualSpaceNode";
+
+ // Commit some memory.
+ size_t commit_word_size = os::vm_allocation_granularity() / BytesPerWord;
+ ASSERT_TRUE(vsn.expand_by(commit_word_size, commit_word_size))
+ << "Failed to commit, commit_word_size = " << commit_word_size;
+
+ SCOPED_TRACE(err_msg("VirtualSpaceNode [" PTR_FORMAT ", " PTR_FORMAT ")",
+ p2i(vsn.bottom()), p2i(vsn.end())).buffer());
+
+ // Calculate a size that will overflow the virtual space size.
+ void* virtual_space_max = (void*)(uintptr_t)-1;
+ size_t bottom_to_max = pointer_delta(virtual_space_max, vsn.bottom(), 1);
+ size_t overflow_size = bottom_to_max + BytesPerWord;
+ size_t overflow_word_size = overflow_size / BytesPerWord;
+
+ EXPECT_FALSE(vsn.is_available(overflow_word_size)) << " overflow_word_size = " << overflow_word_size;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/runtime/test_os_linux.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "precompiled.hpp"
+
+#ifdef LINUX
+
+#include <sys/mman.h>
+
+#include "runtime/os.hpp"
+#include "unittest.hpp"
+
+namespace {
+ static void small_page_write(void* addr, size_t size) {
+ size_t page_size = os::vm_page_size();
+
+ char* end = (char*)addr + size;
+ for (char* p = (char*)addr; p < end; p += page_size) {
+ *p = 1;
+ }
+ }
+
+ class HugeTlbfsMemory : private ::os::Linux {
+ char* const _ptr;
+ const size_t _size;
+ public:
+ static char* reserve_memory_special_huge_tlbfs_only(size_t bytes, char* req_addr, bool exec) {
+ return os::Linux::reserve_memory_special_huge_tlbfs_only(bytes, req_addr, exec);
+ }
+ static char* reserve_memory_special_huge_tlbfs_mixed(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ return os::Linux::reserve_memory_special_huge_tlbfs_mixed(bytes, alignment, req_addr, exec);
+ }
+ HugeTlbfsMemory(char* const ptr, size_t size) : _ptr(ptr), _size(size) { }
+ ~HugeTlbfsMemory() {
+ if (_ptr != NULL) {
+ os::Linux::release_memory_special_huge_tlbfs(_ptr, _size);
+ }
+ }
+ };
+
+ class ShmMemory : private ::os::Linux {
+ char* const _ptr;
+ const size_t _size;
+ public:
+ static char* reserve_memory_special_shm(size_t bytes, size_t alignment, char* req_addr, bool exec) {
+ return os::Linux::reserve_memory_special_shm(bytes, alignment, req_addr, exec);
+ }
+ ShmMemory(char* const ptr, size_t size) : _ptr(ptr), _size(size) { }
+ ~ShmMemory() {
+ os::Linux::release_memory_special_shm(_ptr, _size);
+ }
+ };
+
+ // have to use these functions, as gtest's _PRED macros don't like is_aligned
+ // nor (is_aligned<size_t, size_t>)
+ static bool is_size_aligned(size_t size, size_t alignment) {
+ return is_aligned(size, alignment);
+ }
+ static bool is_ptr_aligned(char* ptr, size_t alignment) {
+ return is_aligned(ptr, alignment);
+ }
+
+ static void test_reserve_memory_special_shm(size_t size, size_t alignment) {
+ ASSERT_TRUE(UseSHM) << "must be used only when UseSHM is true";
+ char* addr = ShmMemory::reserve_memory_special_shm(size, alignment, NULL, false);
+ if (addr != NULL) {
+ ShmMemory mr(addr, size);
+ EXPECT_PRED2(is_ptr_aligned, addr, alignment);
+ EXPECT_PRED2(is_ptr_aligned, addr, os::large_page_size());
+
+ small_page_write(addr, size);
+ }
+ }
+}
+
+TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_only) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+ size_t lp = os::large_page_size();
+
+ for (size_t size = lp; size <= lp * 10; size += lp) {
+ char* addr = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_only(size, NULL, false);
+
+ if (addr != NULL) {
+ HugeTlbfsMemory mr(addr, size);
+ small_page_write(addr, size);
+ }
+ }
+}
+
+TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_without_addr) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ // sizes to test
+ const size_t sizes[] = {
+ lp, lp + ag, lp + lp / 2, lp * 2,
+ lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2,
+ lp * 10, lp * 10 + lp / 2
+ };
+ const int num_sizes = sizeof(sizes) / sizeof(size_t);
+ for (int i = 0; i < num_sizes; i++) {
+ const size_t size = sizes[i];
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, NULL, false);
+ if (p != NULL) {
+ HugeTlbfsMemory mr(p, size);
+ EXPECT_PRED2(is_ptr_aligned, p, alignment) << " size = " << size;
+ small_page_write(p, size);
+ }
+ }
+ }
+}
+
+TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_with_good_req_addr) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ // sizes to test
+ const size_t sizes[] = {
+ lp, lp + ag, lp + lp / 2, lp * 2,
+ lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2,
+ lp * 10, lp * 10 + lp / 2
+ };
+ const int num_sizes = sizeof(sizes) / sizeof(size_t);
+
+ // Pre-allocate an area as large as the largest allocation
+ // and aligned to the largest alignment we will be testing.
+ const size_t mapping_size = sizes[num_sizes - 1] * 2;
+ char* const mapping = (char*) ::mmap(NULL, mapping_size,
+ PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,
+ -1, 0);
+ ASSERT_TRUE(mapping != NULL) << " mmap failed, mapping_size = " << mapping_size;
+ // Unmap the mapping, it will serve as a value for a "good" req_addr
+ ::munmap(mapping, mapping_size);
+
+ for (int i = 0; i < num_sizes; i++) {
+ const size_t size = sizes[i];
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ char* const req_addr = align_up(mapping, alignment);
+ char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false);
+ if (p != NULL) {
+ HugeTlbfsMemory mr(p, size);
+ ASSERT_EQ(req_addr, p) << " size = " << size << ", alignment = " << alignment;
+ small_page_write(p, size);
+ }
+ }
+ }
+}
+
+
+TEST_VM(os_linux, reserve_memory_special_huge_tlbfs_mixed_with_bad_req_addr) {
+ if (!UseHugeTLBFS) {
+ return;
+ }
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ // sizes to test
+ const size_t sizes[] = {
+ lp, lp + ag, lp + lp / 2, lp * 2,
+ lp * 2 + ag, lp * 2 - ag, lp * 2 + lp / 2,
+ lp * 10, lp * 10 + lp / 2
+ };
+ const int num_sizes = sizeof(sizes) / sizeof(size_t);
+
+ // Pre-allocate an area as large as the largest allocation
+ // and aligned to the largest alignment we will be testing.
+ const size_t mapping_size = sizes[num_sizes - 1] * 2;
+ char* const mapping = (char*) ::mmap(NULL, mapping_size,
+ PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE,
+ -1, 0);
+ ASSERT_TRUE(mapping != NULL) << " mmap failed, mapping_size = " << mapping_size;
+ // Leave the mapping intact, it will server as "bad" req_addr
+
+ class MappingHolder {
+ char* const _mapping;
+ size_t _size;
+ public:
+ MappingHolder(char* mapping, size_t size) : _mapping(mapping), _size(size) { }
+ ~MappingHolder() {
+ ::munmap(_mapping, _size);
+ }
+ } holder(mapping, mapping_size);
+
+ for (int i = 0; i < num_sizes; i++) {
+ const size_t size = sizes[i];
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ char* const req_addr = align_up(mapping, alignment);
+ char* p = HugeTlbfsMemory::reserve_memory_special_huge_tlbfs_mixed(size, alignment, req_addr, false);
+ HugeTlbfsMemory mr(p, size);
+ // as the area around req_addr contains already existing mappings, the API should always
+ // return NULL (as per contract, it cannot return another address)
+ EXPECT_TRUE(p == NULL) << " size = " << size
+ << ", alignment = " << alignment
+ << ", req_addr = " << req_addr
+ << ", p = " << p;
+ }
+ }
+}
+
+TEST_VM(os_linux, reserve_memory_special_shm) {
+ if (!UseSHM) {
+ return;
+ }
+ size_t lp = os::large_page_size();
+ size_t ag = os::vm_allocation_granularity();
+
+ for (size_t size = ag; size < lp * 3; size += ag) {
+ for (size_t alignment = ag; is_size_aligned(size, alignment); alignment *= 2) {
+ EXPECT_NO_FATAL_FAILURE(test_reserve_memory_special_shm(size, alignment));
+ }
+ }
+}
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/runtime/test_os_windows.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "precompiled.hpp"
+
+#ifdef _WINDOWS
+
+#include "runtime/os.hpp"
+#include "runtime/flags/flagSetting.hpp"
+#include "runtime/globals_extension.hpp"
+#include "unittest.hpp"
+
+namespace {
+ class MemoryReleaser {
+ char* const _ptr;
+ const size_t _size;
+ public:
+ MemoryReleaser(char* ptr, size_t size) : _ptr(ptr), _size(size) { }
+ ~MemoryReleaser() {
+ os::release_memory_special(_ptr, _size);
+ }
+ };
+}
+
+// test tries to allocate memory in a single contiguous memory block at a particular address.
+// The test first tries to find a good approximate address to allocate at by using the same
+// method to allocate some memory at any address. The test then tries to allocate memory in
+// the vicinity (not directly after it to avoid possible by-chance use of that location)
+// This is of course only some dodgy assumption, there is no guarantee that the vicinity of
+// the previously allocated memory is available for allocation. The only actual failure
+// that is reported is when the test tries to allocate at a particular location but gets a
+// different valid one. A NULL return value at this point is not considered an error but may
+// be legitimate.
+TEST_VM(os_windows, reserve_memory_special) {
+ if (!UseLargePages) {
+ return;
+ }
+
+ // set globals to make sure we hit the correct code path
+ FLAG_GUARD(UseLargePagesIndividualAllocation);
+ FLAG_GUARD(UseNUMAInterleaving);
+ FLAG_SET_CMDLINE(bool, UseLargePagesIndividualAllocation, false);
+ FLAG_SET_CMDLINE(bool, UseNUMAInterleaving, false);
+
+ const size_t large_allocation_size = os::large_page_size() * 4;
+ char* result = os::reserve_memory_special(large_allocation_size, os::large_page_size(), NULL, false);
+ if (result != NULL) {
+ // failed to allocate memory, skipping the test
+ return;
+ }
+ MemoryReleaser mr(result, large_allocation_size);
+
+ // allocate another page within the recently allocated memory area which seems to be a good location. At least
+ // we managed to get it once.
+ const size_t expected_allocation_size = os::large_page_size();
+ char* expected_location = result + os::large_page_size();
+ char* actual_location = os::reserve_memory_special(expected_allocation_size, os::large_page_size(), expected_location, false);
+ if (actual_location != NULL) {
+ // failed to allocate memory, skipping the test
+ return;
+ }
+ MemoryReleaser mr2(actual_location, expected_allocation_size);
+
+ EXPECT_EQ(expected_location, actual_location)
+ << "Failed to allocate memory at requested location " << expected_location << " of size " << expected_allocation_size;
+}
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/gtest/utilities/test_bitMap_large.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2018, Red Hat Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include "precompiled.hpp"
+#include "utilities/bitMap.inline.hpp"
+#include "unittest.hpp"
+
+// Bitmap size should be large enough to accept large operations.
+static const BitMap::idx_t BITMAP_SIZE = 8192;
+
+// The test would like to fuzz indexes in this window. Having the fuzz
+// window at bitmap word size makes sure the test would touch every combination
+// of indexes (un)aligned on word boundary.
+static const BitMap::idx_t FUZZ_WINDOW = sizeof(BitMap::bm_word_t) * 8;
+
+static void verify_set(CHeapBitMap& map, BitMap::idx_t l, BitMap::idx_t r) {
+ for (BitMap::idx_t c = l; c < r; c++) {
+ EXPECT_TRUE(map.at(c));
+ }
+}
+
+static void verify_unset(CHeapBitMap& map, BitMap::idx_t l, BitMap::idx_t r) {
+ for (BitMap::idx_t c = l; c < r; c++) {
+ EXPECT_FALSE(map.at(c));
+ }
+}
+
+TEST(BitMap, clear_large_range) {
+ CHeapBitMap map(BITMAP_SIZE);
+
+ map.set_range(0, BITMAP_SIZE);
+ verify_set(map, 0, BITMAP_SIZE);
+
+ for (size_t size_class = 0; size_class <= BITMAP_SIZE; size_class = MAX2<size_t>(1, size_class*2)) {
+ for (BitMap::idx_t l = 0; l < FUZZ_WINDOW; l++) {
+ for (BitMap::idx_t tr = l; tr < FUZZ_WINDOW; tr++) {
+ BitMap::idx_t r = MIN2(BITMAP_SIZE, size_class + tr); // avoid overflow
+
+ map.clear_large_range(l, r);
+ verify_unset(map, l, r);
+ verify_set(map, 0, l);
+ verify_set(map, r, BITMAP_SIZE);
+
+ // Restore cleared
+ map.set_range(l, r);
+ verify_set(map, l, r);
+ }
+ }
+ }
+}
+
+TEST(BitMap, set_large_range) {
+ CHeapBitMap map(BITMAP_SIZE);
+
+ map.clear();
+ verify_unset(map, 0, BITMAP_SIZE);
+
+ for (size_t size_class = 0; size_class <= BITMAP_SIZE; size_class = MAX2<size_t>(1, size_class*2)) {
+ for (BitMap::idx_t l = 0; l < FUZZ_WINDOW; l++) {
+ for (BitMap::idx_t tr = l; tr < FUZZ_WINDOW; tr++) {
+ BitMap::idx_t r = MIN2(BITMAP_SIZE, size_class + tr); // avoid overflow
+
+ map.set_large_range(l, r);
+ verify_set(map, l, r);
+ verify_unset(map, 0, l);
+ verify_unset(map, r, BITMAP_SIZE);
+
+ // Restore set
+ map.clear_range(l, r);
+ verify_unset(map, l, r);
+ }
+ }
+ }
+}
+
+TEST(BitMap, par_at_put_large_range) {
+ CHeapBitMap map(BITMAP_SIZE);
+
+ map.clear();
+ verify_unset(map, 0, BITMAP_SIZE);
+
+ for (size_t size_class = 0; size_class <= BITMAP_SIZE; size_class = MAX2<size_t>(1, size_class*2)) {
+ for (BitMap::idx_t l = 0; l < FUZZ_WINDOW; l++) {
+ for (BitMap::idx_t tr = l; tr < FUZZ_WINDOW; tr++) {
+ BitMap::idx_t r = MIN2(BITMAP_SIZE, size_class + tr); // avoid overflow
+
+ map.par_at_put_large_range(l, r, true);
+ verify_set(map, l, r);
+ verify_unset(map, 0, l);
+ verify_unset(map, r, BITMAP_SIZE);
+
+ // Restore set
+ map.clear_range(l, r);
+ verify_unset(map, l, r);
+ }
+ }
+ }
+}
--- a/test/hotspot/jtreg/Makefile Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/Makefile Mon Nov 12 11:10:16 2018 +0530
@@ -49,9 +49,6 @@
$(ECHO) "Running tests: $@"
$(MAKE) -j 1 TEST_SELECTION=":$@" UNIQUE_DIR=$@ jtreg_tests;
-hotspot_internal:
- $(ALT_OUTPUTDIR)/jdk/bin/java -XX:+ExecuteInternalVMTests -XX:+ShowMessageBoxOnError -version
-
################################################################
# Set up the directory in which the jvm directories live (client/, server/, etc.)
--- a/test/hotspot/jtreg/ProblemList-graal.txt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/ProblemList-graal.txt Mon Nov 12 11:10:16 2018 +0530
@@ -43,8 +43,6 @@
compiler/jvmci/SecurityRestrictionsTest.java 8181837 generic-all
-compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java 8204521 windows-all
-
compiler/unsafe/UnsafeGetConstantField.java 8181833 generic-all
compiler/unsafe/UnsafeGetStableArrayElement.java 8181833 generic-all
compiler/unsafe/UnsafeOffHeapBooleanTest.java 8181833 generic-all
@@ -181,3 +179,5 @@
org.graalvm.compiler.debug.test.DebugContextTest 8203504
org.graalvm.compiler.hotspot.test.GraalOSRTest 8206947
+
+org.graalvm.compiler.debug.test.TimerKeyTest 8213598
--- a/test/hotspot/jtreg/ProblemList.txt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/ProblemList.txt Mon Nov 12 11:10:16 2018 +0530
@@ -83,6 +83,7 @@
runtime/appcds/javaldr/GCSharedStringsDuringDump.java 8208778 macosx-x64
runtime/appcds/javaldr/GCDuringDump.java 8208778 macosx-x64
+runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java 8213299 generic-all
runtime/CompressedOops/UseCompressedOops.java 8079353 generic-all
runtime/RedefineTests/RedefineRunningMethods.java 8208778 macosx-x64
runtime/SharedArchiveFile/SASymbolTableTest.java 8193639 solaris-all
@@ -184,8 +185,6 @@
vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted004/TestDescription.java 7013634,6606767 generic-all
vmTestbase/nsk/jvmti/ThreadStart/threadstart001/TestDescription.java 8016181 generic-all
vmTestbase/nsk/jvmti/scenarios/extension/EX03/ex03t001/TestDescription.java 8173658 generic-all
-vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java 8204506,8203350 generic-all
-vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java 6813266 generic-all
vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/TestDescription.java 8051349 generic-all
vmTestbase/nsk/jvmti/AttachOnDemand/attach034/TestDescription.java 8042145 generic-all
vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java 8202971 generic-all
--- a/test/hotspot/jtreg/TEST.groups Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/TEST.groups Mon Nov 12 11:10:16 2018 +0530
@@ -180,7 +180,6 @@
-gc/g1/ihop/TestIHOPErgo.java
tier1_gc_2 = \
- sanity/ExecuteInternalVMTests.java \
gc/ \
-gc/epsilon/ \
-gc/g1/ \
--- a/test/hotspot/jtreg/applications/ctw/modules/generate.bash Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/generate.bash Mon Nov 12 11:10:16 2018 +0530
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2018, 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
@@ -30,7 +30,7 @@
echo creating $file for $module...
cat > $file <<EOF
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -57,7 +57,8 @@
* @summary run CTW for all classes from $module module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules $module
--- a/test/hotspot/jtreg/applications/ctw/modules/java_base.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_base.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,8 @@
* @summary run CTW for some classes from java.base module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.base
--- a/test/hotspot/jtreg/applications/ctw/modules/java_base_2.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_base_2.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,8 @@
* @summary run CTW for some classes from java.base module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.base
--- a/test/hotspot/jtreg/applications/ctw/modules/java_compiler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_compiler.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.compiler module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.compiler
--- a/test/hotspot/jtreg/applications/ctw/modules/java_datatransfer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_datatransfer.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.datatransfer module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.datatransfer
--- a/test/hotspot/jtreg/applications/ctw/modules/java_desktop.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_desktop.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,8 @@
* @summary run CTW for some classes from java.desktop module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.desktop
--- a/test/hotspot/jtreg/applications/ctw/modules/java_desktop_2.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_desktop_2.java Mon Nov 12 11:10:16 2018 +0530
@@ -26,7 +26,8 @@
* @summary run CTW for some classes from java.desktop module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.desktop
--- a/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_instrument.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.instrument module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.instrument
--- a/test/hotspot/jtreg/applications/ctw/modules/java_logging.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_logging.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.logging module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.logging
--- a/test/hotspot/jtreg/applications/ctw/modules/java_management.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_management.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.management module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.management
--- a/test/hotspot/jtreg/applications/ctw/modules/java_management_rmi.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_management_rmi.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.management.rmi module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.management.rmi
--- a/test/hotspot/jtreg/applications/ctw/modules/java_naming.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_naming.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.naming module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.naming
--- a/test/hotspot/jtreg/applications/ctw/modules/java_prefs.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_prefs.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.prefs module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.prefs
--- a/test/hotspot/jtreg/applications/ctw/modules/java_rmi.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_rmi.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.rmi module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.rmi
--- a/test/hotspot/jtreg/applications/ctw/modules/java_scripting.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_scripting.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.scripting module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.scripting
--- a/test/hotspot/jtreg/applications/ctw/modules/java_security_jgss.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_security_jgss.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.security.jgss module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.security.jgss
--- a/test/hotspot/jtreg/applications/ctw/modules/java_security_sasl.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_security_sasl.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.security.sasl module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.security.sasl
--- a/test/hotspot/jtreg/applications/ctw/modules/java_smartcardio.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_smartcardio.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.smartcardio module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.smartcardio
--- a/test/hotspot/jtreg/applications/ctw/modules/java_sql.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_sql.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.sql module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.sql
--- a/test/hotspot/jtreg/applications/ctw/modules/java_sql_rowset.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_sql_rowset.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.sql.rowset module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.sql.rowset
--- a/test/hotspot/jtreg/applications/ctw/modules/java_xml.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_xml.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.xml module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.xml
--- a/test/hotspot/jtreg/applications/ctw/modules/java_xml_crypto.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/java_xml_crypto.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from java.xml.crypto module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.xml.crypto
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_accessibility.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_accessibility.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.accessibility module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.accessibility
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_aot.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_aot.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.aot module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.aot
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_attach.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_attach.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.attach module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.attach
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_charsets.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_charsets.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.charsets module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.charsets
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_compiler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_compiler.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.compiler module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.compiler
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_cryptoki.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_cryptoki.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.crypto.cryptoki module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.crypto.cryptoki
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ec.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ec.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.crypto.ec module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.crypto.ec
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_mscapi.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_mscapi.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.crypto.mscapi module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.crypto.mscapi
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ucrypto.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_crypto_ucrypto.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.crypto.ucrypto module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.crypto.ucrypto
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_dynalink.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_dynalink.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.dynalink module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.dynalink
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_editpad.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_editpad.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.editpad module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.editpad
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_hotspot_agent.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_hotspot_agent.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.hotspot.agent module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.hotspot.agent
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_httpserver.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_httpserver.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.httpserver module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.httpserver
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_incubator_httpclient.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_incubator_httpclient.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.incubator.httpclient module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.incubator.httpclient
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_ed.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_ed.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.ed module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.ed
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_jvmstat.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_jvmstat.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.jvmstat module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.jvmstat
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_le.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_le.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.le module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.le
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_opt.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_opt.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.opt module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.opt
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_ci.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_ci.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.vm.ci module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.vm.ci
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_compiler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_compiler.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.vm.compiler module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.vm.compiler
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_compiler_management.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_internal_vm_compiler_management.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.internal.vm.compiler.management module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.internal.vm.compiler.management
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jartool.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jartool.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jartool module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jartool
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_javadoc.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_javadoc.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.javadoc module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.javadoc
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jcmd.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jcmd.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jcmd module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jcmd
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jconsole.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jconsole.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jconsole module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jconsole
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jdeps.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jdeps.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jdeps module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jdeps
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jdi.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jdi.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jdi module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jdi
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jlink.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jlink.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jlink module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jlink
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jshell.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jshell.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jshell module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jshell
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jsobject.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jsobject.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jsobject module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jsobject
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_jstatd.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_jstatd.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.jstatd module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.jstatd
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_localedata.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_localedata.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.localedata module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.localedata
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_management.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_management.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.management module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.management
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_management_agent.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_management_agent.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.management.agent module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.management.agent
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_naming_dns.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_naming_dns.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.naming.dns module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.naming.dns
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_naming_rmi.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_naming_rmi.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.naming.rmi module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.naming.rmi
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_net.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_net.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.net module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.net
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_packager.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_packager.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.packager module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.packager
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_packager_services.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_packager_services.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.packager.services module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.packager.services
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_rmic.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_rmic.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.rmic module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.rmic
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_scripting_nashorn.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_scripting_nashorn.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.scripting.nashorn module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.scripting.nashorn
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_scripting_nashorn_shell.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_scripting_nashorn_shell.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.scripting.nashorn.shell module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.scripting.nashorn.shell
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_sctp.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_sctp.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.sctp module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.sctp
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_security_auth.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_security_auth.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.security.auth module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.security.auth
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_security_jgss.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_security_jgss.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.security.jgss module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.security.jgss
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_unsupported.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_unsupported.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.unsupported module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.unsupported
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_xml_dom.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_xml_dom.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.xml.dom module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.xml.dom
--- a/test/hotspot/jtreg/applications/ctw/modules/jdk_zipfs.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/applications/ctw/modules/jdk_zipfs.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -26,7 +26,8 @@
* @summary run CTW for all classes from jdk.zipfs module
*
* @library /test/lib / /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules jdk.zipfs
--- a/test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/aot/scripts/java.base-list.txt Mon Nov 12 11:10:16 2018 +0530
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2018 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
@@ -18,18 +18,3 @@
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
-
-# jaotc: java.lang.StackOverflowError
-exclude sun.util.resources.LocaleNames.getContents()[[Ljava/lang/Object;
-exclude sun.util.resources.TimeZoneNames.getContents()[[Ljava/lang/Object;
-exclude sun.util.resources.cldr.LocaleNames.getContents()[[Ljava/lang/Object;
-exclude sun.util.resources..*.LocaleNames_.*.getContents\(\)\[\[Ljava/lang/Object;
-exclude sun.util.resources..*.LocaleNames_.*_.*.getContents\(\)\[\[Ljava/lang/Object;
-exclude sun.util.resources..*.TimeZoneNames_.*.getContents\(\)\[\[Ljava/lang/Object;
-exclude sun.util.resources..*.TimeZoneNames_.*_.*.getContents\(\)\[\[Ljava/lang/Object;
-# java.lang.Error: Trampoline must not be defined by the bootstrap classloader
-exclude sun.reflect.misc.Trampoline.<clinit>()V
-exclude sun.reflect.misc.Trampoline.invoke(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
-# assert(referenceMask != -1) failed: must not be a derived reference type
-exclude com.sun.crypto.provider.AESWrapCipher.engineUnwrap([BLjava/lang/String;I)Ljava/security/Key;
-exclude sun.security.ssl.*
--- a/test/hotspot/jtreg/compiler/aot/scripts/jdk.internal.vm.compiler-list.txt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/aot/scripts/jdk.internal.vm.compiler-list.txt Mon Nov 12 11:10:16 2018 +0530
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2018, 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
@@ -19,20 +19,27 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
+#
exclude org.graalvm.compiler.hotspot.replacements.arraycopy.ArrayCopyCallNode.*
exclude org.graalvm.compiler.hotspot.replacements.AESCryptSubstitutions.*
exclude org.graalvm.compiler.hotspot.replacements.CipherBlockChainingSubstitutions.crypt(Ljava/lang/Object;[BII[BILjava/lang/Object;ZZ)V
+exclude org.graalvm.compiler.hotspot.replacements.HotSpotReplacementsUtil.arrayAllocationSize(III)I
+exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$config.execute(.*).*
+exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$getWordKind.execute(.*).*
+exclude org.graalvm.compiler.hotspot.replacements.PluginFactory_HotSpotReplacementsUtil\$getConfig.execute(.*).
+#
exclude org.graalvm.compiler.hotspot.stubs.StubUtil.printf(.*).*
exclude org.graalvm.compiler.hotspot.stubs.StubUtil.decipher(J)V
exclude org.graalvm.compiler.hotspot.stubs.StubUtil.fatal(.*).*
#
+exclude org.graalvm.compiler.nodes.java.NewArrayNode.newUninitializedArray(Ljava/lang/Class;I)Ljava/lang/Object;
+exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object;
+exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newUninitializedArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object;
+exclude org.graalvm.compiler.nodes.PiNode.piCastNonNull(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
+#
exclude org.graalvm.compiler.replacements.nodes.ArrayEqualsNode.equals(.*).*
exclude org.graalvm.compiler.replacements.Log.print.*
exclude org.graalvm.compiler.replacements.ReplacementsUtil.*
exclude org.graalvm.compiler.replacements.SnippetCounter.*
exclude org.graalvm.compiler.replacements.SnippetCounterNode.*
-#
-exclude org.graalvm.compiler.nodes.java.NewArrayNode.newUninitializedArray(Ljava/lang/Class;I)Ljava/lang/Object;
-exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newUninitializedArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object;
-exclude org.graalvm.compiler.nodes.java.DynamicNewArrayNode.newArray(Ljava/lang/Class;ILjdk/vm/ci/meta/JavaKind;)Ljava/lang/Object;
-exclude org.graalvm.compiler.nodes.PiNode.piCastNonNull(Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/Object;
+exclude org.graalvm.compiler.replacements.SnippetIntegerHistogram.inc(J)V
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/c2/Test8bitLogicalOperators.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8213479
+ * @summary Missing x86_64.ad patterns for 8-bit logical operators with destination in memory
+ *
+ * @run main/othervm -Xcomp -XX:-Inline -XX:CompileOnly=compiler.c2.Test8bitLogicalOperators::test
+ * compiler.c2.Test8bitLogicalOperators
+ */
+
+package compiler.c2;
+
+public class Test8bitLogicalOperators {
+ private static byte and = 0b0011, or = 0b0011, xor = 0b0011;
+ private static byte mask = 0b0101;
+
+ public static void main(String... args) {
+ test();
+
+ if (and != 0b0001 || or != 0b0111 || xor != 0b0110)
+ throw new AssertionError("8-bit logical operator failure");
+ }
+
+ public static void test() {
+ and &= mask;
+
+ or |= mask;
+
+ xor ^= mask;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAE.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package compiler.c2.aarch64;
+
+import java.lang.reflect.Field;
+import jdk.internal.misc.Unsafe;
+
+class TestUnsafeVolatileCAE
+{
+ public volatile int f_int = 0;
+ public volatile Integer f_obj = Integer.valueOf(0);
+ public volatile long f_long = 0;
+ public volatile byte f_byte = 0;
+ public volatile short f_short = 0;
+
+ public static Unsafe unsafe = Unsafe.getUnsafe();
+ public static Field f_int_field;
+ public static Field f_obj_field;
+ public static Field f_long_field;
+ public static Field f_byte_field;
+ public static Field f_short_field;
+ public static long f_int_off;
+ public static long f_obj_off;
+ public static long f_long_off;
+ public static long f_byte_off;
+ public static long f_short_off;
+
+ static {
+ try {
+ f_int_field = TestUnsafeVolatileCAE.class.getField("f_int");
+ f_obj_field = TestUnsafeVolatileCAE.class.getField("f_obj");
+ f_long_field = TestUnsafeVolatileCAE.class.getField("f_long");
+ f_byte_field = TestUnsafeVolatileCAE.class.getField("f_byte");
+ f_short_field = TestUnsafeVolatileCAE.class.getField("f_short");
+ f_int_off = unsafe.objectFieldOffset(f_int_field);
+ f_obj_off = unsafe.objectFieldOffset(f_obj_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ f_byte_off = unsafe.objectFieldOffset(f_byte_field);
+ f_short_off = unsafe.objectFieldOffset(f_short_field);
+ } catch (Exception e) {
+ System.out.println("reflection failed " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ final TestUnsafeVolatileCAE t = new TestUnsafeVolatileCAE();
+ for (int i = 0; i < 100_000; i++) {
+ t.f_int = -1;
+ int res = t.testInt(-1, i);
+ if (res != -1 || t.f_int != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_long = -1;
+ long res = t.testLong(-1, i);
+ if (res != -1 || t.f_long != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_byte = -1;
+ byte i_b = (byte)i;
+ byte res = t.testByte((byte)-1, i_b);
+ if (res != (byte)-1 || t.f_byte != i_b) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_short = -1;
+ short i_s = (short)i;
+ short res = t.testShort((byte)-1, i_s);
+ if (res != (short)-1 || t.f_short != i_s) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ Integer minusOne = Integer.valueOf(-1);
+ for (int i = 0; i < 100_000; i++) {
+ t.f_obj = minusOne;
+ Object res = t.testObj(minusOne, Integer.valueOf(i));
+ if (res != minusOne || t.f_obj != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+
+ public int testInt(int x, int i)
+ {
+ return unsafe.compareAndExchangeInt(this, f_int_off, x, i);
+ }
+
+ public Object testObj(Object x, Object o)
+ {
+ return unsafe.compareAndExchangeReference(this, f_obj_off, x, o);
+ }
+ public long testLong(long x, long i)
+ {
+ return unsafe.compareAndExchangeLong(this, f_long_off, x, i);
+ }
+
+ public byte testByte(byte x, byte i)
+ {
+ return unsafe.compareAndExchangeByte(this, f_byte_off, x, i);
+ }
+
+ public short testShort(short x, short i)
+ {
+ return unsafe.compareAndExchangeShort(this, f_short_off, x, i);
+ }
+}
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileCAS.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,19 +30,34 @@
{
public volatile int f_int = 0;
public volatile Integer f_obj = Integer.valueOf(0);
+ public volatile long f_long = 0;
+ public volatile byte f_byte = 0;
+ public volatile short f_short = 0;
public static Unsafe unsafe = Unsafe.getUnsafe();
public static Field f_int_field;
public static Field f_obj_field;
+ public static Field f_long_field;
+ public static Field f_byte_field;
+ public static Field f_short_field;
public static long f_int_off;
public static long f_obj_off;
+ public static long f_long_off;
+ public static long f_byte_off;
+ public static long f_short_off;
static {
try {
f_int_field = TestUnsafeVolatileCAS.class.getField("f_int");
f_obj_field = TestUnsafeVolatileCAS.class.getField("f_obj");
+ f_long_field = TestUnsafeVolatileCAS.class.getField("f_long");
+ f_byte_field = TestUnsafeVolatileCAS.class.getField("f_byte");
+ f_short_field = TestUnsafeVolatileCAS.class.getField("f_short");
f_int_off = unsafe.objectFieldOffset(f_int_field);
f_obj_off = unsafe.objectFieldOffset(f_obj_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ f_byte_off = unsafe.objectFieldOffset(f_byte_field);
+ f_short_off = unsafe.objectFieldOffset(f_short_field);
} catch (Exception e) {
System.out.println("reflection failed " + e);
e.printStackTrace();
@@ -59,6 +74,29 @@
throw new RuntimeException("bad result!");
}
}
+ for (int i = 0; i < 100_000; i++) {
+ t.f_long = -1;
+ t.testLong(-1, i);
+ if (t.f_long != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_byte = -1;
+ byte i_b = (byte)i;
+ t.testByte((byte)-1, i_b);
+ if (t.f_byte != i_b) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_short = -1;
+ short i_s = (short)i;
+ t.testShort((byte)-1, i_s);
+ if (t.f_short != i_s) {
+ throw new RuntimeException("bad result!");
+ }
+ }
Integer minusOne = Integer.valueOf(-1);
for (int i = 0; i < 100_000; i++) {
t.f_obj = minusOne;
@@ -68,6 +106,7 @@
}
}
}
+
public void testInt(int x, int i)
{
unsafe.compareAndSetInt(this, f_int_off, x, i);
@@ -77,4 +116,19 @@
{
unsafe.compareAndSetReference(this, f_obj_off, x, o);
}
+
+ public void testLong(long x, long i)
+ {
+ unsafe.compareAndSetLong(this, f_long_off, x, i);
+ }
+
+ public void testByte(byte x, byte i)
+ {
+ unsafe.compareAndSetByte(this, f_byte_off, x, i);
+ }
+
+ public void testShort(short x, short i)
+ {
+ unsafe.compareAndSetShort(this, f_short_off, x, i);
+ }
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAA.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package compiler.c2.aarch64;
+
+import java.lang.reflect.Field;
+import jdk.internal.misc.Unsafe;
+
+class TestUnsafeVolatileGAA
+{
+ public volatile int f_int = -1;
+ public volatile long f_long = -1;
+
+ public static Unsafe unsafe = Unsafe.getUnsafe();
+ public static Field f_int_field;
+ public static Field f_long_field;
+ public static long f_int_off;
+ public static long f_long_off;
+
+ static {
+ try {
+ f_int_field = TestUnsafeVolatileGAA.class.getField("f_int");
+ f_long_field = TestUnsafeVolatileGAA.class.getField("f_long");
+ f_int_off = unsafe.objectFieldOffset(f_int_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ } catch (Exception e) {
+ System.out.println("reflection failed " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ final TestUnsafeVolatileGAA t = new TestUnsafeVolatileGAA();
+ for (int i = 0; i < 100_000; i++) {
+ if (t.testInt() != i-1) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ if (t.testLong() != i-1) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+
+ public int testInt()
+ {
+ return unsafe.getAndAddInt(this, f_int_off, 1);
+ }
+
+ public long testLong()
+ {
+ return unsafe.getAndAddLong(this, f_long_off, 1);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileGAS.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package compiler.c2.aarch64;
+
+import java.lang.reflect.Field;
+import jdk.internal.misc.Unsafe;
+
+class TestUnsafeVolatileGAS
+{
+ public volatile int f_int = -1;
+ public volatile Integer f_obj = Integer.valueOf(-1);
+ public volatile long f_long = -1;
+
+ public static Unsafe unsafe = Unsafe.getUnsafe();
+ public static Field f_int_field;
+ public static Field f_obj_field;
+ public static Field f_long_field;
+ public static long f_int_off;
+ public static long f_obj_off;
+ public static long f_long_off;
+
+ static {
+ try {
+ f_int_field = TestUnsafeVolatileGAS.class.getField("f_int");
+ f_obj_field = TestUnsafeVolatileGAS.class.getField("f_obj");
+ f_long_field = TestUnsafeVolatileGAS.class.getField("f_long");
+ f_int_off = unsafe.objectFieldOffset(f_int_field);
+ f_obj_off = unsafe.objectFieldOffset(f_obj_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ } catch (Exception e) {
+ System.out.println("reflection failed " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ final TestUnsafeVolatileGAS t = new TestUnsafeVolatileGAS();
+ for (int i = 0; i < 100_000; i++) {
+ if (t.testInt(i) != i-1) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ if (t.testLong(i) != i-1) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ if ((Integer)t.testObj(Integer.valueOf(i)) != i-1) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+
+ public int testInt(int i)
+ {
+ return unsafe.getAndSetInt(this, f_int_off, i);
+ }
+
+ public Object testObj(Object o)
+ {
+ return unsafe.getAndSetReference(this, f_obj_off, o);
+ }
+ public long testLong(long i)
+ {
+ return unsafe.getAndSetLong(this, f_long_off, i);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestUnsafeVolatileWeakCAS.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package compiler.c2.aarch64;
+
+import java.lang.reflect.Field;
+import jdk.internal.misc.Unsafe;
+
+class TestUnsafeVolatileWeakCAS
+{
+ public volatile int f_int = 0;
+ public volatile Integer f_obj = Integer.valueOf(0);
+ public volatile long f_long = 0;
+ public volatile byte f_byte = 0;
+ public volatile short f_short = 0;
+
+ public static Unsafe unsafe = Unsafe.getUnsafe();
+ public static Field f_int_field;
+ public static Field f_obj_field;
+ public static Field f_long_field;
+ public static Field f_byte_field;
+ public static Field f_short_field;
+ public static long f_int_off;
+ public static long f_obj_off;
+ public static long f_long_off;
+ public static long f_byte_off;
+ public static long f_short_off;
+
+ static {
+ try {
+ f_int_field = TestUnsafeVolatileWeakCAS.class.getField("f_int");
+ f_obj_field = TestUnsafeVolatileWeakCAS.class.getField("f_obj");
+ f_long_field = TestUnsafeVolatileWeakCAS.class.getField("f_long");
+ f_byte_field = TestUnsafeVolatileWeakCAS.class.getField("f_byte");
+ f_short_field = TestUnsafeVolatileWeakCAS.class.getField("f_short");
+ f_int_off = unsafe.objectFieldOffset(f_int_field);
+ f_obj_off = unsafe.objectFieldOffset(f_obj_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ f_byte_off = unsafe.objectFieldOffset(f_byte_field);
+ f_short_off = unsafe.objectFieldOffset(f_short_field);
+ } catch (Exception e) {
+ System.out.println("reflection failed " + e);
+ e.printStackTrace();
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ final TestUnsafeVolatileWeakCAS t = new TestUnsafeVolatileWeakCAS();
+ for (int i = 0; i < 100_000; i++) {
+ t.f_int = -1;
+ if (t.testInt(-1, i)) {
+ if (t.f_int != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_long = -1;
+ if (t.testLong(-1, i)) {
+ if (t.f_long != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_byte = -1;
+ byte i_b = (byte)i;
+ if (t.testByte((byte)-1, i_b)) {
+ if (t.f_byte != i_b) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+ for (int i = 0; i < 100_000; i++) {
+ t.f_short = -1;
+ short i_s = (short)i;
+ if (t.testShort((byte)-1, i_s)) {
+ if (t.f_short != i_s) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+ Integer minusOne = Integer.valueOf(-1);
+ for (int i = 0; i < 100_000; i++) {
+ t.f_obj = minusOne;
+ if (t.testObj(minusOne, Integer.valueOf(i))) {
+ if (t.f_obj != i) {
+ throw new RuntimeException("bad result!");
+ }
+ }
+ }
+ }
+
+ public boolean testInt(int x, int i)
+ {
+ return unsafe.weakCompareAndSetInt(this, f_int_off, x, i);
+ }
+
+ public boolean testObj(Object x, Object o)
+ {
+ return unsafe.weakCompareAndSetReference(this, f_obj_off, x, o);
+ }
+
+ public boolean testLong(long x, long i)
+ {
+ return unsafe.weakCompareAndSetLong(this, f_long_off, x, i);
+ }
+
+ public boolean testByte(byte x, byte i)
+ {
+ return unsafe.weakCompareAndSetByte(this, f_byte_off, x, i);
+ }
+
+ public boolean testShort(short x, short i)
+ {
+ return unsafe.weakCompareAndSetShort(this, f_short_off, x, i);
+ }
+}
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatiles.java Mon Nov 12 11:10:16 2018 +0530
@@ -31,7 +31,10 @@
* TestVolatileStore,
* TestUnsafeVolatileLoad,
* TestUnsafeVolatileStore,
- * TestUnsafeVolatileCAS}
+ * TestUnsafeVolatileCAS,
+ * TestUnsafeVolatileWeakCAS,
+ * TestUnsafeVolatileCAE,
+ * TestUnsafeVolatileGAS}
* and <testtype> in {G1,
* CMS,
* CMSCondMark,
@@ -43,13 +46,16 @@
package compiler.c2.aarch64;
import java.util.List;
+import java.util.ListIterator;
import java.util.Iterator;
+import java.util.regex.Pattern;
import java.io.*;
import jdk.test.lib.Asserts;
import jdk.test.lib.compiler.InMemoryJavaCompiler;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
+import sun.hotspot.WhiteBox;
// runner class that spawns a new JVM to exercises a combination of
// volatile MemOp and GC. The ops are compiled with the dmb -->
@@ -68,28 +74,28 @@
// i.e. GC type plus GC conifg
switch(testType) {
case "G1":
- argcount = 8;
+ argcount = 9;
procArgs = new String[argcount];
procArgs[argcount - 2] = "-XX:+UseG1GC";
break;
case "Parallel":
- argcount = 8;
+ argcount = 9;
procArgs = new String[argcount];
procArgs[argcount - 2] = "-XX:+UseParallelGC";
break;
case "Serial":
- argcount = 8;
+ argcount = 9;
procArgs = new String[argcount];
procArgs[argcount - 2] = "-XX:+UseSerialGC";
break;
case "CMS":
- argcount = 9 ;
+ argcount = 10;
procArgs = new String[argcount];
procArgs[argcount - 3] = "-XX:+UseConcMarkSweepGC";
procArgs[argcount - 2] = "-XX:-UseCondCardMark";
break;
case "CMSCondMark":
- argcount = 9 ;
+ argcount = 10;
procArgs = new String[argcount];
procArgs[argcount - 3] = "-XX:+UseConcMarkSweepGC";
procArgs[argcount - 2] = "-XX:+UseCondCardMark";
@@ -106,14 +112,34 @@
// disable the transform.
procArgs[0] = "-XX:-UseBarriersForVolatile";
+ procArgs[1] = "-XX:+UseCompressedOops";
- procArgs[1] = "-XX:-TieredCompilation";
- procArgs[2] = "-XX:+PrintOptoAssembly";
- procArgs[3] = "-XX:CompileCommand=compileonly," + fullclassname + "::" + "test*";
- procArgs[4] = "--add-exports";
- procArgs[5] = "java.base/jdk.internal.misc=ALL-UNNAMED";
+ procArgs[2] = "-XX:-TieredCompilation";
+ procArgs[3] = "-XX:+PrintOptoAssembly";
+ procArgs[4] = "-XX:CompileCommand=compileonly," + fullclassname + "::" + "test*";
+ procArgs[5] = "--add-exports";
+ procArgs[6] = "java.base/jdk.internal.misc=ALL-UNNAMED";
procArgs[argcount - 1] = fullclassname;
+ runtest(classname, testType, false, true, procArgs);
+ // rerun the test class without the transform applied and
+ // check the alternative generation is as expected
+
+ procArgs[0] = "-XX:+UseBarriersForVolatile";
+ runtest(classname, testType, true, true, procArgs);
+
+ if (!classname.equals("TestUnsafeVolatileGAA")) {
+ procArgs[0] = "-XX:-UseBarriersForVolatile";
+ procArgs[1] = "-XX:-UseCompressedOops";
+ runtest(classname, testType, false, false, procArgs);
+
+ procArgs[0] = "-XX:+UseBarriersForVolatile";
+ runtest(classname, testType, true, false, procArgs);
+ }
+ }
+
+
+ public void runtest(String classname, String testType, boolean useBarriersForVolatile, boolean useCompressedOops, String[] procArgs) throws Throwable {
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
@@ -125,23 +151,7 @@
// appropriate to test class, test type and whether transform
// was applied
- checkoutput(output, classname, testType, false);
-
- // rerun the test class without the transform applied and
- // check the alternative generation is as expected
-
- procArgs[0] = "-XX:+UseBarriersForVolatile";
-
- pb = ProcessTools.createJavaProcessBuilder(procArgs);
- output = new OutputAnalyzer(pb.start());
-
- output.stderrShouldBeEmptyIgnoreVMWarnings();
- output.stdoutShouldNotBeEmpty();
- output.shouldHaveExitValue(0);
-
- // again check the output for the correct asm sequence
-
- checkoutput(output, classname, testType, true);
+ checkoutput(output, classname, testType, useBarriersForVolatile, useCompressedOops);
}
// skip through output returning a line containing the desireed
@@ -150,7 +160,7 @@
{
while (iter.hasNext()) {
String nextLine = iter.next();
- if (nextLine.contains(substring)) {
+ if (nextLine.matches(".*" + substring + ".*")) {
return nextLine;
}
}
@@ -163,7 +173,7 @@
// n.b. the spawned JVM's output is included in the exception
// message to make it easeir to identify what is missing.
- private void checkCompile(Iterator<String> iter, String methodname, String[] expected, OutputAnalyzer output)
+ private boolean checkCompile(Iterator<String> iter, String methodname, String[] expected, OutputAnalyzer output, boolean do_throw)
{
// trace call to allow eyeball check of what we are checking against
System.out.println("checkCompile(" + methodname + ",");
@@ -176,30 +186,43 @@
System.out.println(" })");
// look for the start of an opto assembly print block
- String match = skipTo(iter, "{method}");
+ String match = skipTo(iter, Pattern.quote("{method}"));
if (match == null) {
- throw new RuntimeException("Missing compiler output for " + methodname + "!\n\n" + output.getOutput());
+ if (do_throw) {
+ throw new RuntimeException("Missing compiler output for " + methodname + "!\n\n" + output.getOutput());
+ }
+ return false;
}
// check the compiled method name is right
- match = skipTo(iter, "- name:");
+ match = skipTo(iter, Pattern.quote("- name:"));
if (match == null) {
- throw new RuntimeException("Missing compiled method name!\n\n" + output.getOutput());
+ if (do_throw) {
+ throw new RuntimeException("Missing compiled method name!\n\n" + output.getOutput());
+ }
+ return false;
}
if (!match.contains(methodname)) {
- throw new RuntimeException("Wrong method " + match + "!\n -- expecting " + methodname + "\n\n" + output.getOutput());
+ if (do_throw) {
+ throw new RuntimeException("Wrong method " + match + "!\n -- expecting " + methodname + "\n\n" + output.getOutput());
+ }
+ return false;
}
// make sure we can match each expected term in order
for (String s : expected) {
match = skipTo(iter, s);
if (match == null) {
- throw new RuntimeException("Missing expected output " + s + "!\n\n" + output.getOutput());
+ if (do_throw) {
+ throw new RuntimeException("Missing expected output " + s + "!\n\n" + output.getOutput());
+ }
+ return false;
}
}
+ return true;
}
// check for expected asm output from a volatile load
- private void checkload(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable
+ private void checkload(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
{
Iterator<String> iter = output.asLines().listIterator();
@@ -211,7 +234,7 @@
if (!useBarriersForVolatile) {
matches = new String[] {
"ldarw",
- "membar_acquire (elided)",
+ "membar_acquire \\(elided\\)",
"ret"
};
} else {
@@ -223,15 +246,30 @@
};
}
- checkCompile(iter, "testInt", matches, output);
+ checkCompile(iter, "testInt", matches, output, true);
- checkCompile(iter, "testObj", matches, output) ;
+ if (!useBarriersForVolatile) {
+ matches = new String[] {
+ useCompressedOops ? "ldarw?" : "ldar",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ } else {
+ matches = new String[] {
+ useCompressedOops ? "ldrw?" : "ldr",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ }
+
+ checkCompile(iter, "testObj", matches, output, true);
}
// check for expected asm output from a volatile store
- private void checkstore(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable
+ private void checkstore(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
{
Iterator<String> iter = output.asLines().listIterator();
@@ -241,9 +279,9 @@
if (!useBarriersForVolatile) {
// this is the sequence of instructions for all cases
matches = new String[] {
- "membar_release (elided)",
+ "membar_release \\(elided\\)",
"stlrw",
- "membar_volatile (elided)",
+ "membar_volatile \\(elided\\)",
"ret"
};
} else {
@@ -258,7 +296,7 @@
};
}
- checkCompile(iter, "testInt", matches, output);
+ checkCompile(iter, "testInt", matches, output, true);
// object stores will be as above except for when the GC
// introduces barriers for card marking
@@ -268,9 +306,9 @@
default:
// this is the basic sequence of instructions
matches = new String[] {
- "membar_release (elided)",
- "stlrw",
- "membar_volatile (elided)",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "stlrw?" : "stlr",
+ "membar_volatile \\(elided\\)",
"ret"
};
break;
@@ -278,12 +316,12 @@
// a card mark volatile barrier should be generated
// before the card mark strb
matches = new String[] {
- "membar_release (elided)",
- "stlrw",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "stlrw?" : "stlr",
"membar_volatile",
"dmb ish",
"strb",
- "membar_volatile (elided)",
+ "membar_volatile \\(elided\\)",
"ret"
};
break;
@@ -292,13 +330,13 @@
// before the card mark strb from the StoreCM and the
// storestore barrier from the StoreCM should be elided
matches = new String[] {
- "membar_release (elided)",
- "stlrw",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "stlrw?" : "stlr",
"membar_volatile",
"dmb ish",
- "storestore (elided)",
+ "storestore \\(elided\\)",
"strb",
- "membar_volatile (elided)",
+ "membar_volatile \\(elided\\)",
"ret"
};
break;
@@ -308,12 +346,12 @@
// storestore barrier from the StoreCM should be
// generated as "dmb ishst"
matches = new String[] {
- "membar_release (elided)",
- "stlrw",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "stlrw?" : "stlr",
"storestore",
"dmb ishst",
"strb",
- "membar_volatile (elided)",
+ "membar_volatile \\(elided\\)",
"ret"
};
break;
@@ -325,7 +363,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "strw",
+ useCompressedOops ? "strw?" : "str",
"membar_volatile",
"dmb ish",
"ret"
@@ -337,7 +375,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "strw",
+ useCompressedOops ? "strw?" : "str",
"membar_volatile",
"dmb ish",
"strb",
@@ -353,10 +391,10 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "strw",
+ useCompressedOops ? "strw?" : "str",
"membar_volatile",
"dmb ish",
- "storestore (elided)",
+ "storestore \\(elided\\)",
"strb",
"membar_volatile",
"dmb ish",
@@ -371,7 +409,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "strw",
+ useCompressedOops ? "strw?" : "str",
"storestore",
"dmb ishst",
"strb",
@@ -383,40 +421,48 @@
}
}
- checkCompile(iter, "testObj", matches, output);
+ checkCompile(iter, "testObj", matches, output, true);
}
// check for expected asm output from a volatile cas
- private void checkcas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable
+ private void checkcas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
{
Iterator<String> iter = output.asLines().listIterator();
String[] matches;
+ String[][] tests = {
+ { "testInt", "cmpxchgw" },
+ { "testLong", "cmpxchg" },
+ { "testByte", "cmpxchgb" },
+ { "testShort", "cmpxchgs" },
+ };
- // non object stores are straightforward
- if (!useBarriersForVolatile) {
- // this is the sequence of instructions for all cases
- matches = new String[] {
- "membar_release (elided)",
- "cmpxchgw_acq",
- "membar_acquire (elided)",
- "ret"
- };
- } else {
- // this is the alternative sequence of instructions
- matches = new String[] {
- "membar_release",
- "dmb ish",
- "cmpxchgw",
- "membar_acquire",
- "dmb ish",
- "ret"
- };
+ for (String[] test : tests) {
+ // non object stores are straightforward
+ if (!useBarriersForVolatile) {
+ // this is the sequence of instructions for all cases
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ test[1] + "_acq",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ } else {
+ // this is the alternative sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ test[1] + " ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ }
+
+ checkCompile(iter, test[0], matches, output, true);
}
- checkCompile(iter, "testInt", matches, output);
-
// object stores will be as above except for when the GC
// introduces barriers for card marking
@@ -425,10 +471,10 @@
default:
// this is the basic sequence of instructions
matches = new String[] {
- "membar_release (elided)",
- "cmpxchgw_acq",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
"strb",
- "membar_acquire (elided)",
+ "membar_acquire \\(elided\\)",
"ret"
};
break;
@@ -436,12 +482,12 @@
// a card mark volatile barrier should be generated
// before the card mark strb
matches = new String[] {
- "membar_release (elided)",
- "cmpxchgw_acq",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
"membar_volatile",
"dmb ish",
"strb",
- "membar_acquire (elided)",
+ "membar_acquire \\(elided\\)",
"ret"
};
break;
@@ -450,13 +496,13 @@
// before the card mark strb from the StoreCM and the
// storestore barrier from the StoreCM should be elided
matches = new String[] {
- "membar_release (elided)",
- "cmpxchgw_acq",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
"membar_volatile",
"dmb ish",
- "storestore (elided)",
+ "storestore \\(elided\\)",
"strb",
- "membar_acquire (elided)",
+ "membar_acquire \\(elided\\)",
"ret"
};
break;
@@ -465,12 +511,12 @@
// before the card mark strb from the StoreCM and the
// storestore barrier from the StoreCM should be elided
matches = new String[] {
- "membar_release (elided)",
- "cmpxchgw_acq",
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
"storestore",
"dmb ishst",
"strb",
- "membar_acquire (elided)",
+ "membar_acquire \\(elided\\)",
"ret"
};
break;
@@ -482,7 +528,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "cmpxchgw",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
"membar_acquire",
"dmb ish",
"ret"
@@ -494,7 +540,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "cmpxchgw",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
"membar_volatile",
"dmb ish",
"strb",
@@ -510,10 +556,191 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "cmpxchgw",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
"membar_volatile",
"dmb ish",
- "storestore (elided)",
+ "storestore \\(elided\\)",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "CMS":
+ // a volatile card mark membar should not be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be generated
+ // as "dmb ishst"
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
+ "storestore",
+ "dmb ishst",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ }
+ }
+
+ checkCompile(iter, "testObj", matches, output, true);
+ }
+
+ private void checkcae(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
+ {
+ ListIterator<String> iter = output.asLines().listIterator();
+
+ String[] matches;
+ String[][] tests = {
+ { "testInt", "cmpxchgw" },
+ { "testLong", "cmpxchg" },
+ { "testByte", "cmpxchgb" },
+ { "testShort", "cmpxchgs" },
+ };
+
+ for (String[] test : tests) {
+ // non object stores are straightforward
+ if (!useBarriersForVolatile) {
+ // this is the sequence of instructions for all cases
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ test[1] + "_acq",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ } else {
+ // this is the alternative sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ test[1] + " ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ }
+
+ checkCompile(iter, test[0], matches, output, true);
+ }
+
+ // object stores will be as above except for when the GC
+ // introduces barriers for card marking
+
+ if (!useBarriersForVolatile) {
+ switch (testType) {
+ default:
+ // this is the basic sequence of instructions
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ "strb",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+
+ // card marking store may be scheduled before or after
+ // the cmpxchg so try both sequences.
+ int idx = iter.nextIndex();
+ if (!checkCompile(iter, "testObj", matches, output, false)) {
+ iter = output.asLines().listIterator(idx);
+
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+
+ checkCompile(iter, "testObj", matches, output, true);
+ }
+ return;
+
+ case "G1":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
+ "membar_volatile",
+ "dmb ish",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ case "CMSCondMark":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
+ "membar_volatile",
+ "dmb ish",
+ "storestore \\(elided\\)",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ case "CMS":
+ // a volatile card mark membar should not be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "cmpxchgw?_acq" : "cmpxchg_acq",
+ "storestore",
+ "dmb ishst",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ }
+ } else {
+ switch (testType) {
+ default:
+ // this is the basic sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "G1":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
+ "membar_volatile",
+ "dmb ish",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "CMSCondMark":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
+ "membar_volatile",
+ "dmb ish",
+ "storestore \\(elided\\)",
"strb",
"membar_acquire",
"dmb ish",
@@ -528,7 +755,7 @@
matches = new String[] {
"membar_release",
"dmb ish",
- "cmpxchgw",
+ useCompressedOops ? "cmpxchgw? " : "cmpxchg ",
"storestore",
"dmb ishst",
"strb",
@@ -540,12 +767,210 @@
}
}
- checkCompile(iter, "testObj", matches, output);
+ checkCompile(iter, "testObj", matches, output, true);
+ }
+
+ private void checkgas(OutputAnalyzer output, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
+ {
+ Iterator<String> iter = output.asLines().listIterator();
+
+ String[] matches;
+ String[][] tests = {
+ { "testInt", "atomic_xchgw" },
+ { "testLong", "atomic_xchg" },
+ };
+
+ for (String[] test : tests) {
+ // non object stores are straightforward
+ if (!useBarriersForVolatile) {
+ // this is the sequence of instructions for all cases
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ test[1] + "_acq",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ } else {
+ // this is the alternative sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ test[1] + " ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ }
+
+ checkCompile(iter, test[0], matches, output, true);
+ }
+
+ // object stores will be as above except for when the GC
+ // introduces barriers for card marking
+
+ if (!useBarriersForVolatile) {
+ switch (testType) {
+ default:
+ // this is the basic sequence of instructions
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ case "G1":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq",
+ "membar_volatile",
+ "dmb ish",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ case "CMSCondMark":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq",
+ "membar_volatile",
+ "dmb ish",
+ "storestore \\(elided\\)",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ case "CMS":
+ // a volatile card mark membar should not be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ useCompressedOops ? "atomic_xchgw?_acq" : "atomic_xchg_acq",
+ "storestore",
+ "dmb ishst",
+ "strb",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ break;
+ }
+ } else {
+ switch (testType) {
+ default:
+ // this is the basic sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "G1":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ",
+ "membar_volatile",
+ "dmb ish",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "CMSCondMark":
+ // a card mark volatile barrier should be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be elided
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ",
+ "membar_volatile",
+ "dmb ish",
+ "storestore \\(elided\\)",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ case "CMS":
+ // a volatile card mark membar should not be generated
+ // before the card mark strb from the StoreCM and the
+ // storestore barrier from the StoreCM should be generated
+ // as "dmb ishst"
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ useCompressedOops ? "atomic_xchgw? " : "atomic_xchg ",
+ "storestore",
+ "dmb ishst",
+ "strb",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ break;
+ }
+ }
+
+ checkCompile(iter, "testObj", matches, output, true);
+ }
+
+ private void checkgaa(OutputAnalyzer output, String testType, boolean useBarriersForVolatile) throws Throwable
+ {
+ Iterator<String> iter = output.asLines().listIterator();
+
+ String[] matches;
+ String[][] tests = {
+ { "testInt", "get_and_addI" },
+ { "testLong", "get_and_addL" },
+ };
+
+ for (String[] test : tests) {
+ // non object stores are straightforward
+ if (!useBarriersForVolatile) {
+ // this is the sequence of instructions for all cases
+ matches = new String[] {
+ "membar_release \\(elided\\)",
+ test[1] + "_acq",
+ "membar_acquire \\(elided\\)",
+ "ret"
+ };
+ } else {
+ // this is the alternative sequence of instructions
+ matches = new String[] {
+ "membar_release",
+ "dmb ish",
+ test[1] + " ",
+ "membar_acquire",
+ "dmb ish",
+ "ret"
+ };
+ }
+
+ checkCompile(iter, test[0], matches, output, true);
+ }
+
}
// perform a check appropriate to the classname
- private void checkoutput(OutputAnalyzer output, String classname, String testType, boolean useBarriersForVolatile) throws Throwable
+ private void checkoutput(OutputAnalyzer output, String classname, String testType, boolean useBarriersForVolatile, boolean useCompressedOops) throws Throwable
{
// trace call to allow eyeball check of what is being checked
System.out.println("checkoutput(" +
@@ -556,19 +981,29 @@
switch (classname) {
case "TestVolatileLoad":
- checkload(output, testType, useBarriersForVolatile);
+ checkload(output, testType, useBarriersForVolatile, useCompressedOops);
break;
case "TestVolatileStore":
- checkstore(output, testType, useBarriersForVolatile);
+ checkstore(output, testType, useBarriersForVolatile, useCompressedOops);
break;
case "TestUnsafeVolatileLoad":
- checkload(output, testType, useBarriersForVolatile);
+ checkload(output, testType, useBarriersForVolatile, useCompressedOops);
break;
case "TestUnsafeVolatileStore":
- checkstore(output, testType, useBarriersForVolatile);
+ checkstore(output, testType, useBarriersForVolatile, useCompressedOops);
break;
case "TestUnsafeVolatileCAS":
- checkcas(output, testType, useBarriersForVolatile);
+ case "TestUnsafeVolatileWeakCAS":
+ checkcas(output, testType, useBarriersForVolatile, useCompressedOops);
+ break;
+ case "TestUnsafeVolatileCAE":
+ checkcae(output, testType, useBarriersForVolatile, useCompressedOops);
+ break;
+ case "TestUnsafeVolatileGAS":
+ checkgas(output, testType, useBarriersForVolatile, useCompressedOops);
+ break;
+ case "TestUnsafeVolatileGAA":
+ checkgaa(output, testType, useBarriersForVolatile);
break;
}
}
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMS.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMS.java Mon Nov 12 11:10:16 2018 +0530
@@ -38,6 +38,9 @@
* compiler.c2.aarch64.TestVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileCAE
+ * compiler.c2.aarch64.TestUnsafeVolatileGAS
*
* @run driver compiler.c2.aarch64.TestVolatilesCMS
* TestVolatileLoad CMS
@@ -53,6 +56,15 @@
*
* @run driver compiler.c2.aarch64.TestVolatilesCMS
* TestUnsafeVolatileCAS CMS
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMS
+ * TestUnsafeVolatileWeakCAS CMS
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMS
+ * TestUnsafeVolatileCAE CMS
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMS
+ * TestUnsafeVolatileGAS CMS
*/
package compiler.c2.aarch64;
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMSCondMark.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesCMSCondMark.java Mon Nov 12 11:10:16 2018 +0530
@@ -38,6 +38,9 @@
* compiler.c2.aarch64.TestVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileCAE
+ * compiler.c2.aarch64.TestUnsafeVolatileGAS
*
* @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark
* TestVolatileLoad CMSCondMark
@@ -53,6 +56,15 @@
*
* @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark
* TestUnsafeVolatileCAS CMSCondMark
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark
+ * TestUnsafeVolatileWeakCAS CMSCondMark
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark
+ * TestUnsafeVolatileCAE CMSCondMark
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesCMSCondMark
+ * TestUnsafeVolatileGAS CMSCondMark
*/
package compiler.c2.aarch64;
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesG1.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesG1.java Mon Nov 12 11:10:16 2018 +0530
@@ -38,6 +38,10 @@
* compiler.c2.aarch64.TestVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileCAE
+ * compiler.c2.aarch64.TestUnsafeVolatileGAS
+ * compiler.c2.aarch64.TestUnsafeVolatileGAA
*
* @run driver compiler.c2.aarch64.TestVolatilesG1
* TestVolatileLoad G1
@@ -53,8 +57,21 @@
*
* @run driver compiler.c2.aarch64.TestVolatilesG1
* TestUnsafeVolatileCAS G1
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesG1
+ * TestUnsafeVolatileWeakCAS G1
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesG1
+ * TestUnsafeVolatileCAE G1
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesG1
+ * TestUnsafeVolatileGAS G1
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesG1
+ * TestUnsafeVolatileGAA G1
*/
+
package compiler.c2.aarch64;
public class TestVolatilesG1 {
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesParallel.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesParallel.java Mon Nov 12 11:10:16 2018 +0530
@@ -38,6 +38,9 @@
* compiler.c2.aarch64.TestVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileCAE
+ * compiler.c2.aarch64.TestUnsafeVolatileGAS
*
* @run driver compiler.c2.aarch64.TestVolatilesParallel
* TestVolatileLoad Parallel
@@ -53,6 +56,15 @@
*
* @run driver compiler.c2.aarch64.TestVolatilesParallel
* TestUnsafeVolatileCAS Parallel
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesParallel
+ * TestUnsafeVolatileWeakCAS Parallel
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesParallel
+ * TestUnsafeVolatileCAE Parallel
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesParallel
+ * TestUnsafeVolatileGAS Parallel
*/
package compiler.c2.aarch64;
--- a/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesSerial.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/c2/aarch64/TestVolatilesSerial.java Mon Nov 12 11:10:16 2018 +0530
@@ -38,6 +38,9 @@
* compiler.c2.aarch64.TestVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileStore
* compiler.c2.aarch64.TestUnsafeVolatileCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileWeakCAS
+ * compiler.c2.aarch64.TestUnsafeVolatileCAE
+ * compiler.c2.aarch64.TestUnsafeVolatileGAS
*
* @run driver compiler.c2.aarch64.TestVolatilesSerial
* TestVolatileLoad Serial
@@ -53,6 +56,15 @@
*
* @run driver compiler.c2.aarch64.TestVolatilesSerial
* TestUnsafeVolatileCAS Serial
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesSerial
+ * TestUnsafeVolatileWeakCAS Serial
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesSerial
+ * TestUnsafeVolatileCAE Serial
+ *
+ * @run driver compiler.c2.aarch64.TestVolatilesSerial
+ * TestUnsafeVolatileGAS Serial
*/
package compiler.c2.aarch64;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/gcbarriers/EqvUncastStepOverBarrier.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8212673
+ * @summary Node::eqv_uncast() shouldn't step over load barriers unconditionally
+ * @library /test/lib /
+ * @modules java.base/jdk.internal.misc
+ *
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ * sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseOnStackReplacement -XX:-TieredCompilation -XX:-BackgroundCompilation EqvUncastStepOverBarrier
+ */
+
+import sun.hotspot.WhiteBox;
+import java.lang.reflect.Method;
+
+public class EqvUncastStepOverBarrier {
+ static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();
+
+ private static Object field = new A();
+
+ public static void main(String[] args) throws Exception {
+ for (int i = 0; i < 20_000; i++) {
+ test();
+ test();
+ test_helper(null, 0);
+ }
+ Method m = EqvUncastStepOverBarrier.class.getDeclaredMethod("test");
+ WHITE_BOX.enqueueMethodForCompilation(m, 4);
+ if (!WHITE_BOX.isMethodCompiled(m, false)) {
+ throw new RuntimeException("Method compilation failed");
+ }
+ }
+
+ private static Object test() {
+ Object o = field;
+ if (o == null) {}
+ for (int i = 1; i < 100; i *= 2) {
+ int j = 0;
+ for (; j < 4; j++) ;
+ o = test_helper(o, j);
+ }
+ return o;
+ }
+
+ private static Object test_helper(Object o, int j) {
+ if (j == 4) {
+ A a = (A) o;
+ o = a;
+ } else {
+ o = new Object();
+ }
+ return o;
+ }
+
+ private static class A {
+ }
+}
--- a/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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
@@ -115,16 +115,15 @@
mainAttrs.putValue("Can-Redefine-Classes", "true");
mainAttrs.putValue("Can-Retransform-Classes", "true");
- Path jar = Files.createTempFile("myagent", ".jar");
- try {
- JarOutputStream jarStream = new JarOutputStream(new FileOutputStream(jar.toFile()), manifest);
- add(jarStream, FooAgent.class);
- add(jarStream, FooTransformer.class);
- jarStream.close();
- runAgent(jar);
- } finally {
- Files.deleteIfExists(jar);
- }
+ // The jar file will be added to the system classloader search path. It is not safe
+ // to delete it while the JVM is running, so make sure to create it in the test
+ // directory so it will be cleaned up by the test harness.
+ Path jar = Files.createTempFile(Path.of(""), "myagent", ".jar");
+ JarOutputStream jarStream = new JarOutputStream(new FileOutputStream(jar.toFile()), manifest);
+ add(jarStream, FooAgent.class);
+ add(jarStream, FooTransformer.class);
+ jarStream.close();
+ runAgent(jar);
}
public static void runAgent(Path agent) throws Exception {
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ConstantPoolTestsHelper.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -28,7 +28,7 @@
import compiler.jvmci.common.testcases.MultipleImplementersInterface;
import compiler.jvmci.compilerToVM.ConstantPoolTestCase.ConstantTypes;
import compiler.jvmci.compilerToVM.ConstantPoolTestCase.TestedCPEntry;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.org.objectweb.asm.Opcodes;
import jdk.internal.reflect.ConstantPool;
import jdk.internal.reflect.ConstantPool.Tag;
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -28,7 +28,7 @@
* @summary Testing compiler.jvmci.CompilerToVM.lookupKlassInPool method
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupTypeTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/LookupTypeTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library / /test/lib
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot
* @build jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
* @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* jdk.internal.vm.ci/jdk.vm.ci.hotspot
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,8 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -27,7 +27,7 @@
* @requires vm.jvmci
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.org.objectweb.asm.tree
--- a/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -28,7 +28,7 @@
* @summary Testing compiler.jvmci.CompilerToVM.resolveTypeInPool method
* @library /test/lib /
* @library ../common/patches
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* java.base/jdk.internal.org.objectweb.asm
* jdk.internal.vm.ci/jdk.vm.ci.hotspot
--- a/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java Mon Nov 12 11:10:16 2018 +0530
@@ -33,10 +33,15 @@
package jdk.vm.ci.runtime.test;
-import jdk.vm.ci.meta.ResolvedJavaField;
-import jdk.vm.ci.meta.ResolvedJavaMethod;
-import org.junit.Test;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -45,10 +50,13 @@
import java.util.Map;
import java.util.Set;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import org.junit.Assert;
+import org.junit.Test;
+
+import jdk.vm.ci.meta.ResolvedJavaField;
+import jdk.vm.ci.meta.ResolvedJavaMethod;
+import jdk.vm.ci.meta.ResolvedJavaType;
+import jdk.vm.ci.runtime.test.TestResolvedJavaField.TestClassLoader;
/**
* Tests for {@link ResolvedJavaField}.
@@ -134,4 +142,89 @@
}
}
}
+ static class TestClassLoader extends ClassLoader {
+
+ @Override
+ protected Class<?> findClass(final String name) {
+ if (!name.equals(TypeWithUnresolvedFieldType.class.getName())) {
+ try {
+ return super.findClass(name);
+ } catch (ClassNotFoundException e) {
+ throw new AssertionError("unexpected: " + e);
+ }
+ }
+ // copy classfile to byte array
+ byte[] classData = null;
+ try {
+ String simpleName = TypeWithUnresolvedFieldType.class.getSimpleName();
+ InputStream is = TypeWithUnresolvedFieldType.class.getResourceAsStream(simpleName + ".class");
+ assert is != null;
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ byte[] buf = new byte[1024];
+ int size;
+ while ((size = is.read(buf, 0, buf.length)) != -1) {
+ baos.write(buf, 0, size);
+ }
+ baos.flush();
+ classData = baos.toByteArray();
+ } catch (IOException e) {
+ Assert.fail("can't access class: " + name);
+ }
+
+ // replace all occurrences of "PrintStream" in classfile
+ int index = -1;
+
+ while ((index = indexOf(classData, index + 1, "PrintStream")) != -1) {
+ replace(classData, index, "XXXXXXXXXXX");
+ }
+
+ Class<?> c = defineClass(null, classData, 0, classData.length);
+ return c;
+ }
+
+ private static int indexOf(byte[] b, int index, String find) {
+ for (int i = index; i < b.length; i++) {
+ boolean match = true;
+ for (int j = i; j < i + find.length(); j++) {
+ if (b[j] != (byte) find.charAt(j - i)) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ private static void replace(byte[] b, int index, String replace) {
+ for (int i = index; i < index + replace.length(); i++) {
+ b[i] = (byte) replace.charAt(i - index);
+ }
+ }
+ }
+
+ /**
+ * Tests that calling {@link ResolvedJavaField#getType()} does not cause a linkage error if the
+ * type of the field is not resolvable.
+ */
+ @Test
+ public void testGetType() {
+ Class<?> c = new TestClassLoader().findClass(TypeWithUnresolvedFieldType.class.getName());
+ ResolvedJavaType type = metaAccess.lookupJavaType(c);
+ for (ResolvedJavaField field : type.getInstanceFields(false)) {
+ assertTrue(field.getName().equals("fieldWithUnresolvableType"));
+ field.getType();
+ field.toString();
+ }
+ }
}
+
+class TypeWithUnresolvedFieldType {
+ /**
+ * {@link TestClassLoader} will rewrite the type of this field to "Ljava/io/XXXXXXXXXXX;".
+ */
+ PrintStream fieldWithUnresolvableType;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/unsafe/CASandCAEwithNegExpected.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8211320
+ * @summary Aarch64: unsafe.compareAndSetByte() and unsafe.compareAndSetShort() c2 intrinsics broken with negative expected value
+ *
+ * @modules java.base/jdk.internal.misc
+ * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation CASandCAEwithNegExpected
+ */
+
+import java.lang.reflect.Field;
+import jdk.internal.misc.Unsafe;
+
+public class CASandCAEwithNegExpected {
+ public volatile int f_int = -1;
+ public volatile long f_long = -1;
+ public volatile byte f_byte = -1;
+ public volatile short f_short = -1;
+
+ public static Unsafe unsafe = Unsafe.getUnsafe();
+ public static Field f_int_field;
+ public static Field f_long_field;
+ public static Field f_byte_field;
+ public static Field f_short_field;
+ public static long f_int_off;
+ public static long f_long_off;
+ public static long f_byte_off;
+ public static long f_short_off;
+
+ static {
+ try {
+ f_int_field = CASandCAEwithNegExpected.class.getField("f_int");
+ f_long_field = CASandCAEwithNegExpected.class.getField("f_long");
+ f_byte_field = CASandCAEwithNegExpected.class.getField("f_byte");
+ f_short_field = CASandCAEwithNegExpected.class.getField("f_short");
+ f_int_off = unsafe.objectFieldOffset(f_int_field);
+ f_long_off = unsafe.objectFieldOffset(f_long_field);
+ f_byte_off = unsafe.objectFieldOffset(f_byte_field);
+ f_short_off = unsafe.objectFieldOffset(f_short_field);
+ } catch (Exception e) {
+ System.out.println("reflection failed " + e);
+ e.printStackTrace();
+ }
+ }
+
+ static public void main(String[] args) {
+ CASandCAEwithNegExpected t = new CASandCAEwithNegExpected();
+ for (int i = 0; i < 20_000; i++) {
+ t.test();
+ }
+ }
+
+ // check proper handling of sign extension of expected value in comparison
+ void test() {
+ f_int = -1;
+ f_long = -1;
+ f_byte = -1;
+ f_short = -1;
+
+ unsafe.compareAndSetInt(this, f_int_off, -1, 42);
+ if (f_int != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+ unsafe.compareAndSetLong(this, f_long_off, -1, 42);
+ if (f_long != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+ unsafe.compareAndSetByte(this, f_byte_off, (byte)-1, (byte)42);
+ if (f_byte != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+ unsafe.compareAndSetShort(this, f_short_off, (short)-1, (short)42);
+ if (f_short != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+
+ f_int = -1;
+ f_long = -1;
+ f_byte = -1;
+ f_short = -1;
+
+ unsafe.compareAndExchangeInt(this, f_int_off, -1, 42);
+ if (f_int != 42) {
+ throw new RuntimeException("CAE failed");
+ }
+ unsafe.compareAndExchangeLong(this, f_long_off, -1, 42);
+ if (f_long != 42) {
+ throw new RuntimeException("CAE failed");
+ }
+ unsafe.compareAndExchangeByte(this, f_byte_off, (byte)-1, (byte)42);
+ if (f_byte != 42) {
+ throw new RuntimeException("CAE failed");
+ }
+ unsafe.compareAndExchangeShort(this, f_short_off, (short)-1, (short)42);
+ if (f_short != 42) {
+ throw new RuntimeException("CAE failed");
+ }
+
+ f_int = -1;
+ f_long = -1;
+ f_byte = -1;
+ f_short = -1;
+
+ if (unsafe.weakCompareAndSetInt(this, f_int_off, -1, 42) && f_int != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+
+ if (unsafe.weakCompareAndSetLong(this, f_long_off, -1, 42) && f_long != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+
+ if (unsafe.weakCompareAndSetByte(this, f_byte_off, (byte)-1, (byte)42) && f_byte != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+
+ if (unsafe.weakCompareAndSetShort(this, f_short_off, (short)-1, (short)42) && f_short != 42) {
+ throw new RuntimeException("CAS failed");
+ }
+ }
+
+}
--- a/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/gc/TestAllocateHeapAtMultiple.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -27,6 +27,7 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* @requires vm.bits == "64" & vm.gc != "Z" & os.family != "aix"
+ * @run main/timeout=360 TestAllocateHeapAtMultiple
*/
import jdk.test.lib.JDKToolFinder;
--- a/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/CommandLine/VMDeprecatedOptions.java Mon Nov 12 11:10:16 2018 +0530
@@ -44,7 +44,6 @@
{"MaxRAMFraction", "8"},
{"MinRAMFraction", "2"},
{"InitialRAMFraction", "64"},
- {"UseMembar", "true"},
{"TLABStats", "false"},
// deprecated alias flags (see also aliased_jvm_flags):
@@ -103,6 +102,5 @@
public static void main(String[] args) throws Throwable {
testDeprecated(DEPRECATED_OPTIONS); // Make sure that each deprecated option is mentioned in the output.
- testDeprecatedDiagnostic("IgnoreUnverifiableClassesDuringDump", "false");
}
}
--- a/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java Mon Nov 12 11:10:16 2018 +0530
@@ -53,8 +53,8 @@
output = new OutputAnalyzer(pb.start());
output.shouldContain("Error: VM option 'VerifyStack' is develop and is available only in debug version of VM.");
- pb = ProcessTools.createJavaProcessBuilder("-XX:+ExecuteInternalVMTests", "-version");
+ pb = ProcessTools.createJavaProcessBuilder("-XX:+CheckCompressedOops", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Error: VM option 'ExecuteInternalVMTests' is notproduct and is available only in debug version of VM.");
+ output.shouldContain("Error: VM option 'CheckCompressedOops' is notproduct and is available only in debug version of VM.");
}
}
--- a/test/hotspot/jtreg/runtime/JVMDoPrivileged/DoPrivRunAbstract.jasm Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/JVMDoPrivileged/DoPrivRunAbstract.jasm Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @summary Test that JVM_DoPrivilege throws java.lang.InternalError for an
+ * @summary Test that AccessController.doPrivileged throws java.lang.AbstractMethodError for an
* abstract run() method.
* @bug 8183962
* @compile DoPrivRunAbstract.jasm
@@ -56,8 +56,8 @@
// public static void main(String[] args) throws Exception {
// try {
// doPrivileged(() -> System.out.println(System.getProperty("java.home")));
-// throw new RuntimeException("Expected InternalError not throw");
-// } catch (java.lang.InternalError e) { }
+// throw new RuntimeException("Expected AbstractMethodError not throw");
+// } catch (java.lang.AbstractMethodError e) { }
// }
//}
@@ -82,13 +82,13 @@
invokestatic Method doPrivileged:"(LDoPrivRunAbstract$VoidPrivActRunAbstract;)V";
new class java/lang/RuntimeException;
dup;
- ldc String "Expected InternalError not throw";
+ ldc String "Expected AbstractMethodError not throw";
invokespecial Method java/lang/RuntimeException."<init>":"(Ljava/lang/String;)V";
athrow;
endtry t0;
- catch t0 java/lang/InternalError;
+ catch t0 java/lang/AbstractMethodError;
stack_frame_type stack1;
- stack_map class java/lang/InternalError;
+ stack_map class java/lang/AbstractMethodError;
astore_1;
return;
}
--- a/test/hotspot/jtreg/runtime/JVMDoPrivileged/DoPrivileged.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/JVMDoPrivileged/DoPrivileged.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @summary Test that JVM_DoPrivilege() searches default methods when looking
+ * @summary Test that AccessController.doPrivileged() searches default methods when looking
* for the run() method.
* @bug 8183962
* @run main DoPrivileged
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/LoaderConstraints/duplicateParentLE/ParentClassLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.io.*;
+
+// Delegating class loader which never defines a class.
+public class ParentClassLoader extends ClassLoader {
+ public ParentClassLoader() { super(); }
+ public ParentClassLoader(String name, ClassLoader l) { super(name, l); }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/LoaderConstraints/duplicateParentLE/PreemptingChildClassLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+import java.io.*;
+
+public class PreemptingChildClassLoader extends ParentClassLoader {
+
+ private static ClassLoader p = new ParentClassLoader();
+ private final Set<String> names = new HashSet<>();
+ boolean checkLoaded = true;
+
+ public PreemptingChildClassLoader(String... names) {
+ for (String n : names) this.names.add(n);
+ }
+
+ public PreemptingChildClassLoader(String name, String[] names) {
+ super(name, p);
+ for (String n : names) this.names.add(n);
+ }
+
+ public PreemptingChildClassLoader(String name, String[] names, boolean cL) {
+ super(name, p);
+ for (String n : names) this.names.add(n);
+ checkLoaded = cL;
+ }
+
+ protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
+ if (!names.contains(name)) return super.loadClass(name, resolve);
+ Class<?> result = checkLoaded ? findLoadedClass(name) : null;
+ if (result == null) {
+ String filename = name.replace('.', '/') + ".class";
+ try (InputStream data = getResourceAsStream(filename)) {
+ if (data == null) throw new ClassNotFoundException();
+ try (ByteArrayOutputStream buffer = new ByteArrayOutputStream()) {
+ int b;
+ do {
+ b = data.read();
+ if (b >= 0) buffer.write(b);
+ } while (b >= 0);
+ byte[] bytes = buffer.toByteArray();
+ result = defineClass(name, bytes, 0, bytes.length);
+ }
+ } catch (IOException e) {
+ throw new ClassNotFoundException("Error reading class file", e);
+ }
+ }
+ if (resolve) resolveClass(result);
+ return result;
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/LoaderConstraints/duplicateParentLE/Test.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8199852
+ * @summary Test exception messages of LinkageError with a parent class loader
+ * that is not known to the VM. A class loader loads
+ * twice the same class. Should trigger exception in
+ * SystemDictionary::check_constraints().
+ * @compile ../common/Foo.java
+ * @compile ../common/J.java
+ * @compile ParentClassLoader.java
+ * PreemptingChildClassLoader.java
+ * @run main/othervm Test
+ */
+
+public class Test {
+
+ // Check that all names have external formatting ('.' and not '/' in package names).
+ // Check for parent of class loader.
+ // Break expectedErrorMessage into 2 parts due to the class loader name containing
+ // the unique @<id> identity hash which cannot be compared against.
+
+ // Check that all names have external formatting ('.' and not '/' in package names).
+ // Check for name and parent of class loader. Type should be mentioned as 'class'.
+ static String expectedErrorMessage_part1 = "loader 'DuplicateParentLE_Test_Loader' @";
+ static String expectedErrorMessage_part2 = " attempted duplicate class definition for test.Foo. (test.Foo is in unnamed module of loader 'DuplicateParentLE_Test_Loader' @";
+ static String expectedErrorMessage_part3 = ", parent loader ParentClassLoader @";
+
+
+ // Test that the error message is correct when a loader constraint error is
+ // detected during vtable creation.
+ //
+ // In this test, during vtable creation for class Task, method "Task.m()LFoo;"
+ // overrides "J.m()LFoo;". But, Task's class Foo and super type J's class Foo
+ // are different. So, a LinkageError exception should be thrown because the
+ // loader constraint check will fail.
+ public static void test(String loaderName,
+ String testType) throws Exception {
+ String[] classNames = {testType};
+ ClassLoader l = new PreemptingChildClassLoader(loaderName, classNames, false);
+ l.loadClass(testType);
+ try {
+ l.loadClass(testType).newInstance();
+ throw new RuntimeException("Expected LinkageError exception not thrown");
+ } catch (LinkageError e) {
+ String errorMsg = e.getMessage();
+ if (!errorMsg.contains(expectedErrorMessage_part1) ||
+ !errorMsg.contains(expectedErrorMessage_part2) ||
+ !errorMsg.contains(expectedErrorMessage_part3)) {
+ System.out.println("Expected: " + expectedErrorMessage_part1 + "<id>" + expectedErrorMessage_part2 + "\n" +
+ "but got: " + errorMsg);
+ throw new RuntimeException("Wrong LinkageError exception thrown: " + errorMsg);
+ }
+ System.out.println("Passed with message: " + errorMsg);
+ }
+ }
+
+ public static void main(String args[]) throws Exception {
+ test("DuplicateParentLE_Test_Loader", "test.Foo");
+ }
+}
--- a/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/ReservedStack/ReservedStackTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -232,6 +232,19 @@
}
}
+ private static boolean isAlwaysSupportedPlatform() {
+ return Platform.isAix() ||
+ (Platform.isLinux() &&
+ (Platform.isPPC() || Platform.isS390x() || Platform.isX64() ||
+ Platform.isX86() || Platform.isAArch64())) ||
+ Platform.isOSX() ||
+ Platform.isSolaris();
+ }
+
+ private static boolean isNeverSupportedPlatform() {
+ return !isAlwaysSupportedPlatform();
+ }
+
private static boolean isSupportedPlatform;
private static void initIsSupportedPlatform() throws Exception {
@@ -256,11 +269,19 @@
// Do a sanity check. Some platforms we know are always supported. Make sure
// we didn't determine that one of those platforms is not supported.
- if (!isSupportedPlatform) {
+ if (!isSupportedPlatform && isAlwaysSupportedPlatform()) {
String msg = "This platform should be supported: " + Platform.getOsArch();
System.err.println("FAILED: " + msg);
throw new RuntimeException(msg);
}
+
+ // And some platforms we know are never supported. Make sure
+ // we didn't determine that one of those platforms is supported.
+ if (isSupportedPlatform && isNeverSupportedPlatform()) {
+ String msg = "This platform should not be supported: " + Platform.getOsArch();
+ System.err.println("FAILED: " + msg);
+ throw new RuntimeException(msg);
+ }
}
public static void main(String[] args) throws Exception {
--- a/test/hotspot/jtreg/runtime/appcds/CDSandJFR.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/CDSandJFR.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,7 +30,7 @@
* @modules jdk.jfr
* @build Hello GetFlightRecorder
* @run driver ClassFileInstaller -jar CDSandJFR.jar Hello GetFlightRecorder GetFlightRecorder$TestEvent GetFlightRecorder$SimpleEvent
- * @run driver CDSandJFR
+ * @run driver/timeout=500 CDSandJFR
*/
import jdk.test.lib.BuildHelper;
--- a/test/hotspot/jtreg/runtime/appcds/VerifierTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/VerifierTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -102,17 +102,17 @@
}
static void testset_0(String jar, String[] noAppClasses, String[] appClasses) throws Exception {
- // Dumping should fail if the IgnoreUnverifiableClassesDuringDump
- // option is not enabled.
- OutputAnalyzer output = TestCommon.dump(jar, appClasses,
- CDS_LOGGING,
- "-XX:+UnlockDiagnosticVMOptions",
- "-XX:-IgnoreUnverifiableClassesDuringDump");
- output.shouldContain("Please remove the unverifiable classes");
- output.shouldHaveExitValue(1);
-
- // By default, bad classes should be ignored during dumping.
- TestCommon.testDump(jar, appClasses);
+ // Unverifiable classes won't be included in the CDS archive.
+ // Dumping should not fail.
+ OutputAnalyzer output = TestCommon.dump(jar, appClasses);
+ output.shouldHaveExitValue(0);
+ if (output.getStdout().contains("Loading clases to share")) {
+ // last entry in appClasses[] is a verifiable class
+ for (int i = 0; i < (appClasses.length - 1); i++) {
+ output.shouldContain("Verification failed for " + appClasses[i]);
+ output.shouldContain("Removed error class: " + appClasses[i]);
+ }
+ }
}
static void checkRuntimeOutput(OutputAnalyzer output, String expected) throws Exception {
--- a/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java Mon Nov 12 11:10:16 2018 +0530
@@ -31,7 +31,7 @@
* "--limit-modules java.base" option is specified
* @requires vm.cds & !vm.graal.enabled
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.management
* jdk.jartool/sun.tools.jar
* jdk.internal.jvmstat/sun.jvmstat.monitor
@@ -66,7 +66,7 @@
List<String> argsList = new ArrayList<String>();
argsList.add(classPath);
argsList.add(bootclasspath);
- argsList.add("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED");
+ argsList.add("--add-exports=java.base/jdk.internal.access=ALL-UNNAMED");
argsList.add("EmptyClassHelper");
// case 1: load class in bootclasspath using app loader
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/ExerciseGC.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,17 +27,16 @@
* @summary Exercise GC with shared strings
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloStringGC sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver ExerciseGC
- * @run main/othervm -XX:+UseStringDeduplication ExerciseGC
- * @run main/othervm -XX:-CompactStrings ExerciseGC
*/
public class ExerciseGC {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, ExerciseGC::test);
+ }
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJarAndWhiteBox("HelloStringGC");
SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("HelloStringGC"),
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions.java Mon Nov 12 11:10:16 2018 +0530
@@ -22,6 +22,11 @@
*
*/
+// NOTE: the test takes a long time for each VM option combination, so we split
+// it into 3 @test parts, so that they can be executed in parallel. If you make a
+// change, please ensure all @test blocks are in sync.
+
+
/*
* @test
* @summary Test options that are incompatible with use of shared strings
@@ -36,9 +41,35 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
* @build HelloString
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 0
*/
+
+/*
+ * @test
+ * @requires vm.cds.archived.java.heap
+ * @requires (vm.gc=="null")
+ * @library /test/lib /test/hotspot/jtreg/runtime/appcds
+ * @modules jdk.jartool/sun.tools.jar
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @build HelloString
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 1
+ */
+
+/*
+ * @test
+ * @requires vm.cds.archived.java.heap
+ * @requires (vm.gc=="null")
+ * @library /test/lib /test/hotspot/jtreg/runtime/appcds
+ * @modules jdk.jartool/sun.tools.jar
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @build HelloString
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions 2
+ */
+
+
import jdk.test.lib.Asserts;
import jdk.test.lib.Platform;
import jdk.test.lib.process.OutputAnalyzer;
@@ -59,10 +90,17 @@
"The shared archive file's CompactStrings setting .* does not equal the current CompactStrings setting";
static String appJar;
- static String[] globalVmOptions;
+ static String[] vmOptionsPrefix = {};
public static void main(String[] args) throws Exception {
- globalVmOptions = args; // specified by "@run main" in IncompatibleOptions_*.java
+ String[] noargs = {};
+ SharedStringsUtils.run(Integer.parseInt(args[0]), 3, noargs, IncompatibleOptions::test);
+ // Add a new @test block if you get an assert ----^ about this number. See
+ // SharedStringsUtils.java for details.
+ }
+
+ public static void test(String[] args_ignored) throws Exception {
+ vmOptionsPrefix = SharedStringsUtils.getChildVMOptionsPrefix();
appJar = JarBuilder.build("IncompatibleOptions", "HelloString");
// Uncompressed OOPs
@@ -118,7 +156,7 @@
System.out.println("Testcase: " + testCaseNr);
OutputAnalyzer output = TestCommon.dump(appJar, TestCommon.list("Hello"),
- TestCommon.concat(globalVmOptions,
+ TestCommon.concat(vmOptionsPrefix,
"-XX:+UseCompressedOops",
collectorOption,
"-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("SharedStringsBasic.txt"),
@@ -145,12 +183,12 @@
// main class param, and fails with "Could not find or load main class"
if (!extraOption.isEmpty()) {
output = TestCommon.exec(appJar,
- TestCommon.concat(globalVmOptions,
+ TestCommon.concat(vmOptionsPrefix,
"-XX:+UseCompressedOops",
collectorOption, "-Xlog:cds", extraOption, "HelloString"));
} else {
output = TestCommon.exec(appJar,
- TestCommon.concat(globalVmOptions,
+ TestCommon.concat(vmOptionsPrefix,
"-XX:+UseCompressedOops",
collectorOption, "-Xlog:cds", "HelloString"));
}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_noCompactStrings.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-/*
- * @test
- * @summary Test options that are incompatible with use of shared strings
- * Also test mismatch in oops encoding between dump time and run time
- * @requires vm.cds.archived.java.heap
- * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set
- * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed
- * vm options.
- * @requires (vm.gc=="null")
- * @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules jdk.jartool/sun.tools.jar
- * @build sun.hotspot.WhiteBox
- * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- * @build HelloString
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions -XX:-CompactStrings
- */
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/IncompatibleOptions_stringDedup.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-/*
- * @test
- * @summary Test options that are incompatible with use of shared strings
- * Also test mismatch in oops encoding between dump time and run time
- * @requires vm.cds.archived.java.heap
- * @comment This test explicitly chooses the type of GC to be used by sub-processes. It may conflict with the GC type set
- * via the -vmoptions command line option of JTREG. vm.gc==null will help the test case to discard the explicitly passed
- * vm options.
- * @requires (vm.gc=="null")
- * @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules jdk.jartool/sun.tools.jar
- * @build sun.hotspot.WhiteBox
- * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- * @build HelloString
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. IncompatibleOptions -XX:+UseStringDeduplication
- */
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InternSharedString.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,19 +27,19 @@
* @summary Test shared strings together with string intern operation
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @compile InternStringTest.java
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver InternSharedString
- * @run main/othervm -XX:+UseStringDeduplication InternSharedString
- * @run main/othervm -XX:-CompactStrings InternSharedString
*/
public class InternSharedString {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, InternSharedString::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJarAndWhiteBox("InternStringTest");
SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("InternStringTest"),
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,13 +27,9 @@
* @summary Check most common errors in file format
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloString
* @run driver InvalidFileFormat
- * @run main/othervm -XX:+UseStringDeduplication InvalidFileFormat
- * @run main/othervm -XX:-CompactStrings InvalidFileFormat
*/
import java.io.File;
@@ -46,6 +42,10 @@
// the previledge person in the server environment.
public class InvalidFileFormat {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, InvalidFileFormat::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJar("HelloString");
test("NonExistentFile.txt", "Unable to get hashtable dump file size");
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LargePages.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,17 +27,18 @@
* @summary Basic shared string test with large pages
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloString
* @run driver LargePages
- * @run main/othervm -XX:+UseStringDeduplication LargePages
- * @run main/othervm -XX:-CompactStrings LargePages
*/
public class LargePages {
static final String CDS_LOGGING = "-Xlog:cds,cds+hashtables";
+
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, LargePages::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJar("HelloString");
SharedStringsUtils.dump(TestCommon.list("HelloString"),
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/LockSharedStrings.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,19 +27,19 @@
* @summary Test locking on shared strings
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @compile LockStringTest.java LockStringValueTest.java
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver LockSharedStrings
- * @run main/othervm -XX:+UseStringDeduplication LockSharedStrings
- * @run main/othervm -XX:-CompactStrings LockSharedStrings
*/
public class LockSharedStrings {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, LockSharedStrings::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJarAndWhiteBox("LockStringTest", "LockStringValueTest");
SharedStringsUtils.dumpWithWhiteBox(
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasic.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,44 +27,49 @@
* @summary Basic test for shared strings
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloString
* @run driver SharedStringsBasic
- * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasic
- * @run main/othervm -XX:-CompactStrings SharedStringsBasic
*/
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
-// This test does not use SharedStringsUtils intentionally:
+// This test does not use SharedStringsUtils.dumpXXX()
+// and SharedStringsUtils.runWithXXX() intentionally:
// - in order to demonstrate the basic use of the functionality
// - to provide sanity check and catch potential problems in the utils
public class SharedStringsBasic {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, SharedStringsBasic::test);
+ }
+
+ public static void test(String[] args) throws Exception {
+ String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
+
String appJar = JarBuilder.build("SharedStringsBasic", "HelloString");
String sharedArchiveConfigFile =
TestCommon.getSourceFile("SharedStringsBasic.txt").toString();
ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
+ TestCommon.concat(vmOptionsPrefix,
"-cp", appJar,
"-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:dump",
- "-Xlog:cds,cds+hashtables");
+ "-Xlog:cds,cds+hashtables"));
TestCommon.executeAndLog(dumpPb, "dump")
.shouldContain("Shared string table stats")
.shouldHaveExitValue(0);
ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
+ TestCommon.concat(vmOptionsPrefix,
"-cp", appJar,
"-XX:SharedArchiveFile=./SharedStringsBasic.jsa",
"-Xshare:auto",
"-showversion",
- "HelloString");
+ "HelloString"));
TestCommon.executeAndLog(runPb, "run").shouldHaveExitValue(0);
}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsBasicPlus.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,18 +27,18 @@
* @summary Basic plus test for shared strings
* @requires vm.cds.archived.java.heap
* @library /test/hotspot/jtreg/runtime/appcds /test/lib
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloStringPlus sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver SharedStringsBasicPlus
- * @run main/othervm -XX:+UseStringDeduplication SharedStringsBasicPlus
- * @run main/othervm -XX:-CompactStrings SharedStringsBasicPlus
*/
public class SharedStringsBasicPlus {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, SharedStringsBasicPlus::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJarAndWhiteBox("HelloStringPlus");
SharedStringsUtils.dumpWithWhiteBox( TestCommon.list("HelloStringPlus"),
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java Mon Nov 12 11:10:16 2018 +0530
@@ -30,8 +30,6 @@
* @modules jdk.jartool/sun.tools.jar
* @build HelloString
* @run driver SharedStringsStress
- * @run main/othervm -XX:+UseStringDeduplication SharedStringsStress
- * @run main/othervm -XX:-CompactStrings SharedStringsStress
*/
import java.io.File;
import java.io.FileOutputStream;
@@ -42,6 +40,12 @@
public class SharedStringsStress {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, SharedStringsStress::test);
+ }
+
+ public static void test(String[] args) throws Exception {
+ String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
+
String appJar = JarBuilder.build("SharedStringsStress", "HelloString");
String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsStress_gen.txt";
@@ -58,9 +62,11 @@
}
OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"),
- "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile);
+ TestCommon.concat(vmOptionsPrefix,
+ "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile));
TestCommon.checkDump(dumpOutput);
- OutputAnalyzer execOutput = TestCommon.exec(appJar, "HelloString");
+ OutputAnalyzer execOutput = TestCommon.exec(appJar,
+ TestCommon.concat(vmOptionsPrefix, "HelloString"));
TestCommon.checkExec(execOutput);
}
}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -24,6 +24,7 @@
import jdk.test.lib.cds.CDSOptions;
import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Asserts;
// A helper/utility class for testing shared strings
public class SharedStringsUtils {
@@ -31,6 +32,49 @@
public static final String TEST_JAR_NAME_FULL = "test.jar";
public static final String WHITEBOX_JAR_NAME = "whitebox";
+ public static interface Test {
+ public void dotest(String args[]) throws Exception ;
+ }
+
+ private static String[][] vmOptionCombos = {
+ {},
+ {"-XX:+UseStringDeduplication"},
+ {"-XX:-CompactStrings"}
+ };
+
+ private static String childVMOptionsPrefix[] = {};
+
+ // SharedStringsUtils.run() is for running the main test body multiple times, each with a different
+ // set of extra VM options that are passed to the child processes.
+ //
+ // See ./ExerciseGC.java for an example.
+ public static void run(String args[], Test t) throws Exception {
+ int numSetOfChildVMOptions = vmOptionCombos.length;
+ for (int i=0; i< numSetOfChildVMOptions; i++) {
+ run(i, numSetOfChildVMOptions, args, t);
+ }
+ }
+
+ public static void run(int i, int numSetOfChildVMOptions, String args[], Test t) throws Exception {
+ // When you add a new set of options to vmOptionCombos, we make sure all
+ // callers of this method (i.e., IncompatibleOptions.java) knows about it and will
+ // add new @test blocks accordingly.
+ Asserts.assertEQ(numSetOfChildVMOptions, vmOptionCombos.length);
+ String opts[] = vmOptionCombos[i];
+
+ System.out.print("Running with extra VM option prefix for child processes [" + opts.length + "] =");
+ for (String o : opts) {
+ System.out.print(" " + o);
+ }
+ System.out.println();
+ childVMOptionsPrefix = opts;
+ t.dotest(args);
+ }
+
+ public static String[] getChildVMOptionsPrefix() {
+ return childVMOptionsPrefix;
+ }
+
public static String getWbParam() {
return "-Xbootclasspath/a:" + TestCommon.getTestJar(WHITEBOX_JAR_NAME + ".jar");
}
@@ -55,6 +99,7 @@
TestCommon.concat(extraOptions, "-XX:+UseCompressedOops", "-XX:+UseG1GC",
"-XX:SharedArchiveConfigFile=" +
TestCommon.getSourceFile(sharedDataFile));
+ args = TestCommon.concat(childVMOptionsPrefix, args);
return TestCommon.dump(appJar, appClasses, args);
}
@@ -80,6 +125,7 @@
String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL);
String[] args = TestCommon.concat(extraOptions,
"-cp", appJar, "-XX:+UseCompressedOops", "-XX:+UseG1GC", className);
+ args = TestCommon.concat(childVMOptionsPrefix, args);
OutputAnalyzer output = TestCommon.execAuto(args);
checkExecAuto(output);
@@ -98,6 +144,7 @@
String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL);
String[] args = TestCommon.concat(extraOptions,
"-XX:+UseCompressedOops", "-XX:+UseG1GC", className);
+ args = TestCommon.concat(childVMOptionsPrefix, args);
OutputAnalyzer output = TestCommon.exec(appJar, args);
checkExec(output, extraMatches);
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsWbTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,14 +27,10 @@
* @summary White box test for shared strings
* @requires vm.cds.archived.java.heap
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
- * @modules java.management
- * jdk.jartool/sun.tools.jar
+ * @modules jdk.jartool/sun.tools.jar
* @build sun.hotspot.WhiteBox SharedStringsWb
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver SharedStringsWbTest
- * @run main/othervm -XX:+UseStringDeduplication SharedStringsWbTest
- * @run main/othervm -XX:-CompactStrings SharedStringsWbTest
*/
import java.io.*;
@@ -42,6 +38,10 @@
public class SharedStringsWbTest {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, SharedStringsWbTest::test);
+ }
+
+ public static void test(String[] args) throws Exception {
SharedStringsUtils.buildJarAndWhiteBox("SharedStringsWb");
SharedStringsUtils.dumpWithWhiteBox(TestCommon.list("SharedStringsWb"),
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SysDictCrash.java Mon Nov 12 11:10:16 2018 +0530
@@ -27,12 +27,9 @@
* @summary Regression test for JDK-8098821
* @bug 8098821
* @requires vm.cds.archived.java.heap
+ * @modules jdk.jartool/sun.tools.jar
* @library /test/lib /test/hotspot/jtreg/runtime/appcds
- * @modules java.base/jdk.internal.misc
- * @modules java.management
* @run driver SysDictCrash
- * @run main/othervm -XX:+UseStringDeduplication SysDictCrash
- * @run main/othervm -XX:-CompactStrings SysDictCrash
*/
import jdk.test.lib.process.OutputAnalyzer;
@@ -40,22 +37,30 @@
public class SysDictCrash {
public static void main(String[] args) throws Exception {
+ SharedStringsUtils.run(args, SysDictCrash::test);
+ }
+
+ public static void test(String[] args) throws Exception {
+ String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
+
// SharedBaseAddress=0 puts the archive at a very high address on solaris,
// which provokes the crash.
ProcessBuilder dumpPb = ProcessTools.createJavaProcessBuilder(true,
+ TestCommon.concat(vmOptionsPrefix,
"-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
"-cp", ".",
"-XX:SharedBaseAddress=0", "-XX:SharedArchiveFile=./SysDictCrash.jsa",
"-Xshare:dump",
- "-showversion", "-Xlog:cds,cds+hashtables");
+ "-showversion", "-Xlog:cds,cds+hashtables"));
TestCommon.checkDump(TestCommon.executeAndLog(dumpPb, "dump"));
ProcessBuilder runPb = ProcessTools.createJavaProcessBuilder(true,
+ TestCommon.concat(vmOptionsPrefix,
"-XX:+UseG1GC", "-XX:MaxRAMPercentage=12.5",
"-XX:SharedArchiveFile=./SysDictCrash.jsa",
"-Xshare:on",
- "-version");
+ "-version"));
TestCommon.checkExec(TestCommon.executeAndLog(runPb, "exec"));
}
--- a/test/hotspot/jtreg/runtime/appcds/test-classes/EmptyClassHelper.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/runtime/appcds/test-classes/EmptyClassHelper.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -23,9 +23,10 @@
*/
import java.lang.*;
-import java.lang.reflect.*;
-import jdk.internal.misc.JavaLangAccess;
-import jdk.internal.misc.SharedSecrets;
+
+import java.lang.reflect.Method;
+import jdk.internal.access.JavaLangAccess;
+import jdk.internal.access.SharedSecrets;
class EmptyClassHelper {
static final JavaLangAccess jla = SharedSecrets.getJavaLangAccess();
--- a/test/hotspot/jtreg/sanity/ExecuteInternalVMTests.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* @test ExecuteInternalVMTests
- * @bug 8004691
- * @summary Add a jtreg test that exercises the ExecuteInternalVMTests flag
- * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+ExecuteInternalVMTests ExecuteInternalVMTests
- */
-public class ExecuteInternalVMTests {
- public static void main(String[] args) throws Exception {
- // The tests that are run are the HotSpot internal tests which are
- // executed only when the flag -XX:+ExecuteInternalVMTests is used.
-
- // The flag -XX:+ExecuteInternalVMTests can only be used for
- // non-product builds of HotSpot. Therefore, the flag
- // -XX:+IgnoreUnrecognizedVMOptions is also used, which means that this
- // test will do nothing on a product build.
- }
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/GetLocalVars.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8080406
+ * @summary VM_GetOrSetLocal doesn't check local slot type against requested type
+ *
+ * @compile GetLocalVars.java
+ * @run main/othervm/native -Xcomp -agentlib:GetLocalVars GetLocalVars
+ */
+
+
+public class GetLocalVars {
+ private static final String agentLib = "GetLocalVars";
+
+ static native void testLocals(Thread thread);
+ static native int getStatus();
+
+ public static
+ void main(String[] args) throws Exception {
+ try {
+ System.loadLibrary(agentLib);
+ } catch (UnsatisfiedLinkError ex) {
+ System.err.println("Failed to load " + agentLib + " lib");
+ System.err.println("java.library.path: " + System.getProperty("java.library.path"));
+ throw ex;
+ }
+ run(args);
+ int status = getStatus();
+ if (status != 0) {
+ throw new RuntimeException("Test GetLocalVars failed with a bad status: " + status);
+ }
+ }
+
+ public static
+ void run(String argv[]) {
+ GetLocalVars testedObj = new GetLocalVars();
+ double pi = 3.14d;
+ byte sym = 'X';
+ int year = 2018;
+
+ staticMeth(sym, testedObj, pi, year);
+ }
+
+ public static synchronized
+ int staticMeth(byte byteArg, Object objArg, double dblArg, int intArg) {
+ testLocals(Thread.currentThread());
+ {
+ int intLoc = 9999;
+ intArg = intLoc;
+ }
+ return intArg;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/serviceability/jvmti/GetLocalVariable/libGetLocalVars.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include "jvmti.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define STATUS_PASSED 0
+#define STATUS_FAILED 2
+#define TranslateError(err) "JVMTI error"
+
+static jint result = STATUS_PASSED;
+static jvmtiEnv *jvmti = NULL;
+
+#define DECL_TEST_FUNC(type, Type) \
+static void \
+test_##type(jthread thr, int depth, int slot, const char* exp_type) { \
+ j##type val; \
+ jvmtiError err = jvmti->GetLocal##Type(thr, depth, slot, &val); \
+ \
+ printf(" GetLocal%s: %s (%d)\n", #Type, TranslateError(err), err); \
+ if (err != JVMTI_ERROR_NONE) { \
+ printf(" FAIL: GetLocal%s failed to get value from a local %s\n", #Type, exp_type); \
+ result = STATUS_FAILED; \
+ } else { \
+ printf(" GetLocal%s got value from a local %s as expected\n", #Type, exp_type); \
+ } \
+}
+
+#define DECL_TEST_INV_SLOT_FUNC(type, Type) \
+static void \
+test_##type##_inv_slot(jthread thr, int depth, int slot, const char* exp_type) { \
+ j##type val; \
+ jvmtiError err = jvmti->GetLocal##Type(thr, depth, slot, &val); \
+ \
+ printf(" GetLocal%s: %s (%d)\n", #Type, TranslateError(err), err); \
+ if (err != JVMTI_ERROR_INVALID_SLOT) { \
+ printf(" FAIL: GetLocal%s failed to return JVMTI_ERROR_INVALID_SLOT for local %s\n", #Type, exp_type); \
+ result = STATUS_FAILED; \
+ } else { \
+ printf(" GetLocal%s returned JVMTI_ERROR_INVALID_SLOT for local %s as expected\n", #Type, exp_type); \
+ } \
+}
+
+#define DECL_TEST_TYPE_MISMATCH_FUNC(type, Type) \
+static void \
+test_##type##_type_mismatch(jthread thr, int depth, int slot, const char* exp_type) { \
+ j##type val; \
+ jvmtiError err = jvmti->GetLocal##Type(thr, depth, slot, &val); \
+ \
+ printf(" GetLocal%s: %s (%d)\n", #Type, TranslateError(err), err); \
+ if (err != JVMTI_ERROR_TYPE_MISMATCH) { \
+ printf(" FAIL: GetLocal%s failed to return JVMTI_ERROR_TYPE_MISMATCH for local %s\n", #Type, exp_type); \
+ result = STATUS_FAILED; \
+ } else { \
+ printf(" GetLocal%s returned JVMTI_ERROR_TYPE_MISMATCH for local %s as expected\n", #Type, exp_type); \
+ } \
+}
+
+DECL_TEST_FUNC(int, Int);
+DECL_TEST_FUNC(float, Float);
+DECL_TEST_FUNC(long, Long);
+DECL_TEST_FUNC(double, Double);
+DECL_TEST_FUNC(object, Object);
+
+DECL_TEST_INV_SLOT_FUNC(int, Int);
+DECL_TEST_INV_SLOT_FUNC(float, Float);
+DECL_TEST_INV_SLOT_FUNC(long, Long);
+DECL_TEST_INV_SLOT_FUNC(double, Double);
+DECL_TEST_INV_SLOT_FUNC(object, Object);
+
+DECL_TEST_TYPE_MISMATCH_FUNC(int, Int);
+DECL_TEST_TYPE_MISMATCH_FUNC(float, Float);
+DECL_TEST_TYPE_MISMATCH_FUNC(long, Long);
+DECL_TEST_TYPE_MISMATCH_FUNC(double, Double);
+DECL_TEST_TYPE_MISMATCH_FUNC(object, Object);
+
+static void
+test_local_byte(jthread thr, int depth, int slot) {
+ printf("\n test_local_byte: BEGIN\n\n");
+
+ test_int(thr, depth, slot, "byte");
+ test_long_inv_slot(thr, depth, slot, "byte");
+ test_float(thr, depth, slot, "byte");
+ test_double_inv_slot(thr, depth, slot, "byte");
+ test_object_type_mismatch(thr, depth, slot, "byte");
+
+ printf("\n test_local_byte: END\n\n");
+}
+
+static void
+test_local_object(jthread thr, int depth, int slot) {
+ printf("\n test_local_object: BEGIN\n\n");
+
+ test_int_type_mismatch(thr, depth, slot, "object");
+ test_long_type_mismatch(thr, depth, slot, "object");
+ test_float_type_mismatch(thr, depth, slot, "object");
+ test_double_type_mismatch(thr, depth, slot, "object");
+ test_object(thr, depth, slot, "object");
+
+ printf("\n test_local_object: END\n\n");
+}
+
+static void
+test_local_double(jthread thr, int depth, int slot) {
+ printf("\n test_local_double: BEGIN\n\n");
+
+ test_int(thr, depth, slot, "double");
+ test_long(thr, depth, slot, "double");
+ test_float(thr, depth, slot, "double");
+ test_double(thr, depth, slot, "double");
+ test_object_type_mismatch(thr, depth, slot, "double");
+
+ printf("\n test_local_double: END\n\n");
+}
+
+static void
+test_local_integer(jthread thr, int depth, int slot) {
+ printf("\n test_local_integer: BEGIN\n\n");
+
+ test_int(thr, depth, slot, "int");
+ test_long_inv_slot(thr, depth, slot, "int");
+ test_float(thr, depth, slot, "int");
+ test_double_inv_slot(thr, depth, slot, "int");
+ test_object_type_mismatch(thr, depth, slot, "double");
+
+ printf("\n test_local_integer: END\n\n");
+}
+
+static void
+test_local_invalid(jthread thr, int depth, int slot) {
+ printf("\n test_local_invalid: BEGIN\n\n");
+
+ test_int_inv_slot(thr, depth, slot, "invalid");
+ test_long_inv_slot(thr, depth, slot, "invalid");
+ test_float_inv_slot(thr, depth, slot, "invalid");
+ test_double_inv_slot(thr, depth, slot, "invalid");
+ test_object_inv_slot(thr, depth, slot, "invalid");
+
+ printf("\n test_local_invalid: END\n\n");
+}
+
+jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
+ jint res;
+ jvmtiError err;
+ static jvmtiCapabilities caps;
+
+ res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_9);
+ if (res != JNI_OK || jvmti == NULL) {
+ printf("Wrong result of a valid call to GetEnv!\n");
+ return JNI_ERR;
+ }
+ caps.can_access_local_variables = 1;
+
+ err = jvmti->AddCapabilities(&caps);
+ if (err != JVMTI_ERROR_NONE) {
+ printf("AddCapabilities: unexpected error: %s (%d)\n", TranslateError(err), err);
+ return JNI_ERR;
+ }
+ err = jvmti->GetCapabilities(&caps);
+ if (err != JVMTI_ERROR_NONE) {
+ printf("GetCapabilities: unexpected error: %s (%d)\n", TranslateError(err), err);
+ return JNI_ERR;
+ }
+ if (!caps.can_access_local_variables) {
+ printf("Warning: Access to local variables is not implemented\n");
+ return JNI_ERR;
+ }
+ return JNI_OK;
+}
+
+JNIEXPORT jint JNICALL
+Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) {
+ return Agent_Initialize(jvm, options, reserved);
+}
+
+JNIEXPORT jint JNICALL
+Agent_OnAttach(JavaVM *jvm, char *options, void *reserved) {
+ return Agent_Initialize(jvm, options, reserved);
+}
+
+JNIEXPORT void JNICALL
+Java_GetLocalVars_testLocals(JNIEnv *env, jclass cls, jobject thread) {
+ static const char* METHOD_NAME = "staticMeth";
+ static const char* METHOD_SIGN = "(BLjava/lang/Object;DI)I";
+ static const int Depth = 1;
+ static const int ByteSlot = 0;
+ static const int ObjSlot = 1;
+ static const int DblSlot = 2;
+ static const int IntSlot = 4;
+ static const int InvalidSlot = 5;
+
+ jmethodID mid = NULL;
+
+ if (jvmti == NULL) {
+ printf("JVMTI client was not properly loaded!\n");
+ result = STATUS_FAILED;
+ return;
+ }
+
+ mid = env->GetStaticMethodID(cls, METHOD_NAME, METHOD_SIGN);
+ if (mid == NULL) {
+ printf("Cannot find Method ID for %s%s\n", METHOD_NAME, METHOD_SIGN);
+ result = STATUS_FAILED;
+ return;
+ }
+
+ test_local_byte(thread, Depth, ByteSlot);
+ test_local_object(thread, Depth, ObjSlot);
+ test_local_double(thread, Depth, DblSlot);
+ test_local_integer(thread, Depth, IntSlot);
+ test_local_invalid(thread, Depth, InvalidSlot);
+}
+
+JNIEXPORT jint JNICALL
+Java_GetLocalVars_getStatus(JNIEnv *env, jclass cls) {
+ return result;
+}
+
+#ifdef __cplusplus
+}
+#endif
--- a/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -23,7 +23,7 @@
package sun.hotspot.tools.ctw;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.misc.Unsafe;
import jdk.internal.reflect.ConstantPool;
import sun.hotspot.WhiteBox;
--- a/test/hotspot/jtreg/testlibrary_tests/ctw/ClassesDirTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary_tests/ctw/ClassesDirTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
* @test
* @bug 8012447
* @library /test/lib /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* java.management
--- a/test/hotspot/jtreg/testlibrary_tests/ctw/ClassesListTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary_tests/ctw/ClassesListTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
* @test
* @bug 8012447
* @library /test/lib /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* java.management
--- a/test/hotspot/jtreg/testlibrary_tests/ctw/CtwTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary_tests/ctw/CtwTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -49,6 +49,7 @@
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
"-Dsun.hotspot.tools.ctw.logfile=" + LOG_FILE,
+ "--add-exports", "java.base/jdk.internal.access=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.jimage=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED",
"--add-exports", "java.base/jdk.internal.reflect=ALL-UNNAMED",
--- a/test/hotspot/jtreg/testlibrary_tests/ctw/JarDirTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary_tests/ctw/JarDirTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
* @test
* @bug 8012447
* @library /test/lib /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* java.compiler
--- a/test/hotspot/jtreg/testlibrary_tests/ctw/JarsTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/testlibrary_tests/ctw/JarsTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,8 @@
* @test
* @bug 8012447
* @library /test/lib /testlibrary/ctw/src
- * @modules java.base/jdk.internal.jimage
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.jimage
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* java.compiler
--- a/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java Mon Nov 12 11:10:16 2018 +0530
@@ -29,7 +29,7 @@
*
* @library /vmTestbase /test/lib
* @run driver jdk.test.lib.FileInstaller . .
- * @run main/othervm/timeout=300 metaspace.stressDictionary.StressDictionary -stressTime 30
+ * @run main/othervm/timeout=420 metaspace.stressDictionary.StressDictionary -stressTime 30
*/
package metaspace.stressDictionary;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java Mon Nov 12 11:10:16 2018 +0530
@@ -46,7 +46,8 @@
* @library /vmTestbase
* /test/lib
* @run driver jdk.test.lib.FileInstaller . .
- * @build nsk.jvmti.scenarios.hotswap.HS204.hs204t001.hs204t001
+ * @build ExecDriver
+ * nsk.jvmti.scenarios.hotswap.HS204.hs204t001.hs204t001
*
* @comment compile newclassXX to bin/newclassXX
* @run driver nsk.share.ExtraClassesBuilder
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal003/getlocal003.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal003/getlocal003.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -21,9 +21,6 @@
* questions.
*/
-/*
- */
-
#include <stdio.h>
#include <string.h>
#include "jvmti.h"
@@ -34,13 +31,12 @@
extern "C" {
-#define PASSED 0
+#define STATUS_PASSED 0
#define STATUS_FAILED 2
static jvmtiEnv *jvmti = NULL;
-static jvmtiCapabilities caps;
static jvmtiEventCallbacks callbacks;
-static jint result = PASSED;
+static jint result = STATUS_PASSED;
static jboolean printdump = JNI_FALSE;
static jmethodID mid = NULL;
static jvmtiLocalVariableEntry *table = NULL;
@@ -54,69 +50,112 @@
printf(", signature: %s\n", lvt_elem->signature);
}
-void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
- jthread thr, jmethodID method,
- jboolean was_poped_by_exception, jvalue return_value) {
+static void
+test_locals(jvmtiEnv *jvmti, jthread thr, jlocation location) {
jvmtiError err;
- jint i;
- jmethodID frame_method;
- jlocation location;
jint intVal;
+ jlong longVal;
jfloat floatVal;
jdouble doubleVal;
jobject obj;
+ jint i;
- if (mid == method) {
+ for (i = 0; i < entryCount; i++) {
+ if (table[i].start_location > location ||
+ table[i].start_location + table[i].length < location) {
+ continue; /* The local variable is not visible */
+ }
+ print_LocalVariableEntry(&table[i]);
+ char sig = table[i].signature[0];
- err = jvmti_env->GetFrameLocation(thr, 0,
- &frame_method, &location);
- if (err != JVMTI_ERROR_NONE) {
- printf("\t failure: %s (%d)\n", TranslateError(err), err);
+ if (sig == 'Z' || sig == 'B' || sig == 'C' || sig == 'S') {
+ sig = 'I'; // covered by GetLocalInt
+ }
+ err = jvmti->GetLocalInt(thr, 0, table[i].slot, &intVal);
+ printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
+ if (err != JVMTI_ERROR_NONE && sig == 'I') {
+ printf("FAIL: GetLocalInt failed to get value of int\n");
+ result = STATUS_FAILED;
+ } else if (err != JVMTI_ERROR_TYPE_MISMATCH && sig != 'I') {
+ printf("FAIL: GetLocalInt did not return JVMTI_ERROR_TYPE_MISMATCH for non-int\n");
result = STATUS_FAILED;
- return;
}
- if (frame_method != method) {
- printf("\t failure: GetFrameLocation returned wrong jmethodID\n");
+
+ err = jvmti->GetLocalLong(thr, 0, table[i].slot, &longVal);
+ printf(" GetLocalLong: %s (%d)\n", TranslateError(err), err);
+ if (err != JVMTI_ERROR_NONE && sig == 'J') {
+ printf("FAIL: GetLocalLong failed to get value of long\n");
+ result = STATUS_FAILED;
+ } else if (err != JVMTI_ERROR_TYPE_MISMATCH && sig != 'J') {
+ printf("FAIL: GetLocalLong did not return JVMTI_ERROR_TYPE_MISMATCH for non-long\n");
result = STATUS_FAILED;
- return;
+ }
+
+ err = jvmti->GetLocalFloat(thr, 0, table[i].slot, &floatVal);
+ printf(" GetLocalFloat: %s (%d)\n", TranslateError(err), err);
+ if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'F') {
+ printf("FAIL: GetLocalFloat failed to get value of float\n");
+ result = STATUS_FAILED;
+ } else if (err != JVMTI_ERROR_TYPE_MISMATCH && table[i].signature[0] != 'F') {
+ printf("FAIL: GetLocalFloat did not return JVMTI_ERROR_TYPE_MISMATCH for non-float\n");
+ result = STATUS_FAILED;
}
- printf("\n MethodExit: BEGIN %d, Current frame bci: %" LL "d\n\n",
- ++methodExitCnt, location);
- for (i = 0; i < entryCount; i++) {
- if (table[i].start_location > location ||
- table[i].start_location + table[i].length < location) {
- continue; /* The local variable is not visible */
- }
- print_LocalVariableEntry(&table[i]);
+ err = jvmti->GetLocalDouble(thr, 0, table[i].slot, &doubleVal);
+ printf(" GetLocalDouble: %s (%d)\n", TranslateError(err), err);
+ if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'D') {
+ printf("FAIL: GetLocalDouble failed to get value of double\n");
+ result = STATUS_FAILED;
+ } else if (err != JVMTI_ERROR_TYPE_MISMATCH && table[i].signature[0] != 'D') {
+ printf("FAIL: GetLocalDouble did not return JVMTI_ERROR_TYPE_MISMATCH for non-double\n");
+ result = STATUS_FAILED;
+ }
- err = jvmti->GetLocalInt(thr, 0, table[i].slot, &intVal);
- printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
- if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'I') {
- result = STATUS_FAILED;
- }
+ err = jvmti->GetLocalObject(thr, 0, table[i].slot, &obj);
+ printf(" GetLocalObject: %s (%d)\n", TranslateError(err), err);
+ if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'L') {
+ printf("FAIL: GetLocalObject failed to get value of object\n");
+ result = STATUS_FAILED;
+ } else if (err != JVMTI_ERROR_TYPE_MISMATCH && table[i].signature[0] != 'L') {
+ printf("FAIL: GetLocalObject did not return JVMTI_ERROR_TYPE_MISMATCH for non-object\n");
+ result = STATUS_FAILED;
+ }
+ }
+}
- err = jvmti->GetLocalFloat(thr, 0, table[i].slot, &floatVal);
- printf(" GetLocalFloat: %s (%d)\n", TranslateError(err), err);
- if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'F') {
- result = STATUS_FAILED;
- }
+static void JNICALL
+MethodExit(jvmtiEnv *jvmti_env,
+ JNIEnv *env,
+ jthread thr,
+ jmethodID method,
+ jboolean was_poped_by_exception,
+ jvalue return_value) {
+
+ jvmtiError err;
+ jlocation location;
+ jmethodID frame_method = NULL;
- err = jvmti->GetLocalDouble(thr, 0, table[i].slot, &doubleVal);
- printf(" GetLocalDouble: %s (%d)\n", TranslateError(err), err);
- if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'D') {
- result = STATUS_FAILED;
- }
+ if (mid != method) {
+ return;
+ }
+ err = jvmti->GetFrameLocation(thr, 0, &frame_method, &location);
+ if (err != JVMTI_ERROR_NONE) {
+ printf("\t failure: %s (%d)\n", TranslateError(err), err);
+ result = STATUS_FAILED;
+ return;
+ }
+ if (frame_method != method) {
+ printf("\t failure: GetFrameLocation returned wrong jmethodID\n");
+ result = STATUS_FAILED;
+ return;
+ }
- err = jvmti->GetLocalObject(thr, 0, table[i].slot, &obj);
- printf(" GetLocalObject: %s (%d)\n", TranslateError(err), err);
- if (err != JVMTI_ERROR_NONE && table[i].signature[0] == 'L') {
- result = STATUS_FAILED;
- }
- }
- printf("\n MethodExit: END %d\n\n", methodExitCnt);
- fflush(stdout);
- }
+ printf("\n MethodExit: BEGIN %d\n", ++methodExitCnt);
+
+ test_locals(jvmti, thr, location);
+
+ printf("\n MethodExit: END %d\n\n", methodExitCnt);
+ fflush(stdout);
}
#ifdef STATIC_BUILD
@@ -133,6 +172,7 @@
jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
jint res;
jvmtiError err;
+ static jvmtiCapabilities caps;
if (options != NULL && strcmp(options, "printdump") == 0) {
printdump = JNI_TRUE;
@@ -167,18 +207,19 @@
if (!caps.can_access_local_variables) {
printf("Warning: Access to local variables is not implemented\n");
- } else if (caps.can_generate_method_exit_events) {
- callbacks.MethodExit = &MethodExit;
- err = jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks));
- if (err != JVMTI_ERROR_NONE) {
- printf("(SetEventCallbacks) unexpected error: %s (%d)\n",
- TranslateError(err), err);
- return JNI_ERR;
- }
- } else {
+ return JNI_ERR;
+ }
+ if (!caps.can_generate_method_exit_events) {
printf("Warning: MethodExit event is not implemented\n");
+ return JNI_ERR;
}
-
+ callbacks.MethodExit = &MethodExit;
+ err = jvmti->SetEventCallbacks(&callbacks, sizeof(callbacks));
+ if (err != JVMTI_ERROR_NONE) {
+ printf("(SetEventCallbacks) unexpected error: %s (%d)\n",
+ TranslateError(err), err);
+ return JNI_ERR;
+ }
return JNI_OK;
}
@@ -192,9 +233,6 @@
return;
}
- if (!caps.can_access_local_variables ||
- !caps.can_generate_method_exit_events) return;
-
mid = env->GetStaticMethodID(cls, "staticMeth", "(I)I");
if (mid == NULL) {
printf("Cannot find Method ID for staticMeth\n");
@@ -204,14 +242,13 @@
err = jvmti->GetLocalVariableTable(mid, &entryCount, &table);
if (err != JVMTI_ERROR_NONE) {
- printf("(GetLocalVariableTable) unexpected error: %s (%d)\n",
- TranslateError(err), err);
- result = STATUS_FAILED;
- return;
+ printf("(GetLocalVariableTable) unexpected error: %s (%d)\n",
+ TranslateError(err), err);
+ result = STATUS_FAILED;
+ return;
}
- err = jvmti->SetEventNotificationMode(JVMTI_ENABLE,
- JVMTI_EVENT_METHOD_EXIT, NULL);
+ err = jvmti->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_METHOD_EXIT, NULL);
if (err != JVMTI_ERROR_NONE) {
printf("Failed to enable metod exit event: %s (%d)\n",
TranslateError(err), err);
@@ -232,8 +269,11 @@
int overlap = 0;
if (jvmti == NULL) {
+ printf("JVMTI client was not properly loaded!\n");
+ result = STATUS_FAILED;
return;
}
+ printf("\n checkLoc: START\n");
mid = env->GetStaticMethodID(cls, "staticMeth", "(I)I");
if (mid == NULL) {
@@ -255,20 +295,22 @@
err = jvmti->GetLocalInt(thr, 1, table[i].slot, &locVar);
- printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
if (strcmp(table[i].name, "intArg") == 0) {
if (err != JVMTI_ERROR_NONE) {
- printf(" failure: JVMTI_ERROR_NONE is expected\n");
- result = STATUS_FAILED;
+ printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
+ printf(" failure: JVMTI_ERROR_NONE is expected\n");
+ result = STATUS_FAILED;
}
}
else if (strcmp(table[i].name, "pi") == 0) {
if (err != JVMTI_ERROR_TYPE_MISMATCH) {
- printf(" failure: JVMTI_ERROR_TYPE_MISMATCH is expected\n");
- result = STATUS_FAILED;
+ printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
+ printf(" failure: JVMTI_ERROR_TYPE_MISMATCH is expected\n");
+ result = STATUS_FAILED;
}
} else {
if (err != JVMTI_ERROR_INVALID_SLOT) {
+ printf(" GetLocalInt: %s (%d)\n", TranslateError(err), err);
printf(" failure: JVMTI_ERROR_INVALID_SLOT is expected\n");
result = STATUS_FAILED;
}
@@ -290,7 +332,7 @@
continue; /* Everything is Ok */
}
- printf(" failure: locations of vars with slot #2 are overlaped:\n");
+ printf(" failure: locations of vars with slot #2 are overlapped:\n");
print_LocalVariableEntry(&table[i]);
print_LocalVariableEntry(&table[j]);
overlap++;
@@ -298,8 +340,9 @@
}
}
if (!overlap) {
- printf("\n Succes: locations of vars with slot #2 are NOT overlaped\n\n");
+ printf("\n Success: locations of vars with slot #2 are NOT overlapped\n");
}
+ printf("\n checkLoc: END\n\n");
fflush(stdout);
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal004/getlocal004.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/GetLocalVariable/getlocal004/getlocal004.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -21,9 +21,6 @@
* questions.
*/
-/*
- */
-
#include <stdio.h>
#include <string.h>
#include "jvmti.h"
@@ -34,14 +31,12 @@
extern "C" {
-#define PASSED 0
+#define STATUS_PASSED 0
#define STATUS_FAILED 2
static jvmtiEnv *jvmti = NULL;
-static jvmtiCapabilities caps;
-static jint result = PASSED;
+static jint result = STATUS_PASSED;
static jboolean printdump = JNI_FALSE;
-static jmethodID mid = NULL;
void print_LocalVariableEntry(jvmtiLocalVariableEntry *lvt_elem) {
printf("\n Var name: %s, slot: %d", lvt_elem->name, lvt_elem->slot);
@@ -64,6 +59,7 @@
jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
jint res;
jvmtiError err;
+ static jvmtiCapabilities caps;
if (options != NULL && strcmp(options, "printdump") == 0) {
printdump = JNI_TRUE;
@@ -98,29 +94,31 @@
if (!caps.can_access_local_variables) {
printf("Warning: Access to local variables is not implemented\n");
+ return JNI_ERR;
}
-
+ if (!caps.can_access_local_variables) {
+ printf("Warning: Access to local variables is not implemented\n");
+ return JNI_ERR;
+ }
return JNI_OK;
}
JNIEXPORT void JNICALL
Java_nsk_jvmti_unit_GetLocalVariable_getlocal004_getMeth(JNIEnv *env, jclass cls) {
+ jmethodID mid = NULL;
+
if (jvmti == NULL) {
printf("JVMTI client was not properly loaded!\n");
result = STATUS_FAILED;
return;
}
- if (!caps.can_access_local_variables ||
- !caps.can_generate_method_exit_events) return;
-
mid = env->GetStaticMethodID(cls, "staticMeth", "(I)I");
if (mid == NULL) {
printf("Cannot find Method ID for staticMeth\n");
result = STATUS_FAILED;
return;
}
-
fflush(stdout);
}
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp Mon Nov 12 11:10:16 2018 +0530
@@ -163,7 +163,7 @@
} else if (strlen(msg_buf2) != 0) {
msg_buf2[strlen(msg_buf2)-1] = '\n'; // Make sure we have a newline char at the end.
}
- (void) nsk_printf("The following fake exception stacktrace is for failuire analysis. \n");
+ (void) nsk_printf("The following fake exception stacktrace is for failure analysis. \n");
(void) nsk_printf("nsk.share.Fake_Exception_for_RULE_Creation: ");
if (file != NULL) {
(void) nsk_printf("(%s:%d) ", file_basename(file), line);
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except011.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except011.java Mon Nov 12 11:10:16 2018 +0530
@@ -123,7 +123,7 @@
*/
private static int messages = 0;
- private static final String className = "nsk.stress.except.except011.except011oops";
+ private static final String className = "nsk.stress.except.except011oops";
/**
* Re-call to the method <code>run(out)</code> (ignore <code>args[]</code>),
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack001.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/stack/stack001.java Mon Nov 12 11:10:16 2018 +0530
@@ -34,7 +34,7 @@
* COMMENTS
* Kestrel for Solaris_JDK_1.3-b10 crashes while trying to execute
* this test with Client HS VM.
- * See lots of bugs concerning similar failuires:
+ * See lots of bugs concerning similar failures:
* Evaluated:
* 4217960 [native stack overflow bug] reflection test causes crash
* Accepted:
--- a/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jaxp/javax/xml/jaxp/unittest/stream/XMLStreamWriterTest/SurrogatesTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/ProblemList.txt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/ProblemList.txt Mon Nov 12 11:10:16 2018 +0530
@@ -878,14 +878,6 @@
############################################################################
-###########################################################################
-#
-# Java EE Module Removal
-#
-com/sun/jdi/RedefineCrossEvent.java 8194308 generic-all Java EE Module Removal
-
-############################################################################
-
# jdk_jfr
jdk/jfr/event/io/TestInstrumentation.java 8202142 generic-all
--- a/test/jdk/com/sun/jdi/RedefineCrossEvent.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/com/sun/jdi/RedefineCrossEvent.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, 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
@@ -27,9 +27,6 @@
* @summary Test class redefinition at each event cross tested with other tests
* @author Robert Field
*
- * @modules java.corba
- * jdk.jdi
- *
* @run build TestScaffold VMConnection TargetAdapter TargetListener
* @run compile -g AccessSpecifierTest.java
* @run compile -g AfterThreadDeathTest.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/com/sun/jdi/SetLocalWhileThreadInNative.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2018 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8212928
+ * @summary With NeedsDeoptSuspend == true the assertion in compiledVFrame::update_deferred_value() fails, because the frame is not deoptimized.
+ * @author Richard Reingruber richard DOT reingruber AT sap DOT com
+ *
+ * @library /test/lib
+ *
+ * @run build TestScaffold VMConnection TargetListener TargetAdapter
+ * @run main jdk.test.lib.FileInstaller compilerDirectives.json compilerDirectives.json
+ * @run compile -g SetLocalWhileThreadInNative.java
+ * @run driver SetLocalWhileThreadInNative -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+UnlockDiagnosticVMOptions -XX:CompilerDirectivesFile=compilerDirectives.json -XX:+PrintCompilation -XX:+PrintInlining
+ */
+
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+
+import com.sun.jdi.*;
+import com.sun.jdi.event.*;
+
+import jdk.test.lib.Asserts;
+
+/********** target program **********/
+
+class SetLocalWhileThreadInNativeTarget {
+
+ public static final String name = SetLocalWhileThreadInNativeTarget.class.getName();
+ public static FileInputStream fis;
+ public static int count;
+ public static int bytesRead;
+
+
+ // Let D (debugger) be a JVMTI agent that updates a local of a compiled frame F owned by
+ // thread T. In this test F corresponds to dontinline_testMethod.
+ //
+ // Issue: The VM thread executes an VM op on behalf of D to set the local in F. Doing so it
+ // requests the deoptimization of F and then calls compiledVFrame::update_deferred_value(),
+ // where frame::is_deoptimized_frame() returns false causing an assertion failure on SPARC where
+ // NeedsDeoptSuspend is true.
+ //
+ // Analysis: The deoptimization of F is requested, while T is in the native method
+ // java.io.FileInputStream::read0() and F is the direct caller of read0(). This is a special
+ // case with NeedsDeoptSuspend in frame::deoptimize(). Effectively the deoptimization is not
+ // done synchronously, instead T deoptimizes F at a later point upon return from the native
+ // method.
+ public static int dontinline_testMethod() {
+ int zero = 0;
+ int val = 0;
+ try {
+ val = fis.read(); // Will be inlined. Calls native method java.io.FileInputStream::read0()
+ count++;
+ } catch (IOException e) { /* ignored */ }
+ return val + zero;
+ }
+
+ public static void main(String[] args) {
+ System.out.println(name + " is up and running.");
+ fis = new FileInputStream(FileDescriptor.in);
+ bytesRead=0;
+ while (true) {
+ int val = dontinline_testMethod();
+ if (val == SetLocalWhileThreadInNative.STOP) {
+ System.out.println("Debuggee: received STOP message");
+ System.exit(0);
+ }
+ bytesRead++;
+ if ((bytesRead & ((1L << 14)-1)) == 0) {
+ System.out.println("Called test method " + bytesRead + " times");
+ }
+ }
+ }
+}
+
+ /********** test program **********/
+
+public class SetLocalWhileThreadInNative extends TestScaffold {
+ public static final int MESSAGE_COUNT = 10000;
+ public static final String MESSAGE = "0123456789";
+ public static final int MESSAGE_SIZE = MESSAGE.length();
+ public static final int TOTAL_BYTES = MESSAGE_COUNT * MESSAGE_SIZE;
+ public static final int STOP = 255;
+
+ ReferenceType mainClass;
+ ThreadReference mainThread;
+
+ SetLocalWhileThreadInNative (String args[]) {
+ super(args);
+ }
+
+ public static void main(String[] args)
+ throws Exception
+ {
+ new SetLocalWhileThreadInNative (args).startTests();
+ }
+
+ /********** test core **********/
+
+ protected void runTests()
+ throws Exception
+ {
+ String targetProgName = SetLocalWhileThreadInNativeTarget.class.getName();
+ String testName = getClass().getSimpleName();
+
+ // Start debuggee and obtain reference to main thread an main class
+ BreakpointEvent bpe = startToMain(targetProgName);
+ mainClass = bpe.location().declaringType();
+ mainThread = bpe.thread();
+
+ // Resume debuggee send some bytes
+ vm().resume();
+ OutputStream os = vm().process().getOutputStream();
+ byte[] ba = MESSAGE.getBytes();
+ for (int i = 0; i < MESSAGE_COUNT; i++) {
+ os.write(ba);
+ }
+ os.flush();
+
+ // Wait for the debugee to read all the bytes.
+ int bytesRead = 0;
+ Field bytesReadField = mainClass.fieldByName("bytesRead");
+ do {
+ bytesRead = ((PrimitiveValue)mainClass.getValue(bytesReadField)).intValue();
+ System.out.println("debugee has read " + bytesRead + " of " + TOTAL_BYTES);
+ Thread.sleep(500);
+ } while (bytesRead < TOTAL_BYTES);
+
+ // By now dontinline_testMethod() will be compiled. The debugee will be blocked in java.io.FileInputStream::read0().
+ // Now set local variable in dontinline_testMethod().
+ vm().suspend();
+ System.out.println("Debuggee Stack:");
+ List<StackFrame> stack_frames = mainThread.frames();
+ int i = 0;
+ for (StackFrame ff : stack_frames) {
+ System.out.println("frame[" + i++ +"]: " + ff.location().method());
+ }
+ StackFrame frame = mainThread.frame(2);
+ Asserts.assertEQ(frame.location().method().toString(), "SetLocalWhileThreadInNativeTarget.dontinline_testMethod()");
+ List<LocalVariable> localVars = frame.visibleVariables();
+ boolean changedLocal = false;
+ for (LocalVariable lv : localVars) {
+ if (lv.name().equals("zero")) {
+ frame.setValue(lv, vm().mirrorOf(0)); // triggers deoptimization!
+ changedLocal = true;
+ }
+ }
+ Asserts.assertTrue(changedLocal);
+
+ // signal stop
+ os.write(STOP);
+ os.flush();
+
+
+ // resume the target listening for events
+ listenUntilVMDisconnect();
+
+
+ // deal with results of test if anything has called failure("foo")
+ // testFailed will be true
+ if (!testFailed) {
+ println(testName + ": passed");
+ } else {
+ throw new Exception(testName + ": failed");
+ }
+ }
+}
--- a/test/jdk/com/sun/jdi/TestScaffold.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/com/sun/jdi/TestScaffold.java Mon Nov 12 11:10:16 2018 +0530
@@ -542,7 +542,9 @@
redefine(mainStartClass);
}
} else {
- redefine(rt);
+ if (!name.startsWith("jdk.")) {
+ redefine(rt);
+ }
}
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/com/sun/jdi/compilerDirectives.json Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+[
+ {
+ match: "*.*",
+
+ c1: {
+ // control inlining of method
+ // + force inline, - dont inline
+ inline : "-*.dontinline_*",
+ },
+
+ c2: {
+ // control inlining of method
+ // + force inline, - dont inline
+ inline : "-*.dontinline_*",
+ }
+ },
+]
--- a/test/jdk/java/io/Serializable/serialFilter/CheckArrayTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/io/Serializable/serialFilter/CheckArrayTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -28,11 +28,8 @@
import java.io.ObjectInputStream;
import java.io.InvalidClassException;
-import java.util.Hashtable;
+import jdk.internal.access.SharedSecrets;
-import jdk.internal.misc.SharedSecrets;
-
-import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.testng.Assert;
@@ -40,7 +37,7 @@
/* @test
* @build CheckArrayTest SerialFilterTest
* @bug 8203368
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* @run testng CheckArrayTest
*
* @summary Test the SharedSecret access to ObjectInputStream.checkArray works
--- a/test/jdk/java/lang/Class/GenericStringTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/Class/GenericStringTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6298888 6992705 8161500
+ * @bug 6298888 6992705 8161500 6304578
* @summary Check Class.toGenericString()
* @author Joseph D. Darcy
*/
@@ -43,12 +43,20 @@
String[][] nested = {{""}};
int[][] intArray = {{1}};
- failures += checkToGenericString(int.class, "int");
- failures += checkToGenericString(void.class, "void");
- failures += checkToGenericString(args.getClass(), "java.lang.String[]");
- failures += checkToGenericString(nested.getClass(), "java.lang.String[][]");
- failures += checkToGenericString(intArray.getClass(), "int[][]");
- failures += checkToGenericString(java.util.Map.class, "public abstract interface java.util.Map<K,V>");
+ Map<Class<?>, String> testCases =
+ Map.of(int.class, "int",
+ void.class, "void",
+ args.getClass(), "java.lang.String[]",
+ nested.getClass(), "java.lang.String[][]",
+ intArray.getClass(), "int[][]",
+ java.lang.Enum.class, "public abstract class java.lang.Enum<E extends java.lang.Enum<E>>",
+ java.util.Map.class, "public abstract interface java.util.Map<K,V>",
+ java.util.EnumMap.class, "public class java.util.EnumMap<K extends java.lang.Enum<K>,V>",
+ java.util.EventListenerProxy.class, "public abstract class java.util.EventListenerProxy<T extends java.util.EventListener>");
+
+ for (Map.Entry<Class<?>, String> testCase : testCases.entrySet()) {
+ failures += checkToGenericString(testCase.getKey(), testCase.getValue());
+ }
Field f = GenericStringTest.class.getDeclaredField("mixed");
// The expected value includes "<K,V>" rather than
@@ -74,7 +82,7 @@
private static int checkToGenericString(Class<?> clazz, String expected) {
String genericString = clazz.toGenericString();
if (!genericString.equals(expected)) {
- System.err.printf("Unexpected Class.toGenericString output; expected '%s', got '%s'.%n",
+ System.err.printf("Unexpected Class.toGenericString output; expected %n\t'%s',%n got %n\t'%s'.%n",
expected,
genericString);
return 1;
--- a/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/ModuleLayer/BasicLayerTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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
@@ -24,7 +24,7 @@
/**
* @test
* @library /test/lib
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* @build BasicLayerTest
* jdk.test.lib.util.ModuleUtils
* @compile layertest/Test.java
@@ -38,13 +38,12 @@
import java.lang.module.ModuleFinder;
import java.util.HashMap;
import java.util.Map;
-import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import jdk.test.lib.util.ModuleUtils;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
--- a/test/jdk/java/lang/ProcessBuilder/Basic.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/ProcessBuilder/Basic.java Mon Nov 12 11:10:16 2018 +0530
@@ -36,6 +36,13 @@
* @author Martin Buchholz
*/
+/*
+ * @test
+ * @modules java.base/java.lang:open
+ * @requires (os.family == "linux")
+ * @run main/othervm/timeout=300 -Djdk.lang.Process.launchMechanism=posix_spawn Basic
+ */
+
import java.lang.ProcessBuilder.Redirect;
import java.lang.ProcessHandle;
import static java.lang.ProcessBuilder.Redirect.*;
--- a/test/jdk/java/lang/StackWalker/VerifyStackTrace.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/StackWalker/VerifyStackTrace.java Mon Nov 12 11:10:16 2018 +0530
@@ -71,7 +71,7 @@
"3: VerifyStackTrace$Handle.run(VerifyStackTrace.java:158)\n" +
"4: VerifyStackTrace.invoke(VerifyStackTrace.java:188)\n" +
"5: VerifyStackTrace$1.run(VerifyStackTrace.java:218)\n" +
- "6: java.base/java.security.AccessController.doPrivileged(Native Method)\n" +
+ "6: java.base/java.security.AccessController.doPrivileged(AccessController.java:310)\n" +
"7: VerifyStackTrace.test(VerifyStackTrace.java:227)\n" +
"8: VerifyStackTrace.main(VerifyStackTrace.java:182)\n";
@@ -105,7 +105,7 @@
"7: java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n" +
"8: java.base/java.lang.reflect.Method.invoke(Method.java:520)\n" +
"9: VerifyStackTrace$1.run(VerifyStackTrace.java:220)\n" +
- "10: java.base/java.security.AccessController.doPrivileged(Native Method)\n" +
+ "10: java.base/java.security.AccessController.doPrivileged(AccessController.java:310)\n" +
"11: VerifyStackTrace.test(VerifyStackTrace.java:229)\n" +
"12: VerifyStackTrace.main(VerifyStackTrace.java:185)\n";
@@ -142,9 +142,10 @@
"10: java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n" +
"11: java.base/java.lang.reflect.Method.invoke(Method.java:520)\n" +
"12: VerifyStackTrace$1.run(VerifyStackTrace.java:222)\n" +
- "13: java.base/java.security.AccessController.doPrivileged(Native Method)\n" +
- "14: VerifyStackTrace.test(VerifyStackTrace.java:231)\n" +
- "15: VerifyStackTrace.main(VerifyStackTrace.java:188)\n";
+ "13: java.base/java.security.AccessController.executePrivileged(AccessController.java:759)\n" +
+ "14: java.base/java.security.AccessController.doPrivileged(AccessController.java:310)\n" +
+ "15: VerifyStackTrace.test(VerifyStackTrace.java:231)\n" +
+ "16: VerifyStackTrace.main(VerifyStackTrace.java:188)\n";
@Override public StackWalker walker() { return walker;}
@Override public String description() { return description;}
--- a/test/jdk/java/lang/System/ClearProperty.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4463345
- * @summary Simple test of System.clearProperty
- * @run main/othervm ClearProperty
- */
-
-public class ClearProperty {
- public static void main(String [] argv) throws Exception {
- clearTest();
- paramTest();
- }
-
- static void clearTest() throws Exception {
- System.setProperty("blah", "blech");
- if (!System.getProperty("blah").equals("blech"))
- throw new RuntimeException("Clear test failed 1");
- System.clearProperty("blah");
- if (System.getProperty("blah") != null)
- throw new RuntimeException("Clear test failed 2");
- }
-
- static void paramTest() throws Exception {
- try {
- System.clearProperty(null);
- throw new RuntimeException("Param test failed");
- } catch (NullPointerException npe) {
- // Correct result
- }
- try {
- System.clearProperty("");
- throw new RuntimeException("Param test failed");
- } catch (IllegalArgumentException iae) {
- // Correct result
- }
- }
-}
--- a/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/SystemLoggerInPlatformLoader.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/systempkg/log/SystemLoggerAccessor.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/internal/SystemLoggerInPlatformLoader/systempkg/log/SystemLoggerAccessor.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/Base.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/Base.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForImageTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/JDKLoggerForJDKTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/LoggerInImageTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForImageTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/NamedLoggerForJDKTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForImageTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/UnnamedLoggerForJDKTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/boot_client/BootClient.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/boot_usage/BootUsage.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/boot_usage/BootUsage.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_client/m.t.a/pkg/a/t/TestA.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/l/LoggerA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/l/LoggerA.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/p/LoggerFinderA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/named_logger/m.l.a/pkg/a/p/LoggerFinderA.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/patched_client/PatchedClient.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/patched_usage/java.base/java/lang/PatchedUsage.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/patched_usage/java.base/java/lang/PatchedUsage.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_client/pkg/b/t/TestB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/l/LoggerB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/l/LoggerB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/p/LoggerFinderB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/System/LoggerFinder/modules/unnamed_logger/pkg/b/p/LoggerFinderB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/System/PropertyTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.lang.System;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Properties;
+import java.util.stream.Collectors;
+
+import org.testng.Assert;
+import org.testng.IMethodInstance;
+import org.testng.IMethodInterceptor;
+import org.testng.TestListenerAdapter;
+import org.testng.TestNG;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+
+/*
+ * @test
+ * @bug 4463345 4244670 8030781
+ * @summary Simple test of System getProperty, setProperty, clearProperty,
+ * getProperties, and setProperties
+ * @run testng/othervm PropertyTest
+ */
+
+@Test
+public class PropertyTest {
+
+ @DataProvider(name = "requiredProperties")
+ static Object[][] requiredProperties() {
+ return new Object[][]{
+ {"java.version"},
+ {"java.version.date"},
+ {"java.vendor"},
+ {"java.vendor.url"},
+ {"java.home"},
+ {"java.vm.specification.version"},
+ {"java.vm.specification.vendor"},
+ {"java.vm.specification.name"},
+ {"java.vm.version"},
+ {"java.vm.vendor"},
+ {"java.vm.name"},
+ {"java.specification.version"},
+ {"java.specification.vendor"},
+ {"java.specification.name"},
+ {"java.class.version"},
+ {"java.class.path"},
+ {"java.library.path"},
+ {"java.io.tmpdir"},
+ {"os.arch"},
+ {"os.version"},
+ {"file.separator"},
+ {"path.separator"},
+ {"line.separator"},
+ {"user.name"},
+ {"user.home"},
+ {"user.dir"},
+ {"java.runtime.version"},
+ {"java.runtime.name"},
+ };
+ }
+
+ @Test
+ static void getTest() {
+ System.setProperty("blah", "blech");
+ Assert.assertEquals(System.getProperty("blah"), "blech");
+
+ try {
+ System.getProperty(null);
+ Assert.fail("Failed: expected NullPointerException");
+ } catch (NullPointerException npe) {
+ // Correct result
+ }
+ try {
+ System.getProperty("");
+ Assert.fail("Failed: expected IllegalArgumentException");
+ } catch (IllegalArgumentException iae) {
+ // Correct result
+ }
+ }
+
+ @Test
+ static void clearTest() {
+ System.setProperty("blah", "blech");
+ Assert.assertEquals(System.getProperty("blah"), "blech");
+
+ System.clearProperty("blah");
+ Assert.assertNull(System.getProperty("blah"));
+
+ try {
+ System.clearProperty(null);
+ Assert.fail("Failed: expected NullPointerException");
+ } catch (NullPointerException npe) {
+ // Correct result
+ }
+ try {
+ System.clearProperty("");
+ Assert.fail("Failed: expected IllegalArgumentException");
+ } catch (IllegalArgumentException iae) {
+ // Correct result
+ }
+ }
+
+ @Test
+ static void setTest() {
+ System.setProperty("blah", "blech");
+ Assert.assertEquals(System.getProperty("blah"), "blech");
+
+ System.setProperty("blah", "");
+ Assert.assertEquals(System.getProperty("blah"), "");
+
+ try {
+ System.setProperty(null, null);
+ Assert.fail("Failed: expected NullPointerException");
+ } catch (NullPointerException npe) {
+ // Correct result
+ }
+
+ try {
+ System.setProperty("blah", null);
+ Assert.fail("Failed: expected NullPointerException");
+ } catch (NullPointerException npe) {
+ // Correct result
+ }
+
+ try {
+ System.setProperty(null, "blech");
+ Assert.fail("Failed: expected NullPointerException");
+ } catch (NullPointerException npe) {
+ // Correct result
+ }
+
+ try {
+ System.setProperty("", "blech");
+ Assert.fail("Failed: expected IllegalArgumentException");
+ } catch (IllegalArgumentException iae) {
+ // Correct result
+ }
+ try {
+ System.setProperty("", "");
+ Assert.fail("Failed: expected IllegalArgumentException");
+ } catch (IllegalArgumentException iae) {
+ // Correct result
+ }
+ }
+
+ @Test
+ static void replaceSetProperties() {
+ Properties oldProps = System.getProperties();
+ Properties newProps = new Properties();
+ oldProps.forEach( (k,v) -> newProps.put(k,v));
+ System.setProperties(newProps);
+
+ Assert.assertSame(System.getProperties(), newProps,
+ "getProperties not the same as setProperties");
+
+ final String KEY = "blah";
+ final String VALUE = "blech";
+
+ // Set via Property instance; get via System methods
+ newProps.setProperty(KEY, VALUE);
+ Assert.assertEquals(System.getProperty(KEY), VALUE, KEY);
+
+ String s = (String)newProps.remove(KEY);
+ Assert.assertEquals(s, VALUE);
+ Assert.assertNull(System.getProperty(KEY), KEY);
+
+ // Set via System methods; Get via Property instance;
+ System.setProperty(KEY, VALUE);
+ Assert.assertEquals(newProps.getProperty(KEY), VALUE);
+
+ String t = System.clearProperty(KEY);
+ Assert.assertEquals(t, VALUE, KEY);
+ Assert.assertNull(newProps.getProperty(KEY), KEY);
+ }
+
+ @Test
+ static void setNullProperties() {
+ Properties oldProps = System.getProperties();
+ Properties savedProps = new Properties();
+ oldProps.forEach((k,v) -> {
+ if (v == null) {
+ throw new RuntimeException("null value, key: " + k);
+ }
+ savedProps.put(k,v);
+ });
+
+ // Re-initialize properties
+ System.setProperties(null);
+
+ Properties newProps = System.getProperties();
+ Object[][] propnames = requiredProperties();
+ for (Object[] p : propnames) {
+ String name = (String)p[0];
+ Assert.assertEquals(System.getProperty(name), savedProps.getProperty(name), name);
+
+ Assert.assertEquals(newProps.getProperty(name), savedProps.getProperty(name), name);
+ }
+ }
+
+ // Verify all the required properties have values from System.getProperty and
+ // System.getProperties()
+ @Test(dataProvider = "requiredProperties")
+ static void checkRequiredProperties(String name) {
+ Assert.assertNotNull(System.getProperty(name), name);
+
+ Properties props = System.getProperties();
+ Assert.assertNotNull(props.getProperty(name), name);
+ }
+
+ @SuppressWarnings("raw_types")
+ @Test(enabled=false)
+ public static void main(String[] args) {
+ TestListenerAdapter tla = new TestListenerAdapter();
+
+ Class<?>[] testclass = {PropertyTest.class};
+ TestNG testng = new TestNG();
+ testng.setTestClasses(testclass);
+ testng.addListener(tla);
+ if (args.length > 0) {
+ IMethodInterceptor intercept = (m, c) -> {
+ List<IMethodInstance> x = m.stream()
+ .filter(m1 -> m1.getMethod().getMethodName().contains(args[0]))
+ .collect(Collectors.toList());
+ return x;
+ };
+ testng.setMethodInterceptor(intercept);
+ }
+ testng.run();
+ tla.getPassedTests()
+ .stream().forEach(t -> System.out.printf("Passed: %s%s%n", t.getName(),
+ List.of(t.getParameters())));
+ tla.getFailedTests()
+ .stream().forEach(t -> System.out.printf("Failed: %s%s%n", t.getName(),
+ List.of(t.getParameters())));
+ }
+}
--- a/test/jdk/java/lang/System/SetPropertiesNull.java Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This class tests to see if the system property java.version is properly
- * reinitialized after setting System.setProperties(null).
- *
- * @test
- * @bug 4244670 8030781
- * @summary Test for System.setProperties(null).
- */
-
-public class SetPropertiesNull {
-
- public static void main(String args[]) {
- final String version = System.getProperty("java.version");
- System.setProperties(null);
- final String newVersion = System.getProperty("java.version");
- if (!version.equals(newVersion)) {
- throw new RuntimeException("java.version differs: '" + version + "' '"
- + newVersion + "'");
- }
- }
-}
--- a/test/jdk/java/lang/module/ConfigurationTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/module/ConfigurationTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, 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
@@ -24,7 +24,7 @@
/**
* @test
* @library /test/lib
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.module
* @build ConfigurationTest
* jdk.test.lib.util.ModuleUtils
@@ -45,12 +45,11 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
-import java.util.Optional;
import java.util.Set;
import jdk.test.lib.util.ModuleUtils;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;
import jdk.internal.module.ModuleTarget;
import org.testng.annotations.DataProvider;
--- a/test/jdk/java/lang/module/ModuleDescriptorTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/module/ModuleDescriptorTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -23,8 +23,8 @@
/**
* @test
- * @modules java.base/jdk.internal.module
- * java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
+ * java.base/jdk.internal.module
* @run testng ModuleDescriptorTest
* @summary Basic test for java.lang.module.ModuleDescriptor and its builder
*/
@@ -49,14 +49,13 @@
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
-import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import static java.lang.module.ModuleDescriptor.Requires.Modifier.*;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
--- a/test/jdk/java/lang/module/ModuleNamesTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/module/ModuleNamesTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, 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
@@ -23,7 +23,7 @@
/**
* @test
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.module
* @run testng ModuleNamesTest
* @summary Basic test of reading a module-info.class with module names that
@@ -41,7 +41,7 @@
import java.util.Optional;
import java.util.Set;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
import jdk.internal.module.ModuleInfoWriter;
import org.testng.annotations.DataProvider;
--- a/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/reflect/Constructor/GenericStringTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 5033583 6316717 6470106 8161500 8162539
+ * @bug 5033583 6316717 6470106 8161500 8162539 6304578
* @summary Check toGenericString() and toString() methods
* @author Joseph D. Darcy
*/
@@ -87,7 +87,13 @@
protected <S, T> TestClass1(S s, T t) throws Exception{}
@ExpectedGenericString(
- "<E> TestClass1() throws E")
+ "protected <V extends java.lang.Number & java.lang.Runnable> TestClass1(V)")
+ @ExpectedString(
+ "protected TestClass1(java.lang.Number)")
+ protected <V extends Number & Runnable> TestClass1(V v){}
+
+ @ExpectedGenericString(
+ "<E extends java.lang.Exception> TestClass1() throws E")
@ExpectedString(
"TestClass1() throws java.lang.Exception")
<E extends Exception> TestClass1() throws E {}
--- a/test/jdk/java/lang/reflect/Method/GenericStringTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/lang/reflect/Method/GenericStringTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, 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
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 5033583 6316717 6470106 8004979 8161500 8162539
+ * @bug 5033583 6316717 6470106 8004979 8161500 8162539 6304578
* @summary Check toGenericString() and toString() methods
* @author Joseph D. Darcy
*/
@@ -103,6 +103,10 @@
@ExpectedGenericString(
"protected <S,T> S TestClass1.method4(S,T) throws java.lang.Exception")
protected <S, T> S method4(S s, T t) throws Exception {return null;}
+
+ @ExpectedGenericString(
+ "public static <T> T TestClass1.max(java.util.Collection<? extends T>,java.util.Comparator<? super T>)")
+ public static <T> T max(Collection<? extends T> coll, Comparator<? super T> comp) {return null;}
}
class TestClass2<E, F extends Exception> {
@@ -139,6 +143,10 @@
@ExpectedGenericString(
"public <K,V> java.util.Map<K, V> TestClass2.method8()")
public <K, V> Map<K, V> method8() {return null;}
+
+ @ExpectedGenericString(
+ "public <V extends java.lang.Number & java.lang.Runnable> java.util.Set<V> TestClass2.method9(V)")
+ public <V extends Number & Runnable> Set<V> method9(V v) {return null;}
}
class Roebling implements Comparable<Roebling> {
--- a/test/jdk/java/math/BigInteger/PrimeTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/math/BigInteger/PrimeTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestClient.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestClient.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTestServer.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/Inet6Address/serialize/Inet6AddressSerTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/InetAddress/getOriginalHostName.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/InetAddress/getOriginalHostName.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,13 @@
* @test
* @bug 8133196
* @summary test functionality of getOriginalHostName(InetAddress)
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
*/
-import java.io.*;
import java.net.InetAddress;
-import jdk.internal.misc.JavaNetInetAddressAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaNetInetAddressAccess;
+import jdk.internal.access.SharedSecrets;
public class getOriginalHostName {
--- a/test/jdk/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/MulticastSocket/NetworkInterfaceEmptyGetInetAddressesTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/SocketImpl/ImplSupportedOptions.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8213418
+ * @summary Ensure correct impl supported socket options
+ * @run testng ImplSupportedOptions
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketAddress;
+import java.net.SocketException;
+import java.net.SocketImpl;
+import java.net.SocketOption;
+import java.net.StandardSocketOptions;
+import java.util.Set;
+import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+public class ImplSupportedOptions {
+
+ @Test
+ public void socketSupportedOptions() throws Exception {
+ Socket s = new Socket();
+ Set<?> standardOptions = s.supportedOptions();
+ assertTrue(standardOptions.contains(StandardSocketOptions.SO_LINGER),
+ "Expected SO_LINGER, in:" + standardOptions);
+ assertEquals(standardOptions, s.supportedOptions());
+ assertEquals(standardOptions, s.supportedOptions());
+
+ s = new DummySocket();
+ Set<?> dummyOptions = s.supportedOptions();
+ assertEquals(dummyOptions.size(), 1);
+ assertTrue(dummyOptions.contains(DummySocketImpl.SOCKET_OPT));
+ assertEquals(dummyOptions, s.supportedOptions());
+ assertEquals(dummyOptions, s.supportedOptions());
+
+ s = new Socket();
+ standardOptions = s.supportedOptions();
+ assertTrue(standardOptions.contains(StandardSocketOptions.SO_LINGER),
+ "Expected SO_LINGER, in:" + standardOptions);
+ assertEquals(standardOptions, s.supportedOptions());
+ assertEquals(standardOptions, s.supportedOptions());
+
+ s = new DummySocket();
+ dummyOptions = s.supportedOptions();
+ assertEquals(dummyOptions.size(), 1);
+ assertTrue(dummyOptions.contains(DummySocketImpl.SOCKET_OPT));
+ assertEquals(dummyOptions, s.supportedOptions());
+ assertEquals(dummyOptions, s.supportedOptions());
+ }
+
+ @Test
+ public void serverSocketSupportedOptions() throws Exception {
+ ServerSocket s = new ServerSocket();
+ Set<?> standardOptions = s.supportedOptions();
+ assertTrue(standardOptions.contains(StandardSocketOptions.SO_REUSEADDR),
+ "Expected SO_REUSEADDR, in:" + standardOptions);
+ assertEquals(standardOptions, s.supportedOptions());
+ assertEquals(standardOptions, s.supportedOptions());
+
+ s = new DummyServerSocket();
+ Set<?> dummyOptions = s.supportedOptions();
+ assertEquals(dummyOptions.size(), 1);
+ assertTrue(dummyOptions.contains(DummySocketImpl.SOCKET_OPT));
+ assertEquals(dummyOptions, s.supportedOptions());
+ assertEquals(dummyOptions, s.supportedOptions());
+
+ s = new ServerSocket();
+ standardOptions = s.supportedOptions();
+ assertTrue(standardOptions.contains(StandardSocketOptions.SO_REUSEADDR),
+ "Expected SO_REUSEADDR, in:" + standardOptions);
+ assertEquals(standardOptions, s.supportedOptions());
+ assertEquals(standardOptions, s.supportedOptions());
+
+ s = new DummyServerSocket();
+ dummyOptions = s.supportedOptions();
+ assertEquals(dummyOptions.size(), 1);
+ assertTrue(dummyOptions.contains(DummySocketImpl.SOCKET_OPT));
+ assertEquals(dummyOptions, s.supportedOptions());
+ assertEquals(dummyOptions, s.supportedOptions());
+ }
+
+ static class DummySocket extends Socket {
+ DummySocket() throws IOException {
+ super(new DummySocketImpl());
+ }
+ }
+
+ static class DummyServerSocket extends ServerSocket {
+ DummyServerSocket() throws IOException {
+ super(new DummySocketImpl());
+ }
+ }
+
+ static class DummySocketImpl extends SocketImpl {
+
+ public static final SocketOption<String> SOCKET_OPT =
+ new ImplSocketOption<>("SOCKET_OPT", String.class);
+
+ private static class ImplSocketOption<T> implements SocketOption<T> {
+ private final String name;
+ private final Class<T> type;
+ ImplSocketOption(String name, Class<T> type) {
+ this.name = name;
+ this.type = type;
+ }
+ @Override public String name() { return name; }
+ @Override public Class<T> type() { return type; }
+ @Override public String toString() { return name; }
+ }
+
+ private final Set<SocketOption<?>> SO = Set.of(SOCKET_OPT);
+
+ @Override
+ public Set<SocketOption<?>> supportedOptions() { return SO; }
+
+ // ---
+
+ @Override
+ protected void create(boolean stream) throws IOException { }
+
+ @Override
+ protected void connect(String host, int port) throws IOException { }
+
+ @Override
+ protected void connect(InetAddress address, int port) throws IOException { }
+
+ @Override
+ protected void connect(SocketAddress address, int timeout) throws IOException { }
+
+ @Override
+ protected void bind(InetAddress host, int port) throws IOException { }
+
+ @Override
+ protected void listen(int backlog) throws IOException { }
+
+ @Override
+ protected void accept(SocketImpl s) throws IOException { }
+
+ @Override
+ protected InputStream getInputStream() throws IOException { return null; }
+
+ @Override
+ protected OutputStream getOutputStream() throws IOException { return null; }
+
+ @Override
+ protected int available() throws IOException { return 0; }
+
+ @Override
+ protected void close() throws IOException { }
+
+ @Override
+ protected void sendUrgentData(int data) throws IOException { }
+
+ @Override
+ public void setOption(int optID, Object value) throws SocketException { }
+
+ @Override
+ public Object getOption(int optID) throws SocketException { return null; }
+ }
+}
--- a/test/jdk/java/net/URLConnection/ContentHandlers/plain.template Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/URLConnection/ContentHandlers/plain.template Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/httpclient/DigestEchoServer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/httpclient/DigestEchoServer.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/httpclient/ProxyAuthTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/httpclient/ProxyAuthTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/net/httpclient/http2/server/Queue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/net/httpclient/http2/server/Queue.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/nio/channels/SelectionKey/AtomicUpdates.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/nio/channels/SelectionKey/AtomicUpdates.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/nio/channels/SocketChannel/AsyncCloseChannel.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, 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
@@ -24,13 +24,16 @@
/* @test
* @bug 6285901 6501089
* @summary Check no data is written to wrong socket channel during async closing.
- * @author Xueming Shen
+ * @run main/othervm AsyncCloseChannel
*/
-import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.net.*;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.nio.ByteBuffer;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.SocketChannel;
public class AsyncCloseChannel {
static volatile boolean failed = false;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/file/Files/Mismatch.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,414 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.FileSystem;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.spi.FileSystemProvider;
+import java.util.Map;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+/* @test
+ * @bug 8202285
+ * @build Mismatch
+ * @run testng Mismatch
+ * @summary Unit test for the Files.mismatch method.
+ */
+public class Mismatch {
+ // the standard buffer size
+ final static int BUFFER_SIZE = 8192;
+
+ private static final int MISMATCH_NO = -1;
+
+ // Map to be used for creating a ZIP archive
+ private static final Map<String, String> ZIPFS_MAP = Map.of("create", "true");
+
+ // temporary test directory where all test files will be created
+ Path testDir;
+
+ @BeforeClass
+ void setup() throws IOException {
+ testDir = Files.createTempDirectory("testMismatch");
+ }
+
+ @AfterClass
+ void cleanup() throws IOException {
+ // clean up files created under the test directory
+ Files.walk(testDir).map(Path::toFile).forEach(File::delete);
+ Files.deleteIfExists(testDir);
+ }
+
+ /*
+ * DataProvider for mismatch test. Provides the following fields:
+ * path1 -- the path to a file
+ * path2 -- the path to another file
+ * expected -- expected result of the mismatch method
+ * note -- a note about the test
+ */
+ @DataProvider(name = "testMismatch")
+ public Object[][] getDataForMismatch() throws IOException {
+ // an non-existent file
+ Path foo = Paths.get("nonexistentfile");
+
+ /**
+ * File path naming convention:
+ * "test" + file size + [abm] [+ position of a modified char] + [ab]
+ * where:
+ * a or b -- is used to differentiate two files of the same size.
+ * m -- indicates the file is modified at the position specified after it
+ */
+
+ // create empty files
+ int size = 0;
+ Path test0a = createASCIIFile(testDir, "test0a", 0, -1, ' ');
+ Path test0b = createASCIIFile(testDir, "test0b", 0, -1, ' ');
+
+ /**
+ * Since the Impl uses a standard buffer of 8192, the test files are created
+ * with sizes <= and > 8192, either multiples of the buffer size, or random.
+ * The files are then altered at the begining (0), end (size), and a random
+ * position.
+ */
+ size = 147;
+ Path test147a = createASCIIFile(testDir, "test147a", size, -1, ' ');
+ Path test147b = createASCIIFile(testDir, "test147b", size, -1, ' ');
+ Path test147m0 = createASCIIFile(testDir, "test147m0", size, 0, '!');
+ Path test147m70 = createASCIIFile(testDir, "test147m70", size, 70, '@');
+ Path test147m146 = createASCIIFile(testDir, "test147m146", size, size - 1, '$');
+
+ size = 1024;
+ Path test1024a = createASCIIFile(testDir, "test1024a", size, -1, ' ');
+ Path test1024b = createASCIIFile(testDir, "test1024b", size, -1, ' ');
+ Path test1024m512 = createASCIIFile(testDir, "test1024m512", size, size >> 1, '@');
+ Path test1024m1023 = createASCIIFile(testDir, "test1024m1023", size, size - 1, '$');
+
+ size = BUFFER_SIZE;
+ Path test8192a = createASCIIFile(testDir, "test8192a", size, -1, ' ');
+ Path test8192b = createASCIIFile(testDir, "test8192b", size, -1, ' ');
+ Path test8192m4096 = createASCIIFile(testDir, "test8192m4096", size, size >> 1, '%');
+ Path test8192m8191 = createASCIIFile(testDir, "test8192m8191", size, size - 1, '$');
+
+
+ // create files with size several times > BUFFER_SIZE to be used for tests that verify
+ // the situations where they are read into full buffers a few times
+ size = BUFFER_SIZE << 3;
+ Path test65536a = createASCIIFile(testDir, "test65536a", size, -1, ' ');
+ Path test65536b = createASCIIFile(testDir, "test65536b", size, -1, ' ');
+ Path test65536m0 = createASCIIFile(testDir, "test65536m0", size, 0, '!');
+ Path test65536m32768 = createASCIIFile(testDir, "test65536m32768", size, size >> 1, '%');
+ Path test65536m65535 = createASCIIFile(testDir, "test65536m65535", size, size - 1, '$');
+
+ // create files with sizes that will be iterated several times with full buffers, and
+ // then a partial one at the last
+ size = 70025;
+ Path test70025a = createASCIIFile(testDir, "test70025a", size, -1, ' ');
+ Path test70025b = createASCIIFile(testDir, "test70025b", size, -1, ' ');
+ Path test70025m8400 = createASCIIFile(testDir, "test70025m8400", size, 8400, '@');
+ Path test70025m35000 = createASCIIFile(testDir, "test70025m35000", size, 35000, '%');
+ Path test70025m70024 = createASCIIFile(testDir, "test70025m70024", size, 70024, '$');
+
+ // create larger files with >= 1048576. The mismatching will be similar. These are just
+ // tests to exercise the process with larger files
+ size = 1048576;
+ Path test1048576a = createASCIIFile(testDir, "test1048576a", size, -1, ' ');
+
+ size = 1065000;
+ Path test1065000m532500 = createASCIIFile(testDir, "test1065000m532500", size, size >> 1, '%');
+ Path test1065000m1064999 = createASCIIFile(testDir, "test1065000m1064999", size, 1064999, '$');
+
+ return new Object[][]{
+ // Spec Case 1: the two paths locate the same file , even if one does not exist
+ {foo, foo, MISMATCH_NO, "Same file, no mismatch"},
+ {test1024a, test1024a, MISMATCH_NO, "Same file, no mismatch"},
+
+ // Spec Case 2: The two files are the same size, and every byte in the first file
+ // is identical to the corresponding byte in the second file.
+ {test0a, test0b, MISMATCH_NO, "Sizes == 0, no mismatch"},
+ {test147a, test147b, MISMATCH_NO, "size = 147 < buffer = 8192, no mismatch"},
+ {test1024a, test1024b, MISMATCH_NO, "size = 1024 < buffer = 8192, no mismatch"},
+ {test8192a, test8192b, MISMATCH_NO, "size = 8192 = buffer = 8192, no mismatch"},
+ {test65536a, test65536b, MISMATCH_NO, "read 8 * full buffer, no mismatch"},
+ {test70025a, test70025b, MISMATCH_NO, "read 8 * full buffer plus a partial buffer, no mismatch"},
+
+
+ /**
+ * Spec Case 3: the value returned is the position of the first mismatched byte
+ * Impl: the impl uses a buffer 8192. The testcases below covers a range of files
+ * with sizes <= and > the buffer size. The last buffer is either full or partially full.
+ */
+
+ // edge case, one of the file sizes is zero
+ // also covers Spec Case 4 and 6
+ {test147a, test147m0, 0, "mismatch = 0 (at the beginning)"},
+ {test65536m0, test65536a, 0, "mismatch = 0 (at the beginning)"},
+
+ /**
+ * Compares files of equal sizes
+ */
+ // small files
+ {test147a, test147m70, 70, "read one partial buffer, mismatch = 70"},
+ {test147a, test147m146, 146, "read one partial buffer, mismatch = 146 (end)"},
+ {test1024a, test1024m512, 512, "read one partial buffer, mismatch = 512"},
+ {test1024a, test1024m1023, 1023, "read one partial buffer, mismatch = 1023 (end)"},
+
+ // file size >= Impl's Buffer Size
+ {test8192a, test8192m4096, 4096, "read one buffer, mismatch = 4096 "},
+ {test8192a, test8192m8191, 8191, "read one buffer, mismatch = 8191 (at the end)"},
+
+ // file size = n * Impl's Buffer Size
+ {test65536a, test65536m32768, 32768, "read through half of the file, mismatch = 32768"},
+ {test65536a, test65536m65535, 65535, "read through the whole file, mismatch = 65535 (at the end)"},
+
+ // file size = n * Impl's Buffer Size + x
+ {test70025a, test70025m8400, 8400, "mismatch in the 2nd buffer, mismatch = 8400"},
+ {test70025a, test70025m35000, 35000, "read about half of the file, mismatch = 35000"},
+ {test70025a, test70025m70024, 70024, "read through the whole file, mismatch = 70024 (at the end)"},
+
+ /**
+ * Compares files of unequal sizes
+ */
+ {test8192m8191, test70025m35000, 8191, "mismatch at the end of the 1st file/buffer, mismatch = 8191"},
+ {test65536m32768, test70025m8400, 8400, "mismatch in the 2nd buffer, mismatch = 8400"},
+ {test70025m70024, test1065000m532500, 70024, "mismatch at the end of the 1st file, mismatch = 70024"},
+
+ /**
+ * Spec Case 4: returns the size of the smaller file (in bytes) when the files are
+ * different sizes and every byte of the smaller file is identical to the corresponding
+ * byte of the larger file.
+ * Impl: similar to case 3, covers a range of file sizes
+ */
+ {test147a, test1024a, 147, "mismatch is the length of the smaller file: 147"},
+ {test1024a, test8192a, 1024, "mismatch is the length of the smaller file: 1024"},
+ {test1024a, test65536a, 1024, "mismatch is the length of the smaller file: 1024"},
+ {test8192a, test65536a, 8192, "mismatch is the length of the smaller file: 8192"},
+ {test70025a, test65536a, 65536, "mismatch is the length of the smaller file: 65536"},
+ {test1048576a, test1065000m1064999, 1048576, "mismatch is the length of the smaller file: 1048576"},
+
+ // Spec Case 5: This method is always reflexive (for Path f , mismatch(f,f) returns -1L)
+ // See tests for Spec Case 1.
+
+ // Spec Case 6: If the file system and files remain static, then this method is symmetric
+ // (for two Paths f and g, mismatch(f,g) will return the same value as mismatch(g,f)).
+ // The following tests are selected from tests for Spec Case 3 with the order of
+ // file paths switched, the returned values are the same as those for Case 3:
+ {test147m70, test147a, 70, "read one partial buffer, mismatch = 70"},
+ {test147m146, test147a, 146, "read one partial buffer, mismatch = 146 (end)"},
+ {test1024m512, test1024a, 512, "read one partial buffer, mismatch = 512"},
+ {test1024m1023, test1024a, 1023, "read one partial buffer, mismatch = 1023 (end)"},
+
+ {test70025m35000, test8192m8191, 8191, "mismatch at the end of the 1st file/buffer, mismatch = 8191"},
+ {test70025m8400, test65536m32768, 8400, "mismatch in the 2nd buffer, mismatch = 8400"},
+ {test1065000m532500, test70025m70024, 70024, "mismatch at the end of the 1st file, mismatch = 70024"},
+ };
+ }
+
+ /*
+ * DataProvider for mismatch tests involving ZipFS using a few test cases selected
+ * from those of the original mismatch tests.
+ */
+ @DataProvider(name = "testMismatchZipfs")
+ public Object[][] getDataForMismatchZipfs() throws IOException {
+ Path test1200 = createASCIIFile(testDir, "test1200", 1200, -1, ' ');
+ Path test9500 = createASCIIFile(testDir, "test9500", 9500, -1, ' ');
+ Path test9500m4200 = createASCIIFile(testDir, "test9500m4200", 9500, 4200, '!');
+ Path test80025 = createASCIIFile(testDir, "test80025", 80025, -1, ' ');
+ Path test1028500 = createASCIIFile(testDir, "test1028500", 1028500, -1, ' ');
+ return new Object[][]{
+ {test1200, test1200, MISMATCH_NO, "Compares the file and its copy in zip, no mismatch"},
+ {test9500, test9500m4200, 4200,
+ "Compares a copy of test9500m4200 in zip with test9500, shall return 4200"},
+ {test80025, test1028500, 80025, "mismatch is the length of the smaller file: 80025"},
+ };
+ }
+
+ /*
+ * DataProvider for verifying null handling.
+ */
+ @DataProvider(name = "testFileNull")
+ public Object[][] getDataForNull() throws IOException {
+ Path test = createASCIIFile(testDir, "testNonNull", 2200, -1, ' ');
+ return new Object[][]{
+ {(Path)null, (Path)null},
+ {(Path)null, test},
+ {test, (Path)null},
+ };
+ }
+
+ /*
+ * DataProvider for verifying how the mismatch method handles the situation
+ * when one or both files do not exist.
+ */
+ @DataProvider(name = "testFileNotExist")
+ public Object[][] getDataForFileNotExist() throws IOException {
+ Path test = createASCIIFile(testDir, "testFileNotExist", 3200, -1, ' ');
+ return new Object[][]{
+ {Paths.get("foo"), Paths.get("bar")},
+ {Paths.get("foo"), test},
+ {test, Paths.get("bar")},
+ };
+ }
+
+ /**
+ * Tests the mismatch method. Refer to the dataProvider testMismatch for more
+ * details about the cases.
+ * @param path the path to a file
+ * @param path2 the path to another file
+ * @param expected the expected result
+ * @param msg the message about the test
+ * @throws IOException if the test fails
+ */
+ @Test(dataProvider = "testMismatch", priority = 0)
+ public void testMismatch(Path path, Path path2, long expected, String msg)
+ throws IOException {
+ Assert.assertEquals(Files.mismatch(path, path2), expected, msg);
+ }
+
+ /**
+ * Tests the mismatch method by comparing files with those in a ZIP file.
+ * @param path the path to a file
+ * @param path2 the path to another file to be added into a ZIP file
+ * @param expected the expected result
+ * @param msg the message about the test
+ * @throws IOException if the test fails
+ */
+ @Test(dataProvider = "testMismatchZipfs", priority = 1)
+ public void testMismatchZipfs(Path path, Path path2, long expected, String msg)
+ throws IOException {
+ Path zipPath = Paths.get(testDir.toString(), "TestWithFSZip.zip");
+ try (FileSystem fs = getZipFSProvider().newFileSystem(zipPath, ZIPFS_MAP)) {
+ Path copy = fs.getPath(path.getFileName().toString());
+ Files.copy(path, copy, REPLACE_EXISTING);
+
+ if (path2 == null) {
+ Assert.assertEquals(Files.mismatch(copy, path), expected, msg);
+ } else {
+ Assert.assertEquals(Files.mismatch(copy, path2), expected, msg);
+ }
+ }
+ }
+
+ /**
+ * Verifies that NullPointerException is thrown when one or both files are null.
+ * @param path the path to a file
+ * @param path2 the path to another file
+ * @throws NullPointerException as expected
+ */
+ @Test(dataProvider = "testFileNull", priority = 2, expectedExceptions = NullPointerException.class)
+ public void testMismatchNull(Path path, Path path2) throws Exception {
+ long result = Files.mismatch(path, path2);
+ }
+
+ /**
+ * Verifies that IOException is thrown when one or both files do not exist.
+ * @param path the path to a file
+ * @param path2 the path to another file
+ * @throws IOException as expected
+ */
+ @Test(dataProvider = "testFileNotExist", priority = 2, expectedExceptions = IOException.class)
+ public void testMismatchNotExist(Path path, Path path2) throws IOException {
+ long result = Files.mismatch(path, path2);
+ }
+
+ /**
+ * Creates a file with ASCII content with one character altered
+ * at the specified position.
+ *
+ * Note: Files.mismatch method does a byte-by-byte comparison. ASCII files
+ * are sufficient for verifying the feature.
+ *
+ * @param dir the directory in which the file is to be created
+ * @param purpose the purpose of the file
+ * @param size the size of the file
+ * @param pos the position where the alternative char is to be added. If it
+ * is smaller than zero, no alternation shall be made.
+ * @param c the character
+ * @return path of the created file
+ * @throws IOException
+ */
+ private static Path createASCIIFile(Path dir, String purpose, int size, int pos,
+ char c) throws IOException {
+ Path path = Files.createFile(Paths.get(dir.toString(), purpose + ".txt"));
+ if (size > 0) {
+ writeASCIIFile(path, size, pos, c);
+ }
+ return path;
+ }
+
+ private static void writeASCIIFile(Path path, int size, int pos, char c)
+ throws IOException {
+ byte[] a = createASCIIArray(size);
+ if (pos >= 0) a[pos] = (byte)(c & 0xFF); // US_ASCII char only, may cast directly
+ Files.write(path, a);
+ }
+
+ private static byte[] createASCIIArray(int length) {
+ byte[] bytes = "ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 \n"
+ .getBytes(StandardCharsets.US_ASCII);
+ byte[] a = new byte[length];
+ fillArray(bytes, a);
+ return a;
+ }
+
+ private static FileSystemProvider getZipFSProvider() {
+ for (FileSystemProvider provider : FileSystemProvider.installedProviders()) {
+ if ("jar".equals(provider.getScheme())) {
+ return provider;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Fills the destination array by copying the source array repeatedly until
+ * it is completely filled.
+ *
+ * @param src the source array
+ * @param dest the destination array
+ */
+ public static void fillArray(byte[] src, byte[] dest) {
+ int bLen = src.length;
+ int space = dest.length;
+ int iteration = 0;
+
+ while (space > 0) {
+ if (space >= bLen) {
+ System.arraycopy(src, 0, dest, iteration++ * bLen, bLen);
+ space -= bLen;
+ } else {
+ System.arraycopy(src, 0, dest, iteration++ * bLen, space);
+ break;
+ }
+ }
+ }
+}
--- a/test/jdk/java/security/ProtectionDomain/PreserveCombinerTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/security/ProtectionDomain/PreserveCombinerTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -26,7 +26,7 @@
import java.security.DomainCombiner;
import java.security.PrivilegedAction;
import java.security.ProtectionDomain;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
/*
* @test
@@ -34,7 +34,7 @@
* @summary Make sure that JavaSecurityAccess.doIntersectionPrivilege()
* is not dropping the information about the domain combiner of
* the stack ACC
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
*/
public class PreserveCombinerTest {
--- a/test/jdk/java/util/Formatter/spi/NoGroupingUsed.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/Formatter/spi/NoGroupingUsed.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/Locale/Bug8179071.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/Locale/Bug8179071.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/Locale/LocaleCmdOverrides.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/Locale/LocaleCmdOverrides.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/Locale/SoftKeys.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/Locale/SoftKeys.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/TimeZone/Bug8066652.sh Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-# @test
-# @bug 8066652
-# @requires os.family == "mac"
-# @summary tests thread safe native function localtime_r is accessed by multiple threads at same time and
-# zone id should not be “GMT+00:00” if default timezone is “GMT” and user specifies a fake timezone.
-# @build Bug8066652
-# @run shell/timeout=600 Bug8066652.sh
-
-
-if [ "${TESTSRC}" = "" ]
-then
- echo "TESTSRC not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTSRC=${TESTSRC}"
-if [ "${TESTJAVA}" = "" ]
-then
- echo "TESTJAVA not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTJAVA=${TESTJAVA}"
-if [ "${TESTCLASSES}" = "" ]
-then
- echo "TESTCLASSES not set. Test cannot execute. Failed."
- exit 1
-fi
-echo "TESTCLASSES=${TESTCLASSES}"
-echo "CLASSPATH=${CLASSPATH}"
-
-
-# set system TimeZone to GMT using environment variable TZ
-export TZ="GMT"
-
-# Setting invalid TimeZone using VM option
-${TESTJAVA}/bin/java -Duser.timezone=Foo/Bar ${TESTVMOPTS} -cp ${TESTCLASSES} Bug8066652
-
-status=$?
-if [ $status -eq 0 ]
-then
- echo "Success, Test Passed";
-else
- echo "Test Failed";
-fi
-
-exit $status
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/TimeZone/Bug8066652Run.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8066652
+ * @requires os.family == "mac"
+ * @summary tests thread safe native function localtime_r is accessed by multiple
+ * threads at same time and zone id should not be "GMT+00:00"
+ * if default timezone is "GMT" and user specifies a fake timezone.
+ * @library /test/lib
+ * @build Bug8066652
+ * @run main Bug8066652Run
+ */
+
+import java.util.Map;
+
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+public class Bug8066652Run {
+ private static String cp = Utils.TEST_CLASSES;
+ private static ProcessBuilder pb = new ProcessBuilder();
+
+ public static void main(String[] args) throws Throwable {
+ //set system TimeZone to GMT using environment variable TZ
+ Map<String, String> env = pb.environment();
+ env.put("TZ", "GMT");
+ System.out.println("Current TimeZone:" + pb.environment().get("TZ"));
+ JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
+ //Setting invalid TimeZone using VM option
+ launcher.addToolArg("-Duser.timezone=Foo/Bar")
+ .addToolArg("-cp")
+ .addToolArg(cp)
+ .addToolArg("Bug8066652");
+
+ pb.command(launcher.getCommand());
+ int exitCode = ProcessTools.executeCommand(pb)
+ .getExitValue();
+ if (exitCode != 0) {
+ throw new RuntimeException("Unexpected exit code: " + exitCode);
+ }
+ }
+}
+
--- a/test/jdk/java/util/TimeZone/OldIDMappingTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/TimeZone/OldIDMappingTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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,11 +22,31 @@
*/
/*
- * See OldMappingTest.sh
+ * @test
+ * @bug 6466476
+ * @summary Compatibility test for the old JDK ID mapping and Olson IDs
+ * @comment Expecting the new (Olson compatible) mapping (default)
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=null OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping="" OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=no OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=No OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=NO OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=false OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=False OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=FALSE OldIDMappingTest -new
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=Hello OldIDMappingTest -new
+ * @comment Expecting the old mapping
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=true OldIDMappingTest -old
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=True OldIDMappingTest -old
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=TRUE OldIDMappingTest -old
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=yes OldIDMappingTest -old
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=Yes OldIDMappingTest -old
+ * @run main/othervm -Dsun.timezone.ids.oldmapping=YES OldIDMappingTest -old
*/
-import java.lang.reflect.*;
-import java.util.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TimeZone;
public class OldIDMappingTest {
private static final String MAPPING_PROPERTY_NAME = "sun.timezone.ids.oldmapping";
@@ -62,8 +82,9 @@
TimeZone tz = TimeZone.getTimeZone(oldmap.get(id));
if (useOldMapping) {
if (!tzAlias.hasSameRules(tz)) {
- throw new RuntimeException("OLDMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
- + id + " isn't an alias of " + oldmap.get(id));
+ throw new RuntimeException("OLDMAP: " + MAPPING_PROPERTY_NAME
+ + "=" + prop + ": " + id
+ + " isn't an alias of " + oldmap.get(id));
}
if (count == 0) {
System.out.println(" " + id + " => " + oldmap.get(id));
@@ -79,13 +100,15 @@
continue;
}
if (tzAlias.hasSameRules(tz)) {
- throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
- + id + " is an alias of " + oldmap.get(id));
+ throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME
+ + "=" + prop + ": " + id
+ + " is an alias of " + oldmap.get(id));
}
tz = TimeZone.getTimeZone(newmap.get(id));
if (!tzAlias.hasSameRules(tz)) {
- throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME + "=" + prop + ": "
- + id + " isn't an alias of " + newmap.get(id));
+ throw new RuntimeException("NEWMAP: " + MAPPING_PROPERTY_NAME
+ + "=" + prop + ": " + id
+ + " isn't an alias of " + newmap.get(id));
}
if (count == 0) {
System.out.println(" " + id + " => " + newmap.get(id));
--- a/test/jdk/java/util/TimeZone/OldIDMappingTest.sh Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-
-# @test
-# @bug 6466476
-# @summary Compatibility test for the old JDK ID mapping and Olson IDs
-# @build OldIDMappingTest
-# @run shell OldIDMappingTest.sh
-
-: ${TESTJAVA:=${JAVA_HOME}}
-: ${TESTCLASSES:="`pwd`"}
-
-JAVA="${TESTJAVA}/bin/java"
-
-STATUS=0
-
-# Expecting the new (Olson compatible) mapping (default)
-for I in "" " " no No NO false False FALSE Hello
-do
- if [ x"$I" != x ]; then
- D="-Dsun.timezone.ids.oldmapping=${I}"
- fi
- if ! ${JAVA} ${D} ${TESTVMOPTS} -cp ${TESTCLASSES} OldIDMappingTest -new; then
- STATUS=1
- fi
-done
-
-# Expecting the old mapping
-for I in true True TRUE yes Yes YES
-do
- if [ "x$I" != x ]; then
- D="-Dsun.timezone.ids.oldmapping=${I}"
- fi
- if ! ${JAVA} ${D} ${TESTVMOPTS} -cp ${TESTCLASSES} OldIDMappingTest -old; then
- STATUS=1
- fi
-done
-
-exit ${STATUS}
--- a/test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheck.sh Mon Nov 12 10:55:49 2018 +0530
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-# Testcase for PR381 Stackoverflow error with security manager, signed jars
-# and -Djava.security.debug set.
-#
-# Copyright (c) 2009, Red Hat Inc.
-#
-# This code is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This code is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# @test
-# @bug 6584033
-# @summary Stackoverflow error with security manager, signed jars and debug.
-# @build TimeZoneDatePermissionCheck
-# @run shell TimeZoneDatePermissionCheck.sh
-
-# Set default if not run under jtreg from test dir itself
-if [ "${TESTCLASSES}" = "" ] ; then
- TESTCLASSES="."
-fi
-if [ "${TESTJAVA}" = "" ] ; then
- TESTJAVA=/usr
-fi
-if [ "${COMPILEJAVA}" = "" ]; then
- COMPILEJAVA="${TESTJAVA}"
-fi
-
-# create a test keystore and dummy cert. Note that we use the COMPILEJAVA
-# as this test is a TimeZone test, it doesn't test keytool
-rm -f ${TESTCLASSES}/timezonedatetest.store
-${COMPILEJAVA}/bin/keytool ${TESTTOOLVMOPTS} -genkeypair -alias testcert \
- -keystore ${TESTCLASSES}/timezonedatetest.store \
- -storepass testpass -validity 360 \
- -keyalg rsa \
- -dname "cn=Mark Wildebeest, ou=FreeSoft, o=Red Hat, c=NL" \
- -keypass testpass
-
-# create a jar file to sign with the test class in it.
-rm -f ${TESTCLASSES}/timezonedatetest.jar
-${COMPILEJAVA}/bin/jar ${TESTTOOLVMOPTS} cf \
- ${TESTCLASSES}/timezonedatetest.jar \
- -C ${TESTCLASSES} TimeZoneDatePermissionCheck.class
-
-# sign it
-${COMPILEJAVA}/bin/jarsigner ${TESTTOOLVMOPTS} \
- -keystore ${TESTCLASSES}/timezonedatetest.store \
- -storepass testpass ${TESTCLASSES}/timezonedatetest.jar testcert
-
-# run it with the security manager on, plus accesscontroller debugging
-# will go into infinite recursion trying to get enough permissions for
-# printing Date of failing certificate unless fix is applied.
-${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.security.manager \
- -Djava.security.debug=access,failure,policy \
- -cp ${TESTCLASSES}/timezonedatetest.jar TimeZoneDatePermissionCheck
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheckRun.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6584033
+ * @summary Stackoverflow error with security manager, signed jars and debug.
+ * @library /test/lib
+ * @build TimeZoneDatePermissionCheck
+ * @run main TimeZoneDatePermissionCheckRun
+ */
+
+import java.io.File;
+import java.util.List;
+
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.ProcessTools;
+
+public class TimeZoneDatePermissionCheckRun {
+ private static String storePath = Utils.TEST_CLASSES + File.separator
+ + "timezonedatetest.store";
+ private static String jarPath = Utils.TEST_CLASSES + File.separator
+ + "timezonedatetest.jar";
+
+ public static void main(String[] args) throws Throwable {
+ try {
+ //create a test keystore and dummy cert. Note that we use the COMPILEJAVA
+ //as this test is a TimeZone test, it doesn't test keytool
+ runJavaCmd("keytool",
+ List.of("-genkeypair", "-alias", "testcert", "-keystore",
+ storePath, "-storepass", "testpass", "-validity",
+ "360", "-keyalg", "rsa", "-dname",
+ "cn=Mark Wildebeest, ou=FreeSoft, o=Red Hat, c=NL",
+ "-keypass", "testpass"));
+
+ //create a jar file to sign with the test class in it.
+ runJavaCmd("jar", List.of("cf", jarPath, "-C", Utils.TEST_CLASSES,
+ "TimeZoneDatePermissionCheck.class"));
+
+ //sign it
+ runJavaCmd("jarsigner",
+ List.of("-keystore", storePath, "-storepass", "testpass",
+ jarPath, "testcert"));
+
+ //run it with the security manager on, plus accesscontroller debugging
+ //will go into infinite recursion trying to get enough permissions for
+ //printing Date of failing certificate unless fix is applied.
+ JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("java");
+ launcher.addToolArg("-Djava.security.manager")
+ .addToolArg("-Djava.security.debug=access,failure,policy")
+ .addToolArg("-cp")
+ .addToolArg(jarPath)
+ .addToolArg("TimeZoneDatePermissionCheck");
+
+ int exitCode = ProcessTools.executeCommand(launcher.getCommand())
+ .getExitValue();
+ if (exitCode != 0) {
+ throw new RuntimeException("Unexpected exit code: " + exitCode);
+ }
+ } finally {
+ //clean up the test files
+ File storeFile = new File(storePath);
+ if (storeFile.exists()) {
+ storeFile.delete();
+ }
+ File jarFile = new File(jarPath);
+ if (jarFile.exists()) {
+ jarFile.delete();
+ }
+ }
+ }
+
+ private static void runJavaCmd(String cmd, List<String> javaParam)
+ throws Throwable{
+ JDKToolLauncher launcher = JDKToolLauncher.create(cmd);
+ for (String para: javaParam) {
+ launcher.addToolArg(para);
+ }
+
+ System.out.println(launcher.getCommand());
+ int exitCode = ProcessTools.executeCommand(launcher.getCommand())
+ .getExitValue();
+ if (exitCode != 0) {
+ throw new RuntimeException("Unexpected exit code: " + exitCode);
+ }
+ }
+}
--- a/test/jdk/java/util/concurrent/atomic/VMSupportsCS8.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/concurrent/atomic/VMSupportsCS8.java Mon Nov 12 11:10:16 2018 +0530
@@ -33,7 +33,8 @@
public class VMSupportsCS8 {
public static void main(String[] args) throws Exception {
- if (System.getProperty("sun.cpu.isalist").matches
+ String isalist = System.getProperty("sun.cpu.isalist");
+ if (isalist != null && isalist.matches
(".*\\b(sparcv9|pentium_pro|ia64|amd64).*")
||
System.getProperty("os.arch").matches
--- a/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/logging/LogManager/LinkageErrorTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/logging/LogManagerAppContextDeadlock.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/logging/LogManagerAppContextDeadlock.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -35,15 +35,15 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.LogManager;
import java.util.logging.Logger;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
/**
* @test
* @bug 8065991
* @summary check that when LogManager is initialized, a deadlock similar
* to that described in 8065709 will not occur.
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.logging
* java.management
* @run main/othervm LogManagerAppContextDeadlock UNSECURE
@@ -349,7 +349,7 @@
// FileHandlers because we're passing invalid parameters
// which will make the creation fail...
permissions = new Permissions();
- permissions.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc"));
+ permissions.add(new RuntimePermission("accessClassInPackage.jdk.internal.access"));
// these are used for configuring the test itself...
allPermissions = new Permissions();
--- a/test/jdk/java/util/logging/RootLogger/RootLevelInConfigFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/logging/RootLogger/RootLevelInConfigFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -34,15 +34,15 @@
import java.util.logging.LogManager;
import java.util.logging.Logger;
import java.util.logging.LoggingPermission;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
/**
* @test
* @bug 8030850
* @summary Tests that setting .level=FINEST for the root logger in logging
* configuration file does work.
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.logging
* @run main/othervm RootLevelInConfigFile
*
@@ -182,7 +182,7 @@
perms.add(new PropertyPermission("java.util.logging.config.class","read"));
perms.add(new PropertyPermission("java.util.logging.config.file","read"));
perms.add(new FilePermission(configFile, "read"));
- perms.add(new RuntimePermission("accessClassInPackage.jdk.internal.misc"));
+ perms.add(new RuntimePermission("accessClassInPackage.jdk.internal.access"));
}
@Override
--- a/test/jdk/java/util/logging/TestAppletLoggerContext.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/logging/TestAppletLoggerContext.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -33,8 +33,8 @@
import java.util.logging.LogManager;
import java.util.logging.Logger;
import java.util.logging.LoggingPermission;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
/*
* @test
@@ -42,7 +42,7 @@
* @summary NPE when using Logger.getAnonymousLogger or
* LogManager.getLogManager().getLogger
*
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.logging
* @run main/othervm -Dtest.security=off TestAppletLoggerContext LoadingApplet
* @run main/othervm -Dtest.security=on TestAppletLoggerContext LoadingApplet
--- a/test/jdk/java/util/logging/TestGetLoggerNPE.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/logging/TestGetLoggerNPE.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2018, 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
@@ -26,8 +26,8 @@
import java.security.ProtectionDomain;
import java.util.logging.LogManager;
import java.util.logging.Logger;
-import jdk.internal.misc.JavaAWTAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaAWTAccess;
+import jdk.internal.access.SharedSecrets;
/*
* @test
@@ -35,7 +35,7 @@
*
* @summary NPE with logging while launching webstart
*
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.logging
* @build TestGetLoggerNPE
* @run main/othervm TestGetLoggerNPE getLogger
--- a/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB.xml Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB.xml Mon Nov 12 11:10:16 2018 +0530
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
+ published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB_ja.xml Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/spi/ResourceBundleControlProvider/com/foo/XmlRB_ja.xml Mon Nov 12 11:10:16 2018 +0530
@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
- published by the Free Software Foundation. Oracle designates this
- particular file as subject to the "Classpath" exception as provided
- by Oracle in the LICENSE file that accompanied this code.
+ published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/util/zip/zip.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/java/util/zip/zip.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/net/ssl/HttpsURLConnection/DefaultCacheResponse.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8212261
+ * @summary Add SSLSession accessors to HttpsURLConnection and
+ * SecureCacheResponse
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.SecureCacheResponse;
+import java.security.Principal;
+import java.security.cert.Certificate;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.net.ssl.SSLPeerUnverifiedException;
+import javax.net.ssl.SSLSession;
+
+public class DefaultCacheResponse extends SecureCacheResponse {
+
+ public static void main(String[] args) throws Exception {
+ DefaultCacheResponse defaultImpl = new DefaultCacheResponse();
+
+ Optional<SSLSession> sslSession = defaultImpl.getSSLSession();
+ if (sslSession.isPresent()) {
+ throw new Exception(
+ "The default SecureCacheResponse.getSSLSession " +
+ "implementation should return an empty Optional");
+ }
+ }
+
+ @Override
+ public String getCipherSuite() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public List<Certificate> getLocalCertificateChain() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public List<Certificate> getServerCertificateChain()
+ throws SSLPeerUnverifiedException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Principal getLocalPrincipal() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Map<String, List<String>> getHeaders() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public InputStream getBody() throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/net/ssl/HttpsURLConnection/DummyCacheResponse.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8212261
+ * @summary Add SSLSession accessors to HttpsURLConnection and
+ * SecureCacheResponse
+ * @library /test/lib
+ * @modules jdk.httpserver
+ * @build jdk.test.lib.net.SimpleSSLContext
+ * @run main/othervm DummyCacheResponse
+ */
+
+import java.io.*;
+import java.net.*;
+import javax.net.ssl.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.security.Principal;
+import java.security.cert.Certificate;
+import jdk.test.lib.net.SimpleSSLContext;
+import com.sun.net.httpserver.*;
+
+public class DummyCacheResponse extends SecureCacheResponse {
+ static SSLContext sslContext;
+ private final SSLSession cachedSession;
+ private final Map<String, List<String>> rqstHeaders;
+
+ public static void main(String[] args) throws Exception {
+ ResponseCache reservedResponseCache = ResponseCache.getDefault();
+ HttpsServer httpsServer = null;
+ ExecutorService executor = null;
+ try {
+ ResponseCache.setDefault(new DummyResponseCache());
+
+ httpsServer = HttpsServer.create(new InetSocketAddress(0), 0);
+ HttpContext c2 =
+ httpsServer.createContext("/test", new HttpsHandler());
+
+ executor = Executors.newCachedThreadPool();
+ httpsServer.setExecutor(executor);
+
+ sslContext = new SimpleSSLContext().get();
+ httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
+ httpsServer.start();
+
+ int httpsPort = httpsServer.getAddress().getPort();
+ System.out.println(
+ "Server address: " + httpsServer.getAddress());
+
+ // the 1st connection
+ runTest(httpsPort, false);
+
+ // the 2nd connection that use the cache
+ runTest(httpsPort, true);
+ } finally {
+ if (httpsServer != null) {
+ httpsServer.stop(2);
+ }
+ if (executor != null) {
+ executor.shutdown();
+ }
+
+ ResponseCache.setDefault(reservedResponseCache);
+ }
+ }
+
+ private static class HttpsHandler implements HttpHandler {
+ public void handle(HttpExchange httpExchange) throws IOException {
+ InputStream is = httpExchange.getRequestBody();
+
+ while (is.read() != -1) {
+ // read to EOF
+ }
+ is.close();
+
+ httpExchange.sendResponseHeaders(200, 0);
+ httpExchange.close();
+ }
+ }
+
+ static void runTest(int port, boolean useCache) throws Exception {
+ URL url = new URL(
+ String.format("https://localhost:%s/test/", port));
+ HttpsURLConnection urlc =
+ (HttpsURLConnection)url.openConnection();
+
+ urlc.setSSLSocketFactory(sslContext.getSocketFactory());
+ urlc.setHostnameVerifier(new HostnameVerifier() {
+ public boolean verify(String s, SSLSession s1) {
+ return true;
+ }
+ });
+
+ try (InputStream is = urlc.getInputStream()) {
+ while (is.read() != -1) {
+ // read to EOF
+ }
+
+ SSLSession session = urlc.getSSLSession().orElseThrow();
+ if (!Objects.equals(urlc.getCipherSuite(),
+ session.getCipherSuite())) {
+ throw new Exception(
+ "Incorrect SSLSession for HTTPsURLConnection: " +
+ urlc.getCipherSuite() + "/" + session.getCipherSuite());
+ }
+
+ // Make sure the cache implementation is used.
+ try {
+ urlc.getServerCertificates();
+ if (useCache) {
+ throw new Exception(
+ "The SecureCacheResponse impl should be used");
+ }
+ } catch (UnsupportedOperationException uoe) {
+ if (!useCache) {
+ throw new Exception(
+ "The SecureCacheResponse impl should not be used");
+ }
+ }
+ }
+ }
+
+ DummyCacheResponse(SSLSession sslSession,
+ Map<String, List<String>> rqstHeaders) {
+ this.rqstHeaders = rqstHeaders;
+ this.cachedSession = sslSession;
+ }
+
+ @Override
+ public String getCipherSuite() {
+ return cachedSession.getCipherSuite();
+ }
+
+ @Override
+ public List<Certificate> getLocalCertificateChain() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public List<Certificate> getServerCertificateChain()
+ throws SSLPeerUnverifiedException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Principal getLocalPrincipal() {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public Map<String, List<String>> getHeaders() throws IOException {
+ return rqstHeaders;
+ }
+
+ @Override
+ public InputStream getBody() throws IOException {
+ return new ByteArrayInputStream(new byte[0]);
+ }
+
+ @Override
+ public Optional<SSLSession> getSSLSession() {
+ return Optional.of(cachedSession);
+ }
+
+ private static class DummyResponseCache extends ResponseCache {
+ Map<URI, SSLSession> httpsConnections = new HashMap<>();
+
+ @Override
+ public CacheResponse get(URI uri, String rqstMethod,
+ Map<String, List<String>> rqstHeaders) throws IOException {
+ if (httpsConnections.containsKey(uri)) {
+ return new DummyCacheResponse(
+ httpsConnections.get(uri), rqstHeaders);
+ }
+
+ return null;
+ }
+
+ @Override
+ public CacheRequest put(URI uri,
+ URLConnection conn) throws IOException {
+ if (conn instanceof HttpsURLConnection) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection)conn;
+ httpsConnections.putIfAbsent(
+ uri, httpsConn.getSSLSession().orElseThrow());
+ }
+
+ return null;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javax/net/ssl/HttpsURLConnection/HttpsSession.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8212261
+ * @summary Add SSLSession accessors to HttpsURLConnection and
+ * SecureCacheResponse
+ * @library /test/lib
+ * @modules jdk.httpserver
+ * @build jdk.test.lib.net.SimpleSSLContext
+ * @run main/othervm HttpsSession
+ */
+import com.sun.net.httpserver.*;
+import java.net.*;
+import java.io.*;
+import javax.net.ssl.*;
+import java.util.concurrent.*;
+import java.util.Objects;
+import jdk.test.lib.net.SimpleSSLContext;
+
+public class HttpsSession {
+
+ static SSLContext sslContext;
+
+ public static void main(String[] args) throws Exception {
+ HttpsServer httpsServer = null;
+ ExecutorService executor = null;
+ try {
+ httpsServer = HttpsServer.create(new InetSocketAddress(0), 0);
+ HttpContext c2 =
+ httpsServer.createContext("/test", new HttpsHandler());
+
+ executor = Executors.newCachedThreadPool();
+ httpsServer.setExecutor(executor);
+
+ sslContext = new SimpleSSLContext().get();
+ httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
+ httpsServer.start();
+
+ int httpsPort = httpsServer.getAddress().getPort();
+ System.out.println(
+ "Server address: " + httpsServer.getAddress());
+
+ runTest(httpsPort);
+ } finally {
+ if (httpsServer != null) {
+ httpsServer.stop(2);
+ }
+ if (executor != null) {
+ executor.shutdown();
+ }
+ }
+ }
+
+ private static class HttpsHandler implements HttpHandler {
+ public void handle(HttpExchange httpExchange) throws IOException {
+ InputStream is = httpExchange.getRequestBody();
+
+ while (is.read() != -1) {
+ // read to EOF
+ }
+ is.close();
+
+ httpExchange.sendResponseHeaders(200, 0);
+ httpExchange.close();
+ }
+ }
+
+ static void runTest(int port) throws Exception {
+ URL url = new URL(
+ String.format("https://localhost:%s/test/", port));
+ HttpsURLConnection urlc =
+ (HttpsURLConnection)url.openConnection();
+
+ urlc.setSSLSocketFactory(sslContext.getSocketFactory());
+ urlc.setHostnameVerifier(new HostnameVerifier() {
+ public boolean verify(String s, SSLSession s1) {
+ return true;
+ }
+ });
+
+ try {
+ urlc.getSSLSession();
+ throw new Exception(
+ "HttpsURLConnection.getSSLSession() should throw " +
+ "IllegalStateException before the connection established");
+ } catch (IllegalStateException ise) {
+ // That's the expected behavior, continue.
+ }
+
+ try (InputStream is = urlc.getInputStream()) {
+ while (is.read() != -1) {
+ // read to EOF
+ }
+
+ SSLSession session = urlc.getSSLSession().orElseThrow();
+ if (!Objects.equals(urlc.getCipherSuite(),
+ session.getCipherSuite())) {
+ throw new Exception(
+ "Incorrect SSLSession for HTTPsURLConnection: " +
+ urlc.getCipherSuite() + "/" + session.getCipherSuite());
+ }
+ }
+ }
+}
--- a/test/jdk/jdk/internal/reflect/constantPool/ConstantPoolTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/jdk/internal/reflect/constantPool/ConstantPoolTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -25,7 +25,7 @@
* @test
* @bug 8141615
* @summary Tests new public methods at ConstantPool
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* java.base/jdk.internal.reflect
* @library /test/lib
* @compile ConstantPoolTestDummy.jasm
@@ -36,9 +36,9 @@
import java.util.HashMap;
import java.util.Map;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.SharedSecrets;
+import jdk.internal.reflect.ConstantPool;
import jdk.test.lib.Asserts;
-import jdk.internal.reflect.ConstantPool;
public class ConstantPoolTest {
--- a/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, 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
@@ -21,29 +21,20 @@
* questions.
*/
- /*
+/*
* @test
- * @bug 8189131
+ * @bug 8189131 8207059
* @summary Interoperability tests with QuoVadis Root CA1, CA2, and CA3 CAs
* @build ValidatePathWithParams
* @run main/othervm -Djava.security.debug=certpath QuoVadisCA OCSP
* @run main/othervm -Djava.security.debug=certpath QuoVadisCA CRL
*/
- /*
+/*
* Obtain TLS test artifacts for QuoVadis CAs from:
*
- * Valid TLS Certificates:
- * CA1: https://qvica1g3-v.quovadisglobal.com
- * CA2: https://qvsslicag3-v.quovadisglobal.com
- * CA2 EV: https://evsslicag3-v.quovadisglobal.com
- * CA3: https://qvica3g3-v.quovadisglobal.com
+ * https://www.quovadisglobal.com/QVRepository/TestCertificates.aspx
*
- * Revoked TLS Certificates:
- * CA1: https://qvica1g3-r.quovadisglobal.com
- * CA2: https://qvsslicag3-r.quovadisglobal.com
- * CA2 EV: https://evsslicag3-r.quovadisglobal.com
- * CA3: https://qvica3g3-r.quovadisglobal.com
*/
public class QuoVadisCA {
@@ -51,423 +42,430 @@
ValidatePathWithParams pathValidator = new ValidatePathWithParams(null);
- boolean ocspEnabled = true;
-
if (args.length >= 1 && "CRL".equalsIgnoreCase(args[0])) {
pathValidator.enableCRLCheck();
- ocspEnabled = false;
} else {
// OCSP check by default
pathValidator.enableOCSPCheck();
}
- new RootCA1().runTest(pathValidator, ocspEnabled);
- new RootCA2().runTest(pathValidator, ocspEnabled);
- new RootCA3().runTest(pathValidator, ocspEnabled);
+ new RootCA1G3().runTest(pathValidator);
+ new RootCA2G3().runTest(pathValidator);
+ new RootCA3G3().runTest(pathValidator);
}
}
-class RootCA1 {
+class RootCA1G3 {
- // Owner: CN=QuoVadis Issuing CA 1 G3, O=QuoVadis Limited, C=BM
- private static final String INT = "-----BEGIN CERTIFICATE-----\n"
- + "MIIGFTCCA/2gAwIBAgIUPybG62jqpxKYOV5MlXAGPJYDy9MwDQYJKoZIhvcNAQEL\n"
- + "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"
- + "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0xMjExMDYxNjA5NTJaFw0y\n"
- + "MjExMDYxNjA5NTJaMEsxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\n"
- + "aW1pdGVkMSEwHwYDVQQDExhRdW9WYWRpcyBJc3N1aW5nIENBIDEgRzMwggIiMA0G\n"
- + "CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2Ud42yCfjYm4WlQ+nhTpZ9aPp0r8a\n"
- + "yz+kKpPxc8ZWvEi7HDPhr7f5nWnEruHE0HbH8WyFGE+sICF788VpZLbFhL4wbIWV\n"
- + "tHIrYan7+yL2yoNbHUBgeWxa48P96WxrW34K/OyQkJoSvY4iNk4BGI0wOYD9wsl9\n"
- + "6wIaQFNu25Wsv0CcDSsyNjw8O8Ib6dmS6iib+KnZlKJnYqSTrzbnzf/2CU+Wb9V0\n"
- + "yExk7shcfDpqxo9yyyEBPP1GUEb5SSr9qXYP2d4UsrRIgzKpD5feqdjk6ZGA4xeM\n"
- + "JHo6GLjddNvVvopaKaLrDzlOXgqgbMIPQu+xkzpKW3IJOylxN55oVuH25MwbS9IL\n"
- + "kDMv//kdiTUl1wXERZiUmcBdpWt9D9liyVxe5+HeI5VlhDuHsxDoPFmoOGTa6brX\n"
- + "PXlNc0xji+grBQjIRNs43T5+GyYzCyjzG3dSb0BTYGLnfUAEQ1+MCC3K33DKL/me\n"
- + "iUrWNclh85BQQigJr5HNLym3+J6Jf0OCnq4VmD1OFrhZrui02Xmz/hOECK2Mciga\n"
- + "DxRgXBKjLebV0RW3j6libuPiKbxSinfqNqf2Q9eCfKrzgWQkuCHZvkt0Cqgzjbm1\n"
- + "n5xu9zXR8YG5/680Nyb3tywUb6FhA8l1L/KLoK79RGjKgPotCog6Ykvy/667jlyo\n"
- + "ZII0YUf6S3uyeQIDAQABo4HzMIHwMBIGA1UdEwEB/wQIMAYBAf8CAQEwEQYDVR0g\n"
- + "BAowCDAGBgRVHSAAMDoGCCsGAQUFBwEBBC4wLDAqBggrBgEFBQcwAYYeaHR0cDov\n"
- + "L29jc3AucXVvdmFkaXNnbG9iYWwuY29tMA4GA1UdDwEB/wQEAwIBBjAfBgNVHSME\n"
- + "GDAWgBSjl9bzXqIQ4atFnzwXZDzuAXCczDA7BgNVHR8ENDAyMDCgLqAshipodHRw\n"
- + "Oi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdnJjYTFnMy5jcmwwHQYDVR0OBBYE\n"
- + "FF0EGBL7w+p4fbRXCaH+bf6Cn2TNMA0GCSqGSIb3DQEBCwUAA4ICAQAF6qNCo3LP\n"
- + "Qk8jthU1aiuo5WW9jQC+PqWeyVe4JjHK+5PRM+BtoErOItfZyPqoIBMedC/Ya9L1\n"
- + "Sv0gncvifjtTD3jIBz0FVCbIMJLRp63b4qtmAGuB00XTXgCFcYoiIq5kyNedJnLe\n"
- + "IxMqb0xx8IAqvP9kfEVNdGfvYraSswiGXADftZ3yM24zIc3Ysewi3JeTbzDhEGfb\n"
- + "yv9eBplkfKfcoKyOds4sLcxj1QpUxcXgjX1mKTbfOSD5ac/Cjrz6Kqnl2+PNrc5N\n"
- + "kXBVKhcCAjpqX5OyI86IUg9XY8i7Lz+tXzAQhllh+rPyTyAmieGf2iV9wrl//OZB\n"
- + "l2nXwbgfA7QwQ2VdsmGJfW3a7Zc13GCNx0M2RUGJKLMJOavY72d41wAYPQ46AXls\n"
- + "Ic7RJi6EWmwLi6lvw4kKFfWZ0c6vIJur1hLUUmLOt0UBZ226eIREVpmFbDGOLzfl\n"
- + "gU0xKhqmU0aIOORzBGDfOrnctvaXORNNhCZ78zS96Egzu2w2OC47Zry7k+EOatzA\n"
- + "5zrdJJM3UP7aMSNPvEygbcFUw2I04vpxUuPYTwCtogqNMHqFbCjLM9YxhzsGMdh/\n"
- + "9aD1krboaSXUjrS9cOr5P2A9kFHCMsXBaDoaijQXNeyhu+oCeYsdv4S3djFwDW3+\n"
- + "iPLo51aqZGsTZ1S22vYdkp+QFByLtArVMQ==\n"
- + "-----END CERTIFICATE-----";
+ // Owner: CN=QuoVadis QVRCA1G3 SSL ICA, O=QuoVadis Limited, C=BM
+ private static final String INT = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGszCCBJugAwIBAgIUdJ4w/GwP08WekbUIXvYTsQrO+a8wDQYJKoZIhvcNAQEL\n" +
+ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" +
+ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMSBHMzAeFw0xNzA0MTkxNTAzMzZaFw0y\n" +
+ "NzA0MTkxNTAzMzZaMEwxCzAJBgNVBAYTAkJNMRkwFwYDVQQKDBBRdW9WYWRpcyBM\n" +
+ "aW1pdGVkMSIwIAYDVQQDDBlRdW9WYWRpcyBRVlJDQTFHMyBTU0wgSUNBMIICIjAN\n" +
+ "BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqVn6XxE+YKKifggi6EPcx7mOOrhA\n" +
+ "HVxHFsFV/OR/dtQlx2oOTAGPpa8o3ZPVubtNH5QiiMBBiPDW1KqBaU+rmgUeGCj0\n" +
+ "hWKbdNGRQ5h3rV+4Vhs45BYxQcUzGTZ+oobao8gNo1LuhPIhOQComGOjZtUP0+qQ\n" +
+ "nXsWJn5004TvCzu7mmt3aTlMeyjSbpoXa3ojwU2BvUzJwcLg0BD49kNXZsM0JLbY\n" +
+ "QgfEfluWFkb5QzjnE45sBni4LJNfSodhNB+mL/VmETO+0m/A1H6in1rG1n4Ao2G6\n" +
+ "KYgtk9rXWfF3g7JqwuZUULfI0467h14oG1PzqVcLgZ1B+wrdyiBJJSpRmhf00xSB\n" +
+ "WM/p93s2xkyQZ2Uh0b0tP90S6spwwpL8PSW3J8x46LaZDEVON/Gm9H891ZgwHLaf\n" +
+ "3idGX93XHFafve8CrJFMhK2AZElwYaz2H6iJuPftyhR3oQIgLst8l+/2LoqDRyaI\n" +
+ "6c+tVnk8LcvUgDEPuA70aNthQQ6PWA7iuI2Oies6GEPm7gKVNxIrg6rp2T9RghLm\n" +
+ "vLnf6Gyn1ONLI7Ib3EyzjE8CJIAtor5KZcs8xm8iPNsDQza+1ugx8D8Zsla64vVw\n" +
+ "w2W2qNH4orutsAQKRImtbDkEnMb3nGDe0ZPohVyw3Fy+b9g6MX7wQzFjIx3UkzZG\n" +
+ "QQqGdIh940Qq3wUCAwEAAaOCAY8wggGLMBIGA1UdEwEB/wQIMAYBAf8CAQAwSQYD\n" +
+ "VR0gBEIwQDA+BgRVHSAAMDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFk\n" +
+ "aXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUF\n" +
+ "BzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKG\n" +
+ "LGh0dHA6Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2ExZzMuY3J0MA4G\n" +
+ "A1UdDwEB/wQEAwIBBjAnBgNVHSUEIDAeBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsG\n" +
+ "AQUFBwMJMB8GA1UdIwQYMBaAFKOX1vNeohDhq0WfPBdkPO4BcJzMMDsGA1UdHwQ0\n" +
+ "MDIwMKAuoCyGKmh0dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMWcz\n" +
+ "LmNybDAdBgNVHQ4EFgQUIAYNQkuk2dMocCdjvExpRiGBHTwwDQYJKoZIhvcNAQEL\n" +
+ "BQADggIBAEu/Bea66BZPfGNE4Np+PCRrTag/U7EBK/Yhjmf3mHtFMZzZ94QLH1km\n" +
+ "4iJ5dPKTR/+1iYYNHfO7fY2Lj/Tg/E+q2SEfA0n6Y/lYHAlbmnaYGGdtfTOjaQgL\n" +
+ "0Bf0TmLPyc/gf9uKHe230vIaN4QcodBnCmCJOAk/lvIl7b7gRNPN/HuJNQlBohNx\n" +
+ "ih9VAtLXJ6xO6Xfs5o8ZkZkHb2nG/M1yxySEyU3mqQ5PTgy8kg59szWr2ufT8PvL\n" +
+ "JuyGNQmT/PHcLp2zaCC0+5Ra65umjhG8IW2haXu8g8aRAgr9ZRPrcgg2npLBA0Qf\n" +
+ "MTEJPPptGx2GQgE+lMdn5Gff82d3Y35pDmxNTA7hy+4CnWKfmoey7ll8kwGxC+W1\n" +
+ "OUVgzfdXcpsm+HP2z4E/zw6uB0cAFgMJbxgnm6ZW9+R2yEbD6EOpqR8HqCvhVkkv\n" +
+ "CdQBNkk432pKD3+L7o6vkwONFOFWVpbXHIxDf9ys8Jr4B8qYWDUnR6jz/HG9aWPV\n" +
+ "k4vBYYWuahANZCfCKH2B9SqCdK6DjwKihYmallClwsUQnSwW8H7xqmLtAHX0ek7z\n" +
+ "1Ipj/BNS6c52cPxeAoFbUcVt6+M8xURIJ5qrobTYVaJ8AtfW+3Ml2oqT/EiItXOk\n" +
+ "W1319hZuAGD5qaG3dg9aLYUqpD948xJVhYVxwIIwvL4G9ZEVyYmE\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvica1g3-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // Owner: CN=qvsslrca1g3-ssl-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
// ST=Pembroke, C=BM
- private static final String VALID = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF9DCCA9ygAwIBAgIUGug3BoLw4/auIdDQ0mHS6QnPHB8wDQYJKoZIhvcNAQEL\n"
- + "BQAwSzELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxITAf\n"
- + "BgNVBAMTGFF1b1ZhZGlzIElzc3VpbmcgQ0EgMSBHMzAeFw0xNDExMTQxNDA1MDda\n"
- + "Fw0xNzExMTQxNDA0NTFaMHYxCzAJBgNVBAYTAkJNMREwDwYDVQQIEwhQZW1icm9r\n"
- + "ZTERMA8GA1UEBxMISGFtaWx0b24xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQx\n"
- + "JjAkBgNVBAMTHXF2aWNhMWczLXYucXVvdmFkaXNnbG9iYWwuY29tMIIBIjANBgkq\n"
- + "hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwHoNPHE0C/tEwI5jeYvKJdo5SXSccB/c\n"
- + "nCHJVs/4i9F8oRmPqNiFMD99UVylk4nn8iqi8MoxrFAhqtmplPslgRDLwyLMmnGO\n"
- + "1cNoPKGMKxQq9EerBgSk4wqeSsSH+7qnZhCamIlvEm0PUaEH8rcjXokTs0fyjadF\n"
- + "UmVwcmSZdmnNjseOMgm+G6C8tEPHRQl/Oezy6DzS9PQVLUFCBSyOaAgDnr4EvwGE\n"
- + "u2fd3m+ys80XXGq4eLy1MmuC7U+bIQuupuydk/S7kVh7Rl+5nT1eTv0LEOj5gYFc\n"
- + "C5SBnhiLibuRTOr+LsC9HpvN4vnoCaOogWxDQj/f1KRn45PNJncsbwIDAQABo4IB\n"
- + "ozCCAZ8wdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5x\n"
- + "dW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKGLGh0dHA6Ly90cnVzdC5xdW92\n"
- + "YWRpc2dsb2JhbC5jb20vcXZpY2ExZzMuY3J0MCgGA1UdEQQhMB+CHXF2aWNhMWcz\n"
- + "LXYucXVvdmFkaXNnbG9iYWwuY29tMFEGA1UdIARKMEgwRgYMKwYBBAG+WAACZAEB\n"
- + "MDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3Jl\n"
- + "cG9zaXRvcnkwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr\n"
- + "BgEFBQcDAjAfBgNVHSMEGDAWgBRdBBgS+8PqeH20Vwmh/m3+gp9kzTA7BgNVHR8E\n"
- + "NDAyMDCgLqAshipodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmljYTFn\n"
- + "My5jcmwwHQYDVR0OBBYEFJO98+S7NZMTz2JRogpUwLuxjTa0MA0GCSqGSIb3DQEB\n"
- + "CwUAA4ICAQCq1O/BnzpQjbTbmEob/bWH/p92ZYRV0Lr01CdYkRXl4XKL2ZLusel6\n"
- + "126AIvAK51o65wiGVaLGs49AKXOjcaAnTfwoFembqFRlBiGFSOdglTIsZUGdmhtP\n"
- + "x1meetkOY8bY79viGkVCufAVq0hAF+AYh4nYM+/n7IijIcM5uhzIDb2Vw8+wKPTB\n"
- + "7k2K/e1GGwbqrIAkjrZ6kpRg632RkbR18anaDVOgXuKzmZMRbIAii/N+lo7u3DhC\n"
- + "5mJEIjP4cQXd569AfKQzvBO+syGDAJyX5PbTrd59IXZ+EjiisIq/DNQi6QalWMfS\n"
- + "BnK97nUzH/BjAofMaUufbB8dxg+RT0QC/Yl1lmlA3CYmr6YWn06DiAuWL14ZFFwh\n"
- + "2HQ7juU9oQ1I/HTfhVBoTzuKGCW1ZNXA64IdKlBsYp8NO9xKjBWIxwU/+S/IgoQP\n"
- + "aTNkY4Mc353bdLi9082JwaiQ9B5eH0V9pZ17OSRU44o2TeDDT85sjF+krqCnnolR\n"
- + "3lk7iqYDRHsvgqJqtkhhX/boF3wJAnKqaZ6j97PVqV75kwAak7XaH7C50RsPQGk2\n"
- + "j5OFa6ioobW7tN5PfWAZPMZn98yX2Wh8Z95aGhdsHSJHsrlcUiWa+X2D1kF/dOKd\n"
- + "R8rPqdPIPjUglrXS4yP+cJHx6fCJxW7me1R60lpuL6JNvHp54u7GGA==\n"
- + "-----END CERTIFICATE-----";
+ private static final String VALID = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGJzCCBA+gAwIBAgIUGCzNOZhcLiPYbOjRFAp5n04dPNowDQYJKoZIhvcNAQEL\n" +
+ "BQAwTDELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxIjAg\n" +
+ "BgNVBAMMGVF1b1ZhZGlzIFFWUkNBMUczIFNTTCBJQ0EwHhcNMTcwNTAyMTcwMDA4\n" +
+ "WhcNMjAwNTAyMTcxMDAwWjB9MQswCQYDVQQGEwJCTTERMA8GA1UECAwIUGVtYnJv\n" +
+ "a2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQKDBBRdW9WYWRpcyBMaW1pdGVk\n" +
+ "MS0wKwYDVQQDDCRxdnNzbHJjYTFnMy1zc2wtdi5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCLgSX0nduUm87/qmfTdofL\n" +
+ "5P/Xtrly8Z9GaiLPLu1syNqT/Sri4ngYQGXXwF8h6gnHgEb6gDI2p3Q3gb75NthO\n" +
+ "WfWMD6FqafV47pUeNml6JvNbsYAPc8qGxMPtgQ8HhQuU+Trykx3onq/Se5HRYlve\n" +
+ "7MMJixiYQKYwwThHh9G1uGYPMQJT2TQfueIAu0MT6Ljc2YB6noXpzTzU63dvmC1Q\n" +
+ "8TMmFoJYL276lQ3p3vRKEW1nVmjeVoqvK/3Vpg440KbQL5D7Gj/pQPL4d7ljyS/I\n" +
+ "UN3q7QPS7BojsvF90u0YpvYEuBXsxdFnqivj5owSuSENG4nqcZUO8/nY+4b+NbJd\n" +
+ "AgMBAAGjggHOMIIByjB6BggrBgEFBQcBAQRuMGwwPgYIKwYBBQUHMAKGMmh0dHA6\n" +
+ "Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2ExZzNzc2xpY2EuY3J0MCoG\n" +
+ "CCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wHQYDVR0O\n" +
+ "BBYEFIDk6mMLdh49CFbFiUDnjZhWatYzMB8GA1UdIwQYMBaAFCAGDUJLpNnTKHAn\n" +
+ "Y7xMaUYhgR08MGkGA1UdIARiMGAwRgYMKwYBBAG+WAABZAEBMDYwNAYIKwYBBQUH\n" +
+ "AgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwCAYG\n" +
+ "Z4EMAQICMAwGCisGAQQBvlgBhFgwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL2Ny\n" +
+ "bC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2ExZzNzc2xpY2EuY3JsMA4GA1UdDwEB\n" +
+ "/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwLwYDVR0RBCgw\n" +
+ "JoIkcXZzc2xyY2ExZzMtc3NsLXYucXVvdmFkaXNnbG9iYWwuY29tMA0GCSqGSIb3\n" +
+ "DQEBCwUAA4ICAQB2XiV2msE7M8Qp0YIcihD86T8U91PJH7Pb3F/3+8fyX08/oKDo\n" +
+ "s80sE50tiI5lw+tSFQZuvpOFefejEh1uAwu1slZOlvICHOAJNG1EXPa8pEmDU2i5\n" +
+ "nd5r7rM757/+cgsPLvwegVuIL4vIYhnoKzPiXpkl8FkNrhRjqeUIAXf2sLjbbbng\n" +
+ "oYRCypkSovpijPf7Cid19wKh/ipp8DxCNnGMit55mnx7eFNAWpb9cFljd+WaABCA\n" +
+ "IcvcZhZrLKYrbUErdQzzu0sa3IlEC5QBgz+IvT62RHT+vWRiv0LYhkHVLsDQUHpJ\n" +
+ "uTa1xi0qvBVGIP1jxIQv5W3hGPLYt7B/8A8v+xOn4m1VWfGIa4V3RGpbBMw19DH+\n" +
+ "JvLjg8coDWKhqZ150V31Ve8wczSjT+KZHFRWTb4TZt8GSXa56kJV5xadPW8A3EKV\n" +
+ "kulcspO1njb73ImrwTPIOLnDAsMDrAO41FEob87bdZacpg+kHjiAP9BzpgSSX1x5\n" +
+ "b/qy2uRtsf3ZlOb1J6fCqb8lRwSU7uGUStUx4tVMpjR5LQfNVroiDEthN5BE6sye\n" +
+ "zVRq8vyGvG40jSMBZF1KyW4GW6JlgM1THr1egNFhNkHBs7pSTHJp1Ea+QJjB1uVe\n" +
+ "A8kBL0iUlI5PPOqe5KdEXcFy3L+gRh34gyckC4vrLzfNLjKHQvdRHYnQBA==\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvica1g3-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // Owner: CN=qvsslrca1g3-ssl-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
// ST=Pembroke, C=BM
- private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF9DCCA9ygAwIBAgIUBAG4l0ZPYhEdLJSMWYCr7LHngvswDQYJKoZIhvcNAQEL\n"
- + "BQAwSzELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxITAf\n"
- + "BgNVBAMTGFF1b1ZhZGlzIElzc3VpbmcgQ0EgMSBHMzAeFw0xMjExMTQxMzQ4MDda\n"
- + "Fw0xNDExMTQxMzQ4MDdaMHYxCzAJBgNVBAYTAkJNMREwDwYDVQQIEwhQZW1icm9r\n"
- + "ZTERMA8GA1UEBxMISGFtaWx0b24xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQx\n"
- + "JjAkBgNVBAMTHXF2aWNhMWczLXIucXVvdmFkaXNnbG9iYWwuY29tMIIBIjANBgkq\n"
- + "hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqlof1qJLTiqI7bf0IU7zOxy0HqjIn0pW\n"
- + "lNIEVAjQRR1jnfpsMapicIGZfnnNaYpwdsIjGPwpvWXGA+30ezJNGfWMjhb/tiis\n"
- + "qjrHdwXAob5MyXOXP5ZS8K34GwKeL45oJZZG0cf2FSta9/CSsRC9wnDUp/kA+VkH\n"
- + "n5vlg7VpUExYO0CBXe4C4ehnvCZHjW5nqpVpm993f9i8E0W3vHPxjGuyuqVEEfma\n"
- + "WfOV78+HF4hxALnr+73mp0i6Do2oa/v85mZzyKeBm2YHhwdQ6CC7UZtABlHyWuz9\n"
- + "h/ocTGbX92rbUaW6icu9bKQkQ9jsomnQkU5b8CWseo2O0NXBevvCowIDAQABo4IB\n"
- + "ozCCAZ8wdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5x\n"
- + "dW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKGLGh0dHA6Ly90cnVzdC5xdW92\n"
- + "YWRpc2dsb2JhbC5jb20vcXZpY2ExZzMuY3J0MCgGA1UdEQQhMB+CHXF2aWNhMWcz\n"
- + "LXIucXVvdmFkaXNnbG9iYWwuY29tMFEGA1UdIARKMEgwRgYMKwYBBAG+WAACZAEB\n"
- + "MDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3Jl\n"
- + "cG9zaXRvcnkwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr\n"
- + "BgEFBQcDAjAfBgNVHSMEGDAWgBRdBBgS+8PqeH20Vwmh/m3+gp9kzTA7BgNVHR8E\n"
- + "NDAyMDCgLqAshipodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmljYTFn\n"
- + "My5jcmwwHQYDVR0OBBYEFNrefqnat67/DMlw0Z/xdQ478leyMA0GCSqGSIb3DQEB\n"
- + "CwUAA4ICAQBG1TxJNbWzG4ShZefK4wEdScBzxSB7StYO3mmIP2D3LTlEk+zWjDVP\n"
- + "ERPL41Si92asMHvMai7GcFT82XyHxsQGZIPcgIm+rC2NiSPDx2Vd6lkMaO8J9mrU\n"
- + "3Z4Ks3G5HmszQ/gXRT3DCoNng+k+JqdZjrvMcsGTH+AzRdoinwOi+QnpphAcZRhS\n"
- + "Io8C7w9osUPYFdDaE3Io+oYr2mWJg4n+FGsjxunQgIhLiiNaVF8zHxER7gW0YsCW\n"
- + "vw1jX0dmfQZSdo2ybVeHuznUxtUWRHJ/nv6v2B2anUsVEbPyrpQ3i9+BzWaYolPU\n"
- + "ZYxfMHBQ7HvncRP6rgrHF4x+iOnIxWsErYdEj5nQJkptYbVl41VzO6xMP7WvXFPa\n"
- + "dqxwihqILRmAZrI9p/6k/HqV9xMPKprUhnWDGQ/bYnPKyXoTx6uwamaonX4DpW83\n"
- + "b3CJTvBHwKh5eJQoBykAkakPdrmbOhe4/XWnDqQVUgJNmEvkg33AexviJo4mW3HG\n"
- + "K2MdM60GRIC3Lcnd+Q8SnSCCxp+YtuE/C3Fu8VI/8vz9MC159GGtDzyC7OeKPCpU\n"
- + "7H1X0X/OhBkiv7anK/oIhtSw+4DrM2eaVjdWkEa+di2jvI/2us8TXxO1LL+eeSxT\n"
- + "E+LbdNO0jSp8azw2Aw4zL+Q41Fzt7OlH7mTkw1mxLF3aWsUNUz/p4w==\n"
- + "-----END CERTIFICATE-----";
+ private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGJzCCBA+gAwIBAgIUGeTgdhQ6UoMWie3kBh4IGxDH4AQwDQYJKoZIhvcNAQEL\n" +
+ "BQAwTDELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxIjAg\n" +
+ "BgNVBAMMGVF1b1ZhZGlzIFFWUkNBMUczIFNTTCBJQ0EwHhcNMTcwNTAyMTY1OTQ4\n" +
+ "WhcNMjAwNTAyMTcwOTAwWjB9MQswCQYDVQQGEwJCTTERMA8GA1UECAwIUGVtYnJv\n" +
+ "a2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQKDBBRdW9WYWRpcyBMaW1pdGVk\n" +
+ "MS0wKwYDVQQDDCRxdnNzbHJjYTFnMy1zc2wtci5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDR/0pcsSc4mmqVkzCO5h1m\n" +
+ "BlZ0uxmakNTNnWqeOXmMgl2KBni6MzIdxBkPmII5TI3nc+DXrWrtBCJKRtww3mbF\n" +
+ "ZoBhrscODv3OjfVqsVfhUPjqLwUEE9X/8IlxFpcsKRH1mC7weLg56kfnHuK2WHPQ\n" +
+ "dbnVgzzjk8mSi8HL3szIiojGC0ZwilrV/LCXBqETC3aMe8PtGnMW96TcvqQEdYFa\n" +
+ "4MEXuYnUwXB0WoKAJkHw/MMc0RytrICtlpaMQ7ZnloW8LvoQ1wIM7nWwCr+dieh6\n" +
+ "lZCWRN/Au+h6qdyDUDUPQFoGpp7AfE2OJmeCY30gp4GdAKtGpTG++gfJrtkc8FnZ\n" +
+ "AgMBAAGjggHOMIIByjB6BggrBgEFBQcBAQRuMGwwPgYIKwYBBQUHMAKGMmh0dHA6\n" +
+ "Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2ExZzNzc2xpY2EuY3J0MCoG\n" +
+ "CCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wHQYDVR0O\n" +
+ "BBYEFGffDkPGAcip01jKnnvEt1jpKNRnMB8GA1UdIwQYMBaAFCAGDUJLpNnTKHAn\n" +
+ "Y7xMaUYhgR08MGkGA1UdIARiMGAwRgYMKwYBBAG+WAABZAEBMDYwNAYIKwYBBQUH\n" +
+ "AgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwCAYG\n" +
+ "Z4EMAQICMAwGCisGAQQBvlgBhFgwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL2Ny\n" +
+ "bC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2ExZzNzc2xpY2EuY3JsMA4GA1UdDwEB\n" +
+ "/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwLwYDVR0RBCgw\n" +
+ "JoIkcXZzc2xyY2ExZzMtc3NsLXIucXVvdmFkaXNnbG9iYWwuY29tMA0GCSqGSIb3\n" +
+ "DQEBCwUAA4ICAQBI/zlzisJLwBNaVZkQDMh1gYY8uRUad6Jn7yBFQbJ796VVlD1A\n" +
+ "yxJD+y9cpwzXvwKau8jIMi96OXo6xtsTDxKY9PzW8DkrlrxqdzLI7s5M30tGu8Sk\n" +
+ "WitIWPC3FU0oZqa9jBPkfujllR5FNuYikMOFIi2+/3haEK/6kviLpe5WyK4yJ3a9\n" +
+ "7dLq0If4vhNbKsuW1ROnq5CpPy+iIuZy3CWtq8WJSHDyZzhzrW48QHmTkoAU5lAb\n" +
+ "3KLMBo/gtUTjABVauADeVZVN6GgLflSIdz1P/aMJQ88q/88w+6KYJlBtg3mWSRHc\n" +
+ "Vh+BkIiKmfTG+N9SJ5jv7VKt8PjcKgqCzOHUslLHgUDFhJ5gdYIixD24ikRHYriH\n" +
+ "UCO3ltEppIUm/xgins75F6V9YBxHA1Ks/S5MfMnI6N+fFurIwIsas5w6gTPNwbBC\n" +
+ "z6G1fu6schk73uvfK4W6PiuMTURsQ1M746K2BlV+FIclTk8jYHe+EyLFgIsgVigo\n" +
+ "JJs0DsIp0RoGvw+bxxyA9CHeFFi+MlAVEj2+qJnwrD3ZqNFFw87/HDIWW+Ue8ERs\n" +
+ "HfPDZvEQZ1BHGzD/H04F0+HwwfItxvgiQVC2L/yjmh7St311OLiK8RM3Ur0X15bZ\n" +
+ "3g4c1gsHx9Gmlk3l8YIOk0yxvLaF03YsNbrfykXHuJM9Phy8Ya3nTpsqtw==\n" +
+ "-----END CERTIFICATE-----";
- public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled)
+ public void runTest(ValidatePathWithParams pathValidator)
throws Exception {
// Validate valid
pathValidator.validate(new String[]{VALID, INT},
ValidatePathWithParams.Status.GOOD, null, System.out);
// Validate Revoked
- if (ocspEnabled) {
- // Revoked certificates are expired in Nov 2014
- // and backdated revocation check is only possible with OCSP
- pathValidator.setValidationDate("Jan 01, 2014");
- }
-
pathValidator.validate(new String[]{REVOKED, INT},
ValidatePathWithParams.Status.REVOKED,
- "Thu Jan 03 23:47:34 PST 2013", System.out);
-
- // reset validation date back to current date
- pathValidator.resetValidationDate();
+ "Tue May 02 10:15:37 PDT 2017", System.out);
}
}
-class RootCA2 {
+class RootCA2G3 {
- // Owner: CN=QuoVadis Global SSL ICA G3, O=QuoVadis Limited, C=BM
- private static final String INT = "-----BEGIN CERTIFICATE-----\n"
- + "MIIGFzCCA/+gAwIBAgIUftbnnMmtgcTIGT75XUQodw40ExcwDQYJKoZIhvcNAQEL\n"
- + "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"
- + "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xMjExMDYxNDUwMThaFw0y\n"
- + "MjExMDYxNDUwMThaME0xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\n"
- + "aW1pdGVkMSMwIQYDVQQDExpRdW9WYWRpcyBHbG9iYWwgU1NMIElDQSBHMzCCAiIw\n"
- + "DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANf8Od17be6c6lTGJDhEXpmkTs4y\n"
- + "Q39Rr5VJyBeWCg06nSS71s6xF3sZvKcV0MbXlXCYM2ZX7cNTbJ81gs7uDsKFp+vK\n"
- + "EymiKyEiI2SImOtECNnSg+RVR4np/xz/UlC0yFUisH75cZsJ8T1pkGMfiEouR0EM\n"
- + "7O0uFgoboRfUP582TTWy0F7ynSA6YfGKnKj0OFwZJmGHVkLs1VevWjhj3R1fsPan\n"
- + "H05P5moePFnpQdj1FofoSxUHZ0c7VB+sUimboHm/uHNY1LOsk77qiSuVC5/yrdg3\n"
- + "2EEfP/mxJYT4r/5UiD7VahySzeZHzZ2OibQm2AfgfMN3l57lCM3/WPQBhMAPS1jz\n"
- + "kE+7MjajM2f0aZctimW4Hasrj8AQnfAdHqZehbhtXaAlffNEzCdpNK584oCTVR7N\n"
- + "UR9iZFx83ruTqpo+GcLP/iSYqhM4g7fy45sNhU+IS+ca03zbxTl3TTlkofXunI5B\n"
- + "xxE30eGSQpDZ5+iUJcEOAuVKrlYocFbB3KF45hwcbzPWQ1DcO2jFAapOtQzeS+MZ\n"
- + "yZzT2YseJ8hQHKu8YrXZWwKaNfyl8kFkHUBDICowNEoZvBwRCQp8sgqL6YRZy0uD\n"
- + "JGxmnC2e0BVKSjcIvmq/CRWH7yiTk9eWm73xrsg9iIyD/kwJEnLyIk8tR5V8p/hc\n"
- + "1H2AjDrZH12PsZ45AgMBAAGjgfMwgfAwEgYDVR0TAQH/BAgwBgEB/wIBATARBgNV\n"
- + "HSAECjAIMAYGBFUdIAAwOgYIKwYBBQUHAQEELjAsMCoGCCsGAQUFBzABhh5odHRw\n"
- + "Oi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wDgYDVR0PAQH/BAQDAgEGMB8GA1Ud\n"
- + "IwQYMBaAFO3nb3Zav2DsSVvGpXe7chZxm8Q9MDsGA1UdHwQ0MDIwMKAuoCyGKmh0\n"
- + "dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhMmczLmNybDAdBgNVHQ4E\n"
- + "FgQUsxKJtalLNbwVAPCA6dh4h/ETfHYwDQYJKoZIhvcNAQELBQADggIBAFGm1Fqp\n"
- + "RMiKr7a6h707M+km36PVXZnX1NZocCn36MrfRvphotbOCDm+GmRkar9ZMGhc8c/A\n"
- + "Vn7JSCjwF9jNOFIOUyNLq0w4luk+Pt2YFDbgF8IDdx53xIo8Gv05e9xpTvQYaIto\n"
- + "qeHbQjGXfSGc91olfX6JUwZlxxbhdJH+rxTFAg0jcbqToJoScWTfXSr1QRcNbSTs\n"
- + "Y4CPG6oULsnhVvrzgldGSK+DxFi2OKcDsOKkV7W4IGg8Do2L/M588AfBnV8ERzpl\n"
- + "qgMBBQxC2+0N6RdFHbmZt0HQE/NIg1s0xcjGx1XW3YTOfje31rmAXKHOehm4Bu48\n"
- + "gr8gePq5cdQ2W9tA0Dnytb9wzH2SyPPIXRI7yNxaX9H8wYeDeeiKSSmQtfh1v5cV\n"
- + "7RXvm8F6hLJkkco/HOW3dAUwZFcKsUH+1eUJKLN18eDGwB8yGawjHvOKqcfg5Lf/\n"
- + "TvC7hgcx7pDYaCCaqHaekgUwXbB2Enzqr1fdwoU1c01W5YuQAtAx5wk1bf34Yq/J\n"
- + "ph7wNXGvo88N0/EfP9AdVGmJzy7VuRXeVAOyjKAIeADMlwpjBRhcbs9m3dkqvoMb\n"
- + "SXKJxv/hFmNgEOvOlaFsXX1dbKg1v+C1AzKAFdiuAIa62JzASiEhigqNSdqdTsOh\n"
- + "8W8hdONuKKpe9zKedhBFAvuxhDgKmnySglYc\n"
- + "-----END CERTIFICATE-----";
+ // Owner: CN=QuoVadis EV SSL ICA G3, O=QuoVadis Limited, C=BM
+ private static final String INT = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGuDCCBKCgAwIBAgIUUk/B8W400XArhKE/sEK7zHw8kDIwDQYJKoZIhvcNAQEL\n" +
+ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" +
+ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMiBHMzAeFw0xNjExMzAxNjIxMDFaFw0y\n" +
+ "NjExMzAxNjIxMDFaMEkxCzAJBgNVBAYTAkJNMRkwFwYDVQQKDBBRdW9WYWRpcyBM\n" +
+ "aW1pdGVkMR8wHQYDVQQDDBZRdW9WYWRpcyBFViBTU0wgSUNBIEczMIICIjANBgkq\n" +
+ "hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAonyczmwRSnw5BhWIrfcD19EbE7bYu5dF\n" +
+ "tD8o/5NtQCW+XdoLX+X9uNTuvnPw9Hv2RdhYrJgeLgF2wZ52XMGknRdB8tQYrknA\n" +
+ "l/j0N5f8DD82xP2eBkCpIB0UED4zNVwwWcdWvBUgNEdNobz9vQKb7B5LlbXm9kaO\n" +
+ "uxYgcv8WsNMivSP3mkJShEOh4RZ3ZdBM/vtJyuvUyEPjyiSzfN94tZHx/H194S4D\n" +
+ "VAPgE7ny3ISzN+Aa3kjyLebP/sPzI1AY0DWx8Yg4STG1j0PJeuTb6Ago2kmx4Kqn\n" +
+ "4q4kSPL8CgITYHiKaJx6Dt8Q90ieJ7ywG4Mb/YADOIlmoXZ6kXhzGAxyWXFgolLb\n" +
+ "4UToIh6U66v3Iyq+gXyCeMXGT4nUgs3+PduzOei9668jeKQaoU5d7LjJUL+ZH2+Y\n" +
+ "1bPmMAypHFLZryziOzC5kRo4TamgAf3LHHr2C7yIUuo+avlv3cic3NUodcfMi7Ax\n" +
+ "OQFLb32CtDoDeVb5v3x88R0tIEJTizk6M1B/0pGtZiFfXtrNVfHmEYvY2rOLbgWK\n" +
+ "M831ykqZSYHUpiqgnaNJb4Qs8WcxqUw1xki64WwiPclUSn5XgGMIwxSDGjUIJHKR\n" +
+ "rzgQ9lneHOHVb8pXHNFkdBDHTb1KNmDOyLsg3q0LJP6P3nzT/aWDAj3glpJvGQ5d\n" +
+ "kjAbjx+NFk8CAwEAAaOCAZcwggGTMBIGA1UdEwEB/wQIMAYBAf8CAQAwUQYDVR0g\n" +
+ "BEowSDBGBgwrBgEEAb5YAAJkAQIwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5x\n" +
+ "dW92YWRpc2dsb2JhbC5jb20vcmVwb3NpdG9yeTB0BggrBgEFBQcBAQRoMGYwKgYI\n" +
+ "KwYBBQUHMAGGHmh0dHA6Ly9vY3NwLnF1b3ZhZGlzZ2xvYmFsLmNvbTA4BggrBgEF\n" +
+ "BQcwAoYsaHR0cDovL3RydXN0LnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdnJjYTJnMy5j\n" +
+ "cnQwDgYDVR0PAQH/BAQDAgEGMCcGA1UdJQQgMB4GCCsGAQUFBwMBBggrBgEFBQcD\n" +
+ "AgYIKwYBBQUHAwkwHwYDVR0jBBgwFoAU7edvdlq/YOxJW8ald7tyFnGbxD0wOwYD\n" +
+ "VR0fBDQwMjAwoC6gLIYqaHR0cDovL2NybC5xdW92YWRpc2dsb2JhbC5jb20vcXZy\n" +
+ "Y2EyZzMuY3JsMB0GA1UdDgQWBBTlhFTQkEmfOLryyeEqCMVOn6BIPzANBgkqhkiG\n" +
+ "9w0BAQsFAAOCAgEAY/EHWbpNwCgGVQ1B7cIn530n6Rnht8ryN6E4Sis2GG09801s\n" +
+ "eCVMoGUB1uBCWm7uqQqydjTbjLhuub7hTjSJ1J30SOK1CZbk+c1VP9DcjY46hycy\n" +
+ "tUKQ2WbgkaY+l/tZNDKu0djc2hA5apljQCmiIzckbcHr6yRnFK7ZPjSPCAUKm20D\n" +
+ "vORQ7hsIaomsIlqXm5BPssMcxjI48Ezgv/s8ynASI8S5P2vOnBo08sJBM/a0Kbuw\n" +
+ "351SubTzjxG+o1SHe6lAzvIQMuSwxUca8YkiB19w5YZt+Ss2JXNc6F2jZwpr0hto\n" +
+ "IXe+N9/x0CohYRRa+IivRGgdDQc3w2P+pffNQP/qdPuUYyMkYWiuHH/YvwXyuDxv\n" +
+ "yGQfvKmHr1uq/qiqbK1bDSUoEq4Su8yX8YoF9TuxYraIpp9iErO5rarDO6GTNVHh\n" +
+ "1OXAJ/ePhOWzqo3flLTlAdTcs3Mq97kKW8XWCnu/cjJJglf2zVfLAlv95p56B9If\n" +
+ "0pXbN74qDkYEC8TdLOwryhcv8yyimh90/AvW9LpB7swkWnUUYNTep/XMX/RLpHLn\n" +
+ "JOVtnRpn3coVfSR/0rz0XKVXeZGnKztGdIMQhWMTxvZ1UpmRAH2Ab2QnVo1fkPVy\n" +
+ "qNSJces5Y/VKpIvLBk5Jj55fvK8ME/9ASa+LtLrIms8iYHl75cupuYZZlg8=\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvsslicag3-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
- // ST=Pembroke, C=BM
- private static final String VALID = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF+DCCA+CgAwIBAgIUE3XHqPhbZc2CY3aRtVHRlQwm3tcwDQYJKoZIhvcNAQEL\n"
- + "BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh\n"
- + "BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTE0MTExNDE0MDUz\n"
- + "MVoXDTE3MTExNDE0MDUxM1oweDELMAkGA1UEBhMCQk0xETAPBgNVBAgTCFBlbWJy\n"
- + "b2tlMREwDwYDVQQHEwhIYW1pbHRvbjEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRl\n"
- + "ZDEoMCYGA1UEAxMfcXZzc2xpY2FnMy12LnF1b3ZhZGlzZ2xvYmFsLmNvbTCCASIw\n"
- + "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK621GAU2/hywjuxi2Q9rCMncWIY\n"
- + "FbDngS69N6+qe9NUktfs/Rlh+jKUDHyf27G79xYGmDGZ0NTYI7tUyOvRanaq8ngd\n"
- + "NkZI4DS/Au2vpwuXucrtm3V/XRcsWHAsyevVzfiqfZzu+vU7/2KT/k7sByRzED4x\n"
- + "B4tMGaodvzIAzhFAmnmVXSUw7zvU07G/6/mfwYy9gwegJwVby/ZPWXefzHbLGDUz\n"
- + "xtO/6Ow9e5T2hedpo3IgfKptkzy0kA501DNaTMulW1gJwB+1duJ9OxZOAVgGCANX\n"
- + "IzWvgbONLEdkYGK+K8EAuMaa57WlG0wBZ9Y62iuvgw4XRd90/PS2RAFf/DsCAwEA\n"
- + "AaOCAaMwggGfMHMGCCsGAQUFBwEBBGcwZTAqBggrBgEFBQcwAYYeaHR0cDovL29j\n"
- + "c3AucXVvdmFkaXNnbG9iYWwuY29tMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3Qu\n"
- + "cXVvdmFkaXNnbG9iYWwuY29tL3F2c3NsZzMuY3J0MCoGA1UdEQQjMCGCH3F2c3Ns\n"
- + "aWNhZzMtdi5xdW92YWRpc2dsb2JhbC5jb20wUQYDVR0gBEowSDBGBgwrBgEEAb5Y\n"
- + "AAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2dsb2JhbC5j\n"
- + "b20vcmVwb3NpdG9yeTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH\n"
- + "AwEGCCsGAQUFBwMCMB8GA1UdIwQYMBaAFLMSibWpSzW8FQDwgOnYeIfxE3x2MDoG\n"
- + "A1UdHwQzMDEwL6AtoCuGKWh0dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2\n"
- + "c3NsZzMuY3JsMB0GA1UdDgQWBBSSYP84MQGz6cU/fyXfebv/8zn93TANBgkqhkiG\n"
- + "9w0BAQsFAAOCAgEAbqX71QIeoOJ36Aoiwg+oEwdDSRzXkR05kZU2y9qOCArrkgSj\n"
- + "ycdIRQFjHYNAWJrPP17PErk6+6NDWiwxLXbeHaY7pFIDCsgcCTWpixVlpVPKKxAE\n"
- + "uaomHo5K2AWWkJYNNPSLF411CmyN4eJjYQVrkCfJwFSUrQml8pFDedNDNuTaDsZo\n"
- + "klvUDYWM18gFrAbNF4Wi+dvj3qPOpTVyrTk2oBXtVUesNu4JF/O6li10YJ+kdox+\n"
- + "DUeq4Gk4B8zoWRTKa9Pp/RALI8TeNcfjBKbPtuXyfly1Cm8AXoQA5sus2SMMPQXE\n"
- + "S1+IsdnnKb60pT1EOX571SIBKV16xpRpbC3mDU6IG/+Sjm0TJxwSGbBO5bX69+bq\n"
- + "F8Im1QAKqVSYCtoypvieG3iGqHmj4SAaSqdmDDzmOPEtgX63ZmYVs+ey6tN+VThi\n"
- + "eaLRs+pHeBLMhh7Npt85c+xqRlIFBp0e84EzST0oE7pjuZcFFWstFXD2Pt1JQfXo\n"
- + "9szkw6EMhYbrgNqsh8lxkg8cZKHnP8KGLefyHajp3EIfC2MX7nUOeNmNoCxdsfBW\n"
- + "lmzRbv7H7eeAmQYHmxUaRnDMGR6QVX8/NrF1w0hqLkIpDj+29Mvv/Gp2azJrvqrL\n"
- + "w2bJ2mPD8rzBDmEFY317RWc8VBd8ZUxO/dYPWqsXNwBTdPMRQpYcN55po3g=\n"
- + "-----END CERTIFICATE-----";
+ // Owner: CN=qvsslrca2g3-ev-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // ST=Pembroke, C=BM, SERIALNUMBER=28474, OID.2.5.4.15=Private Organization,
+ // OID.1.3.6.1.4.1.311.60.2.1.3=BM
+ private static final String VALID = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIH4DCCBcigAwIBAgIUUZsNAKy8C5AlCfpCZWUQY2R6VawwDQYJKoZIhvcNAQEL\n" +
+ "BQAwSTELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxHzAd\n" +
+ "BgNVBAMMFlF1b1ZhZGlzIEVWIFNTTCBJQ0EgRzMwHhcNMTcwNDE4MTg1NjEyWhcN\n" +
+ "MTkwNDE4MTkwNjAwWjCBwDETMBEGCysGAQQBgjc8AgEDEwJCTTEdMBsGA1UEDwwU\n" +
+ "UHJpdmF0ZSBPcmdhbml6YXRpb24xDjAMBgNVBAUTBTI4NDc0MQswCQYDVQQGEwJC\n" +
+ "TTERMA8GA1UECAwIUGVtYnJva2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQK\n" +
+ "DBBRdW9WYWRpcyBMaW1pdGVkMSwwKgYDVQQDDCNxdnNzbHJjYTJnMy1ldi12LnF1\n" +
+ "b3ZhZGlzZ2xvYmFsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n" +
+ "ALo9QJVNVNVfG//nZiOPX/j2O8GTVlSAfIMliEj78G0xmPZiQD3n/70KcYlsI7No\n" +
+ "ilytC8e/m4Mic9PpYfmhAwiUSmb3ba8qjekUgmBFXuQqj3fH6Na+8f5WC9cYpwlc\n" +
+ "Ew3NuL2WBs86mjM/3GIa61IXrGpRxN6UQJwSxhqlb1QqEGtuwBiy9FJQd0xekCTC\n" +
+ "GBe2zFT1WhyVSMWlxwkcy1p2LeUmlvnV6FHQYcM9te8UPhgY53O6+u0tnnnsED37\n" +
+ "UOU3MLev8T++WL7VPOrjgjXydMC9ndXKRttQFIeJ1r+W7rdMLCWkrTzvJ6GtBZZr\n" +
+ "8jjHNabWPkBslML7oGwvUHMCAwEAAaOCA0YwggNCMHgGCCsGAQUFBwEBBGwwajA5\n" +
+ "BggrBgEFBQcwAoYtaHR0cDovL3RydXN0LnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmV2\n" +
+ "c3NsZzMuY3J0MC0GCCsGAQUFBzABhiFodHRwOi8vZXYub2NzcC5xdW92YWRpc2ds\n" +
+ "b2JhbC5jb20wHQYDVR0OBBYEFLVK7rSs4x+DZrwYaWl2mjhhAtV/MAwGA1UdEwEB\n" +
+ "/wQCMAAwHwYDVR0jBBgwFoAU5YRU0JBJnzi68snhKgjFTp+gSD8wWgYDVR0gBFMw\n" +
+ "UTBGBgwrBgEEAb5YAAJkAQIwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92\n" +
+ "YWRpc2dsb2JhbC5jb20vcmVwb3NpdG9yeTAHBgVngQwBATA8BgNVHR8ENTAzMDGg\n" +
+ "L6AthitodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmV2c3NsZzMuY3Js\n" +
+ "MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw\n" +
+ "LgYDVR0RBCcwJYIjcXZzc2xyY2EyZzMtZXYtdi5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggF9BgorBgEEAdZ5AgQCBIIBbQSCAWkBZwB2ALvZ37wfinG1k5Qjl6qSe0c4V5UK\n" +
+ "q1LoGpCWZDaOHtGFAAABW4J1OtsAAAQDAEcwRQIhANABKS1i5uxEm/HMivDJFyNJ\n" +
+ "gOKRrApqmx3KV0/pWMzqAiAui21HV9lVJ1OT6dEA9mlZAH4NmzklmY9WI978GMYG\n" +
+ "mgB2AFYUBpov18Ls0/XhvUSyPsdGdrm8mRFcwO+UmFXWidDdAAABW4J1Os0AAAQD\n" +
+ "AEcwRQIgTWLHrhex17UyIlr0HC9LXNUv0kyOudo7MpxoWFy1xGICIQCHFSoQGwvv\n" +
+ "zzpQ3JmHSLHy0AQQfWlbV9rFv37F4A7AaAB1AKS5CZC0GFgUh7sTosxncAo8NZgE\n" +
+ "+RvfuON3zQ7IDdwQAAABW4J1OvYAAAQDAEYwRAIgWLm8u/bcMZt5oXAPIqP9/Qqj\n" +
+ "Q61VYX+II6RFK+EJCnwCIBrXxQgngqO7X/aaeWnEjfQeSu7WCK9Md3tcqXsn+gMd\n" +
+ "MA0GCSqGSIb3DQEBCwUAA4ICAQAu0Y29voXdwt/68hwbdj8L50yecl2Z0OkOA31v\n" +
+ "UhAHgRVhQ+WiAgoeGEgjdntQ5pL7Wtr314gHpG6iR849Zr56WOliA6pfBYDk3qkH\n" +
+ "UiRgqQBUEV8oRzgp0E+Ebev+p9leM4RPYmUNsP3K4Z/BY24HNOtNKMC3clqKO35K\n" +
+ "D7B9ObYUb0+IjreKgUyQB7wMgFi7393gXDraVDhDoLrcktAkvkv3Mbt+A3IO5VrO\n" +
+ "4mQwjrLHzj8nFCmsP4RbCIKFO2QZE8sJYwplKUWOk1ngjpOvObPYpMt5M1kiRvau\n" +
+ "agkQ+WvnvuMEgAgafHtI4uu0ZNDW1ib0H+xq5X/x2w1RjEElbXCKMbnf3Pdvh9FG\n" +
+ "mLpkVITXIKzT0Jm+oIs+Vk4ktNEe8hQIzcqimmtlVl2hgMWkmIfRio1+41EY4Din\n" +
+ "QXBVsbRqftamzSpLbW54ryGJB8dSiGe4P53DOcNKiyie7une95ouZY/1DfQIlVG/\n" +
+ "9XexhqdGMKp6qUjgd9hOfHrD+mZHeBdIIONOHOhy6ESIUgpSzaAAM7QXZFqlzLzY\n" +
+ "okRp6cJKDfUmXrk80MopQMhRHJwdxfeZ/A/xAkrWlVPshG+qltSGIZWrNjhQIwk3\n" +
+ "49zFQCuDS+FrkubRueV+MB8Abp+V1nv5PNbhwfPzGSqwn9XX3vUnsp9uLv+3WlrL\n" +
+ "Kl1DeA==\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvsslicag3-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
- // ST=Pembroke, C=BM
- private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF+DCCA+CgAwIBAgIUMJWFWsVjz9o3zQoG9bZ/IsdRWDkwDQYJKoZIhvcNAQEL\n"
- + "BQAwTTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxIzAh\n"
- + "BgNVBAMTGlF1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBIEczMB4XDTEyMTExNDEzMTI1\n"
- + "NFoXDTE0MTExNDEzMTI1NFoweDELMAkGA1UEBhMCQk0xETAPBgNVBAgTCFBlbWJy\n"
- + "b2tlMREwDwYDVQQHEwhIYW1pbHRvbjEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRl\n"
- + "ZDEoMCYGA1UEAxMfcXZzc2xpY2FnMy1yLnF1b3ZhZGlzZ2xvYmFsLmNvbTCCASIw\n"
- + "DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALlwpCyabhrQYeRzEn0O7S505Fv4\n"
- + "ScJlJRHskcyZHBt0vt2tsDJNh2xJKJpnXzW14oGh+xrccEGeUw77qeFgfy+LTIHD\n"
- + "YDkYVHVhfs4NJD5wdyWL9Fn3A7pMFpapPBPJdsAAwByfzYFjRJsPHMSlGcroyGNm\n"
- + "+LquU5r965afaRkWQzZy+lY+OHO19Jis8EfUusYj2fQ3SXB8tBwFylDTnbCoM1HZ\n"
- + "BlbksbtLjFYKtyaNeQuoA7NnB3Q9XEONNK9KZ0S87KIqEKjIWK7ThO6lvhMQy2Zk\n"
- + "k+UVXVLpop7+Nkz3Fn08pE4OMfLjn1KVnk5l40WGabinfE6hz4vk0XREaKcCAwEA\n"
- + "AaOCAaMwggGfMHMGCCsGAQUFBwEBBGcwZTAqBggrBgEFBQcwAYYeaHR0cDovL29j\n"
- + "c3AucXVvdmFkaXNnbG9iYWwuY29tMDcGCCsGAQUFBzAChitodHRwOi8vdHJ1c3Qu\n"
- + "cXVvdmFkaXNnbG9iYWwuY29tL3F2c3NsZzMuY3J0MCoGA1UdEQQjMCGCH3F2c3Ns\n"
- + "aWNhZzMtci5xdW92YWRpc2dsb2JhbC5jb20wUQYDVR0gBEowSDBGBgwrBgEEAb5Y\n"
- + "AAJkAQEwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92YWRpc2dsb2JhbC5j\n"
- + "b20vcmVwb3NpdG9yeTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUH\n"
- + "AwEGCCsGAQUFBwMCMB8GA1UdIwQYMBaAFLMSibWpSzW8FQDwgOnYeIfxE3x2MDoG\n"
- + "A1UdHwQzMDEwL6AtoCuGKWh0dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2\n"
- + "c3NsZzMuY3JsMB0GA1UdDgQWBBSS2t3Itp/XsAppEeGyH+Ew8vEQ0zANBgkqhkiG\n"
- + "9w0BAQsFAAOCAgEAo8MJ2ek95Cs3chn1ecEMdGkUANnCBmgdvQjFt6XVLzYWs37n\n"
- + "j6Ac/nGj+Tzb30nTVdE2laRuTeLuGfYmd1AdBLHuRhWYG6A6jnlzqhmDRL3fvRYk\n"
- + "wjeWQn6Kx/lOoWC1xOa2EJYOWDr/rUY2PKo9rSVdGKmU6NFI/+FOFLaUD8tU77Qq\n"
- + "p9rfOYJwekckA2I2891lTRbnJfQhPD8mQjttd+nS46RwZxxAI5Pr6Jcr+BG3ARP5\n"
- + "oM/ifTCLXCc4L/0nozUDSweU17TCuFXWGEpIXbOVmE3kpmHaVe1FRQ0PUr2XHCbJ\n"
- + "H1vumQcJmOaUxiB4EzP+M+HnKg6rwhWlfgQEAnCcKkMF5ei1NAaHCwhRMC7ijJFA\n"
- + "Wt7s0/PpP2tChU7uXctMk2d36Dpibyn6Rc5a/QJX444ZRFEGrSe4nO/MXt3iEcat\n"
- + "fgYHOWoBunLIm7x/fd611xvyhifjqKVCPpqodpwFrXOlCQhXehhRvJSPDXWgDJeR\n"
- + "cDLLIcit4Sn1uyebQcZafaxgYPWpaYHFd7dzkO+kTVqOVAm7LukC5QQ9qFY1z7a5\n"
- + "IDUAFtEYg/c4XxX+pReOxydnnHeYZBrfRTTxOfMrg6dxsb1QcOeElXHgXRpHyiMh\n"
- + "XYsZWE2WHT7of4wMfNzCUrVSN0tCGDRW0MI48RM4BYbRnz3YNKafjnszeXI=\n"
- + "-----END CERTIFICATE-----";
+ // Owner: CN=qvsslrca2g3-ev-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // ST=Pembroke, C=BM, SERIALNUMBER=28474, OID.2.5.4.15=Private Organization,
+ // OID.1.3.6.1.4.1.311.60.2.1.3=BM
+ private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIH4TCCBcmgAwIBAgIUZTuy16qm4LnioIRmiaQZuThb38gwDQYJKoZIhvcNAQEL\n" +
+ "BQAwSTELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxHzAd\n" +
+ "BgNVBAMMFlF1b1ZhZGlzIEVWIFNTTCBJQ0EgRzMwHhcNMTcwNDE4MTg1NjQ0WhcN\n" +
+ "MTkwNDE4MTkwNjAwWjCBwDETMBEGCysGAQQBgjc8AgEDEwJCTTEdMBsGA1UEDwwU\n" +
+ "UHJpdmF0ZSBPcmdhbml6YXRpb24xDjAMBgNVBAUTBTI4NDc0MQswCQYDVQQGEwJC\n" +
+ "TTERMA8GA1UECAwIUGVtYnJva2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQK\n" +
+ "DBBRdW9WYWRpcyBMaW1pdGVkMSwwKgYDVQQDDCNxdnNzbHJjYTJnMy1ldi1yLnF1\n" +
+ "b3ZhZGlzZ2xvYmFsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB\n" +
+ "ALXMNTuogjC2wpziEXbKztdgzBflORLxoAo5Y8HNAZVo8MgJJucshZ5S6cmRjreY\n" +
+ "fOlwo85Vu9s39EMRR+I0AZLbxw2PZxNSHUxTCzWlmJ4yValRPRZjz2LXJ+mjpkc3\n" +
+ "hsVHtCawvPqh2uNwM2qUD6zKfRGdKC27NeICjYe7RtfhLRdrZ8MNtVWMrrFt3Dzd\n" +
+ "SRJXFcLkN4rPzRFCxldU2yH6V4cZwnVz4XxV/nbljVtGyMJWGVzU0Bhy1fedAJ9x\n" +
+ "KGJbM6wackOlpUm0XMQdFxHF2tW4Sus6Mcf+2N8FgXk4PnwXarIc/Sj5Tx+Bvf5y\n" +
+ "TwBOGS02Hzs07ILV3w4dp00CAwEAAaOCA0cwggNDMHgGCCsGAQUFBwEBBGwwajA5\n" +
+ "BggrBgEFBQcwAoYtaHR0cDovL3RydXN0LnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmV2\n" +
+ "c3NsZzMuY3J0MC0GCCsGAQUFBzABhiFodHRwOi8vZXYub2NzcC5xdW92YWRpc2ds\n" +
+ "b2JhbC5jb20wHQYDVR0OBBYEFALFAuUwkAiTXc+DIW861Mu1o/7RMAwGA1UdEwEB\n" +
+ "/wQCMAAwHwYDVR0jBBgwFoAU5YRU0JBJnzi68snhKgjFTp+gSD8wWgYDVR0gBFMw\n" +
+ "UTBGBgwrBgEEAb5YAAJkAQIwNjA0BggrBgEFBQcCARYoaHR0cDovL3d3dy5xdW92\n" +
+ "YWRpc2dsb2JhbC5jb20vcmVwb3NpdG9yeTAHBgVngQwBATA8BgNVHR8ENTAzMDGg\n" +
+ "L6AthitodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmV2c3NsZzMuY3Js\n" +
+ "MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw\n" +
+ "LgYDVR0RBCcwJYIjcXZzc2xyY2EyZzMtZXYtci5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggF+BgorBgEEAdZ5AgQCBIIBbgSCAWoBaAB2AFYUBpov18Ls0/XhvUSyPsdGdrm8\n" +
+ "mRFcwO+UmFXWidDdAAABW4J1uUEAAAQDAEcwRQIhAK2LD7cJrN7YYjyBqFDoZva+\n" +
+ "fae1CiuYyxpREVes1c8OAiBLVt/dGKnvwY2CW2TN3/WyRM7al2sLnM+XwNUGZDrJ\n" +
+ "pgB2ALvZ37wfinG1k5Qjl6qSe0c4V5UKq1LoGpCWZDaOHtGFAAABW4J1uVQAAAQD\n" +
+ "AEcwRQIhAIA9IjxIT69JGX+sl1okMiGsXfCOPq5crSX+m04Q7LcgAiBJWUsLDtm9\n" +
+ "5TKsGZvlJRKOn1CcA94sApQ4v+1D+uz+JQB2AKS5CZC0GFgUh7sTosxncAo8NZgE\n" +
+ "+RvfuON3zQ7IDdwQAAABW4J1uWwAAAQDAEcwRQIhAIWbEqGnZSIwrI5eWCIzfMRY\n" +
+ "A+onO3IjQrVAE6ZuGu2bAiAlyoRSfH4s8+lVL225AYD45OkJJfG41T6k+wVLM5Hg\n" +
+ "ezANBgkqhkiG9w0BAQsFAAOCAgEAPwvRI5GmzR72cDoh+7VPj7PihQDG4HBYq5Ta\n" +
+ "bF7NK2v9DoaU99vv01K3WBNIydjQX4j+IK8MoGp9dXV+LDUTsebnsY+nr3O4R0pK\n" +
+ "I2TAazN7zcy3SYc/MtaW7JI+/ckjHaJw+AT+qUz+l20p9shBFlg4QvH2cx2OOCat\n" +
+ "/CRnG2Nqc5nN1xVcS3aVDrGl36XIcjV+ab+3zicm3OhWqn/hlfBBWimuhix68i/L\n" +
+ "k+qUyN6A8Bz7NwsouzG7keS17VZbLFkOuczq9KxJLHtlI1OYFNzrLEx6aXeM5VoH\n" +
+ "mlwETxagSL6fjRvcCaM6As9WVRS08p/RldUrEw+O6r3ob7FaOywwIzSMFV1GbVFG\n" +
+ "eIrSMuSVwbQRa5Duakoe5vz1vOddrZPm3kqpvyT7j51nuedrjc8YgisuyMbxkf5s\n" +
+ "8tesqxdltXjFNwpwveYlgHAi3sZvO2dm6bEZcioxLEWEpwmYXrkBJWLhcILdfY99\n" +
+ "SWFAmwGtmCqh8Sxla77o+gaZkNKf3zBn/34Q91Z96qKgqjXDAGefsZiy4tQeEUJc\n" +
+ "2qIqjb2rWi5Vo7hn2eolNXzp6ZdanicpecpqwpmW9/v6YRxKLGTsdVz82TGWPnpt\n" +
+ "q3rCll0NIAfcjekFmRzmBWF1jOn4fCcF/WOxKW1T4JcMIcNoa5iI9M1WcVKQvJKA\n" +
+ "Zd5LLu4=\n" +
+ "-----END CERTIFICATE-----";
- public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled)
+ public void runTest(ValidatePathWithParams pathValidator)
throws Exception {
// Validate valid
pathValidator.validate(new String[]{VALID, INT},
ValidatePathWithParams.Status.GOOD, null, System.out);
// Validate Revoked
- if (ocspEnabled) {
- // Revoked certificates are expired in Nov 2014
- // and backdated revocation check is only possible with OCSP
- pathValidator.setValidationDate("Jan 01, 2014");
- }
-
pathValidator.validate(new String[]{REVOKED, INT},
ValidatePathWithParams.Status.REVOKED,
- "Fri Jan 04 03:49:46 PST 2013", System.out);
-
- // reset validation date back to current date
- pathValidator.resetValidationDate();
+ "Tue Apr 18 12:23:14 PDT 2017", System.out);
}
}
-class RootCA3 {
+class RootCA3G3 {
- // wner: CN=QuoVadis Issuing CA 3 G3, O=QuoVadis Limited, C=BM
- private static final String INT = "-----BEGIN CERTIFICATE-----\n"
- + "MIIGFTCCA/2gAwIBAgIUHZxbikClihb+1PM2ck0SDEZ8/dIwDQYJKoZIhvcNAQEL\n"
- + "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n"
- + "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMyBHMzAeFw0xMjExMDYxODM5MDVaFw0y\n"
- + "MjExMDYxODM5MDVaMEsxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM\n"
- + "aW1pdGVkMSEwHwYDVQQDExhRdW9WYWRpcyBJc3N1aW5nIENBIDMgRzMwggIiMA0G\n"
- + "CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCs6x3rpBdA1tTXgPYNjL1MKHuoDyb9\n"
- + "d4mxxk41t5Cvo3BnS0/cBlRIl91oqu3Iv9goVCMStla+GW9iRdX/53jYM1rXePDa\n"
- + "OnE/MJNLcVjmABZmEUtpzxUYLftwGEg1w/Wgi6z68vqZn7vbHJtFV8inlMIsdBVY\n"
- + "o3VmU9h+pGZU8JrF8x8U3voX4vm56OBCAM/1osUGXsVL2AY3z2Gjyb1Hv6fqHma7\n"
- + "PWrWV1hYS/EAnRUPO8iQqJwrbT/j7Mlo3khULV+T02M+oqs1ckIihl38n1eGvYcp\n"
- + "z40cceA2Ej5aglyF9i+ypA4XnxKF3f+6vvEYRPCMQB8Hiwuyy6naj6lPoLZ+nolT\n"
- + "t++xSkZ5imAoTXewA9JxyGCdiO9G4sZFIy4jjW7HBmKx6pZy3wWf48eawXPIpjop\n"
- + "EC+Kayf3foeyq40CAOjysVkblhUBawvVjAqKJ5aoKD4Ghnv02jdVvI4W7ME/fYYb\n"
- + "gm+XD7KJv4gHks+SIV93eXiUhYHvofJ3AG/1kp1p4tvIKCUtm2LCihmp53n9uLGA\n"
- + "NvizEnkuQmwlXtqOquKDluwSpHVFPxePMdRICUOnoZBdHv6f3LQCOU7AczRJYh8+\n"
- + "WYSKQy675/Itucgd+ABfY1H07F4FisCP75j8YknBdv4nfQsb0RcTg2P89dJNwAhL\n"
- + "rpk452WD4LuvsQIDAQABo4HzMIHwMBIGA1UdEwEB/wQIMAYBAf8CAQEwEQYDVR0g\n"
- + "BAowCDAGBgRVHSAAMDoGCCsGAQUFBwEBBC4wLDAqBggrBgEFBQcwAYYeaHR0cDov\n"
- + "L29jc3AucXVvdmFkaXNnbG9iYWwuY29tMA4GA1UdDwEB/wQEAwIBBjAfBgNVHSME\n"
- + "GDAWgBTGF9C8qOoCQ/IbBpldK5Agudec5DA7BgNVHR8ENDAyMDCgLqAshipodHRw\n"
- + "Oi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdnJjYTNnMy5jcmwwHQYDVR0OBBYE\n"
- + "FBPyQfSNOURHBZ37q8ZaNQwelu9eMA0GCSqGSIb3DQEBCwUAA4ICAQAsbJU89ZB9\n"
- + "1XVlOLmw8MaoWwOgI3DwM/g30YyIV1SERtDMKDOUnLVGTORTGv7Y8X789nGkMbKq\n"
- + "OEEa9Hty4jwyTnt2OISpCAb4GwBtH+FxNcLkJwZU2qtpTX8zDndofE/JLGo0rte5\n"
- + "bKchF2JTg+oby/Wpu2IO0CMd1phou3LLi8sWQGcY/f5vk+MUDnskH6NRXte4m8HW\n"
- + "FtYb7nOgLzY5FOJDtQuUFFioNoQzUHuj3SpUjIBxXf4VRFXz+FKIQ4jqzD/SnHG6\n"
- + "/7g/28x66LNpYjvaQ0T45EqxqPDCztfJO67GsNLXeSKq+BteqXcnKI77ZkqmwnWl\n"
- + "cYt5qek0GBYRYVOM8dUIvDryWHZIEqbeI0DAu06dyPuvIJNQ6WweqxJ+hH++BqGh\n"
- + "P4bViNNuP/Lqarb1RP7JiJW3wlyIUDD34JLzkusBgU++ptdYg1o0VnEB8KWDG8Of\n"
- + "cABL+TMoUldUp9DFFgFJIfnPX5XjXyG9mw2wwiUvClo93qFvC8+rhEGeZFd29rKi\n"
- + "dmmCc8FaCfBV9XdHHx/0ORTQp3HxnRDDiz+MN7p1Y4SXbHE3XXyQAUVTISGpPe3X\n"
- + "TUhmoARNmBBPALDm3EAvEBikTUMBFGR63wtu0pjA2cF5nvOyY8mBSsNk0R6+ZJSl\n"
- + "Cok3lH5oBM2H+KBk+sNZIBQ8BHcgbwlghg==\n"
- + "-----END CERTIFICATE-----";
+ // Owner: CN=QuoVadis QVRCA3G3 SSL ICA, O=QuoVadis Limited, C=BM
+ private static final String INT = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGszCCBJugAwIBAgIURUME8OY/YBHyokbgxoTKpPcoiHYwDQYJKoZIhvcNAQEL\n" +
+ "BQAwSDELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAc\n" +
+ "BgNVBAMTFVF1b1ZhZGlzIFJvb3QgQ0EgMyBHMzAeFw0xNzA0MTkxNDQ4NDBaFw0y\n" +
+ "NzA0MTkxNDQ4NDBaMEwxCzAJBgNVBAYTAkJNMRkwFwYDVQQKDBBRdW9WYWRpcyBM\n" +
+ "aW1pdGVkMSIwIAYDVQQDDBlRdW9WYWRpcyBRVlJDQTNHMyBTU0wgSUNBMIICIjAN\n" +
+ "BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAt8UIgFvcneWgv29aR2/UV810uW9N\n" +
+ "VpvdEgQDPHao5+i3IwCH1GrV8KeC25vfJAuW2TJ5gHeN5fmWAtWU8NDaNwGxJq/w\n" +
+ "jlOe/UW0KSosuuOBltLY9fl+7lDYqBjEwmCGvZMQOzpsbm8QUYTuZmtw96sT5beZ\n" +
+ "Kwqub/NBDE59IZ+b82obreNFFOgwcHv9E00bfRW7kizNfaC8AiwgV9WfIFgvtb4+\n" +
+ "YflcgGbdWnmNvwL8aZGWpGYjw/H/0kpwfMgrVF3Q7h8Y0yTg/jj8ZdXLdaE/PQzx\n" +
+ "8RUU4xJGxply/RrNUEvm9xeXZG3ssLW56WDEhRLkORX/zF4/mVyO2DpGJs06IUSP\n" +
+ "VWe+JuJGT1UxWqIsDIIHqJNa2BYl6O/XOjE2oGxiCb9w0/kQ8tKWWynFx4XOtrjA\n" +
+ "pGktsjw66tqE08XWOuoKwAXH2Llwz+VGSMzrCDH98VHtAu/XpEjuW3iP+I7EHksm\n" +
+ "W2eLdQdvTJ5DBdLsspIG4HC9Ke+c/gCEJHvOURPXoY7j9JPcQLc+5O7kBqiIjEBU\n" +
+ "NpPX37x7z3msac/IiG/SOYl+kiBESV44QFIOl8sHYmj9HGNlkQz4B/inuGwifIux\n" +
+ "rfdvm6nrpC7jhd/5Ptk4PO1kcAtgwcB99BnRCw47Xl7hrERTpoRISReNG0JMK7Op\n" +
+ "wVFqyi7bV1U/l4MCAwEAAaOCAY8wggGLMBIGA1UdEwEB/wQIMAYBAf8CAQAwSQYD\n" +
+ "VR0gBEIwQDA+BgRVHSAAMDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFk\n" +
+ "aXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUF\n" +
+ "BzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKG\n" +
+ "LGh0dHA6Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2EzZzMuY3J0MA4G\n" +
+ "A1UdDwEB/wQEAwIBBjAnBgNVHSUEIDAeBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsG\n" +
+ "AQUFBwMJMB8GA1UdIwQYMBaAFMYX0Lyo6gJD8hsGmV0rkCC515zkMDsGA1UdHwQ0\n" +
+ "MDIwMKAuoCyGKmh0dHA6Ly9jcmwucXVvdmFkaXNnbG9iYWwuY29tL3F2cmNhM2cz\n" +
+ "LmNybDAdBgNVHQ4EFgQUTknx5HQLmDQSOuWxVX3EknK1r6QwDQYJKoZIhvcNAQEL\n" +
+ "BQADggIBAHfmIJkd+URmnVm0X1/43QXu08RTzUr1zjf4ZBVtzUFoEkfZm+zKlhb7\n" +
+ "QeYJ5lprX1tdRfHLI+JC7oyI5+7/0q1j2FN2g0oKYN63dIgtppoCNpBu58f69YxL\n" +
+ "Y3GPSCfgs+ld+HegNSTjQVzelr16aFo9sj1fzUwY4Xj+xEYDjYxFmNGSXY37+DdN\n" +
+ "3WPm1iahBNNCZGfXq5T4qr6+R6RWwxsaBdQfZh3efGB1WG4DVSQBoiCKjS7Eg+Mf\n" +
+ "LT+KEZgawLUVrt/sT5lNfw23XA1gxIOcNRBHjsTWbtTBHJeb8hYvXB38UGK4GfIo\n" +
+ "NxtvRyXgG/U8+OuCQPS2SpJ1VH+yZ4Tn3G4k2+WillxfpqCVgHDVuT8wigw1xUNb\n" +
+ "0Ft9F3OWftWCVILaYEcyuJrnL3jjcZXc/zG01wIGDFvlPshRifVs/69Xq9UQmMfB\n" +
+ "GUh6MteDIsN9NdiArcumSC1dNoA/9eESp1pb186lDx9KxRQ/3NJRDMOIsMYN8Lyu\n" +
+ "cDNzsnymtQyIm3YG7VmZi/6k99n9vT8Ff9PvQ49cdfPl8GIONMdYmhTtLtuC00AU\n" +
+ "550HVLnpFW8d1NX3+XKxQ5FG04nsTxUD2FtT+trEQouktPq9iFqZN+PLPi8UdrBW\n" +
+ "AGUDCnO/TNo7IPW6arQrFpYbRLStiOJw7204Mjuqco/1KcqnEiIC\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvica3g3-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // Owner: CN=qvsslrca3g3-ssl-v.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
// ST=Pembroke, C=BM
- private static final String VALID = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF9DCCA9ygAwIBAgIUTkK7g7zoijtiLY/YV9ASX+pEsx0wDQYJKoZIhvcNAQEL\n"
- + "BQAwSzELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxITAf\n"
- + "BgNVBAMTGFF1b1ZhZGlzIElzc3VpbmcgQ0EgMyBHMzAeFw0xNDExMTQxNDA1NTJa\n"
- + "Fw0xNzExMTQxNDA1MzhaMHYxCzAJBgNVBAYTAkJNMREwDwYDVQQIEwhQZW1icm9r\n"
- + "ZTERMA8GA1UEBxMISGFtaWx0b24xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQx\n"
- + "JjAkBgNVBAMTHXF2aWNhM2czLXYucXVvdmFkaXNnbG9iYWwuY29tMIIBIjANBgkq\n"
- + "hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAosZjGbZtvAM45zdlTtT+uL12F5nebQrE\n"
- + "F9Fb8z1uhRJKgXAfjlfsMIjv7Xc7F80Li39yO0CmWHTMJS41auktW8IGVEkVV2og\n"
- + "EL7SKLjtgDJ1I3HAX02hfuOW0b/jkfPEcqTeZVE5Xew/HTAuTJMTqCEHM5hFieWL\n"
- + "tADPm7kANu5q6HaFXndKN/k1ozZXQn9YNTpDvvH6oD0Kqn/Peezi+C+6asTMSCk0\n"
- + "Xoi2TBHNi9dl2tfb6hu+T5VFwFsC9dGqYt07V8TbvKRAVV0MC8DnXnS89quFVmPS\n"
- + "I3ZSKeU4dlp8FzmTrd5nk3y9GL8GTkCsSN3RZbeAbLCpzcG5weS3GQIDAQABo4IB\n"
- + "ozCCAZ8wdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5x\n"
- + "dW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKGLGh0dHA6Ly90cnVzdC5xdW92\n"
- + "YWRpc2dsb2JhbC5jb20vcXZpY2EzZzMuY3J0MCgGA1UdEQQhMB+CHXF2aWNhM2cz\n"
- + "LXYucXVvdmFkaXNnbG9iYWwuY29tMFEGA1UdIARKMEgwRgYMKwYBBAG+WAACZAEB\n"
- + "MDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3Jl\n"
- + "cG9zaXRvcnkwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr\n"
- + "BgEFBQcDAjAfBgNVHSMEGDAWgBQT8kH0jTlERwWd+6vGWjUMHpbvXjA7BgNVHR8E\n"
- + "NDAyMDCgLqAshipodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmljYTNn\n"
- + "My5jcmwwHQYDVR0OBBYEFINCE86z3wESNeL4rz3eiaYA5LIWMA0GCSqGSIb3DQEB\n"
- + "CwUAA4ICAQBPe+Y5xDGZLYaVNOxxiyqFZrntGJGGQW1w4GtEfkH9oD8WGs5kBhMM\n"
- + "/XPGqw2FzzrvA5GfSdh+EMuXUfJY933AxwPcNfwGHzYGAHIDFsW17y5ZdKfBMN4Y\n"
- + "82e13iSfHQrbI0P6l8IIExfCw4HC8PxuEalg6H9fj9/1Q7mzdpwT3uG/HP6Dr2z+\n"
- + "PGYFMaH77MsOjfANT8UIdo5SAyXiJI5Y0cyKjuXhR6eJEKwNfri27UaV5cJJuV7I\n"
- + "fRcjb0h0Grr6gpKFb7JnhDZVGR3fDHTzuybuCqZk9TYKQ2sn1YfBFDqDpWODpykt\n"
- + "vyFO7eugpvSUgdTKRMPCtyppYgo2RwIsMmLrU4wPzdnPi8oo+cM0f5zXrmrkOLY0\n"
- + "PZo+K8QT/SrNT+9yZnHupLy01aYGJ4RJ047Wthr7a9S6i6DxbQ+ps4Ajh0X1bvOK\n"
- + "KCEKq5aoivYQMLn8pjudiMjbnKU4mgpmZK15D6lLmAprW3L6F8AEBJsK1BunPWhJ\n"
- + "nkQUyBnFgq2epmDfZ4f6SztNoLfDbatYNRb2KJfW1lks7UHDjuZ4PM20KkmmFJEE\n"
- + "LKR76WJzKi/+aks/csdFD7+/TMXrkY+JWlT4mCoHR1ol0m3DiqApKvRFZkMARfJq\n"
- + "npjt2cXyzDnguyQuLrHhdkKW+/LYeNckmVX+cPIxShLbuVhqMgdnWg==\n"
- + "-----END CERTIFICATE-----";
+ private static final String VALID = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGJzCCBA+gAwIBAgIUatc95M2rfpt/opXnck37WXW2RpAwDQYJKoZIhvcNAQEL\n" +
+ "BQAwTDELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxIjAg\n" +
+ "BgNVBAMMGVF1b1ZhZGlzIFFWUkNBM0czIFNTTCBJQ0EwHhcNMTcwNTAyMTY1OTAy\n" +
+ "WhcNMjAwNTAyMTcwOTAwWjB9MQswCQYDVQQGEwJCTTERMA8GA1UECAwIUGVtYnJv\n" +
+ "a2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQKDBBRdW9WYWRpcyBMaW1pdGVk\n" +
+ "MS0wKwYDVQQDDCRxdnNzbHJjYTNnMy1zc2wtdi5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+S725uLLelMIYHWuh6fbT\n" +
+ "lGdi7wf1BlsfQY/ZnLvsFbT1KHodE407RXP0NB6AeEBOlO8xQxaZ5b38aF+HROJw\n" +
+ "TcvUAgQHmNE+ER0JCMi42jSFC2dc93PhdcUEeesxIfu1iIKXxFmlbJtJxG3l27yJ\n" +
+ "L4ufum9iQYeZeoGXAr54x6JMY29kl5t9QM018d9sA9bHY+0iVJevM3xgxVe7xApw\n" +
+ "MSKoZH/OmkX8FaEW9b7TqrWfWcAdD8fkXK8lHCDqmUzSiDGJP16YeQA/4dmFO2vr\n" +
+ "ItXY8rTPjXoaolebHxf5WG5Qosxv0mPyklUb+SVSJagv66zl/H2Uk0bLyFFmuNAd\n" +
+ "AgMBAAGjggHOMIIByjB6BggrBgEFBQcBAQRuMGwwPgYIKwYBBQUHMAKGMmh0dHA6\n" +
+ "Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2EzZzNzc2xpY2EuY3J0MCoG\n" +
+ "CCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wHQYDVR0O\n" +
+ "BBYEFFhZXE0P1SMuntLc7JYoHTcD8JKfMB8GA1UdIwQYMBaAFE5J8eR0C5g0Ejrl\n" +
+ "sVV9xJJyta+kMGkGA1UdIARiMGAwRgYMKwYBBAG+WAADZAEBMDYwNAYIKwYBBQUH\n" +
+ "AgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwCAYG\n" +
+ "Z4EMAQICMAwGCisGAQQBvlgBhFgwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL2Ny\n" +
+ "bC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2EzZzNzc2xpY2EuY3JsMA4GA1UdDwEB\n" +
+ "/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwLwYDVR0RBCgw\n" +
+ "JoIkcXZzc2xyY2EzZzMtc3NsLXYucXVvdmFkaXNnbG9iYWwuY29tMA0GCSqGSIb3\n" +
+ "DQEBCwUAA4ICAQB6QV56jPZzFbFNnKq4xRglTkZSLDMnyrmquWJr4xUWkWIqhQqC\n" +
+ "s+wAchy39Uuu+Nv99N1AxJhorpdbyIOd7B2NAnUXPeOa1Rm34mh2a/df0gTVrrWJ\n" +
+ "YSUd3Tv7tcGrMXa7kNaP0N3lTITC0F0fu0rLyCH5I28t4zkCXadcWTqHUKIDNS1h\n" +
+ "fwx1Y6Dq4fBhKQGpqBq4ThEpBgJdj5aGCNiYfKO/MTDrLxD1BpIjV88O+54cdtYp\n" +
+ "3K+UDN2lP03PNH4Z/0jF4K43DHpwDM0r6qP4yLqFf3K1NlzGkYgNlMrKUPSlu+M8\n" +
+ "F6R45TWkcHndk3SUxbtGsxhiLG4xJKY7Zm/0vSxNqia+UJ5wL5s+IoiXhj22RrPe\n" +
+ "kcx7u3MxB+KWSrtQd8y624J6tqbE7R+aaAX95KTQZoawjypX99P8Kir/NynFHYri\n" +
+ "RAX9qFU8nYQEAe47oxl0bIr7URiQrlz+FJ/bzJZQwROWY723JPXgv7wUMifCYvJz\n" +
+ "4pLkuc4KE+LIEqk5LUuoYGEhKhKVu8YnmDifPPrBBADNvAnnGfDZF9FRvIcD6h8H\n" +
+ "icZBXJHOgu70Rh8Zc77x+v29tKlAJVtswLlV0mVClDUk7U36XL+mAvYntnG9kH5x\n" +
+ "qQ2Fl7AkUewOd4tLeiN4fl+S+ceW9sOZPSWx5aLui9p2mmxuyxhC5egCzg==\n" +
+ "-----END CERTIFICATE-----";
- // Owner: CN=qvica3g3-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
+ // Owner: CN=qvsslrca3g3-ssl-r.quovadisglobal.com, O=QuoVadis Limited, L=Hamilton,
// ST=Pembroke, C=BM
- private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n"
- + "MIIF9DCCA9ygAwIBAgIUSTXTLsMPxg4n9YY6GASBcJsgcaEwDQYJKoZIhvcNAQEL\n"
- + "BQAwSzELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxITAf\n"
- + "BgNVBAMTGFF1b1ZhZGlzIElzc3VpbmcgQ0EgMyBHMzAeFw0xMjExMTQxMzQ4MTda\n"
- + "Fw0xNDExMTQxMzQ4MTdaMHYxCzAJBgNVBAYTAkJNMREwDwYDVQQIEwhQZW1icm9r\n"
- + "ZTERMA8GA1UEBxMISGFtaWx0b24xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQx\n"
- + "JjAkBgNVBAMTHXF2aWNhM2czLXIucXVvdmFkaXNnbG9iYWwuY29tMIIBIjANBgkq\n"
- + "hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtaZUVAvasDtoFhZqL2fH+rI/IKeY0zj7\n"
- + "hGuYpLlT32JZX8cmkWUywZt6VxA8A5o82Ay0xT9vHy4MPnmmZExEvmkaECBmOh6+\n"
- + "WzWydYGKeeheUERJ1hLj2T7MKz/CCFY6NxD9XzvYOyhDpCUQKCOx4LMn0nMFrXrS\n"
- + "6IVirDUmH26dpl3IfsdVXyn6N3wLSNf+UX7in/PXsfD/A6RVtqYsfx4fxFJIPIhv\n"
- + "XG/cDOVIyfq6Oo1hthzGm8cnOSjvK/UfQV5iVBK68rqoGG+r9uBG9BfZtd7o0wrf\n"
- + "SSJkJAPJVpWTLvnD8RYpJIBz01vNgEOCEgF54bvjhBOjx15mrH7roQIDAQABo4IB\n"
- + "ozCCAZ8wdAYIKwYBBQUHAQEEaDBmMCoGCCsGAQUFBzABhh5odHRwOi8vb2NzcC5x\n"
- + "dW92YWRpc2dsb2JhbC5jb20wOAYIKwYBBQUHMAKGLGh0dHA6Ly90cnVzdC5xdW92\n"
- + "YWRpc2dsb2JhbC5jb20vcXZpY2EzZzMuY3J0MCgGA1UdEQQhMB+CHXF2aWNhM2cz\n"
- + "LXIucXVvdmFkaXNnbG9iYWwuY29tMFEGA1UdIARKMEgwRgYMKwYBBAG+WAACZAEB\n"
- + "MDYwNAYIKwYBBQUHAgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3Jl\n"
- + "cG9zaXRvcnkwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr\n"
- + "BgEFBQcDAjAfBgNVHSMEGDAWgBQT8kH0jTlERwWd+6vGWjUMHpbvXjA7BgNVHR8E\n"
- + "NDAyMDCgLqAshipodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdmljYTNn\n"
- + "My5jcmwwHQYDVR0OBBYEFLnaKDrPemoRtOZaUReSV5rWp3OoMA0GCSqGSIb3DQEB\n"
- + "CwUAA4ICAQA+B+R1TDmE4jC6itHBMPgqRoETJxtTdKyp6/egk5My4MATXRCSrStA\n"
- + "gp1c86hljmlN2gq05HKlAz9cC4W80pypJGfEbhYIi9B4Jxdo6zJNJqcFz3zj/otx\n"
- + "hvZ2nOO5qqEupAP8aHju0LhUlkcFQlbqaA+IiuQUh0VFQxk8LwkKEA8oIib7wLie\n"
- + "P1zBMXeRyDM5CnFWQmIFKXR4+9f51Dfv40Gy2RKQT7I8oXuADhrG9iXFJPXz4yYK\n"
- + "LazlDjnn0wv4vB9BmlcVdM2HPYqIPdvWBtPxT9vpNYHnB9Dq/zGqKJNUh8I4jB9k\n"
- + "8iQYJgoj62mQW2o1fObkVwrGgglAyzUzUzJfJyy9OEECjLY5o/9TJAKBAnewJ5B9\n"
- + "PagYo+klH937s2MOLqzl/uvbjXUBBvql1UU/lb8tSK9xCaXMEDhgiVricr13k32y\n"
- + "XmUcA/im96CI5cF5i4xHMnqprzPehFB/Mmi6g2tpiE0bmLkYj7MMJcmtUowa3FqA\n"
- + "QHtqKrK8wOfHep6qPx6VMD6Ypaf6yq66/kkSg05i6VO7V371UTibHeVLTr7LPRQJ\n"
- + "Emp8k/6qCXOtf5OdXwHBIDqvszf8ry85Rl3q813TntF0pPRvqLEYadC4Bwq7Snf+\n"
- + "PR0MPNhuwZBCmxZcyZqhVG2PyvvEmhPxhEdbO5DWUFwUP17WHNlgeQ==\n"
- + "-----END CERTIFICATE-----";
+ private static final String REVOKED = "-----BEGIN CERTIFICATE-----\n" +
+ "MIIGJzCCBA+gAwIBAgIUTgJvLquqZ+Padg/W5Y0bTu9jimswDQYJKoZIhvcNAQEL\n" +
+ "BQAwTDELMAkGA1UEBhMCQk0xGTAXBgNVBAoMEFF1b1ZhZGlzIExpbWl0ZWQxIjAg\n" +
+ "BgNVBAMMGVF1b1ZhZGlzIFFWUkNBM0czIFNTTCBJQ0EwHhcNMTcwNTAyMTY1ODQy\n" +
+ "WhcNMjAwNTAyMTcwODAwWjB9MQswCQYDVQQGEwJCTTERMA8GA1UECAwIUGVtYnJv\n" +
+ "a2UxETAPBgNVBAcMCEhhbWlsdG9uMRkwFwYDVQQKDBBRdW9WYWRpcyBMaW1pdGVk\n" +
+ "MS0wKwYDVQQDDCRxdnNzbHJjYTNnMy1zc2wtci5xdW92YWRpc2dsb2JhbC5jb20w\n" +
+ "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCOdbnnY8GsO002xJ6Snu2W\n" +
+ "snpPmW9ZJ4cEKzdBA4fYKP2V/8ibbOZVH5gI4tSSW+mcMrepS9Jw49sZaKOOGf/7\n" +
+ "YsjFOp4DQ0+w/7FOj4WrKWBhymDGKI8SsDqoCkxjCYkAc7cutm5Ge67Yto2mvkzW\n" +
+ "vThV7o9pJ4z2kMg+Q527908zvP1eqT2g+72X1L3o3RSdGM5V35R+lGiBDum8ojZm\n" +
+ "+QGCGuc6zROgumfYrh11iTNhXJw6KVAS9KJ5GSHzmua/Cu1dwC2SPxp/hRRHlvPp\n" +
+ "07EjY2oGhfe6Hvsu9YuoQCm95H4HPTmTDUCKURRIGcC8jdrjXBowEuH15vUocSIJ\n" +
+ "AgMBAAGjggHOMIIByjB6BggrBgEFBQcBAQRuMGwwPgYIKwYBBQUHMAKGMmh0dHA6\n" +
+ "Ly90cnVzdC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2EzZzNzc2xpY2EuY3J0MCoG\n" +
+ "CCsGAQUFBzABhh5odHRwOi8vb2NzcC5xdW92YWRpc2dsb2JhbC5jb20wHQYDVR0O\n" +
+ "BBYEFLzYzgqJRXrnLc5OYHF/koTdbIzeMB8GA1UdIwQYMBaAFE5J8eR0C5g0Ejrl\n" +
+ "sVV9xJJyta+kMGkGA1UdIARiMGAwRgYMKwYBBAG+WAADZAEBMDYwNAYIKwYBBQUH\n" +
+ "AgEWKGh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL3JlcG9zaXRvcnkwCAYG\n" +
+ "Z4EMAQICMAwGCisGAQQBvlgBhFgwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL2Ny\n" +
+ "bC5xdW92YWRpc2dsb2JhbC5jb20vcXZyY2EzZzNzc2xpY2EuY3JsMA4GA1UdDwEB\n" +
+ "/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwLwYDVR0RBCgw\n" +
+ "JoIkcXZzc2xyY2EzZzMtc3NsLXIucXVvdmFkaXNnbG9iYWwuY29tMA0GCSqGSIb3\n" +
+ "DQEBCwUAA4ICAQAge+6VZgaEFxN38q0MYKs/QbdGowLd5n2CfQfpdOTRnpOtKQw6\n" +
+ "Bc/o1O8O/y0XUl1Be7TCgfXKWgw+rKX+ZrI6wCm7MxYlWXV2guWU/AeEl2uv14s/\n" +
+ "KnKhzZHfb0eQyItfk23flubc7pbh99LaVqozsLCTL78lOB7N7ZQwsNCrEghHWMxl\n" +
+ "w1/IX/h9XOJoBzu4ulebJoQ3hdIYJY7+lkw64uH1FNrCu7P/jjU9ZlPaobZOUy64\n" +
+ "sYIt4GsZbMFaUiamNzBUvULw+ZkZq0hTK0cuyA85MXd+3rm5z2AMemC/29XTUYRU\n" +
+ "L9LkxMF71w8BJzgpVx3s0a6dfi6XtgacP407IhMc3EW1McsSWdT6jL0zidbjXisU\n" +
+ "vfvuzA50b3HwYz8PsRN0Zfi2R1BubaZQ9fQW2fe1EWgq80CqOdO7eNZeaBxbW/qB\n" +
+ "smGA1wiHIVEtyHbwZslcKNy8VPKurfKClwZQxf17/oK6QrhOgxiKJGYBUDTa7Ln7\n" +
+ "Qslp/y3G721NOXzborchs8XB+BYEETtWWkKoWFDiV7vkfyn3x2cYNiv5JCWDszhZ\n" +
+ "RyVrW26YOQ3MqBAiYqgbU2jMdqeRRfMIFqUvvXwoTvYXuN4Yc2ZAOmCBPpUxo66V\n" +
+ "zHDu+QK/2/pI1SMLvU3KG526gUtDd67t8JUHqxyo3NsXUCD8tUYpaJy/vg==\n" +
+ "-----END CERTIFICATE-----";
- public void runTest(ValidatePathWithParams pathValidator, boolean ocspEnabled)
+ public void runTest(ValidatePathWithParams pathValidator)
throws Exception {
// Validate valid
pathValidator.validate(new String[]{VALID, INT},
ValidatePathWithParams.Status.GOOD, null, System.out);
// Validate Revoked
- if (ocspEnabled) {
- // Revoked certificates are expired in Nov 2014
- // and backdated revocation check is only possible with OCSP
- pathValidator.setValidationDate("Jan 01, 2014");
- }
-
pathValidator.validate(new String[]{REVOKED, INT},
ValidatePathWithParams.Status.REVOKED,
- "Thu Jan 03 23:47:02 PST 2013", System.out);
-
- // reset validation date back to current date
- pathValidator.resetValidationDate();
+ "Tue May 02 10:15:53 PDT 2017", System.out);
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/nio/cs/TestGB18030.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8211382
+ * @summary Check GB18030
+ * @modules jdk.charsets
+ */
+
+import java.io.*;
+import java.nio.*;
+import java.nio.charset.*;
+
+public class TestGB18030 {
+ public static void gb18030_1(boolean useDirect) throws Exception {
+ for(char ch : new char[]{'\uFFFE', '\uFFFF'}) {
+ char[] ca = new char[]{ch};
+ Charset cs = Charset.forName("GB18030");
+ CharsetEncoder ce = cs.newEncoder();
+ CharsetDecoder cd = cs.newDecoder();
+ CharBuffer cb = CharBuffer.wrap(ca);
+ ByteBuffer bb;
+ if (useDirect) {
+ bb = ByteBuffer.allocateDirect(
+ (int)Math.ceil(ce.maxBytesPerChar()));
+ } else {
+ bb = ByteBuffer.allocate(
+ (int)Math.ceil(ce.maxBytesPerChar()));
+ }
+ CoderResult cr = ce.encode(cb, bb, true);
+ if (!cr.isUnderflow()) {
+ throw new RuntimeException(
+ String.format("Encoder Error: \\u%04X: direct=%b: %s",
+ (int)ch,
+ useDirect,
+ cr.toString()));
+ }
+ bb.position(0);
+ cb = CharBuffer.allocate((int)Math.ceil(
+ cd.maxCharsPerByte()*bb.limit()));
+ cr = cd.decode(bb, cb, true);
+ if (!cr.isUnderflow()) {
+ throw new RuntimeException(
+ String.format("Decoder Error: \\u%04X: direct=%b: %s",
+ (int)ch,
+ useDirect,
+ cr.toString()));
+ }
+ if (ca[0] != cb.get(0)) {
+ throw new RuntimeException(
+ String.format("direct=%b: \\u%04X <> \\u%04X",
+ useDirect,
+ (int)ca[0],
+ (int)cb.get(0)));
+ }
+ }
+ }
+ public static void main(String args[]) throws Exception {
+ gb18030_1(false);
+ gb18030_1(true);
+ }
+}
--- a/test/jdk/sun/nio/cs/TestISO2022JP.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/nio/cs/TestISO2022JP.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, 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,7 +22,7 @@
*/
/* @test
- * @bug 4626545 4879522 4913711 4119445 8042125
+ * @bug 4626545 4879522 4913711 4119445 8042125 8211382
* @summary Check full coverage encode/decode for ISO-2022-JP
* @modules jdk.charsets
*/
@@ -647,5 +647,17 @@
if (!new String(encoded, "x-windows-iso2022jp").equals(expectedStr)) {
throw new Exception("MSISO2022JP Decoder error");
}
+ // Test for 11 iso2022jp decoder
+ encoded = new byte[] {
+ (byte)0x1B, (byte)0x28, (byte)0x49, (byte)0x60,
+ (byte)0x1B, (byte)0x28, (byte)0x42,
+ };
+ String unexpectedStr = "\uffa0";
+ expectedStr = "\ufffd";
+ if (new String(encoded, "ISO2022JP").equals(unexpectedStr)) {
+ throw new Exception("ISO2022JP Decoder error: \\uFFA0");
+ } else if (!new String(encoded, "ISO2022JP").equals(expectedStr)) {
+ throw new Exception("ISO2022JP Decoder error: \\uFFFD");
+ }
}
}
--- a/test/jdk/sun/security/pkcs11/fips/TestTLS12.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/security/pkcs11/fips/TestTLS12.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,6 +1,5 @@
/*
- * Copyright (c) 2018, Red Hat, Inc. and/or its affiliates.
- *
+ * Copyright (c) 2018, Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/rsa/TestKeyPairGeneratorInit.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8211049
+ * @summary make sure the supplied SecureRandom object is used
+ */
+
+import java.security.*;
+import java.security.interfaces.*;
+
+public class TestKeyPairGeneratorInit {
+
+ private static class MySecureRandom extends SecureRandom {
+ boolean isUsed = false;
+ public MySecureRandom() {
+ super();
+ }
+
+ public void nextBytes(byte[] bytes) {
+ isUsed = true;
+ super.nextBytes(bytes);
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+ KeyPairGenerator kpg =
+ KeyPairGenerator.getInstance("RSA", "SunRsaSign");
+ MySecureRandom rnd = new MySecureRandom();
+ kpg.initialize(2048, rnd);
+ System.out.println("Generate keypair then check");
+ KeyPair kp = kpg.generateKeyPair();
+ if (!rnd.isUsed) {
+ throw new RuntimeException("ERROR: Supplied random not used");
+ } else {
+ System.out.println("=> Test passed");
+ }
+ }
+}
--- a/test/jdk/sun/security/ssl/SSLSessionContextImpl/Timeout.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/security/ssl/SSLSessionContextImpl/Timeout.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,13 @@
* @test
* @bug 4965541
* @summary verify that setSessionTimeout() with large values works
+ * @run main/othervm Timeout
* @author Andreas Sterbenz
*/
+// The SunJSSE provider cannot use System Properties in samevm/agentvm mode.
+// Please run JSSE test in othervm mode.
+
import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLContext;
@@ -36,32 +40,26 @@
public class Timeout {
public static void main(String[] args) throws Exception {
-// try {
- SSLServerSocketFactory ssf =
+ SSLServerSocketFactory ssf =
(SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
- SSLServerSocket ss = (SSLServerSocket)ssf.createServerSocket();
+ try (SSLServerSocket ss = (SSLServerSocket)ssf.createServerSocket()) {
String[] protocols = ss.getSupportedProtocols();
for (int i = 0; i < protocols.length; i++) {
-// try {
- if (protocols[i].equals("SSLv2Hello")) {
- continue;
- }
- SSLContext sslc = SSLContext.getInstance(protocols[i]);
- SSLSessionContext sslsc = sslc.getServerSessionContext();
- System.out.println("Protocol: " + protocols[i]);
- sslsc.setSessionTimeout(Integer.MAX_VALUE);
- int newtime = sslsc.getSessionTimeout();
- if (newtime != Integer.MAX_VALUE) {
- throw new Exception ("Expected timeout: " +
+ if (protocols[i].equals("SSLv2Hello")) {
+ continue;
+ }
+ SSLContext sslc = SSLContext.getInstance(protocols[i]);
+ SSLSessionContext sslsc = sslc.getServerSessionContext();
+ System.out.println("Protocol: " + protocols[i]);
+ sslsc.setSessionTimeout(Integer.MAX_VALUE);
+ int newtime = sslsc.getSessionTimeout();
+ if (newtime != Integer.MAX_VALUE) {
+ throw new Exception ("Expected timeout: " +
Integer.MAX_VALUE + ", got instead: " +
newtime);
- }
-// } catch (Exception e) {
-// }
+ }
}
-// } catch (Exception e) {
-// System.out.println(e);
-// }
+ }
System.out.println("Finished");
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/util/HostnameMatcher/NullHostnameCheck.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLEngineResult;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLHandshakeException;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.ByteArrayInputStream;
+import java.nio.ByteBuffer;
+import java.security.KeyStore;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.Base64;
+
+/*
+ * @test
+ * @bug 8211339
+ * @summary Verify hostname returns an exception instead of null pointer when
+ * creating a new engine
+ * @run main NullHostnameCheck
+ */
+
+
+public final class NullHostnameCheck {
+
+ public static void main(String[] args) throws Exception {
+ KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
+ keyStore.load(
+ new ByteArrayInputStream(Base64.getDecoder().
+ decode(keystoreB64)),
+ "123456".toCharArray());
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance(
+ KeyManagerFactory.getDefaultAlgorithm());
+ kmf.init(keyStore, "123456".toCharArray());
+ SSLContext serverCtx = SSLContext.getInstance("TLSv1.2");
+ serverCtx.init(kmf.getKeyManagers(), null, null);
+ SSLEngine serverEngine = serverCtx.createSSLEngine("localhost", -1);
+ serverEngine.setUseClientMode(false);
+
+ SSLContext clientCtx = SSLContext.getInstance("TLSv1.2");
+ clientCtx.init(null, new TrustManager[] {
+ new X509TrustManager() {
+ @Override
+ public void checkClientTrusted(
+ X509Certificate[] x509Certificates, String s) {
+ }
+
+ @Override
+ public void checkServerTrusted(
+ X509Certificate[] x509Certificates, String s) {
+ }
+
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return new X509Certificate[0];
+ }
+ }
+ }, null);
+
+ SSLEngine clientEngine = clientCtx.createSSLEngine();
+ clientEngine.setUseClientMode(true);
+
+ SSLParameters sslParameters = clientEngine.getSSLParameters();
+ sslParameters.setEndpointIdentificationAlgorithm("HTTPS");
+ clientEngine.setSSLParameters(sslParameters);
+ try {
+ handshake(clientEngine, serverEngine);
+ throw new Exception("Value was not null. Unexpected.");
+ } catch (SSLHandshakeException e) {
+ if (e.getCause() instanceof CertificateException) {
+ System.out.println("Correct Exception class thrown:\n\t" +
+ e.getMessage());
+ return;
+ }
+ throw e;
+ }
+ }
+
+ private static void handshake(SSLEngine clientEngine,
+ SSLEngine serverEngine) throws SSLException{
+ ByteBuffer cTOs = ByteBuffer.allocate(
+ clientEngine.getSession().getPacketBufferSize());
+ ByteBuffer sTOc = ByteBuffer.allocate(
+ serverEngine.getSession().getPacketBufferSize());
+
+ ByteBuffer serverAppReadBuffer = ByteBuffer.allocate(
+ serverEngine.getSession().getApplicationBufferSize());
+ ByteBuffer clientAppReadBuffer = ByteBuffer.allocate(
+ clientEngine.getSession().getApplicationBufferSize());
+
+ clientEngine.beginHandshake();
+ serverEngine.beginHandshake();
+
+ ByteBuffer empty = ByteBuffer.allocate(0);
+
+ SSLEngineResult clientResult;
+ SSLEngineResult serverResult;
+
+ boolean clientHandshakeFinished = false;
+ boolean serverHandshakeFinished = false;
+
+ do {
+ if (!clientHandshakeFinished) {
+ clientResult = clientEngine.wrap(empty, cTOs);
+ runDelegatedTasks(clientResult, clientEngine);
+
+ if (isHandshakeFinished(clientResult)) {
+ clientHandshakeFinished = true;
+ }
+ }
+
+ if (!serverHandshakeFinished) {
+ serverResult = serverEngine.wrap(empty, sTOc);
+ runDelegatedTasks(serverResult, serverEngine);
+
+ if (isHandshakeFinished(serverResult)) {
+ serverHandshakeFinished = true;
+ }
+ }
+
+ cTOs.flip();
+ sTOc.flip();
+
+ if (!clientHandshakeFinished) {
+ clientResult = clientEngine.unwrap(sTOc, clientAppReadBuffer);
+
+ runDelegatedTasks(clientResult, clientEngine);
+
+ if (isHandshakeFinished(clientResult)) {
+ clientHandshakeFinished = true;
+ }
+ }
+
+ if (!serverHandshakeFinished) {
+ serverResult = serverEngine.unwrap(cTOs, serverAppReadBuffer);
+ runDelegatedTasks(serverResult, serverEngine);
+
+ if (isHandshakeFinished(serverResult)) {
+ serverHandshakeFinished = true;
+ }
+ }
+
+ sTOc.compact();
+ cTOs.compact();
+ } while (!clientHandshakeFinished || !serverHandshakeFinished);
+ }
+
+ private static boolean isHandshakeFinished(SSLEngineResult result) {
+ return result.getHandshakeStatus() ==
+ SSLEngineResult.HandshakeStatus.FINISHED;
+ }
+
+ private static void runDelegatedTasks(SSLEngineResult result,
+ SSLEngine engine) {
+ if (result.getHandshakeStatus() ==
+ SSLEngineResult.HandshakeStatus.NEED_TASK) {
+ for (;;) {
+ Runnable task = engine.getDelegatedTask();
+ if (task == null) {
+ break;
+ }
+ task.run();
+ }
+ }
+ }
+
+// Base64 of PKCS12 Keystore
+static final String keystoreB64 =
+ "MIIQ6wIBAzCCEKQGCSqGSIb3DQEHAaCCEJUEghCRMIIQjTCCBgEGCSqGSIb3DQEHAa" +
+ "CCBfIEggXuMIIF6jCCAuwGCyqGSIb3DQEMCgECoIICmzCCApcwKQYKKoZIhvcNAQwB" +
+ "AzAbBBS7qnTOxJYV5At3migAiNAdPvKd7AIDAMNQBIICaMo0roH1TuZE1ARZtwCOXy" +
+ "F2sk4DmI6m1/CRdh6NeQzszJZH2701cEm0CES971IwobCNFo0+Er9tk1c+iXmMPJgM" +
+ "s1l/+7OpQCc/GRl2Nc7lQSj1Yvrq1CIQxC51hSrwNs0N9aCTavjKfJ7jk3k1+MNItU" +
+ "dMdwuIFK663NEH8Wm0D4njvIA9p3ehOLJWDi0ziFTcySyCbbWAL6HmJhzRlpakPpbp" +
+ "Ox68wfI2YgDpQwTq580TMEWz+9P1U07VmtfYlu9xjXQT/Ks1xzNrhbOyv+HLoE54qL" +
+ "RyhL36/fwCzlpCXCYokPUG2uziu8JiQyITYRpVhVcgR5m/rSMhVsj8HwUmIdlK2Irm" +
+ "kOqG2m6YPKRiq7eeCPskcf2Hh0H3pb6lxagSVQMb+qndIUhCvZoXL/oS2+1ngtMlXh" +
+ "ezjIEa5s2K+Kk8eV48Ydms5bW8Plqy20+0fgEClABF6QL4We4NaFJdl6DB0+KsxgUd" +
+ "ZHo4U7f3R6o971mAd/OACs4jzpA0/C3AKCbhBEh/nxnSPoxM0Ty3bLaK8LQnv+B2uo" +
+ "6TeypsxmGg4/kd6fymzrhWUJAFz7DjkO/32pDUXnUDa6CB+dZdUldPoOpviGl9ITfG" +
+ "apdnq8+B4y7lg/87OZbr99vyVBWtbATaNof3Y5PuNY5TTQ5y1u4gU+zO9qhRnjxSqb" +
+ "bXJYhKeOIJmXCgGerV1dFqcWfj163OtjTwwJ5VCrtgolTU+3eodARD86jkp1VRCtQ2" +
+ "M54zOND9mx9RM2ucOy41mgF2MyKIseN6+3665DtgDbN5H/pmmjR4/GSuuy4eJoGHvY" +
+ "OPy49P7o8xPjAZBgkqhkiG9w0BCRQxDB4KAG0AeQBrAGUAeTAhBgkqhkiG9w0BCRUx" +
+ "FAQSVGltZSAxNTQxMTg5MzQ5NTAxMIIC9gYLKoZIhvcNAQwKAQKgggKbMIIClzApBg" +
+ "oqhkiG9w0BDAEDMBsEFO1oLv/9BmQKRKpeUB/Q5FPzMZaPAgMAw1AEggJoxez71rvm" +
+ "pCMbF0MH3shCpy2LsHNnkyjQVTKBIqdHFmn1390gqRkUUlvaaLgpjNNFSVY/LMg+gK" +
+ "JEJW6kClerkFg1/fvMQDBr5ApGbACIWi7fN/qYjED0cY5eypnSKePUzR2uO254Qko4" +
+ "xc+Enx3+V0/O0eqwlzGq3Pmgq9vfyqPefG562tFQEmHyUMUTLg1m4rtUgG5bvtRIMl" +
+ "Vd6tgFA3JRb08USaJY3D+FQFb+zm/iIJ1KrHBgtBuJFLfaXqYo/fjjgIv0WiOIQmd1" +
+ "ygrfRp7AhCvqZu7IzKT3TWggfGHABfjgkRcVmCGsFCf1cXAJVzS1v4N2biY9tB9Q5Y" +
+ "iWZ0JglMHK+NfJu2+3UthyC3ugDeLTQTSbwfJv3ShcVFo7mVxJz2zPWJtDoXbORczm" +
+ "0tjMu8KztEpPhwH4nsoXJ60fMUDOAvYwr2t49CBRZ+b9rJB5QWWJ60ZrM5rsfNU5yJ" +
+ "RJYldqryD/T5UJEqRLK5X9N/DAszDFTDoTVFMwwuBv6yk/v9N999m4X77q75/d1y71" +
+ "sY9Aaj9gHKLSy1ZCsGoU2nt7A+Z+V9TNcmsM5aT+QpNdKvW99jI1T2XI7kHNJ+D0W3" +
+ "sD8dXlNA91na7/6HGM5dKQfZdk1zcUYg2lkDpyi3xzO2nzFvCaDfAqQqjuQtiXggWy" +
+ "RiNk+WC45GuUKP5F6fWWr871RjeVYezj5XoXWJ7x8J85SUMKiuQH3S2tRMcP2RtAS/" +
+ "D1aXdwuiVfLUMu9113dwpSwwmXcFASrt9VxXPNI8Aztu/YtqkONyQq50NChtYsykGA" +
+ "4ZUOuazkc1SLmIitNfBB9DFIMCMGCSqGSIb3DQEJFDEWHhQAcwBlAGwAZgBzAGkAZw" +
+ "BuAGUAZDAhBgkqhkiG9w0BCRUxFAQSVGltZSAxNTQxMTg5MzUzNjg4MIIKhAYJKoZI" +
+ "hvcNAQcGoIIKdTCCCnECAQAwggpqBgkqhkiG9w0BBwEwKQYKKoZIhvcNAQwBBjAbBB" +
+ "S3KnmddxJSpicU3Pxyg8+NUl6deAIDAMNQgIIKMA0HSR92DBEs74SvbSTUrLeitduz" +
+ "wzkxQ2D8jO+eP7dC7L9nVVvfHDcalUfwah7fvriDgPKg/ws7vaPO6c4Q7RdzB3epvK" +
+ "7LqJlqseW0NxRGJXF9hvDOWk6me+3NyAy791C0R8oF/llujojwoR2Tw6DzTdov9c0p" +
+ "pwCACNtgeAtz3SEFlc/F4MwZKai0jdpakINJkD5H7Za8nyKu6pIITs1roy3Oq2HA4M" +
+ "XAnlnWh+8R9mloDBTJJMJYUOsn1VaFrYNFq3kr4oOMNINJvUCZL2LZgl5rmzgWSVs0" +
+ "VSZa7JUWx49rsrBeCi/SFwW5ryleK5uEtjXjtqjQxCjvLvRYV5HmPfv/ZGCP/vitHX" +
+ "dQ9gzxO/7RVQoxgE0dSx90jiGOEsmG8N9sDnNyS+GCc7pxJeW6NKc1h5YameCsqUGz" +
+ "V9FTfz2JdDpaPsGmHtvMTs8n3ncK9FOWeWhoNKhPnoMGHmfJGZgz282aTosggSZgh7" +
+ "FSvf3KfAmhcCj9+frE90jPvB4W8tPF0YnOrNgvByw2+bj7NCkZ0WBT2WrOSOoS/o2H" +
+ "zmErCJmyt6Su5sPEeTz+dnU0std6qCjsHtjo8Is8VnVVec2nbpeT+nd3RTCV71dViW" +
+ "42L3rRYxl80UpsUs3Fh0J+01EZkWmExCSZpYTKgPhYcYSwUrIVx9ukcCdUSpvS07bq" +
+ "hLfqWOVLfLs00VBr/mFWOqDBfy+qJMXEFYyYDBa/TlrIjzEbF4qKwIJiIxRcqYy0Ta" +
+ "CnMVvn8HlMeIMPJQaqdfDspxIdSdJWWZVbk9FnEDcMuSg8saON26HwieH+AsdnsZDR" +
+ "cZ6kT+bMPibCfnKLTmJYM0dq7abhdYj7GYcfRjwCeeK/PSxklqpsJ/1T/FeVweuQXz" +
+ "bhHatL5z8UmTV3WUE1Ww23K3sR701xh/Tx3HoZPjluSHZFuQCvhkOU6Fj5o7dYjJZc" +
+ "3l3n8wD3SY04ObfCedHe56NytvbXGp79en8Q6kluThWvS5tuNgR5UhMf5oeVi8H1++" +
+ "MeuCOz9MJMwBGe0JUkxijdI1YVHvspqXcQhjAL9BBPT/Q+iaQITzqPSVj/fSUbY147" +
+ "XrAGKS8/9iOV5gTVw2TiW1MKp3ubLjqc1YmIB3TRz+SIlAXg3tD4hl/8DXs0zDFLN0" +
+ "OJLslwQJNaiV0S0mndsVQ/qXiS0gfZldQcn1NmUCJNiy04aUNWR/wKgyLAk5DNPCjx" +
+ "RlStSK7RjrgIcyUO+4cf/nfV2ymaaeDtBSwLLhAr2syXlio1fQILIrSlmT2X7i4/7X" +
+ "1vzN0h78g3+NcWpCs+WnOZ1bu/nzVY7zL8rmHJCeOD37UMgxgW5s3sBvONCpUzyOoe" +
+ "raTalqk843CE223ovLgh+KRm/JXUlDMtDSpk+02Ve7ZoyqgI8vr6UBwWk6CjUJx21M" +
+ "ldkh6QZcK+weQg0Ml9t3czrKXlfQl62VIG6aqSRehSEa52k5IWrcVY6yauRfERfi6a" +
+ "zGSmn5kXlQZSJ1mDuss22Fp12n5Kn0MAwo7XHmnzasaD3rB57A+s/3zkgC0j2t/qYC" +
+ "VpcTq/7Hh7CirbUzVBaXn9CI5MYcbtL40KEE7/DKsjR0VTUtLRi9PnEX1D4zxWl45Y" +
+ "WJ0QO4icHmUS+bvz3i/N91kI+XKDjZmktsqpF+JRaooQe2wZsasnsCSm6tEx8rN/Ya" +
+ "iE3nEUTxeUdHudzT4mldgYL9jlOoubC+DvXilRPRboNRuF9djrfq1p+j4egC4FcjeR" +
+ "kISHIuVXVwcg6Iz9q5j3IAGBfRhXuZ70qyLMtuts4RE+Xy4SmOPnw2rObNhMcTBs9T" +
+ "wYIhrzv426xid908L4v3bUunlsCoDP6LzzMdE4g1OhKzralRqoYZcsLN6Jt5f/W8UY" +
+ "RFauTV8YFV3dBUpp9xhKJlYH+OtJY1gLrT2aaX8b96ruv1JTq1fKCReiB2/0MCPvHd" +
+ "Yz8+/P7YQTysaoDlTC7prQFvDEcz11D0+SmVi2yxNQZETMaMcX5QdqfO8omTPMtuE5" +
+ "jKgtBtmjq6GeNNJBSKySWtjp0J7jKMqmk2n9+9/RCv3e4IVEcZDOo71g5omtB5592w" +
+ "XEQqydg1yH5HFD/B7bgcuFAbr36UMdp6o4M8vek9HsI9K/+Q+2clecOabzNDsS4S8y" +
+ "vr0Kna4rluHwGT0QUp0SbRQRIKzSm7xye5CTxUrZ8cizQ5hQFBUFMr8OWRm0N1GalY" +
+ "TfPaGwX0sWdvhX4rrrGXpToRbUUqeSk1suiRMT8s1iluaoCpiN1Kq4cehFdlSpWv9c" +
+ "74Dktfk+kS8X+vCdoU3voPHiGQbxql0mcdSIboOKdCdzs5krl7GbnJZoYLIYpK/y87" +
+ "YUbOb1CiivlTNe4+KiamuEg44Y0zZ/Z+yWLb7QkpjoIiDObU/0oJKqHUeYL4ZjReus" +
+ "U014itt5jBMmVCBlhUWtHTmznJotjl45H6bVAX7cimbdoWDcmzWlgHM5lFP6IH/q+Q" +
+ "Gsgw+kRfbzX0dnYF0a6d5j02ZgSjJJZpQ5Df+qB9ZKteywXxApcv3FRVuz7A5v7yXR" +
+ "xUE8TQnLwOZgvwDu/pL90drEf0KXef8G/CEHQPB4HVCDzaUnhfSIUflsjtaFfuFq1U" +
+ "DHmmt5WrrTkWo5RRMUzWYcYn2QzBvzCRDTWdVTlXAJcYJ+KHeJlyxhlrEDu3ej4WUe" +
+ "BmkbiTQStUEUpk3IcTbzVLLtfS/pe3m0EmaU6nRkmfLxMfYtnDUgdghMy0Cltc3TKn" +
+ "9qFrBtY41qf8D5LGSrrmLVC1tnQv+hJC7hwiIQZ/2a5b5Bv67tcdzlEGRNT7uv0ID0" +
+ "Ig5MyPjvJtppNQfxhPbNbJvxWtmI1NvH4359d0vR/4yzxYq+BpCLpOXw3BreGE55J7" +
+ "xIvxeRb+Pws7A0xdbKHAwSUsEyPglxAkZCzftZin+MoEw8UnhXYWOPKf+k49TVAq7S" +
+ "Yi1mJxxzwkSkSw9AdhbalYi1Y17VVfHHcb9Ioh1Jdtq8iNqtO2GG+Gd4yGKaRjnQ03" +
+ "6YRWyffrMx6Lv/aEecMR1DASDuX0vVjfafKHAp+13VKVGsB6zPbzR4njAXhJxTC9qj" +
+ "RbG2ISl4xrgAy/gBCKqN+UaVGVYe5DdA22XOOfNkgRrfoqcdgajzp4v6hqr3kPh997" +
+ "89Ayxcov6OopEUBuy6wuPO2ezXRMw8snABq6YDlf36l2jugHbqUUOiiQ4jIPgZAp/S" +
+ "r+4i6wyH+wOIjn1pBn9GgqypWCjyj/uTIMiXiMe5TDzp7U9pJ7e/hWUGzm6wWuDQWB" +
+ "zLwAJNRtaaGV0UraI4ubOJVsvGym0PJ8elxCUgKo6cePkhwrVPcNKA19HgVj/3g0pa" +
+ "ZwYt5Yw2Gdydm0zadva7K/oVgVKRDmkQbwlavySW0xqU8Pul/V/HUSd32/4cpOmmol" +
+ "OjMo1vyn/iSMylG0s2SzTjZ4LlcwhaxjoIVpXo6MwPMh/vdlgQyZ/bjO9PMr9TYW6J" +
+ "aF2PnIKsRkzYfcn6xcQwPjAhMAkGBSsOAwIaBQAEFLddLgmJBuufBBi+JoHCaLDeTK" +
+ "RvBBTQP0GN26PaNdjOaE/AzK7bbhZGNAIDAYag";
+}
--- a/test/jdk/sun/util/calendar/zi/BackEnd.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/BackEnd.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Checksum.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Checksum.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/DayOfWeek.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/DayOfWeek.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Gen.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Gen.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/GenDoc.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/GenDoc.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Main.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Main.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Mappings.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Mappings.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Month.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Month.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Rule.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Rule.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/RuleDay.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/RuleDay.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/RuleRec.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/RuleRec.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Simple.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Simple.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Time.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Time.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Timezone.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Timezone.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/TzIDOldMapping.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/TzIDOldMapping.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Zone.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Zone.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/ZoneInfoFile.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/ZoneInfoFile.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/ZoneInfoOld.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/ZoneInfoOld.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/ZoneRec.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/ZoneRec.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/Zoneinfo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/Zoneinfo.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/VERSION Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/VERSION Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,4 +19,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2018e
+tzdata2018g
--- a/test/jdk/sun/util/calendar/zi/tzdata/africa Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/africa Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Africa and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -29,7 +29,7 @@
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
-# From Paul Eggert (2017-04-09):
+# From Paul Eggert (2018-05-27):
#
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -74,13 +74,15 @@
# I vaguely recall 'WAT' also being used for -01 in the past but
# cannot now come up with solid citations.
#
-# I invented the following abbreviations; corrections are welcome!
-# +02 WAST West Africa Summer Time (no longer used)
-# +03 CAST Central Africa Summer Time (no longer used)
-# +03 SAST South Africa Summer Time (no longer used)
+# I invented the following abbreviations in the 1990s:
+# +02 WAST West Africa Summer Time
+# +03 CAST Central Africa Summer Time
+# +03 SAST South Africa Summer Time
# +03 EAT East Africa Time
-# 'EAT' also seems to have caught on; the others are rare but are paired
-# with better-attested non-DST abbreviations.
+# 'EAT' seems to have caught on and is in current timestamps, and though
+# the other abbreviations are rarer and are only in past timestamps,
+# they are paired with better-attested non-DST abbreviations.
+# Corrections are welcome.
# Algeria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -385,6 +387,13 @@
# Eritrea
# Ethiopia
# See Africa/Nairobi.
+#
+# Unfortunately tzdb records only Western clock time in use in Ethiopia,
+# as the tzdb format is not up to properly recording a common Ethiopian
+# timekeeping practice that is based on solar time. See:
+# Mortada D. If you have a meeting in Ethiopia, you'd better double
+# check the time. PRI's The World. 2015-01-30 15:15 -05.
+# https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time
# Gabon
# See Africa/Lagos.
@@ -856,94 +865,61 @@
# <https://lnt.ma/le-maroc-reculera-dune-heure-le-dimanche-14-juin/> agrees
# with the patch.
-# From Paul Eggert (2015-06-08):
-# For now, guess that later spring and fall transitions will use 2015's rules,
-# and guess that Morocco will switch to standard time at 03:00 the last
-# Sunday before Ramadan, and back to DST at 02:00 the first Sunday after
-# Ramadan. To implement this, transition dates for 2016 through 2037 were
-# determined by running the following program under GNU Emacs 24.3, with the
-# results integrated by hand into the table below.
-# (let ((islamic-year 1437))
-# (require 'cal-islam)
-# (while (< islamic-year 1460)
-# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year)))
-# (b (calendar-islamic-to-absolute (list 10 1 islamic-year)))
-# (sunday 0))
-# (while (/= sunday (mod (setq a (1- a)) 7)))
-# (while (/= sunday (mod b 7))
-# (setq b (1+ b)))
-# (setq a (calendar-gregorian-from-absolute a))
-# (setq b (calendar-gregorian-from-absolute b))
-# (insert
-# (format
-# (concat "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 3:00\t0\t-\n"
-# "Rule\tMorocco\t%d\tonly\t-\t%s\t%2d\t 2:00\t1:00\tS\n")
-# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a))
-# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b)))))
-# (setq islamic-year (+ 1 islamic-year))))
+# From Mohamed Essedik Najd (2018-10-26):
+# Today, a Moroccan government council approved the perpetual addition
+# of 60 minutes to the regular Moroccan timezone.
+# From Brian Inglis (2018-10-26):
+# http://www.maroc.ma/fr/actualites/le-conseil-de-gouvernement-adopte-un-projet-de-decret-relatif-lheure-legale-stipulant-le
# RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-
-Rule Morocco 1939 only - Sep 12 0:00 1:00 S
+Rule Morocco 1939 only - Sep 12 0:00 1:00 -
Rule Morocco 1939 only - Nov 19 0:00 0 -
-Rule Morocco 1940 only - Feb 25 0:00 1:00 S
+Rule Morocco 1940 only - Feb 25 0:00 1:00 -
Rule Morocco 1945 only - Nov 18 0:00 0 -
-Rule Morocco 1950 only - Jun 11 0:00 1:00 S
+Rule Morocco 1950 only - Jun 11 0:00 1:00 -
Rule Morocco 1950 only - Oct 29 0:00 0 -
-Rule Morocco 1967 only - Jun 3 12:00 1:00 S
+Rule Morocco 1967 only - Jun 3 12:00 1:00 -
Rule Morocco 1967 only - Oct 1 0:00 0 -
-Rule Morocco 1974 only - Jun 24 0:00 1:00 S
+Rule Morocco 1974 only - Jun 24 0:00 1:00 -
Rule Morocco 1974 only - Sep 1 0:00 0 -
-Rule Morocco 1976 1977 - May 1 0:00 1:00 S
+Rule Morocco 1976 1977 - May 1 0:00 1:00 -
Rule Morocco 1976 only - Aug 1 0:00 0 -
Rule Morocco 1977 only - Sep 28 0:00 0 -
-Rule Morocco 1978 only - Jun 1 0:00 1:00 S
+Rule Morocco 1978 only - Jun 1 0:00 1:00 -
Rule Morocco 1978 only - Aug 4 0:00 0 -
-Rule Morocco 2008 only - Jun 1 0:00 1:00 S
+Rule Morocco 2008 only - Jun 1 0:00 1:00 -
Rule Morocco 2008 only - Sep 1 0:00 0 -
-Rule Morocco 2009 only - Jun 1 0:00 1:00 S
+Rule Morocco 2009 only - Jun 1 0:00 1:00 -
Rule Morocco 2009 only - Aug 21 0:00 0 -
-Rule Morocco 2010 only - May 2 0:00 1:00 S
+Rule Morocco 2010 only - May 2 0:00 1:00 -
Rule Morocco 2010 only - Aug 8 0:00 0 -
-Rule Morocco 2011 only - Apr 3 0:00 1:00 S
+Rule Morocco 2011 only - Apr 3 0:00 1:00 -
Rule Morocco 2011 only - Jul 31 0:00 0 -
-Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 S
+Rule Morocco 2012 2013 - Apr lastSun 2:00 1:00 -
Rule Morocco 2012 only - Jul 20 3:00 0 -
-Rule Morocco 2012 only - Aug 20 2:00 1:00 S
+Rule Morocco 2012 only - Aug 20 2:00 1:00 -
Rule Morocco 2012 only - Sep 30 3:00 0 -
Rule Morocco 2013 only - Jul 7 3:00 0 -
-Rule Morocco 2013 only - Aug 10 2:00 1:00 S
-Rule Morocco 2013 max - Oct lastSun 3:00 0 -
-Rule Morocco 2014 2021 - Mar lastSun 2:00 1:00 S
+Rule Morocco 2013 only - Aug 10 2:00 1:00 -
+Rule Morocco 2013 2018 - Oct lastSun 3:00 0 -
+Rule Morocco 2014 2018 - Mar lastSun 2:00 1:00 -
Rule Morocco 2014 only - Jun 28 3:00 0 -
-Rule Morocco 2014 only - Aug 2 2:00 1:00 S
+Rule Morocco 2014 only - Aug 2 2:00 1:00 -
Rule Morocco 2015 only - Jun 14 3:00 0 -
-Rule Morocco 2015 only - Jul 19 2:00 1:00 S
+Rule Morocco 2015 only - Jul 19 2:00 1:00 -
Rule Morocco 2016 only - Jun 5 3:00 0 -
-Rule Morocco 2016 only - Jul 10 2:00 1:00 S
+Rule Morocco 2016 only - Jul 10 2:00 1:00 -
Rule Morocco 2017 only - May 21 3:00 0 -
-Rule Morocco 2017 only - Jul 2 2:00 1:00 S
+Rule Morocco 2017 only - Jul 2 2:00 1:00 -
Rule Morocco 2018 only - May 13 3:00 0 -
-Rule Morocco 2018 only - Jun 17 2:00 1:00 S
-Rule Morocco 2019 only - May 5 3:00 0 -
-Rule Morocco 2019 only - Jun 9 2:00 1:00 S
-Rule Morocco 2020 only - Apr 19 3:00 0 -
-Rule Morocco 2020 only - May 24 2:00 1:00 S
-Rule Morocco 2021 only - Apr 11 3:00 0 -
-Rule Morocco 2021 only - May 16 2:00 1:00 S
-Rule Morocco 2022 only - May 8 2:00 1:00 S
-Rule Morocco 2023 only - Apr 23 2:00 1:00 S
-Rule Morocco 2024 only - Apr 14 2:00 1:00 S
-Rule Morocco 2025 only - Apr 6 2:00 1:00 S
-Rule Morocco 2026 max - Mar lastSun 2:00 1:00 S
-Rule Morocco 2036 only - Oct 19 3:00 0 -
-Rule Morocco 2037 only - Oct 4 3:00 0 -
+Rule Morocco 2018 only - Jun 17 2:00 1:00 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26
- 0:00 Morocco WE%sT 1984 Mar 16
- 1:00 - CET 1986
- 0:00 Morocco WE%sT
+ 0:00 Morocco +00/+01 1984 Mar 16
+ 1:00 - +01 1986
+ 0:00 Morocco +00/+01 2018 Oct 27
+ 1:00 - +01
# Western Sahara
#
@@ -958,7 +934,8 @@
Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
-1:00 - -01 1976 Apr 14
- 0:00 Morocco WE%sT
+ 0:00 Morocco +00/+01 2018 Oct 27
+ 1:00 - +01
# Mozambique
#
--- a/test/jdk/sun/util/calendar/zi/tzdata/antarctica Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/antarctica Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Antarctica and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/test/jdk/sun/util/calendar/zi/tzdata/asia Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/asia Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Asia and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -29,7 +29,7 @@
# tz@iana.org for general use in the future). For more, please see
# the file CONTRIBUTING in the tz distribution.
-# From Paul Eggert (2017-01-13):
+# From Paul Eggert (2018-06-19):
#
# Unless otherwise specified, the source for data through 1990 is:
# Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition),
@@ -58,7 +58,8 @@
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
#
-# The following alphabetic abbreviations appear in these tables:
+# The following alphabetic abbreviations appear in these tables
+# (corrections are welcome):
# std dst
# LMT Local Mean Time
# 2:00 EET EEST Eastern European Time
@@ -67,11 +68,13 @@
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 CST China
+# 8:00 PST PDT* Philippine Standard Time
# 8:30 KST KDT Korea when at +0830
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
# 9:00 JST JDT Japan
# 9:00 KST KDT Korea when at +09
# 9:30 ACST Australian Central Standard Time
+# *I invented the abbreviation PDT; see "Philippines" below.
# Otherwise, these tables typically use numeric abbreviations like +03
# and +0330 for integer hour and minute UT offsets. Although earlier
# editions invented alphabetic time zone abbreviations for every
@@ -304,6 +307,29 @@
# China
+# From Paul Eggert (2018-10-02):
+# The following comes from Table 1 of:
+# Li Yu. Research on the daylight saving movement in 1940s Shanghai.
+# Nanjing Journal of Social Sciences. 2014;(2):144-50.
+# http://oversea.cnki.net/kns55/detail.aspx?dbname=CJFD2014&filename=NJSH201402020
+# The table lists dates only; I am guessing 00:00 and 24:00 transition times.
+# Also, the table lists the planned end of DST in 1949, but the corresponding
+# zone line cuts this off on May 28, when the Communists took power.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Shang 1940 only - Jun 1 0:00 1:00 D
+Rule Shang 1940 only - Oct 12 24:00 0 S
+Rule Shang 1941 only - Mar 15 0:00 1:00 D
+Rule Shang 1941 only - Nov 1 24:00 0 S
+Rule Shang 1942 only - Jan 31 0:00 1:00 D
+Rule Shang 1945 only - Sep 1 24:00 0 S
+Rule Shang 1946 only - May 15 0:00 1:00 D
+Rule Shang 1946 only - Sep 30 24:00 0 S
+Rule Shang 1947 only - Apr 15 0:00 1:00 D
+Rule Shang 1947 only - Oct 31 24:00 0 S
+Rule Shang 1948 1949 - May 1 0:00 1:00 D
+Rule Shang 1948 1949 - Sep 30 24:00 0 S #plan
+
# From Guy Harris:
# People's Republic of China. Yes, they really have only one time zone.
@@ -330,18 +356,33 @@
# time - sort of", Los Angeles Times, 1986-05-05 ... [says] that China began
# observing daylight saving time in 1986.
-# From Paul Eggert (2014-06-30):
-# Shanks & Pottenger have China switching to a single time zone in 1980, but
-# this doesn't seem to be correct. They also write that China observed summer
-# DST from 1986 through 1991, which seems to match the above commentary, so
-# go with them for DST rules as follows:
+# From P Chan (2018-05-07):
+# The start and end time of DST in China [from 1986 on] should be 2:00
+# (i.e. 2:00 to 3:00 at the start and 2:00 to 1:00 at the end)....
+# Government notices about summer time:
+#
+# 1986-04-12 http://www.zj.gov.cn/attach/zfgb/198608.pdf p.21-22
+# (To establish summer time from 1986. On 4 May, set the clocks ahead one hour
+# at 2 am. On 14 September, set the clocks backward one hour at 2 am.)
+#
+# 1987-02-15 http://www.gov.cn/gongbao/shuju/1987/gwyb198703.pdf p.114
+# (Summer time in 1987 to start from 12 April until 13 September)
+#
+# 1987-09-09 http://www.gov.cn/gongbao/shuju/1987/gwyb198721.pdf p.709
+# (From 1988, summer time to start from 2 am of the first Sunday of mid-April
+# until 2 am of the first Sunday of mid-September)
+#
+# 1992-03-03 http://www.gov.cn/gongbao/shuju/1992/gwyb199205.pdf p.152
+# (To suspend summer time from 1992)
+#
+# The first page of People's Daily on 12 April 1988 stating that summer time
+# to begin on 17 April.
+# http://data.people.com.cn/pic/101p/1988/04/1988041201.jpg
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Shang 1940 only - Jun 3 0:00 1:00 D
-Rule Shang 1940 1941 - Oct 1 0:00 0 S
-Rule Shang 1941 only - Mar 16 0:00 1:00 D
-Rule PRC 1986 only - May 4 0:00 1:00 D
-Rule PRC 1986 1991 - Sep Sun>=11 0:00 0 S
-Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
+Rule PRC 1986 only - May 4 2:00 1:00 D
+Rule PRC 1986 1991 - Sep Sun>=11 2:00 0 S
+Rule PRC 1987 1991 - Apr Sun>=11 2:00 1:00 D
# From Anthony Fok (2001-12-20):
# BTW, I did some research on-line and found some info regarding these five
@@ -363,10 +404,11 @@
# Alois Treindl kindly sent me translations of the following two sources:
#
# (1)
-# Guo Qingsheng (National Time-Service Center, CAS, Xi'an 710600, China)
+# Guo Qing-sheng (National Time-Service Center, CAS, Xi'an 710600, China)
# Beijing Time at the Beginning of the PRC
# China Historical Materials of Science and Technology
-# (Zhongguo ke ji shi liao, 中国科技史料), Vol. 24, No. 1 (2003)
+# (Zhongguo ke ji shi liao, 中国科技史料). 2003;24(1):5-9.
+# http://oversea.cnki.net/kcms/detail/detail.aspx?filename=ZGKS200301000&dbname=CJFD2003
# It gives evidence that at the beginning of the PRC, Beijing time was
# officially apparent solar time! However, Guo also says that the
# evidence is dubious, as the relevant institute of astronomy had not
@@ -543,7 +585,7 @@
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Beijing time, used throughout China; represented by Shanghai.
Zone Asia/Shanghai 8:05:43 - LMT 1901
- 8:00 Shang C%sT 1949
+ 8:00 Shang C%sT 1949 May 28
8:00 PRC C%sT
# Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi
# / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.)
@@ -772,24 +814,140 @@
8:00 Taiwan C%sT
# Macau (Macao, Aomen)
+#
+# From P Chan (2018-05-10):
+# * LegisMac
+# http://legismac.safp.gov.mo/legismac/descqry/Descqry.jsf?lang=pt
+# A database for searching titles of legal documents of Macau in
+# Chinese and Portuguese. The term "HORÁRIO DE VERÃO" can be used for
+# searching decrees about summer time.
+# * Archives of Macao
+# http://www.archives.gov.mo/en/bo/
+# It contains images of old official gazettes.
+# * The Macao Meteorological and Geophysical Bureau have a page listing the
+# summer time history. But it is not complete and has some mistakes.
+# http://www.smg.gov.mo/smg/geophysics/e_t_Summer%20Time.htm
+# Macau adopted GMT+8 on 30 Oct 1904 to follow Hong Kong. Clocks were
+# advanced by 25 minutes and 50 seconds. Which means the LMT used was
+# +7:34:10. As stated in the "Portaria No. 204" dated 21 October 1904
+# and published in the Official Gazette on 29 October 1904.
+# http://igallery.icm.gov.mo/Images/Archives/BO/MO_AH_PUB_BO_1904_10/MO_AH_PUB_BO_1904_10_00025_Grey.JPG
+#
+# Therefore the 1911 decree of Portugal did not change time in Macau.
+#
+# From LegisMac, here is a list of decrees that changed the time ...
+# [Decree Gazette-no. date; titles omitted in this quotation]
+# DIL 732 BOCM 51 1941.12.20
+# DIL 764 BOCM 9S 1942.04.30
+# DIL 781 BOCM 21 1942.10.10
+# PT 3434 BOCM 8S 1943.04.17
+# PT 3504 BOCM 20 1943.09.25
+# PT 3843 BOCM 39 1945.09.29
+# PT 3961 BOCM 17 1946.04.27
+# PT 4026 BOCM 39 1946.09.28
+# PT 4153 BOCM 16 1947.04.10
+# PT 4271 BOCM 48 1947.11.29
+# PT 4374 BOCM 18 1948.05.01
+# PT 4465 BOCM 44 1948.10.30
+# PT 4590 BOCM 14 1949.04.02
+# PT 4666 BOCM 44 1949.10.29
+# PT 4771 BOCM 12 1950.03.25
+# PT 4838 BOCM 43 1950.10.28
+# PT 4946 BOCM 12 1951.03.24
+# PT 5025 BO 43 1951.10.27
+# PT 5149 BO 14 1952.04.05
+# PT 5251 BO 43 1952.10.25
+# PT 5366 BO 13 1953.03.28
+# PT 5444 BO 44 1953.10.31
+# PT 5540 BO 12 1954.03.20
+# PT 5589 BO 44 1954.10.30
+# PT 5676 BO 12 1955.03.19
+# PT 5739 BO 45 1955.11.05
+# PT 5823 BO 11 1956.03.17
+# PT 5891 BO 44 1956.11.03
+# PT 5981 BO 12 1957.03.23
+# PT 6064 BO 43 1957.10.26
+# PT 6172 BO 12 1958.03.22
+# PT 6243 BO 43 1958.10.25
+# PT 6341 BO 12 1959.03.21
+# PT 6411 BO 43 1959.10.24
+# PT 6514 BO 11 1960.03.12
+# PT 6584 BO 44 1960.10.29
+# PT 6721 BO 10 1961.03.11
+# PT 6815 BO 43 1961.10.28
+# PT 6947 BO 10 1962.03.10
+# PT 7080 BO 43 1962.10.27
+# PT 7218 BO 12 1963.03.23
+# PT 7340 BO 43 1963.10.26
+# PT 7491 BO 11 1964.03.14
+# PT 7664 BO 43 1964.10.24
+# PT 7846 BO 15 1965.04.10
+# PT 7979 BO 42 1965.10.16
+# PT 8146 BO 15 1966.04.09
+# PT 8252 BO 41 1966.10.08
+# PT 8429 BO 15 1967.04.15
+# PT 8540 BO 41 1967.10.14
+# PT 8735 BO 15 1968.04.13
+# PT 8860 BO 41 1968.10.12
+# PT 9035 BO 16 1969.04.19
+# PT 9156 BO 42 1969.10.18
+# PT 9328 BO 15 1970.04.11
+# PT 9418 BO 41 1970.10.10
+# PT 9587 BO 14 1971.04.03
+# PT 9702 BO 41 1971.10.09
+# PT 38-A/72 BO 14 1972.04.01
+# PT 126-A/72 BO 41 1972.10.07
+# PT 61/73 BO 14 1973.04.07
+# PT 182/73 BO 40 1973.10.06
+# PT 282/73 BO 51 1973.12.22
+# PT 177/74 BO 41 1974.10.12
+# PT 51/75 BO 15 1975.04.12
+# PT 173/75 BO 41 1975.10.11
+# PT 67/76/M BO 14 1976.04.03
+# PT 169/76/M BO 41 1976.10.09
+# PT 78/79/M BO 19 1979.05.12
+# PT 166/79/M BO 42 1979.10.20
+# Note that DIL 732 does not belong to "HORÁRIO DE VERÃO" according to
+# LegisMac.... Note that between 1942 and 1945, the time switched
+# between GMT+9 and GMT+10. Also in 1965 and 1965 the DST ended at 2:30am.
+
+# From Paul Eggert (2018-05-10):
+# The 1904 decree says that Macau changed from the meridian of
+# Fortaleza do Monte, presumably the basis for the 7:34:10 for LMT.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D
-Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S
-Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D
-Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D
-Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D
-Rule Macau 1965 only - Oct 31 0:00 0 S
-Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D
-Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S
-Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D
-Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S
-Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S
-Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D
-Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D
-Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S
-# See Europe/Lisbon for info about the 1912 transition.
+Rule Macau 1942 1943 - Apr 30 23:00 1:00 -
+Rule Macau 1942 only - Nov 17 23:00 0 -
+Rule Macau 1943 only - Sep 30 23:00 0 S
+Rule Macau 1946 only - Apr 30 23:00s 1:00 D
+Rule Macau 1946 only - Sep 30 23:00s 0 S
+Rule Macau 1947 only - Apr 19 23:00s 1:00 D
+Rule Macau 1947 only - Nov 30 23:00s 0 S
+Rule Macau 1948 only - May 2 23:00s 1:00 D
+Rule Macau 1948 only - Oct 31 23:00s 0 S
+Rule Macau 1949 1950 - Apr Sat>=1 23:00s 1:00 D
+Rule Macau 1949 1950 - Oct lastSat 23:00s 0 S
+Rule Macau 1951 only - Mar 31 23:00s 1:00 D
+Rule Macau 1951 only - Oct 28 23:00s 0 S
+Rule Macau 1952 1953 - Apr Sat>=1 23:00s 1:00 D
+Rule Macau 1952 only - Nov 1 23:00s 0 S
+Rule Macau 1953 1954 - Oct lastSat 23:00s 0 S
+Rule Macau 1954 1956 - Mar Sat>=17 23:00s 1:00 D
+Rule Macau 1955 only - Nov 5 23:00s 0 S
+Rule Macau 1956 1964 - Nov Sun>=1 03:30 0 S
+Rule Macau 1957 1964 - Mar Sun>=18 03:30 1:00 D
+Rule Macau 1965 1973 - Apr Sun>=16 03:30 1:00 D
+Rule Macau 1965 1966 - Oct Sun>=16 02:30 0 S
+Rule Macau 1967 1976 - Oct Sun>=16 03:30 0 S
+Rule Macau 1973 only - Dec 30 03:30 1:00 D
+Rule Macau 1975 1976 - Apr Sun>=16 03:30 1:00 D
+Rule Macau 1979 only - May 13 03:30 1:00 D
+Rule Macau 1979 only - Oct Sun>=16 03:30 0 S
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Macau 7:34:20 - LMT 1911 Dec 31 16:00u
+Zone Asia/Macau 7:34:10 - LMT 1904 Oct 30
+ 8:00 - CST 1941 Dec 21 23:00
+ 9:00 Macau +09/+10 1945 Sep 30 24:00
8:00 Macau C%sT
@@ -1494,9 +1652,29 @@
# http://www.shugiin.go.jp/internet/itdb_housei.nsf/html/houritsu/00719500331039.htm
# ... In summary, it is written as follows. From 24:00 on the first Saturday
# in May, until 0:00 on the day after the second Saturday in September.
+
+# From Phake Nick (2018-09-27):
+# [T]he webpage authored by National Astronomical Observatory of Japan
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EF.html
+# ... mentioned that using Showa 23 (year 1948) as example, 13pm of September
+# 11 in summer time will equal to 0am of September 12 in standard time.
+# It cited a document issued by the Liaison Office which briefly existed
+# during the postwar period of Japan, where the detail on implementation
+# of the summer time is described in the document.
+# https://eco.mtk.nao.ac.jp/koyomi/wiki/BBFEB9EF2FB2C6BBFEB9EFB2C6BBFEB9EFA4CEBCC2BBDCA4CBA4C4A4A4A4C6.pdf
+# The text in the document do instruct a fall back to occur at
+# September 11, 13pm in summer time, while ordinary citizens can
+# change the clock before they sleep.
+#
+# From Paul Eggert (2018-09-27):
+# This instruction is equivalent to "Sat>=8 25:00", so use that. zic treats
+# it like "Sun>=9 01:00", which is not quite the same but is the best we can
+# do in any POSIX or C platform. The "25:00" assumes zic from 2007 or later,
+# which should be safe now.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Japan 1948 only - May Sat>=1 24:00 1:00 D
-Rule Japan 1948 1951 - Sep Sun>=9 0:00 0 S
+Rule Japan 1948 1951 - Sep Sun>=9 1:00 0 S
Rule Japan 1949 only - Apr Sat>=1 24:00 1:00 D
Rule Japan 1950 1951 - May Sat>=1 24:00 1:00 D
@@ -1878,7 +2056,7 @@
5:00 - +05
# Mangghystaū (KZ-MAN)
# Aqtau was not founded until 1963, but it represents an inhabited region,
-# so include time stamps before 1963.
+# so include timestamps before 1963.
Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2
4:00 - +04 1930 Jun 21
5:00 - +05 1981 Oct 1
@@ -2018,6 +2196,10 @@
# Assembly, as published in Rodong Sinmun.
# From Tim Parenti (2018-04-29):
# It appears to be the front page story at the top in the right-most column.
+#
+# From Paul Eggert (2018-05-04):
+# The BBC reported that the transition was from 23:30 to 24:00 today.
+# https://www.bbc.com/news/world-asia-44010705
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
@@ -2030,7 +2212,7 @@
8:30 - KST 1912 Jan 1
9:00 - JST 1945 Aug 24
9:00 - KST 2015 Aug 15 00:00
- 8:30 - KST 2018 May 5
+ 8:30 - KST 2018 May 4 23:30
9:00 - KST
###############################################################################
@@ -2780,19 +2962,35 @@
# Philippine Star 2014-08-05
# http://www.philstar.com/headlines/2014/08/05/1354152/pnoy-urged-declare-use-daylight-saving-time
+# From Paul Goyette (2018-06-15):
+# In the Philippines, there is a national law, Republic Act No. 10535
+# which declares the official time here as "Philippine Standard Time".
+# The act [1] even specifies use of PST as the abbreviation, although
+# the FAQ provided by PAGASA [2] uses the "acronym PhST to distinguish
+# it from the Pacific Standard Time (PST)."
+# [1] http://www.officialgazette.gov.ph/2013/05/15/republic-act-no-10535/
+# [2] https://www1.pagasa.dost.gov.ph/index.php/astronomy/philippine-standard-time#republic-act-10535
+#
+# From Paul Eggert (2018-06-19):
+# I surveyed recent news reports, and my impression is that "PST" is
+# more popular among reliable English-language news sources. This is
+# not just a measure of Google hit counts: it's also the sizes and
+# influence of the sources. There is no current abbreviation for DST,
+# so use "PDT", the usual American style.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Phil 1936 only - Nov 1 0:00 1:00 -
-Rule Phil 1937 only - Feb 1 0:00 0 -
-Rule Phil 1954 only - Apr 12 0:00 1:00 -
-Rule Phil 1954 only - Jul 1 0:00 0 -
-Rule Phil 1978 only - Mar 22 0:00 1:00 -
-Rule Phil 1978 only - Sep 21 0:00 0 -
+Rule Phil 1936 only - Nov 1 0:00 1:00 D
+Rule Phil 1937 only - Feb 1 0:00 0 S
+Rule Phil 1954 only - Apr 12 0:00 1:00 D
+Rule Phil 1954 only - Jul 1 0:00 0 S
+Rule Phil 1978 only - Mar 22 0:00 1:00 D
+Rule Phil 1978 only - Sep 21 0:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31
8:04:00 - LMT 1899 May 11
- 8:00 Phil +08/+09 1942 May
- 9:00 - +09 1944 Nov
- 8:00 Phil +08/+09
+ 8:00 Phil P%sT 1942 May
+ 9:00 - JST 1944 Nov
+ 8:00 Phil P%sT
# Qatar
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -2803,15 +3001,34 @@
# Saudi Arabia
#
-# From Paul Eggert (2014-07-15):
+# From Paul Eggert (2018-08-29):
# Time in Saudi Arabia and other countries in the Arabian peninsula was not
-# standardized until relatively recently; we don't know when, and possibly it
+# standardized until 1968 or so; we don't know exactly when, and possibly it
# has never been made official. Richard P Hunt, in "Islam city yielding to
# modern times", New York Times (1961-04-09), p 20, wrote that only airlines
# observed standard time, and that people in Jeddah mostly observed quasi-solar
# time, doing so by setting their watches at sunrise to 6 o'clock (or to 12
# o'clock for "Arab" time).
#
+# Timekeeping differed depending on who you were and which part of Saudi
+# Arabia you were in. In 1969, Elias Antar wrote that although a common
+# practice had been to set one's watch to 12:00 (i.e., midnight) at sunset -
+# which meant that the time on one side of a mountain could differ greatly from
+# the time on the other side - many foreigners set their watches to 6pm
+# instead, while airlines instead used UTC +03 (except in Dhahran, where they
+# used UTC +04), Aramco used UTC +03 with DST, and the Trans-Arabian Pipe Line
+# Company used Aramco time in eastern Saudi Arabia and airline time in western.
+# (The American Military Aid Advisory Group used plain UTC.) Antar writes,
+# "A man named Higgins, so the story goes, used to run a local power
+# station. One day, the whole thing became too much for Higgins and he
+# assembled his staff and laid down the law. 'I've had enough of this,' he
+# shrieked. 'It is now 12 o'clock Higgins Time, and from now on this station is
+# going to run on Higgins Time.' And so, until last year, it did." See:
+# Antar E. Dinner at When? Saudi Aramco World, 1969 March/April. 2-3.
+# http://archive.aramcoworld.com/issue/196902/dinner.at.when.htm
+# newspapers.com says a similar story about Higgins was published in the Port
+# Angeles (WA) Evening News, 1965-03-10, page 5, but I lack access to the text.
+#
# The TZ database cannot represent quasi-solar time; airline time is the best
# we can do. The 1946 foreign air news digest of the U.S. Civil Aeronautics
# Board (OCLC 42299995) reported that the "... Arabian Government, inaugurated
@@ -2821,7 +3038,8 @@
#
# Shanks & Pottenger also state that until 1968-05-01 Saudi Arabia had two
# time zones; the other zone, at UT +04, was in the far eastern part of
-# the country. Ignore this, as it's before our 1970 cutoff.
+# the country. Presumably this is documenting airline time. Ignore this,
+# as it's before our 1970 cutoff.
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14
--- a/test/jdk/sun/util/calendar/zi/tzdata/australasia Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/australasia Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Australasia and environs, and for much of the Pacific
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -384,8 +384,15 @@
# Dominic Fok writes (2017-08-20) that DST ends 2018-01-14, citing
# Extraordinary Government of Fiji Gazette Supplement No. 21 (2017-08-27),
# [Legal Notice No. 41] of an order of the previous day by J Usamate.
+
+# From Raymond Kumar (2018-07-13):
+# http://www.fijitimes.com/government-approves-2018-daylight-saving/
+# ... The daylight saving period will end at 3am on Sunday January 13, 2019.
+#
+# From Paul Eggert (2018-07-15):
# For now, guess DST from 02:00 the first Sunday in November to 03:00
-# the first Sunday on or after January 14. Although ad hoc, it matches
+# the first Sunday on or after January 13. January transitions reportedly
+# depend on when school terms start. Although the guess is ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
@@ -399,7 +406,7 @@
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 -
-Rule Fiji 2015 max - Jan Sun>=14 3:00 0 -
+Rule Fiji 2015 max - Jan Sun>=13 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
--- a/test/jdk/sun/util/calendar/zi/tzdata/backward Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/backward Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,10 +19,12 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb links for backward compatibility
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# This file provides links between current names for time zones
+# This file provides links between current names for timezones
# and their old names. Many names changed in late 1993.
# Link TARGET LINK-NAME
--- a/test/jdk/sun/util/calendar/zi/tzdata/etcetera Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/etcetera Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,12 +19,14 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for ships at sea and other miscellany
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
# These entries are mostly present for historical reasons, so that
# people in areas not otherwise covered by the tz files could "zic -l"
-# to a time zone that was right for their area. These days, the
+# to a timezone that was right for their area. These days, the
# tz files cover almost all the inhabited world, and the only practical
# need now for the entries that are not on UTC are for ships at sea
# that cannot use POSIX TZ settings.
--- a/test/jdk/sun/util/calendar/zi/tzdata/europe Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/europe Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for Europe and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -540,7 +540,7 @@
#
# To work around this problem, the build procedure can translate the
# following data into two forms, one with negative SAVE values and the
-# other form with a traditional approximation for Irish time stamps
+# other form with a traditional approximation for Irish timestamps
# after 1971-10-31 02:00 UTC; although this approximation has tm_isdst
# flags that are reversed, its UTC offsets are correct and this often
# suffices. This source file currently uses only nonnegative SAVE
@@ -2450,6 +2450,33 @@
# administratively part of Sakhalin oblast', they appear to have
# remained on UTC+11 along with Magadan.
+# From Marat Nigametzianov (2018-07-16):
+# this is link to order from 1956 about timezone in USSR
+# http://astro.uni-altai.ru/~orion/blog/2011/11/novyie-granitsyi-chasovyih-poyasov-v-sssr/
+#
+# From Paul Eggert (2018-07-16):
+# Perhaps someone could translate the above-mentioned link and use it
+# to correct our data for the ex-Soviet Union. It cites the following:
+# «Поясное время и новые границы часовых поясов» / сост. П.Н. Долгов,
+# отв. ред. Г.Д. Бурдун - М: Комитет стандартов, мер и измерительных
+# приборов при Совете Министров СССР, Междуведомственная комиссия
+# единой службы времени, 1956 г.
+# This book looks like it would be a helpful resource for the Soviet
+# Union through 1956. Although a copy was in the Scientific Library
+# of Tomsk State University, I have not been able to track down a copy nearby.
+#
+# From Stepan Golosunov (2018-07-21):
+# http://astro.uni-altai.ru/~orion/blog/2015/05/center-reforma-ischisleniya-vremeni-br-na-territorii-sssr-v-1957-godu-center/
+# says that the 1956 decision to change time belts' borders was not
+# implemented as planned in 1956 and the change happened in 1957.
+# There is also the problem that actual time zones were different from
+# the official time belts (and from many time belts' maps) as there were
+# numerous exceptions to application of time belt rules. For example,
+# https://ru.wikipedia.org/wiki/Московское_время#Перемещение_границы_применения_московского_времени_на_восток
+# says that by 1962 there were many regions in the 3rd time belt that
+# were on Moscow time, referring to a 1962 map. By 1989 number of such
+# exceptions grew considerably.
+
# From Tim Parenti (2014-07-06):
# The comments detailing the coverage of each Russian zone are meant to assist
# with maintenance only and represent our best guesses as to which regions
@@ -2460,9 +2487,6 @@
# future stability. ISO 3166-2:RU codes are also listed for first-level
# divisions where available.
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-
-
# From Tim Parenti (2014-07-03):
# Europe/Kaliningrad covers...
# 39 RU-KGD Kaliningrad Oblast
@@ -2730,6 +2754,15 @@
# 34 RU-VGG Volgograd Oblast
# The 1988 transition is from USSR act No. 5 (1988-01-04).
+# From Alexander Fetisov (2018-09-20):
+# Volgograd region in southern Russia (Europe/Volgograd) change
+# timezone from UTC+3 to UTC+4 from 28oct2018.
+# http://sozd.parliament.gov.ru/bill/452878-7
+#
+# From Stepan Golosunov (2018-10-11):
+# The law has been published today on
+# http://publication.pravo.gov.ru/Document/View/0001201810110037
+
Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
3:00 - +03 1930 Jun 21
4:00 - +04 1961 Nov 11
@@ -2738,7 +2771,8 @@
4:00 - +04 1992 Mar 29 2:00s
3:00 Russia +03/+04 2011 Mar 27 2:00s
4:00 - +04 2014 Oct 26 2:00s
- 3:00 - +03
+ 3:00 - +03 2018 Oct 28 2:00s
+ 4:00 - +04
# From Paul Eggert (2016-11-11):
# Europe/Saratov covers:
@@ -3427,7 +3461,8 @@
#Rule NatSpain 1937 only - May 22 23:00 1:00 S
#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 -
#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S
-# The following rules are copied from Morocco from 1967 through 1978.
+# The following rules are copied from Morocco from 1967 through 1978,
+# except with "S" letters.
Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S
Rule SpainAfrica 1967 only - Oct 1 0:00 0 -
Rule SpainAfrica 1974 only - Jun 24 0:00 1:00 S
@@ -3447,6 +3482,7 @@
0:00 1:00 WEST 1918 Oct 7 23:00
0:00 - WET 1924
0:00 Spain WE%sT 1929
+ 0:00 - WET 1967 # Help zishrink.awk.
0:00 SpainAfrica WE%sT 1984 Mar 16
1:00 - CET 1986
1:00 EU CE%sT
@@ -3632,7 +3668,7 @@
# http://www.resmigazete.gov.tr/eskiler/2001/03/20010324.htm#2 - for 2001
# http://www.resmigazete.gov.tr/eskiler/2002/03/20020316.htm#2 - for 2002-2006
# From Paul Eggert (2016-09-25):
-# Prefer the above sources to Shanks & Pottenger for time stamps after 1985.
+# Prefer the above sources to Shanks & Pottenger for timestamps after 1985.
# From Steffen Thorsen (2007-03-09):
# Starting 2007 though, it seems that they are adopting EU's 1:00 UTC
@@ -3842,10 +3878,29 @@
# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
+# From Paul Eggert (2018-10-03):
+# As is usual in tzdb, Ukrainian zones use the most common English spellings.
+# For example, tzdb uses Europe/Kiev, as "Kiev" is the most common spelling in
+# English for Ukraine's capital, even though it is certainly wrong as a
+# transliteration of the Ukrainian "Київ". This is similar to tzdb's use of
+# Europe/Prague, which is certainly wrong as a transliteration of the Czech
+# "Praha". ("Kiev" came from old Slavic via Russian to English, and "Prague"
+# came from old Slavic via French to English, so the two cases have something
+# in common.) Admittedly English-language spelling of Ukrainian names is
+# controversial, and some day "Kyiv" may become substantially more popular in
+# English; in the meantime, stick with the traditional English "Kiev" as that
+# means less disruption for our users.
+#
+# Anyway, none of the common English-language spellings (Kiev, Kyiv, Kieff,
+# Kijeff, Kijev, Kiyef, Kiyeff) do justice to the common pronunciation in
+# Ukrainian, namely [ˈkɪjiu̯] (IPA). This pronunciation has nothing like an
+# English "v" or "f", and instead trails off with what an English-speaker
+# would call a demure "oo" sound, and it would would be better anglicized as
+# "Kuiyu". Here's a sound file, if you would like to do as the Kuiyuvians do:
+# https://commons.wikimedia.org/wiki/File:Uk-Київ.ogg
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-# Most of Ukraine since 1970 has been like Kiev.
-# "Kyiv" is the transliteration of the Ukrainian name, but
-# "Kiev" is more common in English.
+# This represents most of Ukraine. See above for the spelling of "Kiev".
Zone Europe/Kiev 2:02:04 - LMT 1880
2:02:04 - KMT 1924 May 2 # Kiev Mean Time
2:00 - EET 1930 Jun 21
--- a/test/jdk/sun/util/calendar/zi/tzdata/factory Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/factory Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,11 +19,13 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for noncommittal factory settings
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
-# For distributors who don't want to put time zone specification in
-# their installation procedures. Users that run 'date' will get the
+# For distributors who don't want to specify a timezone in their
+# installation procedures. Users who run 'date' will get the
# time zone abbreviation "-00", indicating that the actual time zone
# is unknown.
--- a/test/jdk/sun/util/calendar/zi/tzdata/gmt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/gmt Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
#
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/iso3166.tab Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/iso3166.tab Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/jdk11_backward Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/jdk11_backward Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
#
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/leapseconds Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/leapseconds Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -26,21 +24,25 @@
# This file is in the public domain.
# This file is generated automatically from the data in the public-domain
-# leap-seconds.list file, which is copied from:
-# ftp://ftp.nist.gov/pub/time/leap-seconds.list
+# leap-seconds.list file, which can be copied from
+# <ftp://ftp.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list>
+# or <ftp://tycho.usno.navy.mil/pub/ntp/leap-seconds.list>.
# For more about leap-seconds.list, please see
# The NTP Timescale and Leap Seconds
-# https://www.eecis.udel.edu/~mills/leap.html
+# <https://www.eecis.udel.edu/~mills/leap.html>.
# The International Earth Rotation and Reference Systems Service
# periodically uses leap seconds to keep UTC to within 0.9 s of UT1
-# (which measures the true angular orientation of the earth in space); see
-# Levine J. Coordinated Universal Time and the leap second.
+# (which measures the true angular orientation of the earth in space)
+# and publishes leap second data in a copyrighted file
+# <https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat>.
+# See: Levine J. Coordinated Universal Time and the leap second.
# URSI Radio Sci Bull. 2016;89(4):30-6. doi:10.23919/URSIRSB.2016.7909995
-# http://ieeexplore.ieee.org/document/7909995/
+# <https://ieeexplore.ieee.org/document/7909995>.
# There were no leap seconds before 1972, because the official mechanism
# accounting for the discrepancy between atomic time and the earth's rotation
-# did not exist until the early 1970s.
+# did not exist.
# The correction (+ or -) is made at the given time, so lines
# will typically look like:
@@ -48,10 +50,7 @@
# or
# Leap YEAR MON DAY 23:59:59 - R/S
-# If the leapsecond is Rolling (R) the given time is local time.
-# If the leapsecond is Stationary (S) the given time is UTC.
-
-# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
+# If the leap second is Rolling (R) the given time is local time (unused here).
Leap 1972 Jun 30 23:59:60 + S
Leap 1972 Dec 31 23:59:60 + S
Leap 1973 Dec 31 23:59:60 + S
@@ -80,5 +79,9 @@
Leap 2015 Jun 30 23:59:60 + S
Leap 2016 Dec 31 23:59:60 + S
-# Updated through IERS Bulletin C55
-# File expires on: 28 December 2018
+# POSIX timestamps for the data in this file:
+#updated 1467936000
+#expires 1561680000
+
+# Updated through IERS Bulletin C56
+# File expires on: 28 June 2019
--- a/test/jdk/sun/util/calendar/zi/tzdata/northamerica Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/northamerica Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for North and Central America and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -71,7 +71,7 @@
#
# Most of the US soon followed suit. See:
# Bartky IR. The adoption of standard time. Technol Cult 1989 Jan;30(1):25-56.
-# http://dx.doi.org/10.2307/3105430
+# https://dx.doi.org/10.2307/3105430
# From Paul Eggert (2005-04-16):
# That 1883 transition occurred at 12:00 new time, not at 12:00 old time.
@@ -460,6 +460,19 @@
# western South Dakota, far western Texas (El Paso County, Hudspeth County,
# and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming
#
+# From Paul Eggert (2018-10-25):
+# On 1921-03-04 federal law placed all of Texas into the central time zone.
+# However, El Paso ignored the law for decades and continued to observe
+# mountain time, on the grounds that that's what they had always done
+# and they weren't about to let the federal government tell them what to do.
+# Eventually the federal government gave in and changed the law on
+# 1970-04-10 to match what El Paso was actually doing. Although
+# that's slightly after our 1970 cutoff, there is no need to create a
+# separate zone for El Paso since they were ignoring the law anyway. See:
+# Long T. El Pasoans were time rebels, fought to stay in Mountain zone.
+# El Paso Times. 2018-10-24 06:40 -06.
+# https://www.elpasotimes.com/story/news/local/el-paso/2018/10/24/el-pasoans-were-time-rebels-fought-stay-mountain-zone/1744509002/
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Denver 1920 1921 - Mar lastSun 2:00 1:00 D
Rule Denver 1920 only - Oct lastSun 2:00 0 S
@@ -729,9 +742,7 @@
Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00
-10:30 - HST 1933 Apr 30 2:00
-10:30 1:00 HDT 1933 May 21 12:00
- -10:30 - HST 1942 Feb 9 2:00
- -10:30 1:00 HDT 1945 Sep 30 2:00
- -10:30 - HST 1947 Jun 8 2:00
+ -10:30 US H%sT 1947 Jun 8 2:00
-10:00 - HST
# Now we turn to US areas that have diverged from the consensus since 1970.
--- a/test/jdk/sun/util/calendar/zi/tzdata/pacificnew Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/pacificnew Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for proposed US election time (this file is obsolete)
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/test/jdk/sun/util/calendar/zi/tzdata/solar87 Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/solar87 Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/solar88 Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/solar88 Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/solar89 Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/solar89 Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata/southamerica Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/southamerica Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for South America and environs
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
@@ -415,7 +415,7 @@
# standard time, so let's do that here too. This does not change UTC
# offsets, only tm_isdst and the time zone abbreviations. One minor
# plus is that this silences a zic complaint that there's no POSIX TZ
-# setting for time stamps past 2038.
+# setting for timestamps past 2038.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
#
@@ -948,6 +948,14 @@
# ... https://www.timeanddate.com/news/time/brazil-delays-dst-2018.html
# From Steffen Thorsen (2017-12-20):
# http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2017/decreto/D9242.htm
+#
+# From Fábio Gomes (2018-10-04):
+# The Brazilian president just announced a new change on this year DST.
+# It was scheduled to start on November 4th and it was changed to November 18th.
+# From Rodrigo Brüning Wessler (2018-10-15):
+# The Brazilian government just announced that the change in DST was
+# canceled.... Maybe the president Michel Temer also woke up one hour
+# earlier today. :)
Rule Brazil 2018 max - Nov Sun>=1 0:00 1:00 -
Rule Brazil 2023 only - Feb Sun>=22 0:00 0 -
Rule Brazil 2024 2025 - Feb Sun>=15 0:00 0 -
@@ -1254,6 +1262,24 @@
# they will switch from -03 to -04 one hour after Santiago does that day.
# For now, assume that they will not revert.
+# From Juan Correa (2018-08-13):
+# As of moments ago, the Ministry of Energy in Chile has announced the new
+# schema for DST. ... Announcement in video (in Spanish):
+# https://twitter.com/MinEnergia/status/1029000399129374720
+# From Yonathan Dossow (2018-08-13):
+# The video says "first Saturday of September", we all know it means Sunday at
+# midnight.
+# From Tim Parenti (2018-08-13):
+# Translating the captions on the video at 0:44-0:55, "We want to announce as
+# Government that from 2019, Winter Time will be increased to 5 months, between
+# the first Saturday of April and the first Saturday of September."
+# At 2:08-2:20, "The Magallanes region will maintain its current time, as
+# decided by the citizens during 2017, but our Government will promote a
+# regional dialogue table to gather their opinion on this matter."
+# https://twitter.com/MinEnergia/status/1029009354001973248
+# "We will keep the new time policy unchanged for at least the next 4 years."
+# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Chile 1927 1931 - Sep 1 0:00 1:00 -
Rule Chile 1928 1932 - Apr 1 0:00 0 -
@@ -1287,8 +1313,10 @@
Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 -
Rule Chile 2012 2014 - Apr Sun>=23 3:00u 0 -
Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 -
-Rule Chile 2016 max - May Sun>=9 3:00u 0 -
-Rule Chile 2016 max - Aug Sun>=9 4:00u 1:00 -
+Rule Chile 2016 2018 - May Sun>=9 3:00u 0 -
+Rule Chile 2016 2018 - Aug Sun>=9 4:00u 1:00 -
+Rule Chile 2019 max - Apr Sun>=2 3:00u 0 -
+Rule Chile 2019 max - Sep Sun>=2 4:00u 1:00 -
# IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
--- a/test/jdk/sun/util/calendar/zi/tzdata/systemv Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/systemv Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,6 +19,8 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
+# tzdb data for System V rules (this file is obsolete)
+
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
--- a/test/jdk/sun/util/calendar/zi/tzdata/zone.tab Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata/zone.tab Mon Nov 12 11:10:16 2018 +0530
@@ -3,9 +3,7 @@
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -21,12 +19,12 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-# tz zone descriptions (deprecated version)
+# tzdb timezone descriptions (deprecated version)
#
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
-# From Paul Eggert (2014-07-31):
+# From Paul Eggert (2018-06-27):
# This file is intended as a backward-compatibility aid for older programs.
# New programs should use zone1970.tab. This file is like zone1970.tab (see
# zone1970.tab's comments), but with the following additional restrictions:
@@ -35,13 +33,13 @@
# 2. The first data column contains exactly one country code.
#
# Because of (2), each row stands for an area that is the intersection
-# of a region identified by a country code and of a zone where civil
+# of a region identified by a country code and of a timezone where civil
# clocks have agreed since 1970; this is a narrower definition than
# that of zone1970.tab.
#
-# This table is intended as an aid for users, to help them select time
-# zone data entries appropriate for their practical needs. It is not
-# intended to take or endorse any position on legal or territorial claims.
+# This table is intended as an aid for users, to help them select timezones
+# appropriate for their practical needs. It is not intended to take or
+# endorse any position on legal or territorial claims.
#
#country-
#code coordinates TZ comments
@@ -291,7 +289,7 @@
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
-MO +2214+11335 Asia/Macau
+MO +221150+1133230 Asia/Macau
MP +1512+14545 Pacific/Saipan
MQ +1436-06105 America/Martinique
MR +1806-01557 Africa/Nouakchott
--- a/test/jdk/sun/util/calendar/zi/tzdata_jdk/gmt Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata_jdk/gmt Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
#
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata_jdk/jdk11_backward Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata_jdk/jdk11_backward Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
#
-# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/calendar/zi/tzdata_jdk/jdk11_full_backward Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/calendar/zi/tzdata_jdk/jdk11_full_backward Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
#
-# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/locale/provider/Bug8152817.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/locale/provider/Bug8152817.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/sun/util/resources/cldr/Bug8204603.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/sun/util/resources/cldr/Bug8204603.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jar/modularJar/src/bar/jdk/test/bar/Bar.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, 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
@@ -32,8 +32,7 @@
import java.util.StringJoiner;
import java.util.HashSet;
import java.util.Set;
-import jdk.internal.misc.SharedSecrets;
-import jdk.internal.misc.JavaLangModuleAccess;
+
import jdk.internal.module.ModuleHashes;
import jdk.internal.module.ModuleReferenceImpl;
import jdk.test.bar.internal.Message;
--- a/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jlink/plugins/SystemModuleDescriptors/SystemModulesTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -34,15 +34,15 @@
import java.util.Map;
import java.util.Set;
-import jdk.internal.misc.JavaLangModuleAccess;
-import jdk.internal.misc.SharedSecrets;
+import jdk.internal.access.JavaLangModuleAccess;
+import jdk.internal.access.SharedSecrets;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @test
* @bug 8142968 8173381
- * @modules java.base/jdk.internal.misc
+ * @modules java.base/jdk.internal.access
* @modules java.base/jdk.internal.module
* @modules java.base/jdk.internal.org.objectweb.asm
* @build ModuleTargetHelper
--- a/test/jdk/tools/jmod/src/apa/jdk/test/apa/Apa.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jmod/src/apa/jdk/test/apa/Apa.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/jmod/src/apa/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jmod/src/apa/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/jmod/src/foo/jdk/test/foo/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jmod/src/foo/jdk/test/foo/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/jmod/src/foo/jdk/test/foo/internal/Message.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jmod/src/foo/jdk/test/foo/internal/Message.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/jmod/src/foo/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/jmod/src/foo/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/launcher/modules/addexports/src/java.compiler/javax/annotation/processing/Generated.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/ClassReader.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/CommandLineParser.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/CommandLineParser.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/TokenList.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/TokenList.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/XMLKit.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/jdk/tools/pack200/pack200-verifier/src/xmlkit/XMLKit.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,12 +1,10 @@
/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/inpackage.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/inpackage.html Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
+published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/sub-dir/SubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/sub-dir/SubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/sub-dir/sub-dir-1/SubSubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/doc-files/sub-dir/sub-dir-1/SubSubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme.mdle/p/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/inpackage.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/inpackage.html Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
+published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/sub-dir/SubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/sub-dir/SubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/sub-dir/sub-dir-1/SubSubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/doc-files/sub-dir/sub-dir-1/SubSubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/acme2.mdle/p2/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/overview.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/modules/overview.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/doc-files/inpackage.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/doc-files/inpackage.html Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
+published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/doc-files/sub-dir/SubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p1/doc-files/sub-dir/SubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case1.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case1.html Mon Nov 12 11:10:16 2018 +0530
@@ -7,9 +7,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case2.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case2.html Mon Nov 12 11:10:16 2018 +0530
@@ -7,9 +7,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case3.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case3.html Mon Nov 12 11:10:16 2018 +0530
@@ -7,9 +7,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case4.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/packages/p2/doc-files/case4.html Mon Nov 12 11:10:16 2018 +0530
@@ -7,9 +7,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/Foo.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/Foo.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/doc-files/doc-file/SubReadme.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/doc-files/doc-file/SubReadme.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,9 +5,7 @@
~
~ This code is free software; you can redistribute it and/or modify it
~ under the terms of the GNU General Public License version 2 only, as
- ~ published by the Free Software Foundation. Oracle designates this
- ~ particular file as subject to the "Classpath" exception as provided
- ~ by Oracle in the LICENSE file that accompanied this code.
+ ~ published by the Free Software Foundation.
~
~ This code is distributed in the hope that it will be useful, but WITHOUT
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/doc-files/inpackage.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testCopyFiles/unnamed/doc-files/inpackage.html Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
+published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testGrandParentTypes/TestGrandParentTypes.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testHeadTag/TestHeadTag.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testHeadTag/TestHeadTag.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLankmarkRegions.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlLandmarkRegions/TestHtmlLankmarkRegions.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTag/pkg3/A.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTag/pkg3/A.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testHtmlTag/pkg3/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlTag/pkg3/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -8,9 +8,7 @@
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
-published by the Free Software Foundation. Oracle designates this
-particular file as subject to the "Classpath" exception as provided
-by Oracle in the LICENSE file that accompanied this code.
+published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testIndexTaglet/TestIndexTaglet.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testIndexTaglet/TestIndexTaglet.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleA/concealedpkgmdlA/ConcealedClassInModuleA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleA/concealedpkgmdlA/ConcealedClassInModuleA.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleA/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleA/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleA/testpkgmdlA/TestClassInModuleA.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleA/testpkgmdlA/TestClassInModuleA.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg2mdlB/TestInterface2InModuleB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg2mdlB/TestInterface2InModuleB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg2mdlB/TestInterfaceInModuleB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg2mdlB/TestInterfaceInModuleB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg3mdlB/TestClassLinkOption.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkg3mdlB/TestClassLinkOption.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkgmdlB/TestClass2InModuleB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkgmdlB/TestClass2InModuleB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkgmdlB/TestClassInModuleB.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleB/testpkgmdlB/TestClassInModuleB.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleC/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleC/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleC/testpkgmdlC/TestClassInModuleC.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleC/testpkgmdlC/TestClassInModuleC.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleNoExport/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleNoExport/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleNoExport/testpkgmdlNoExport/TestClassInModuleNoExport.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleNoExport/testpkgmdlNoExport/TestClassInModuleNoExport.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduleT/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduleT/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduletags/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduletags/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/moduletags/testpkgmdltags/TestClassInModuleTags.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/moduletags/testpkgmdltags/TestClassInModuleTags.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/test.moduleFullName/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/test.moduleFullName/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/test.moduleFullName/testpkgmdlfullname/TestClassInTestModuleFullName.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/test.moduleFullName/testpkgmdlfullname/TestClassInTestModuleFullName.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/testpkgnomodule/TestClassNoModule.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/testpkgnomodule/TestClassNoModule.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testModules/testpkgnomodule1/TestClassNoModulePkg1.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testModules/testpkgnomodule1/TestClassNoModulePkg1.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/pkg5/TestEnum.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testOverriddenMethods/pkg5/TestEnum.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testOverview/msrc/module-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testOverview/msrc/module-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testPackageDescription/pkg/package-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testPackageDescription/pkg/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/TestSummaryTag.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/doclet/testSummaryTag/p2/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testSummaryTag/p2/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -2,4 +2,4 @@
<BODY>
foo {@summary bar} baz.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/jdk/javadoc/doclet/testValueTag/pkg3/RT.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testValueTag/pkg3/RT.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/jdk/javadoc/tool/TestScriptInComment.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/jdk/javadoc/tool/TestScriptInComment.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8133247/T8133247.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8133247/T8133247.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8133247/p/A.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8133247/p/A.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8133247/p/B.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8133247/p/B.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8133247/p/I.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8133247/p/I.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8169345/T8169345b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8169345/T8169345b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/8169345/T8169345c.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/8169345/T8169345c.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/DefiniteAssignment/T8204610.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/DefiniteAssignment/T8204610.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8210197/DiamondWithAnonymousInnerClassTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8210197
+ * @summary javac can't tell during speculative attribution if a diamond expression is creating an anonymous inner class or not
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ jdk.compiler/com.sun.tools.javac.main
+ * @build toolbox.ToolBox toolbox.JavacTask
+ * @run main DiamondWithAnonymousInnerClassTest
+ */
+
+import toolbox.JavacTask;
+import toolbox.ToolBox;
+
+public class DiamondWithAnonymousInnerClassTest {
+ private static final String Class1Src =
+ "package pkg1;\n" +
+ "public class MyClass<T> {\n" +
+ " protected MyClass() {}\n" +
+ " protected MyClass(String s) {}\n" +
+ "}";
+ private static final String Class2Src =
+ "package pkg2;\n" +
+ "import pkg1.*;\n" +
+ "class Client {\n" +
+ " <T> void foo(MyClass<T> m) {}\n" +
+ " void bar() {\n" +
+ " foo(new MyClass<>(){});\n" +
+ " }\n" +
+ "}";
+
+ public static void main(String args[]) throws Exception {
+ new DiamondWithAnonymousInnerClassTest().run();
+ }
+
+ private final ToolBox tb = new ToolBox();
+
+ void run() {
+ new JavacTask(tb).sources(Class1Src, Class2Src).run();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/T8211450/ThrownTypeVarTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8211450
+ * @summary UndetVar::dup is not copying the kind field to the duplicated instance
+ * @compile ThrownTypeVarTest.java
+ */
+
+import java.io.*;
+
+public class ThrownTypeVarTest {
+ void repro() throws IOException {
+ when(f(any()));
+ }
+
+ interface MyInt<T1, E1 extends Exception> {}
+
+ <T2, E2 extends Exception> T2 f(MyInt<T2, E2> g) throws IOException, E2 {
+ return null;
+ }
+
+ static <T3> T3 any() {
+ return null;
+ }
+
+ static <T4> void when(T4 methodCall) {}
+}
--- a/test/langtools/tools/javac/annotations/8145489/foo/Anno.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/annotations/8145489/foo/Anno.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/annotations/8145489/foo/Status.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/annotations/8145489/foo/Status.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/annotations/8145489/foo/package-info.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/annotations/8145489/foo/package-info.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/classreader/8171132/BadConstantValue.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/FutureVarNotAllowed.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/FutureVarNotAllowed.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/IllegalRefToVarType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/IllegalRefToVarType.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/IllegalSignature.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/IllegalSignature.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalCantInferNull.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalCantInferNull.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalCantInferVoid.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalCantInferVoid.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalLambdaMissingTarget.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalLambdaMissingTarget.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalMissingInit.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalMissingInit.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalMrefMissingTarget.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalMrefMissingTarget.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalRedundantType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalRedundantType.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/LocalSelfRef.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/LocalSelfRef.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewFeatureDisabled.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewFeatureDisabled.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewFeatureDisabledPlural.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewFeatureDisabledPlural.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewFeatureUse.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewFilename.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewFilename.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewFilenameAdditional.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPlural.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPluralBar.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/PreviewPlural/PreviewPluralBar.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/StatExprExpected.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/StatExprExpected.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/VarNotAllowed.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/VarNotAllowed.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/VarNotAllowedArray.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/VarNotAllowedArray.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/VarNotAllowedCompound.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/VarNotAllowedCompound.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/VarNotAllowedExplicitLambda.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/VarNotAllowedExplicitLambda.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/VarNotAllowedHere.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/VarNotAllowedHere.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/diags/examples/WrongNumberTypeArgsFragment.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/diags/examples/WrongNumberTypeArgsFragment.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/doctree/SummaryTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/SummaryTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/doctree/dcapi/overview0.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/overview0.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,4 +5,4 @@
<BODY>
A simple well formed html document <pre>overview0.html</pre>.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/doctree/dcapi/overview1.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/overview1.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,4 +5,4 @@
Html document <pre>overview1.html</pre>.
Missing HTML.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/doctree/dcapi/overview2.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/overview2.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,4 +5,4 @@
Html document <pre>overview2.html</pre>.
Missing HEAD.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/doctree/dcapi/overview3.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/overview3.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,4 +5,4 @@
Html document <pre>overview3.html</pre>.
Missing enclosing HEAD.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/doctree/dcapi/overview5.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/overview5.html Mon Nov 12 11:10:16 2018 +0530
@@ -5,4 +5,4 @@
<BODY>
Html document <pre>overview5.html</pre>.
Missing enclosing HTML
-</BODY>
\ No newline at end of file
+</BODY>
--- a/test/langtools/tools/javac/doctree/dcapi/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -8,4 +8,4 @@
<BODY>
A simple well formed html document <pre>package.html<pre>.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/doctree/dcapi/pkg/package.html Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/doctree/dcapi/pkg/package.html Mon Nov 12 11:10:16 2018 +0530
@@ -6,4 +6,4 @@
A simple well formed html document <pre>package.html</pre>.
In package pkg.
</BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- a/test/langtools/tools/javac/generics/diamond/7002837/T7002837.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/diamond/7002837/T7002837.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/diamond/neg/T8078473.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/diamond/neg/T8078473.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/diamond/neg/T8078473_2.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/diamond/neg/T8078473_2.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8067767/T8067767.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8067767/T8067767.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8077306/T8077306.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8077306/T8077306.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8141613/T8141613.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8141613/T8141613.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8147493/T8147493a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8147493/T8147493a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8147493/T8147493b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8147493/T8147493b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8152832/T8152832.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8152832/T8152832.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8156954/T8156954.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8156954/T8156954.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8157149/T8157149b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8157149/T8157149b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8157149/T8157149c.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8157149/T8157149c.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8158355/T8158355.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8158355/T8158355.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8159680/T8159680.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8159680/T8159680.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8164399/T8164399.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8164399/T8164399.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8168134/T8168134.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8168134/T8168134.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8174249/T8174249a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8174249/T8174249a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8174249/T8174249b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8174249/T8174249b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8176534/TestUncheckedCalls.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8176534/TestUncheckedCalls.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8177097/T8177097a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8177097/T8177097a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8177097/T8177097b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8177097/T8177097b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8178150/T8178150.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8178150/T8178150.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/generics/inference/8178427/T8178427.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/generics/inference/8178427/T8178427.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8063054/T8063054a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8063054/T8063054a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8063054/T8063054b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8063054/T8063054b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8134329/T8134329.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8134329/T8134329.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8142876/T8142876.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8142876/T8142876.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8148128/T8148128.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8148128/T8148128.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8188144/T8188144.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8188144/T8188144.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/8210495/T8210495.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/8210495/T8210495.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/T8195598.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/T8195598.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/8147546/T8147546a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/8147546/T8147546a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/8147546/T8147546b.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/8147546/T8147546b.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/8154180/T8154180a.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/8154180/T8154180a.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/InferStrict.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/InferStrict.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/InferWeak.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/InferWeak.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/NestedLambdaGenerics.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/NestedLambdaGenerics.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/NestedLambdaNoGenerics.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/NestedLambdaNoGenerics.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/T8046685.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/T8046685.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/T8055984.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/T8055984.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/T8077247.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/T8077247.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lambda/speculative/T8078093.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lambda/speculative/T8078093.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/T8191893.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/T8191893.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/T8191959.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/T8191959.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/T8200199.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/T8200199.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,28 +1,3 @@
-/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
/*
* @test /nodynamiccopyright/
* @bug 8200199
--- a/test/langtools/tools/javac/lvti/T8200199.out Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/T8200199.out Mon Nov 12 11:10:16 2018 +0530
@@ -1,6 +1,6 @@
-T8200199.java:46:13: compiler.warn.local.redundant.type
-T8200199.java:47:18: compiler.warn.local.redundant.type
-T8200199.java:48:23: compiler.warn.local.redundant.type
+T8200199.java:21:13: compiler.warn.local.redundant.type
+T8200199.java:22:18: compiler.warn.local.redundant.type
+T8200199.java:23:23: compiler.warn.local.redundant.type
- compiler.err.warnings.and.werror
1 error
3 warnings
--- a/test/langtools/tools/javac/lvti/TestBadArray.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/TestBadArray.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/badTypeReference/BadTypeReference.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/badTypeReference/BadTypeReference.java Mon Nov 12 11:10:16 2018 +0530
@@ -1,28 +1,3 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
/*
* @test /nodynamiccopyright/
* @bug 8177466
--- a/test/langtools/tools/javac/lvti/badTypeReference/BadTypeReference.out Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/badTypeReference/BadTypeReference.out Mon Nov 12 11:10:16 2018 +0530
@@ -1,3 +1,3 @@
-BadTypeReference.java:39:9: compiler.err.illegal.ref.to.var.type
-BadTypeReference.java:40:21: compiler.err.illegal.ref.to.var.type
+BadTypeReference.java:14:9: compiler.err.illegal.ref.to.var.type
+BadTypeReference.java:15:21: compiler.err.illegal.ref.to.var.type
2 errors
--- a/test/langtools/tools/javac/lvti/badTypeReference/pkg/nested/var/A.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/badTypeReference/pkg/nested/var/A.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/badTypeReference/pkg/var.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/badTypeReference/pkg/var.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/InferredType.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/InferredType.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/LocalVariableInferenceTester.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/LocalVariableInferenceTester.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/NonDenotableTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/NonDenotableTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/PrimitiveTypeTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/PrimitiveTypeTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/ReferenceTypeTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/ReferenceTypeTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/lvti/harness/UpperBounds.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/lvti/harness/UpperBounds.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/modules/T8168854/pack1/Outer.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/modules/T8168854/pack1/Outer.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/modules/T8168854/pack1/Outer1.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/modules/T8168854/pack1/Outer1.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/overload/T8176265.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/overload/T8176265.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/preview/PreviewOptionTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/preview/PreviewOptionTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javac/preview/classReaderTest/Bar.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/preview/classReaderTest/Bar.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/processing/rounds/GetElementsAnnotatedWithOnMissing.java Mon Nov 12 11:10:16 2018 +0530
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8213103
+ * @summary Checking getElementsAnnotatedWith works for unknown annotations and with -source 8.
+ * @library /tools/lib /tools/javac/lib
+ * @modules
+ * jdk.compiler/com.sun.tools.javac.api
+ * jdk.compiler/com.sun.tools.javac.main
+ * @build toolbox.ToolBox toolbox.JavacTask JavacTestingAbstractProcessor
+ * @run main GetElementsAnnotatedWithOnMissing
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Set;
+
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.TypeElement;
+
+import toolbox.JavacTask;
+import toolbox.Task;
+import toolbox.TestRunner;
+import toolbox.ToolBox;
+
+public class GetElementsAnnotatedWithOnMissing extends TestRunner {
+
+ public static void main(String... args) throws Exception {
+ new GetElementsAnnotatedWithOnMissing().runTests(
+ m -> new Object[] { Paths.get(m.getName()) }
+ );
+ }
+
+ private ToolBox tb = new ToolBox();
+
+ public GetElementsAnnotatedWithOnMissing() {
+ super(System.err);
+ }
+
+ @Test
+ public void testModuleInfoInWrongPlace(Path base) throws Exception {
+ Path src = base.resolve("src");
+ Path classes = base.resolve("classes");
+
+ Files.createDirectories(classes);
+
+ tb.writeJavaFiles(src, "package test; public class Test {}");
+
+ new JavacTask(tb)
+ .options("-XDrawDiagnostics",
+ "-source", "8",
+ "-classpath", "",
+ "-sourcepath", src.toString(),
+ "-processorpath", System.getProperty("test.class.path"),
+ "-processor", AP.class.getName())
+ .outdir(classes)
+ .files(tb.findJavaFiles(src))
+ .run()
+ .writeAll()
+ .getOutput(Task.OutputKind.DIRECT);
+
+ new JavacTask(tb)
+ .options("-XDrawDiagnostics",
+ "-classpath", "",
+ "-sourcepath", src.toString(),
+ "-processorpath", System.getProperty("test.class.path"),
+ "-processor", AP.class.getName())
+ .outdir(classes)
+ .files(tb.findJavaFiles(src))
+ .run()
+ .writeAll()
+ .getOutput(Task.OutputKind.DIRECT);
+ }
+
+ public static final class AP extends JavacTestingAbstractProcessor {
+
+ @Override
+ public boolean process(Set<? extends TypeElement> annot, RoundEnvironment env) {
+ if (elements.getTypeElement(Ann.class.getCanonicalName()) != null) {
+ throw new IllegalStateException("Can resolve @Ann!");
+ }
+ env.getElementsAnnotatedWith(Ann.class);
+ return false;
+ }
+
+ }
+
+ public @interface Ann {}
+}
--- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchInExpressionSwitch.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javadoc/lib/ToyDoclet.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javadoc/lib/ToyDoclet.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/javap/typeAnnotations/InvisibleParameterAnnotationsTest.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/javap/typeAnnotations/InvisibleParameterAnnotationsTest.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/lib/builder/AbstractBuilder.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/lib/builder/AbstractBuilder.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/lib/builder/ClassBuilder.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/lib/builder/ClassBuilder.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/lib/toolbox/Assert.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/lib/toolbox/Assert.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/sjavac/HiddenFiles.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/sjavac/HiddenFiles.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/langtools/tools/sjavac/OverlappingSrcDst.java Mon Nov 12 10:55:49 2018 +0530
+++ b/test/langtools/tools/sjavac/OverlappingSrcDst.java Mon Nov 12 11:10:16 2018 +0530
@@ -4,9 +4,7 @@
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or