--- a/.hgtags Thu Oct 31 16:16:21 2019 +0000
+++ b/.hgtags Thu Nov 07 18:44:09 2019 +0000
@@ -594,3 +594,4 @@
9b67dd88a9313e982ec5f710a7747161bc8f0c23 jdk-14+19
54ffb15c48399dd59922ee22bb592d815307e77c jdk-14+20
c16ac7a2eba4e73cb4f7ee9294dd647860eebff0 jdk-14+21
+83810b7d12e7ff761ad3dd91f323a22dad96f108 jdk-14+22
--- a/doc/building.html Thu Oct 31 16:16:21 2019 +0000
+++ b/doc/building.html Thu Nov 07 18:44:09 2019 +0000
@@ -385,10 +385,10 @@
<p>On Linux you can also get a JDK from the Linux distribution. On apt-based distros (like Debian and Ubuntu), <code>sudo apt-get install openjdk-<VERSION>-jdk</code> is typically enough to install a JDK <VERSION>. On rpm-based distros (like Fedora and Red Hat), try <code>sudo yum install java-<VERSION>-openjdk-devel</code>.</p>
<h2 id="external-library-requirements">External Library Requirements</h2>
<p>Different platforms require different external libraries. In general, libraries are not optional - that is, they are either required or not used.</p>
-<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files an library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
+<p>If a required library is not detected by <code>configure</code>, you need to provide the path to it. There are two forms of the <code>configure</code> arguments to point to an external library: <code>--with-<LIB>=<path></code> or <code>--with-<LIB>-include=<path to include> --with-<LIB>-lib=<path to lib></code>. The first variant is more concise, but require the include files and library files to reside in a default hierarchy under this directory. In most cases, it works fine.</p>
<p>As a fallback, the second version allows you to point to the include directory and the lib directory separately.</p>
<h3 id="freetype">FreeType</h3>
-<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK’s own copy.</p>
+<p>FreeType2 from <a href="http://www.freetype.org/">The FreeType Project</a> is not required on any platform. The exception is on Unix-based platforms when configuring such that the build artifacts will reference a system installed library, rather than bundling the JDK's own copy.</p>
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
@@ -449,7 +449,7 @@
<p>To build the JDK, you need a "configuration", which consists of a directory where to store the build output, coupled with information about the platform, the specific build machine, and choices that affect how the JDK is built.</p>
<p>The configuration is created by the <code>configure</code> script. The basic invocation of the <code>configure</code> script looks like this:</p>
<pre><code>bash configure [options]</code></pre>
-<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-normal-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
+<p>This will create an output directory containing the configuration and setup an area for the build result. This directory typically looks like <code>build/linux-x64-server-release</code>, but the actual name depends on your specific configuration. (It can also be set directly, see <a href="#using-multiple-configurations">Using Multiple Configurations</a>). This directory is referred to as <code>$BUILD</code> in this documentation.</p>
<p><code>configure</code> will try to figure out what system you are running on and where all necessary build components are. If you have all prerequisites for building installed, it should find everything. If it fails to detect any component automatically, it will exit and inform you about the problem.</p>
<p>Some command line examples:</p>
<ul>
--- a/doc/building.md Thu Oct 31 16:16:21 2019 +0000
+++ b/doc/building.md Thu Nov 07 18:44:09 2019 +0000
@@ -473,8 +473,8 @@
path to it. There are two forms of the `configure` arguments to point to an
external library: `--with-<LIB>=<path>` or `--with-<LIB>-include=<path to
include> --with-<LIB>-lib=<path to lib>`. The first variant is more concise,
-but require the include files an library files to reside in a default hierarchy
-under this directory. In most cases, it works fine.
+but require the include files and library files to reside in a default
+hierarchy under this directory. In most cases, it works fine.
As a fallback, the second version allows you to point to the include directory
and the lib directory separately.
@@ -484,7 +484,7 @@
FreeType2 from [The FreeType Project](http://www.freetype.org/) is not required
on any platform. The exception is on Unix-based platforms when configuring such
that the build artifacts will reference a system installed library,
-rather than bundling the JDK’s own copy.
+rather than bundling the JDK's own copy.
* To install on an apt-based Linux, try running `sudo apt-get install
libfreetype6-dev`.
@@ -623,8 +623,8 @@
This will create an output directory containing the configuration and setup an
area for the build result. This directory typically looks like
-`build/linux-x64-normal-server-release`, but the actual name depends on your
-specific configuration. (It can also be set directly, see [Using Multiple
+`build/linux-x64-server-release`, but the actual name depends on your specific
+configuration. (It can also be set directly, see [Using Multiple
Configurations](#using-multiple-configurations)). This directory is referred to
as `$BUILD` in this documentation.
--- a/doc/testing.html Thu Oct 31 16:16:21 2019 +0000
+++ b/doc/testing.html Thu Nov 07 18:44:09 2019 +0000
@@ -43,6 +43,7 @@
<li><a href="#docker-tests">Docker Tests</a></li>
<li><a href="#non-us-locale">Non-US locale</a></li>
<li><a href="#pkcs11-tests">PKCS11 Tests</a></li>
+<li><a href="#client-ui-tests">Client UI Tests</a></li>
</ul></li>
</ul>
</nav>
@@ -207,5 +208,15 @@
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories. For example:</p>
<pre><code>$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"</code></pre>
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
+<h3 id="client-ui-tests">Client UI Tests</h3>
+<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>
+<h4 id="macos">MacOS</h4>
+<p>Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts; select or deselect desired shortcut.</p>
+<p>For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails on MacOS because it uses <code>CTRL + F1</code> key sequence to show or hide tooltip message but the key combination is reserved by the operating system. To run the test correctly the default global key shortcut should be disabled using the steps described above, and then deselect "Turn keyboard access on or off" option which is responsible for <code>CTRL + F1</code> combination.</p>
+<h4 id="linux">Linux</h4>
+<p>Open the Activities overview and start typing Settings; Choose Settings, click Devices, then click Keyboard; set or override desired shortcut.</p>
+<h4 id="windows">Windows</h4>
+<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
+<p>Note: restart is required to make the settings take effect.</p>
</body>
</html>
--- a/doc/testing.md Thu Oct 31 16:16:21 2019 +0000
+++ b/doc/testing.md Thu Nov 07 18:44:09 2019 +0000
@@ -421,6 +421,35 @@
For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.
+### Client UI Tests
+
+Some Client UI tests use key sequences which may be reserved by the operating
+system. Usually that causes the test failure. So it is highly recommended to disable
+system key shortcuts prior testing. The steps to access and disable system key shortcuts
+for various platforms are provided below.
+
+#### MacOS
+Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
+select or deselect desired shortcut.
+
+For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails
+on MacOS because it uses `CTRL + F1` key sequence to show or hide tooltip message
+but the key combination is reserved by the operating system. To run the test correctly
+the default global key shortcut should be disabled using the steps described above, and then deselect
+"Turn keyboard access on or off" option which is responsible for `CTRL + F1` combination.
+
+#### Linux
+Open the Activities overview and start typing Settings; Choose Settings, click Devices,
+then click Keyboard; set or override desired shortcut.
+
+#### Windows
+Type `gpedit` in the Search and then click Edit group policy; navigate to
+User Configuration -> Administrative Templates -> Windows Components -> File Explorer;
+in the right-side pane look for "Turn off Windows key hotkeys" and double click on it;
+enable or disable hotkeys.
+
+Note: restart is required to make the settings take effect.
+
---
# Override some definitions in the global css file that are not optimal for
# this document.
--- a/make/CompileToolsJdk.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/CompileToolsJdk.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/Coverage.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/Coverage.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/Docs.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/Docs.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -138,9 +138,9 @@
ifeq ($(IS_DRAFT), true)
DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
ifeq ($(VERSION_BUILD), 0)
- DRAFT_MARKER_TITLE := [ad-hoc build]
+ DRAFT_MARKER_TITLE := $(SPACE)[ad-hoc build]
else
- DRAFT_MARKER_TITLE := [build $(VERSION_BUILD)]
+ DRAFT_MARKER_TITLE := $(SPACE)[build $(VERSION_BUILD)]
endif
DRAFT_TEXT := This specification is not final and is subject to change. \
Use is subject to <a href="$(LICENSE_URL)">license terms</a>.
@@ -304,7 +304,7 @@
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
Specification
- $1_WINDOW_TITLE := $$(subst &,&,$$($1_SHORT_NAME)) $$(DRAFT_MARKER_TITLE)
+ $1_WINDOW_TITLE := $$(subst &,&,$$($1_SHORT_NAME))$$(DRAFT_MARKER_TITLE)
$1_HEADER_TITLE := <div $$(HEADER_STYLE)><strong>$$($1_SHORT_NAME)</strong> \
$$(DRAFT_MARKER_STR)</div>
--- a/make/GenerateLinkOptData.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/GenerateLinkOptData.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/GensrcModuleInfo.gmk Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-#
-# 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.
-#
-
-################################################################################
-# This file makes modifications to module-info.java files based on the build
-# configuration.
-#
-# Depending on build platform, imported modules and optional parts of the build
-# being active, some modules need to have extra exports, provides or uses
-# declarations added to them. These optional extras are defined in .extra files:
-#
-# src/<module>/<share,platform>/classes/module-info.java.extra
-#
-# The contents of the .extra files are simply extra lines that could fit into
-# the module-info file.
-#
-# This makefile is called once for each from-module with the variable
-# MODULE naming the from-module.
-#
-# The modified module-info.java files are put in the gensrc directory where
-# they will automatically override the static versions in the src tree.
-#
-################################################################################
-
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-include Modules.gmk
-
-################################################################################
-# Define this here since jdk/make/Tools.gmk cannot be included from the top
-# make directory. Should probably move some tools away from the jdk repo.
-TOOL_GENMODULEINFOSOURCE = $(JAVA_SMALL) \
- $(INTERIM_LANGTOOLS_ARGS) \
- -cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes" \
- build.tools.module.GenModuleInfoSource
-
-################################################################################
-
-# Name of modification file.
-MOD_FILENAME := module-info.java.extra
-
-# Construct all possible src directories for the module.
-MODULE_CLASSES_DIRS := $(call FindModuleSrcDirs, $(MODULE))
-
-# Find all the .extra files in the src dirs.
-MOD_FILES := $(wildcard $(foreach f, $(MOD_FILENAME), $(addsuffix /$(f), \
- $(MODULE_CLASSES_DIRS))))
-
-ifneq ($(MOD_FILES), )
- # Only make this call if modification files are found for this module
- ALL_MODULES := $(call FindAllModules)
-
- $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java: \
- $(firstword $(call FindAllModuleInfos, $(MODULE))) \
- $(BUILD_TOOLS_JDK) \
- $(MOD_FILES) \
- $(call DependOnVariable, ALL_MODULES)
- $(call MakeTargetDir)
- $(RM) $@ $@.tmp
- $(TOOL_GENMODULEINFOSOURCE) -o $@.tmp \
- --source-file $< \
- --modules $(call CommaList, $(ALL_MODULES)) \
- $(MOD_FILES)
- $(MV) $@.tmp $@
-
- TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java
-
-else
- # If no modifications are found for this module, remove any module-info.java
- # created by a previous build since that is no longer valid.
- ifneq ($(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java), )
- $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java)
- endif
-endif
-
-################################################################################
-
-all: $(TARGETS)
--- a/make/Main.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/Main.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -77,7 +77,7 @@
interim-cldrconverter:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
-
+
interim-tzdb:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
@@ -133,7 +133,7 @@
define DeclareModuleInfoRecipe
$1-gensrc-moduleinfo:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) \
- -f GensrcModuleInfo.gmk MODULE=$1)
+ -f gensrc/GensrcModuleInfo.gmk MODULE=$1)
$1-gensrc: $1-gensrc-moduleinfo
endef
--- a/make/MainSupport.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/MainSupport.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/ModuleWrapper.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/ModuleWrapper.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/RunTestsPrebuiltSpec.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/RunTestsPrebuiltSpec.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/TestImage.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/TestImage.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/UpdateBuildDocs.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/UpdateBuildDocs.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -45,29 +45,13 @@
DOCS_DIR := $(TOPDIR)/doc
-$(eval $(call SetupProcessMarkdown, building, \
- FILES := $(DOCS_DIR)/building.md, \
+$(eval $(call SetupProcessMarkdown, md_docs, \
+ FILES := $(call FindFiles, $(DOCS_DIR), *.md), \
DEST := $(DOCS_DIR), \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
OPTIONS := --toc, \
))
-TARGETS += $(building)
-
-$(eval $(call SetupProcessMarkdown, testing, \
- FILES := $(DOCS_DIR)/testing.md, \
- DEST := $(DOCS_DIR), \
- CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
- OPTIONS := --toc, \
-))
-TARGETS += $(testing)
-
-$(eval $(call SetupProcessMarkdown, ide, \
- FILES := $(DOCS_DIR)/ide.md, \
- DEST := $(DOCS_DIR), \
- CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
- OPTIONS := --toc, \
-))
-TARGETS += $(ide)
+TARGETS += $(md_docs)
################################################################################
--- a/make/ZipSecurity.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/ZipSecurity.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/configure.ac Thu Oct 31 16:16:21 2019 +0000
+++ b/make/autoconf/configure.ac Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
-SRC#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/flags-cflags.m4 Thu Oct 31 16:16:21 2019 +0000
+++ b/make/autoconf/flags-cflags.m4 Thu Nov 07 18:44:09 2019 +0000
@@ -597,7 +597,7 @@
LANGSTD_CFLAGS="-xc99=all,no_lib"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
- # LANGSTD_CFLAGS="/TP"
+ # LANGSTD_CFLAGS="-TP"
# but that requires numerous changes to the sources files. So we are limited
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
# This is the lowest bar for shared code.
--- a/make/common/JavaCompilation.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/common/JavaCompilation.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -222,7 +222,7 @@
) \
)
$$(call MakeDir,$$($1_BIN))
- # Order src files according to the order of the src dirs. Correct odering is
+ # Order src files according to the order of the src dirs. Correct ordering is
# needed for correct overriding between different source roots.
$1_ALL_SRC_RAW := $$(call FindFiles, $$($1_SRC))
$1_ALL_SRCS := $$($1_EXTRA_FILES) \
--- a/make/common/JdkNativeCompilation.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/common/JdkNativeCompilation.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/common/ProcessMarkdown.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/common/ProcessMarkdown.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,4 +1,4 @@
-# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/common/RMICompilation.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/common/RMICompilation.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/common/SetupJavaCompilers.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/common/SetupJavaCompilers.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/copy/Copy-jdk.crypto.cryptoki.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/copy/Copy-jdk.crypto.cryptoki.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/copy/Copy-jdk.crypto.ucrypto.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/copy/Copy-jdk.crypto.ucrypto.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/devkit/Tools.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/devkit/Tools.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataBlacklistedCerts.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gendata/GendataBlacklistedCerts.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataBreakIterator.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gendata/GendataBreakIterator.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataPublicSuffixList.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gendata/GendataPublicSuffixList.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/Gensrc-java.desktop.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/Gensrc-java.desktop.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/Gensrc-jdk.hotspot.agent.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/Gensrc-jdk.hotspot.agent.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/Gensrc-jdk.jlink.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/Gensrc-jdk.jlink.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcBuffer.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/GensrcBuffer.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcCharacterData.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/GensrcCharacterData.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcCharsetCoder.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/GensrcCharsetCoder.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcIcons.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/GensrcIcons.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/make/gensrc/GensrcModuleInfo.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+################################################################################
+# This file makes modifications to module-info.java files based on the build
+# configuration.
+#
+# Depending on build platform, imported modules and optional parts of the build
+# being active, some modules need to have extra exports, provides or uses
+# declarations added to them. These optional extras are defined in .extra files:
+#
+# src/<module>/<share,platform>/classes/module-info.java.extra
+#
+# The contents of the .extra files are simply extra lines that could fit into
+# the module-info file.
+#
+# This makefile is called once for each from-module with the variable
+# MODULE naming the from-module.
+#
+# The modified module-info.java files are put in the gensrc directory where
+# they will automatically override the static versions in the src tree.
+#
+################################################################################
+
+default: all
+
+include $(SPEC)
+include MakeBase.gmk
+include Modules.gmk
+
+################################################################################
+# Define this here since jdk/make/Tools.gmk cannot be included from the top
+# make directory. Should probably move some tools away from the jdk repo.
+TOOL_GENMODULEINFOSOURCE = $(JAVA_SMALL) \
+ $(INTERIM_LANGTOOLS_ARGS) \
+ -cp "$(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes" \
+ build.tools.module.GenModuleInfoSource
+
+################################################################################
+
+# Name of modification file.
+MOD_FILENAME := module-info.java.extra
+
+# Construct all possible src directories for the module.
+MODULE_CLASSES_DIRS := $(call FindModuleSrcDirs, $(MODULE))
+
+# Find all the .extra files in the src dirs.
+MOD_FILES := $(wildcard $(foreach f, $(MOD_FILENAME), $(addsuffix /$(f), \
+ $(MODULE_CLASSES_DIRS))))
+
+ifneq ($(MOD_FILES), )
+ # Only make this call if modification files are found for this module
+ ALL_MODULES := $(call FindAllModules)
+
+ $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java: \
+ $(firstword $(call FindAllModuleInfos, $(MODULE))) \
+ $(BUILD_TOOLS_JDK) \
+ $(MOD_FILES) \
+ $(call DependOnVariable, ALL_MODULES)
+ $(call MakeTargetDir)
+ $(RM) $@ $@.tmp
+ $(TOOL_GENMODULEINFOSOURCE) -o $@.tmp \
+ --source-file $< \
+ --modules $(call CommaList, $(ALL_MODULES)) \
+ $(MOD_FILES)
+ $(MV) $@.tmp $@
+
+ TARGETS += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java
+
+else
+ # If no modifications are found for this module, remove any module-info.java
+ # created by a previous build since that is no longer valid.
+ ifneq ($(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java), )
+ $(shell $(RM) $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/module-info.java)
+ endif
+endif
+
+################################################################################
+
+all: $(TARGETS)
--- a/make/gensrc/GensrcVarHandles.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/gensrc/GensrcVarHandles.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -173,4 +173,3 @@
# Include custom extension post hook
$(eval $(call IncludeCustomExtension, gensrc/GensrcVarHandles-post.gmk))
-
--- a/make/hotspot/CopyToExplodedJdk.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/CopyToExplodedJdk.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/lib/CompileDtraceLibraries.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/lib/CompileDtraceLibraries.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/lib/JvmDtraceObjects.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/lib/JvmDtraceObjects.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/lib/JvmFlags.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/lib/JvmFlags.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/lib/JvmMapfile.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/lib/JvmMapfile.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/symbols/symbols-unix Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/symbols/symbols-unix Thu Nov 07 18:44:09 2019 +0000
@@ -46,7 +46,6 @@
JVM_ConstantPoolGetStringAt
JVM_ConstantPoolGetTagAt
JVM_ConstantPoolGetUTF8At
-JVM_CountStackFrames
JVM_CurrentThread
JVM_CurrentTimeMillis
JVM_DefineClass
@@ -143,14 +142,12 @@
JVM_IsArrayClass
JVM_IsConstructorIx
JVM_IsInterface
-JVM_IsInterrupted
JVM_IsPrimitiveClass
JVM_IsSameClassPackage
JVM_IsSupportedJNIVersion
JVM_IsThreadAlive
JVM_IsVMGeneratedMethodIx
JVM_LatestUserDefinedLoader
-JVM_LinkClass
JVM_LoadLibrary
JVM_MaxMemory
JVM_MaxObjectInspectionAge
--- a/make/hotspot/test/GtestImage.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/hotspot/test/GtestImage.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java Thu Oct 31 16:16:21 2019 +0000
+++ b/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java Thu Nov 07 18:44:09 2019 +0000
@@ -391,26 +391,23 @@
}
private void handleMultipleInheritance(Map<String, Object> map, Map<String, Object> parents, String key) {
- String formatKey = key + "/format";
- Object format = map.get(formatKey);
+ String formatMapKey = key + "/format";
+ Object format = map.get(formatMapKey);
if (format != null) {
- map.remove(formatKey);
+ map.remove(formatMapKey);
map.put(key, format);
- if (fillInElements(parents, formatKey, format)) {
+ if (fillInElements(parents, formatMapKey, format)) {
map.remove(key);
}
}
- String standaloneKey = key + "/stand-alone";
- Object standalone = map.get(standaloneKey);
+ String standaloneMapKey = key + "/stand-alone";
+ Object standalone = map.get(standaloneMapKey);
if (standalone != null) {
- map.remove(standaloneKey);
- String realKey = key;
- if (format != null) {
- realKey = "standalone." + key;
- }
- map.put(realKey, standalone);
- if (fillInElements(parents, standaloneKey, standalone)) {
- map.remove(realKey);
+ map.remove(standaloneMapKey);
+ String standaloneResourceKey = "standalone." + key;
+ map.put(standaloneResourceKey, standalone);
+ if (fillInElements(parents, standaloneMapKey, standalone)) {
+ map.remove(standaloneResourceKey);
}
}
}
--- a/make/launcher/Launcher-java.security.jgss.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/launcher/Launcher-java.security.jgss.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/launcher/Launcher-jdk.pack.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/launcher/Launcher-jdk.pack.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/CoreLibraries.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/CoreLibraries.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-java.instrument.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-java.instrument.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-java.management.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-java.management.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-java.prefs.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-java.prefs.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.accessibility.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.accessibility.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.attach.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.attach.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.hotspot.agent.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.hotspot.agent.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -53,10 +53,16 @@
endif
endif
+SA_TOOLCHAIN := $(TOOLCHAIN_DEFAULT)
+ifeq ($(call isTargetOs, linux), true)
+ SA_TOOLCHAIN := TOOLCHAIN_LINK_CXX
+endif
+
################################################################################
$(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
NAME := saproc, \
+ TOOLCHAIN := $(SA_TOOLCHAIN), \
OPTIMIZATION := HIGH, \
DISABLED_WARNINGS_microsoft := 4267, \
DISABLED_WARNINGS_gcc := sign-compare pointer-arith, \
--- a/make/lib/Lib-jdk.internal.le.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.internal.le.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.jdi.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.jdi.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.jdwp.agent.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.jdwp.agent.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,7 @@
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := -lpthread, \
LIBS_solaris := -lnsl -lsocket, \
- LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib, \
+ LIBS_windows := $(JDKLIB_LIBS) ws2_32.lib iphlpapi.lib, \
))
$(BUILD_LIBDT_SOCKET): $(call FindLib, java.base, java)
--- a/make/lib/Lib-jdk.management.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.management.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.net.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.net.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.sctp.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/lib/Lib-jdk.sctp.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/rmic/Rmic-java.management.rmi.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/rmic/Rmic-java.management.rmi.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/test/BuildFailureHandler.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/test/BuildFailureHandler.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/make/test/JtregGraalUnit.gmk Thu Oct 31 16:16:21 2019 +0000
+++ b/make/test/JtregGraalUnit.gmk Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
--- a/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1978,6 +1978,9 @@
case T_ADDRESS:
imm = opr2->as_constant_ptr()->as_jint();
break;
+ case T_METADATA:
+ imm = (intptr_t)(opr2->as_constant_ptr()->as_metadata());
+ break;
case T_OBJECT:
case T_ARRAY:
jobject2reg(opr2->as_constant_ptr()->as_jobject(), rscratch1);
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -23,6 +23,7 @@
#include "precompiled.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
+#include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
@@ -346,29 +347,44 @@
}
}
+//
+// Arguments:
+//
+// Inputs:
+// src: oop location to load from, might be clobbered
+//
+// Output:
+// dst: oop loaded from src location
+//
+// Kill:
+// rscratch1 (scratch reg)
+//
+// Alias:
+// dst: rscratch1 (might use rscratch1 as temporary output register to avoid clobbering src)
+//
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread) {
- bool on_oop = is_reference_type(type);
- bool not_in_heap = (decorators & IN_NATIVE) != 0;
- bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
- bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
- bool on_reference = on_weak || on_phantom;
- bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
- bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0 || is_traversal_mode;
+ // 1: non-reference load, no additional barrier is needed
+ if (!is_reference_type(type)) {
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
+ return;
+ }
- Register result_dst = dst;
+ // 2: load a reference from src location and apply LRB if ShenandoahLoadRefBarrier is set
+ if (ShenandoahLoadRefBarrier) {
+ Register result_dst = dst;
- if (on_oop) {
- // We want to preserve src
+ // Preserve src location for LRB
if (dst == src.base() || dst == src.index()) {
dst = rscratch1;
}
assert_different_registers(dst, src.base(), src.index());
- }
+
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
- BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
- if (on_oop) {
- if (not_in_heap && !is_traversal_mode) {
+ // Native barrier is for concurrent root processing
+ bool in_native = (decorators & IN_NATIVE) != 0;
+ if (in_native && ShenandoahConcurrentRoots::can_do_concurrent_roots()) {
load_reference_barrier_native(masm, dst, src);
} else {
load_reference_barrier(masm, dst, src);
@@ -378,8 +394,19 @@
__ mov(result_dst, dst);
dst = result_dst;
}
+ } else {
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
+ }
- if (ShenandoahKeepAliveBarrier && on_reference && keep_alive) {
+ // 3: apply keep-alive barrier if ShenandoahKeepAliveBarrier is set
+ if (ShenandoahKeepAliveBarrier) {
+ bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
+ bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
+ bool on_reference = on_weak || on_phantom;
+ bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
+ bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0 || is_traversal_mode;
+
+ if (on_reference && keep_alive) {
__ enter();
satb_write_barrier_pre(masm /* masm */,
noreg /* obj */,
@@ -443,8 +470,9 @@
__ cbz(obj, done);
assert(obj != rscratch2, "need rscratch2");
- Address gc_state(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
- __ ldrb(rscratch2, gc_state);
+ Address gc_state(jni_env, ShenandoahThreadLocalData::gc_state_offset() - JavaThread::jni_environment_offset());
+ __ lea(rscratch2, gc_state);
+ __ ldrb(rscratch2, Address(rscratch2));
// Check for heap in evacuation phase
__ tbnz(rscratch2, ShenandoahHeap::EVACUATION_BITPOS, slowpath);
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -287,8 +287,6 @@
//-------------------------------------------------------------------
-address NativeMovRegMem::instruction_address() const { return addr_at(instruction_offset); }
-
int NativeMovRegMem::offset() const {
address pc = instruction_address();
unsigned insn = *(unsigned*)pc;
--- a/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/aarch64/nativeInst_aarch64.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -381,11 +381,11 @@
public:
// helper
- int instruction_start() const;
+ int instruction_start() const { return instruction_offset; }
- address instruction_address() const;
+ address instruction_address() const { return addr_at(instruction_offset); }
- address next_instruction_address() const;
+ int num_bytes_to_end_of_patch() const { return instruction_offset + instruction_size; }
int offset() const;
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -285,7 +285,6 @@
}
break;
case Interpreter::java_lang_math_pow :
- fpargs = 2;
if (StubRoutines::dpow() == NULL) {
fn = CAST_FROM_FN_PTR(address, SharedRuntime::dpow);
} else {
--- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1817,6 +1817,11 @@
assert(opr2->as_constant_ptr()->as_jobject() == NULL, "cannot handle otherwise");
__ cmp(opr1->as_register(), 0);
break;
+ case T_METADATA:
+ assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "Only equality tests");
+ assert(opr2->as_constant_ptr()->as_metadata() == NULL, "cannot handle otherwise");
+ __ cmp(opr1->as_register(), 0);
+ break;
default:
ShouldNotReachHere();
}
--- a/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/arm/c1_LIRGenerator_arm.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1310,9 +1310,16 @@
CodeEmitInfo* info) {
if (value->is_double_cpu()) {
assert(address->index()->is_illegal(), "should have a constant displacement");
- LIR_Opr tmp = new_pointer_register();
- add_large_constant(address->base(), address->disp(), tmp);
- __ volatile_store_mem_reg(value, new LIR_Address(tmp, (intx)0, address->type()), info);
+ LIR_Address* store_addr = NULL;
+ if (address->disp() != 0) {
+ LIR_Opr tmp = new_pointer_register();
+ add_large_constant(address->base(), address->disp(), tmp);
+ store_addr = new LIR_Address(tmp, (intx)0, address->type());
+ } else {
+ // address->disp() can be 0, if the address is referenced using the unsafe intrinsic
+ store_addr = address;
+ }
+ __ volatile_store_mem_reg(value, store_addr, info);
return;
}
__ store(value, address, info, lir_patch_none);
@@ -1322,9 +1329,16 @@
CodeEmitInfo* info) {
if (result->is_double_cpu()) {
assert(address->index()->is_illegal(), "should have a constant displacement");
- LIR_Opr tmp = new_pointer_register();
- add_large_constant(address->base(), address->disp(), tmp);
- __ volatile_load_mem_reg(new LIR_Address(tmp, (intx)0, address->type()), result, info);
+ LIR_Address* load_addr = NULL;
+ if (address->disp() != 0) {
+ LIR_Opr tmp = new_pointer_register();
+ add_large_constant(address->base(), address->disp(), tmp);
+ load_addr = new LIR_Address(tmp, (intx)0, address->type());
+ } else {
+ // address->disp() can be 0, if the address is referenced using the unsafe intrinsic
+ load_addr = address;
+ }
+ __ volatile_load_mem_reg(load_addr, result, info);
return;
}
__ load(address, result, info, lir_patch_none);
--- a/src/hotspot/cpu/arm/nativeInst_arm_32.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/arm/nativeInst_arm_32.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -349,6 +349,11 @@
// (field access patching is handled differently in that case)
class NativeMovRegMem: public NativeInstruction {
public:
+ enum arm_specific_constants {
+ instruction_size = 8
+ };
+
+ int num_bytes_to_end_of_patch() const { return instruction_size; }
int offset() const;
void set_offset(int x);
--- a/src/hotspot/cpu/arm/vtableStubs_arm.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/arm/vtableStubs_arm.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
#include "oops/compiledICHolder.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
+#include "oops/klass.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_arm.inline.hpp"
#ifdef COMPILER2
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1467,6 +1467,19 @@
}
break;
+ case T_METADATA:
+ // We only need, for now, comparison with NULL for metadata.
+ {
+ assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops");
+ Metadata* p = opr2->as_constant_ptr()->as_metadata();
+ if (p == NULL) {
+ __ cmpdi(BOOL_RESULT, opr1->as_register(), 0);
+ } else {
+ ShouldNotReachHere();
+ }
+ }
+ break;
+
default:
ShouldNotReachHere();
break;
--- a/src/hotspot/cpu/ppc/c1_globals_ppc.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/c1_globals_ppc.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -48,8 +48,12 @@
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(bool, ResizeTLAB, true);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
+define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M );
+define_pd_global(uintx, ProfiledCodeHeapSize, 14*M );
+define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
+define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, MetaspaceSize, 12*M);
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(size_t, NewSizeThreadIncrease, 16*K);
--- a/src/hotspot/cpu/ppc/disassembler_ppc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/disassembler_ppc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -27,8 +27,6 @@
#include "code/codeCache.hpp"
#include "compiler/disassembler.hpp"
#include "depChecker_ppc.hpp"
-#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
-#include "gc/cms/parOopClosures.inline.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/cardTableBarrierSet.hpp"
#include "gc/shared/genOopClosures.inline.hpp"
--- a/src/hotspot/cpu/ppc/globalDefinitions_ppc.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/globalDefinitions_ppc.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -50,6 +50,8 @@
#if defined(COMPILER2) && (defined(AIX) || defined(LINUX))
// Include Transactional Memory lock eliding optimization
#define INCLUDE_RTM_OPT 1
+#else
+#define INCLUDE_RTM_OPT 0
#endif
#define SUPPORT_RESERVED_STACK_AREA
--- a/src/hotspot/cpu/ppc/nativeInst_ppc.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/nativeInst_ppc.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -462,6 +462,8 @@
address instruction_address() const { return addr_at(0); }
+ int num_bytes_to_end_of_patch() const { return instruction_size; }
+
intptr_t offset() const {
#ifdef VM_LITTLE_ENDIAN
short *hi_ptr = (short*)(addr_at(0));
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -571,7 +571,6 @@
__ bctr();
}
-#ifdef COMPILER2
static int reg2slot(VMReg r) {
return r->reg2stack() + SharedRuntime::out_preserve_stack_slots();
}
@@ -579,7 +578,6 @@
static int reg2offset(VMReg r) {
return (r->reg2stack() + SharedRuntime::out_preserve_stack_slots()) * VMRegImpl::stack_slot_size;
}
-#endif
// ---------------------------------------------------------------------------
// Read the array of BasicTypes from a signature, and compute where the
@@ -1305,7 +1303,6 @@
return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry, c2i_no_clinit_check_entry);
}
-#ifdef COMPILER2
// An oop arg. Must pass a handle not the oop itself.
static void object_move(MacroAssembler* masm,
int frame_size_in_slots,
@@ -1813,8 +1810,6 @@
receiver_reg, member_reg, /*for_compiler_entry:*/ true);
}
-#endif // COMPILER2
-
// ---------------------------------------------------------------------------
// Generate a native wrapper for a given method. The method takes arguments
// in the Java compiled code convention, marshals them to the native
@@ -1851,7 +1846,6 @@
VMRegPair *in_regs,
BasicType ret_type,
address critical_entry) {
-#ifdef COMPILER2
if (method->is_method_handle_intrinsic()) {
vmIntrinsics::ID iid = method->intrinsic_id();
intptr_t start = (intptr_t)__ pc();
@@ -2108,7 +2102,7 @@
// Check ic: object class == cached class?
if (!method_is_static) {
- Register ic = as_Register(Matcher::inline_cache_reg_encode());
+ Register ic = R19_inline_cache_reg;
Register receiver_klass = r_temp_1;
__ cmpdi(CCR0, R3_ARG1, 0);
@@ -2638,12 +2632,10 @@
// Handler for pending exceptions (out-of-line).
// --------------------------------------------------------------------------
-
// Since this is a native call, we know the proper exception handler
// is the empty function. We just pop this frame and then jump to
// forward_exception_entry.
if (!is_critical_native) {
- __ align(InteriorEntryAlignment);
__ bind(handle_pending_exception);
__ pop_frame();
@@ -2656,7 +2648,6 @@
// --------------------------------------------------------------------------
if (!method_is_static) {
- __ align(InteriorEntryAlignment);
__ bind(ic_miss);
__ b64_patchable((address)SharedRuntime::get_ic_miss_stub(),
@@ -2683,10 +2674,6 @@
}
return nm;
-#else
- ShouldNotReachHere();
- return NULL;
-#endif // COMPILER2
}
// This function returns the adjust size (in number of words) to a c2i adapter
@@ -2863,7 +2850,7 @@
// We can't grab a free register here, because all registers may
// contain live values, so let the RegisterSaver do the adjustment
// of the return pc.
- const int return_pc_adjustment_no_exception = -HandlerImpl::size_deopt_handler();
+ const int return_pc_adjustment_no_exception = -MacroAssembler::bl64_patchable_size;
// Push the "unpack frame"
// Save everything in sight.
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -3103,6 +3103,7 @@
STUB_ENTRY(checkcast_arraycopy));
// fill routines
+#ifdef COMPILER2
if (OptimizeFill) {
StubRoutines::_jbyte_fill = generate_fill(T_BYTE, false, "jbyte_fill");
StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill");
@@ -3111,6 +3112,7 @@
StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill");
StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill");
}
+#endif
}
// Safefetch stubs.
@@ -3579,8 +3581,6 @@
if (UseMultiplyToLenIntrinsic) {
StubRoutines::_multiplyToLen = generate_multiplyToLen();
}
-#endif
-
if (UseSquareToLenIntrinsic) {
StubRoutines::_squareToLen = generate_squareToLen();
}
@@ -3595,6 +3595,7 @@
StubRoutines::_montgomerySquare
= CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_square);
}
+#endif
if (UseAESIntrinsics) {
StubRoutines::_aescrypt_encryptBlock = generate_aescrypt_encryptBlock();
--- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -312,6 +312,7 @@
FLAG_SET_DEFAULT(UseSHA, false);
}
+#ifdef COMPILER2
if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) {
UseSquareToLenIntrinsic = true;
}
@@ -327,6 +328,7 @@
if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) {
UseMontgomerySquareIntrinsic = true;
}
+#endif
if (UseVectorizedMismatchIntrinsic) {
warning("UseVectorizedMismatchIntrinsic specified, but not available on this CPU.");
@@ -373,9 +375,11 @@
if (UseRTMDeopt) {
FLAG_SET_DEFAULT(UseRTMDeopt, false);
}
+#ifdef COMPILER2
if (PrintPreciseRTMLockingStatistics) {
FLAG_SET_DEFAULT(PrintPreciseRTMLockingStatistics, false);
}
+#endif
}
// This machine allows unaligned memory accesses
--- a/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/c1_LIRAssembler_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1322,6 +1322,15 @@
} else {
__ z_cfi(reg1, c->as_jint());
}
+ } else if (c->type() == T_METADATA) {
+ // We only need, for now, comparison with NULL for metadata.
+ assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops");
+ Metadata* m = c->as_metadata();
+ if (m == NULL) {
+ __ z_cghi(reg1, 0);
+ } else {
+ ShouldNotReachHere();
+ }
} else if (is_reference_type(c->type())) {
// In 64bit oops are single register.
jobject o = c->as_jobject();
--- a/src/hotspot/cpu/s390/compiledIC_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/compiledIC_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2019, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,6 +75,7 @@
return stub;
#else
ShouldNotReachHere();
+ return NULL;
#endif
}
--- a/src/hotspot/cpu/s390/disassembler_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/disassembler_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,6 @@
#include "code/codeCache.hpp"
#include "compiler/disassembler.hpp"
#include "depChecker_s390.hpp"
-#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
-#include "gc/cms/parOopClosures.inline.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/cardTableBarrierSet.hpp"
#include "gc/shared/genOopClosures.inline.hpp"
--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -37,9 +37,11 @@
#include "oops/accessDecorators.hpp"
#include "oops/compressedOops.inline.hpp"
#include "oops/klass.inline.hpp"
+#ifdef COMPILER2
#include "opto/compile.hpp"
#include "opto/intrinsicnode.hpp"
#include "opto/matcher.hpp"
+#endif
#include "prims/methodHandles.hpp"
#include "registerSaver_s390.hpp"
#include "runtime/biasedLocking.hpp"
@@ -2925,7 +2927,7 @@
}
void MacroAssembler::nmethod_UEP(Label& ic_miss) {
- Register ic_reg = as_Register(Matcher::inline_cache_reg_encode());
+ Register ic_reg = Z_inline_cache;
int klass_offset = oopDesc::klass_offset_in_bytes();
if (!ImplicitNullChecks || MacroAssembler::needs_explicit_null_check(klass_offset)) {
if (VM_Version::has_CompareBranch()) {
@@ -4590,6 +4592,7 @@
return block_end - block_start;
}
+#ifdef COMPILER2
//------------------------------------------------------
// Special String Intrinsics. Implementation
//------------------------------------------------------
@@ -5837,7 +5840,7 @@
return offset() - block_start;
}
-
+#endif
//-------------------------------------------------
// Constants (scalar and oop) in constant pool
@@ -6150,96 +6153,6 @@
Assembler::z_brc(Assembler::bcondOverflow /* CC==3 (iterate) */, retry);
}
-
-void MacroAssembler::generate_type_profiling(const Register Rdata,
- const Register Rreceiver_klass,
- const Register Rwanted_receiver_klass,
- const Register Rmatching_row,
- bool is_virtual_call) {
- const int row_size = in_bytes(ReceiverTypeData::receiver_offset(1)) -
- in_bytes(ReceiverTypeData::receiver_offset(0));
- const int num_rows = ReceiverTypeData::row_limit();
- NearLabel found_free_row;
- NearLabel do_increment;
- NearLabel found_no_slot;
-
- BLOCK_COMMENT("type profiling {");
-
- // search for:
- // a) The type given in Rwanted_receiver_klass.
- // b) The *first* empty row.
-
- // First search for a) only, just running over b) with no regard.
- // This is possible because
- // wanted_receiver_class == receiver_class && wanted_receiver_class == 0
- // is never true (receiver_class can't be zero).
- for (int row_num = 0; row_num < num_rows; row_num++) {
- // Row_offset should be a well-behaved positive number. The generated code relies
- // on that wrt constant code size. Add2reg can handle all row_offset values, but
- // will have to vary generated code size.
- int row_offset = in_bytes(ReceiverTypeData::receiver_offset(row_num));
- assert(Displacement::is_shortDisp(row_offset), "Limitation of generated code");
-
- // Is Rwanted_receiver_klass in this row?
- if (VM_Version::has_CompareBranch()) {
- z_lg(Rwanted_receiver_klass, row_offset, Z_R0, Rdata);
- // Rmatching_row = Rdata + row_offset;
- add2reg(Rmatching_row, row_offset, Rdata);
- // if (*row_recv == (intptr_t) receiver_klass) goto fill_existing_slot;
- compare64_and_branch(Rwanted_receiver_klass, Rreceiver_klass, Assembler::bcondEqual, do_increment);
- } else {
- add2reg(Rmatching_row, row_offset, Rdata);
- z_cg(Rreceiver_klass, row_offset, Z_R0, Rdata);
- z_bre(do_increment);
- }
- }
-
- // Now that we did not find a match, let's search for b).
-
- // We could save the first calculation of Rmatching_row if we woud search for a) in reverse order.
- // We would then end up here with Rmatching_row containing the value for row_num == 0.
- // We would not see much benefit, if any at all, because the CPU can schedule
- // two instructions together with a branch anyway.
- for (int row_num = 0; row_num < num_rows; row_num++) {
- int row_offset = in_bytes(ReceiverTypeData::receiver_offset(row_num));
-
- // Has this row a zero receiver_klass, i.e. is it empty?
- if (VM_Version::has_CompareBranch()) {
- z_lg(Rwanted_receiver_klass, row_offset, Z_R0, Rdata);
- // Rmatching_row = Rdata + row_offset
- add2reg(Rmatching_row, row_offset, Rdata);
- // if (*row_recv == (intptr_t) 0) goto found_free_row
- compare64_and_branch(Rwanted_receiver_klass, (intptr_t)0, Assembler::bcondEqual, found_free_row);
- } else {
- add2reg(Rmatching_row, row_offset, Rdata);
- load_and_test_long(Rwanted_receiver_klass, Address(Rdata, row_offset));
- z_bre(found_free_row); // zero -> Found a free row.
- }
- }
-
- // No match, no empty row found.
- // Increment total counter to indicate polymorphic case.
- if (is_virtual_call) {
- add2mem_64(Address(Rdata, CounterData::count_offset()), 1, Rmatching_row);
- }
- z_bru(found_no_slot);
-
- // Here we found an empty row, but we have not found Rwanted_receiver_klass.
- // Rmatching_row holds the address to the first empty row.
- bind(found_free_row);
- // Store receiver_klass into empty slot.
- z_stg(Rreceiver_klass, 0, Z_R0, Rmatching_row);
-
- // Increment the counter of Rmatching_row.
- bind(do_increment);
- ByteSize counter_offset = ReceiverTypeData::receiver_count_offset(0) - ReceiverTypeData::receiver_offset(0);
- add2mem_64(Address(Rmatching_row, counter_offset), 1, Rdata);
-
- bind(found_no_slot);
-
- BLOCK_COMMENT("} type profiling");
-}
-
//---------------------------------------
// Helpers for Intrinsic Emitters
//---------------------------------------
--- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -850,6 +850,7 @@
// Kills: tmp, Z_R0, Z_R1.
// Early clobber: result.
// Boolean precise controls accuracy of result value.
+#ifdef COMPILER2
unsigned int string_compress(Register result, Register src, Register dst, Register cnt,
Register tmp, bool precise);
@@ -885,6 +886,7 @@
unsigned int string_indexof_char(Register result, Register haystack, Register haycnt,
Register needle, jchar needleChar, Register odd_reg, Register even_reg, bool is_byte);
+#endif
// Emit an oop const to the constant pool and set a relocation info
// with address current_pc. Return the TOC offset of the constant.
@@ -918,13 +920,6 @@
// Offset is +/- 2**32 -> use long.
static long get_load_const_from_toc_offset(address a);
-
- void generate_type_profiling(const Register Rdata,
- const Register Rreceiver_klass,
- const Register Rwanted_receiver_klass,
- const Register Rmatching_row,
- bool is_virtual_call);
-
// Bit operations for single register operands.
inline void lshift(Register r, int places, bool doubl = true); // <<
inline void rshift(Register r, int places, bool doubl = true); // >>
--- a/src/hotspot/cpu/s390/nativeInst_s390.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/nativeInst_s390.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -535,6 +535,12 @@
inline NativeMovRegMem* nativeMovRegMem_at (address address);
class NativeMovRegMem: public NativeInstruction {
public:
+ enum z_specific_constants {
+ instruction_size = 12 // load_const used with access_field_id
+ };
+
+ int num_bytes_to_end_of_patch() const { return instruction_size; }
+
intptr_t offset() const {
return nativeMovConstReg_at(addr_at(0))->data();
}
--- a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -32,6 +32,7 @@
#include "interpreter/interpreter.hpp"
#include "interpreter/interp_masm.hpp"
#include "memory/resourceArea.hpp"
+#include "nativeInst_s390.hpp"
#include "oops/compiledICHolder.hpp"
#include "oops/klass.inline.hpp"
#include "registerSaver_s390.hpp"
@@ -1521,7 +1522,6 @@
VMRegPair *in_regs,
BasicType ret_type,
address critical_entry) {
-#ifdef COMPILER2
int total_in_args = method->size_of_parameters();
if (method->is_method_handle_intrinsic()) {
vmIntrinsics::ID iid = method->intrinsic_id();
@@ -2401,10 +2401,6 @@
}
return nm;
-#else
- ShouldNotReachHere();
- return NULL;
-#endif // COMPILER2
}
static address gen_c2i_adapter(MacroAssembler *masm,
@@ -2880,7 +2876,7 @@
// to Deoptimization::fetch_unroll_info below.
// The (int) cast is necessary, because -((unsigned int)14)
// is an unsigned int.
- __ add2reg(Z_R14, -(int)HandlerImpl::size_deopt_handler());
+ __ add2reg(Z_R14, -(int)NativeCall::max_instruction_size());
const Register exec_mode_reg = Z_tmp_1;
--- a/src/hotspot/cpu/s390/vm_version_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/s390/vm_version_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -61,7 +61,9 @@
intx cache_line_size = Dcache_lineSize(0);
+#ifdef COMPILER2
MaxVectorSize = 8;
+#endif
if (has_PrefetchRaw()) {
if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) { // not preset
@@ -217,6 +219,7 @@
FLAG_SET_DEFAULT(UseSHA, false);
}
+#ifdef COMPILER2
if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) {
FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, true);
}
@@ -226,6 +229,7 @@
if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) {
FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true);
}
+#endif
if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
FLAG_SET_DEFAULT(UsePopCountInstruction, true);
}
--- a/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/sparc/c1_LIRAssembler_sparc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1511,6 +1511,18 @@
}
break;
+ case T_METADATA:
+ // We only need, for now, comparison with NULL for metadata.
+ { assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops");
+ Metadata* m = opr2->as_constant_ptr()->as_metadata();
+ if (m == NULL) {
+ __ cmp(opr1->as_register(), 0);
+ } else {
+ ShouldNotReachHere();
+ }
+ }
+ break;
+
default:
ShouldNotReachHere();
break;
--- a/src/hotspot/cpu/sparc/nativeInst_sparc.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/sparc/nativeInst_sparc.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -574,15 +574,6 @@
//-------------------------------------------------------------------
-void NativeMovRegMem::copy_instruction_to(address new_instruction_address) {
- Untested("copy_instruction_to");
- int instruction_size = next_instruction_address() - instruction_address();
- for (int i = 0; i < instruction_size; i += BytesPerInstWord) {
- *(int*)(new_instruction_address + i) = *(int*)(address(this) + i);
- }
-}
-
-
void NativeMovRegMem::verify() {
NativeInstruction::verify();
// make sure code pattern is actually a "ld" or "st" of some sort.
--- a/src/hotspot/cpu/sparc/nativeInst_sparc.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/sparc/nativeInst_sparc.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -576,7 +576,8 @@
// sethi and the add. The nop is required to be in the delay slot of the call instruction
// which overwrites the sethi during patching.
class NativeMovConstRegPatching;
-inline NativeMovConstRegPatching* nativeMovConstRegPatching_at(address address);class NativeMovConstRegPatching: public NativeInstruction {
+inline NativeMovConstRegPatching* nativeMovConstRegPatching_at(address address);
+class NativeMovConstRegPatching: public NativeInstruction {
public:
enum Sparc_specific_constants {
sethi_offset = 0,
@@ -664,10 +665,13 @@
return (is_op(i0, Assembler::ldst_op));
}
- address instruction_address() const { return addr_at(0); }
- address next_instruction_address() const {
- return addr_at(is_immediate() ? 4 : (7 * BytesPerInstWord));
+ address instruction_address() const { return addr_at(0); }
+
+ int num_bytes_to_end_of_patch() const {
+ return is_immediate()? BytesPerInstWord :
+ NativeMovConstReg::instruction_size;
}
+
intptr_t offset() const {
return is_immediate()? inv_simm(long_at(0), offset_width) :
nativeMovConstReg_at(addr_at(0))->data();
@@ -684,8 +688,6 @@
set_offset (offset() + radd_offset);
}
- void copy_instruction_to(address new_instruction_address);
-
void verify();
void print ();
--- a/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -2641,6 +2641,15 @@
LIR_Const* c = opr2->as_constant_ptr();
if (c->type() == T_INT) {
__ cmpl(reg1, c->as_jint());
+ } else if (c->type() == T_METADATA) {
+ // All we need for now is a comparison with NULL for equality.
+ assert(condition == lir_cond_equal || condition == lir_cond_notEqual, "oops");
+ Metadata* m = c->as_metadata();
+ if (m == NULL) {
+ __ cmpptr(reg1, (int32_t)0);
+ } else {
+ ShouldNotReachHere();
+ }
} else if (is_reference_type(c->type())) {
// In 64bit oops are single register
jobject o = c->as_jobject();
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -23,6 +23,7 @@
#include "precompiled.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
+#include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
@@ -445,21 +446,33 @@
}
}
+//
+// Arguments:
+//
+// Inputs:
+// src: oop location, might be clobbered
+// tmp1: scratch register, might not be valid.
+//
+// Output:
+// dst: oop loaded from src location
+//
+// Kill:
+// tmp1 (if it is valid)
+//
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread) {
- bool on_oop = is_reference_type(type);
- bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
- bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
- bool not_in_heap = (decorators & IN_NATIVE) != 0;
- bool on_reference = on_weak || on_phantom;
- bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
- bool keep_alive = ((decorators & AS_NO_KEEPALIVE) == 0) || is_traversal_mode;
+ // 1: non-reference load, no additional barrier is needed
+ if (!is_reference_type(type)) {
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
+ return;
+ }
- Register result_dst = dst;
- bool use_tmp1_for_dst = false;
+ // 2: load a reference from src location and apply LRB if ShenandoahLoadRefBarrier is set
+ if (ShenandoahLoadRefBarrier) {
+ Register result_dst = dst;
+ bool use_tmp1_for_dst = false;
- if (on_oop) {
- // We want to preserve src
+ // Preserve src location for LRB
if (dst == src.base() || dst == src.index()) {
// Use tmp1 for dst if possible, as it is not used in BarrierAssembler::load_at()
if (tmp1->is_valid() && tmp1 != src.base() && tmp1 != src.index()) {
@@ -469,19 +482,20 @@
dst = rdi;
__ push(dst);
}
+ assert_different_registers(dst, src.base(), src.index());
}
- assert_different_registers(dst, src.base(), src.index());
- }
- BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
- if (on_oop) {
- if (not_in_heap && !is_traversal_mode) {
+ // Native barrier is for concurrent root processing
+ bool in_native = (decorators & IN_NATIVE) != 0;
+ if (in_native && ShenandoahConcurrentRoots::can_do_concurrent_roots()) {
load_reference_barrier_native(masm, dst, src);
} else {
load_reference_barrier(masm, dst, src);
}
+ // Move loaded oop to final destination
if (dst != result_dst) {
__ movptr(result_dst, dst);
@@ -491,8 +505,19 @@
dst = result_dst;
}
+ } else {
+ BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
+ }
- if (ShenandoahKeepAliveBarrier && on_reference && keep_alive) {
+ // 3: apply keep-alive barrier if ShenandoahKeepAliveBarrier is set
+ if (ShenandoahKeepAliveBarrier) {
+ bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
+ bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
+ bool on_reference = on_weak || on_phantom;
+ bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
+ bool keep_alive = ((decorators & AS_NO_KEEPALIVE) == 0) || is_traversal_mode;
+
+ if (on_reference && keep_alive) {
const Register thread = NOT_LP64(tmp_thread) LP64_ONLY(r15_thread);
assert_different_registers(dst, tmp1, tmp_thread);
NOT_LP64(__ get_thread(thread));
--- a/src/hotspot/cpu/x86/nativeInst_x86.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/x86/nativeInst_x86.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -355,60 +355,7 @@
return off;
}
-address NativeMovRegMem::instruction_address() const {
- return addr_at(instruction_start());
-}
-
-address NativeMovRegMem::next_instruction_address() const {
- address ret = instruction_address() + instruction_size;
- u_char instr_0 = *(u_char*) instruction_address();
- switch (instr_0) {
- case instruction_operandsize_prefix:
-
- fatal("should have skipped instruction_operandsize_prefix");
- break;
-
- case instruction_extended_prefix:
- fatal("should have skipped instruction_extended_prefix");
- break;
-
- case instruction_code_mem2reg_movslq: // 0x63
- case instruction_code_mem2reg_movzxb: // 0xB6
- case instruction_code_mem2reg_movsxb: // 0xBE
- case instruction_code_mem2reg_movzxw: // 0xB7
- case instruction_code_mem2reg_movsxw: // 0xBF
- case instruction_code_reg2mem: // 0x89 (q/l)
- case instruction_code_mem2reg: // 0x8B (q/l)
- case instruction_code_reg2memb: // 0x88
- case instruction_code_mem2regb: // 0x8a
-
- case instruction_code_lea: // 0x8d
-
- case instruction_code_float_s: // 0xd9 fld_s a
- case instruction_code_float_d: // 0xdd fld_d a
-
- case instruction_code_xmm_load: // 0x10
- case instruction_code_xmm_store: // 0x11
- case instruction_code_xmm_lpd: // 0x12
- {
- // If there is an SIB then instruction is longer than expected
- u_char mod_rm = *(u_char*)(instruction_address() + 1);
- if ((mod_rm & 7) == 0x4) {
- ret++;
- }
- }
- case instruction_code_xor:
- fatal("should have skipped xor lead in");
- break;
-
- default:
- fatal("not a NativeMovRegMem");
- }
- return ret;
-
-}
-
-int NativeMovRegMem::offset() const{
+int NativeMovRegMem::patch_offset() const {
int off = data_offset + instruction_start();
u_char mod_rm = *(u_char*)(instruction_address() + 1);
// nnnn(r12|rsp) isn't coded as simple mod/rm since that is
@@ -417,19 +364,7 @@
if ((mod_rm & 7) == 0x4) {
off++;
}
- return int_at(off);
-}
-
-void NativeMovRegMem::set_offset(int x) {
- int off = data_offset + instruction_start();
- u_char mod_rm = *(u_char*)(instruction_address() + 1);
- // nnnn(r12|rsp) isn't coded as simple mod/rm since that is
- // the encoding to use an SIB byte. Which will have the nnnn
- // field off by one byte
- if ((mod_rm & 7) == 0x4) {
- off++;
- }
- set_int_at(off, x);
+ return off;
}
void NativeMovRegMem::verify() {
--- a/src/hotspot/cpu/x86/nativeInst_x86.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/cpu/x86/nativeInst_x86.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -361,7 +361,6 @@
instruction_VEX_prefix_3bytes = Assembler::VEX_3bytes,
instruction_EVEX_prefix_4bytes = Assembler::EVEX_4bytes,
- instruction_size = 4,
instruction_offset = 0,
data_offset = 2,
next_instruction_offset = 4
@@ -370,15 +369,26 @@
// helper
int instruction_start() const;
- address instruction_address() const;
+ address instruction_address() const {
+ return addr_at(instruction_start());
+ }
- address next_instruction_address() const;
+ int num_bytes_to_end_of_patch() const {
+ return patch_offset() + sizeof(jint);
+ }
- int offset() const;
+ int offset() const {
+ return int_at(patch_offset());
+ }
- void set_offset(int x);
+ void set_offset(int x) {
+ set_int_at(patch_offset(), x);
+ }
- void add_offset_in_bytes(int add_offset) { set_offset ( ( offset() + add_offset ) ); }
+ void add_offset_in_bytes(int add_offset) {
+ int patch_off = patch_offset();
+ set_int_at(patch_off, int_at(patch_off) + add_offset);
+ }
void verify();
void print ();
@@ -387,6 +397,7 @@
static void test() {}
private:
+ int patch_offset() const;
inline friend NativeMovRegMem* nativeMovRegMem_at (address address);
};
--- a/src/hotspot/os/linux/osContainer_linux.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os/linux/osContainer_linux.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -54,12 +54,16 @@
bool OSContainer::_is_initialized = false;
bool OSContainer::_is_containerized = false;
+int OSContainer::_active_processor_count = 1;
julong _unlimited_memory;
class CgroupSubsystem: CHeapObj<mtInternal> {
friend class OSContainer;
+
private:
+ volatile jlong _next_check_counter;
+
/* mountinfo contents */
char *_root;
char *_mount_point;
@@ -72,6 +76,7 @@
_root = os::strdup(root);
_mount_point = os::strdup(mountpoint);
_path = NULL;
+ _next_check_counter = min_jlong;
}
/*
@@ -121,6 +126,14 @@
}
char *subsystem_path() { return _path; }
+
+ bool cache_has_expired() {
+ return os::elapsed_counter() > _next_check_counter;
+ }
+
+ void set_cache_expiry_time(jlong timeout) {
+ _next_check_counter = os::elapsed_counter() + timeout;
+ }
};
class CgroupMemorySubsystem: CgroupSubsystem {
@@ -132,31 +145,26 @@
* file if everything else seems unlimited */
bool _uses_mem_hierarchy;
volatile jlong _memory_limit_in_bytes;
- volatile jlong _next_check_counter;
public:
CgroupMemorySubsystem(char *root, char *mountpoint) : CgroupSubsystem::CgroupSubsystem(root, mountpoint) {
_uses_mem_hierarchy = false;
_memory_limit_in_bytes = -1;
- _next_check_counter = min_jlong;
}
bool is_hierarchical() { return _uses_mem_hierarchy; }
void set_hierarchical(bool value) { _uses_mem_hierarchy = value; }
- bool should_check_memory_limit() {
- return os::elapsed_counter() > _next_check_counter;
- }
jlong memory_limit_in_bytes() { return _memory_limit_in_bytes; }
void set_memory_limit_in_bytes(jlong value) {
_memory_limit_in_bytes = value;
// max memory limit is unlikely to change, but we want to remain
- // responsive to configuration changes. A very short (20ms) grace time
+ // responsive to configuration changes. A very short grace time
// between re-read avoids excessive overhead during startup without
// significantly reducing the VMs ability to promptly react to reduced
// memory availability
- _next_check_counter = os::elapsed_counter() + (NANOSECS_PER_SEC/50);
+ set_cache_expiry_time(OSCONTAINER_CACHE_TIMEOUT);
}
};
@@ -481,7 +489,7 @@
* OSCONTAINER_ERROR for not supported
*/
jlong OSContainer::memory_limit_in_bytes() {
- if (!memory->should_check_memory_limit()) {
+ if (!memory->cache_has_expired()) {
return memory->memory_limit_in_bytes();
}
jlong memory_limit = read_memory_limit_in_bytes();
@@ -617,6 +625,14 @@
int cpu_count, limit_count;
int result;
+ // We use a cache with a timeout to avoid performing expensive
+ // computations in the event this function is called frequently.
+ // [See 8227006].
+ if (!cpu->cache_has_expired()) {
+ log_trace(os, container)("OSContainer::active_processor_count (cached): %d", OSContainer::_active_processor_count);
+ return OSContainer::_active_processor_count;
+ }
+
cpu_count = limit_count = os::Linux::active_processor_count();
int quota = cpu_quota();
int period = cpu_period();
@@ -649,6 +665,11 @@
result = MIN2(cpu_count, limit_count);
log_trace(os, container)("OSContainer::active_processor_count: %d", result);
+
+ // Update the value and reset the cache timeout
+ OSContainer::_active_processor_count = result;
+ cpu->set_cache_expiry_time(OSCONTAINER_CACHE_TIMEOUT);
+
return result;
}
--- a/src/hotspot/os/linux/osContainer_linux.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os/linux/osContainer_linux.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -31,11 +31,16 @@
#define OSCONTAINER_ERROR (-2)
+// 20ms timeout between re-reads of memory limit and _active_processor_count.
+#define OSCONTAINER_CACHE_TIMEOUT (NANOSECS_PER_SEC/50)
+
class OSContainer: AllStatic {
private:
static bool _is_initialized;
static bool _is_containerized;
+ static int _active_processor_count;
+
static jlong read_memory_limit_in_bytes();
public:
--- a/src/hotspot/os/windows/osThread_windows.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os/windows/osThread_windows.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -39,28 +39,15 @@
}
}
-// We need to specialize these to interact with the _interrupt_event.
-
-volatile bool OSThread::interrupted() {
- return _interrupted != 0 &&
- (WaitForSingleObject(_interrupt_event, 0) == WAIT_OBJECT_0);
-}
+// We need to specialize this to interact with the _interrupt_event.
void OSThread::set_interrupted(bool z) {
if (z) {
- _interrupted = 1;
- // More than one thread can get here with the same value of osthread,
- // resulting in multiple notifications. We do, however, want the store
- // to interrupted() to be visible to other threads before we post
- // the interrupt event.
- OrderAccess::release();
SetEvent(_interrupt_event);
}
else {
// We should only ever clear the interrupt if we are in fact interrupted,
// and this can only be done by the current thread on itself.
- assert(_interrupted == 1, "invariant for clearing interrupt state");
- _interrupted = 0;
ResetEvent(_interrupt_event);
}
}
--- a/src/hotspot/os/windows/osThread_windows.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os/windows/osThread_windows.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -43,10 +43,7 @@
void set_thread_handle(HANDLE handle) { _thread_handle = handle; }
HANDLE interrupt_event() const { return _interrupt_event; }
void set_interrupt_event(HANDLE interrupt_event) { _interrupt_event = interrupt_event; }
- // These are specialized on Windows to interact with the _interrupt_event.
- // Also note that Windows does not skip these calls if we are interrupted - see
- // LibraryCallKit::inline_native_isInterrupted
- volatile bool interrupted();
+ // This is specialized on Windows to interact with the _interrupt_event.
void set_interrupted(bool z);
#ifndef PRODUCT
--- a/src/hotspot/os_cpu/linux_aarch64/orderAccess_linux_aarch64.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os_cpu/linux_aarch64/orderAccess_linux_aarch64.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -55,14 +55,14 @@
struct OrderAccess::PlatformOrderedLoad<byte_size, X_ACQUIRE>
{
template <typename T>
- T operator()(const volatile T* p) const { T data; __atomic_load(p, &data, __ATOMIC_ACQUIRE); return data; }
+ T operator()(const volatile T* p) const { T data; __atomic_load(const_cast<T*>(p), &data, __ATOMIC_ACQUIRE); return data; }
};
template<size_t byte_size>
struct OrderAccess::PlatformOrderedStore<byte_size, RELEASE_X>
{
template <typename T>
- void operator()(T v, volatile T* p) const { __atomic_store(p, &v, __ATOMIC_RELEASE); }
+ void operator()(T v, volatile T* p) const { __atomic_store(const_cast<T*>(p), &v, __ATOMIC_RELEASE); }
};
template<size_t byte_size>
--- a/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2016, 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2016, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -426,6 +426,7 @@
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
}
+#ifdef COMPILER2
// SIGTRAP-based implicit range check in compiled code.
else if (sig == SIGFPE && TrapBasedRangeChecks &&
(trap_pc != NULL) &&
@@ -435,6 +436,7 @@
}
stub = SharedRuntime::continuation_for_implicit_exception(thread, trap_pc, SharedRuntime::IMPLICIT_NULL);
}
+#endif
else if (sig == SIGFPE && info->si_code == FPE_INTDIV) {
stub = SharedRuntime::continuation_for_implicit_exception(thread, trap_pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO);
--- a/src/hotspot/share/aot/aotCodeHeap.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/aot/aotCodeHeap.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -450,7 +450,6 @@
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_write_barrier_post", address, JVMCIRuntime::write_barrier_post);
#endif
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_identity_hash_code", address, JVMCIRuntime::identity_hash_code);
- SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_thread_is_interrupted", address, JVMCIRuntime::thread_is_interrupted);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_exception_handler_for_pc", address, JVMCIRuntime::exception_handler_for_pc);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_test_deoptimize_call_int", address, JVMCIRuntime::test_deoptimize_call_int);
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_jvmci_runtime_throw_and_post_jvmti_exception", address, JVMCIRuntime::throw_and_post_jvmti_exception);
--- a/src/hotspot/share/c1/c1_CodeStubs.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/c1/c1_CodeStubs.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -409,7 +409,7 @@
if (_id == PatchingStub::access_field_id) {
// embed a fixed offset to handle long patches which need to be offset by a word.
// the patching code will just add the field offset field to this offset so
- // that we can refernce either the high or low word of a double word field.
+ // that we can reference either the high or low word of a double word field.
int field_offset = 0;
switch (patch_code) {
case lir_patch_low: field_offset = lo_word_offset_in_bytes; break;
@@ -419,6 +419,8 @@
}
NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start());
n_move->set_offset(field_offset);
+ // Copy will never get executed, so only copy the part which is required for patching.
+ _bytes_to_copy = MAX2(n_move->num_bytes_to_end_of_patch(), (int)NativeGeneralJump::instruction_size);
} else if (_id == load_klass_id || _id == load_mirror_id || _id == load_appendix_id) {
assert(_obj != noreg, "must have register object for load_klass/load_mirror");
#ifdef ASSERT
--- a/src/hotspot/share/c1/c1_Instruction.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/c1/c1_Instruction.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -29,6 +29,7 @@
#include "c1/c1_ValueStack.hpp"
#include "ci/ciObjArrayKlass.hpp"
#include "ci/ciTypeArrayKlass.hpp"
+#include "utilities/bitMap.inline.hpp"
// Implementation of Instruction
--- a/src/hotspot/share/c1/c1_LIRGenerator.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/c1/c1_LIRGenerator.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1301,7 +1301,7 @@
}
__ move(new LIR_Address(rcvr.result(), java_lang_Class::klass_offset_in_bytes(), T_ADDRESS), temp, info);
- __ cmp(lir_cond_notEqual, temp, LIR_OprFact::intConst(0));
+ __ cmp(lir_cond_notEqual, temp, LIR_OprFact::metadataConst(0));
__ cmove(lir_cond_notEqual, LIR_OprFact::intConst(0), LIR_OprFact::intConst(1), result, T_BOOLEAN);
}
--- a/src/hotspot/share/ci/bcEscapeAnalyzer.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/ci/bcEscapeAnalyzer.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -151,7 +151,7 @@
void BCEscapeAnalyzer::clear_bits(ArgumentMap vars, VectorSet &bm) {
for (int i = 0; i < _arg_size; i++) {
if (vars.contains(i)) {
- bm >>= i;
+ bm.remove(i);
}
}
}
@@ -1280,9 +1280,9 @@
set_modified(var, OFFSET_ANY, 4);
set_global_escape(var);
}
- _arg_local.Clear();
- _arg_stack.Clear();
- _arg_returned.Clear();
+ _arg_local.clear();
+ _arg_stack.clear();
+ _arg_returned.clear();
_return_local = false;
_return_allocated = false;
_allocated_escapes = true;
@@ -1334,7 +1334,7 @@
// Do not scan method if it has no object parameters and
// does not returns an object (_return_allocated is set in initialize()).
- if (_arg_local.Size() == 0 && !_return_allocated) {
+ if (_arg_local.is_empty() && !_return_allocated) {
// Clear all info since method's bytecode was not analysed and
// set pessimistic escape information.
clear_escape_info();
@@ -1457,10 +1457,10 @@
, _parent(parent)
, _level(parent == NULL ? 0 : parent->level() + 1) {
if (!_conservative) {
- _arg_local.Clear();
- _arg_stack.Clear();
- _arg_returned.Clear();
- _dirty.Clear();
+ _arg_local.clear();
+ _arg_stack.clear();
+ _arg_returned.clear();
+ _dirty.clear();
Arena* arena = CURRENT_ENV->arena();
_arg_modified = (uint *) arena->Amalloc(_arg_size * sizeof(uint));
Copy::zero_to_bytes(_arg_modified, _arg_size * sizeof(uint));
--- a/src/hotspot/share/classfile/classLoader.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/classLoader.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -73,14 +73,17 @@
#include "utilities/hashtable.inline.hpp"
#include "utilities/macros.hpp"
+// Entry point in java.dll for path canonicalization
+
+static canonicalize_fn_t CanonicalizeEntry = NULL;
+
// Entry points in zip.dll for loading zip/jar file entries
typedef void * * (*ZipOpen_t)(const char *name, char **pmsg);
-typedef void (*ZipClose_t)(jzfile *zip);
+typedef void (*ZipClose_t)(jzfile *zip);
typedef jzentry* (*FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
typedef jboolean (*ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
typedef jzentry* (*GetNextEntry_t)(jzfile *zip, jint n);
-typedef jboolean (*ZipInflateFully_t)(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg);
typedef jint (*Crc32_t)(jint crc, const jbyte *buf, jint len);
static ZipOpen_t ZipOpen = NULL;
@@ -88,8 +91,6 @@
static FindEntry_t FindEntry = NULL;
static ReadEntry_t ReadEntry = NULL;
static GetNextEntry_t GetNextEntry = NULL;
-static canonicalize_fn_t CanonicalizeEntry = NULL;
-static ZipInflateFully_t ZipInflateFully = NULL;
static Crc32_t Crc32 = NULL;
// Entry points for jimage.dll for loading jimage file entries
@@ -295,9 +296,7 @@
}
ClassPathZipEntry::~ClassPathZipEntry() {
- if (ZipClose != NULL) {
- (*ZipClose)(_zip);
- }
+ (*ZipClose)(_zip);
FREE_C_HEAP_ARRAY(char, _zip_name);
}
@@ -964,11 +963,28 @@
tty->print_cr("]");
}
+void* ClassLoader::dll_lookup(void* lib, const char* name, const char* path) {
+ void* func = os::dll_lookup(lib, name);
+ if (func == NULL) {
+ char msg[256] = "";
+ jio_snprintf(msg, sizeof(msg), "Could not resolve \"%s\"", name);
+ vm_exit_during_initialization(msg, path);
+ }
+ return func;
+}
+
+void ClassLoader::load_java_library() {
+ assert(CanonicalizeEntry == NULL, "should not load java library twice");
+ void *javalib_handle = os::native_java_library();
+ if (javalib_handle == NULL) {
+ vm_exit_during_initialization("Unable to load java library", NULL);
+ }
+
+ CanonicalizeEntry = CAST_TO_FN_PTR(canonicalize_fn_t, dll_lookup(javalib_handle, "Canonicalize", NULL));
+}
+
void ClassLoader::load_zip_library() {
assert(ZipOpen == NULL, "should not load zip library twice");
- // First make sure native library is loaded
- os::native_java_library();
- // Load zip library
char path[JVM_MAXPATHLEN];
char ebuf[1024];
void* handle = NULL;
@@ -976,37 +992,19 @@
handle = os::dll_load(path, ebuf, sizeof ebuf);
}
if (handle == NULL) {
- vm_exit_during_initialization("Unable to load ZIP library", path);
- }
- // Lookup zip entry points
- ZipOpen = CAST_TO_FN_PTR(ZipOpen_t, os::dll_lookup(handle, "ZIP_Open"));
- ZipClose = CAST_TO_FN_PTR(ZipClose_t, os::dll_lookup(handle, "ZIP_Close"));
- FindEntry = CAST_TO_FN_PTR(FindEntry_t, os::dll_lookup(handle, "ZIP_FindEntry"));
- ReadEntry = CAST_TO_FN_PTR(ReadEntry_t, os::dll_lookup(handle, "ZIP_ReadEntry"));
- GetNextEntry = CAST_TO_FN_PTR(GetNextEntry_t, os::dll_lookup(handle, "ZIP_GetNextEntry"));
- ZipInflateFully = CAST_TO_FN_PTR(ZipInflateFully_t, os::dll_lookup(handle, "ZIP_InflateFully"));
- Crc32 = CAST_TO_FN_PTR(Crc32_t, os::dll_lookup(handle, "ZIP_CRC32"));
-
- // ZIP_Close is not exported on Windows in JDK5.0 so don't abort if ZIP_Close is NULL
- if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL ||
- GetNextEntry == NULL || Crc32 == NULL) {
- vm_exit_during_initialization("Corrupted ZIP library", path);
+ vm_exit_during_initialization("Unable to load zip library", path);
}
- if (ZipInflateFully == NULL) {
- vm_exit_during_initialization("Corrupted ZIP library ZIP_InflateFully missing", path);
- }
-
- // Lookup canonicalize entry in libjava.dll
- void *javalib_handle = os::native_java_library();
- CanonicalizeEntry = CAST_TO_FN_PTR(canonicalize_fn_t, os::dll_lookup(javalib_handle, "Canonicalize"));
- // This lookup only works on 1.3. Do not check for non-null here
+ ZipOpen = CAST_TO_FN_PTR(ZipOpen_t, dll_lookup(handle, "ZIP_Open", path));
+ ZipClose = CAST_TO_FN_PTR(ZipClose_t, dll_lookup(handle, "ZIP_Close", path));
+ FindEntry = CAST_TO_FN_PTR(FindEntry_t, dll_lookup(handle, "ZIP_FindEntry", path));
+ ReadEntry = CAST_TO_FN_PTR(ReadEntry_t, dll_lookup(handle, "ZIP_ReadEntry", path));
+ GetNextEntry = CAST_TO_FN_PTR(GetNextEntry_t, dll_lookup(handle, "ZIP_GetNextEntry", path));
+ Crc32 = CAST_TO_FN_PTR(Crc32_t, dll_lookup(handle, "ZIP_CRC32", path));
}
void ClassLoader::load_jimage_library() {
- // First make sure native library is loaded
- os::native_java_library();
- // Load jimage library
+ assert(JImageOpen == NULL, "should not load jimage library twice");
char path[JVM_MAXPATHLEN];
char ebuf[1024];
void* handle = NULL;
@@ -1017,27 +1015,15 @@
vm_exit_during_initialization("Unable to load jimage library", path);
}
- // Lookup jimage entry points
- JImageOpen = CAST_TO_FN_PTR(JImageOpen_t, os::dll_lookup(handle, "JIMAGE_Open"));
- guarantee(JImageOpen != NULL, "function JIMAGE_Open not found");
- JImageClose = CAST_TO_FN_PTR(JImageClose_t, os::dll_lookup(handle, "JIMAGE_Close"));
- guarantee(JImageClose != NULL, "function JIMAGE_Close not found");
- JImagePackageToModule = CAST_TO_FN_PTR(JImagePackageToModule_t, os::dll_lookup(handle, "JIMAGE_PackageToModule"));
- guarantee(JImagePackageToModule != NULL, "function JIMAGE_PackageToModule not found");
- JImageFindResource = CAST_TO_FN_PTR(JImageFindResource_t, os::dll_lookup(handle, "JIMAGE_FindResource"));
- guarantee(JImageFindResource != NULL, "function JIMAGE_FindResource not found");
- JImageGetResource = CAST_TO_FN_PTR(JImageGetResource_t, os::dll_lookup(handle, "JIMAGE_GetResource"));
- guarantee(JImageGetResource != NULL, "function JIMAGE_GetResource not found");
- JImageResourceIterator = CAST_TO_FN_PTR(JImageResourceIterator_t, os::dll_lookup(handle, "JIMAGE_ResourceIterator"));
- guarantee(JImageResourceIterator != NULL, "function JIMAGE_ResourceIterator not found");
-}
-
-jboolean ClassLoader::decompress(void *in, u8 inSize, void *out, u8 outSize, char **pmsg) {
- return (*ZipInflateFully)(in, inSize, out, outSize, pmsg);
+ JImageOpen = CAST_TO_FN_PTR(JImageOpen_t, dll_lookup(handle, "JIMAGE_Open", path));
+ JImageClose = CAST_TO_FN_PTR(JImageClose_t, dll_lookup(handle, "JIMAGE_Close", path));
+ JImagePackageToModule = CAST_TO_FN_PTR(JImagePackageToModule_t, dll_lookup(handle, "JIMAGE_PackageToModule", path));
+ JImageFindResource = CAST_TO_FN_PTR(JImageFindResource_t, dll_lookup(handle, "JIMAGE_FindResource", path));
+ JImageGetResource = CAST_TO_FN_PTR(JImageGetResource_t, dll_lookup(handle, "JIMAGE_GetResource", path));
+ JImageResourceIterator = CAST_TO_FN_PTR(JImageResourceIterator_t, dll_lookup(handle, "JIMAGE_ResourceIterator", path));
}
int ClassLoader::crc32(int crc, const char* buf, int len) {
- assert(Crc32 != NULL, "ZIP_CRC32 is not found");
return (*Crc32)(crc, (const jbyte*)buf, len);
}
@@ -1527,6 +1513,8 @@
"unsafeDefineClassCalls");
}
+ // lookup java library entry points
+ load_java_library();
// lookup zip library entry points
load_zip_library();
// jimage library entry points are loaded below, in lookup_vm_options
@@ -1652,24 +1640,17 @@
}
}
-
bool ClassLoader::get_canonical_path(const char* orig, char* out, int len) {
assert(orig != NULL && out != NULL && len > 0, "bad arguments");
- if (CanonicalizeEntry != NULL) {
- JavaThread* THREAD = JavaThread::current();
- JNIEnv* env = THREAD->jni_environment();
- ResourceMark rm(THREAD);
+ JavaThread* THREAD = JavaThread::current();
+ JNIEnv* env = THREAD->jni_environment();
+ ResourceMark rm(THREAD);
- // os::native_path writes into orig_copy
- char* orig_copy = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, strlen(orig)+1);
- strcpy(orig_copy, orig);
- if ((CanonicalizeEntry)(env, os::native_path(orig_copy), out, len) < 0) {
- return false;
- }
- } else {
- // On JDK 1.2.2 the Canonicalize does not exist, so just do nothing
- strncpy(out, orig, len);
- out[len - 1] = '\0';
+ // os::native_path writes into orig_copy
+ char* orig_copy = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, strlen(orig)+1);
+ strcpy(orig_copy, orig);
+ if ((CanonicalizeEntry)(env, os::native_path(orig_copy), out, len) < 0) {
+ return false;
}
return true;
}
--- a/src/hotspot/share/classfile/classLoader.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/classLoader.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -249,6 +249,8 @@
static void setup_patch_mod_entries();
static void create_javabase();
+ static void* dll_lookup(void* lib, const char* name, const char* path);
+ static void load_java_library();
static void load_zip_library();
static void load_jimage_library();
@@ -275,7 +277,6 @@
static PackageEntry* get_package_entry(const char* class_name, ClassLoaderData* loader_data, TRAPS);
public:
- static jboolean decompress(void *in, u8 inSize, void *out, u8 outSize, char **pmsg);
static int crc32(int crc, const char* buf, int len);
static bool update_class_path_entry_list(const char *path,
bool check_for_duplicates,
--- a/src/hotspot/share/classfile/javaClasses.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/javaClasses.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -56,6 +56,7 @@
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
+#include "runtime/init.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
@@ -1634,6 +1635,7 @@
int java_lang_Thread::_inheritedAccessControlContext_offset = 0;
int java_lang_Thread::_priority_offset = 0;
int java_lang_Thread::_eetop_offset = 0;
+int java_lang_Thread::_interrupted_offset = 0;
int java_lang_Thread::_daemon_offset = 0;
int java_lang_Thread::_stillborn_offset = 0;
int java_lang_Thread::_stackSize_offset = 0;
@@ -1649,6 +1651,7 @@
macro(_priority_offset, k, vmSymbols::priority_name(), int_signature, false); \
macro(_daemon_offset, k, vmSymbols::daemon_name(), bool_signature, false); \
macro(_eetop_offset, k, "eetop", long_signature, false); \
+ macro(_interrupted_offset, k, "interrupted", bool_signature, false); \
macro(_stillborn_offset, k, "stillborn", bool_signature, false); \
macro(_stackSize_offset, k, "stackSize", long_signature, false); \
macro(_tid_offset, k, "tid", long_signature, false); \
@@ -1677,6 +1680,14 @@
java_thread->address_field_put(_eetop_offset, (address)thread);
}
+bool java_lang_Thread::interrupted(oop java_thread) {
+ return java_thread->bool_field_volatile(_interrupted_offset);
+}
+
+void java_lang_Thread::set_interrupted(oop java_thread, bool val) {
+ java_thread->bool_field_put_volatile(_interrupted_offset, val);
+}
+
oop java_lang_Thread::name(oop java_thread) {
return java_thread->obj_field(_name_offset);
@@ -1962,6 +1973,8 @@
// This class provides a simple wrapper over the internal structure of
// exception backtrace to insulate users of the backtrace from needing
// to know what it looks like.
+// The code of this class is not GC safe. Allocations can only happen
+// in expand().
class BacktraceBuilder: public StackObj {
friend class BacktraceIterator;
private:
@@ -2110,10 +2123,14 @@
void set_has_hidden_top_frame(TRAPS) {
if (_has_hidden_top_frame == NULL) {
- jvalue prim;
- prim.z = 1;
- PauseNoSafepointVerifier pnsv(&_nsv);
- _has_hidden_top_frame = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK);
+ // It would be nice to add java/lang/Boolean::TRUE here
+ // to indicate that this backtrace has a hidden top frame.
+ // But this code is used before TRUE is allocated.
+ // Therefor let's just use an arbitrary legal oop
+ // available right here. We only test for != null
+ // anyways. _methods is a short[].
+ assert(_methods != NULL, "we need a legal oop");
+ _has_hidden_top_frame = _methods;
_head->obj_at_put(trace_hidden_offset, _has_hidden_top_frame);
}
}
--- a/src/hotspot/share/classfile/javaClasses.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/javaClasses.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -373,6 +373,7 @@
static int _inheritedAccessControlContext_offset;
static int _priority_offset;
static int _eetop_offset;
+ static int _interrupted_offset;
static int _daemon_offset;
static int _stillborn_offset;
static int _stackSize_offset;
@@ -391,6 +392,9 @@
static JavaThread* thread(oop java_thread);
// Set JavaThread for instance
static void set_thread(oop java_thread, JavaThread* thread);
+ // Interrupted status
+ static bool interrupted(oop java_thread);
+ static void set_interrupted(oop java_thread, bool val);
// Name
static oop name(oop java_thread);
static void set_name(oop java_thread, oop name);
--- a/src/hotspot/share/classfile/vmSymbols.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/vmSymbols.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -568,7 +568,6 @@
if (!InlineClassNatives) return true;
break;
case vmIntrinsics::_currentThread:
- case vmIntrinsics::_isInterrupted:
if (!InlineThreadNatives) return true;
break;
case vmIntrinsics::_floatToRawIntBits:
@@ -787,9 +786,6 @@
#endif // COMPILER1
#ifdef COMPILER2
case vmIntrinsics::_clone:
-#if INCLUDE_ZGC
- if (UseZGC) return true;
-#endif
case vmIntrinsics::_copyOf:
case vmIntrinsics::_copyOfRange:
// These intrinsics use both the objectcopy and the arraycopy
--- a/src/hotspot/share/classfile/vmSymbols.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/classfile/vmSymbols.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -862,9 +862,6 @@
do_intrinsic(_arraycopy, java_lang_System, arraycopy_name, arraycopy_signature, F_S) \
do_name( arraycopy_name, "arraycopy") \
do_signature(arraycopy_signature, "(Ljava/lang/Object;ILjava/lang/Object;II)V") \
- do_intrinsic(_isInterrupted, java_lang_Thread, isInterrupted_name, isInterrupted_signature, F_R) \
- do_name( isInterrupted_name, "isInterrupted") \
- do_signature(isInterrupted_signature, "(Z)Z") \
do_intrinsic(_currentThread, java_lang_Thread, currentThread_name, currentThread_signature, F_S) \
do_name( currentThread_name, "currentThread") \
do_signature(currentThread_signature, "()Ljava/lang/Thread;") \
--- a/src/hotspot/share/compiler/compilerDefinitions.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/compiler/compilerDefinitions.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -37,6 +37,32 @@
"jvmci"
};
+#ifdef TIERED
+bool CompilationModeFlag::_quick_only = false;
+bool CompilationModeFlag::_high_only = false;
+bool CompilationModeFlag::_high_only_quick_internal = false;
+
+
+bool CompilationModeFlag::initialize() {
+ if (CompilationMode != NULL) {
+ if (strcmp(CompilationMode, "default") == 0) {
+ // Do nothing, just support the "default" keyword.
+ } else if (strcmp(CompilationMode, "quick-only") == 0) {
+ _quick_only = true;
+ } else if (strcmp(CompilationMode, "high-only") == 0) {
+ _high_only = true;
+ } else if (strcmp(CompilationMode, "high-only-quick-internal") == 0) {
+ _high_only_quick_internal = true;
+ } else {
+ jio_fprintf(defaultStream::error_stream(), "Unsupported compilation mode '%s', supported modes are: quick-only, high-only, high-only-quick-internal\n", CompilationMode);
+ return false;
+ }
+ }
+ return true;
+}
+
+#endif
+
#if defined(COMPILER2)
CompLevel CompLevel_highest_tier = CompLevel_full_optimization; // pure C2 and tiered or JVMCI and tiered
#elif defined(COMPILER1)
@@ -185,7 +211,6 @@
}
}
-#endif // TIERED
void CompilerConfig::set_tiered_flags() {
// Increase the code cache size - tiered compiles a lot more.
@@ -208,6 +233,12 @@
vm_exit_during_initialization("Negative value specified for CompileThresholdScaling", NULL);
}
+ if (CompilationModeFlag::disable_intermediate()) {
+ if (FLAG_IS_DEFAULT(Tier0ProfilingStartPercentage)) {
+ FLAG_SET_DEFAULT(Tier0ProfilingStartPercentage, 33);
+ }
+ }
+
// Scale tiered compilation thresholds.
// CompileThresholdScaling == 0.0 is equivalent to -Xint and leaves compilation thresholds unchanged.
if (!FLAG_IS_DEFAULT(CompileThresholdScaling) && CompileThresholdScaling > 0.0) {
@@ -234,9 +265,34 @@
FLAG_SET_ERGO(Tier4MinInvocationThreshold, scaled_compile_threshold(Tier4MinInvocationThreshold));
FLAG_SET_ERGO(Tier4CompileThreshold, scaled_compile_threshold(Tier4CompileThreshold));
FLAG_SET_ERGO(Tier4BackEdgeThreshold, scaled_compile_threshold(Tier4BackEdgeThreshold));
+
+ if (CompilationModeFlag::disable_intermediate()) {
+ FLAG_SET_ERGO(Tier40InvocationThreshold, scaled_compile_threshold(Tier40InvocationThreshold));
+ FLAG_SET_ERGO(Tier40MinInvocationThreshold, scaled_compile_threshold(Tier40MinInvocationThreshold));
+ FLAG_SET_ERGO(Tier40CompileThreshold, scaled_compile_threshold(Tier40CompileThreshold));
+ FLAG_SET_ERGO(Tier40BackEdgeThreshold, scaled_compile_threshold(Tier40BackEdgeThreshold));
+ }
+
+#if INCLUDE_AOT
+ if (UseAOT) {
+ FLAG_SET_ERGO(Tier3AOTInvocationThreshold, scaled_compile_threshold(Tier3AOTInvocationThreshold));
+ FLAG_SET_ERGO(Tier3AOTMinInvocationThreshold, scaled_compile_threshold(Tier3AOTMinInvocationThreshold));
+ FLAG_SET_ERGO(Tier3AOTCompileThreshold, scaled_compile_threshold(Tier3AOTCompileThreshold));
+ FLAG_SET_ERGO(Tier3AOTBackEdgeThreshold, scaled_compile_threshold(Tier3AOTBackEdgeThreshold));
+
+ if (CompilationModeFlag::disable_intermediate()) {
+ FLAG_SET_ERGO(Tier0AOTInvocationThreshold, scaled_compile_threshold(Tier0AOTInvocationThreshold));
+ FLAG_SET_ERGO(Tier0AOTMinInvocationThreshold, scaled_compile_threshold(Tier0AOTMinInvocationThreshold));
+ FLAG_SET_ERGO(Tier0AOTCompileThreshold, scaled_compile_threshold(Tier0AOTCompileThreshold));
+ FLAG_SET_ERGO(Tier0AOTBackEdgeThreshold, scaled_compile_threshold(Tier0AOTBackEdgeThreshold));
+ }
+ }
+#endif // INCLUDE_AOT
}
}
+#endif // TIERED
+
#if INCLUDE_JVMCI
void set_jvmci_specific_flags() {
if (UseJVMCICompiler) {
@@ -245,11 +301,6 @@
if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
FLAG_SET_DEFAULT(TypeProfileWidth, 8);
}
- if (TieredStopAtLevel != CompLevel_full_optimization) {
- // Currently JVMCI compiler can only work at the full optimization level
- warning("forcing TieredStopAtLevel to full optimization because JVMCI is enabled");
- FLAG_SET_ERGO(TieredStopAtLevel, CompLevel_full_optimization);
- }
if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
FLAG_SET_DEFAULT(TypeProfileLevel, 0);
}
@@ -270,11 +321,26 @@
}
}
} else {
+#ifdef TIERED
+ if (!TieredCompilation) {
+ warning("Disabling tiered compilation with non-native JVMCI compiler is not recommended. "
+ "Turning on tiered compilation and disabling intermediate compilation levels instead. ");
+ FLAG_SET_ERGO(TieredCompilation, true);
+ if (CompilationModeFlag::normal()) {
+ CompilationModeFlag::set_high_only_quick_internal(true);
+ }
+ if (CICompilerCount < 2 && CompilationModeFlag::quick_internal()) {
+ warning("Increasing number of compiler threads for JVMCI compiler.");
+ FLAG_SET_ERGO(CICompilerCount, 2);
+ }
+ }
+#else // TIERED
// Adjust the on stack replacement percentage to avoid early
// OSR compilations while JVMCI itself is warming up
if (FLAG_IS_DEFAULT(OnStackReplacePercentage)) {
FLAG_SET_DEFAULT(OnStackReplacePercentage, 933);
}
+#endif // !TIERED
// JVMCI needs values not less than defaults
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
FLAG_SET_DEFAULT(ReservedCodeCacheSize, MAX2(64*M, ReservedCodeCacheSize));
@@ -409,9 +475,12 @@
set_jvmci_specific_flags();
#endif
+#ifdef TIERED
if (TieredCompilation) {
set_tiered_flags();
- } else {
+ } else
+#endif
+ {
// Scale CompileThreshold
// CompileThresholdScaling == 0.0 is equivalent to -Xint and leaves CompileThreshold unchanged.
if (!FLAG_IS_DEFAULT(CompileThresholdScaling) && CompileThresholdScaling > 0.0) {
--- a/src/hotspot/share/compiler/compilerDefinitions.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/compiler/compilerDefinitions.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -62,6 +62,26 @@
CompLevel_full_optimization = 4 // C2 or JVMCI
};
+#ifdef TIERED
+class CompilationModeFlag : AllStatic {
+ static bool _quick_only;
+ static bool _high_only;
+ static bool _high_only_quick_internal;
+
+public:
+ static bool initialize();
+ static bool normal() { return !quick_only() && !high_only() && !high_only_quick_internal(); }
+ static bool quick_only() { return _quick_only; }
+ static bool high_only() { return _high_only; }
+ static bool high_only_quick_internal() { return _high_only_quick_internal; }
+
+ static bool disable_intermediate() { return high_only() || high_only_quick_internal(); }
+ static bool quick_internal() { return !high_only(); }
+
+ static void set_high_only_quick_internal(bool x) { _high_only_quick_internal = x; }
+};
+#endif
+
extern CompLevel CompLevel_highest_tier;
extern CompLevel CompLevel_initial_compile;
@@ -129,7 +149,7 @@
static void ergo_initialize();
private:
- static void set_tiered_flags();
+ TIERED_ONLY(static void set_tiered_flags();)
};
#endif // SHARE_COMPILER_COMPILERDEFINITIONS_HPP
--- a/src/hotspot/share/compiler/tieredThresholdPolicy.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/compiler/tieredThresholdPolicy.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -28,6 +28,7 @@
#include "compiler/tieredThresholdPolicy.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/arguments.hpp"
+#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/safepointVerifiers.hpp"
@@ -42,43 +43,61 @@
#include "c1/c1_Compiler.hpp"
#include "opto/c2compiler.hpp"
-template<CompLevel level>
-bool TieredThresholdPolicy::call_predicate_helper(int i, int b, double scale, Method* method) {
+bool TieredThresholdPolicy::call_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale) {
double threshold_scaling;
if (CompilerOracle::has_option_value(method, "CompileThresholdScaling", threshold_scaling)) {
scale *= threshold_scaling;
}
- switch(level) {
+ switch(cur_level) {
case CompLevel_aot:
- return (i >= Tier3AOTInvocationThreshold * scale) ||
- (i >= Tier3AOTMinInvocationThreshold * scale && i + b >= Tier3AOTCompileThreshold * scale);
+ if (CompilationModeFlag::disable_intermediate()) {
+ return (i >= Tier0AOTInvocationThreshold * scale) ||
+ (i >= Tier0AOTMinInvocationThreshold * scale && i + b >= Tier0AOTCompileThreshold * scale);
+ } else {
+ return (i >= Tier3AOTInvocationThreshold * scale) ||
+ (i >= Tier3AOTMinInvocationThreshold * scale && i + b >= Tier3AOTCompileThreshold * scale);
+ }
case CompLevel_none:
+ if (CompilationModeFlag::disable_intermediate()) {
+ return (i >= Tier40InvocationThreshold * scale) ||
+ (i >= Tier40MinInvocationThreshold * scale && i + b >= Tier40CompileThreshold * scale);
+ }
+ // Fall through
case CompLevel_limited_profile:
return (i >= Tier3InvocationThreshold * scale) ||
(i >= Tier3MinInvocationThreshold * scale && i + b >= Tier3CompileThreshold * scale);
case CompLevel_full_profile:
return (i >= Tier4InvocationThreshold * scale) ||
(i >= Tier4MinInvocationThreshold * scale && i + b >= Tier4CompileThreshold * scale);
+ default:
+ return true;
}
- return true;
}
-template<CompLevel level>
-bool TieredThresholdPolicy::loop_predicate_helper(int i, int b, double scale, Method* method) {
+bool TieredThresholdPolicy::loop_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale) {
double threshold_scaling;
if (CompilerOracle::has_option_value(method, "CompileThresholdScaling", threshold_scaling)) {
scale *= threshold_scaling;
}
- switch(level) {
+ switch(cur_level) {
case CompLevel_aot:
- return b >= Tier3AOTBackEdgeThreshold * scale;
+ if (CompilationModeFlag::disable_intermediate()) {
+ return b >= Tier0AOTBackEdgeThreshold * scale;
+ } else {
+ return b >= Tier3AOTBackEdgeThreshold * scale;
+ }
case CompLevel_none:
+ if (CompilationModeFlag::disable_intermediate()) {
+ return b >= Tier40BackEdgeThreshold * scale;
+ }
+ // Fall through
case CompLevel_limited_profile:
return b >= Tier3BackEdgeThreshold * scale;
case CompLevel_full_profile:
return b >= Tier4BackEdgeThreshold * scale;
+ default:
+ return true;
}
- return true;
}
// Simple methods are as good being compiled with C1 as C2.
@@ -91,18 +110,17 @@
return false;
}
-bool TieredThresholdPolicy::should_compile_at_level_simple(Method* method) {
- if (TieredThresholdPolicy::is_trivial(method)) {
- return true;
- }
+bool TieredThresholdPolicy::force_comp_at_level_simple(Method* method) {
+ if (CompilationModeFlag::quick_internal()) {
#if INCLUDE_JVMCI
- if (UseJVMCICompiler) {
- AbstractCompiler* comp = CompileBroker::compiler(CompLevel_full_optimization);
- if (comp != NULL && comp->is_jvmci() && ((JVMCICompiler*) comp)->force_comp_at_level_simple(method)) {
- return true;
+ if (UseJVMCICompiler) {
+ AbstractCompiler* comp = CompileBroker::compiler(CompLevel_full_optimization);
+ if (comp != NULL && comp->is_jvmci() && ((JVMCICompiler*) comp)->force_comp_at_level_simple(method)) {
+ return true;
+ }
}
+#endif
}
-#endif
return false;
}
@@ -181,7 +199,12 @@
tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
CompileBroker::queue_size(CompLevel_full_optimization));
- print_specific(type, mh, imh, bci, level);
+ tty->print(" rate=");
+ if (mh->prev_time() == 0) tty->print("n/a");
+ else tty->print("%f", mh->rate());
+
+ tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
+ threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
if (type != COMPILE) {
print_counters("", mh);
@@ -216,9 +239,11 @@
tty->print_cr("]");
}
+
void TieredThresholdPolicy::initialize() {
int count = CICompilerCount;
- bool c1_only = TieredStopAtLevel < CompLevel_full_optimization;
+ bool c1_only = TieredStopAtLevel < CompLevel_full_optimization || CompilationModeFlag::quick_only();
+ bool c2_only = CompilationModeFlag::high_only();
#ifdef _LP64
// Turn on ergonomic compiler count selection
if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) {
@@ -257,6 +282,8 @@
if (c1_only) {
// No C2 compiler thread required
set_c1_count(count);
+ } else if (c2_only) {
+ set_c2_count(count);
} else {
set_c1_count(MAX2(count / 3, 1));
set_c2_count(MAX2(count - c1_count(), 1));
@@ -413,7 +440,7 @@
method_back_branch_event(method, inlinee, bci, comp_level, nm, thread);
// Check if event led to a higher level OSR compilation
CompLevel expected_comp_level = comp_level;
- if (inlinee->is_not_osr_compilable(expected_comp_level)) {
+ if (!CompilationModeFlag::disable_intermediate() && inlinee->is_not_osr_compilable(expected_comp_level)) {
// It's not possble to reach the expected level so fall back to simple.
expected_comp_level = CompLevel_simple;
}
@@ -430,7 +457,25 @@
// Check if the method can be compiled, change level if necessary
void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
assert(level <= TieredStopAtLevel, "Invalid compilation level");
+ if (CompilationModeFlag::quick_only()) {
+ assert(level <= CompLevel_simple, "Invalid compilation level");
+ } else if (CompilationModeFlag::disable_intermediate()) {
+ assert(level != CompLevel_full_profile && level != CompLevel_limited_profile, "C1 profiling levels shouldn't be used with intermediate levels disabled");
+ }
+
if (level == CompLevel_none) {
+ if (mh->has_compiled_code()) {
+ // Happens when we switch from AOT to interpreter to profile.
+ MutexLocker ml(Compile_lock);
+ NoSafepointVerifier nsv;
+ if (mh->has_compiled_code()) {
+ mh->code()->make_not_used();
+ }
+ // Deoptimize immediately (we don't have to wait for a compile).
+ RegisterMap map(thread, false);
+ frame fr = thread->last_frame().sender(&map);
+ Deoptimization::deoptimize_frame(thread, fr.id());
+ }
return;
}
if (level == CompLevel_aot) {
@@ -452,26 +497,28 @@
return;
}
- // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
- // in the interpreter and then compile with C2 (the transition function will request that,
- // see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
- // pure C1.
- if ((bci == InvocationEntryBci && !can_be_compiled(mh, level))) {
- if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) {
- compile(mh, bci, CompLevel_simple, thread);
+ if (!CompilationModeFlag::disable_intermediate()) {
+ // Check if the method can be compiled. If it cannot be compiled with C1, continue profiling
+ // in the interpreter and then compile with C2 (the transition function will request that,
+ // see common() ). If the method cannot be compiled with C2 but still can with C1, compile it with
+ // pure C1.
+ if ((bci == InvocationEntryBci && !can_be_compiled(mh, level))) {
+ if (level == CompLevel_full_optimization && can_be_compiled(mh, CompLevel_simple)) {
+ compile(mh, bci, CompLevel_simple, thread);
+ }
+ return;
}
- return;
- }
- if ((bci != InvocationEntryBci && !can_be_osr_compiled(mh, level))) {
- if (level == CompLevel_full_optimization && can_be_osr_compiled(mh, CompLevel_simple)) {
- nmethod* osr_nm = mh->lookup_osr_nmethod_for(bci, CompLevel_simple, false);
- if (osr_nm != NULL && osr_nm->comp_level() > CompLevel_simple) {
- // Invalidate the existing OSR nmethod so that a compile at CompLevel_simple is permitted.
- osr_nm->make_not_entrant();
+ if ((bci != InvocationEntryBci && !can_be_osr_compiled(mh, level))) {
+ if (level == CompLevel_full_optimization && can_be_osr_compiled(mh, CompLevel_simple)) {
+ nmethod* osr_nm = mh->lookup_osr_nmethod_for(bci, CompLevel_simple, false);
+ if (osr_nm != NULL && osr_nm->comp_level() > CompLevel_simple) {
+ // Invalidate the existing OSR nmethod so that a compile at CompLevel_simple is permitted.
+ osr_nm->make_not_entrant();
+ }
+ compile(mh, bci, CompLevel_simple, thread);
}
- compile(mh, bci, CompLevel_simple, thread);
+ return;
}
- return;
}
if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) {
return;
@@ -480,29 +527,12 @@
if (PrintTieredEvents) {
print_event(COMPILE, mh, mh, bci, level);
}
- submit_compile(mh, bci, level, thread);
+ int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
+ update_rate(os::javaTimeMillis(), mh());
+ CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, thread);
}
}
-// Update the rate and submit compile
-void TieredThresholdPolicy::submit_compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
- int hot_count = (bci == InvocationEntryBci) ? mh->invocation_count() : mh->backedge_count();
- update_rate(os::javaTimeMillis(), mh());
- CompileBroker::compile_method(mh, bci, level, mh, hot_count, CompileTask::Reason_Tiered, thread);
-}
-
-// Print an event.
-void TieredThresholdPolicy::print_specific(EventType type, const methodHandle& mh, const methodHandle& imh,
- int bci, CompLevel level) {
- tty->print(" rate=");
- if (mh->prev_time() == 0) tty->print("n/a");
- else tty->print("%f", mh->rate());
-
- tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
- threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
-
-}
-
// update_rate() is called from select_task() while holding a compile queue lock.
void TieredThresholdPolicy::update_rate(jlong t, Method* m) {
// Skip update if counters are absent.
@@ -585,27 +615,30 @@
if (mdo != NULL) {
int i = mdo->invocation_count_delta();
int b = mdo->backedge_count_delta();
- return call_predicate_helper<CompLevel_full_profile>(i, b, 1, method);
+ return call_predicate_helper(method, CompilationModeFlag::disable_intermediate() ? CompLevel_none : CompLevel_full_profile, i, b, 1);
}
return false;
}
double TieredThresholdPolicy::threshold_scale(CompLevel level, int feedback_k) {
- double queue_size = CompileBroker::queue_size(level);
int comp_count = compiler_count(level);
- double k = queue_size / (feedback_k * comp_count) + 1;
+ if (comp_count > 0) {
+ double queue_size = CompileBroker::queue_size(level);
+ double k = queue_size / (feedback_k * comp_count) + 1;
- // Increase C1 compile threshold when the code cache is filled more
- // than specified by IncreaseFirstTierCompileThresholdAt percentage.
- // The main intention is to keep enough free space for C2 compiled code
- // to achieve peak performance if the code cache is under stress.
- if ((TieredStopAtLevel == CompLevel_full_optimization) && (level != CompLevel_full_optimization)) {
- double current_reverse_free_ratio = CodeCache::reverse_free_ratio(CodeCache::get_code_blob_type(level));
- if (current_reverse_free_ratio > _increase_threshold_at_ratio) {
- k *= exp(current_reverse_free_ratio - _increase_threshold_at_ratio);
+ // Increase C1 compile threshold when the code cache is filled more
+ // than specified by IncreaseFirstTierCompileThresholdAt percentage.
+ // The main intention is to keep enough free space for C2 compiled code
+ // to achieve peak performance if the code cache is under stress.
+ if (!CompilationModeFlag::disable_intermediate() && TieredStopAtLevel == CompLevel_full_optimization && level != CompLevel_full_optimization) {
+ double current_reverse_free_ratio = CodeCache::reverse_free_ratio(CodeCache::get_code_blob_type(level));
+ if (current_reverse_free_ratio > _increase_threshold_at_ratio) {
+ k *= exp(current_reverse_free_ratio - _increase_threshold_at_ratio);
+ }
}
+ return k;
}
- return k;
+ return 1;
}
// Call and loop predicates determine whether a transition to a higher
@@ -615,55 +648,71 @@
// how many methods per compiler thread can be in the queue before
// the threshold values double.
bool TieredThresholdPolicy::loop_predicate(int i, int b, CompLevel cur_level, Method* method) {
+ double k = 1;
switch(cur_level) {
case CompLevel_aot: {
- double k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
- return loop_predicate_helper<CompLevel_aot>(i, b, k, method);
+ k = CompilationModeFlag::disable_intermediate() ? 1 : threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
+ break;
}
- case CompLevel_none:
+ case CompLevel_none: {
+ if (CompilationModeFlag::disable_intermediate()) {
+ k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
+ break;
+ }
+ }
+ // Fall through
case CompLevel_limited_profile: {
- double k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
- return loop_predicate_helper<CompLevel_none>(i, b, k, method);
+ k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
+ break;
}
case CompLevel_full_profile: {
- double k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
- return loop_predicate_helper<CompLevel_full_profile>(i, b, k, method);
+ k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
+ break;
}
default:
return true;
}
+ return loop_predicate_helper(method, cur_level, i, b, k);
}
bool TieredThresholdPolicy::call_predicate(int i, int b, CompLevel cur_level, Method* method) {
+ double k = 1;
switch(cur_level) {
case CompLevel_aot: {
- double k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
- return call_predicate_helper<CompLevel_aot>(i, b, k, method);
+ k = CompilationModeFlag::disable_intermediate() ? 1 : threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
+ break;
}
- case CompLevel_none:
+ case CompLevel_none: {
+ if (CompilationModeFlag::disable_intermediate()) {
+ k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
+ break;
+ }
+ }
+ // Fall through
case CompLevel_limited_profile: {
- double k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
- return call_predicate_helper<CompLevel_none>(i, b, k, method);
+ k = threshold_scale(CompLevel_full_profile, Tier3LoadFeedback);
+ break;
}
case CompLevel_full_profile: {
- double k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
- return call_predicate_helper<CompLevel_full_profile>(i, b, k, method);
+ k = threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback);
+ break;
}
default:
return true;
}
+ return call_predicate_helper(method, cur_level, i, b, k);
}
// Determine is a method is mature.
bool TieredThresholdPolicy::is_mature(Method* method) {
- if (should_compile_at_level_simple(method)) return true;
+ if (is_trivial(method) || force_comp_at_level_simple(method)) return true;
MethodData* mdo = method->method_data();
if (mdo != NULL) {
int i = mdo->invocation_count();
int b = mdo->backedge_count();
double k = ProfileMaturityPercentage / 100.0;
- return call_predicate_helper<CompLevel_full_profile>(i, b, k, method) ||
- loop_predicate_helper<CompLevel_full_profile>(i, b, k, method);
+ CompLevel main_profile_level = CompilationModeFlag::disable_intermediate() ? CompLevel_none : CompLevel_full_profile;
+ return call_predicate_helper(method, main_profile_level, i, b, k) || loop_predicate_helper(method, main_profile_level, i, b, k);
}
return false;
}
@@ -672,13 +721,16 @@
// start profiling without waiting for the compiled method to arrive.
// We also take the load on compilers into the account.
bool TieredThresholdPolicy::should_create_mdo(Method* method, CompLevel cur_level) {
- if (cur_level == CompLevel_none &&
- CompileBroker::queue_size(CompLevel_full_optimization) <=
- Tier3DelayOn * compiler_count(CompLevel_full_optimization)) {
- int i = method->invocation_count();
- int b = method->backedge_count();
- double k = Tier0ProfilingStartPercentage / 100.0;
- return call_predicate_helper<CompLevel_none>(i, b, k, method) || loop_predicate_helper<CompLevel_none>(i, b, k, method);
+ if (cur_level != CompLevel_none || force_comp_at_level_simple(method)) {
+ return false;
+ }
+ int i = method->invocation_count();
+ int b = method->backedge_count();
+ double k = Tier0ProfilingStartPercentage / 100.0;
+
+ // If the top level compiler is not keeping up, delay profiling.
+ if (CompileBroker::queue_size(CompLevel_full_optimization) <= (CompilationModeFlag::disable_intermediate() ? Tier0Delay : Tier3DelayOn) * compiler_count(CompLevel_full_optimization)) {
+ return call_predicate_helper(method, CompLevel_none, i, b, k) || loop_predicate_helper(method, CompLevel_none, i, b, k);
}
return false;
}
@@ -714,7 +766,7 @@
* 1 - pure C1 (CompLevel_simple)
* 2 - C1 with invocation and backedge counting (CompLevel_limited_profile)
* 3 - C1 with full profiling (CompLevel_full_profile)
- * 4 - C2 (CompLevel_full_optimization)
+ * 4 - C2 or Graal (CompLevel_full_optimization)
*
* Common state transition patterns:
* a. 0 -> 3 -> 4.
@@ -752,106 +804,129 @@
int i = method->invocation_count();
int b = method->backedge_count();
- if (should_compile_at_level_simple(method)) {
+ if (force_comp_at_level_simple(method)) {
next_level = CompLevel_simple;
} else {
- switch(cur_level) {
+ if (!CompilationModeFlag::disable_intermediate() && is_trivial(method)) {
+ next_level = CompLevel_simple;
+ } else {
+ switch(cur_level) {
default: break;
- case CompLevel_aot: {
- // If we were at full profile level, would we switch to full opt?
- if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
- next_level = CompLevel_full_optimization;
- } else if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
- Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
- (this->*p)(i, b, cur_level, method))) {
- next_level = CompLevel_full_profile;
- }
- }
- break;
- case CompLevel_none:
- // If we were at full profile level, would we switch to full opt?
- if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
- next_level = CompLevel_full_optimization;
- } else if ((this->*p)(i, b, cur_level, method)) {
-#if INCLUDE_JVMCI
- if (EnableJVMCI && UseJVMCICompiler) {
- // Since JVMCI takes a while to warm up, its queue inevitably backs up during
- // early VM execution. As of 2014-06-13, JVMCI's inliner assumes that the root
- // compilation method and all potential inlinees have mature profiles (which
- // includes type profiling). If it sees immature profiles, JVMCI's inliner
- // can perform pathologically bad (e.g., causing OutOfMemoryErrors due to
- // exploring/inlining too many graphs). Since a rewrite of the inliner is
- // in progress, we simply disable the dialing back heuristic for now and will
- // revisit this decision once the new inliner is completed.
- next_level = CompLevel_full_profile;
- } else
-#endif
- {
- // C1-generated fully profiled code is about 30% slower than the limited profile
- // code that has only invocation and backedge counters. The observation is that
- // if C2 queue is large enough we can spend too much time in the fully profiled code
- // while waiting for C2 to pick the method from the queue. To alleviate this problem
- // we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long
- // we choose to compile a limited profiled version and then recompile with full profiling
- // when the load on C2 goes down.
- if (!disable_feedback && CompileBroker::queue_size(CompLevel_full_optimization) >
- Tier3DelayOn * compiler_count(CompLevel_full_optimization)) {
- next_level = CompLevel_limited_profile;
- } else {
+ case CompLevel_aot:
+ if (CompilationModeFlag::disable_intermediate()) {
+ if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
+ Tier0Delay * compiler_count(CompLevel_full_optimization) &&
+ (this->*p)(i, b, cur_level, method))) {
+ next_level = CompLevel_none;
+ }
+ } else {
+ // If we were at full profile level, would we switch to full opt?
+ if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
+ next_level = CompLevel_full_optimization;
+ } else if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
+ Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
+ (this->*p)(i, b, cur_level, method))) {
next_level = CompLevel_full_profile;
}
}
- }
- break;
- case CompLevel_limited_profile:
- if (is_method_profiled(method)) {
- // Special case: we got here because this method was fully profiled in the interpreter.
- next_level = CompLevel_full_optimization;
- } else {
- MethodData* mdo = method->method_data();
- if (mdo != NULL) {
- if (mdo->would_profile()) {
+ break;
+ case CompLevel_none:
+ if (CompilationModeFlag::disable_intermediate()) {
+ MethodData* mdo = method->method_data();
+ if (mdo != NULL) {
+ // If mdo exists that means we are in a normal profiling mode.
+ int mdo_i = mdo->invocation_count_delta();
+ int mdo_b = mdo->backedge_count_delta();
+ if ((this->*p)(mdo_i, mdo_b, cur_level, method)) {
+ next_level = CompLevel_full_optimization;
+ }
+ }
+ } else {
+ // If we were at full profile level, would we switch to full opt?
+ if (common(p, method, CompLevel_full_profile, disable_feedback) == CompLevel_full_optimization) {
+ next_level = CompLevel_full_optimization;
+ } else if ((this->*p)(i, b, cur_level, method)) {
+ #if INCLUDE_JVMCI
+ if (EnableJVMCI && UseJVMCICompiler) {
+ // Since JVMCI takes a while to warm up, its queue inevitably backs up during
+ // early VM execution. As of 2014-06-13, JVMCI's inliner assumes that the root
+ // compilation method and all potential inlinees have mature profiles (which
+ // includes type profiling). If it sees immature profiles, JVMCI's inliner
+ // can perform pathologically bad (e.g., causing OutOfMemoryErrors due to
+ // exploring/inlining too many graphs). Since a rewrite of the inliner is
+ // in progress, we simply disable the dialing back heuristic for now and will
+ // revisit this decision once the new inliner is completed.
+ next_level = CompLevel_full_profile;
+ } else
+ #endif
+ {
+ // C1-generated fully profiled code is about 30% slower than the limited profile
+ // code that has only invocation and backedge counters. The observation is that
+ // if C2 queue is large enough we can spend too much time in the fully profiled code
+ // while waiting for C2 to pick the method from the queue. To alleviate this problem
+ // we introduce a feedback on the C2 queue size. If the C2 queue is sufficiently long
+ // we choose to compile a limited profiled version and then recompile with full profiling
+ // when the load on C2 goes down.
+ if (!disable_feedback && CompileBroker::queue_size(CompLevel_full_optimization) >
+ Tier3DelayOn * compiler_count(CompLevel_full_optimization)) {
+ next_level = CompLevel_limited_profile;
+ } else {
+ next_level = CompLevel_full_profile;
+ }
+ }
+ }
+ }
+ break;
+ case CompLevel_limited_profile:
+ if (is_method_profiled(method)) {
+ // Special case: we got here because this method was fully profiled in the interpreter.
+ next_level = CompLevel_full_optimization;
+ } else {
+ MethodData* mdo = method->method_data();
+ if (mdo != NULL) {
+ if (mdo->would_profile()) {
+ if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
+ Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
+ (this->*p)(i, b, cur_level, method))) {
+ next_level = CompLevel_full_profile;
+ }
+ } else {
+ next_level = CompLevel_full_optimization;
+ }
+ } else {
+ // If there is no MDO we need to profile
if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
(this->*p)(i, b, cur_level, method))) {
next_level = CompLevel_full_profile;
}
- } else {
- next_level = CompLevel_full_optimization;
- }
- } else {
- // If there is no MDO we need to profile
- if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <=
- Tier3DelayOff * compiler_count(CompLevel_full_optimization) &&
- (this->*p)(i, b, cur_level, method))) {
- next_level = CompLevel_full_profile;
}
}
- }
- break;
- case CompLevel_full_profile:
- {
- MethodData* mdo = method->method_data();
- if (mdo != NULL) {
- if (mdo->would_profile()) {
- int mdo_i = mdo->invocation_count_delta();
- int mdo_b = mdo->backedge_count_delta();
- if ((this->*p)(mdo_i, mdo_b, cur_level, method)) {
+ break;
+ case CompLevel_full_profile:
+ {
+ MethodData* mdo = method->method_data();
+ if (mdo != NULL) {
+ if (mdo->would_profile()) {
+ int mdo_i = mdo->invocation_count_delta();
+ int mdo_b = mdo->backedge_count_delta();
+ if ((this->*p)(mdo_i, mdo_b, cur_level, method)) {
+ next_level = CompLevel_full_optimization;
+ }
+ } else {
next_level = CompLevel_full_optimization;
}
- } else {
- next_level = CompLevel_full_optimization;
}
}
+ break;
}
- break;
}
}
- return MIN2(next_level, (CompLevel)TieredStopAtLevel);
+ return MIN2(next_level, CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel);
}
// Determine if a method should be compiled with a normal entry point at a different level.
-CompLevel TieredThresholdPolicy::call_event(Method* method, CompLevel cur_level, JavaThread * thread) {
+CompLevel TieredThresholdPolicy::call_event(Method* method, CompLevel cur_level, JavaThread* thread) {
CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),
common(&TieredThresholdPolicy::loop_predicate, method, cur_level, true));
CompLevel next_level = common(&TieredThresholdPolicy::call_predicate, method, cur_level);
@@ -950,7 +1025,8 @@
if (level == CompLevel_aot) {
// Recompile the enclosing method to prevent infinite OSRs. Stay at AOT level while it's compiling.
if (max_osr_level != CompLevel_none && !CompileBroker::compilation_is_in_queue(mh)) {
- compile(mh, InvocationEntryBci, MIN2((CompLevel)TieredStopAtLevel, CompLevel_full_profile), thread);
+ CompLevel enclosing_level = MIN2(CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel, CompLevel_full_profile);
+ compile(mh, InvocationEntryBci, enclosing_level, thread);
}
} else {
// Current loop event level is not AOT
--- a/src/hotspot/share/compiler/tieredThresholdPolicy.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/compiler/tieredThresholdPolicy.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -222,22 +222,18 @@
enum EventType { CALL, LOOP, COMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT };
void print_event(EventType type, const methodHandle& mh, const methodHandle& imh, int bci, CompLevel level);
- // Print policy-specific information if necessary
- void print_specific(EventType type, const methodHandle& mh, const methodHandle& imh, int bci, CompLevel level);
// Check if the method can be compiled, change level if necessary
void compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread);
- // Submit a given method for compilation
- void submit_compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread);
// Simple methods are as good being compiled with C1 as C2.
// This function tells if it's such a function.
inline static bool is_trivial(Method* method);
// Force method to be compiled at CompLevel_simple?
- inline static bool should_compile_at_level_simple(Method* method);
+ inline bool force_comp_at_level_simple(Method* method);
// Predicate helpers are used by .*_predicate() methods as well as others.
// They check the given counter values, multiplied by the scale against the thresholds.
- template<CompLevel level> static inline bool call_predicate_helper(int i, int b, double scale, Method* method);
- template<CompLevel level> static inline bool loop_predicate_helper(int i, int b, double scale, Method* method);
+ inline bool call_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale);
+ inline bool loop_predicate_helper(Method* method, CompLevel cur_level, int i, int b, double scale);
// Get a compilation level for a given method.
static CompLevel comp_level(Method* method);
--- a/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -96,7 +96,6 @@
store = kit->store_to_memory(kit->control(), access.addr().node(), val.node(), access.type(),
access.addr().type(), mo, requires_atomic_access, unaligned, mismatched, unsafe);
- access.set_raw_access(store);
} else {
assert(!requires_atomic_access, "not yet supported");
assert(access.is_opt_access(), "either parse or opt access");
@@ -120,6 +119,8 @@
mm->set_memory_at(alias, st);
}
}
+ access.set_raw_access(store);
+
return store;
}
@@ -153,7 +154,6 @@
load = kit->make_load(control, adr, val_type, access.type(), adr_type, mo,
dep, requires_atomic_access, unaligned, mismatched, unsafe);
}
- access.set_raw_access(load);
} else {
assert(!requires_atomic_access, "not yet supported");
assert(access.is_opt_access(), "either parse or opt access");
@@ -165,6 +165,7 @@
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;
}
@@ -806,7 +807,8 @@
Node* dest_offset = ac->in(ArrayCopyNode::DestPos);
Node* length = ac->in(ArrayCopyNode::Length);
- assert (src_offset == NULL && dest_offset == NULL, "for clone offsets should be null");
+ assert (src_offset == NULL, "for clone offsets should be null");
+ assert (dest_offset == NULL, "for clone offsets should be null");
const char* copyfunc_name = "arraycopy";
address copyfunc_addr =
--- a/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/c1/shenandoahBarrierSetC1.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -25,6 +25,7 @@
#include "c1/c1_IR.hpp"
#include "gc/shared/satbMarkQueue.hpp"
#include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
+#include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahRuntime.hpp"
@@ -203,46 +204,49 @@
}
void ShenandoahBarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) {
+ // 1: non-reference load, no additional barrier is needed
if (!access.is_oop()) {
BarrierSetC1::load_at_resolved(access, result);
return;
}
LIRGenerator* gen = access.gen();
-
DecoratorSet decorators = access.decorators();
- bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
- if ((decorators & IN_NATIVE) != 0 && !is_traversal_mode) {
- assert(access.is_oop(), "IN_NATIVE access only for oop values");
- BarrierSetC1::load_at_resolved(access, result);
- LIR_OprList* args = new LIR_OprList();
- LIR_Opr addr = access.resolved_addr();
- addr = ensure_in_register(gen, addr);
- args->append(result);
- args->append(addr);
- BasicTypeList signature;
- signature.append(T_OBJECT);
- signature.append(T_ADDRESS);
- LIR_Opr call_result = gen->call_runtime(&signature, args,
- CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native),
- objectType, NULL);
- __ move(call_result, result);
- } else {
- if (ShenandoahLoadRefBarrier) {
+ // 2: load a reference from src location and apply LRB if ShenandoahLoadRefBarrier is set
+ if (ShenandoahLoadRefBarrier) {
+ // Native barrier is for concurrent root processing
+ bool in_native = (decorators & IN_NATIVE) != 0;
+ if (in_native && ShenandoahConcurrentRoots::can_do_concurrent_roots()) {
+ BarrierSetC1::load_at_resolved(access, result);
+ LIR_OprList* args = new LIR_OprList();
+ LIR_Opr addr = access.resolved_addr();
+ addr = ensure_in_register(gen, addr);
+ args->append(result);
+ args->append(addr);
+ BasicTypeList signature;
+ signature.append(T_OBJECT);
+ signature.append(T_ADDRESS);
+ LIR_Opr call_result = gen->call_runtime(&signature, args,
+ CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native),
+ objectType, NULL);
+ __ move(call_result, result);
+ } else {
LIR_Opr tmp = gen->new_register(T_OBJECT);
BarrierSetC1::load_at_resolved(access, tmp);
- tmp = load_reference_barrier(access.gen(), tmp, access.resolved_addr());
+ tmp = load_reference_barrier(gen, tmp, access.resolved_addr());
__ move(tmp, result);
- } else {
- BarrierSetC1::load_at_resolved(access, result);
}
+ } else {
+ BarrierSetC1::load_at_resolved(access, result);
}
+ // 3: apply keep-alive barrier if ShenandoahKeepAliveBarrier is set
if (ShenandoahKeepAliveBarrier) {
bool is_weak = (decorators & ON_WEAK_OOP_REF) != 0;
bool is_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
bool is_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
+ bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0 || is_traversal_mode;
if ((is_weak || is_phantom || is_anonymous) && keep_alive) {
@@ -252,13 +256,13 @@
Lcont_anonymous = new LabelObj();
generate_referent_check(access, Lcont_anonymous);
}
- pre_barrier(access.gen(), access.access_emit_info(), access.decorators(), LIR_OprFact::illegalOpr /* addr_opr */,
+ pre_barrier(gen, access.access_emit_info(), decorators, LIR_OprFact::illegalOpr /* addr_opr */,
result /* pre_val */);
if (is_anonymous) {
__ branch_destination(Lcont_anonymous->label());
}
}
- }
+ }
}
class C1ShenandoahPreBarrierCodeGenClosure : public StubAssemblerCodeGenClosure {
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -23,6 +23,7 @@
#include "precompiled.hpp"
#include "gc/shared/barrierSet.hpp"
+#include "gc/shenandoah/shenandoahConcurrentRoots.hpp"
#include "gc/shenandoah/shenandoahForwarding.hpp"
#include "gc/shenandoah/shenandoahHeap.hpp"
#include "gc/shenandoah/shenandoahHeuristics.hpp"
@@ -534,66 +535,69 @@
}
Node* ShenandoahBarrierSetC2::load_at_resolved(C2Access& access, const Type* val_type) const {
- DecoratorSet decorators = access.decorators();
-
- Node* adr = access.addr().node();
- Node* obj = access.base();
+ // 1: non-reference load, no additional barrier is needed
+ if (!access.is_oop()) {
+ return BarrierSetC2::load_at_resolved(access, val_type);;
+ }
- bool mismatched = (decorators & C2_MISMATCHED) != 0;
- bool unknown = (decorators & ON_UNKNOWN_OOP_REF) != 0;
- bool on_heap = (decorators & IN_HEAP) != 0;
- bool on_weak_ref = (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF)) != 0;
- bool is_unordered = (decorators & MO_UNORDERED) != 0;
- bool need_cpu_mem_bar = !is_unordered || mismatched || !on_heap;
- bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
- bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0 || is_traversal_mode;
+ Node* load = BarrierSetC2::load_at_resolved(access, val_type);
+ DecoratorSet decorators = access.decorators();
bool in_native = (decorators & IN_NATIVE) != 0;
- Node* top = Compile::current()->top();
-
- Node* offset = adr->is_AddP() ? adr->in(AddPNode::Offset) : top;
- Node* load = BarrierSetC2::load_at_resolved(access, val_type);
-
- if (access.is_oop()) {
- if (ShenandoahLoadRefBarrier) {
- load = new ShenandoahLoadReferenceBarrierNode(NULL, load, in_native && !is_traversal_mode);
- if (access.is_parse_access()) {
- load = static_cast<C2ParseAccess &>(access).kit()->gvn().transform(load);
- } else {
- load = static_cast<C2OptAccess &>(access).gvn().transform(load);
- }
+ // 2: apply LRB if ShenandoahLoadRefBarrier is set
+ if (ShenandoahLoadRefBarrier) {
+ // Native barrier is for concurrent root processing
+ bool use_native_barrier = in_native && ShenandoahConcurrentRoots::can_do_concurrent_roots();
+ load = new ShenandoahLoadReferenceBarrierNode(NULL, load, use_native_barrier);
+ if (access.is_parse_access()) {
+ load = static_cast<C2ParseAccess &>(access).kit()->gvn().transform(load);
+ } else {
+ load = static_cast<C2OptAccess &>(access).gvn().transform(load);
}
}
- // If we are reading the value of the referent field of a Reference
- // object (either by using Unsafe directly or through reflection)
- // then, if SATB is enabled, we need to record the referent in an
- // SATB log buffer using the pre-barrier mechanism.
- // 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 = ShenandoahKeepAliveBarrier &&
- (on_weak_ref || (unknown && offset != top && obj != top));
+ // 3: apply keep-alive barrier if ShenandoahKeepAliveBarrier is set
+ if (ShenandoahKeepAliveBarrier) {
+ Node* top = Compile::current()->top();
+ Node* adr = access.addr().node();
+ Node* offset = adr->is_AddP() ? adr->in(AddPNode::Offset) : top;
+ Node* obj = access.base();
- if (!access.is_oop() || !need_read_barrier) {
- return load;
- }
+ bool unknown = (decorators & ON_UNKNOWN_OOP_REF) != 0;
+ bool on_weak_ref = (decorators & (ON_WEAK_OOP_REF | ON_PHANTOM_OOP_REF)) != 0;
+ bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode();
+ bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0 || is_traversal_mode;
- assert(access.is_parse_access(), "entry not supported at optimization time");
- C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
- GraphKit* kit = parse_access.kit();
+ // If we are reading the value of the referent field of a Reference
+ // object (either by using Unsafe directly or through reflection)
+ // then, if SATB is enabled, we need to record the referent in an
+ // SATB log buffer using the pre-barrier mechanism.
+ // Also we need to add memory barrier to prevent commoning reads
+ // from this field across safepoint since GC can change its value.
+ if (!on_weak_ref || (unknown && (offset == top || obj == top)) || !keep_alive) {
+ return load;
+ }
- if (on_weak_ref && keep_alive) {
- // Use the pre-barrier to record the value in the referent field
- satb_write_barrier_pre(kit, false /* do_load */,
- NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */,
- load /* pre_val */, T_OBJECT);
- // Add memory barrier to prevent commoning reads from this field
- // across safepoint since GC can change its value.
- kit->insert_mem_bar(Op_MemBarCPUOrder);
- } else if (unknown) {
- // We do not require a mem bar inside pre_barrier if need_mem_bar
- // is set: the barriers would be emitted by us.
- insert_pre_barrier(kit, obj, offset, load, !need_cpu_mem_bar);
+ assert(access.is_parse_access(), "entry not supported at optimization time");
+ C2ParseAccess& parse_access = static_cast<C2ParseAccess&>(access);
+ GraphKit* kit = parse_access.kit();
+ bool mismatched = (decorators & C2_MISMATCHED) != 0;
+ bool is_unordered = (decorators & MO_UNORDERED) != 0;
+ bool need_cpu_mem_bar = !is_unordered || mismatched || in_native;
+
+ if (on_weak_ref) {
+ // Use the pre-barrier to record the value in the referent field
+ satb_write_barrier_pre(kit, false /* do_load */,
+ NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */,
+ load /* pre_val */, T_OBJECT);
+ // Add memory barrier to prevent commoning reads from this field
+ // across safepoint since GC can change its value.
+ kit->insert_mem_bar(Op_MemBarCPUOrder);
+ } else if (unknown) {
+ // We do not require a mem bar inside pre_barrier if need_mem_bar
+ // is set: the barriers would be emitted by us.
+ insert_pre_barrier(kit, obj, offset, load, !need_cpu_mem_bar);
+ }
}
return load;
@@ -754,7 +758,7 @@
return true;
} else if (mode == LoopOptsShenandoahPostExpand) {
assert(UseShenandoahGC, "only for shenandoah");
- visited.Clear();
+ visited.clear();
ShenandoahBarrierC2Support::optimize_after_expansion(visited, nstack, worklist, phase);
return true;
}
--- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -383,7 +383,7 @@
(!verify_helper(in1, phis, visited, ShenandoahValue, trace, barriers_used) ||
!verify_helper(in2, phis, visited, ShenandoahValue, trace, barriers_used))) {
phis.clear();
- visited.Reset();
+ visited.reset();
}
}
} else if (n->is_LoadStore()) {
@@ -635,7 +635,7 @@
for (uint i = sfpt->jvms()->scloff(); i < sfpt->jvms()->endoff(); i++) {
if (!verify_helper(sfpt->in(i), phis, visited, ShenandoahLoad, trace, barriers_used)) {
phis.clear();
- visited.Reset();
+ visited.reset();
}
}
}
@@ -2368,7 +2368,7 @@
// Iterate over CFG nodes in rpo and propagate memory state to
// compute memory state at regions, creating new phis if needed.
Node_List rpo_list;
- visited.Clear();
+ visited.clear();
_phase->rpo(_phase->C->root(), stack, visited, rpo_list);
Node* root = rpo_list.pop();
assert(root == _phase->C->root(), "");
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -29,11 +29,6 @@
#include "logging/log.hpp"
#include "logging/logTag.hpp"
-ShenandoahPassiveHeuristics::ShenandoahPassiveHeuristics() : ShenandoahHeuristics() {
- // Passive runs with max speed for allocation, because GC is always STW
- SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahPacing);
-}
-
bool ShenandoahPassiveHeuristics::should_start_gc() const {
// Never do concurrent GCs.
return false;
--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahPassiveHeuristics.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,6 @@
class ShenandoahPassiveHeuristics : public ShenandoahHeuristics {
public:
- ShenandoahPassiveHeuristics();
-
virtual bool should_start_gc() const;
virtual bool should_process_references();
--- a/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPacer.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -238,6 +238,15 @@
return;
}
+ // Threads that are attaching should not block at all: they are not
+ // fully initialized yet. Calling sleep() on them would be awkward.
+ // This is probably the path that allocates the thread oop itself.
+ // Forcefully claim without waiting.
+ if (JavaThread::current()->is_attaching_via_jni()) {
+ claim_for_alloc(words, true);
+ return;
+ }
+
size_t max = ShenandoahPacingMaxDelay;
double start = os::elapsedTime();
--- a/src/hotspot/share/gc/shenandoah/shenandoahPassiveMode.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/shenandoahPassiveMode.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -32,8 +32,8 @@
FLAG_SET_DEFAULT(ExplicitGCInvokesConcurrent, false);
FLAG_SET_DEFAULT(ShenandoahImplicitGCInvokesConcurrent, false);
- // Passive runs with max speed, reacts on allocation failure.
- FLAG_SET_DEFAULT(ShenandoahPacing, false);
+ // Passive runs with max speed for allocation, because GC is always STW
+ SHENANDOAH_ERGO_DISABLE_FLAG(ShenandoahPacing);
// No need for evacuation reserve with Full GC, only for Degenerated GC.
if (!ShenandoahDegeneratedGC) {
--- a/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/shenandoah/shenandoahRootProcessor.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -28,7 +28,7 @@
#include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp"
#include "gc/shenandoah/shenandoahRootProcessor.inline.hpp"
-#include "gc/shenandoah/shenandoahHeap.hpp"
+#include "gc/shenandoah/shenandoahHeap.inline.hpp"
#include "gc/shenandoah/shenandoahPhaseTimings.hpp"
#include "gc/shenandoah/shenandoahStringDedup.hpp"
#include "gc/shenandoah/shenandoahTimingTracker.hpp"
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -27,14 +27,17 @@
#include "gc/z/zBarrierSet.hpp"
#include "gc/z/zBarrierSetAssembler.hpp"
#include "gc/z/zBarrierSetRuntime.hpp"
+#include "opto/arraycopynode.hpp"
#include "opto/block.hpp"
#include "opto/compile.hpp"
#include "opto/graphKit.hpp"
#include "opto/machnode.hpp"
+#include "opto/macro.hpp"
#include "opto/memnode.hpp"
#include "opto/node.hpp"
#include "opto/regalloc.hpp"
#include "opto/rootnode.hpp"
+#include "opto/type.hpp"
#include "utilities/growableArray.hpp"
#include "utilities/macros.hpp"
@@ -223,6 +226,56 @@
return type == T_OBJECT || type == T_ARRAY;
}
+static const TypeFunc* clone_type() {
+ // Create input type (domain)
+ const Type** domain_fields = TypeTuple::fields(3);
+ domain_fields[TypeFunc::Parms + 0] = TypeInstPtr::NOTNULL; // src
+ domain_fields[TypeFunc::Parms + 1] = TypeInstPtr::NOTNULL; // dst
+ domain_fields[TypeFunc::Parms + 2] = TypeInt::INT; // size
+ const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms + 3, domain_fields);
+
+ // Create result type (range)
+ const Type** range_fields = TypeTuple::fields(0);
+ const TypeTuple* range = TypeTuple::make(TypeFunc::Parms + 0, range_fields);
+
+ return TypeFunc::make(domain, range);
+}
+
+void ZBarrierSetC2::clone_at_expansion(PhaseMacroExpand* phase, ArrayCopyNode* ac) const {
+ Node* const src = ac->in(ArrayCopyNode::Src);
+
+ if (src->bottom_type()->isa_aryptr()) {
+ // Clone primitive array
+ BarrierSetC2::clone_at_expansion(phase, ac);
+ return;
+ }
+
+ // Clone instance
+ Node* const ctrl = ac->in(TypeFunc::Control);
+ Node* const mem = ac->in(TypeFunc::Memory);
+ Node* const dst = ac->in(ArrayCopyNode::Dest);
+ Node* const src_offset = ac->in(ArrayCopyNode::SrcPos);
+ Node* const dst_offset = ac->in(ArrayCopyNode::DestPos);
+ Node* const size = ac->in(ArrayCopyNode::Length);
+
+ assert(src->bottom_type()->isa_instptr(), "Should be an instance");
+ assert(dst->bottom_type()->isa_instptr(), "Should be an instance");
+ assert(src_offset == NULL, "Should be null");
+ assert(dst_offset == NULL, "Should be null");
+
+ Node* const call = phase->make_leaf_call(ctrl,
+ mem,
+ clone_type(),
+ ZBarrierSetRuntime::clone_addr(),
+ "ZBarrierSetRuntime::clone",
+ TypeRawPtr::BOTTOM,
+ src,
+ dst,
+ size);
+ phase->transform_later(call);
+ phase->igvn().replace_node(ac, call);
+}
+
// == Dominating barrier elision ==
static bool block_has_safepoint(const Block* block, uint from, uint to) {
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -82,6 +82,8 @@
BasicType type,
bool is_clone,
ArrayCopyPhase phase) const;
+ virtual void clone_at_expansion(PhaseMacroExpand* phase,
+ ArrayCopyNode* ac) const;
virtual void late_barrier_analysis() const;
virtual int estimate_stub_size() const;
--- a/src/hotspot/share/gc/z/zBarrierSetRuntime.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/z/zBarrierSetRuntime.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -42,6 +42,10 @@
ZBarrier::load_barrier_on_oop_array(p, length);
JRT_END
+JRT_LEAF(void, ZBarrierSetRuntime::clone(oop src, oop dst, size_t size))
+ HeapAccess<>::clone(src, dst, size);
+JRT_END
+
address ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded_addr(DecoratorSet decorators) {
if (decorators & ON_PHANTOM_OOP_REF) {
return load_barrier_on_phantom_oop_field_preloaded_addr();
@@ -67,3 +71,7 @@
address ZBarrierSetRuntime::load_barrier_on_oop_array_addr() {
return reinterpret_cast<address>(load_barrier_on_oop_array);
}
+
+address ZBarrierSetRuntime::clone_addr() {
+ return reinterpret_cast<address>(clone);
+}
--- a/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/gc/z/zBarrierSetRuntime.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -36,6 +36,7 @@
static oopDesc* load_barrier_on_weak_oop_field_preloaded(oopDesc* o, oop* p);
static oopDesc* load_barrier_on_phantom_oop_field_preloaded(oopDesc* o, oop* p);
static void load_barrier_on_oop_array(oop* p, size_t length);
+ static void clone(oop src, oop dst, size_t size);
public:
static address load_barrier_on_oop_field_preloaded_addr(DecoratorSet decorators);
@@ -43,6 +44,7 @@
static address load_barrier_on_weak_oop_field_preloaded_addr();
static address load_barrier_on_phantom_oop_field_preloaded_addr();
static address load_barrier_on_oop_array_addr();
+ static address clone_addr();
};
#endif // SHARE_GC_Z_ZBARRIERSETRUNTIME_HPP
--- a/src/hotspot/share/include/jvm.h Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/include/jvm.h Thu Nov 07 18:44:09 2019 +0000
@@ -248,16 +248,10 @@
JNIEXPORT jobject JNICALL
JVM_CurrentThread(JNIEnv *env, jclass threadClass);
-JNIEXPORT jint JNICALL
-JVM_CountStackFrames(JNIEnv *env, jobject thread);
-
JNIEXPORT void JNICALL
JVM_Interrupt(JNIEnv *env, jobject thread);
JNIEXPORT jboolean JNICALL
-JVM_IsInterrupted(JNIEnv *env, jobject thread, jboolean clearInterrupted);
-
-JNIEXPORT jboolean JNICALL
JVM_HoldsLock(JNIEnv *env, jclass threadClass, jobject obj);
JNIEXPORT void JNICALL
@@ -352,11 +346,6 @@
JNIEXPORT jclass JNICALL
JVM_FindPrimitiveClass(JNIEnv *env, const char *utf);
-/*
- * Link the 'arg' class
- */
-JNIEXPORT void JNICALL
-JVM_LinkClass(JNIEnv *env, jclass classClass, jclass arg);
/*
* Find a class from a boot class loader. Returns NULL if class not found.
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -42,7 +42,10 @@
template <typename T>
inline traceid set_used_and_get(const T* type) {
assert(type != NULL, "invariant");
- SET_USED_THIS_EPOCH(type);
+ if (SHOULD_TAG(type)) {
+ SET_USED_THIS_EPOCH(type);
+ JfrTraceIdEpoch::set_changed_tag_state();
+ }
assert(USED_THIS_EPOCH(type), "invariant");
return TRACE_ID(type);
}
@@ -58,19 +61,10 @@
}
inline traceid JfrTraceId::use(const Klass* klass) {
- assert(klass != NULL, "invariant");
- if (SHOULD_TAG(klass)) {
- SET_USED_THIS_EPOCH(klass);
- assert(USED_THIS_EPOCH(klass), "invariant");
- JfrTraceIdEpoch::set_changed_tag_state();
- return get(klass);
- }
- assert(USED_THIS_EPOCH(klass), "invariant");
- return TRACE_ID(klass);
+ return set_used_and_get(klass);
}
inline traceid JfrTraceId::use(const Method* method) {
- assert(method != NULL, "invariant");
return use(method->method_holder(), method);
}
@@ -91,12 +85,10 @@
}
inline traceid JfrTraceId::use(const ModuleEntry* module) {
- assert(module != NULL, "invariant");
return set_used_and_get(module);
}
inline traceid JfrTraceId::use(const PackageEntry* package) {
- assert(package != NULL, "invariant");
return set_used_and_get(package);
}
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -40,10 +40,8 @@
inline void set_bits(jbyte bits, jbyte volatile* const dest) {
assert(dest != NULL, "invariant");
- if (bits != (*dest & bits)) {
- *dest |= bits;
- OrderAccess::storestore();
- }
+ *dest |= bits;
+ OrderAccess::storestore();
}
inline jbyte traceid_and(jbyte current, jbyte bits) {
--- a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -332,11 +332,7 @@
/*
* We are just about to exit the VM, so we will be very aggressive
-* at this point in order to increase overall success of dumping jfr data:
-*
-* 1. if the thread state is not "_thread_in_vm", we will quick transition
-* it to "_thread_in_vm".
-* 2. if the thread is the owner of some critical lock(s), unlock them.
+* at this point in order to increase overall success of dumping jfr data.
*
* If we end up deadlocking in the attempt of dumping out jfr data,
* we rely on the WatcherThread task "is_error_reported()",
@@ -344,19 +340,16 @@
* This "safety net" somewhat explains the aggressiveness in this attempt.
*
*/
-static bool prepare_for_emergency_dump() {
- if (JfrStream_lock->owned_by_self()) {
- // crashed during jfr rotation, disallow recursion
- return false;
- }
- Thread* const thread = Thread::current();
+static bool prepare_for_emergency_dump(Thread* thread) {
+ assert(thread != NULL, "invariant");
+
if (thread->is_Watcher_thread()) {
// need WatcherThread as a safeguard against potential deadlocks
return false;
}
-
- if (thread->is_Java_thread()) {
- ((JavaThread*)thread)->set_thread_state(_thread_in_vm);
+ if (JfrStream_lock->owned_by_self()) {
+ // crashed during jfr rotation, disallow recursion
+ return false;
}
#ifdef ASSERT
@@ -428,10 +421,43 @@
return Atomic::cmpxchg(1, &jfr_shutdown_lock, 0) == 0;
}
+class JavaThreadInVM : public StackObj {
+ private:
+ JavaThread* const _jt;
+ JavaThreadState _original_state;
+ public:
+
+ JavaThreadInVM(Thread* t) : _jt(t->is_Java_thread() ? (JavaThread*)t : NULL),
+ _original_state(_thread_max_state) {
+ if ((_jt != NULL) && (_jt->thread_state() != _thread_in_vm)) {
+ _original_state = _jt->thread_state();
+ _jt->set_thread_state(_thread_in_vm);
+ }
+ }
+
+ ~JavaThreadInVM() {
+ if (_original_state != _thread_max_state) {
+ _jt->set_thread_state(_original_state);
+ }
+ }
+
+};
+
void JfrEmergencyDump::on_vm_shutdown(bool exception_handler) {
- if (!(guard_reentrancy() && prepare_for_emergency_dump())) {
+ if (!guard_reentrancy()) {
return;
}
+
+ Thread* thread = Thread::current_or_null_safe();
+ if (thread == NULL) {
+ return;
+ }
+ // Ensure a JavaThread is _thread_in_vm when we make this call
+ JavaThreadInVM jtivm(thread);
+ if (!prepare_for_emergency_dump(thread)) {
+ return;
+ }
+
EventDumpReason event;
if (event.should_commit()) {
event.set_reason(exception_handler ? "Crash" : "Out of Memory");
--- a/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jfr/recorder/storage/jfrStorage.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -432,18 +432,17 @@
assert(oldest_age_node->identity() == NULL, "invariant");
BufferPtr const buffer = oldest_age_node->retired_buffer();
assert(buffer->retired(), "invariant");
- discarded_size += buffer->unflushed_size();
+ discarded_size += buffer->discard();
+ assert(buffer->unflushed_size() == 0, "invariant");
num_full_post_discard = control().decrement_full();
+ mspace_release_full(oldest_age_node, _age_mspace);
if (buffer->transient()) {
mspace_release_full(buffer, _transient_mspace);
- mspace_release_full(oldest_age_node, _age_mspace);
continue;
- } else {
- mspace_release_full(oldest_age_node, _age_mspace);
- buffer->reinitialize();
- buffer->release(); // publish
- break;
}
+ buffer->reinitialize();
+ buffer->release(); // publish
+ break;
}
JfrBuffer_lock->unlock();
const size_t number_of_discards = num_full_pre_discard - num_full_post_discard;
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -620,21 +620,6 @@
return (jint) obj->identity_hash();
JRT_END
-JRT_ENTRY(jboolean, JVMCIRuntime::thread_is_interrupted(JavaThread* thread, oopDesc* receiver, jboolean clear_interrupted))
- Handle receiverHandle(thread, receiver);
- // A nested ThreadsListHandle may require the Threads_lock which
- // requires thread_in_vm which is why this method cannot be JRT_LEAF.
- ThreadsListHandle tlh;
-
- JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle());
- if (receiverThread == NULL || (EnableThreadSMRExtraValidityChecks && !tlh.includes(receiverThread))) {
- // The other thread may exit during this process, which is ok so return false.
- return JNI_FALSE;
- } else {
- return (jint) receiverThread->is_interrupted(clear_interrupted != 0);
- }
-JRT_END
-
JRT_ENTRY(jint, JVMCIRuntime::test_deoptimize_call_int(JavaThread* thread, int value))
deopt_caller();
return (jint) value;
--- a/src/hotspot/share/jvmci/jvmciRuntime.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jvmci/jvmciRuntime.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -309,7 +309,6 @@
static void dynamic_new_array_or_null(JavaThread* thread, oopDesc* element_mirror, jint length) { dynamic_new_array_common(thread, element_mirror, length, true); }
static void dynamic_new_instance_or_null(JavaThread* thread, oopDesc* type_mirror) { dynamic_new_instance_common(thread, type_mirror, true); }
- static jboolean thread_is_interrupted(JavaThread* thread, oopDesc* obj, jboolean clear_interrupted);
static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3);
static jint identity_hash_code(JavaThread* thread, oopDesc* obj);
static address exception_handler_for_pc(JavaThread* thread);
--- a/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/jvmci/vmStructs_jvmci.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -263,8 +263,6 @@
\
static_field(os, _polling_page, address) \
\
- volatile_nonstatic_field(OSThread, _interrupted, jint) \
- \
static_field(StubRoutines, _verify_oop_count, jint) \
\
static_field(StubRoutines, _throw_delayed_StackOverflowError_entry, address) \
@@ -641,7 +639,6 @@
declare_function(JVMCIRuntime::dynamic_new_array_or_null) \
declare_function(JVMCIRuntime::dynamic_new_instance_or_null) \
\
- declare_function(JVMCIRuntime::thread_is_interrupted) \
declare_function(JVMCIRuntime::vm_message) \
declare_function(JVMCIRuntime::identity_hash_code) \
declare_function(JVMCIRuntime::exception_handler_for_pc) \
--- a/src/hotspot/share/libadt/set.cpp Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 "libadt/set.hpp"
-#include "memory/allocation.inline.hpp"
-
-// Sets - An Abstract Data Type
-
-#include <stdio.h>
-#include <assert.h>
-#include <string.h>
-#include <stdlib.h>
-
-//-------------------------Virtual Functions-----------------------------------
-// These functions MUST be implemented by the inheriting class.
-class VectorSet;
-const VectorSet *Set::asVectorSet() const { assert(0); return NULL; }
-
-//------------------------------setstr-----------------------------------------
-// Create a string with a printable representation of a set.
-// The caller must deallocate the string.
-char *Set::setstr() const
-{
- Set &set = clone(); // Virtually copy the basic set.
- set.Sort(); // Sort elements for in-order retrieval
-
- uint len = 128; // Total string space
- char *buf = NEW_C_HEAP_ARRAY(char,len, mtCompiler);// Some initial string space
-
- char *s = buf; // Current working string pointer
- *s++ = '{';
- *s = '\0';
-
- // For all elements of the Set
- uint hi = (uint)-2, lo = (uint)-2;
- for( SetI i(&set); i.test(); ++i ) {
- if( hi+1 == i.elem ) { // Moving sequentially thru range?
- hi = i.elem; // Yes, just update hi end of range
- } else { // Else range ended
- if( buf+len-s < 25 ) { // Generous trailing space for upcoming numbers
- int offset = (int)(s-buf);// Not enuf space; compute offset into buffer
- len <<= 1; // Double string size
- buf = REALLOC_C_HEAP_ARRAY(char,buf,len, mtCompiler); // Reallocate doubled size
- s = buf+offset; // Get working pointer into new bigger buffer
- }
- if( lo != (uint)-2 ) { // Startup? No! Then print previous range.
- if( lo != hi ) sprintf(s,"%d-%d,",lo,hi);
- else sprintf(s,"%d,",lo);
- s += strlen(s); // Advance working string
- }
- hi = lo = i.elem;
- }
- }
- if( lo != (uint)-2 ) {
- if( buf+len-s < 25 ) { // Generous trailing space for upcoming numbers
- int offset = (int)(s-buf);// Not enuf space; compute offset into buffer
- len <<= 1; // Double string size
- buf = (char*)ReallocateHeap(buf,len, mtCompiler); // Reallocate doubled size
- s = buf+offset; // Get working pointer into new bigger buffer
- }
- if( lo != hi ) sprintf(s,"%d-%d}",lo,hi);
- else sprintf(s,"%d}",lo);
- } else strcat(s,"}");
- // Don't delete the clone 'set' since it is allocated on Arena.
- return buf;
-}
-
-//------------------------------print------------------------------------------
-// Handier print routine
-void Set::print() const
-{
- char *printable_set = setstr();
- tty->print_cr("%s", printable_set);
- FreeHeap(printable_set);
-}
-
-//------------------------------parse------------------------------------------
-// Convert a textual representation of a Set, to a Set and union into "this"
-// Set. Return the amount of text parsed in "len", or zero in "len".
-int Set::parse(const char *s)
-{
- char c; // Parse character
- const char *t = s; // Save the starting position of s.
- do c = *s++; // Skip characters
- while( c && (c <= ' ') ); // Till no more whitespace or EOS
- if( c != '{' ) return 0; // Oops, not a Set openner
- if( *s == '}' ) return 2; // The empty Set
-
- // Sets are filled with values of the form "xx," or "xx-yy," with the comma
- // a "}" at the very end.
- while( 1 ) { // While have elements in the Set
- char *u; // Pointer to character ending parse
- uint hi, i; // Needed for range handling below
- uint elem = (uint)strtoul(s,&u,10);// Get element
- if( u == s ) return 0; // Bogus crude
- s = u; // Skip over the number
- c = *s++; // Get the number seperator
- switch ( c ) { // Different seperators
- case '}': // Last simple element
- case ',': // Simple element
- (*this) <<= elem; // Insert the simple element into the Set
- break; // Go get next element
- case '-': // Range
- hi = (uint)strtoul(s,&u,10); // Get element
- if( u == s ) return 0; // Bogus crude
- for( i=elem; i<=hi; i++ )
- (*this) <<= i; // Insert the entire range into the Set
- s = u; // Skip over the number
- c = *s++; // Get the number seperator
- break;
- }
- if( c == '}' ) break; // End of the Set
- if( c != ',' ) return 0; // Bogus garbage
- }
- return (int)(s-t); // Return length parsed
-}
-
-//------------------------------Iterator---------------------------------------
-SetI_::~SetI_()
-{
-}
--- a/src/hotspot/share/libadt/set.hpp Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
- * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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_LIBADT_SET_HPP
-#define SHARE_LIBADT_SET_HPP
-
-#include "memory/allocation.hpp"
-
-// Sets - An Abstract Data Type
-
-class SparseSet;
-class VectorSet;
-class ListSet;
-class CoSet;
-
-class ostream;
-class SetI_;
-
-// These sets can grow or shrink, based on the initial size and the largest
-// element currently in them. Basically, they allow a bunch of bits to be
-// grouped together, tested, set & cleared, intersected, etc. The basic
-// Set class is an abstract class, and cannot be constructed. Instead,
-// one of VectorSet, SparseSet, or ListSet is created. Each variation has
-// different asymptotic running times for different operations, and different
-// constants of proportionality as well.
-// {n = number of elements, N = largest element}
-
-// VectorSet SparseSet ListSet
-// Create O(N) O(1) O(1)
-// Clear O(N) O(1) O(1)
-// Insert O(1) O(1) O(log n)
-// Delete O(1) O(1) O(log n)
-// Member O(1) O(1) O(log n)
-// Size O(N) O(1) O(1)
-// Copy O(N) O(n) O(n)
-// Union O(N) O(n) O(n log n)
-// Intersect O(N) O(n) O(n log n)
-// Difference O(N) O(n) O(n log n)
-// Equal O(N) O(n) O(n log n)
-// ChooseMember O(N) O(1) O(1)
-// Sort O(1) O(n log n) O(1)
-// Forall O(N) O(n) O(n)
-// Complement O(1) O(1) O(1)
-
-// TIME: N/32 n 8*n Accesses
-// SPACE: N/8 4*N+4*n 8*n Bytes
-
-// Create: Make an empty set
-// Clear: Remove all the elements of a Set
-// Insert: Insert an element into a Set; duplicates are ignored
-// Delete: Removes an element from a Set
-// Member: Tests for membership in a Set
-// Size: Returns the number of members of a Set
-// Copy: Copy or assign one Set to another
-// Union: Union 2 sets together
-// Intersect: Intersect 2 sets together
-// Difference: Compute A & !B; remove from set A those elements in set B
-// Equal: Test for equality between 2 sets
-// ChooseMember Pick a random member
-// Sort: If no other operation changes the set membership, a following
-// Forall will iterate the members in ascending order.
-// Forall: Iterate over the elements of a Set. Operations that modify
-// the set membership during iteration work, but the iterator may
-// skip any member or duplicate any member.
-// Complement: Only supported in the Co-Set variations. It adds a small
-// constant-time test to every Set operation.
-//
-// PERFORMANCE ISSUES:
-// If you "cast away" the specific set variation you are using, and then do
-// operations on the basic "Set" object you will pay a virtual function call
-// to get back the specific set variation. On the other hand, using the
-// generic Set means you can change underlying implementations by just
-// changing the initial declaration. Examples:
-// void foo(VectorSet vs1, VectorSet vs2) { vs1 |= vs2; }
-// "foo" must be called with a VectorSet. The vector set union operation
-// is called directly.
-// void foo(Set vs1, Set vs2) { vs1 |= vs2; }
-// "foo" may be called with *any* kind of sets; suppose it is called with
-// VectorSets. Two virtual function calls are used to figure out the that vs1
-// and vs2 are VectorSets. In addition, if vs2 is not a VectorSet then a
-// temporary VectorSet copy of vs2 will be made before the union proceeds.
-//
-// VectorSets have a small constant. Time and space are proportional to the
-// largest element. Fine for dense sets and largest element < 10,000.
-// SparseSets have a medium constant. Time is proportional to the number of
-// elements, space is proportional to the largest element.
-// Fine (but big) with the largest element < 100,000.
-// ListSets have a big constant. Time *and space* are proportional to the
-// number of elements. They work well for a few elements of *any* size
-// (i.e. sets of pointers)!
-
-//------------------------------Set--------------------------------------------
-class Set : public ResourceObj {
- protected:
-
- // Creates a new, empty set.
- Set(Arena *arena) : _set_arena(arena) {};
-
- // Creates a new set from an existing set
- Set(const Set & s) : ResourceObj(s) {};
-
- public:
- // Set assignment; deep-copy guts
- virtual Set &operator =(const Set &s)=0;
- virtual Set &clone(void) const=0;
-
- // Virtual destructor
- virtual ~Set() {};
-
- // Add member to set
- virtual Set &operator <<=(uint elem)=0;
- // virtual Set operator << (uint elem);
-
- // Delete member from set
- virtual Set &operator >>=(uint elem)=0;
- // virtual Set operator >> (uint elem);
-
- // Membership test. Result is Zero (absent)/ Non-Zero (present)
- virtual int operator [](uint elem) const=0;
-
- // Intersect sets
- virtual Set &operator &=(const Set &s)=0;
- // virtual Set operator & (const Set &s) const;
-
- // Union sets
- virtual Set &operator |=(const Set &s)=0;
- // virtual Set operator | (const Set &s) const;
-
- // Difference sets
- virtual Set &operator -=(const Set &s)=0;
- // virtual Set operator - (const Set &s) const;
-
- // Tests for equality. Result is Zero (false)/ Non-Zero (true)
- virtual int operator ==(const Set &s) const=0;
- int operator !=(const Set &s) const { return !(*this == s); }
- virtual int disjoint(const Set &s) const=0;
-
- // Tests for strict subset. Result is Zero (false)/ Non-Zero (true)
- virtual int operator < (const Set &s) const=0;
- int operator > (const Set &s) const { return s < *this; }
-
- // Tests for subset. Result is Zero (false)/ Non-Zero (true)
- virtual int operator <=(const Set &s) const=0;
- int operator >=(const Set &s) const { return s <= *this; }
-
- // Clear all the elements in the Set
- virtual void Clear(void)=0;
-
- // Return the number of members in the Set
- virtual uint Size(void) const=0;
-
- // If an iterator follows a "Sort()" without any Set-modifying operations
- // inbetween then the iterator will visit the elements in ascending order.
- virtual void Sort(void)=0;
-
- // Convert a set to printable string in an allocated buffer.
- // The caller must deallocate the string.
- virtual char *setstr(void) const;
-
- // Print the Set on "stdout". Can be conveniently called in the debugger
- void print() const;
-
- // Parse text from the string into the Set. Return length parsed.
- virtual int parse(const char *s);
-
- // Convert a generic Set to a specific Set
- virtual const VectorSet *asVectorSet(void) const;
-
- // Hash the set. Sets of different types but identical elements will NOT
- // hash the same. Same set type, same elements WILL hash the same.
- virtual int hash() const = 0;
-
-protected:
- friend class SetI;
- virtual class SetI_ *iterate(uint&) const=0;
-
- // Need storeage for the set
- Arena *_set_arena;
-};
-
-//------------------------------Iteration--------------------------------------
-// Loop thru all elements of the set, setting "elem" to the element numbers
-// in random order. Inserted or deleted elements during this operation may
-// or may not be iterated over; untouched elements will be affected once.
-
-// Usage: for( SetI i(s); i.test(); i++ ) { body = i.elem; } ...OR...
-// for( i.reset(s); i.test(); i++ ) { body = i.elem; }
-
-class SetI_ : public ResourceObj {
-protected:
- friend class SetI;
- virtual ~SetI_();
- virtual uint next(void)=0;
- virtual int test(void)=0;
-};
-
-class SetI {
-protected:
- SetI_ *impl;
-public:
- uint elem; // The publically accessible element
-
- SetI( const Set *s ) { impl = s->iterate(elem); }
- ~SetI() { delete impl; }
- void reset( const Set *s ) { delete impl; impl = s->iterate(elem); }
- void operator ++(void) { elem = impl->next(); }
- int test(void) { return impl->test(); }
-};
-
-#endif // SHARE_LIBADT_SET_HPP
--- a/src/hotspot/share/libadt/vectset.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/libadt/vectset.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -27,339 +27,61 @@
#include "memory/allocation.inline.hpp"
#include "memory/arena.hpp"
-// Vector Sets - An Abstract Data Type
-
-// BitsInByte is a lookup table which tells the number of bits that
-// are in the looked-up number. It is very useful in VectorSet_Size.
-
-uint8_t bitsInByte[BITS_IN_BYTE_ARRAY_SIZE] = {
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
-};
-
-//------------------------------VectorSet--------------------------------------
-// Create a new, empty Set.
-VectorSet::VectorSet(Arena *arena) : Set(arena) {
+VectorSet::VectorSet(Arena *arena) {
+ _set_arena = arena;
size = 2; // Small initial size
data = (uint32_t *)_set_arena->Amalloc(size*sizeof(uint32_t));
data[0] = 0; // No elements
data[1] = 0;
}
-//------------------------------operator=--------------------------------------
-Set &VectorSet::operator = (const Set &set)
-{
- if( &set == this ) return *this;
- FREE_FAST(data);
- // The cast is a virtual function that checks that "set" is a VectorSet.
- slamin(*(set.asVectorSet()));
- return *this;
-}
-
-//------------------------------slamin-----------------------------------------
-// Initialize one set with another. No regard is made to the existing Set.
-void VectorSet::slamin(const VectorSet& s)
-{
- size = s.size; // Use new size
- data = (uint32_t*)s._set_arena->Amalloc(size*sizeof(uint32_t)); // Make array of required size
- memcpy( data, s.data, size*sizeof(uint32_t) ); // Fill the array
-}
-
-//------------------------------grow-------------------------------------------
// Expand the existing set to a bigger size
-void VectorSet::grow( uint newsize )
-{
- newsize = (newsize+31) >> 5; // Convert to longwords
+void VectorSet::grow(uint newsize) {
+ newsize = (newsize+31) >> 5;
uint x = size;
- while( x < newsize ) x <<= 1;
+ while (x < newsize) {
+ x <<= 1;
+ }
data = (uint32_t *)_set_arena->Arealloc(data, size*sizeof(uint32_t), x*sizeof(uint32_t));
- memset((char *)(data + size), 0, (x - size)*sizeof(uint32_t));
+ memset((char*)(data + size), 0, (x - size) * sizeof(uint32_t));
size = x;
}
-//------------------------------operator<<=------------------------------------
// Insert a member into an existing Set.
-Set &VectorSet::operator <<= (uint elem)
-{
- uint word = elem >> 5; // Get the longword offset
- uint32_t mask = 1L << (elem & 31); // Get bit mask
-
- if( word >= size ) // Need to grow set?
- grow(elem+1); // Then grow it
- data[word] |= mask; // Set new bit
- return *this;
-}
-
-//------------------------------operator>>=------------------------------------
-// Delete a member from an existing Set.
-Set &VectorSet::operator >>= (uint elem)
-{
- uint word = elem >> 5; // Get the longword offset
- if( word >= size ) // Beyond the last?
- return *this; // Then it's clear & return clear
- uint32_t mask = 1L << (elem & 31); // Get bit mask
- data[word] &= ~mask; // Clear bit
- return *this;
-}
-
-//------------------------------operator&=-------------------------------------
-// Intersect one set into another.
-VectorSet &VectorSet::operator &= (const VectorSet &s)
-{
- // NOTE: The intersection is never any larger than the smallest set.
- if( s.size < size ) size = s.size; // Get smaller size
- uint32_t *u1 = data; // Pointer to the destination data
- uint32_t *u2 = s.data; // Pointer to the source data
- for( uint i=0; i<size; i++) // For data in set
- *u1++ &= *u2++; // Copy and AND longwords
- return *this; // Return set
-}
-
-//------------------------------operator&=-------------------------------------
-Set &VectorSet::operator &= (const Set &set)
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) &= *(set.asVectorSet());
-}
-
-//------------------------------operator|=-------------------------------------
-// Union one set into another.
-VectorSet &VectorSet::operator |= (const VectorSet &s)
-{
- // This many words must be unioned
- uint cnt = ((size<s.size)?size:s.size);
- uint32_t *u1 = data; // Pointer to the destination data
- uint32_t *u2 = s.data; // Pointer to the source data
- for( uint i=0; i<cnt; i++) // Copy and OR the two sets
- *u1++ |= *u2++;
- if( size < s.size ) { // Is set 2 larger than set 1?
- // Extend result by larger set
- grow(s.size*sizeof(uint32_t)*8);
- memcpy(&data[cnt], u2, (s.size - cnt)*sizeof(uint32_t));
+void VectorSet::insert(uint elem) {
+ uint word = elem >> 5;
+ uint32_t mask = 1L << (elem & 31);
+ if (word >= size) {
+ grow(elem + 1);
}
- return *this; // Return result set
-}
-
-//------------------------------operator|=-------------------------------------
-Set &VectorSet::operator |= (const Set &set)
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) |= *(set.asVectorSet());
-}
-
-//------------------------------operator-=-------------------------------------
-// Difference one set from another.
-VectorSet &VectorSet::operator -= (const VectorSet &s)
-{
- // This many words must be unioned
- uint cnt = ((size<s.size)?size:s.size);
- uint32_t *u1 = data; // Pointer to the destination data
- uint32_t *u2 = s.data; // Pointer to the source data
- for( uint i=0; i<cnt; i++ ) // For data in set
- *u1++ &= ~(*u2++); // A <-- A & ~B with longwords
- return *this; // Return new set
-}
-
-//------------------------------operator-=-------------------------------------
-Set &VectorSet::operator -= (const Set &set)
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) -= *(set.asVectorSet());
+ data[word] |= mask;
}
-//------------------------------compare----------------------------------------
-// Compute 2 booleans: bits in A not B, bits in B not A.
-// Return X0 -- A is not a subset of B
-// X1 -- A is a subset of B
-// 0X -- B is not a subset of A
-// 1X -- B is a subset of A
-int VectorSet::compare (const VectorSet &s) const
-{
- uint32_t *u1 = data; // Pointer to the destination data
- uint32_t *u2 = s.data; // Pointer to the source data
- uint32_t AnotB = 0, BnotA = 0;
- // This many words must be unioned
- uint cnt = ((size<s.size)?size:s.size);
-
- // Get bits for both sets
- uint i; // Exit value of loop
- for( i=0; i<cnt; i++ ) { // For data in BOTH sets
- uint32_t A = *u1++; // Data from one guy
- uint32_t B = *u2++; // Data from other guy
- AnotB |= (A & ~B); // Compute bits in A not B
- BnotA |= (B & ~A); // Compute bits in B not A
- }
-
- // Get bits from bigger set
- if( size < s.size ) {
- for( ; i<s.size; i++ ) // For data in larger set
- BnotA |= *u2++; // These bits are in B not A
- } else {
- for( ; i<size; i++ ) // For data in larger set
- AnotB |= *u1++; // These bits are in A not B
- }
-
- // Set & return boolean flags
- return ((!BnotA)<<1) + (!AnotB);
-}
-
-//------------------------------operator==-------------------------------------
-// Test for set equality
-int VectorSet::operator == (const VectorSet &s) const
-{
- return compare(s) == 3; // TRUE if A and B are mutual subsets
-}
-
-//------------------------------operator==-------------------------------------
-int VectorSet::operator == (const Set &set) const
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) == *(set.asVectorSet());
-}
-
-//------------------------------disjoint---------------------------------------
-// Check for sets being disjoint.
-int VectorSet::disjoint(const Set &set) const
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- const VectorSet &s = *(set.asVectorSet());
-
- // NOTE: The intersection is never any larger than the smallest set.
- uint small_size = ((size<s.size)?size:s.size);
- uint32_t *u1 = data; // Pointer to the destination data
- uint32_t *u2 = s.data; // Pointer to the source data
- for( uint i=0; i<small_size; i++) // For data in set
- if( *u1++ & *u2++ ) // If any elements in common
- return 0; // Then not disjoint
- return 1; // Else disjoint
-}
-
-//------------------------------operator<--------------------------------------
-// Test for strict subset
-int VectorSet::operator < (const VectorSet &s) const
-{
- return compare(s) == 1; // A subset B, B not subset A
-}
-
-//------------------------------operator<--------------------------------------
-int VectorSet::operator < (const Set &set) const
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) < *(set.asVectorSet());
-}
-
-//------------------------------operator<=-------------------------------------
-// Test for subset
-int VectorSet::operator <= (const VectorSet &s) const
-{
- return compare(s) & 1; // A subset B
-}
-
-//------------------------------operator<=-------------------------------------
-int VectorSet::operator <= (const Set &set) const
-{
- // The cast is a virtual function that checks that "set" is a VectorSet.
- return (*this) <= *(set.asVectorSet());
-}
-
-//------------------------------operator[]-------------------------------------
-// Test for membership. A Zero/Non-Zero value is returned!
-int VectorSet::operator[](uint elem) const
-{
- uint word = elem >> 5; // Get the longword offset
- if( word >= size ) // Beyond the last?
- return 0; // Then it's clear
- uint32_t mask = 1L << (elem & 31); // Get bit mask
- return ((data[word] & mask))!=0; // Return the sense of the bit
-}
-
-//------------------------------Clear------------------------------------------
// Clear a set
-void VectorSet::Clear(void)
-{
+void VectorSet::clear() {
if( size > 100 ) { // Reclaim storage only if huge
FREE_RESOURCE_ARRAY(uint32_t,data,size);
size = 2; // Small initial size
data = NEW_RESOURCE_ARRAY(uint32_t,size);
}
- memset( data, 0, size*sizeof(uint32_t) );
-}
-
-//------------------------------Size-------------------------------------------
-// Return number of elements in a Set
-uint VectorSet::Size(void) const
-{
- uint sum = 0; // Cumulative size so far.
- uint8_t* currByte = (uint8_t*) data;
- for( uint32_t i = 0; i < (size<<2); i++) // While have bytes to process
- sum += bitsInByte[*currByte++]; // Add bits in current byte to size.
- return sum;
-}
-
-//------------------------------Sort-------------------------------------------
-// Sort the elements for the next forall statement
-void VectorSet::Sort(void)
-{
-}
-
-//------------------------------hash-------------------------------------------
-int VectorSet::hash() const
-{
- uint32_t _xor = 0;
- uint lim = ((size<4)?size:4);
- for( uint i = 0; i < lim; i++ )
- _xor ^= data[i];
- return (int)_xor;
+ memset(data, 0, size*sizeof(uint32_t));
}
-//------------------------------iterate----------------------------------------
-// Used by Set::print().
-class VSetI_ : public SetI_ {
- VectorSetI vsi;
-public:
- VSetI_( const VectorSet *vset, uint &elem ) : vsi(vset) { elem = vsi.elem; }
-
- uint next(void) { ++vsi; return vsi.elem; }
- int test(void) { return vsi.test(); }
-};
-
-SetI_ *VectorSet::iterate(uint &elem) const {
- return new(ResourceObj::C_HEAP, mtInternal) VSetI_(this, elem);
+// Return true if the set is empty
+bool VectorSet::is_empty() const {
+ for (uint32_t i = 0; i < size; i++) {
+ if (data[i] != 0) {
+ return false;
+ }
+ }
+ return true;
}
-//=============================================================================
-//------------------------------next-------------------------------------------
-// Find and return the next element of a vector set, or return garbage and
-// make "VectorSetI::test()" fail.
-uint VectorSetI::next(void)
-{
- j++; // Next element in word
- mask = (mask & max_jint) << 1;// Next bit in word
- do { // Do While still have words
- while( mask ) { // While have bits in word
- if( s->data[i] & mask ) { // If found a bit
- return (i<<5)+j; // Return the bit address
- }
- j++; // Skip to next bit
- mask = (mask & max_jint) << 1;
- }
- j = 0; // No more bits in word; setup for next word
- mask = 1;
- for( i++; (i<s->size) && (!s->data[i]); i++ ); // Skip to non-zero word
- } while( i<s->size );
- return max_juint; // No element, iterated them all
+int VectorSet::hash() const {
+ uint32_t _xor = 0;
+ uint lim = ((size < 4) ? size : 4);
+ for (uint i = 0; i < lim; i++) {
+ _xor ^= data[i];
+ }
+ return (int)_xor;
}
--- a/src/hotspot/share/libadt/vectset.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/libadt/vectset.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -25,161 +25,85 @@
#ifndef SHARE_LIBADT_VECTSET_HPP
#define SHARE_LIBADT_VECTSET_HPP
-#include "libadt/set.hpp"
+#include "memory/allocation.hpp"
-#define BITS_IN_BYTE_ARRAY_SIZE 256
-
-// Vector Sets - An Abstract Data Type
-//INTERFACE
+// Vector Sets
// These sets can grow or shrink, based on the initial size and the largest
-// element currently in them. Slow and bulky for sparse sets, these sets
-// are super for dense sets. They are fast and compact when dense.
-
-// TIME:
-// O(1) - Insert, Delete, Member, Sort
-// O(max_element) - Create, Clear, Size, Copy, Union, Intersect, Difference,
-// Equal, ChooseMember, Forall
-
-// SPACE: (max_element)/(8*sizeof(int))
-
+// element currently in them.
//------------------------------VectorSet--------------------------------------
-class VectorSet : public Set {
-friend class VectorSetI; // Friendly iterator class
-protected:
+class VectorSet : public ResourceObj {
+private:
uint size; // Size of data IN LONGWORDS (32bits)
uint32_t* data; // The data, bit packed
+ Arena *_set_arena;
- void slamin( const VectorSet& s ); // Initialize one set with another
- int compare(const VectorSet &s) const; // Compare set contents
- void grow(uint newsize); // Grow vector to required bitsize
+ void grow(uint newsize); // Grow vector to required bitsize
public:
- VectorSet(Arena *arena); // Creates a new, empty set.
- VectorSet(const VectorSet &s) : Set(s._set_arena) {slamin(s);} // Set clone; deep-copy guts
- Set &operator =(const Set &s); // Set clone; deep-copy guts
- VectorSet &operator =(const VectorSet &s) // Set clone; deep-copy guts
- { if( &s != this ) { slamin(s); } return *this; }
+ VectorSet(Arena *arena);
~VectorSet() {}
- Set &clone(void) const { return *(new VectorSet(*this)); }
-
- Set &operator <<=(uint elem); // Add member to set
- VectorSet operator << (uint elem) // Add member to new set
- { VectorSet foo(*this); foo <<= elem; return foo; }
- Set &operator >>=(uint elem); // Delete member from set
- VectorSet operator >> (uint elem) // Delete member from new set
- { VectorSet foo(*this); foo >>= elem; return foo; }
-
- VectorSet &operator &=(const VectorSet &s); // Intersect sets into first set
- Set &operator &=(const Set &s); // Intersect sets into first set
- VectorSet operator & (const VectorSet &s) const
- { VectorSet foo(*this); foo &= s; return foo; }
-
- VectorSet &operator |=(const VectorSet &s); // Intersect sets into first set
- Set &operator |=(const Set &s); // Intersect sets into first set
- VectorSet operator | (const VectorSet &s) const
- { VectorSet foo(*this); foo |= s; return foo; }
+ void insert(uint elem);
- VectorSet &operator -=(const VectorSet &s); // Intersect sets into first set
- Set &operator -=(const Set &s); // Intersect sets into first set
- VectorSet operator - (const VectorSet &s) const
- { VectorSet foo(*this); foo -= s; return foo; }
-
- int operator ==(const VectorSet &s) const; // True if sets are equal
- int operator ==(const Set &s) const; // True if sets are equal
- int operator < (const VectorSet &s) const; // True if strict subset
- int operator < (const Set &s) const; // True if strict subset
- int operator <=(const VectorSet &s) const; // True if subset relation holds.
- int operator <=(const Set &s) const; // True if subset relation holds.
- int disjoint (const Set &s) const; // True if sets are disjoint
-
- int operator [](uint elem) const; // Test for membership
- void Clear(void); // Clear a set
- uint Size(void) const; // Number of elements in the Set.
- void Sort(void); // Sort before iterating
- int hash() const; // Hash function
- void Reset(void) { // Reset a set
- memset( data, 0, size*sizeof(uint32_t) );
+ void clear();
+ bool is_empty() const;
+ int hash() const;
+ void reset() {
+ memset(data, 0, size*sizeof(uint32_t));
}
- /* Removed for MCC BUG
- operator const VectorSet* (void) const { return this; } */
- const VectorSet *asVectorSet() const { return this; }
-
// Expose internals for speed-critical fast iterators
uint word_size() const { return size; }
// Fast inlined "test and set". Replaces the idiom:
- // if( visited[idx] ) return;
- // visited <<= idx;
+ // if (visited.test(idx)) return;
+ // visited.set(idx);
// With:
- // if( visited.test_set(idx) ) return;
+ // if (visited.test_set(idx)) return;
//
- int test_set( uint elem ) {
+ int test_set(uint elem) {
uint word = elem >> 5; // Get the longword offset
- if( word >= size ) // Beyond the last?
- return test_set_grow(elem); // Then grow; set; return 0;
+ if (word >= size) {
+ // Then grow; set; return 0;
+ this->insert(elem);
+ return 0;
+ }
uint32_t mask = 1L << (elem & 31); // Get bit mask
uint32_t datum = data[word] & mask;// Get bit
data[word] |= mask; // Set bit
return datum; // Return bit
}
- int test_set_grow( uint elem ) { // Insert & return 0;
- (*this) <<= elem; // Insert into set
- return 0; // Return 0!
- }
// Fast inlined test
- int test( uint elem ) const {
- uint word = elem >> 5; // Get the longword offset
- if( word >= size ) return 0; // Beyond the last?
- uint32_t mask = 1L << (elem & 31); // Get bit mask
- return data[word] & mask; // Get bit
+ int test(uint elem) const {
+ uint word = elem >> 5;
+ if (word >= size) {
+ return 0;
+ }
+ uint32_t mask = 1L << (elem & 31);
+ return data[word] & mask;
+ }
+
+ void remove(uint elem) {
+ uint word = elem >> 5;
+ if (word >= size) {
+ return;
+ }
+ uint32_t mask = 1L << (elem & 31);
+ data[word] &= ~mask; // Clear bit
}
// Fast inlined set
- void set( uint elem ) {
- uint word = elem >> 5; // Get the longword offset
- if( word >= size ) { // Beyond the last?
- test_set_grow(elem); // Then grow and set
+ void set(uint elem) {
+ uint word = elem >> 5;
+ if (word >= size) {
+ this->insert(elem);
} else {
- uint32_t mask = 1L << (elem & 31); // Get bit mask
- data[word] |= mask; // Set bit
+ uint32_t mask = 1L << (elem & 31);
+ data[word] |= mask;
}
}
-
-
-private:
- SetI_ *iterate(uint&) const;
-};
-
-//------------------------------Iteration--------------------------------------
-// Loop thru all elements of the set, setting "elem" to the element numbers
-// in random order. Inserted or deleted elements during this operation may
-// or may not be iterated over; untouched elements will be affected once.
-// Usage: for( VectorSetI i(s); i.test(); i++ ) { body = i.elem; }
-
-class VectorSetI : public StackObj {
- friend class VectorSet;
- const VectorSet *s;
- uint i, j;
- uint32_t mask;
- uint next(void);
-
-public:
- uint elem; // The publically accessible element
-
- VectorSetI( const VectorSet *vset ) :
- s(vset),
- i((uint)-1L),
- j((uint)-1L),
- mask((unsigned)(1L<<31)) {
- elem = next();
- }
-
- void operator ++(void) { elem = next(); }
- int test(void) { return i < s->size; }
};
#endif // SHARE_LIBADT_VECTSET_HPP
--- a/src/hotspot/share/logging/logDecorations.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/logging/logDecorations.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -65,6 +65,8 @@
if (decorators.is_decorator(LogDecorators::full_name##_decorator)) { \
_decoration_offset[LogDecorators::full_name##_decorator] = position; \
position = create_##full_name##_decoration(position) + 1; \
+ } else { \
+ _decoration_offset[LogDecorators::full_name##_decorator] = NULL; \
}
DECORATOR_LIST
#undef DECORATOR
--- a/src/hotspot/share/memory/operator_new.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/memory/operator_new.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -89,4 +89,24 @@
fatal("Should not call global delete []");
}
+#ifdef __GNUG__
+// Warning disabled for gcc 5.4
+// Warning for unknown warning disabled for gcc 4.8.5
+PRAGMA_DIAG_PUSH
+PRAGMA_DISABLE_GCC_WARNING("-Wpragmas")
+PRAGMA_DISABLE_GCC_WARNING("-Wc++14-compat")
+#endif // __GNUG__
+
+void operator delete(void* p, size_t size) throw() {
+ fatal("Should not call global sized delete");
+}
+
+void operator delete [](void* p, size_t size) throw() {
+ fatal("Should not call global sized delete []");
+}
+
+#ifdef __GNUG__
+PRAGMA_DIAG_POP
+#endif // __GNUG__
+
#endif // Non-product
--- a/src/hotspot/share/oops/instanceKlass.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/oops/instanceKlass.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -3626,7 +3626,7 @@
Array<int>* method_ordering = this->method_ordering();
int length = method_ordering->length();
if (JvmtiExport::can_maintain_original_method_order() ||
- ((UseSharedSpaces || DumpSharedSpaces) && length != 0)) {
+ ((UseSharedSpaces || Arguments::is_dumping_archive()) && length != 0)) {
guarantee(length == methods()->length(), "invalid method ordering length");
jlong sum = 0;
for (int j = 0; j < length; j++) {
--- a/src/hotspot/share/oops/oop.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/oops/oop.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -173,6 +173,8 @@
jboolean bool_field(int offset) const;
void bool_field_put(int offset, jboolean contents);
+ jboolean bool_field_volatile(int offset) const;
+ void bool_field_put_volatile(int offset, jboolean contents);
jint int_field(int offset) const;
jint int_field_raw(int offset) const;
--- a/src/hotspot/share/oops/oop.inline.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/oops/oop.inline.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -301,9 +301,10 @@
inline jchar oopDesc::char_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); }
inline void oopDesc::char_field_put(int offset, jchar value) { HeapAccess<>::store_at(as_oop(), offset, value); }
-inline jboolean oopDesc::bool_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); }
+inline jboolean oopDesc::bool_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); }
inline void oopDesc::bool_field_put(int offset, jboolean value) { HeapAccess<>::store_at(as_oop(), offset, jboolean(value & 1)); }
-
+inline jboolean oopDesc::bool_field_volatile(int offset) const { return HeapAccess<MO_SEQ_CST>::load_at(as_oop(), offset); }
+inline void oopDesc::bool_field_put_volatile(int offset, jboolean value) { HeapAccess<MO_SEQ_CST>::store_at(as_oop(), offset, jboolean(value & 1)); }
inline jshort oopDesc::short_field(int offset) const { return HeapAccess<>::load_at(as_oop(), offset); }
inline void oopDesc::short_field_put(int offset, jshort value) { HeapAccess<>::store_at(as_oop(), offset, value); }
--- a/src/hotspot/share/opto/arraycopynode.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/arraycopynode.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,7 @@
None, // not set yet
ArrayCopy, // System.arraycopy()
CloneBasic, // A clone that can be copied by 64 bit chunks
- CloneOop, // An oop array clone
+ CloneOopArray, // An oop array clone
CopyOf, // Arrays.copyOf()
CopyOfRange // Arrays.copyOfRange()
} _kind;
@@ -147,7 +147,7 @@
bool is_arraycopy() const { assert(_kind != None, "should bet set"); return _kind == ArrayCopy; }
bool is_arraycopy_validated() const { assert(_kind != None, "should bet set"); return _kind == ArrayCopy && _arguments_validated; }
bool is_clonebasic() const { assert(_kind != None, "should bet set"); return _kind == CloneBasic; }
- bool is_cloneoop() const { assert(_kind != None, "should bet set"); return _kind == CloneOop; }
+ bool is_clone_oop_array() const { assert(_kind != None, "should bet set"); return _kind == CloneOopArray; }
bool is_copyof() const { assert(_kind != None, "should bet set"); return _kind == CopyOf; }
bool is_copyof_validated() const { assert(_kind != None, "should bet set"); return _kind == CopyOf && _arguments_validated; }
bool is_copyofrange() const { assert(_kind != None, "should bet set"); return _kind == CopyOfRange; }
@@ -155,7 +155,7 @@
void set_arraycopy(bool validated) { assert(_kind == None, "shouldn't bet set yet"); _kind = ArrayCopy; _arguments_validated = validated; }
void set_clonebasic() { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneBasic; }
- void set_cloneoop() { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneOop; }
+ void set_clone_oop_array() { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneOopArray; }
void set_copyof(bool validated) { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOf; _arguments_validated = validated; }
void set_copyofrange(bool validated) { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOfRange; _arguments_validated = validated; }
--- a/src/hotspot/share/opto/c2compiler.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/c2compiler.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -582,7 +582,6 @@
case vmIntrinsics::_storeFence:
case vmIntrinsics::_fullFence:
case vmIntrinsics::_currentThread:
- case vmIntrinsics::_isInterrupted:
#ifdef JFR_HAVE_INTRINSICS
case vmIntrinsics::_counterTime:
case vmIntrinsics::_getClassId:
--- a/src/hotspot/share/opto/chaitin.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/chaitin.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1197,12 +1197,12 @@
// Check for just becoming of-low-degree just counting registers.
// _must_spill live ranges are already on the low degree list.
- if( n->just_lo_degree() && !n->_must_spill ) {
- assert(!(*_ifg->_yanked)[neighbor],"Cannot move to lo degree twice");
+ if (n->just_lo_degree() && !n->_must_spill) {
+ assert(!_ifg->_yanked->test(neighbor), "Cannot move to lo degree twice");
// Pull from hi-degree list
uint prev = n->_prev;
uint next = n->_next;
- if( prev ) lrgs(prev)._next = next;
+ if (prev) lrgs(prev)._next = next;
else _hi_degree = next;
lrgs(next)._prev = prev;
n->_next = _lo_degree;
@@ -1212,7 +1212,7 @@
} // End of while lo-degree/lo_stk_degree worklist not empty
// Check for got everything: is hi-degree list empty?
- if( !_hi_degree ) break;
+ if (!_hi_degree) break;
// Time to pick a potential spill guy
uint lo_score = _hi_degree;
@@ -1223,8 +1223,8 @@
// Find cheapest guy
debug_only( int lo_no_simplify=0; );
- for( uint i = _hi_degree; i; i = lrgs(i)._next ) {
- assert( !(*_ifg->_yanked)[i], "" );
+ for (uint i = _hi_degree; i; i = lrgs(i)._next) {
+ assert(!_ifg->_yanked->test(i), "");
// It's just vaguely possible to move hi-degree to lo-degree without
// going through a just-lo-degree stage: If you remove a double from
// a float live range it's degree will drop by 2 and you can skip the
@@ -1249,7 +1249,7 @@
// one block. In which case their area is 0 and score set to max.
// In such case choose bound live range over unbound to free registers
// or with smaller cost to spill.
- if( iscore < score ||
+ if ( iscore < score ||
(iscore == score && iarea > area && lrgs(lo_score)._was_spilled2) ||
(iscore == score && iarea == area &&
( (ibound && !bound) || (ibound == bound && (icost < cost)) )) ) {
@@ -1332,7 +1332,7 @@
uint copy_lrg = _lrg_map.find(lrg._copy_bias);
if( copy_lrg != 0 ) {
// If he has a color,
- if( !(*(_ifg->_yanked))[copy_lrg] ) {
+ if(!_ifg->_yanked->test(copy_lrg)) {
OptoReg::Name reg = lrgs(copy_lrg).reg();
// And it is legal for you,
if (is_legal_reg(lrg, reg, chunk))
--- a/src/hotspot/share/opto/compile.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/compile.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -338,7 +338,7 @@
for (uint node_idx = 0; node_idx < max_idx; node_idx++) {
// If node with index node_idx is not in useful set,
// mark it as dead in dead node list.
- if (! useful_node_set.test(node_idx) ) {
+ if (!useful_node_set.test(node_idx)) {
record_dead_node(node_idx);
}
}
--- a/src/hotspot/share/opto/compile.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/compile.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -915,9 +915,7 @@
void record_dead_node(uint idx) { if (_dead_node_list.test_set(idx)) return;
_dead_node_count++;
}
- bool is_dead_node(uint idx) { return _dead_node_list.test(idx) != 0; }
- uint dead_node_count() { return _dead_node_count; }
- void reset_dead_node_list() { _dead_node_list.Reset();
+ void reset_dead_node_list() { _dead_node_list.reset();
_dead_node_count = 0;
}
uint live_nodes() const {
--- a/src/hotspot/share/opto/escape.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/escape.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1414,7 +1414,7 @@
}
}
_worklist.clear();
- _in_worklist.Reset();
+ _in_worklist.reset();
return new_edges;
}
--- a/src/hotspot/share/opto/gcm.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/gcm.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -850,7 +850,7 @@
stack.push(root, root->outcnt());
// Clear the visited bits
- visited.Clear();
+ visited.clear();
}
// Iterator for the Node_Backward_Iterator
@@ -1372,7 +1372,7 @@
// Find the earliest Block any instruction can be placed in. Some
// instructions are pinned into Blocks. Unpinned instructions can
// appear in last block in which all their inputs occur.
- visited.Clear();
+ visited.clear();
Node_Stack stack(arena, (C->live_nodes() >> 2) + 16); // pre-grow
if (!schedule_early(visited, stack)) {
// Bailout without retry
@@ -1392,7 +1392,7 @@
// Now schedule all codes as LATE as possible. This is the LCA in the
// dominator tree of all USES of a value. Pick the block with the least
// loop nesting depth that is lowest in the dominator tree.
- // ( visited.Clear() called in schedule_late()->Node_Backward_Iterator() )
+ // ( visited.clear() called in schedule_late()->Node_Backward_Iterator() )
schedule_late(visited, stack);
if (C->failing()) {
// schedule_late fails only when graph is incorrect.
@@ -1473,7 +1473,7 @@
// Schedule locally. Right now a simple topological sort.
// Later, do a real latency aware scheduler.
GrowableArray<int> ready_cnt(C->unique(), C->unique(), -1);
- visited.Clear();
+ visited.reset();
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
if (!schedule_local(block, ready_cnt, visited, recalc_pressure_nodes)) {
--- a/src/hotspot/share/opto/graphKit.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/graphKit.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -43,6 +43,7 @@
#include "opto/runtime.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/sharedRuntime.hpp"
+#include "utilities/bitMap.inline.hpp"
//----------------------------GraphKit-----------------------------------------
// Main utility constructor.
--- a/src/hotspot/share/opto/idealGraphPrinter.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/idealGraphPrinter.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -584,7 +584,7 @@
#ifdef ASSERT
if (node->debug_orig() != NULL) {
- temp_set->Clear();
+ temp_set->clear();
stringStream dorigStream;
Node* dorig = node->debug_orig();
while (dorig && temp_set->test_set(dorig->_idx)) {
--- a/src/hotspot/share/opto/ifg.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/ifg.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -141,10 +141,10 @@
}
// Re-insert a yanked Node.
-void PhaseIFG::re_insert( uint a ) {
+void PhaseIFG::re_insert(uint a) {
assert( _is_square, "only on square" );
assert( _yanked->test(a), "" );
- (*_yanked) >>= a;
+ _yanked->remove(a);
IndexSetIterator elements(&_adjs[a]);
uint datum;
@@ -198,7 +198,7 @@
_is_square ? "square" : "triangular" );
if( _is_square ) {
for( uint i = 0; i < _maxlrg; i++ ) {
- tty->print( (*_yanked)[i] ? "XX " : " ");
+ tty->print(_yanked->test(i) ? "XX " : " ");
tty->print("L%d: { ",i);
IndexSetIterator elements(&_adjs[i]);
uint datum;
@@ -214,7 +214,7 @@
// Triangular
for( uint i = 0; i < _maxlrg; i++ ) {
uint j;
- tty->print( (*_yanked)[i] ? "XX " : " ");
+ tty->print(_yanked->test(i) ? "XX " : " ");
tty->print("L%d: { ",i);
for( j = _maxlrg; j > i; j-- )
if( test_edge(j - 1,i) ) {
@@ -249,7 +249,7 @@
void PhaseIFG::verify( const PhaseChaitin *pc ) const {
// IFG is square, sorted and no need for Find
for( uint i = 0; i < _maxlrg; i++ ) {
- assert(!((*_yanked)[i]) || !neighbor_cnt(i), "Is removed completely" );
+ assert(!_yanked->test(i) || !neighbor_cnt(i), "Is removed completely" );
IndexSet *set = &_adjs[i];
IndexSetIterator elements(set);
uint idx;
@@ -258,7 +258,7 @@
assert(idx != i, "Must have empty diagonal");
assert(pc->_lrg_map.find_const(idx) == idx, "Must not need Find");
assert(_adjs[idx].member(i), "IFG not square");
- assert(!(*_yanked)[idx], "No yanked neighbors");
+ assert(!_yanked->test(idx), "No yanked neighbors");
assert(last < idx, "not sorted increasing");
last = idx;
}
--- a/src/hotspot/share/opto/ifnode.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/ifnode.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -117,7 +117,7 @@
// No intervening control, like a simple Call
Node *r = iff->in(0);
if( !r->is_Region() ) return NULL;
- if (r->is_Loop() && r->in(LoopNode::LoopBackControl)->is_top()) return NULL; // going away anyway
+ if (r->is_Loop()) return NULL;
if( phi->region() != r ) return NULL;
// No other users of the cmp/bool
if (b->outcnt() != 1 || cmp->outcnt() != 1) {
@@ -238,16 +238,13 @@
// Make a region merging constants and a region merging the rest
uint req_c = 0;
- Node* predicate_proj = NULL;
- int nb_predicate_proj = 0;
for (uint ii = 1; ii < r->req(); ii++) {
if (phi->in(ii) == con1) {
req_c++;
}
Node* proj = PhaseIdealLoop::find_predicate(r->in(ii));
if (proj != NULL) {
- nb_predicate_proj++;
- predicate_proj = proj;
+ return NULL;
}
}
@@ -257,24 +254,6 @@
return NULL;
}
- if (nb_predicate_proj > 1) {
- // Can happen in case of loop unswitching and when the loop is
- // optimized out: it's not a loop anymore so we don't care about
- // predicates.
- assert(!r->is_Loop(), "this must not be a loop anymore");
- predicate_proj = NULL;
- }
- Node* predicate_c = NULL;
- Node* predicate_x = NULL;
- bool counted_loop = r->is_CountedLoop();
- if (counted_loop) {
- // Ignore counted loops for now because the split-if logic does not work
- // in all the cases (for example, with strip mined loops). Also, above
- // checks only pass for already degraded loops without a tripcount phi
- // and these are essentially dead and will go away during igvn.
- return NULL;
- }
-
Node *region_c = new RegionNode(req_c + 1);
Node *phi_c = con1;
uint len = r->req();
@@ -283,23 +262,11 @@
for (uint i = 1, i_c = 1, i_x = 1; i < len; i++) {
if (phi->in(i) == con1) {
region_c->init_req( i_c++, r ->in(i) );
- if (r->in(i) == predicate_proj)
- predicate_c = predicate_proj;
} else {
region_x->init_req( i_x, r ->in(i) );
phi_x ->init_req( i_x++, phi->in(i) );
- if (r->in(i) == predicate_proj)
- predicate_x = predicate_proj;
}
}
- if (predicate_c != NULL && (req_c > 1)) {
- assert(predicate_x == NULL, "only one predicate entry expected");
- predicate_c = NULL; // Do not clone predicate below merge point
- }
- if (predicate_x != NULL && ((len - req_c) > 2)) {
- assert(predicate_c == NULL, "only one predicate entry expected");
- predicate_x = NULL; // Do not clone predicate below merge point
- }
// Register the new RegionNodes but do not transform them. Cannot
// transform until the entire Region/Phi conglomerate has been hacked
@@ -341,20 +308,8 @@
// Make the true/false arms
Node *iff_c_t = phase->transform(new IfTrueNode (iff_c));
Node *iff_c_f = phase->transform(new IfFalseNode(iff_c));
- if (predicate_c != NULL) {
- assert(predicate_x == NULL, "only one predicate entry expected");
- // Clone loop predicates to each path
- iff_c_t = igvn->clone_loop_predicates(predicate_c, iff_c_t, !counted_loop);
- iff_c_f = igvn->clone_loop_predicates(predicate_c, iff_c_f, !counted_loop);
- }
Node *iff_x_t = phase->transform(new IfTrueNode (iff_x));
Node *iff_x_f = phase->transform(new IfFalseNode(iff_x));
- if (predicate_x != NULL) {
- assert(predicate_c == NULL, "only one predicate entry expected");
- // Clone loop predicates to each path
- iff_x_t = igvn->clone_loop_predicates(predicate_x, iff_x_t, !counted_loop);
- iff_x_f = igvn->clone_loop_predicates(predicate_x, iff_x_f, !counted_loop);
- }
// Merge the TRUE paths
Node *region_s = new RegionNode(3);
--- a/src/hotspot/share/opto/library_call.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/library_call.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -264,7 +264,6 @@
bool inline_native_classID();
bool inline_native_getEventWriter();
#endif
- bool inline_native_isInterrupted();
bool inline_native_Class_query(vmIntrinsics::ID id);
bool inline_native_subtype_check();
bool inline_native_getLength();
@@ -752,7 +751,6 @@
case vmIntrinsics::_onSpinWait: return inline_onspinwait();
case vmIntrinsics::_currentThread: return inline_native_currentThread();
- case vmIntrinsics::_isInterrupted: return inline_native_isInterrupted();
#ifdef JFR_HAVE_INTRINSICS
case vmIntrinsics::_counterTime: return inline_native_time_funcs(CAST_FROM_FN_PTR(address, JFR_TIME_FUNCTION), "counterTime");
@@ -3041,128 +3039,6 @@
return true;
}
-//------------------------inline_native_isInterrupted------------------
-// private native boolean java.lang.Thread.isInterrupted(boolean ClearInterrupted);
-bool LibraryCallKit::inline_native_isInterrupted() {
- // Add a fast path to t.isInterrupted(clear_int):
- // (t == Thread.current() &&
- // (!TLS._osthread._interrupted || WINDOWS_ONLY(false) NOT_WINDOWS(!clear_int)))
- // ? TLS._osthread._interrupted : /*slow path:*/ t.isInterrupted(clear_int)
- // So, in the common case that the interrupt bit is false,
- // we avoid making a call into the VM. Even if the interrupt bit
- // is true, if the clear_int argument is false, we avoid the VM call.
- // However, if the receiver is not currentThread, we must call the VM,
- // because there must be some locking done around the operation.
-
- // We only go to the fast case code if we pass two guards.
- // Paths which do not pass are accumulated in the slow_region.
-
- enum {
- no_int_result_path = 1, // t == Thread.current() && !TLS._osthread._interrupted
- no_clear_result_path = 2, // t == Thread.current() && TLS._osthread._interrupted && !clear_int
- slow_result_path = 3, // slow path: t.isInterrupted(clear_int)
- PATH_LIMIT
- };
-
- // Ensure that it's not possible to move the load of TLS._osthread._interrupted flag
- // out of the function.
- insert_mem_bar(Op_MemBarCPUOrder);
-
- RegionNode* result_rgn = new RegionNode(PATH_LIMIT);
- PhiNode* result_val = new PhiNode(result_rgn, TypeInt::BOOL);
-
- RegionNode* slow_region = new RegionNode(1);
- record_for_igvn(slow_region);
-
- // (a) Receiving thread must be the current thread.
- Node* rec_thr = argument(0);
- Node* tls_ptr = NULL;
- Node* cur_thr = generate_current_thread(tls_ptr);
-
- // Resolve oops to stable for CmpP below.
- cur_thr = access_resolve(cur_thr, 0);
- rec_thr = access_resolve(rec_thr, 0);
-
- Node* cmp_thr = _gvn.transform(new CmpPNode(cur_thr, rec_thr));
- Node* bol_thr = _gvn.transform(new BoolNode(cmp_thr, BoolTest::ne));
-
- generate_slow_guard(bol_thr, slow_region);
-
- // (b) Interrupt bit on TLS must be false.
- Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
- Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered);
- p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
-
- // Set the control input on the field _interrupted read to prevent it floating up.
- Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT, MemNode::unordered);
- Node* cmp_bit = _gvn.transform(new CmpINode(int_bit, intcon(0)));
- Node* bol_bit = _gvn.transform(new BoolNode(cmp_bit, BoolTest::ne));
-
- IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN);
-
- // First fast path: if (!TLS._interrupted) return false;
- Node* false_bit = _gvn.transform(new IfFalseNode(iff_bit));
- result_rgn->init_req(no_int_result_path, false_bit);
- result_val->init_req(no_int_result_path, intcon(0));
-
- // drop through to next case
- set_control( _gvn.transform(new IfTrueNode(iff_bit)));
-
-#ifndef _WINDOWS
- // (c) Or, if interrupt bit is set and clear_int is false, use 2nd fast path.
- Node* clr_arg = argument(1);
- Node* cmp_arg = _gvn.transform(new CmpINode(clr_arg, intcon(0)));
- Node* bol_arg = _gvn.transform(new BoolNode(cmp_arg, BoolTest::ne));
- IfNode* iff_arg = create_and_map_if(control(), bol_arg, PROB_FAIR, COUNT_UNKNOWN);
-
- // Second fast path: ... else if (!clear_int) return true;
- Node* false_arg = _gvn.transform(new IfFalseNode(iff_arg));
- result_rgn->init_req(no_clear_result_path, false_arg);
- result_val->init_req(no_clear_result_path, intcon(1));
-
- // drop through to next case
- set_control( _gvn.transform(new IfTrueNode(iff_arg)));
-#else
- // To return true on Windows you must read the _interrupted field
- // and check the event state i.e. take the slow path.
-#endif // _WINDOWS
-
- // (d) Otherwise, go to the slow path.
- slow_region->add_req(control());
- set_control( _gvn.transform(slow_region));
-
- if (stopped()) {
- // There is no slow path.
- result_rgn->init_req(slow_result_path, top());
- result_val->init_req(slow_result_path, top());
- } else {
- // non-virtual because it is a private non-static
- CallJavaNode* slow_call = generate_method_call(vmIntrinsics::_isInterrupted);
-
- Node* slow_val = set_results_for_java_call(slow_call);
- // this->control() comes from set_results_for_java_call
-
- Node* fast_io = slow_call->in(TypeFunc::I_O);
- Node* fast_mem = slow_call->in(TypeFunc::Memory);
-
- // These two phis are pre-filled with copies of of the fast IO and Memory
- PhiNode* result_mem = PhiNode::make(result_rgn, fast_mem, Type::MEMORY, TypePtr::BOTTOM);
- PhiNode* result_io = PhiNode::make(result_rgn, fast_io, Type::ABIO);
-
- result_rgn->init_req(slow_result_path, control());
- result_io ->init_req(slow_result_path, i_o());
- result_mem->init_req(slow_result_path, reset_memory());
- result_val->init_req(slow_result_path, slow_val);
-
- set_all_memory(_gvn.transform(result_mem));
- set_i_o( _gvn.transform(result_io));
- }
-
- C->set_has_split_ifs(true); // Has chance for split-if optimization
- set_result(result_rgn, result_val);
- return true;
-}
-
//---------------------------load_mirror_from_klass----------------------------
// Given a klass oop, load its java mirror (a java.lang.Class oop).
Node* LibraryCallKit::load_mirror_from_klass(Node* klass) {
@@ -4358,10 +4234,7 @@
alloc->initialization()->set_complete_with_arraycopy();
}
- // Copy the fastest available way.
- // TODO: generate fields copies for small objects instead.
Node* size = _gvn.transform(obj_size);
-
access_clone(obj, alloc_obj, size, is_array);
// Do not let reads from the cloned object float above the arraycopy.
@@ -4428,12 +4301,6 @@
}
}
- Node* obj_klass = load_object_klass(obj);
- const TypeKlassPtr* tklass = _gvn.type(obj_klass)->isa_klassptr();
- const TypeOopPtr* toop = ((tklass != NULL)
- ? tklass->as_instance_type()
- : TypeInstPtr::NOTNULL);
-
// Conservatively insert a memory barrier on all memory slices.
// Do not let writes into the original float below the clone.
insert_mem_bar(Op_MemBarCPUOrder);
@@ -4452,6 +4319,7 @@
PhiNode* result_mem = new PhiNode(result_reg, Type::MEMORY, TypePtr::BOTTOM);
record_for_igvn(result_reg);
+ Node* obj_klass = load_object_klass(obj);
Node* array_ctl = generate_array_guard(obj_klass, (RegionNode*)NULL);
if (array_ctl != NULL) {
// It's an array.
@@ -4473,7 +4341,7 @@
// Generate a direct call to the right arraycopy function(s).
Node* alloc = tightly_coupled_allocation(alloc_obj, NULL);
ArrayCopyNode* ac = ArrayCopyNode::make(this, true, obj, intcon(0), alloc_obj, intcon(0), obj_length, alloc != NULL, false);
- ac->set_cloneoop();
+ ac->set_clone_oop_array();
Node* n = _gvn.transform(ac);
assert(n == ac, "cannot disappear");
ac->connect_outputs(this);
--- a/src/hotspot/share/opto/loopnode.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/loopnode.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -2121,7 +2121,7 @@
void IdealLoopTree::allpaths_check_safepts(VectorSet &visited, Node_List &stack) {
assert(stack.size() == 0, "empty stack");
stack.push(_tail);
- visited.Clear();
+ visited.clear();
visited.set(_tail->_idx);
while (stack.size() > 0) {
Node* n = stack.pop();
@@ -2930,12 +2930,12 @@
int stack_size = (C->live_nodes() >> 1) + 16; // (live_nodes>>1)+16 from Java2D stats
Node_Stack nstack( a, stack_size );
- visited.Clear();
+ visited.clear();
Node_List worklist(a);
// Don't need C->root() on worklist since
// it will be processed among C->top() inputs
- worklist.push( C->top() );
- visited.set( C->top()->_idx ); // Set C->top() as visited now
+ worklist.push(C->top());
+ visited.set(C->top()->_idx); // Set C->top() as visited now
build_loop_early( visited, worklist, nstack );
// Given early legal placement, try finding counted loops. This placement
@@ -2945,12 +2945,12 @@
}
// Find latest loop placement. Find ideal loop placement.
- visited.Clear();
+ visited.clear();
init_dom_lca_tags();
// Need C->root() on worklist when processing outs
- worklist.push( C->root() );
+ worklist.push(C->root());
NOT_PRODUCT( C->verify_graph_edges(); )
- worklist.push( C->top() );
+ worklist.push(C->top());
build_loop_late( visited, worklist, nstack );
if (_verify_only) {
@@ -3046,7 +3046,7 @@
// Check for aggressive application of split-if and other transforms
// that require basic-block info (like cloning through Phi's)
if( SplitIfBlocks && do_split_ifs ) {
- visited.Clear();
+ visited.clear();
split_if_with_blocks( visited, nstack);
NOT_PRODUCT( if( VerifyLoopOptimizations ) verify(); );
}
--- a/src/hotspot/share/opto/loopopts.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/loopopts.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -2726,7 +2726,7 @@
_igvn.register_new_node_with_optimizer(n_clone);
set_ctrl(n_clone, get_ctrl(n));
sink_list.push(n_clone);
- not_peel <<= n_clone->_idx; // add n_clone to not_peel set.
+ not_peel.set(n_clone->_idx);
#ifndef PRODUCT
if (TracePartialPeeling) {
tty->print_cr("special not_peeled cloning old: %d new: %d", n->_idx, n_clone->_idx);
@@ -3236,8 +3236,8 @@
if (n->in(0) == NULL && !n->is_Load() && !n->is_CMove()) {
cloned_for_outside_use += clone_for_use_outside_loop(loop, n, worklist);
sink_list.push(n);
- peel >>= n->_idx; // delete n from peel set.
- not_peel <<= n->_idx; // add n to not_peel set.
+ peel.remove(n->_idx);
+ not_peel.set(n->_idx);
peel_list.remove(i);
incr = false;
#ifndef PRODUCT
--- a/src/hotspot/share/opto/macroArrayCopy.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/macroArrayCopy.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -505,7 +505,7 @@
// We don't need a subtype check for validated copies and Object[].clone()
bool skip_subtype_check = ac->is_arraycopy_validated() || ac->is_copyof_validated() ||
- ac->is_copyofrange_validated() || ac->is_cloneoop();
+ ac->is_copyofrange_validated() || ac->is_clone_oop_array();
if (!skip_subtype_check) {
// Get the klass* for both src and dest
Node* src_klass = ac->in(ArrayCopyNode::SrcKlass);
@@ -1096,7 +1096,7 @@
BarrierSetC2* bs = BarrierSet::barrier_set()->barrier_set_c2();
bs->clone_at_expansion(this, ac);
return;
- } else if (ac->is_copyof() || ac->is_copyofrange() || ac->is_cloneoop()) {
+ } else if (ac->is_copyof() || ac->is_copyofrange() || ac->is_clone_oop_array()) {
Node* mem = ac->in(TypeFunc::Memory);
merge_mem = MergeMemNode::make(mem);
transform_later(merge_mem);
--- a/src/hotspot/share/opto/matcher.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/matcher.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -157,7 +157,7 @@
worklist.push(xroot);
while (worklist.size() > 0) {
Node* n = worklist.pop();
- visited <<= n->_idx;
+ visited.set(n->_idx);
assert(C->node_arena()->contains(n), "dead node");
for (uint j = 0; j < n->req(); j++) {
Node* in = n->in(j);
@@ -340,7 +340,7 @@
// Recursively match trees from old space into new space.
// Correct leaves of new-space Nodes; they point to old-space.
- _visited.Clear(); // Clear visit bits for xform call
+ _visited.clear();
C->set_cached_top_node(xform( C->top(), live_nodes ));
if (!C->failing()) {
Node* xroot = xform( C->root(), 1 );
--- a/src/hotspot/share/opto/node.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/node.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -2399,14 +2399,15 @@
//=============================================================================
//------------------------------remove-----------------------------------------
-void Unique_Node_List::remove( Node *n ) {
- if( _in_worklist[n->_idx] ) {
- for( uint i = 0; i < size(); i++ )
- if( _nodes[i] == n ) {
- map(i,Node_List::pop());
- _in_worklist >>= n->_idx;
+void Unique_Node_List::remove(Node* n) {
+ if (_in_worklist.test(n->_idx)) {
+ for (uint i = 0; i < size(); i++) {
+ if (_nodes[i] == n) {
+ map(i, Node_List::pop());
+ _in_worklist.remove(n->_idx);
return;
}
+ }
ShouldNotReachHere();
}
}
@@ -2415,11 +2416,11 @@
// Remove useless nodes from worklist
void Unique_Node_List::remove_useless_nodes(VectorSet &useful) {
- for( uint i = 0; i < size(); ++i ) {
+ for (uint i = 0; i < size(); ++i) {
Node *n = at(i);
assert( n != NULL, "Did not expect null entries in worklist");
- if( ! useful.test(n->_idx) ) {
- _in_worklist >>= n->_idx;
+ if (!useful.test(n->_idx)) {
+ _in_worklist.remove(n->_idx);
map(i,Node_List::pop());
// Node *replacement = Node_List::pop();
// if( i != size() ) { // Check if removing last entry
--- a/src/hotspot/share/opto/node.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/node.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -1521,9 +1521,9 @@
void remove( Node *n );
bool member( Node *n ) { return _in_worklist.test(n->_idx) != 0; }
- VectorSet &member_set(){ return _in_worklist; }
+ VectorSet& member_set(){ return _in_worklist; }
- void push( Node *b ) {
+ void push(Node* b) {
if( !_in_worklist.test_set(b->_idx) )
Node_List::push(b);
}
@@ -1532,24 +1532,27 @@
Node *b = at(_clock_index);
map( _clock_index, Node_List::pop());
if (size() != 0) _clock_index++; // Always start from 0
- _in_worklist >>= b->_idx;
+ _in_worklist.remove(b->_idx);
return b;
}
- Node *remove( uint i ) {
+ Node *remove(uint i) {
Node *b = Node_List::at(i);
- _in_worklist >>= b->_idx;
+ _in_worklist.remove(b->_idx);
map(i,Node_List::pop());
return b;
}
- void yank( Node *n ) { _in_worklist >>= n->_idx; Node_List::yank(n); }
+ void yank(Node *n) {
+ _in_worklist.remove(n->_idx);
+ Node_List::yank(n);
+ }
void clear() {
- _in_worklist.Clear(); // Discards storage but grows automatically
+ _in_worklist.clear(); // Discards storage but grows automatically
Node_List::clear();
_clock_index = 0;
}
// Used after parsing to remove useless nodes before Iterative GVN
- void remove_useless_nodes(VectorSet &useful);
+ void remove_useless_nodes(VectorSet& useful);
#ifndef PRODUCT
void print_set() const { _in_worklist.print(); }
--- a/src/hotspot/share/opto/parse1.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/parse1.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -41,6 +41,7 @@
#include "runtime/handles.inline.hpp"
#include "runtime/safepointMechanism.hpp"
#include "runtime/sharedRuntime.hpp"
+#include "utilities/bitMap.inline.hpp"
#include "utilities/copy.hpp"
// Static array so we can figure out which bytecodes stop us from compiling
--- a/src/hotspot/share/opto/phaseX.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/phaseX.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -91,7 +91,7 @@
return _table[table_index];
}
- void remove_useless_nodes(VectorSet &useful); // replace with sentinel
+ void remove_useless_nodes(VectorSet& useful); // replace with sentinel
void replace_with(NodeHash* nh);
void check_no_speculative_types(); // Check no speculative part for type nodes in table
--- a/src/hotspot/share/opto/stringopts.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/stringopts.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -379,7 +379,7 @@
Node_List string_calls;
Node_List worklist;
- _visited.Clear();
+ _visited.clear();
// Prime the worklist
for (uint i = 1; i < C->root()->len(); i++) {
@@ -1033,7 +1033,7 @@
// Validate that all these results produced are contained within
// this cluster of objects. First collect all the results produced
// by calls in the region.
- _stringopts->_visited.Clear();
+ _stringopts->_visited.clear();
Node_List worklist;
Node* final_result = _end->proj_out_or_null(TypeFunc::Parms);
for (uint i = 0; i < _control.size(); i++) {
--- a/src/hotspot/share/opto/superword.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/superword.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -359,11 +359,11 @@
void set_bb_idx(Node* n, int i) { _bb_idx.at_put_grow(n->_idx, i); }
// visited set accessors
- void visited_clear() { _visited.Clear(); }
+ void visited_clear() { _visited.clear(); }
void visited_set(Node* n) { return _visited.set(bb_idx(n)); }
int visited_test(Node* n) { return _visited.test(bb_idx(n)); }
int visited_test_set(Node* n) { return _visited.test_set(bb_idx(n)); }
- void post_visited_clear() { _post_visited.Clear(); }
+ void post_visited_clear() { _post_visited.clear(); }
void post_visited_set(Node* n) { return _post_visited.set(bb_idx(n)); }
int post_visited_test(Node* n) { return _post_visited.test(bb_idx(n)); }
--- a/src/hotspot/share/opto/type.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/opto/type.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -290,6 +290,7 @@
const TypeF *isa_float_constant() const; // Returns NULL if not a FloatCon
const TypeTuple *is_tuple() const; // Collection of fields, NOT a pointer
const TypeAry *is_ary() const; // Array, NOT array pointer
+ const TypeAry *isa_ary() const; // Returns NULL of not ary
const TypeVect *is_vect() const; // Vector
const TypeVect *isa_vect() const; // Returns NULL if not a Vector
const TypePtr *is_ptr() const; // Asserts it is a ptr type
@@ -1615,6 +1616,10 @@
return (TypeAry*)this;
}
+inline const TypeAry *Type::isa_ary() const {
+ return ((_base == Array) ? (TypeAry*)this : NULL);
+}
+
inline const TypeVect *Type::is_vect() const {
assert( _base >= VectorS && _base <= VectorZ, "Not a Vector" );
return (TypeVect*)this;
--- a/src/hotspot/share/prims/jni.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/prims/jni.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -419,7 +419,7 @@
}
TempNewSymbol sym = SymbolTable::new_symbol(name);
- result = find_class_from_class_loader(env, sym, true, true, loader,
+ result = find_class_from_class_loader(env, sym, true, loader,
protection_domain, true, thread);
if (log_is_enabled(Debug, class, resolve) && result != NULL) {
@@ -3208,7 +3208,7 @@
Handle protection_domain; // null protection domain
TempNewSymbol sym = SymbolTable::new_symbol(name);
- jclass result = find_class_from_class_loader(env, sym, true, true, loader, protection_domain, true, CHECK_NULL);
+ jclass result = find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
if (log_is_enabled(Debug, class, resolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
--- a/src/hotspot/share/prims/jvm.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/prims/jvm.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -742,17 +742,6 @@
// Misc. class handling ///////////////////////////////////////////////////////////
-JVM_ENTRY(void, JVM_LinkClass(JNIEnv* env, jclass classClass, jclass arg))
- JVMWrapper("JVM_LinkClass");
-
- oop r = JNIHandles::resolve(arg);
- Klass* klass = java_lang_Class::as_Klass(r);
-
- if (!ClassForNameDeferLinking && klass->is_instance_klass()) {
- InstanceKlass::cast(klass)->link_class(CHECK);
- }
-JVM_END
-
JVM_ENTRY(jclass, JVM_GetCallerClass(JNIEnv* env))
JVMWrapper("JVM_GetCallerClass");
@@ -863,10 +852,9 @@
Handle h_loader(THREAD, loader_oop);
Handle h_prot(THREAD, protection_domain);
-
- jboolean link = !ClassForNameDeferLinking;
- jclass result = find_class_from_class_loader(env, h_name, init, link, h_loader,
+ jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, false, THREAD);
+
if (log_is_enabled(Debug, class, resolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
}
@@ -903,7 +891,7 @@
}
Handle h_loader(THREAD, class_loader);
Handle h_prot (THREAD, protection_domain);
- jclass result = find_class_from_class_loader(env, h_name, init, false, h_loader,
+ jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, true, thread);
if (log_is_enabled(Debug, class, resolve) && result != NULL) {
@@ -3052,50 +3040,6 @@
return JNIHandles::make_local(env, jthread);
JVM_END
-class CountStackFramesTC : public ThreadClosure {
- int _count;
- bool _suspended;
- public:
- CountStackFramesTC() : _count(0), _suspended(false) {}
- virtual void do_thread(Thread* thread) {
- JavaThread* jt = (JavaThread*)thread;
- if (!jt->is_external_suspend()) {
- // To keep same behavior we fail this operation,
- // even if it would work perfectly.
- return;
- }
- _suspended = true;
- // Count all java activation, i.e., number of vframes.
- for (vframeStream vfst(jt); !vfst.at_end(); vfst.next()) {
- // Native frames are not counted.
- if (!vfst.method()->is_native()) _count++;
- }
- }
- int count() { return _count; }
- int suspended() { return _suspended; }
-};
-
-JVM_ENTRY(jint, JVM_CountStackFrames(JNIEnv* env, jobject jthread))
- JVMWrapper("JVM_CountStackFrames");
-
- ThreadsListHandle tlh(thread);
- JavaThread* receiver = NULL;
- bool is_alive = tlh.cv_internal_thread_to_JavaThread(jthread, &receiver, NULL);
- if (is_alive) {
- // jthread refers to a live JavaThread.
- CountStackFramesTC csf;
- Handshake::execute(&csf, receiver);
- if (!csf.suspended()) {
- THROW_MSG_0(vmSymbols::java_lang_IllegalThreadStateException(),
- "this thread is not suspended");
- }
- return csf.count();
- }
- // Implied else: if JavaThread is not alive simply return a count of 0.
- return 0;
-JVM_END
-
-
JVM_ENTRY(void, JVM_Interrupt(JNIEnv* env, jobject jthread))
JVMWrapper("JVM_Interrupt");
@@ -3109,21 +3053,6 @@
JVM_END
-JVM_ENTRY(jboolean, JVM_IsInterrupted(JNIEnv* env, jobject jthread, jboolean clear_interrupted))
- JVMWrapper("JVM_IsInterrupted");
-
- ThreadsListHandle tlh(thread);
- JavaThread* receiver = NULL;
- bool is_alive = tlh.cv_internal_thread_to_JavaThread(jthread, &receiver, NULL);
- if (is_alive) {
- // jthread refers to a live JavaThread.
- return (jboolean) receiver->is_interrupted(clear_interrupted != 0);
- } else {
- return JNI_FALSE;
- }
-JVM_END
-
-
// Return true iff the current thread has locked the object passed in
JVM_ENTRY(jboolean, JVM_HoldsLock(JNIEnv* env, jclass threadClass, jobject obj))
@@ -3469,12 +3398,9 @@
// Shared JNI/JVM entry points //////////////////////////////////////////////////////////////
-jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, jboolean link,
+jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init,
Handle loader, Handle protection_domain,
jboolean throwError, TRAPS) {
- // Initialization also implies linking - check for coherent args
- assert((init && link) || !init, "incorrect use of init/link arguments");
-
// Security Note:
// The Java level wrapper will perform the necessary security check allowing
// us to pass the NULL as the initiating class loader. The VM is responsible for
@@ -3483,11 +3409,9 @@
// if there is no security manager in 3-arg Class.forName().
Klass* klass = SystemDictionary::resolve_or_fail(name, loader, protection_domain, throwError != 0, CHECK_NULL);
- // Check if we should initialize the class (which implies linking), or just link it
+ // Check if we should initialize the class
if (init && klass->is_instance_klass()) {
klass->initialize(CHECK_NULL);
- } else if (link && klass->is_instance_klass()) {
- InstanceKlass::cast(klass)->link_class(CHECK_NULL);
}
return (jclass) JNIHandles::make_local(env, klass->java_mirror());
}
--- a/src/hotspot/share/prims/jvm_misc.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/prims/jvm_misc.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -31,8 +31,7 @@
// Useful entry points shared by JNI and JVM interface.
// We do not allow real JNI or JVM entry point to call each other.
-jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, jboolean link,
- Handle loader, Handle protection_domain, jboolean throwError, TRAPS);
+jclass find_class_from_class_loader(JNIEnv* env, Symbol* name, jboolean init, Handle loader, Handle protection_domain, jboolean throwError, TRAPS);
void trace_class_resolution(Klass* to_class);
--- a/src/hotspot/share/prims/jvmtiEnv.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -879,8 +879,7 @@
if (jts == _thread_in_native) {
state |= JVMTI_THREAD_STATE_IN_NATIVE;
}
- OSThread* osThread = java_thread->osthread();
- if (osThread != NULL && osThread->interrupted()) {
+ if (java_thread->is_interrupted(false)) {
state |= JVMTI_THREAD_STATE_INTERRUPTED;
}
}
@@ -1092,7 +1091,6 @@
// thread - NOT pre-checked
jvmtiError
JvmtiEnv::InterruptThread(jthread thread) {
- // TODO: this is very similar to JVM_Interrupt(); share code in future
JavaThread* current_thread = JavaThread::current();
JavaThread* java_thread = NULL;
ThreadsListHandle tlh(current_thread);
@@ -1100,7 +1098,11 @@
if (err != JVMTI_ERROR_NONE) {
return err;
}
-
+ // Really this should be a Java call to Thread.interrupt to ensure the same
+ // semantics, however historically this has not been done for some reason.
+ // So we continue with that (which means we don't interact with any Java-level
+ // Interruptible object) but we must set the Java-level interrupted state.
+ java_lang_Thread::set_interrupted(JNIHandles::resolve(thread), true);
java_thread->interrupt();
return JVMTI_ERROR_NONE;
--- a/src/hotspot/share/prims/jvmtiEnvBase.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/prims/jvmtiEnvBase.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1214,8 +1214,7 @@
if (jts == _thread_in_native) {
state |= JVMTI_THREAD_STATE_IN_NATIVE;
}
- OSThread* osThread = thr->osthread();
- if (osThread != NULL && osThread->interrupted()) {
+ if (thr->is_interrupted(false)) {
state |= JVMTI_THREAD_STATE_INTERRUPTED;
}
}
--- a/src/hotspot/share/runtime/arguments.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/arguments.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -3147,7 +3147,13 @@
NOT_PRODUCT(UNSUPPORTED_OPTION(TraceProfileInterpreter));
#endif
-#ifndef TIERED
+
+#ifdef TIERED
+ // Parse the CompilationMode flag
+ if (!CompilationModeFlag::initialize()) {
+ return JNI_ERR;
+ }
+#else
// Tiered compilation is undefined.
UNSUPPORTED_OPTION(TieredCompilation);
#endif
@@ -4023,6 +4029,12 @@
no_shared_spaces("CDS Disabled");
#endif // INCLUDE_CDS
+#ifndef TIERED
+ if (FLAG_IS_CMDLINE(CompilationMode)) {
+ warning("CompilationMode has no effect in non-tiered VMs");
+ }
+#endif
+
return JNI_OK;
}
--- a/src/hotspot/share/runtime/fieldDescriptor.inline.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/fieldDescriptor.inline.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -31,11 +31,11 @@
// must be put in this file, as they require runtime/handles.inline.hpp.
inline Symbol* fieldDescriptor::name() const {
- return field()->name(_cp());
+ return field()->name(_cp);
}
inline Symbol* fieldDescriptor::signature() const {
- return field()->signature(_cp());
+ return field()->signature(_cp);
}
inline InstanceKlass* fieldDescriptor::field_holder() const {
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -60,17 +60,32 @@
* 4) The JVM is build using the compilers and tiered compilation is enabled. The option
* 'TieredStopAtLevel = CompLevel_full_optimization' (the default value). As a result,
* the minimum number of compiler threads is 2.
+ * 5) Non-tiered emulation mode is on. CompilationModeFlag::disable_intermediate() == true.
+ * The mininum number of threads is 2. But if CompilationModeFlag::quick_internal() == false, then it's 1.
*/
JVMFlag::Error CICompilerCountConstraintFunc(intx value, bool verbose) {
int min_number_of_compiler_threads = 0;
#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
// case 1
+#elif defined(TIERED)
+ if (TieredCompilation) {
+ if (TieredStopAtLevel < CompLevel_full_optimization || CompilationModeFlag::quick_only()) {
+ min_number_of_compiler_threads = 1; // case 3
+ } else if (CompilationModeFlag::disable_intermediate()) {
+ // case 5
+ if (CompilationModeFlag::quick_internal()) {
+ min_number_of_compiler_threads = 2;
+ } else {
+ min_number_of_compiler_threads = 1;
+ }
+ } else {
+ min_number_of_compiler_threads = 2; // case 4 (tiered)
+ }
+ } else {
+ min_number_of_compiler_threads = 1; // case 2
+ }
#else
- if (!TieredCompilation || (TieredStopAtLevel < CompLevel_full_optimization)) {
- min_number_of_compiler_threads = 1; // case 2 or case 3
- } else {
- min_number_of_compiler_threads = 2; // case 4 (tiered)
- }
+ min_number_of_compiler_threads = 1; // case 2
#endif
// The default CICompilerCount's value is CI_COMPILER_COUNT.
--- a/src/hotspot/share/runtime/globals.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/globals.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -2059,6 +2059,35 @@
"if coming from AOT") \
range(0, max_jint) \
\
+ diagnostic(intx, Tier0AOTInvocationThreshold, 200, \
+ "Switch to interpreter to profile if the number of method " \
+ "invocations crosses this threshold if coming from AOT " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier0AOTMinInvocationThreshold, 100, \
+ "Minimum number of invocations to switch to interpreter " \
+ "to profile if coming from AOT " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier0AOTCompileThreshold, 2000, \
+ "Threshold at which to switch to interpreter to profile " \
+ "if coming from AOT " \
+ "(invocation minimum must be satisfied, " \
+ "applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier0AOTBackEdgeThreshold, 60000, \
+ "Back edge threshold at which to switch to interpreter " \
+ "to profile if coming from AOT " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
product(intx, Tier4InvocationThreshold, 5000, \
"Compile if number of method invocations crosses this " \
"threshold") \
@@ -2070,13 +2099,44 @@
\
product(intx, Tier4CompileThreshold, 15000, \
"Threshold at which tier 4 compilation is invoked (invocation " \
- "minimum must be satisfied") \
+ "minimum must be satisfied)") \
range(0, max_jint) \
\
product(intx, Tier4BackEdgeThreshold, 40000, \
"Back edge threshold at which tier 4 OSR compilation is invoked") \
range(0, max_jint) \
\
+ diagnostic(intx, Tier40InvocationThreshold, 5000, \
+ "Compile if number of method invocations crosses this " \
+ "threshold (applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier40MinInvocationThreshold, 600, \
+ "Minimum number of invocations to compile at tier 4 " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier40CompileThreshold, 10000, \
+ "Threshold at which tier 4 compilation is invoked (invocation " \
+ "minimum must be satisfied, applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier40BackEdgeThreshold, 15000, \
+ "Back edge threshold at which tier 4 OSR compilation is invoked " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
+ diagnostic(intx, Tier0Delay, 5, \
+ "If C2 queue size grows over this amount per compiler thread " \
+ "do not start profiling in the interpreter " \
+ "(applicable only with " \
+ "CompilationMode=high-only|high-only-quick-internal)") \
+ range(0, max_jint) \
+ \
product(intx, Tier3DelayOn, 5, \
"If C2 queue size grows over this amount per compiler thread " \
"stop compiling at tier 3 and start compiling at tier 2") \
@@ -2108,7 +2168,9 @@
\
product(intx, Tier0ProfilingStartPercentage, 200, \
"Start profiling in interpreter if the counters exceed tier 3 " \
- "thresholds by the specified percentage") \
+ "thresholds (tier 4 thresholds with " \
+ "CompilationMode=high-only|high-only-quick-internal)" \
+ "by the specified percentage") \
range(0, max_jint) \
\
product(uintx, IncreaseFirstTierCompileThresholdAt, 50, \
@@ -2124,6 +2186,14 @@
"Maximum rate sampling interval (in milliseconds)") \
range(0, max_intx) \
\
+ product(ccstr, CompilationMode, "default", \
+ "Compilation modes: " \
+ "default: normal tiered compilation; " \
+ "quick-only: C1-only mode; " \
+ "high-only: C2/JVMCI-only mode; " \
+ "high-only-quick-internal: C2/JVMCI-only mode, " \
+ "with JVMCI compiler compiled with C1.") \
+ \
product_pd(bool, TieredCompilation, \
"Enable tiered compilation") \
\
@@ -2153,9 +2223,6 @@
"Maximum total size of NIO direct-buffer allocations") \
range(0, max_jlong) \
\
- product(bool, ClassForNameDeferLinking, false, \
- "Revert to not linking in Class.forName()") \
- \
/* Flags used for temporary code during development */ \
\
diagnostic(bool, UseNewCode, false, \
--- a/src/hotspot/share/runtime/os.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/os.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -755,8 +755,8 @@
NOT_PRODUCT(inc_stat_counter(&num_mallocs, 1));
NOT_PRODUCT(inc_stat_counter(&alloc_bytes, size));
// NMT support
- void* membase = MemTracker::record_free(memblock);
NMT_TrackingLevel level = MemTracker::tracking_level();
+ void* membase = MemTracker::record_free(memblock, level);
size_t nmt_header_size = MemTracker::malloc_header_size(level);
void* ptr = ::realloc(membase, size + nmt_header_size);
return MemTracker::record_malloc(ptr, size, memflags, stack, level);
@@ -797,7 +797,7 @@
log_warning(malloc, free)("os::free caught " PTR_FORMAT, p2i(memblock));
breakpoint();
}
- void* membase = MemTracker::record_free(memblock);
+ void* membase = MemTracker::record_free(memblock, MemTracker::tracking_level());
verify_memory(membase);
GuardedMemory guarded(membase);
@@ -806,7 +806,7 @@
membase = guarded.release_for_freeing();
::free(membase);
#else
- void* membase = MemTracker::record_free(memblock);
+ void* membase = MemTracker::record_free(memblock, MemTracker::tracking_level());
::free(membase);
#endif
}
--- a/src/hotspot/share/runtime/osThread.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/osThread.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -30,7 +30,6 @@
pd_initialize();
set_start_proc(start_proc);
set_start_parm(start_parm);
- _interrupted = 0;
}
OSThread::~OSThread() {
--- a/src/hotspot/share/runtime/osThread.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/osThread.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -62,12 +62,6 @@
OSThreadStartFunc _start_proc; // Thread start routine
void* _start_parm; // Thread start routine parameter
volatile ThreadState _state; // Thread state *hint*
- volatile jint _interrupted; // Thread.isInterrupted state
-
- // Note: _interrupted must be jint, so that Java intrinsics can access it.
- // The value stored there must be either 0 or 1. It must be possible
- // for Java to emulate Thread.currentThread().isInterrupted() by performing
- // the double indirection Thread::current()->_osthread->_interrupted.
// Methods
public:
@@ -82,18 +76,14 @@
void set_start_proc(OSThreadStartFunc start_proc) { _start_proc = start_proc; }
void* start_parm() const { return _start_parm; }
void set_start_parm(void* start_parm) { _start_parm = start_parm; }
- // These are specialized on Windows.
+ // This is specialized on Windows.
#ifndef _WINDOWS
- volatile bool interrupted() const { return _interrupted != 0; }
- void set_interrupted(bool z) { _interrupted = z ? 1 : 0; }
+ void set_interrupted(bool z) { /* nothing to do */ }
#endif
// Printing
void print_on(outputStream* st) const;
void print() const;
- // For java intrinsics:
- static ByteSize interrupted_offset() { return byte_offset_of(OSThread, _interrupted); }
-
// Platform dependent stuff
#include OS_HEADER(osThread)
--- a/src/hotspot/share/runtime/sharedRuntime.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -2615,7 +2615,7 @@
AdapterHandlerEntry* AdapterHandlerLibrary::get_adapter(const methodHandle& method) {
AdapterHandlerEntry* entry = get_adapter0(method);
- if (method->is_shared()) {
+ if (entry != NULL && method->is_shared()) {
// See comments around Method::link_method()
MutexLocker mu(AdapterHandlerLibrary_lock);
if (method->adapter() == NULL) {
--- a/src/hotspot/share/runtime/thread.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/thread.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -1725,19 +1725,13 @@
void JavaThread::interrupt() {
debug_only(check_for_dangling_thread_pointer(this);)
- if (!osthread()->interrupted()) {
- osthread()->set_interrupted(true);
- // More than one thread can get here with the same value of osthread,
- // resulting in multiple notifications. We do, however, want the store
- // to interrupted() to be visible to other threads before we execute unpark().
- OrderAccess::fence();
-
- // For JavaThread::sleep. Historically we only unpark if changing to the interrupted
- // state, in contrast to the other events below. Not clear exactly why.
- _SleepEvent->unpark();
- }
-
- // For JSR166. Unpark even if interrupt status already was set.
+ // For Windows _interrupt_event
+ osthread()->set_interrupted(true);
+
+ // For Thread.sleep
+ _SleepEvent->unpark();
+
+ // For JSR166 LockSupport.park
parker()->unpark();
// For ObjectMonitor and JvmtiRawMonitor
@@ -1747,11 +1741,21 @@
bool JavaThread::is_interrupted(bool clear_interrupted) {
debug_only(check_for_dangling_thread_pointer(this);)
- bool interrupted = osthread()->interrupted();
+
+ if (threadObj() == NULL) {
+ // If there is no j.l.Thread then it is impossible to have
+ // been interrupted. We can find NULL during VM initialization
+ // or when a JNI thread is still in the process of attaching.
+ // In such cases this must be the current thread.
+ assert(this == Thread::current(), "invariant");
+ return false;
+ }
+
+ bool interrupted = java_lang_Thread::interrupted(threadObj());
// NOTE that since there is no "lock" around the interrupt and
// is_interrupted operations, there is the possibility that the
- // interrupted flag (in osThread) will be "false" but that the
+ // interrupted flag will be "false" but that the
// low-level events will be in the signaled state. This is
// intentional. The effect of this is that Object.wait() and
// LockSupport.park() will appear to have a spurious wakeup, which
@@ -1761,9 +1765,13 @@
// to JavaThread::sleep, so there is no early return. It has also been
// recommended not to put the interrupted flag into the "event"
// structure because it hides the issue.
+ // Also, because there is no lock, we must only clear the interrupt
+ // state if we are going to report that we were interrupted; otherwise
+ // an interrupt that happens just after we read the field would be lost.
if (interrupted && clear_interrupted) {
+ assert(this == Thread::current(), "only the current thread can clear");
+ java_lang_Thread::set_interrupted(threadObj(), false);
osthread()->set_interrupted(false);
- // consider thread->_SleepEvent->reset() ... optional optimization
}
return interrupted;
@@ -2417,6 +2425,7 @@
// Interrupt thread so it will wake up from a potential wait()/sleep()/park()
+ java_lang_Thread::set_interrupted(threadObj(), true);
this->interrupt();
}
--- a/src/hotspot/share/runtime/vmStructs.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/runtime/vmStructs.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -786,7 +786,6 @@
/* OSThread */ \
/************/ \
\
- volatile_nonstatic_field(OSThread, _interrupted, jint) \
volatile_nonstatic_field(OSThread, _state, ThreadState) \
\
/************************/ \
--- a/src/hotspot/share/services/mallocTracker.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/services/mallocTracker.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -119,6 +119,7 @@
// Record a malloc memory allocation
void* MallocTracker::record_malloc(void* malloc_base, size_t size, MEMFLAGS flags,
const NativeCallStack& stack, NMT_TrackingLevel level) {
+ assert(level != NMT_off, "precondition");
void* memblock; // the address for user data
MallocHeader* header = NULL;
@@ -128,10 +129,6 @@
// Uses placement global new operator to initialize malloc header
- if (level == NMT_off) {
- return malloc_base;
- }
-
header = ::new (malloc_base)MallocHeader(size, flags, stack, level);
memblock = (void*)((char*)malloc_base + sizeof(MallocHeader));
@@ -151,14 +148,9 @@
}
void* MallocTracker::record_free(void* memblock) {
- // Never turned on
- if (MemTracker::tracking_level() == NMT_off ||
- memblock == NULL) {
- return memblock;
- }
+ assert(MemTracker::tracking_level() != NMT_off && memblock != NULL, "precondition");
MallocHeader* header = malloc_header(memblock);
header->release();
-
return (void*)header;
}
--- a/src/hotspot/share/services/memTracker.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/services/memTracker.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -147,7 +147,7 @@
// Shutdown can only be issued via JCmd, and NMT JCmd is serialized by lock
void MemTracker::shutdown() {
// We can only shutdown NMT to minimal tracking level if it is ever on.
- if (tracking_level () > NMT_minimal) {
+ if (tracking_level() > NMT_minimal) {
transition_to(NMT_minimal);
}
}
--- a/src/hotspot/share/services/memTracker.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/services/memTracker.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -59,7 +59,7 @@
static inline size_t malloc_header_size(NMT_TrackingLevel level) { return 0; }
static inline size_t malloc_header_size(void* memblock) { return 0; }
static inline void* malloc_base(void* memblock) { return memblock; }
- static inline void* record_free(void* memblock) { return memblock; }
+ static inline void* record_free(void* memblock, NMT_TrackingLevel level) { return memblock; }
static inline void record_new_arena(MEMFLAGS flag) { }
static inline void record_arena_free(MEMFLAGS flag) { }
@@ -157,7 +157,10 @@
static inline void* record_malloc(void* mem_base, size_t size, MEMFLAGS flag,
const NativeCallStack& stack, NMT_TrackingLevel level) {
- return MallocTracker::record_malloc(mem_base, size, flag, stack, level);
+ if (level != NMT_off) {
+ return MallocTracker::record_malloc(mem_base, size, flag, stack, level);
+ }
+ return mem_base;
}
static inline size_t malloc_header_size(NMT_TrackingLevel level) {
@@ -177,7 +180,11 @@
static void* malloc_base(void* memblock);
// Record malloc free and return malloc base address
- static inline void* record_free(void* memblock) {
+ static inline void* record_free(void* memblock, NMT_TrackingLevel level) {
+ // Never turned on
+ if (level == NMT_off || memblock == NULL) {
+ return memblock;
+ }
return MallocTracker::record_free(memblock);
}
--- a/src/hotspot/share/utilities/bitMap.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/utilities/bitMap.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -26,6 +26,7 @@
#define SHARE_UTILITIES_BITMAP_HPP
#include "memory/allocation.hpp"
+#include "runtime/atomic.hpp"
#include "utilities/align.hpp"
// Forward decl;
@@ -105,6 +106,8 @@
void set_word (idx_t word) { set_word(word, ~(bm_word_t)0); }
void clear_word(idx_t word) { _map[word] = 0; }
+ static inline const bm_word_t load_word_ordered(const volatile bm_word_t* const addr, atomic_memory_order memory_order);
+
// Utilities for ranges of bits. Ranges are half-open [beg, end).
// Ranges within a single word.
@@ -204,6 +207,9 @@
return (*word_addr(index) & bit_mask(index)) != 0;
}
+ // memory_order must be memory_order_relaxed or memory_order_acquire.
+ bool par_at(idx_t index, atomic_memory_order memory_order = memory_order_acquire) const;
+
// Align bit index up or down to the next bitmap word boundary, or check
// alignment.
static idx_t word_align_up(idx_t bit) {
@@ -220,9 +226,14 @@
inline void set_bit(idx_t bit);
inline void clear_bit(idx_t bit);
- // Atomically set or clear the specified bit.
- inline bool par_set_bit(idx_t bit);
- inline bool par_clear_bit(idx_t bit);
+ // Attempts to change a bit to a desired value. The operation returns true if
+ // this thread changed the value of the bit. It was changed with a RMW operation
+ // using the specified memory_order. The operation returns false if the change
+ // could not be set due to the bit already being observed in the desired state.
+ // The atomic access that observed the bit in the desired state has acquire
+ // semantics, unless memory_order is memory_order_relaxed or memory_order_release.
+ inline bool par_set_bit(idx_t bit, atomic_memory_order memory_order = memory_order_conservative);
+ inline bool par_clear_bit(idx_t bit, atomic_memory_order memory_order = memory_order_conservative);
// Put the given value at the given offset. The parallel version
// will CAS the value into the bitmap and is quite a bit slower.
--- a/src/hotspot/share/utilities/bitMap.inline.hpp Thu Oct 31 16:16:21 2019 +0000
+++ b/src/hotspot/share/utilities/bitMap.inline.hpp Thu Nov 07 18:44:09 2019 +0000
@@ -26,6 +26,7 @@
#define SHARE_UTILITIES_BITMAP_INLINE_HPP
#include "runtime/atomic.hpp"
+#include "runtime/orderAccess.hpp"
#include "utilities/bitMap.hpp"
#include "utilities/count_trailing_zeros.hpp"
@@ -39,18 +40,39 @@
*word_addr(bit) &= ~bit_mask(bit);
}
-inline bool BitMap::par_set_bit(idx_t bit) {
+inline const BitMap::bm_word_t BitMap::load_word_ordered(const volatile bm_word_t* const addr, atomic_memory_order memory_order) {
+ if (memory_order == memory_order_relaxed || memory_order == memory_order_release) {
+ return Atomic::load(addr);
+ } else {
+ assert(memory_order == memory_order_acq_rel ||
+ memory_order == memory_order_acquire ||
+ memory_order == memory_order_conservative,
+ "unexpected memory ordering");
+ return OrderAccess::load_acquire(addr);
+ }
+}
+
+inline bool BitMap::par_at(idx_t index, atomic_memory_order memory_order) const {
+ verify_index(index);
+ assert(memory_order == memory_order_acquire ||
+ memory_order == memory_order_relaxed,
+ "unexpected memory ordering");
+ const volatile bm_word_t* const addr = word_addr(index);
+ return (load_word_ordered(addr, memory_order) & bit_mask(index)) != 0;
+}
+
+inline bool BitMap::par_set_bit(idx_t bit, atomic_memory_order memory_order) {
verify_index(bit);
volatile bm_word_t* const addr = word_addr(bit);
const bm_word_t mask = bit_mask(bit);
- bm_word_t old_val = *addr;
+ bm_word_t old_val = load_word_ordered(addr, memory_order);
do {
const bm_word_t new_val = old_val | mask;
if (new_val == old_val) {
return false; // Someone else beat us to it.
}
- const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val);
+ const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val, memory_order);
if (cur_val == old_val) {
return true; // Success.
}
@@ -58,18 +80,18 @@
} while (true);
}
-inline bool BitMap::par_clear_bit(idx_t bit) {
+inline bool BitMap::par_clear_bit(idx_t bit, atomic_memory_order memory_order) {
verify_index(bit);
volatile bm_word_t* const addr = word_addr(bit);
const bm_word_t mask = ~bit_mask(bit);
- bm_word_t old_val = *addr;
+ bm_word_t old_val = load_word_ordered(addr, memory_order);
do {
const bm_word_t new_val = old_val & mask;
if (new_val == old_val) {
return false; // Someone else beat us to it.
}
- const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val);
+ const bm_word_t cur_val = Atomic::cmpxchg(new_val, addr, old_val, memory_order);
if (cur_val == old_val) {
return true; // Success.
}
--- a/src/java.base/share/classes/java/lang/Class.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/Class.java Thu Nov 07 18:44:09 2019 +0000
@@ -392,10 +392,6 @@
*
* @see java.lang.Class#forName(String)
* @see java.lang.ClassLoader
- *
- * @jls 12.2 Loading of Classes and Interfaces
- * @jls 12.3 Linking of Classes and Interfaces
- * @jls 12.4 Initialization of Classes and Interfaces
* @since 1.2
*/
@CallerSensitive
@@ -442,10 +438,6 @@
* <p> This method does not check whether the requested class is
* accessible to its caller. </p>
*
- * <p> Note that this method throws errors related to loading and linking as
- * specified in Sections 12.2 and 12.3 of <em>The Java Language
- * Specification</em>.
- *
* @apiNote
* This method returns {@code null} on failure rather than
* throwing a {@link ClassNotFoundException}, as is done by
@@ -473,8 +465,6 @@
* in a module.</li>
* </ul>
*
- * @jls 12.2 Loading of Classes and Interfaces
- * @jls 12.3 Linking of Classes and Interfaces
* @since 9
* @spec JPMS
*/
@@ -498,21 +488,13 @@
cl = module.getClassLoader();
}
- Class<?> ret;
if (cl != null) {
- ret = cl.loadClass(module, name);
+ return cl.loadClass(module, name);
} else {
- ret = BootLoader.loadClass(module, name);
+ return BootLoader.loadClass(module, name);
}
- if (ret != null) {
- // The loaded class should also be linked
- linkClass(ret);
- }
- return ret;
}
- private static native void linkClass(Class<?> c);
-
/**
* Creates a new instance of the class represented by this {@code Class}
* object. The class is instantiated as if by a {@code new}
--- a/src/java.base/share/classes/java/lang/Math.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/Math.java Thu Nov 07 18:44:09 2019 +0000
@@ -1259,16 +1259,17 @@
* Examples:
* <ul>
* <li>If the signs of the arguments are the same, the results
- * of {@code floorMod} and the {@code %} operator are the same. <br>
+ * of {@code floorMod} and the {@code %} operator are the same.<br>
* <ul>
- * <li>{@code floorMod(4, 3) == 1}; and {@code (4 % 3) == 1}</li>
+ * <li>{@code floorMod(+4, +3) == +1}; and {@code (+4 % +3) == +1}</li>
+ * <li>{@code floorMod(-4, -3) == -1}; and {@code (-4 % -3) == -1}</li>
* </ul>
- * <li>If the signs of the arguments are different, the results differ from the {@code %} operator.<br>
- * <ul>
- * <li>{@code floorMod(+4, -3) == -2}; and {@code (+4 % -3) == +1} </li>
- * <li>{@code floorMod(-4, +3) == +2}; and {@code (-4 % +3) == -1} </li>
- * <li>{@code floorMod(-4, -3) == -1}; and {@code (-4 % -3) == -1 } </li>
- * </ul>
+ * <li>If the signs of the arguments are different, the results
+ * differ from the {@code %} operator.<br>
+ * <ul>
+ * <li>{@code floorMod(+4, -3) == -2}; and {@code (+4 % -3) == +1}</li>
+ * <li>{@code floorMod(-4, +3) == +2}; and {@code (-4 % +3) == -1}</li>
+ * </ul>
* </li>
* </ul>
* <p>
--- a/src/java.base/share/classes/java/lang/Runtime.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/Runtime.java Thu Nov 07 18:44:09 2019 +0000
@@ -896,7 +896,7 @@
* <blockquote><pre>
* $VNUM(-$PRE)?\+$BUILD(-$OPT)?
* $VNUM-$PRE(-$OPT)?
- * $VNUM(+-$OPT)?
+ * $VNUM(\+-$OPT)?
* </pre></blockquote>
*
* <p> where: </p>
--- a/src/java.base/share/classes/java/lang/Thread.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/Thread.java Thu Nov 07 18:44:09 2019 +0000
@@ -154,6 +154,9 @@
/* Whether or not the thread is a daemon thread. */
private boolean daemon = false;
+ /* Interrupt state of the thread - read/written directly by JVM */
+ private volatile boolean interrupted;
+
/* Fields reserved for exclusive use by the JVM */
private boolean stillborn = false;
private long eetop;
@@ -971,10 +974,14 @@
*
* <p> Interrupting a thread that is not alive need not have any effect.
*
+ * @implNote In the JDK Reference Implementation, interruption of a thread
+ * that is not alive still records that the interrupt request was made and
+ * will report it via {@link #interrupted} and {@link #isInterrupted()}.
+ *
* @throws SecurityException
* if the current thread cannot modify this thread
*
- * @revised 6.0
+ * @revised 6.0, 14
* @spec JSR-51
*/
public void interrupt() {
@@ -985,14 +992,15 @@
synchronized (blockerLock) {
Interruptible b = blocker;
if (b != null) {
- interrupt0(); // set interrupt status
+ interrupted = true;
+ interrupt0(); // inform VM of interrupt
b.interrupt(this);
return;
}
}
}
-
- // set interrupt status
+ interrupted = true;
+ // inform VM of interrupt
interrupt0();
}
@@ -1004,45 +1012,38 @@
* interrupted again, after the first call had cleared its interrupted
* status and before the second call had examined it).
*
- * <p>A thread interruption ignored because a thread was not alive
- * at the time of the interrupt will be reflected by this method
- * returning false.
- *
* @return {@code true} if the current thread has been interrupted;
* {@code false} otherwise.
* @see #isInterrupted()
- * @revised 6.0
+ * @revised 6.0, 14
*/
public static boolean interrupted() {
- return currentThread().isInterrupted(true);
+ Thread t = currentThread();
+ boolean interrupted = t.interrupted;
+ // We may have been interrupted the moment after we read the field,
+ // so only clear the field if we saw that it was set and will return
+ // true; otherwise we could lose an interrupt.
+ if (interrupted) {
+ t.interrupted = false;
+ clearInterruptEvent();
+ }
+ return interrupted;
}
/**
* Tests whether this thread has been interrupted. The <i>interrupted
* status</i> of the thread is unaffected by this method.
*
- * <p>A thread interruption ignored because a thread was not alive
- * at the time of the interrupt will be reflected by this method
- * returning false.
- *
* @return {@code true} if this thread has been interrupted;
* {@code false} otherwise.
* @see #interrupted()
- * @revised 6.0
+ * @revised 6.0, 14
*/
public boolean isInterrupted() {
- return isInterrupted(false);
+ return interrupted;
}
/**
- * Tests if some Thread has been interrupted. The interrupted state
- * is reset or not based on the value of ClearInterrupted that is
- * passed.
- */
- @HotSpotIntrinsicCandidate
- private native boolean isInterrupted(boolean ClearInterrupted);
-
- /**
* Tests if this thread is alive. A thread is alive if it has
* been started and has not yet died.
*
@@ -1251,20 +1252,20 @@
}
/**
- * Counts the number of stack frames in this thread. The thread must
- * be suspended.
+ * Throws {@code UnsupportedOperationException}.
+ *
+ * @return nothing
*
- * @return the number of stack frames in this thread.
- * @throws IllegalThreadStateException if this thread is not
- * suspended.
- * @deprecated The definition of this call depends on {@link #suspend},
- * which is deprecated. Further, the results of this call
- * were never well-defined.
+ * @deprecated This method was originally designed to count the number of
+ * stack frames but the results were never well-defined and it
+ * depended on thread-suspension.
* This method is subject to removal in a future version of Java SE.
* @see StackWalker
*/
@Deprecated(since="1.2", forRemoval=true)
- public native int countStackFrames();
+ public int countStackFrames() {
+ throw new UnsupportedOperationException();
+ }
/**
* Waits at most {@code millis} milliseconds for this thread to
@@ -2080,5 +2081,6 @@
private native void suspend0();
private native void resume0();
private native void interrupt0();
+ private static native void clearInterruptEvent();
private native void setNativeName(String name);
}
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java Thu Nov 07 18:44:09 2019 +0000
@@ -29,6 +29,7 @@
import sun.invoke.util.BytecodeDescriptor;
import jdk.internal.misc.Unsafe;
import sun.security.action.GetPropertyAction;
+import sun.security.action.GetBooleanAction;
import java.io.FilePermission;
import java.io.Serializable;
@@ -87,10 +88,15 @@
// For dumping generated classes to disk, for debugging purposes
private static final ProxyClassesDumper dumper;
+ private static final boolean disableEagerInitialization;
+
static {
- final String key = "jdk.internal.lambda.dumpProxyClasses";
- String path = GetPropertyAction.privilegedGetProperty(key);
- dumper = (null == path) ? null : ProxyClassesDumper.getInstance(path);
+ final String dumpProxyClassesKey = "jdk.internal.lambda.dumpProxyClasses";
+ String dumpPath = GetPropertyAction.privilegedGetProperty(dumpProxyClassesKey);
+ dumper = (null == dumpPath) ? null : ProxyClassesDumper.getInstance(dumpPath);
+
+ final String disableEagerInitializationKey = "jdk.internal.lambda.disableEagerInitialization";
+ disableEagerInitialization = GetBooleanAction.privilegedGetProperty(disableEagerInitializationKey);
}
// See context values in AbstractValidatingLambdaMetafactory
@@ -187,7 +193,9 @@
@Override
CallSite buildCallSite() throws LambdaConversionException {
final Class<?> innerClass = spinInnerClass();
- if (invokedType.parameterCount() == 0) {
+ if (invokedType.parameterCount() == 0 && !disableEagerInitialization) {
+ // In the case of a non-capturing lambda, we optimize linkage by pre-computing a single instance,
+ // unless we've suppressed eager initialization
final Constructor<?>[] ctrs = AccessController.doPrivileged(
new PrivilegedAction<>() {
@Override
@@ -215,7 +223,9 @@
}
} else {
try {
- UNSAFE.ensureClassInitialized(innerClass);
+ if (!disableEagerInitialization) {
+ UNSAFE.ensureClassInitialized(innerClass);
+ }
return new ConstantCallSite(
MethodHandles.Lookup.IMPL_LOOKUP
.findStatic(innerClass, NAME_FACTORY, invokedType));
@@ -273,7 +283,7 @@
generateConstructor();
- if (invokedType.parameterCount() != 0) {
+ if (invokedType.parameterCount() != 0 || disableEagerInitialization) {
generateFactory();
}
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java Thu Nov 07 18:44:09 2019 +0000
@@ -1933,17 +1933,12 @@
}
/**
- * Looks up a class by name from the lookup context defined by this {@code Lookup} object.
- * This method attempts to locate, load, and link the class, and then determines whether
- * the class is accessible to this {@code Lookup} object. The static
+ * Looks up a class by name from the lookup context defined by this {@code Lookup} object. The static
* initializer of the class is not run.
* <p>
* The lookup context here is determined by the {@linkplain #lookupClass() lookup class}, its class
- * loader, and the {@linkplain #lookupModes() lookup modes}.
- * <p>
- * Note that this method throws errors related to loading and linking as
- * specified in Sections 12.2 and 12.3 of <em>The Java Language
- * Specification</em>.
+ * loader, and the {@linkplain #lookupModes() lookup modes}. In particular, the method first attempts to
+ * load the requested class, and then determines whether the class is accessible to this lookup object.
*
* @param targetName the fully qualified name of the class to be looked up.
* @return the requested class.
@@ -1955,9 +1950,6 @@
* modes.
* @throws SecurityException if a security manager is present and it
* <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
- *
- * @jls 12.2 Loading of Classes and Interfaces
- * @jls 12.3 Linking of Classes and Interfaces
* @since 9
*/
public Class<?> findClass(String targetName) throws ClassNotFoundException, IllegalAccessException {
--- a/src/java.base/share/classes/java/net/DatagramSocket.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java Thu Nov 07 18:44:09 2019 +0000
@@ -606,7 +606,6 @@
* @see #bind(SocketAddress)
* @since 1.4
*/
-
public SocketAddress getLocalSocketAddress() {
if (isClosed())
return null;
@@ -853,7 +852,7 @@
public InetAddress getLocalAddress() {
if (isClosed())
return null;
- InetAddress in = null;
+ InetAddress in;
try {
in = (InetAddress) getImpl().getOption(SocketOptions.SO_BINDADDR);
if (in.isAnyLocalAddress()) {
@@ -874,8 +873,8 @@
* is bound.
*
* @return the port number on the local host to which this socket is bound,
- {@code -1} if the socket is closed, or
- {@code 0} if it is not bound yet.
+ * {@code -1} if the socket is closed, or
+ * {@code 0} if it is not bound yet.
*/
public int getLocalPort() {
if (isClosed())
@@ -887,15 +886,16 @@
}
}
- /** Enable/disable SO_TIMEOUT with the specified timeout, in
- * milliseconds. With this option set to a positive timeout value,
- * a call to receive() for this DatagramSocket
- * will block for only this amount of time. If the timeout expires,
- * a <B>java.net.SocketTimeoutException</B> is raised, though the
- * DatagramSocket is still valid. A timeout of zero is interpreted
- * as an infinite timeout.
- * The option <B>must</B> be enabled prior to entering the blocking
- * operation to have effect.
+ /**
+ * Enable/disable SO_TIMEOUT with the specified timeout, in
+ * milliseconds. With this option set to a positive timeout value,
+ * a call to receive() for this DatagramSocket
+ * will block for only this amount of time. If the timeout expires,
+ * a <B>java.net.SocketTimeoutException</B> is raised, though the
+ * DatagramSocket is still valid. A timeout of zero is interpreted
+ * as an infinite timeout.
+ * The option <B>must</B> be enabled prior to entering the blocking
+ * operation to have effect.
*
* @param timeout the specified timeout in milliseconds.
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
@@ -963,8 +963,7 @@
* negative.
* @see #getSendBufferSize()
*/
- public synchronized void setSendBufferSize(int size)
- throws SocketException{
+ public synchronized void setSendBufferSize(int size) throws SocketException {
if (!(size > 0)) {
throw new IllegalArgumentException("negative send size");
}
@@ -1021,8 +1020,7 @@
* negative.
* @see #getReceiveBufferSize()
*/
- public synchronized void setReceiveBufferSize(int size)
- throws SocketException{
+ public synchronized void setReceiveBufferSize(int size) throws SocketException {
if (size <= 0) {
throw new IllegalArgumentException("invalid receive size");
}
@@ -1039,8 +1037,7 @@
* @throws SocketException if there is an error in the underlying protocol, such as an UDP error.
* @see #setReceiveBufferSize(int)
*/
- public synchronized int getReceiveBufferSize()
- throws SocketException{
+ public synchronized int getReceiveBufferSize() throws SocketException {
if (isClosed())
throw new SocketException("Socket is closed");
int result = 0;
--- a/src/java.base/share/classes/java/net/HttpURLConnection.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/net/HttpURLConnection.java Thu Nov 07 18:44:09 2019 +0000
@@ -618,8 +618,13 @@
/**
* Indicates if the connection is going through a proxy.
- * @return a boolean indicating if the connection is
- * using a proxy.
+ *
+ * This method returns {@code true} if the connection is known
+ * to be going or has gone through proxies, and returns {@code false}
+ * if the connection will never go through a proxy or if
+ * the use of a proxy cannot be determined.
+ *
+ * @return a boolean indicating if the connection is using a proxy.
*/
public abstract boolean usingProxy();
--- a/src/java.base/share/classes/java/nio/file/FileStore.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/nio/file/FileStore.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,9 @@
public abstract boolean isReadOnly();
/**
- * Returns the size, in bytes, of the file store.
+ * Returns the size, in bytes, of the file store. If the total number of
+ * bytes in the file store is greater than {@link Long#MAX_VALUE}, then
+ * {@code Long.MAX_VALUE} will be returned.
*
* @return the size of the file store, in bytes
*
@@ -95,7 +97,8 @@
/**
* Returns the number of bytes available to this Java virtual machine on the
- * file store.
+ * file store. If the number of bytes available is greater than
+ * {@link Long#MAX_VALUE}, then {@code Long.MAX_VALUE} will be returned.
*
* <p> The returned number of available bytes is a hint, but not a
* guarantee, that it is possible to use most or any of these bytes. The
@@ -112,14 +115,33 @@
public abstract long getUsableSpace() throws IOException;
/**
+ * Returns the number of unallocated bytes in the file store.
+ * If the number of unallocated bytes is greater than
+ * {@link Long#MAX_VALUE}, then {@code Long.MAX_VALUE} will be returned.
+ *
+ * <p> The returned number of unallocated bytes is a hint, but not a
+ * guarantee, that it is possible to use most or any of these bytes. The
+ * number of unallocated bytes is most likely to be accurate immediately
+ * after the space attributes are obtained. It is likely to be
+ * made inaccurate by any external I/O operations including those made on
+ * the system outside of this virtual machine.
+ *
+ * @return the number of unallocated bytes
+ *
+ * @throws IOException
+ * if an I/O error occurs
+ */
+ public abstract long getUnallocatedSpace() throws IOException;
+
+ /**
* Returns the number of bytes per block in this file store.
*
* <p> File storage is typically organized into discrete sequences of bytes
* called <i>blocks</i>. A block is the smallest storage unit of a file store.
* Every read and write operation is performed on a multiple of blocks.
*
- * @implSpec The implementation in this class throws an
- * {@code UnsupportedOperationException}.
+ * @implSpec The implementation in this class throws
+ * {@code UnsupportedOperationException}.
*
* @return a positive value representing the block size of this file store,
* in bytes
@@ -137,23 +159,6 @@
}
/**
- * Returns the number of unallocated bytes in the file store.
- *
- * <p> The returned number of unallocated bytes is a hint, but not a
- * guarantee, that it is possible to use most or any of these bytes. The
- * number of unallocated bytes is most likely to be accurate immediately
- * after the space attributes are obtained. It is likely to be
- * made inaccurate by any external I/O operations including those made on
- * the system outside of this virtual machine.
- *
- * @return the number of unallocated bytes
- *
- * @throws IOException
- * if an I/O error occurs
- */
- public abstract long getUnallocatedSpace() throws IOException;
-
- /**
* Tells whether or not this file store supports the file attributes
* identified by the given file attribute view.
*
--- a/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java Thu Nov 07 18:44:09 2019 +0000
@@ -623,8 +623,8 @@
final CompletableFuture<V> tryFire(int mode) {
CompletableFuture<V> d; CompletableFuture<T> a;
Object r; Throwable x; Function<? super T,? extends V> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null)
return null;
tryComplete: if (d.result == null) {
if (r instanceof AltResult) {
@@ -645,7 +645,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -695,8 +695,8 @@
final CompletableFuture<Void> tryFire(int mode) {
CompletableFuture<Void> d; CompletableFuture<T> a;
Object r; Throwable x; Consumer<? super T> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null)
return null;
tryComplete: if (d.result == null) {
if (r instanceof AltResult) {
@@ -718,7 +718,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -769,8 +769,8 @@
final CompletableFuture<Void> tryFire(int mode) {
CompletableFuture<Void> d; CompletableFuture<T> a;
Object r; Throwable x; Runnable f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null)
return null;
if (d.result == null) {
if (r instanceof AltResult && (x = ((AltResult)r).ex) != null)
@@ -787,7 +787,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -832,11 +832,11 @@
final CompletableFuture<T> tryFire(int mode) {
CompletableFuture<T> d; CompletableFuture<T> a;
Object r; BiConsumer<? super T, ? super Throwable> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.uniWhenComplete(r, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -902,11 +902,11 @@
final CompletableFuture<V> tryFire(int mode) {
CompletableFuture<V> d; CompletableFuture<T> a;
Object r; BiFunction<? super T, Throwable, ? extends V> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.uniHandle(r, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -965,11 +965,11 @@
final CompletableFuture<T> tryFire(int mode) {
CompletableFuture<T> d; CompletableFuture<T> a;
Object r; Function<? super Throwable, ? extends T> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.uniExceptionally(r, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -1024,8 +1024,8 @@
CompletableFuture<T> d; CompletableFuture<T> a;
Function<Throwable, ? extends CompletionStage<T>> f;
Object r; Throwable x;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null)
return null;
if (d.result == null) {
if ((r instanceof AltResult) &&
@@ -1048,7 +1048,7 @@
else
d.internalComplete(r);
}
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -1086,8 +1086,8 @@
}
final CompletableFuture<U> tryFire(int mode) {
CompletableFuture<U> d; CompletableFuture<T> a; Object r;
- if ((d = dep) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null)
return null;
if (d.result == null)
d.completeRelay(r);
@@ -1128,8 +1128,8 @@
CompletableFuture<V> d; CompletableFuture<T> a;
Function<? super T, ? extends CompletionStage<V>> f;
Object r; Throwable x;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (f = fn) == null)
return null;
tryComplete: if (d.result == null) {
if (r instanceof AltResult) {
@@ -1155,7 +1155,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; fn = null;
+ src = null; dep = null; fn = null;
return d.postFire(a, mode);
}
}
@@ -1270,12 +1270,12 @@
CompletableFuture<T> a;
CompletableFuture<U> b;
Object r, s; BiFunction<? super T,? super U,? extends V> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ( (a = src) == null || (r = a.result) == null
|| (b = snd) == null || (s = b.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.biApply(r, s, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1345,12 +1345,12 @@
CompletableFuture<T> a;
CompletableFuture<U> b;
Object r, s; BiConsumer<? super T,? super U> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ( (a = src) == null || (r = a.result) == null
|| (b = snd) == null || (s = b.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.biAccept(r, s, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1421,12 +1421,12 @@
CompletableFuture<T> a;
CompletableFuture<U> b;
Object r, s; Runnable f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (r = a.result) == null
+ if ( (a = src) == null || (r = a.result) == null
|| (b = snd) == null || (s = b.result) == null
+ || (d = dep) == null || (f = fn) == null
|| !d.biRun(r, s, f, mode > 0 ? null : this))
return null;
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1482,9 +1482,9 @@
CompletableFuture<T> a;
CompletableFuture<U> b;
Object r, s, z; Throwable x;
- if ((d = dep) == null
- || (a = src) == null || (r = a.result) == null
- || (b = snd) == null || (s = b.result) == null)
+ if ( (a = src) == null || (r = a.result) == null
+ || (b = snd) == null || (s = b.result) == null
+ || (d = dep) == null)
return null;
if (d.result == null) {
if ((r instanceof AltResult
@@ -1557,13 +1557,11 @@
super(executor, dep, src, snd); this.fn = fn;
}
final CompletableFuture<V> tryFire(int mode) {
- CompletableFuture<V> d;
- CompletableFuture<T> a;
- CompletableFuture<U> b;
+ CompletableFuture<V> d; CompletableFuture<? extends T> a, b;
Object r; Throwable x; Function<? super T,? extends V> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (b = snd) == null
- || ((r = a.result) == null && (r = b.result) == null))
+ if ((a = src) == null || (b = snd) == null
+ || ((r = a.result) == null && (r = b.result) == null)
+ || (d = dep) == null || (f = fn) == null)
return null;
tryComplete: if (d.result == null) {
try {
@@ -1582,7 +1580,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1612,13 +1610,11 @@
super(executor, dep, src, snd); this.fn = fn;
}
final CompletableFuture<Void> tryFire(int mode) {
- CompletableFuture<Void> d;
- CompletableFuture<T> a;
- CompletableFuture<U> b;
+ CompletableFuture<Void> d; CompletableFuture<? extends T> a, b;
Object r; Throwable x; Consumer<? super T> f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (b = snd) == null
- || ((r = a.result) == null && (r = b.result) == null))
+ if ((a = src) == null || (b = snd) == null
+ || ((r = a.result) == null && (r = b.result) == null)
+ || (d = dep) == null || (f = fn) == null)
return null;
tryComplete: if (d.result == null) {
try {
@@ -1638,7 +1634,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1668,13 +1664,11 @@
super(executor, dep, src, snd); this.fn = fn;
}
final CompletableFuture<Void> tryFire(int mode) {
- CompletableFuture<Void> d;
- CompletableFuture<T> a;
- CompletableFuture<U> b;
+ CompletableFuture<Void> d; CompletableFuture<?> a, b;
Object r; Throwable x; Runnable f;
- if ((d = dep) == null || (f = fn) == null
- || (a = src) == null || (b = snd) == null
- || ((r = a.result) == null && (r = b.result) == null))
+ if ((a = src) == null || (b = snd) == null
+ || ((r = a.result) == null && (r = b.result) == null)
+ || (d = dep) == null || (f = fn) == null)
return null;
if (d.result == null) {
try {
@@ -1691,7 +1685,7 @@
d.completeThrowable(ex);
}
}
- dep = null; src = null; snd = null; fn = null;
+ src = null; snd = null; dep = null; fn = null;
return d.postFire(a, b, mode);
}
}
@@ -1726,11 +1720,10 @@
CompletableFuture<Object> d; CompletableFuture<?> a;
CompletableFuture<?>[] as;
Object r;
- if ((d = dep) == null
- || (a = src) == null || (r = a.result) == null
- || (as = srcs) == null)
+ if ((a = src) == null || (r = a.result) == null
+ || (d = dep) == null || (as = srcs) == null)
return null;
- dep = null; src = null; srcs = null;
+ src = null; dep = null; srcs = null;
if (d.completeRelay(r)) {
for (CompletableFuture<?> b : as)
if (b != a)
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentHashMap.java Thu Nov 07 18:44:09 2019 +0000
@@ -1667,11 +1667,14 @@
* If the specified key is not already associated with a value,
* attempts to compute its value using the given mapping function
* and enters it into this map unless {@code null}. The entire
- * method invocation is performed atomically, so the function is
- * applied at most once per key. Some attempted update operations
- * on this map by other threads may be blocked while computation
- * is in progress, so the computation should be short and simple,
- * and must not attempt to update any other mappings of this map.
+ * method invocation is performed atomically. The supplied
+ * function is invoked exactly once per invocation of this method
+ * if the key is absent, else not at all. Some attempted update
+ * operations on this map by other threads may be blocked while
+ * computation is in progress, so the computation should be short
+ * and simple.
+ *
+ * <p>The mapping function must not modify this map during computation.
*
* @param key key with which the specified value is to be associated
* @param mappingFunction the function to compute a value
@@ -1778,10 +1781,13 @@
* If the value for the specified key is present, attempts to
* compute a new mapping given the key and its current mapped
* value. The entire method invocation is performed atomically.
- * Some attempted update operations on this map by other threads
- * may be blocked while computation is in progress, so the
- * computation should be short and simple, and must not attempt to
- * update any other mappings of this map.
+ * The supplied function is invoked exactly once per invocation of
+ * this method if the key is present, else not at all. Some
+ * attempted update operations on this map by other threads may be
+ * blocked while computation is in progress, so the computation
+ * should be short and simple.
+ *
+ * <p>The remapping function must not modify this map during computation.
*
* @param key key with which a value may be associated
* @param remappingFunction the function to compute a value
@@ -1870,10 +1876,12 @@
* Attempts to compute a mapping for the specified key and its
* current mapped value (or {@code null} if there is no current
* mapping). The entire method invocation is performed atomically.
- * Some attempted update operations on this map by other threads
- * may be blocked while computation is in progress, so the
- * computation should be short and simple, and must not attempt to
- * update any other mappings of this Map.
+ * The supplied function is invoked exactly once per invocation of
+ * this method. Some attempted update operations on this map by
+ * other threads may be blocked while computation is in progress,
+ * so the computation should be short and simple.
+ *
+ * <p>The remapping function must not modify this map during computation.
*
* @param key key with which the specified value is to be associated
* @param remappingFunction the function to compute a value
--- a/src/java.base/share/classes/sun/launcher/LauncherHelper.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/launcher/LauncherHelper.java Thu Nov 07 18:44:09 2019 +0000
@@ -62,7 +62,6 @@
import java.nio.file.DirectoryStream;
import java.nio.file.Files;
import java.nio.file.Path;
-import java.security.AccessControlException;
import java.text.Normalizer;
import java.text.MessageFormat;
import java.util.ArrayList;
@@ -725,9 +724,6 @@
} catch (LinkageError le) {
abort(null, "java.launcher.module.error3", mainClass, m.getName(),
le.getClass().getName() + ": " + le.getLocalizedMessage());
- } catch (AccessControlException ace) {
- abort(ace, "java.launcher.module.error5", mainClass, m.getName(),
- ace.getClass().getName(), ace.getLocalizedMessage());
}
if (c == null) {
abort(null, "java.launcher.module.error2", mainClass, mainModule);
@@ -784,9 +780,6 @@
} catch (LinkageError le) {
abort(le, "java.launcher.cls.error6", cn,
le.getClass().getName() + ": " + le.getLocalizedMessage());
- } catch (AccessControlException ace) {
- abort(ace, "java.launcher.cls.error7", cn,
- ace.getClass().getName(), ace.getLocalizedMessage());
}
return mainClass;
}
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java Thu Nov 07 18:44:09 2019 +0000
@@ -312,6 +312,8 @@
private CookieHandler cookieHandler;
private final ResponseCache cacheHandler;
+ private volatile boolean usingProxy;
+
// the cached response, and cached response headers and body
protected CacheResponse cachedResponse;
private MessageHeader cachedHeaders;
@@ -320,7 +322,6 @@
/* output stream to server */
protected PrintStream ps = null;
-
/* buffered error stream */
private InputStream errorStream = null;
@@ -1240,6 +1241,7 @@
}
}
+ usingProxy = usingProxy || usingProxyInternal();
ps = (PrintStream)http.getOutputStream();
} catch (IOException e) {
throw e;
@@ -2917,7 +2919,7 @@
* closed the connection to the web server.
*/
private void disconnectWeb() throws IOException {
- if (usingProxy() && http.isKeepingAlive()) {
+ if (usingProxyInternal() && http.isKeepingAlive()) {
responseCode = -1;
// clean up, particularly, skip the content part
// of a 401 error response
@@ -3020,13 +3022,31 @@
}
}
- public boolean usingProxy() {
+ /**
+ * Returns true only if the established connection is using a proxy
+ */
+ boolean usingProxyInternal() {
if (http != null) {
return (http.getProxyHostUsed() != null);
}
return false;
}
+ /**
+ * Returns true if the established connection is using a proxy
+ * or if a proxy is specified for the inactive connection
+ */
+ @Override
+ public boolean usingProxy() {
+ if (usingProxy || usingProxyInternal())
+ return true;
+
+ if (instProxy != null)
+ return instProxy.type().equals(Proxy.Type.HTTP);
+
+ return false;
+ }
+
// constant strings represent set-cookie header names
private static final String SET_COOKIE = "set-cookie";
private static final String SET_COOKIE2 = "set-cookie2";
--- a/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/DatagramChannelImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,6 +28,8 @@
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.UncheckedIOException;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.VarHandle;
import java.lang.ref.Cleaner.Cleanable;
import java.net.DatagramSocket;
import java.net.Inet4Address;
@@ -39,6 +41,7 @@
import java.net.ProtocolFamily;
import java.net.SocketAddress;
import java.net.SocketOption;
+import java.net.SocketTimeoutException;
import java.net.StandardProtocolFamily;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
@@ -47,6 +50,7 @@
import java.nio.channels.AsynchronousCloseException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.DatagramChannel;
+import java.nio.channels.IllegalBlockingModeException;
import java.nio.channels.MembershipKey;
import java.nio.channels.NotYetConnectedException;
import java.nio.channels.SelectionKey;
@@ -113,8 +117,17 @@
private InetSocketAddress localAddress;
private InetSocketAddress remoteAddress;
- // Our socket adaptor, if any
- private DatagramSocket socket;
+ // Socket adaptor, created lazily
+ private static final VarHandle SOCKET;
+ static {
+ try {
+ MethodHandles.Lookup l = MethodHandles.lookup();
+ SOCKET = l.findVarHandle(DatagramChannelImpl.class, "socket", DatagramSocket.class);
+ } catch (Exception e) {
+ throw new InternalError(e);
+ }
+ }
+ private volatile DatagramSocket socket;
// Multicast support
private MembershipRegistry registry;
@@ -199,11 +212,14 @@
@Override
public DatagramSocket socket() {
- synchronized (stateLock) {
- if (socket == null)
- socket = DatagramSocketAdaptor.create(this);
- return socket;
+ DatagramSocket socket = this.socket;
+ if (socket == null) {
+ socket = DatagramSocketAdaptor.create(this);
+ if (!SOCKET.compareAndSet(this, null, socket)) {
+ socket = this.socket;
+ }
}
+ return socket;
}
@Override
@@ -408,62 +424,35 @@
public SocketAddress receive(ByteBuffer dst) throws IOException {
if (dst.isReadOnly())
throw new IllegalArgumentException("Read-only buffer");
-
readLock.lock();
try {
boolean blocking = isBlocking();
+ boolean completed = false;
int n = 0;
- ByteBuffer bb = null;
try {
SocketAddress remote = beginRead(blocking, false);
boolean connected = (remote != null);
SecurityManager sm = System.getSecurityManager();
+
if (connected || (sm == null)) {
// connected or no security manager
- n = receive(fd, dst, connected);
+ n = receive(dst, connected);
if (blocking) {
while (IOStatus.okayToRetry(n) && isOpen()) {
park(Net.POLLIN);
- n = receive(fd, dst, connected);
+ n = receive(dst, connected);
}
- } else if (n == IOStatus.UNAVAILABLE) {
- return null;
}
} else {
- // Cannot receive into user's buffer when running with a
- // security manager and not connected
- bb = Util.getTemporaryDirectBuffer(dst.remaining());
- for (;;) {
- n = receive(fd, bb, connected);
- if (blocking) {
- while (IOStatus.okayToRetry(n) && isOpen()) {
- park(Net.POLLIN);
- n = receive(fd, bb, connected);
- }
- } else if (n == IOStatus.UNAVAILABLE) {
- return null;
- }
- InetSocketAddress isa = (InetSocketAddress)sender;
- try {
- sm.checkAccept(isa.getAddress().getHostAddress(),
- isa.getPort());
- } catch (SecurityException se) {
- // Ignore packet
- bb.clear();
- n = 0;
- continue;
- }
- bb.flip();
- dst.put(bb);
- break;
- }
+ // security manager and unconnected
+ n = untrustedReceive(dst);
}
- assert sender != null;
+ if (n == IOStatus.UNAVAILABLE)
+ return null;
+ completed = (n > 0) || (n == 0 && isOpen());
return sender;
} finally {
- if (bb != null)
- Util.releaseTemporaryDirectBuffer(bb);
- endRead(blocking, n > 0);
+ endRead(blocking, completed);
assert IOStatus.check(n);
}
} finally {
@@ -471,15 +460,164 @@
}
}
- private int receive(FileDescriptor fd, ByteBuffer dst, boolean connected)
+ /**
+ * Receives a datagram into an untrusted buffer. When there is a security
+ * manager set, and the socket is not connected, datagrams have to be received
+ * into a buffer that is not accessible to the user. The datagram is copied
+ * into the user's buffer when the sender address is accepted by the security
+ * manager.
+ *
+ * @return the size of the datagram or IOStatus.UNAVAILABLE
+ */
+ private int untrustedReceive(ByteBuffer dst) throws IOException {
+ SecurityManager sm = System.getSecurityManager();
+ assert readLock.isHeldByCurrentThread()
+ && sm != null && remoteAddress == null;
+
+ ByteBuffer bb = Util.getTemporaryDirectBuffer(dst.remaining());
+ try {
+ boolean blocking = isBlocking();
+ for (;;) {
+ int n = receive(bb, false);
+ if (blocking) {
+ while (IOStatus.okayToRetry(n) && isOpen()) {
+ park(Net.POLLIN);
+ n = receive(bb, false);
+ }
+ } else if (n == IOStatus.UNAVAILABLE) {
+ return n;
+ }
+ InetSocketAddress isa = (InetSocketAddress) sender;
+ try {
+ sm.checkAccept(isa.getAddress().getHostAddress(), isa.getPort());
+ bb.flip();
+ dst.put(bb);
+ return n;
+ } catch (SecurityException se) {
+ // ignore datagram
+ bb.clear();
+ }
+ }
+ } finally {
+ Util.releaseTemporaryDirectBuffer(bb);
+ }
+ }
+
+ /**
+ * Receives a datagram into the given buffer.
+ *
+ * @apiNote This method is for use by the socket adaptor. The buffer is
+ * assumed to be trusted, meaning it is not accessible to user code.
+ *
+ * @throws IllegalBlockingModeException if the channel is non-blocking
+ * @throws SocketTimeoutException if the timeout elapses
+ */
+ SocketAddress blockingReceive(ByteBuffer dst, long nanos) throws IOException {
+ readLock.lock();
+ try {
+ ensureOpen();
+ if (!isBlocking())
+ throw new IllegalBlockingModeException();
+ SecurityManager sm = System.getSecurityManager();
+ boolean connected = isConnected();
+ SocketAddress sender;
+ do {
+ if (nanos > 0) {
+ sender = trustedBlockingReceive(dst, nanos);
+ } else {
+ sender = trustedBlockingReceive(dst);
+ }
+ // check sender when security manager set and not connected
+ if (sm != null && !connected) {
+ InetSocketAddress isa = (InetSocketAddress) sender;
+ try {
+ sm.checkAccept(isa.getAddress().getHostAddress(), isa.getPort());
+ } catch (SecurityException e) {
+ sender = null;
+ }
+ }
+ } while (sender == null);
+ return sender;
+ } finally {
+ readLock.unlock();
+ }
+ }
+
+ /**
+ * Receives a datagram into given buffer. This method is used to support
+ * the socket adaptor. The buffer is assumed to be trusted.
+ * @throws SocketTimeoutException if the timeout elapses
+ */
+ private SocketAddress trustedBlockingReceive(ByteBuffer dst)
throws IOException
{
+ assert readLock.isHeldByCurrentThread() && isBlocking();
+ boolean completed = false;
+ int n = 0;
+ try {
+ SocketAddress remote = beginRead(true, false);
+ boolean connected = (remote != null);
+ n = receive(dst, connected);
+ while (n == IOStatus.UNAVAILABLE && isOpen()) {
+ park(Net.POLLIN);
+ n = receive(dst, connected);
+ }
+ completed = (n > 0) || (n == 0 && isOpen());
+ return sender;
+ } finally {
+ endRead(true, completed);
+ assert IOStatus.check(n);
+ }
+ }
+
+ /**
+ * Receives a datagram into given buffer with a timeout. This method is
+ * used to support the socket adaptor. The buffer is assumed to be trusted.
+ * @throws SocketTimeoutException if the timeout elapses
+ */
+ private SocketAddress trustedBlockingReceive(ByteBuffer dst, long nanos)
+ throws IOException
+ {
+ assert readLock.isHeldByCurrentThread() && isBlocking();
+ boolean completed = false;
+ int n = 0;
+ try {
+ SocketAddress remote = beginRead(true, false);
+ boolean connected = (remote != null);
+
+ // change socket to non-blocking
+ lockedConfigureBlocking(false);
+ try {
+ long startNanos = System.nanoTime();
+ n = receive(dst, connected);
+ while (n == IOStatus.UNAVAILABLE && isOpen()) {
+ long remainingNanos = nanos - (System.nanoTime() - startNanos);
+ if (remainingNanos <= 0) {
+ throw new SocketTimeoutException("Receive timed out");
+ }
+ park(Net.POLLIN, remainingNanos);
+ n = receive(dst, connected);
+ }
+ completed = (n > 0) || (n == 0 && isOpen());
+ return sender;
+ } finally {
+ // restore socket to blocking mode (if channel is open)
+ tryLockedConfigureBlocking(true);
+ }
+
+ } finally {
+ endRead(true, completed);
+ assert IOStatus.check(n);
+ }
+ }
+
+ private int receive(ByteBuffer dst, boolean connected) throws IOException {
int pos = dst.position();
int lim = dst.limit();
assert (pos <= lim);
int rem = (pos <= lim ? lim - pos : 0);
if (dst instanceof DirectBuffer && rem > 0)
- return receiveIntoNativeBuffer(fd, dst, rem, pos, connected);
+ return receiveIntoNativeBuffer(dst, rem, pos, connected);
// Substitute a native buffer. If the supplied buffer is empty
// we must instead use a nonempty buffer, otherwise the call
@@ -487,7 +625,7 @@
int newSize = Math.max(rem, 1);
ByteBuffer bb = Util.getTemporaryDirectBuffer(newSize);
try {
- int n = receiveIntoNativeBuffer(fd, bb, newSize, 0, connected);
+ int n = receiveIntoNativeBuffer(bb, newSize, 0, connected);
bb.flip();
if (n > 0 && rem > 0)
dst.put(bb);
@@ -497,8 +635,8 @@
}
}
- private int receiveIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb,
- int rem, int pos, boolean connected)
+ private int receiveIntoNativeBuffer(ByteBuffer bb, int rem, int pos,
+ boolean connected)
throws IOException
{
int n = receive0(fd, ((DirectBuffer)bb).address() + pos, rem, connected);
@@ -563,6 +701,25 @@
}
}
+ /**
+ * Sends a datagram from the bytes in given buffer.
+ *
+ * @apiNote This method is for use by the socket adaptor.
+ *
+ * @throws IllegalBlockingModeException if the channel is non-blocking
+ */
+ void blockingSend(ByteBuffer src, SocketAddress target) throws IOException {
+ writeLock.lock();
+ try {
+ ensureOpen();
+ if (!isBlocking())
+ throw new IllegalBlockingModeException();
+ send(src, target);
+ } finally {
+ writeLock.unlock();
+ }
+ }
+
private int send(FileDescriptor fd, ByteBuffer src, InetSocketAddress target)
throws IOException
{
@@ -785,10 +942,7 @@
try {
writeLock.lock();
try {
- synchronized (stateLock) {
- ensureOpen();
- IOUtil.configureBlocking(fd, block);
- }
+ lockedConfigureBlocking(block);
} finally {
writeLock.unlock();
}
@@ -797,6 +951,36 @@
}
}
+ /**
+ * Adjusts the blocking mode. readLock or writeLock must already be held.
+ */
+ private void lockedConfigureBlocking(boolean block) throws IOException {
+ assert readLock.isHeldByCurrentThread() || writeLock.isHeldByCurrentThread();
+ synchronized (stateLock) {
+ ensureOpen();
+ IOUtil.configureBlocking(fd, block);
+ }
+ }
+
+ /**
+ * Adjusts the blocking mode if the channel is open. readLock or writeLock
+ * must already be held.
+ *
+ * @return {@code true} if the blocking mode was adjusted, {@code false} if
+ * the blocking mode was not adjusted because the channel is closed
+ */
+ private boolean tryLockedConfigureBlocking(boolean block) throws IOException {
+ assert readLock.isHeldByCurrentThread() || writeLock.isHeldByCurrentThread();
+ synchronized (stateLock) {
+ if (isOpen()) {
+ IOUtil.configureBlocking(fd, block);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
InetSocketAddress localAddress() {
synchronized (stateLock) {
return localAddress;
@@ -861,6 +1045,16 @@
@Override
public DatagramChannel connect(SocketAddress sa) throws IOException {
+ return connect(sa, true);
+ }
+
+ /**
+ * Connects the channel's socket.
+ *
+ * @param sa the remote address to which this channel is to be connected
+ * @param check true to check if the channel is already connected.
+ */
+ DatagramChannel connect(SocketAddress sa, boolean check) throws IOException {
InetSocketAddress isa = Net.checkAddress(sa, family);
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
@@ -879,7 +1073,7 @@
try {
synchronized (stateLock) {
ensureOpen();
- if (state == ST_CONNECTED)
+ if (check && state == ST_CONNECTED)
throw new AlreadyConnectedException();
// ensure that the socket is bound
@@ -908,7 +1102,7 @@
}
try {
ByteBuffer buf = ByteBuffer.allocate(100);
- while (receive(fd, buf, false) > 0) {
+ while (receive(buf, false) >= 0) {
buf.clear();
}
} finally {
@@ -1332,30 +1526,6 @@
}
/**
- * Poll this channel's socket for reading up to the given timeout.
- * @return {@code true} if the socket is polled
- */
- boolean pollRead(long timeout) throws IOException {
- boolean blocking = isBlocking();
- assert Thread.holdsLock(blockingLock()) && blocking;
-
- readLock.lock();
- try {
- boolean polled = false;
- try {
- beginRead(blocking, false);
- int events = Net.poll(fd, Net.POLLIN, timeout);
- polled = (events != 0);
- } finally {
- endRead(blocking, polled);
- }
- return polled;
- } finally {
- readLock.unlock();
- }
- }
-
- /**
* Translates an interest operation set into a native poll event set
*/
public int translateInterestOps(int ops) {
--- a/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/DatagramSocketAdaptor.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,6 +26,9 @@
package sun.nio.ch;
import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodHandles.Lookup;
+import java.lang.invoke.VarHandle;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.DatagramSocketImpl;
@@ -35,15 +38,16 @@
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketOption;
-import java.net.SocketTimeoutException;
import java.net.StandardSocketOptions;
import java.nio.ByteBuffer;
+import java.nio.channels.AlreadyConnectedException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.DatagramChannel;
-import java.nio.channels.IllegalBlockingModeException;
-import java.util.Objects;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
import java.util.Set;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
// Make a datagram-socket channel look like a datagram socket.
//
@@ -61,13 +65,9 @@
// Timeout "option" value for receives
private volatile int timeout;
- // ## super will create a useless impl
+ // create DatagramSocket with useless impl
private DatagramSocketAdaptor(DatagramChannelImpl dc) {
- // Invoke the DatagramSocketAdaptor(SocketAddress) constructor,
- // passing a dummy DatagramSocketImpl object to avoid any native
- // resource allocation in super class and invoking our bind method
- // before the dc field is initialized.
- super(dummyDatagramSocket);
+ super(new DummyDatagramSocketImpl());
this.dc = dc;
}
@@ -75,17 +75,9 @@
return new DatagramSocketAdaptor(dc);
}
- private void connectInternal(SocketAddress remote)
- throws SocketException
- {
- InetSocketAddress isa = Net.asInetSocketAddress(remote);
- int port = isa.getPort();
- if (port < 0 || port > 0xFFFF)
- throw new IllegalArgumentException("connect: " + port);
- if (remote == null)
- throw new IllegalArgumentException("connect: null address");
+ private void connectInternal(SocketAddress remote) throws SocketException {
try {
- dc.connect(remote);
+ dc.connect(remote, false); // skips check for already connected
} catch (ClosedChannelException e) {
// ignore
} catch (Exception x) {
@@ -95,9 +87,12 @@
@Override
public void bind(SocketAddress local) throws SocketException {
+ if (local != null) {
+ local = Net.asInetSocketAddress(local);
+ } else {
+ local = new InetSocketAddress(0);
+ }
try {
- if (local == null)
- local = new InetSocketAddress(0);
dc.bind(local);
} catch (Exception x) {
Net.translateToSocketException(x);
@@ -106,17 +101,20 @@
@Override
public void connect(InetAddress address, int port) {
+ if (address == null)
+ throw new IllegalArgumentException("Address can't be null");
try {
connectInternal(new InetSocketAddress(address, port));
} catch (SocketException x) {
- // Yes, j.n.DatagramSocket really does this
+ throw new Error(x);
}
}
@Override
public void connect(SocketAddress remote) throws SocketException {
- Objects.requireNonNull(remote, "Address can't be null");
- connectInternal(remote);
+ if (remote == null)
+ throw new IllegalArgumentException("Address can't be null");
+ connectInternal(Net.asInetSocketAddress(remote));
}
@Override
@@ -157,80 +155,84 @@
@Override
public SocketAddress getLocalSocketAddress() {
- return dc.localAddress();
+ try {
+ return dc.getLocalAddress();
+ } catch (ClosedChannelException e) {
+ return null;
+ } catch (Exception x) {
+ throw new Error(x);
+ }
}
@Override
public void send(DatagramPacket p) throws IOException {
- synchronized (dc.blockingLock()) {
- if (!dc.isBlocking())
- throw new IllegalBlockingModeException();
- try {
- synchronized (p) {
- ByteBuffer bb = ByteBuffer.wrap(p.getData(),
- p.getOffset(),
- p.getLength());
- if (dc.isConnected()) {
- if (p.getAddress() == null) {
- // Legacy DatagramSocket will send in this case
- // and set address and port of the packet
- InetSocketAddress isa = dc.remoteAddress();
- p.setPort(isa.getPort());
- p.setAddress(isa.getAddress());
- dc.write(bb);
- } else {
- // Target address may not match connected address
- dc.send(bb, p.getSocketAddress());
- }
- } else {
- // Not connected so address must be valid or throw
- dc.send(bb, p.getSocketAddress());
+ ByteBuffer bb = null;
+ try {
+ InetSocketAddress target;
+ synchronized (p) {
+ // copy bytes to temporary direct buffer
+ int len = p.getLength();
+ bb = Util.getTemporaryDirectBuffer(len);
+ bb.put(p.getData(), p.getOffset(), len);
+ bb.flip();
+
+ // target address
+ if (p.getAddress() == null) {
+ InetSocketAddress remote = dc.remoteAddress();
+ if (remote == null) {
+ // not specified by DatagramSocket
+ throw new IllegalArgumentException("Address not set");
}
+ // set address/port to maintain compatibility with DatagramSocket
+ p.setAddress(remote.getAddress());
+ p.setPort(remote.getPort());
+ target = remote;
+ } else {
+ // throws IllegalArgumentException if port not set
+ target = (InetSocketAddress) p.getSocketAddress();
}
- } catch (IOException x) {
- Net.translateException(x);
}
- }
- }
-
- private SocketAddress receive(ByteBuffer bb) throws IOException {
- assert Thread.holdsLock(dc.blockingLock()) && dc.isBlocking();
-
- long to = this.timeout;
- if (to == 0) {
- return dc.receive(bb);
- } else {
- for (;;) {
- if (!dc.isOpen())
- throw new ClosedChannelException();
- long st = System.currentTimeMillis();
- if (dc.pollRead(to)) {
- return dc.receive(bb);
- }
- to -= System.currentTimeMillis() - st;
- if (to <= 0)
- throw new SocketTimeoutException();
+ // send datagram
+ try {
+ dc.blockingSend(bb, target);
+ } catch (AlreadyConnectedException e) {
+ throw new IllegalArgumentException("Connected and packet address differ");
+ } catch (ClosedChannelException e) {
+ var exc = new SocketException("Socket closed");
+ exc.initCause(e);
+ throw exc;
+ }
+ } finally {
+ if (bb != null) {
+ Util.offerFirstTemporaryDirectBuffer(bb);
}
}
}
@Override
public void receive(DatagramPacket p) throws IOException {
- synchronized (dc.blockingLock()) {
- if (!dc.isBlocking())
- throw new IllegalBlockingModeException();
- try {
- synchronized (p) {
- ByteBuffer bb = ByteBuffer.wrap(p.getData(),
- p.getOffset(),
- p.getLength());
- SocketAddress sender = receive(bb);
- p.setSocketAddress(sender);
- p.setLength(bb.position() - p.getOffset());
- }
- } catch (IOException x) {
- Net.translateException(x);
+ // get temporary direct buffer with a capacity of p.bufLength
+ int bufLength = DatagramPackets.getBufLength(p);
+ ByteBuffer bb = Util.getTemporaryDirectBuffer(bufLength);
+ try {
+ long nanos = MILLISECONDS.toNanos(timeout);
+ SocketAddress sender = dc.blockingReceive(bb, nanos);
+ bb.flip();
+ synchronized (p) {
+ // copy bytes to the DatagramPacket and set length
+ int len = Math.min(bb.limit(), DatagramPackets.getBufLength(p));
+ bb.get(p.getData(), p.getOffset(), len);
+ DatagramPackets.setLength(p, len);
+
+ // sender address
+ p.setSocketAddress(sender);
}
+ } catch (ClosedChannelException e) {
+ var exc = new SocketException("Socket closed");
+ exc.initCause(e);
+ throw exc;
+ } finally {
+ Util.offerFirstTemporaryDirectBuffer(bb);
}
}
@@ -257,19 +259,16 @@
public int getLocalPort() {
if (isClosed())
return -1;
- try {
- InetSocketAddress local = dc.localAddress();
- if (local != null) {
- return local.getPort();
- }
- } catch (Exception x) {
+ InetSocketAddress local = dc.localAddress();
+ if (local != null) {
+ return local.getPort();
}
return 0;
}
@Override
public void setSoTimeout(int timeout) throws SocketException {
- if (!dc.isOpen())
+ if (isClosed())
throw new SocketException("Socket is closed");
if (timeout < 0)
throw new IllegalArgumentException("timeout < 0");
@@ -278,7 +277,7 @@
@Override
public int getSoTimeout() throws SocketException {
- if (!dc.isOpen())
+ if (isClosed())
throw new SocketException("Socket is closed");
return timeout;
}
@@ -353,7 +352,6 @@
@Override
public boolean getReuseAddress() throws SocketException {
return getBooleanOption(StandardSocketOptions.SO_REUSEADDR);
-
}
@Override
@@ -411,50 +409,157 @@
return dc.supportedOptions();
}
- /*
- * A dummy implementation of DatagramSocketImpl that can be passed to the
- * DatagramSocket constructor so that no native resources are allocated in
- * super class.
- */
- private static final DatagramSocketImpl dummyDatagramSocket
- = new DatagramSocketImpl()
- {
- protected void create() throws SocketException {}
+
+ /**
+ * DatagramSocketImpl implementation where all methods throw an error.
+ */
+ private static class DummyDatagramSocketImpl extends DatagramSocketImpl {
+ private static <T> T shouldNotGetHere() {
+ throw new InternalError("Should not get here");
+ }
+
+ @Override
+ protected void create() {
+ shouldNotGetHere();
+ }
+
+ @Override
+ protected void bind(int lport, InetAddress laddr) {
+ shouldNotGetHere();
+ }
+
+ @Override
+ protected void send(DatagramPacket p) {
+ shouldNotGetHere();
+ }
+
+ @Override
+ protected int peek(InetAddress address) {
+ return shouldNotGetHere();
+ }
+
+ @Override
+ protected int peekData(DatagramPacket p) {
+ return shouldNotGetHere();
+ }
- protected void bind(int lport, InetAddress laddr) throws SocketException {}
+ @Override
+ protected void receive(DatagramPacket p) {
+ shouldNotGetHere();
+ }
+
+ @Deprecated
+ protected void setTTL(byte ttl) {
+ shouldNotGetHere();
+ }
- protected void send(DatagramPacket p) throws IOException {}
+ @Deprecated
+ protected byte getTTL() {
+ return shouldNotGetHere();
+ }
- protected int peek(InetAddress i) throws IOException { return 0; }
+ @Override
+ protected void setTimeToLive(int ttl) {
+ shouldNotGetHere();
+ }
- protected int peekData(DatagramPacket p) throws IOException { return 0; }
+ @Override
+ protected int getTimeToLive() {
+ return shouldNotGetHere();
+ }
+
+ @Override
+ protected void join(InetAddress group) {
+ shouldNotGetHere();
+ }
- protected void receive(DatagramPacket p) throws IOException {}
+ @Override
+ protected void leave(InetAddress inetaddr) {
+ shouldNotGetHere();
+ }
- @Deprecated
- protected void setTTL(byte ttl) throws IOException {}
+ @Override
+ protected void joinGroup(SocketAddress group, NetworkInterface netIf) {
+ shouldNotGetHere();
+ }
- @Deprecated
- protected byte getTTL() throws IOException { return 0; }
+ @Override
+ protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) {
+ shouldNotGetHere();
+ }
- protected void setTimeToLive(int ttl) throws IOException {}
+ @Override
+ protected void close() {
+ shouldNotGetHere();
+ }
+
+ @Override
+ public Object getOption(int optID) {
+ return shouldNotGetHere();
+ }
- protected int getTimeToLive() throws IOException { return 0;}
+ @Override
+ public void setOption(int optID, Object value) {
+ shouldNotGetHere();
+ }
+
+ @Override
+ protected <T> void setOption(SocketOption<T> name, T value) {
+ shouldNotGetHere();
+ }
- protected void join(InetAddress inetaddr) throws IOException {}
+ @Override
+ protected <T> T getOption(SocketOption<T> name) {
+ return shouldNotGetHere();
+ }
- protected void leave(InetAddress inetaddr) throws IOException {}
+ @Override
+ protected Set<SocketOption<?>> supportedOptions() {
+ return shouldNotGetHere();
+ }
+ }
- protected void joinGroup(SocketAddress mcastaddr,
- NetworkInterface netIf) throws IOException {}
-
- protected void leaveGroup(SocketAddress mcastaddr,
- NetworkInterface netIf) throws IOException {}
+ /**
+ * Defines static methods to get/set DatagramPacket fields and workaround
+ * DatagramPacket deficiencies.
+ */
+ private static class DatagramPackets {
+ private static final VarHandle LENGTH;
+ private static final VarHandle BUF_LENGTH;
+ static {
+ try {
+ PrivilegedAction<Lookup> pa = () -> {
+ try {
+ return MethodHandles.privateLookupIn(DatagramPacket.class, MethodHandles.lookup());
+ } catch (Exception e) {
+ throw new ExceptionInInitializerError(e);
+ }
+ };
+ MethodHandles.Lookup l = AccessController.doPrivileged(pa);
+ LENGTH = l.findVarHandle(DatagramPacket.class, "length", int.class);
+ BUF_LENGTH = l.findVarHandle(DatagramPacket.class, "bufLength", int.class);
+ } catch (Exception e) {
+ throw new ExceptionInInitializerError(e);
+ }
+ }
- protected void close() {}
-
- public Object getOption(int optID) throws SocketException { return null;}
+ /**
+ * Sets the DatagramPacket.length field. DatagramPacket.setLength cannot be
+ * used at this time because it sets both the length and bufLength fields.
+ */
+ static void setLength(DatagramPacket p, int value) {
+ synchronized (p) {
+ LENGTH.set(p, value);
+ }
+ }
- public void setOption(int optID, Object value) throws SocketException {}
- };
-}
+ /**
+ * Returns the value of the DatagramPacket.bufLength field.
+ */
+ static int getBufLength(DatagramPacket p) {
+ synchronized (p) {
+ return (int) BUF_LENGTH.get(p);
+ }
+ }
+ }
+}
\ No newline at end of file
--- a/src/java.base/share/classes/sun/nio/ch/DummySocketImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/DummySocketImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,8 +31,6 @@
import java.net.SocketAddress;
import java.net.SocketImpl;
import java.net.SocketOption;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.util.Set;
/**
@@ -41,12 +39,10 @@
*/
class DummySocketImpl extends SocketImpl {
- private static final PrivilegedAction<SocketImpl> NEW = DummySocketImpl::new;
-
private DummySocketImpl() { }
static SocketImpl create() {
- return AccessController.doPrivileged(NEW);
+ return new DummySocketImpl();
}
private static <T> T shouldNotGetHere() {
--- a/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/ServerSocketChannelImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -332,8 +332,8 @@
n = Net.accept(fd, newfd, isaa);
}
} finally {
- // restore socket to blocking mode
- lockedConfigureBlocking(true);
+ // restore socket to blocking mode (if channel is open)
+ tryLockedConfigureBlocking(true);
}
} finally {
end(true, n > 0);
@@ -376,7 +376,7 @@
}
/**
- * Adjust the blocking mode while holding acceptLock.
+ * Adjust the blocking. acceptLock must already be held.
*/
private void lockedConfigureBlocking(boolean block) throws IOException {
assert acceptLock.isHeldByCurrentThread();
@@ -387,6 +387,25 @@
}
/**
+ * Adjusts the blocking mode if the channel is open. acceptLock must already
+ * be held.
+ *
+ * @return {@code true} if the blocking mode was adjusted, {@code false} if
+ * the blocking mode was not adjusted because the channel is closed
+ */
+ private boolean tryLockedConfigureBlocking(boolean block) throws IOException {
+ assert acceptLock.isHeldByCurrentThread();
+ synchronized (stateLock) {
+ if (isOpen()) {
+ IOUtil.configureBlocking(fd, block);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
* Closes the socket if there are no accept in progress and the channel is
* not registered with a Selector.
*/
--- a/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/nio/ch/SocketChannelImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -573,7 +573,7 @@
}
/**
- * Adjust the blocking mode while holding the readLock or writeLock.
+ * Adjusts the blocking mode. readLock or writeLock must already be held.
*/
private void lockedConfigureBlocking(boolean block) throws IOException {
assert readLock.isHeldByCurrentThread() || writeLock.isHeldByCurrentThread();
@@ -584,6 +584,25 @@
}
/**
+ * Adjusts the blocking mode if the channel is open. readLock or writeLock
+ * must already be held.
+ *
+ * @return {@code true} if the blocking mode was adjusted, {@code false} if
+ * the blocking mode was not adjusted because the channel is closed
+ */
+ private boolean tryLockedConfigureBlocking(boolean block) throws IOException {
+ assert readLock.isHeldByCurrentThread() || writeLock.isHeldByCurrentThread();
+ synchronized (stateLock) {
+ if (isOpen()) {
+ IOUtil.configureBlocking(fd, block);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
* Returns the local address, or null if not bound
*/
InetSocketAddress localAddress() {
@@ -1051,8 +1070,8 @@
int n = Net.connect(fd, isa.getAddress(), isa.getPort());
connected = (n > 0) ? true : finishTimedConnect(nanos);
} finally {
- // restore socket to blocking mode
- lockedConfigureBlocking(true);
+ // restore socket to blocking mode (if channel is open)
+ tryLockedConfigureBlocking(true);
}
} finally {
endConnect(true, connected);
@@ -1144,8 +1163,8 @@
try {
n = timedRead(b, off, len, nanos);
} finally {
- // restore socket to blocking mode
- lockedConfigureBlocking(true);
+ // restore socket to blocking mode (if channel is open)
+ tryLockedConfigureBlocking(true);
}
} else {
// read, no timeout
--- a/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/CertificateVerify.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,6 +31,7 @@
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.Locale;
+import java.util.Map;
import sun.security.ssl.SSLHandshake.HandshakeMessage;
import sun.security.ssl.X509Authentication.X509Credentials;
import sun.security.ssl.X509Authentication.X509Possession;
@@ -563,31 +564,28 @@
// This happens in client side only.
ClientHandshakeContext chc = (ClientHandshakeContext)context;
- this.signatureScheme = SignatureScheme.getPreferableAlgorithm(
+ Map.Entry<SignatureScheme, Signature> schemeAndSigner =
+ SignatureScheme.getSignerOfPreferableAlgorithm(
chc.algorithmConstraints,
chc.peerRequestedSignatureSchemes,
x509Possession,
chc.negotiatedProtocol);
- if (signatureScheme == null) {
+ if (schemeAndSigner == null) {
// Unlikely, the credentials generator should have
// selected the preferable signature algorithm properly.
throw chc.conContext.fatal(Alert.INTERNAL_ERROR,
- "No preferred signature algorithm for CertificateVerify");
+ "No supported CertificateVerify signature algorithm for " +
+ x509Possession.popPrivateKey.getAlgorithm() +
+ " key");
}
+ this.signatureScheme = schemeAndSigner.getKey();
byte[] temproary = null;
try {
- Signature signer =
- signatureScheme.getSignature(x509Possession.popPrivateKey);
+ Signature signer = schemeAndSigner.getValue();
signer.update(chc.handshakeHash.archived());
temproary = signer.sign();
- } catch (NoSuchAlgorithmException |
- InvalidAlgorithmParameterException nsae) {
- throw chc.conContext.fatal(Alert.INTERNAL_ERROR,
- "Unsupported signature algorithm (" +
- signatureScheme.name +
- ") used in CertificateVerify handshake message", nsae);
- } catch (InvalidKeyException | SignatureException ikse) {
+ } catch (SignatureException ikse) {
throw chc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
"Cannot produce CertificateVerify signature", ikse);
}
@@ -647,7 +645,7 @@
this.signature = Record.getBytes16(m);
try {
Signature signer =
- signatureScheme.getSignature(x509Credentials.popPublicKey);
+ signatureScheme.getVerifier(x509Credentials.popPublicKey);
signer.update(shc.handshakeHash.archived());
if (!signer.verify(signature)) {
throw shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
@@ -865,18 +863,23 @@
X509Possession x509Possession) throws IOException {
super(context);
- this.signatureScheme = SignatureScheme.getPreferableAlgorithm(
+ Map.Entry<SignatureScheme, Signature> schemeAndSigner =
+ SignatureScheme.getSignerOfPreferableAlgorithm(
context.algorithmConstraints,
context.peerRequestedSignatureSchemes,
x509Possession,
context.negotiatedProtocol);
- if (signatureScheme == null) {
+ if (schemeAndSigner == null) {
// Unlikely, the credentials generator should have
// selected the preferable signature algorithm properly.
throw context.conContext.fatal(Alert.INTERNAL_ERROR,
- "No preferred signature algorithm for CertificateVerify");
+ "No supported CertificateVerify signature algorithm for " +
+ x509Possession.popPrivateKey.getAlgorithm() +
+ " key");
}
+ this.signatureScheme = schemeAndSigner.getKey();
+
byte[] hashValue = context.handshakeHash.digest();
byte[] contentCovered;
if (context.sslConfig.isClientMode) {
@@ -893,17 +896,10 @@
byte[] temproary = null;
try {
- Signature signer =
- signatureScheme.getSignature(x509Possession.popPrivateKey);
+ Signature signer = schemeAndSigner.getValue();
signer.update(contentCovered);
temproary = signer.sign();
- } catch (NoSuchAlgorithmException |
- InvalidAlgorithmParameterException nsae) {
- throw context.conContext.fatal(Alert.INTERNAL_ERROR,
- "Unsupported signature algorithm (" +
- signatureScheme.name +
- ") used in CertificateVerify handshake message", nsae);
- } catch (InvalidKeyException | SignatureException ikse) {
+ } catch (SignatureException ikse) {
throw context.conContext.fatal(Alert.HANDSHAKE_FAILURE,
"Cannot produce CertificateVerify signature", ikse);
}
@@ -974,7 +970,7 @@
try {
Signature signer =
- signatureScheme.getSignature(x509Credentials.popPublicKey);
+ signatureScheme.getVerifier(x509Credentials.popPublicKey);
signer.update(contentCovered);
if (!signer.verify(signature)) {
throw context.conContext.fatal(Alert.HANDSHAKE_FAILURE,
--- a/src/java.base/share/classes/sun/security/ssl/DHServerKeyExchange.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/DHServerKeyExchange.java Thu Nov 07 18:44:09 2019 +0000
@@ -42,6 +42,7 @@
import java.text.MessageFormat;
import java.util.EnumSet;
import java.util.Locale;
+import java.util.Map;
import javax.crypto.interfaces.DHPublicKey;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.DHPublicKeySpec;
@@ -124,25 +125,22 @@
shc.negotiatedProtocol.useTLS12PlusSpec();
Signature signer = null;
if (useExplicitSigAlgorithm) {
- signatureScheme = SignatureScheme.getPreferableAlgorithm(
- shc.algorithmConstraints,
- shc.peerRequestedSignatureSchemes,
- x509Possession,
- shc.negotiatedProtocol);
- if (signatureScheme == null) {
+ Map.Entry<SignatureScheme, Signature> schemeAndSigner =
+ SignatureScheme.getSignerOfPreferableAlgorithm(
+ shc.algorithmConstraints,
+ shc.peerRequestedSignatureSchemes,
+ x509Possession,
+ shc.negotiatedProtocol);
+ if (schemeAndSigner == null) {
// Unlikely, the credentials generator should have
// selected the preferable signature algorithm properly.
throw shc.conContext.fatal(Alert.INTERNAL_ERROR,
- "No preferred signature algorithm");
- }
- try {
- signer = signatureScheme.getSignature(
- x509Possession.popPrivateKey);
- } catch (NoSuchAlgorithmException | InvalidKeyException |
- InvalidAlgorithmParameterException nsae) {
- throw shc.conContext.fatal(Alert.INTERNAL_ERROR,
- "Unsupported signature algorithm: " +
- signatureScheme.name, nsae);
+ "No supported signature algorithm for " +
+ x509Possession.popPrivateKey.getAlgorithm() +
+ " key");
+ } else {
+ signatureScheme = schemeAndSigner.getKey();
+ signer = schemeAndSigner.getValue();
}
} else {
signatureScheme = null;
@@ -241,7 +239,7 @@
Signature signer;
if (useExplicitSigAlgorithm) {
try {
- signer = signatureScheme.getSignature(
+ signer = signatureScheme.getVerifier(
x509Credentials.popPublicKey);
} catch (NoSuchAlgorithmException | InvalidKeyException |
InvalidAlgorithmParameterException nsae) {
--- a/src/java.base/share/classes/sun/security/ssl/ECDHServerKeyExchange.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/ECDHServerKeyExchange.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,7 @@
import java.security.SignatureException;
import java.text.MessageFormat;
import java.util.Locale;
-import sun.security.ssl.NamedGroup.NamedGroupSpec;
+import java.util.Map;
import sun.security.ssl.SSLHandshake.HandshakeMessage;
import sun.security.ssl.SupportedGroupsExtension.SupportedGroups;
import sun.security.ssl.X509Authentication.X509Credentials;
@@ -135,27 +135,22 @@
shc.negotiatedProtocol.useTLS12PlusSpec();
Signature signer = null;
if (useExplicitSigAlgorithm) {
- signatureScheme = SignatureScheme.getPreferableAlgorithm(
- shc.algorithmConstraints,
- shc.peerRequestedSignatureSchemes,
- x509Possession,
- shc.negotiatedProtocol);
- if (signatureScheme == null) {
+ Map.Entry<SignatureScheme, Signature> schemeAndSigner =
+ SignatureScheme.getSignerOfPreferableAlgorithm(
+ shc.algorithmConstraints,
+ shc.peerRequestedSignatureSchemes,
+ x509Possession,
+ shc.negotiatedProtocol);
+ if (schemeAndSigner == null) {
// Unlikely, the credentials generator should have
// selected the preferable signature algorithm properly.
throw shc.conContext.fatal(Alert.INTERNAL_ERROR,
- "No preferred signature algorithm for " +
+ "No supported signature algorithm for " +
x509Possession.popPrivateKey.getAlgorithm() +
" key");
- }
- try {
- signer = signatureScheme.getSignature(
- x509Possession.popPrivateKey);
- } catch (NoSuchAlgorithmException | InvalidKeyException |
- InvalidAlgorithmParameterException nsae) {
- throw shc.conContext.fatal(Alert.INTERNAL_ERROR,
- "Unsupported signature algorithm: " +
- signatureScheme.name, nsae);
+ } else {
+ signatureScheme = schemeAndSigner.getKey();
+ signer = schemeAndSigner.getValue();
}
} else {
signatureScheme = null;
@@ -276,7 +271,7 @@
Signature signer;
if (useExplicitSigAlgorithm) {
try {
- signer = signatureScheme.getSignature(
+ signer = signatureScheme.getVerifier(
x509Credentials.popPublicKey);
} catch (NoSuchAlgorithmException | InvalidKeyException |
InvalidAlgorithmParameterException nsae) {
--- a/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/security/ssl/SignatureScheme.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,6 +30,7 @@
import java.security.spec.ECParameterSpec;
import java.security.spec.MGF1ParameterSpec;
import java.security.spec.PSSParameterSpec;
+import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -37,6 +38,7 @@
import java.util.EnumSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import sun.security.ssl.NamedGroup.NamedGroupSpec;
import sun.security.ssl.SupportedGroupsExtension.SupportedGroups;
@@ -425,7 +427,7 @@
return null;
}
- static SignatureScheme getPreferableAlgorithm(
+ static Map.Entry<SignatureScheme, Signature> getSignerOfPreferableAlgorithm(
AlgorithmConstraints constraints,
List<SignatureScheme> schemes,
X509Possession x509Possession,
@@ -452,7 +454,10 @@
x509Possession.getECParameterSpec();
if (params != null &&
ss.namedGroup == NamedGroup.valueOf(params)) {
- return ss;
+ Signature signer = ss.getSigner(signingKey);
+ if (signer != null) {
+ return new SimpleImmutableEntry<>(ss, signer);
+ }
}
if (SSLLogger.isOn &&
@@ -477,7 +482,10 @@
NamedGroup keyGroup = NamedGroup.valueOf(params);
if (keyGroup != null &&
SupportedGroups.isSupported(keyGroup)) {
- return ss;
+ Signature signer = ss.getSigner(signingKey);
+ if (signer != null) {
+ return new SimpleImmutableEntry<>(ss, signer);
+ }
}
}
@@ -488,7 +496,10 @@
"), unsupported EC parameter spec: " + params);
}
} else {
- return ss;
+ Signature signer = ss.getSigner(signingKey);
+ if (signer != null) {
+ return new SimpleImmutableEntry<>(ss, signer);
+ }
}
}
}
@@ -509,24 +520,49 @@
return new String[0];
}
- Signature getSignature(Key key) throws NoSuchAlgorithmException,
+ // This method is used to get the signature instance of this signature
+ // scheme for the specific public key. Unlike getSigner(), the exception
+ // is bubbled up. If the public key does not support this signature
+ // scheme, it normally means the TLS handshaking cannot continue and
+ // the connection should be terminated.
+ Signature getVerifier(PublicKey publicKey) throws NoSuchAlgorithmException,
InvalidAlgorithmParameterException, InvalidKeyException {
if (!isAvailable) {
return null;
}
- Signature signer = Signature.getInstance(algorithm);
- if (key instanceof PublicKey) {
- SignatureUtil.initVerifyWithParam(signer, (PublicKey)key,
- (signAlgParams != null ?
- signAlgParams.parameterSpec : null));
- } else {
- SignatureUtil.initSignWithParam(signer, (PrivateKey)key,
- (signAlgParams != null ?
- signAlgParams.parameterSpec : null),
- null);
+ Signature verifier = Signature.getInstance(algorithm);
+ SignatureUtil.initVerifyWithParam(verifier, publicKey,
+ (signAlgParams != null ? signAlgParams.parameterSpec : null));
+
+ return verifier;
+ }
+
+ // This method is also used to choose preferable signature scheme for the
+ // specific private key. If the private key does not support the signature
+ // scheme, {@code null} is returned, and the caller may fail back to next
+ // available signature scheme.
+ private Signature getSigner(PrivateKey privateKey) {
+ if (!isAvailable) {
+ return null;
}
- return signer;
+ try {
+ Signature signer = Signature.getInstance(algorithm);
+ SignatureUtil.initSignWithParam(signer, privateKey,
+ (signAlgParams != null ? signAlgParams.parameterSpec : null),
+ null);
+ return signer;
+ } catch (NoSuchAlgorithmException | InvalidKeyException |
+ InvalidAlgorithmParameterException nsae) {
+ if (SSLLogger.isOn &&
+ SSLLogger.isOn("ssl,handshake,verbose")) {
+ SSLLogger.finest(
+ "Ignore unsupported signature algorithm (" +
+ this.name + ")", nsae);
+ }
+ }
+
+ return null;
}
}
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java Thu Nov 07 18:44:09 2019 +0000
@@ -58,6 +58,7 @@
import java.text.Collator;
import java.text.MessageFormat;
import java.util.*;
+import java.util.function.BiFunction;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.math.BigInteger;
@@ -4109,15 +4110,51 @@
}
/**
- * Match a command (may be abbreviated) with a command set.
- * @param s the command provided
+ * Match a command with a command set. The match can be exact, or
+ * partial, or case-insensitive.
+ *
+ * @param s the command provided by user
* @param list the legal command set. If there is a null, commands after it
- * are regarded experimental, which means they are supported but their
- * existence should not be revealed to user.
+ * are regarded experimental, which means they are supported but their
+ * existence should not be revealed to user.
* @return the position of a single match, or -1 if none matched
* @throws Exception if s is ambiguous
*/
private static int oneOf(String s, String... list) throws Exception {
+
+ // First, if there is an exact match, returns it.
+ int res = oneOfMatch((a,b) -> a.equals(b), s, list);
+ if (res >= 0) {
+ return res;
+ }
+
+ // Second, if there is one single camelCase or prefix match, returns it.
+ // This regex substitution removes all lowercase letters not at the
+ // beginning, so "keyCertSign" becomes "kCS".
+ res = oneOfMatch((a,b) -> a.equals(b.replaceAll("(?<!^)[a-z]", ""))
+ || b.startsWith(a), s, list);
+ if (res >= 0) {
+ return res;
+ }
+
+ // Finally, retry the 2nd step ignoring case
+ return oneOfMatch((a,b) -> a.equalsIgnoreCase(b.replaceAll("(?<!^)[a-z]", ""))
+ || b.toUpperCase(Locale.ROOT).startsWith(a.toUpperCase(Locale.ROOT)),
+ s, list);
+ }
+
+ /**
+ * Match a command with a command set.
+ *
+ * @param matcher a BiFunction which returns {@code true} if the 1st
+ * argument (user input) matches the 2nd one (full command)
+ * @param s the command provided by user
+ * @param list the legal command set
+ * @return the position of a single match, or -1 if none matched
+ * @throws Exception if s is ambiguous
+ */
+ private static int oneOfMatch(BiFunction<String,String,Boolean> matcher,
+ String s, String... list) throws Exception {
int[] match = new int[list.length];
int nmatch = 0;
int experiment = Integer.MAX_VALUE;
@@ -4127,25 +4164,8 @@
experiment = i;
continue;
}
- if (one.toLowerCase(Locale.ENGLISH)
- .startsWith(s.toLowerCase(Locale.ENGLISH))) {
+ if (matcher.apply(s, one)) {
match[nmatch++] = i;
- } else {
- StringBuilder sb = new StringBuilder();
- boolean first = true;
- for (char c: one.toCharArray()) {
- if (first) {
- sb.append(c);
- first = false;
- } else {
- if (!Character.isLowerCase(c)) {
- sb.append(c);
- }
- }
- }
- if (sb.toString().equalsIgnoreCase(s)) {
- match[nmatch++] = i;
- }
}
}
if (nmatch == 0) {
@@ -4159,7 +4179,7 @@
}
StringBuilder sb = new StringBuilder();
MessageFormat form = new MessageFormat(rb.getString
- ("command.{0}.is.ambiguous."));
+ ("command.{0}.is.ambiguous."));
Object[] source = {s};
sb.append(form.format(source));
sb.append("\n ");
--- a/src/java.base/share/native/libjava/Class.c Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/native/libjava/Class.c Thu Nov 07 18:44:09 2019 +0000
@@ -73,7 +73,6 @@
{"getRawTypeAnnotations", "()" BA, (void *)&JVM_GetClassTypeAnnotations},
{"getNestHost0", "()" CLS, (void *)&JVM_GetNestHost},
{"getNestMembers0", "()[" CLS, (void *)&JVM_GetNestMembers},
- {"linkClass", "(" CLS ")V", (void *)&JVM_LinkClass},
};
#undef OBJ
--- a/src/java.base/share/native/libjava/Thread.c Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/share/native/libjava/Thread.c Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,9 +50,7 @@
{"yield", "()V", (void *)&JVM_Yield},
{"sleep", "(J)V", (void *)&JVM_Sleep},
{"currentThread", "()" THD, (void *)&JVM_CurrentThread},
- {"countStackFrames", "()I", (void *)&JVM_CountStackFrames},
{"interrupt0", "()V", (void *)&JVM_Interrupt},
- {"isInterrupted", "(Z)Z", (void *)&JVM_IsInterrupted},
{"holdsLock", "(" OBJ ")Z", (void *)&JVM_HoldsLock},
{"getThreads", "()[" THD, (void *)&JVM_GetAllThreads},
{"dumpThreads", "([" THD ")[[" STE, (void *)&JVM_DumpThreads},
@@ -69,3 +67,12 @@
{
(*env)->RegisterNatives(env, cls, methods, ARRAY_LENGTH(methods));
}
+
+JNIEXPORT void JNICALL
+Java_java_lang_Thread_clearInterruptEvent(JNIEnv *env, jclass cls)
+{
+#if defined(_WIN32)
+ // Need to reset the interrupt event used by Process.waitFor
+ ResetEvent((HANDLE) JVM_GetThreadInterruptEvent());
+#endif
+}
--- a/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixFileStore.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -118,13 +118,31 @@
@Override
public long getTotalSpace() throws IOException {
UnixFileStoreAttributes attrs = readAttributes();
- return attrs.blockSize() * attrs.totalBlocks();
+ try {
+ return Math.multiplyExact(attrs.blockSize(), attrs.totalBlocks());
+ } catch (ArithmeticException ignore) {
+ return Long.MAX_VALUE;
+ }
}
@Override
public long getUsableSpace() throws IOException {
- UnixFileStoreAttributes attrs = readAttributes();
- return attrs.blockSize() * attrs.availableBlocks();
+ UnixFileStoreAttributes attrs = readAttributes();
+ try {
+ return Math.multiplyExact(attrs.blockSize(), attrs.availableBlocks());
+ } catch (ArithmeticException ignore) {
+ return Long.MAX_VALUE;
+ }
+ }
+
+ @Override
+ public long getUnallocatedSpace() throws IOException {
+ UnixFileStoreAttributes attrs = readAttributes();
+ try {
+ return Math.multiplyExact(attrs.blockSize(), attrs.freeBlocks());
+ } catch (ArithmeticException ignore) {
+ return Long.MAX_VALUE;
+ }
}
@Override
@@ -134,12 +152,6 @@
}
@Override
- public long getUnallocatedSpace() throws IOException {
- UnixFileStoreAttributes attrs = readAttributes();
- return attrs.blockSize() * attrs.freeBlocks();
- }
-
- @Override
public <V extends FileStoreAttributeView> V getFileStoreAttributeView(Class<V> view)
{
if (view == null)
--- a/src/java.base/windows/classes/sun/nio/fs/WindowsFileStore.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/windows/classes/sun/nio/fs/WindowsFileStore.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -145,21 +145,25 @@
@Override
public long getTotalSpace() throws IOException {
- return readDiskFreeSpaceEx().totalNumberOfBytes();
+ long space = readDiskFreeSpaceEx().totalNumberOfBytes();
+ return space >= 0 ? space : Long.MAX_VALUE;
}
@Override
public long getUsableSpace() throws IOException {
- return readDiskFreeSpaceEx().freeBytesAvailable();
- }
-
- public long getBlockSize() throws IOException {
- return readDiskFreeSpace().bytesPerSector();
+ long space = readDiskFreeSpaceEx().freeBytesAvailable();
+ return space >= 0 ? space : Long.MAX_VALUE;
}
@Override
public long getUnallocatedSpace() throws IOException {
- return readDiskFreeSpaceEx().freeBytesAvailable();
+ long space = readDiskFreeSpaceEx().freeBytesAvailable();
+ return space >= 0 ? space : Long.MAX_VALUE;
+ }
+
+ @Override
+ public long getBlockSize() throws IOException {
+ return readDiskFreeSpace().bytesPerSector();
}
@Override
--- a/src/java.base/windows/native/libjava/canonicalize_md.c Thu Oct 31 16:16:21 2019 +0000
+++ b/src/java.base/windows/native/libjava/canonicalize_md.c Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,39 +41,9 @@
#undef DEBUG_PATH /* Define this to debug path code */
-#define isfilesep(c) ((c) == '/' || (c) == '\\')
-#define wisfilesep(c) ((c) == L'/' || (c) == L'\\')
-#define islb(c) (IsDBCSLeadByte((BYTE)(c)))
-
-
/* Copy bytes to dst, not going past dend; return dst + number of bytes copied,
or NULL if dend would have been exceeded. If first != '\0', copy that byte
before copying bytes from src to send - 1. */
-
-static char *
-cp(char *dst, char *dend, char first, char *src, char *send)
-{
- char *p = src, *q = dst;
- if (first != '\0') {
- if (q < dend) {
- *q++ = first;
- } else {
- errno = ENAMETOOLONG;
- return NULL;
- }
- }
- if (send - p > dend - q) {
- errno = ENAMETOOLONG;
- return NULL;
- }
- while (p < send) {
- *q++ = *p++;
- }
- return q;
-}
-
-/* Wide character version of cp */
-
static WCHAR*
wcp(WCHAR *dst, WCHAR *dend, WCHAR first, WCHAR *src, WCHAR *send)
{
@@ -95,23 +65,8 @@
return q;
}
-
/* Find first instance of '\\' at or following start. Return the address of
that byte or the address of the null terminator if '\\' is not found. */
-
-static char *
-nextsep(char *start)
-{
- char *p = start;
- int c;
- while ((c = *p) && (c != '\\')) {
- p += ((islb(c) && p[1]) ? 2 : 1);
- }
- return p;
-}
-
-/* Wide character version of nextsep */
-
static WCHAR *
wnextsep(WCHAR *start)
{
@@ -123,21 +78,6 @@
}
/* Tell whether the given string contains any wildcard characters */
-
-static int
-wild(char *start)
-{
- char *p = start;
- int c;
- while (c = *p) {
- if ((c == '*') || (c == '?')) return 1;
- p += ((islb(c) && p[1]) ? 2 : 1);
- }
- return 0;
-}
-
-/* Wide character version of wild */
-
static int
wwild(WCHAR *start)
{
@@ -157,25 +97,6 @@
Prohibited canonical paths: c:\..\x c:\x.\d c:\...
*/
static int
-dots(char *start)
-{
- char *p = start;
- while (*p) {
- if ((p = strchr(p, '.')) == NULL) // find next occurrence of '.'
- return 0; // no more dots
- p++; // next char
- while ((*p) == '.') // go to the end of dots
- p++;
- if (*p && (*p != '\\')) // path element does not end with a dot
- p++; // go to the next char
- else
- return 1; // path element does end with a dot - prohibited
- }
- return 0; // no prohibited combinations of dots found
-}
-
-/* Wide character version of dots */
-static int
wdots(WCHAR *start)
{
WCHAR *p = start;
@@ -203,7 +124,6 @@
successfully after copying the rest of the original path to the result path.
Other I/O errors cause an error return.
*/
-
int
lastErrorReportable()
{
@@ -225,222 +145,10 @@
return 1;
}
-int wcanonicalize(WCHAR *orig_path, WCHAR *result, int size);
-
/* Convert a pathname to canonical form. The input orig_path is assumed to
have been converted to native form already, via JVM_NativePath(). This is
necessary because _fullpath() rejects duplicate separator characters on
Win95, though it accepts them on NT. */
-
-int
-canonicalize(char *orig_path, char *result, int size)
-{
- WIN32_FIND_DATA fd;
- HANDLE h;
- char path[1024]; /* Working copy of path */
- char *src, *dst, *dend;
- wchar_t *worig_path, *wresult;
- size_t converted_chars = 0;
-
- /* handle long path with length >= MAX_PATH */
- if (strlen(orig_path) >= MAX_PATH) {
- if ((worig_path = (WCHAR*)malloc(size * sizeof(WCHAR))) == NULL)
- return -1;
-
- if (mbstowcs_s(&converted_chars, worig_path, (size_t)size, orig_path, (size_t)(size - 1)) != 0) {
- free(worig_path);
- return -1;
- }
-
- if ((wresult = (WCHAR*)malloc(size * sizeof(WCHAR))) == NULL)
- return -1;
-
- if (wcanonicalize(worig_path, wresult, size) != 0) {
- free(worig_path);
- free(wresult);
- return -1;
- }
-
- if (wcstombs_s(&converted_chars, result, (size_t)size, wresult, (size_t)(size - 1)) != 0) {
- free(worig_path);
- free(wresult);
- return -1;
- }
-
- free(worig_path);
- free(wresult);
- return 0;
- }
-
- /* Reject paths that contain wildcards */
- if (wild(orig_path)) {
- errno = EINVAL;
- return -1;
- }
-
- /* Collapse instances of "foo\.." and ensure absoluteness. Note that
- contrary to the documentation, the _fullpath procedure does not require
- the drive to be available. It also does not reliably change all
- occurrences of '/' to '\\' on Win95, so now JVM_NativePath does that. */
- if (!_fullpath(path, orig_path, sizeof(path))) {
- return -1;
- }
-
- /* Correction for Win95: _fullpath may leave a trailing "\\"
- on a UNC pathname */
- if ((path[0] == '\\') && (path[1] == '\\')) {
- char *p = path + strlen(path);
- if ((p[-1] == '\\') && !islb(p[-2])) {
- p[-1] = '\0';
- }
- }
-
- if (dots(path)) /* Check for prohibited combinations of dots */
- return -1;
-
- src = path; /* Start scanning here */
- dst = result; /* Place results here */
- dend = dst + size; /* Don't go to or past here */
-
- /* Copy prefix, assuming path is absolute */
- if (isalpha(src[0]) && (src[1] == ':') && (src[2] == '\\')) {
- /* Drive specifier */
- *src = toupper(*src); /* Canonicalize drive letter */
- if (!(dst = cp(dst, dend, '\0', src, src + 2))) {
- return -1;
- }
- src += 2;
- } else if ((src[0] == '\\') && (src[1] == '\\')) {
- /* UNC pathname */
- char *p;
- p = nextsep(src + 2); /* Skip past host name */
- if (!*p) {
- /* A UNC pathname must begin with "\\\\host\\share",
- so reject this path as invalid if there is no share name */
- errno = EINVAL;
- return -1;
- }
- p = nextsep(p + 1); /* Skip past share name */
- if (!(dst = cp(dst, dend, '\0', src, p))) {
- return -1;
- }
- src = p;
- } else {
- /* Invalid path */
- errno = EINVAL;
- return -1;
- }
-
- /* Windows 95/98/Me bug - FindFirstFile fails on network mounted drives */
- /* for root pathes like "E:\" . If the path has this form, we should */
- /* simply return it, it is already canonicalized. */
- if (strlen(path) == 3 && path[1] == ':' && path[2] == '\\') {
- /* At this point we have already copied the drive specifier ("z:")*/
- /* so we need to copy "\" and the null character. */
- result[2] = '\\';
- result[3] = '\0';
- return 0;
- }
-
- /* At this point we have copied either a drive specifier ("z:") or a UNC
- prefix ("\\\\host\\share") to the result buffer, and src points to the
- first byte of the remainder of the path. We now scan through the rest
- of the path, looking up each prefix in order to find the true name of
- the last element of each prefix, thereby computing the full true name of
- the original path. */
- while (*src) {
- char *p = nextsep(src + 1); /* Find next separator */
- char c = *p;
- assert(*src == '\\'); /* Invariant */
- *p = '\0'; /* Temporarily clear separator */
- h = FindFirstFile(path, &fd); /* Look up prefix */
- *p = c; /* Restore separator */
- if (h != INVALID_HANDLE_VALUE) {
- /* Lookup succeeded; append true name to result and continue */
- FindClose(h);
- if (!(dst = cp(dst, dend, '\\',
- fd.cFileName,
- fd.cFileName + strlen(fd.cFileName)))) {
- return -1;
- }
- src = p;
- continue;
- } else {
- if (!lastErrorReportable()) {
- if (!(dst = cp(dst, dend, '\0', src, src + strlen(src)))) {
- return -1;
- }
- break;
- } else {
- return -1;
- }
- }
- }
-
- if (dst >= dend) {
- errno = ENAMETOOLONG;
- return -1;
- }
- *dst = '\0';
- return 0;
-
-}
-
-
-/* Convert a pathname to canonical form. The input prefix is assumed
- to be in canonical form already, and the trailing filename must not
- contain any wildcard, dot/double dot, or other "tricky" characters
- that are rejected by the canonicalize() routine above. This
- routine is present to allow the canonicalization prefix cache to be
- used while still returning canonical names with the correct
- capitalization. */
-
-int
-canonicalizeWithPrefix(char* canonicalPrefix, char* pathWithCanonicalPrefix, char *result, int size)
-{
- WIN32_FIND_DATA fd;
- HANDLE h;
- char *src, *dst, *dend;
-
- src = pathWithCanonicalPrefix;
- dst = result; /* Place results here */
- dend = dst + size; /* Don't go to or past here */
-
- h = FindFirstFile(pathWithCanonicalPrefix, &fd); /* Look up file */
- if (h != INVALID_HANDLE_VALUE) {
- /* Lookup succeeded; concatenate true name to prefix */
- FindClose(h);
- if (!(dst = cp(dst, dend, '\0',
- canonicalPrefix,
- canonicalPrefix + strlen(canonicalPrefix)))) {
- return -1;
- }
- if (!(dst = cp(dst, dend, '\\',
- fd.cFileName,
- fd.cFileName + strlen(fd.cFileName)))) {
- return -1;
- }
- } else {
- if (!lastErrorReportable()) {
- if (!(dst = cp(dst, dend, '\0', src, src + strlen(src)))) {
- return -1;
- }
- } else {
- return -1;
- }
- }
-
- if (dst >= dend) {
- errno = ENAMETOOLONG;
- return -1;
- }
- *dst = '\0';
- return 0;
-}
-
-
-/* Wide character version of canonicalize. Size is a wide-character size. */
-
int
wcanonicalize(WCHAR *orig_path, WCHAR *result, int size)
{
@@ -559,9 +267,13 @@
return -1;
}
-
-/* Wide character version of canonicalizeWithPrefix. */
-
+/* Convert a pathname to canonical form. The input prefix is assumed
+ to be in canonical form already, and the trailing filename must not
+ contain any wildcard, dot/double dot, or other "tricky" characters
+ that are rejected by the canonicalize() routine above. This
+ routine is present to allow the canonicalization prefix cache to be
+ used while still returning canonical names with the correct
+ capitalization. */
int
wcanonicalizeWithPrefix(WCHAR *canonicalPrefix, WCHAR *pathWithCanonicalPrefix, WCHAR *result, int size)
{
@@ -613,6 +325,46 @@
return 0;
}
+/* Non-Wide character version of canonicalize.
+ Converts to whchar and delegates to wcanonicalize. */
+int
+canonicalize(char* orig_path, char* result, int size) {
+ wchar_t* wpath = NULL;
+ wchar_t* wresult = NULL;
+ size_t conv;
+ size_t path_len = strlen(orig_path);
+ int ret = -1;
+
+ if ((wpath = (wchar_t*) malloc(sizeof(wchar_t) * (path_len + 1))) == NULL) {
+ goto finish;
+ }
+
+ if (mbstowcs_s(&conv, wpath, path_len + 1, orig_path, path_len) != 0) {
+ goto finish;
+ }
+
+ if ((wresult = (wchar_t*) malloc(sizeof(wchar_t) * size)) == NULL) {
+ goto finish;
+ }
+
+ if (wcanonicalize(wpath, wresult, size) != 0) {
+ goto finish;
+ }
+
+ if (wcstombs_s(&conv, result, (size_t) size, wresult, (size_t) (size - 1)) != 0) {
+ goto finish;
+ }
+
+ // Change return value to success.
+ ret = 0;
+
+finish:
+ free(wresult);
+ free(wpath);
+
+ return ret;
+}
+
/* The appropriate location of getPrefixed() should be io_util_md.c, but
java.lang.instrument package has hardwired canonicalize_md.c into their
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Nov 07 18:44:09 2019 +0000
@@ -951,34 +951,20 @@
private Env<AttrContext> attribStatToTree(JCTree stat, Env<AttrContext>env,
JCTree tree, Map<JCClassDecl, JCClassDecl> copiedClasses) {
- JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
- Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log);
- try {
- Env<AttrContext> result = attr.attribStatToTree(stat, env, tree);
+ Env<AttrContext> result = attr.attribStatToTree(stat, env, tree);
- enter.unenter(env.toplevel, stat);
- fixLocalClassNames(copiedClasses, env);
- return result;
- } finally {
- log.popDiagnosticHandler(diagHandler);
- log.useSource(prev);
- }
+ fixLocalClassNames(copiedClasses, env);
+
+ return result;
}
private Env<AttrContext> attribExprToTree(JCExpression expr, Env<AttrContext>env,
JCTree tree, Map<JCClassDecl, JCClassDecl> copiedClasses) {
- JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
- Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log);
- try {
- Env<AttrContext> result = attr.attribExprToTree(expr, env, tree);
+ Env<AttrContext> result = attr.attribExprToTree(expr, env, tree);
- enter.unenter(env.toplevel, expr);
- fixLocalClassNames(copiedClasses, env);
- return result;
- } finally {
- log.popDiagnosticHandler(diagHandler);
- log.useSource(prev);
- }
+ fixLocalClassNames(copiedClasses, env);
+
+ return result;
}
/* Change the flatnames of the local and anonymous classes in the Scope to
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Analyzer.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -564,7 +564,7 @@
//TODO: to further refine the analysis, try all rewriting combinations
deferredAttr.attribSpeculative(treeToAnalyze, rewriting.env, attr.statInfo, new TreeRewriter(rewriting),
- t -> rewriting.diagHandler(), AttributionMode.ANALYZER, argumentAttr.withLocalCacheContext());
+ () -> rewriting.diagHandler(), AttributionMode.ANALYZER, argumentAttr.withLocalCacheContext());
rewriting.analyzer.process(rewriting.oldTree, rewriting.replacement, rewriting.erroneous);
} catch (Throwable ex) {
Assert.error("Analyzer error when processing: " +
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1377,4 +1377,31 @@
public void newRound() {
blockCount = 1;
}
+
+ public Queues setQueues(Queues nue) {
+ Queues stored = new Queues(q, validateQ, typesQ, afterTypesQ);
+ this.q = nue.q;
+ this.typesQ = nue.typesQ;
+ this.afterTypesQ = nue.afterTypesQ;
+ this.validateQ = nue.validateQ;
+ return stored;
+ }
+
+ static class Queues {
+ private final ListBuffer<Runnable> q;
+ private final ListBuffer<Runnable> validateQ;
+ private final ListBuffer<Runnable> typesQ;
+ private final ListBuffer<Runnable> afterTypesQ;
+
+ public Queues() {
+ this(new ListBuffer<Runnable>(), new ListBuffer<Runnable>(), new ListBuffer<Runnable>(), new ListBuffer<Runnable>());
+ }
+
+ public Queues(ListBuffer<Runnable> q, ListBuffer<Runnable> validateQ, ListBuffer<Runnable> typesQ, ListBuffer<Runnable> afterTypesQ) {
+ this.q = q;
+ this.validateQ = validateQ;
+ this.typesQ = typesQ;
+ this.afterTypesQ = afterTypesQ;
+ }
+ }
}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java Thu Nov 07 18:44:09 2019 +0000
@@ -74,11 +74,8 @@
import static com.sun.tools.javac.code.Kinds.Kind.*;
import static com.sun.tools.javac.code.TypeTag.*;
import static com.sun.tools.javac.code.TypeTag.WILDCARD;
-import com.sun.tools.javac.comp.Analyzer.AnalyzerMode;
import static com.sun.tools.javac.tree.JCTree.Tag.*;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
-import com.sun.tools.javac.util.Log.DeferredDiagnosticHandler;
-import com.sun.tools.javac.util.Log.DiscardDiagnosticHandler;
/** This is the main context-dependent analysis phase in GJC. It
* encompasses name resolution, type checking and constant folding as
@@ -394,12 +391,20 @@
}
public Env<AttrContext> attribExprToTree(JCTree expr, Env<AttrContext> env, JCTree tree) {
+ return attribToTree(expr, env, tree, unknownExprInfo);
+ }
+
+ public Env<AttrContext> attribStatToTree(JCTree stmt, Env<AttrContext> env, JCTree tree) {
+ return attribToTree(stmt, env, tree, statInfo);
+ }
+
+ private Env<AttrContext> attribToTree(JCTree root, Env<AttrContext> env, JCTree tree, ResultInfo resultInfo) {
breakTree = tree;
JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
- EnumSet<AnalyzerMode> analyzerModes = EnumSet.copyOf(analyzer.analyzerModes);
try {
- analyzer.analyzerModes.clear();
- attribExpr(expr, env);
+ deferredAttr.attribSpeculative(root, env, resultInfo,
+ null, DeferredAttr.AttributionMode.ANALYZER,
+ argumentAttr.withLocalCacheContext());
} catch (BreakAttr b) {
return b.env;
} catch (AssertionError ae) {
@@ -411,30 +416,6 @@
} finally {
breakTree = null;
log.useSource(prev);
- analyzer.analyzerModes.addAll(analyzerModes);
- }
- return env;
- }
-
- public Env<AttrContext> attribStatToTree(JCTree stmt, Env<AttrContext> env, JCTree tree) {
- breakTree = tree;
- JavaFileObject prev = log.useSource(env.toplevel.sourcefile);
- EnumSet<AnalyzerMode> analyzerModes = EnumSet.copyOf(analyzer.analyzerModes);
- try {
- analyzer.analyzerModes.clear();
- attribStat(stmt, env);
- } catch (BreakAttr b) {
- return b.env;
- } catch (AssertionError ae) {
- if (ae.getCause() instanceof BreakAttr) {
- return ((BreakAttr)(ae.getCause())).env;
- } else {
- throw ae;
- }
- } finally {
- breakTree = null;
- log.useSource(prev);
- analyzer.analyzerModes.addAll(analyzerModes);
}
return env;
}
@@ -1273,7 +1254,7 @@
}
public void visitBlock(JCBlock tree) {
- if (env.info.scope.owner.kind == TYP) {
+ if (env.info.scope.owner.kind == TYP || env.info.scope.owner.kind == ERR) {
// Block is a static or instance initializer;
// let the owner of the environment be a freshly
// created BLOCK-method.
@@ -1533,8 +1514,8 @@
attribCase.accept(c, caseEnv);
} finally {
caseEnv.info.scope.leave();
- addVars(c.stats, switchEnv.info.scope);
}
+ addVars(c.stats, switchEnv.info.scope);
}
} finally {
switchEnv.info.scope.leave();
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/DeferredAttr.java Thu Nov 07 18:44:09 2019 +0000
@@ -47,6 +47,7 @@
import com.sun.tools.javac.tree.JCTree.*;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
import com.sun.tools.javac.util.Log.DeferredDiagnosticHandler;
+import com.sun.tools.javac.util.Log.DiagnosticHandler;
import java.util.ArrayList;
import java.util.Collection;
@@ -57,13 +58,14 @@
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
-import java.util.function.Function;
+import java.util.function.Supplier;
import com.sun.source.tree.MemberReferenceTree;
import com.sun.tools.javac.code.Type;
import com.sun.tools.javac.tree.JCTree.JCMemberReference.OverloadKind;
import static com.sun.tools.javac.code.TypeTag.*;
+import com.sun.tools.javac.comp.Annotate.Queues;
import static com.sun.tools.javac.tree.JCTree.Tag.*;
/**
@@ -80,6 +82,7 @@
public class DeferredAttr extends JCTree.Visitor {
protected static final Context.Key<DeferredAttr> deferredAttrKey = new Context.Key<>();
+ final Annotate annotate;
final Attr attr;
final ArgumentAttr argumentAttr;
final Check chk;
@@ -107,6 +110,7 @@
protected DeferredAttr(Context context) {
context.put(deferredAttrKey, this);
+ annotate = Annotate.instance(context);
attr = Attr.instance(context);
argumentAttr = ArgumentAttr.instance(context);
chk = Check.instance(context);
@@ -483,31 +487,44 @@
*/
JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) {
return attribSpeculative(tree, env, resultInfo, treeCopier,
- newTree->new DeferredDiagnosticHandler(log), AttributionMode.SPECULATIVE, null);
+ null, AttributionMode.SPECULATIVE, null);
}
JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo, LocalCacheContext localCache) {
return attribSpeculative(tree, env, resultInfo, treeCopier,
- newTree->new DeferredDiagnosticHandler(log), AttributionMode.SPECULATIVE, localCache);
+ null, AttributionMode.SPECULATIVE, localCache);
}
<Z> JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo, TreeCopier<Z> deferredCopier,
- Function<JCTree, DeferredDiagnosticHandler> diagHandlerCreator, AttributionMode attributionMode,
+ Supplier<DiagnosticHandler> diagHandlerCreator, AttributionMode attributionMode,
LocalCacheContext localCache) {
final JCTree newTree = deferredCopier.copy(tree);
- Env<AttrContext> speculativeEnv = env.dup(newTree, env.info.dup(env.info.scope.dupUnshared(env.info.scope.owner)));
+ return attribSpeculative(newTree, env, resultInfo, diagHandlerCreator, attributionMode, localCache);
+ }
+
+ /**
+ * Attribute the given tree, mostly reverting side-effects applied to shared
+ * compiler state. Exceptions include the ArgumentAttr.argumentTypeCache,
+ * changes to which may be preserved if localCache is null.
+ */
+ <Z> JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo,
+ Supplier<DiagnosticHandler> diagHandlerCreator, AttributionMode attributionMode,
+ LocalCacheContext localCache) {
+ Env<AttrContext> speculativeEnv = env.dup(tree, env.info.dup(env.info.scope.dupUnshared(env.info.scope.owner)));
speculativeEnv.info.attributionMode = attributionMode;
- Log.DeferredDiagnosticHandler deferredDiagnosticHandler = diagHandlerCreator.apply(newTree);
+ Log.DiagnosticHandler deferredDiagnosticHandler = diagHandlerCreator != null ? diagHandlerCreator.get() : new DeferredDiagnosticHandler(log);
DeferredCompletionFailureHandler.Handler prevCFHandler = dcfh.setHandler(dcfh.speculativeCodeHandler);
+ Queues prevQueues = annotate.setQueues(new Queues());
int nwarnings = log.nwarnings;
log.nwarnings = 0;
try {
- attr.attribTree(newTree, speculativeEnv, resultInfo);
- return newTree;
+ attr.attribTree(tree, speculativeEnv, resultInfo);
+ return tree;
} finally {
+ annotate.setQueues(prevQueues);
dcfh.setHandler(prevCFHandler);
log.nwarnings += nwarnings;
- enter.unenter(env.toplevel, newTree);
+ enter.unenter(env.toplevel, tree);
log.popDiagnosticHandler(deferredDiagnosticHandler);
if (localCache != null) {
localCache.leave();
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.c Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,573 +0,0 @@
-/*
- * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 <jni.h>
-#include "libproc.h"
-#include "proc_service.h"
-
-#include <elf.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-#if defined(x86_64) && !defined(amd64)
-#define amd64 1
-#endif
-
-#if defined(i386) && !defined(i586)
-#define i586 1
-#endif
-
-#ifdef i586
-#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
-#endif
-
-#ifdef amd64
-#include "sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext.h"
-#endif
-
-#if defined(sparc) || defined(sparcv9)
-#include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h"
-#endif
-
-#if defined(ppc64) || defined(ppc64le)
-#include "sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext.h"
-#endif
-
-#ifdef aarch64
-#include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h"
-#endif
-
-static jfieldID p_ps_prochandle_ID = 0;
-static jfieldID threadList_ID = 0;
-static jfieldID loadObjectList_ID = 0;
-
-static jmethodID createClosestSymbol_ID = 0;
-static jmethodID createLoadObject_ID = 0;
-static jmethodID getThreadForThreadId_ID = 0;
-static jmethodID listAdd_ID = 0;
-
-/*
- * SA_ALTROOT environment variable.
- * This memory holds env string for putenv(3).
- */
-static char *saaltroot = NULL;
-
-#define CHECK_EXCEPTION_(value) if ((*env)->ExceptionOccurred(env)) { return value; }
-#define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
-#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
-#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
-
-void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
- jclass clazz;
- clazz = (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException");
- CHECK_EXCEPTION;
- (*env)->ThrowNew(env, clazz, errMsg);
-}
-
-struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
- jlong ptr = (*env)->GetLongField(env, this_obj, p_ps_prochandle_ID);
- return (struct ps_prochandle*)(intptr_t)ptr;
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: init0
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_init0
- (JNIEnv *env, jclass cls) {
- jclass listClass;
-
- if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) {
- THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
- }
-
- // fields we use
- p_ps_prochandle_ID = (*env)->GetFieldID(env, cls, "p_ps_prochandle", "J");
- CHECK_EXCEPTION;
- threadList_ID = (*env)->GetFieldID(env, cls, "threadList", "Ljava/util/List;");
- CHECK_EXCEPTION;
- loadObjectList_ID = (*env)->GetFieldID(env, cls, "loadObjectList", "Ljava/util/List;");
- CHECK_EXCEPTION;
-
- // methods we use
- createClosestSymbol_ID = (*env)->GetMethodID(env, cls, "createClosestSymbol",
- "(Ljava/lang/String;J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;");
- CHECK_EXCEPTION;
- createLoadObject_ID = (*env)->GetMethodID(env, cls, "createLoadObject",
- "(Ljava/lang/String;JJ)Lsun/jvm/hotspot/debugger/cdbg/LoadObject;");
- CHECK_EXCEPTION;
- getThreadForThreadId_ID = (*env)->GetMethodID(env, cls, "getThreadForThreadId",
- "(J)Lsun/jvm/hotspot/debugger/ThreadProxy;");
- CHECK_EXCEPTION;
- // java.util.List method we call
- listClass = (*env)->FindClass(env, "java/util/List");
- CHECK_EXCEPTION;
- listAdd_ID = (*env)->GetMethodID(env, listClass, "add", "(Ljava/lang/Object;)Z");
- CHECK_EXCEPTION;
-}
-
-JNIEXPORT jint JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getAddressSize
- (JNIEnv *env, jclass cls)
-{
-#ifdef _LP64
- return 8;
-#else
- return 4;
-#endif
-
-}
-
-
-static void fillThreadsAndLoadObjects(JNIEnv* env, jobject this_obj, struct ps_prochandle* ph) {
- int n = 0, i = 0;
-
- // add threads
- n = get_num_threads(ph);
- for (i = 0; i < n; i++) {
- jobject thread;
- jobject threadList;
- lwpid_t lwpid;
-
- lwpid = get_lwp_id(ph, i);
- thread = (*env)->CallObjectMethod(env, this_obj, getThreadForThreadId_ID,
- (jlong)lwpid);
- CHECK_EXCEPTION;
- threadList = (*env)->GetObjectField(env, this_obj, threadList_ID);
- CHECK_EXCEPTION;
- (*env)->CallBooleanMethod(env, threadList, listAdd_ID, thread);
- CHECK_EXCEPTION;
- }
-
- // add load objects
- n = get_num_libs(ph);
- for (i = 0; i < n; i++) {
- uintptr_t base;
- const char* name;
- jobject loadObject;
- jobject loadObjectList;
- jstring str;
-
- base = get_lib_base(ph, i);
- name = get_lib_name(ph, i);
-
- str = (*env)->NewStringUTF(env, name);
- CHECK_EXCEPTION;
- loadObject = (*env)->CallObjectMethod(env, this_obj, createLoadObject_ID, str, (jlong)0, (jlong)base);
- CHECK_EXCEPTION;
- loadObjectList = (*env)->GetObjectField(env, this_obj, loadObjectList_ID);
- CHECK_EXCEPTION;
- (*env)->CallBooleanMethod(env, loadObjectList, listAdd_ID, loadObject);
- CHECK_EXCEPTION;
- }
-}
-
-
-/*
- * Verify that a named ELF binary file (core or executable) has the same
- * bitness as ourselves.
- * Throw an exception if there is a mismatch or other problem.
- *
- * If we proceed using a mismatched debugger/debuggee, the best to hope
- * for is a missing symbol, the worst is a crash searching for debug symbols.
- */
-void verifyBitness(JNIEnv *env, const char *binaryName) {
- int fd = open(binaryName, O_RDONLY);
- if (fd < 0) {
- THROW_NEW_DEBUGGER_EXCEPTION("cannot open binary file");
- }
- unsigned char elf_ident[EI_NIDENT];
- int i = read(fd, &elf_ident, sizeof(elf_ident));
- close(fd);
-
- if (i < 0) {
- THROW_NEW_DEBUGGER_EXCEPTION("cannot read binary file");
- }
-#ifndef _LP64
- if (elf_ident[EI_CLASS] == ELFCLASS64) {
- THROW_NEW_DEBUGGER_EXCEPTION("debuggee is 64 bit, use 64-bit java for debugger");
- }
-#else
- if (elf_ident[EI_CLASS] != ELFCLASS64) {
- THROW_NEW_DEBUGGER_EXCEPTION("debuggee is 32 bit, use 32 bit java for debugger");
- }
-#endif
-}
-
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: setSAAltRoot0
- * Signature: (Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_setSAAltRoot0
- (JNIEnv *env, jobject this_obj, jstring altroot) {
- if (saaltroot != NULL) {
- free(saaltroot);
- }
- const char *path = (*env)->GetStringUTFChars(env, altroot, JNI_FALSE);
- /*
- * `saaltroot` is used for putenv().
- * So we need to keep this memory.
- */
- static const char *PREFIX = "SA_ALTROOT=";
- size_t len = strlen(PREFIX) + strlen(path) + 1;
- saaltroot = (char *)malloc(len);
- snprintf(saaltroot, len, "%s%s", PREFIX, path);
- putenv(saaltroot);
- (*env)->ReleaseStringUTFChars(env, altroot, path);
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: attach0
- * Signature: (I)V
- */
-JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__I
- (JNIEnv *env, jobject this_obj, jint jpid) {
-
- // For bitness checking, locate binary at /proc/jpid/exe
- char buf[PATH_MAX];
- snprintf((char *) &buf, PATH_MAX, "/proc/%d/exe", jpid);
- verifyBitness(env, (char *) &buf);
- CHECK_EXCEPTION;
-
- char err_buf[200];
- struct ps_prochandle* ph;
- if ((ph = Pgrab(jpid, err_buf, sizeof(err_buf))) == NULL) {
- char msg[230];
- snprintf(msg, sizeof(msg), "Can't attach to the process: %s", err_buf);
- THROW_NEW_DEBUGGER_EXCEPTION(msg);
- }
- (*env)->SetLongField(env, this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
- fillThreadsAndLoadObjects(env, this_obj, ph);
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: attach0
- * Signature: (Ljava/lang/String;Ljava/lang/String;)V
- */
-JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2
- (JNIEnv *env, jobject this_obj, jstring execName, jstring coreName) {
- const char *execName_cstr;
- const char *coreName_cstr;
- jboolean isCopy;
- struct ps_prochandle* ph;
-
- execName_cstr = (*env)->GetStringUTFChars(env, execName, &isCopy);
- CHECK_EXCEPTION;
- coreName_cstr = (*env)->GetStringUTFChars(env, coreName, &isCopy);
- CHECK_EXCEPTION;
-
- verifyBitness(env, execName_cstr);
- CHECK_EXCEPTION;
-
- if ( (ph = Pgrab_core(execName_cstr, coreName_cstr)) == NULL) {
- (*env)->ReleaseStringUTFChars(env, execName, execName_cstr);
- (*env)->ReleaseStringUTFChars(env, coreName, coreName_cstr);
- THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the core file");
- }
- (*env)->SetLongField(env, this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
- (*env)->ReleaseStringUTFChars(env, execName, execName_cstr);
- (*env)->ReleaseStringUTFChars(env, coreName, coreName_cstr);
- fillThreadsAndLoadObjects(env, this_obj, ph);
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: detach0
- * Signature: ()V
- */
-JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_detach0
- (JNIEnv *env, jobject this_obj) {
- struct ps_prochandle* ph = get_proc_handle(env, this_obj);
- if (ph != NULL) {
- Prelease(ph);
- }
- if (saaltroot != NULL) {
- free(saaltroot);
- saaltroot = NULL;
- }
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: lookupByName0
- * Signature: (Ljava/lang/String;Ljava/lang/String;)J
- */
-JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByName0
- (JNIEnv *env, jobject this_obj, jstring objectName, jstring symbolName) {
- const char *objectName_cstr, *symbolName_cstr;
- jlong addr;
- jboolean isCopy;
- struct ps_prochandle* ph = get_proc_handle(env, this_obj);
-
- objectName_cstr = NULL;
- if (objectName != NULL) {
- objectName_cstr = (*env)->GetStringUTFChars(env, objectName, &isCopy);
- CHECK_EXCEPTION_(0);
- }
- symbolName_cstr = (*env)->GetStringUTFChars(env, symbolName, &isCopy);
- CHECK_EXCEPTION_(0);
-
- addr = (jlong) lookup_symbol(ph, objectName_cstr, symbolName_cstr);
-
- if (objectName_cstr != NULL) {
- (*env)->ReleaseStringUTFChars(env, objectName, objectName_cstr);
- }
- (*env)->ReleaseStringUTFChars(env, symbolName, symbolName_cstr);
- return addr;
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: lookupByAddress0
- * Signature: (J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;
- */
-JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByAddress0
- (JNIEnv *env, jobject this_obj, jlong addr) {
- uintptr_t offset;
- jobject obj;
- jstring str;
- const char* sym = NULL;
-
- struct ps_prochandle* ph = get_proc_handle(env, this_obj);
- sym = symbol_for_pc(ph, (uintptr_t) addr, &offset);
- if (sym == NULL) return 0;
- str = (*env)->NewStringUTF(env, sym);
- CHECK_EXCEPTION_(NULL);
- obj = (*env)->CallObjectMethod(env, this_obj, createClosestSymbol_ID, str, (jlong)offset);
- CHECK_EXCEPTION_(NULL);
- return obj;
-}
-
-/*
- * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
- * Method: readBytesFromProcess0
- * Signature: (JJ)Lsun/jvm/hotspot/debugger/ReadResult;
- */
-JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0
- (JNIEnv *env, jobject this_obj, jlong addr, jlong numBytes) {
-
- jboolean isCopy;
- jbyteArray array;
- jbyte *bufPtr;
- ps_err_e err;
-
- array = (*env)->NewByteArray(env, numBytes);
- CHECK_EXCEPTION_(0);
- bufPtr = (*env)->GetByteArrayElements(env, array, &isCopy);
- CHECK_EXCEPTION_(0);
-
- err = ps_pdread(get_proc_handle(env, this_obj), (psaddr_t) (uintptr_t)addr, bufPtr, numBytes);
- (*env)->ReleaseByteArrayElements(env, array, bufPtr, 0);
- return (err == PS_OK)? array : 0;
-}
-
-#if defined(i586) || defined(amd64) || defined(sparc) || defined(sparcv9) | defined(ppc64) || defined(ppc64le) || defined(aarch64)
-JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
- (JNIEnv *env, jobject this_obj, jint lwp_id) {
-
- struct user_regs_struct gregs;
- jboolean isCopy;
- jlongArray array;
- jlong *regs;
- int i;
-
- struct ps_prochandle* ph = get_proc_handle(env, this_obj);
- if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
- THROW_NEW_DEBUGGER_EXCEPTION_("get_thread_regs failed for a lwp", 0);
- }
-
-#undef NPRGREG
-#ifdef i586
-#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
-#endif
-#ifdef amd64
-#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
-#endif
-#ifdef aarch64
-#define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG
-#endif
-#if defined(sparc) || defined(sparcv9)
-#define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
-#endif
-#if defined(ppc64) || defined(ppc64le)
-#define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG
-#endif
-
-
- array = (*env)->NewLongArray(env, NPRGREG);
- CHECK_EXCEPTION_(0);
- regs = (*env)->GetLongArrayElements(env, array, &isCopy);
-
-#undef REG_INDEX
-
-#ifdef i586
-#define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
-
- regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
- regs[REG_INDEX(FS)] = (uintptr_t) gregs.xfs;
- regs[REG_INDEX(ES)] = (uintptr_t) gregs.xes;
- regs[REG_INDEX(DS)] = (uintptr_t) gregs.xds;
- regs[REG_INDEX(EDI)] = (uintptr_t) gregs.edi;
- regs[REG_INDEX(ESI)] = (uintptr_t) gregs.esi;
- regs[REG_INDEX(FP)] = (uintptr_t) gregs.ebp;
- regs[REG_INDEX(SP)] = (uintptr_t) gregs.esp;
- regs[REG_INDEX(EBX)] = (uintptr_t) gregs.ebx;
- regs[REG_INDEX(EDX)] = (uintptr_t) gregs.edx;
- regs[REG_INDEX(ECX)] = (uintptr_t) gregs.ecx;
- regs[REG_INDEX(EAX)] = (uintptr_t) gregs.eax;
- regs[REG_INDEX(PC)] = (uintptr_t) gregs.eip;
- regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
- regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
-
-#endif /* i586 */
-
-#ifdef amd64
-#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
-
- regs[REG_INDEX(R15)] = gregs.r15;
- regs[REG_INDEX(R14)] = gregs.r14;
- regs[REG_INDEX(R13)] = gregs.r13;
- regs[REG_INDEX(R12)] = gregs.r12;
- regs[REG_INDEX(RBP)] = gregs.rbp;
- regs[REG_INDEX(RBX)] = gregs.rbx;
- regs[REG_INDEX(R11)] = gregs.r11;
- regs[REG_INDEX(R10)] = gregs.r10;
- regs[REG_INDEX(R9)] = gregs.r9;
- regs[REG_INDEX(R8)] = gregs.r8;
- regs[REG_INDEX(RAX)] = gregs.rax;
- regs[REG_INDEX(RCX)] = gregs.rcx;
- regs[REG_INDEX(RDX)] = gregs.rdx;
- regs[REG_INDEX(RSI)] = gregs.rsi;
- regs[REG_INDEX(RDI)] = gregs.rdi;
- regs[REG_INDEX(RIP)] = gregs.rip;
- regs[REG_INDEX(CS)] = gregs.cs;
- regs[REG_INDEX(RSP)] = gregs.rsp;
- regs[REG_INDEX(SS)] = gregs.ss;
- regs[REG_INDEX(FSBASE)] = gregs.fs_base;
- regs[REG_INDEX(GSBASE)] = gregs.gs_base;
- regs[REG_INDEX(DS)] = gregs.ds;
- regs[REG_INDEX(ES)] = gregs.es;
- regs[REG_INDEX(FS)] = gregs.fs;
- regs[REG_INDEX(GS)] = gregs.gs;
-
-#endif /* amd64 */
-
-#if defined(sparc) || defined(sparcv9)
-
-#define REG_INDEX(reg) sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_##reg
-
-#ifdef _LP64
- regs[REG_INDEX(R_PSR)] = gregs.tstate;
- regs[REG_INDEX(R_PC)] = gregs.tpc;
- regs[REG_INDEX(R_nPC)] = gregs.tnpc;
- regs[REG_INDEX(R_Y)] = gregs.y;
-#else
- regs[REG_INDEX(R_PSR)] = gregs.psr;
- regs[REG_INDEX(R_PC)] = gregs.pc;
- regs[REG_INDEX(R_nPC)] = gregs.npc;
- regs[REG_INDEX(R_Y)] = gregs.y;
-#endif
- regs[REG_INDEX(R_G0)] = 0 ;
- regs[REG_INDEX(R_G1)] = gregs.u_regs[0];
- regs[REG_INDEX(R_G2)] = gregs.u_regs[1];
- regs[REG_INDEX(R_G3)] = gregs.u_regs[2];
- regs[REG_INDEX(R_G4)] = gregs.u_regs[3];
- regs[REG_INDEX(R_G5)] = gregs.u_regs[4];
- regs[REG_INDEX(R_G6)] = gregs.u_regs[5];
- regs[REG_INDEX(R_G7)] = gregs.u_regs[6];
- regs[REG_INDEX(R_O0)] = gregs.u_regs[7];
- regs[REG_INDEX(R_O1)] = gregs.u_regs[8];
- regs[REG_INDEX(R_O2)] = gregs.u_regs[ 9];
- regs[REG_INDEX(R_O3)] = gregs.u_regs[10];
- regs[REG_INDEX(R_O4)] = gregs.u_regs[11];
- regs[REG_INDEX(R_O5)] = gregs.u_regs[12];
- regs[REG_INDEX(R_O6)] = gregs.u_regs[13];
- regs[REG_INDEX(R_O7)] = gregs.u_regs[14];
-#endif /* sparc */
-
-#if defined(aarch64)
-
-#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg
-
- {
- int i;
- for (i = 0; i < 31; i++)
- regs[i] = gregs.regs[i];
- regs[REG_INDEX(SP)] = gregs.sp;
- regs[REG_INDEX(PC)] = gregs.pc;
- }
-#endif /* aarch64 */
-
-#if defined(ppc64) || defined(ppc64le)
-#define REG_INDEX(reg) sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_##reg
-
- regs[REG_INDEX(LR)] = gregs.link;
- regs[REG_INDEX(NIP)] = gregs.nip;
- regs[REG_INDEX(R0)] = gregs.gpr[0];
- regs[REG_INDEX(R1)] = gregs.gpr[1];
- regs[REG_INDEX(R2)] = gregs.gpr[2];
- regs[REG_INDEX(R3)] = gregs.gpr[3];
- regs[REG_INDEX(R4)] = gregs.gpr[4];
- regs[REG_INDEX(R5)] = gregs.gpr[5];
- regs[REG_INDEX(R6)] = gregs.gpr[6];
- regs[REG_INDEX(R7)] = gregs.gpr[7];
- regs[REG_INDEX(R8)] = gregs.gpr[8];
- regs[REG_INDEX(R9)] = gregs.gpr[9];
- regs[REG_INDEX(R10)] = gregs.gpr[10];
- regs[REG_INDEX(R11)] = gregs.gpr[11];
- regs[REG_INDEX(R12)] = gregs.gpr[12];
- regs[REG_INDEX(R13)] = gregs.gpr[13];
- regs[REG_INDEX(R14)] = gregs.gpr[14];
- regs[REG_INDEX(R15)] = gregs.gpr[15];
- regs[REG_INDEX(R16)] = gregs.gpr[16];
- regs[REG_INDEX(R17)] = gregs.gpr[17];
- regs[REG_INDEX(R18)] = gregs.gpr[18];
- regs[REG_INDEX(R19)] = gregs.gpr[19];
- regs[REG_INDEX(R20)] = gregs.gpr[20];
- regs[REG_INDEX(R21)] = gregs.gpr[21];
- regs[REG_INDEX(R22)] = gregs.gpr[22];
- regs[REG_INDEX(R23)] = gregs.gpr[23];
- regs[REG_INDEX(R24)] = gregs.gpr[24];
- regs[REG_INDEX(R25)] = gregs.gpr[25];
- regs[REG_INDEX(R26)] = gregs.gpr[26];
- regs[REG_INDEX(R27)] = gregs.gpr[27];
- regs[REG_INDEX(R28)] = gregs.gpr[28];
- regs[REG_INDEX(R29)] = gregs.gpr[29];
- regs[REG_INDEX(R30)] = gregs.gpr[30];
- regs[REG_INDEX(R31)] = gregs.gpr[31];
-
-#endif
-
- (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT);
- return array;
-}
-#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,610 @@
+/*
+ * Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, NTT DATA.
+ * 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 <jni.h>
+#include "libproc.h"
+#include "proc_service.h"
+
+#include <elf.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <cxxabi.h>
+
+#if defined(x86_64) && !defined(amd64)
+#define amd64 1
+#endif
+
+#if defined(i386) && !defined(i586)
+#define i586 1
+#endif
+
+#ifdef i586
+#include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+#endif
+
+#ifdef amd64
+#include "sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext.h"
+#endif
+
+#if defined(sparc) || defined(sparcv9)
+#include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h"
+#endif
+
+#if defined(ppc64) || defined(ppc64le)
+#include "sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext.h"
+#endif
+
+#ifdef aarch64
+#include "sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext.h"
+#endif
+
+static jfieldID p_ps_prochandle_ID = 0;
+static jfieldID threadList_ID = 0;
+static jfieldID loadObjectList_ID = 0;
+
+static jmethodID createClosestSymbol_ID = 0;
+static jmethodID createLoadObject_ID = 0;
+static jmethodID getThreadForThreadId_ID = 0;
+static jmethodID listAdd_ID = 0;
+
+/*
+ * SA_ALTROOT environment variable.
+ * This memory holds env string for putenv(3).
+ */
+static char *saaltroot = NULL;
+
+#define CHECK_EXCEPTION_(value) if (env->ExceptionOccurred()) { return value; }
+#define CHECK_EXCEPTION if (env->ExceptionOccurred()) { return;}
+#define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
+#define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
+
+void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
+ jclass clazz;
+ clazz = env->FindClass("sun/jvm/hotspot/debugger/DebuggerException");
+ CHECK_EXCEPTION;
+ env->ThrowNew(clazz, errMsg);
+}
+
+struct ps_prochandle* get_proc_handle(JNIEnv* env, jobject this_obj) {
+ jlong ptr = env->GetLongField(this_obj, p_ps_prochandle_ID);
+ return (struct ps_prochandle*)(intptr_t)ptr;
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: init0
+ * Signature: ()V
+ */
+extern "C"
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_init0
+ (JNIEnv *env, jclass cls) {
+ jclass listClass;
+
+ if (init_libproc(getenv("LIBSAPROC_DEBUG") != NULL) != true) {
+ THROW_NEW_DEBUGGER_EXCEPTION("can't initialize libproc");
+ }
+
+ // fields we use
+ p_ps_prochandle_ID = env->GetFieldID(cls, "p_ps_prochandle", "J");
+ CHECK_EXCEPTION;
+ threadList_ID = env->GetFieldID(cls, "threadList", "Ljava/util/List;");
+ CHECK_EXCEPTION;
+ loadObjectList_ID = env->GetFieldID(cls, "loadObjectList", "Ljava/util/List;");
+ CHECK_EXCEPTION;
+
+ // methods we use
+ createClosestSymbol_ID = env->GetMethodID(cls, "createClosestSymbol",
+ "(Ljava/lang/String;J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;");
+ CHECK_EXCEPTION;
+ createLoadObject_ID = env->GetMethodID(cls, "createLoadObject",
+ "(Ljava/lang/String;JJ)Lsun/jvm/hotspot/debugger/cdbg/LoadObject;");
+ CHECK_EXCEPTION;
+ getThreadForThreadId_ID = env->GetMethodID(cls, "getThreadForThreadId",
+ "(J)Lsun/jvm/hotspot/debugger/ThreadProxy;");
+ CHECK_EXCEPTION;
+ // java.util.List method we call
+ listClass = env->FindClass("java/util/List");
+ CHECK_EXCEPTION;
+ listAdd_ID = env->GetMethodID(listClass, "add", "(Ljava/lang/Object;)Z");
+ CHECK_EXCEPTION;
+}
+
+extern "C"
+JNIEXPORT jint JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getAddressSize
+ (JNIEnv *env, jclass cls)
+{
+#ifdef _LP64
+ return 8;
+#else
+ return 4;
+#endif
+
+}
+
+
+static void fillThreadsAndLoadObjects(JNIEnv* env, jobject this_obj, struct ps_prochandle* ph) {
+ int n = 0, i = 0;
+
+ // add threads
+ n = get_num_threads(ph);
+ for (i = 0; i < n; i++) {
+ jobject thread;
+ jobject threadList;
+ lwpid_t lwpid;
+
+ lwpid = get_lwp_id(ph, i);
+ thread = env->CallObjectMethod(this_obj, getThreadForThreadId_ID, (jlong)lwpid);
+ CHECK_EXCEPTION;
+ threadList = env->GetObjectField(this_obj, threadList_ID);
+ CHECK_EXCEPTION;
+ env->CallBooleanMethod(threadList, listAdd_ID, thread);
+ CHECK_EXCEPTION;
+ }
+
+ // add load objects
+ n = get_num_libs(ph);
+ for (i = 0; i < n; i++) {
+ uintptr_t base;
+ const char* name;
+ jobject loadObject;
+ jobject loadObjectList;
+ jstring str;
+
+ base = get_lib_base(ph, i);
+ name = get_lib_name(ph, i);
+
+ str = env->NewStringUTF(name);
+ CHECK_EXCEPTION;
+ loadObject = env->CallObjectMethod(this_obj, createLoadObject_ID, str, (jlong)0, (jlong)base);
+ CHECK_EXCEPTION;
+ loadObjectList = env->GetObjectField(this_obj, loadObjectList_ID);
+ CHECK_EXCEPTION;
+ env->CallBooleanMethod(loadObjectList, listAdd_ID, loadObject);
+ CHECK_EXCEPTION;
+ }
+}
+
+
+/*
+ * Verify that a named ELF binary file (core or executable) has the same
+ * bitness as ourselves.
+ * Throw an exception if there is a mismatch or other problem.
+ *
+ * If we proceed using a mismatched debugger/debuggee, the best to hope
+ * for is a missing symbol, the worst is a crash searching for debug symbols.
+ */
+void verifyBitness(JNIEnv *env, const char *binaryName) {
+ int fd = open(binaryName, O_RDONLY);
+ if (fd < 0) {
+ THROW_NEW_DEBUGGER_EXCEPTION("cannot open binary file");
+ }
+ unsigned char elf_ident[EI_NIDENT];
+ int i = read(fd, &elf_ident, sizeof(elf_ident));
+ close(fd);
+
+ if (i < 0) {
+ THROW_NEW_DEBUGGER_EXCEPTION("cannot read binary file");
+ }
+#ifndef _LP64
+ if (elf_ident[EI_CLASS] == ELFCLASS64) {
+ THROW_NEW_DEBUGGER_EXCEPTION("debuggee is 64 bit, use 64-bit java for debugger");
+ }
+#else
+ if (elf_ident[EI_CLASS] != ELFCLASS64) {
+ THROW_NEW_DEBUGGER_EXCEPTION("debuggee is 32 bit, use 32 bit java for debugger");
+ }
+#endif
+}
+
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: setSAAltRoot0
+ * Signature: (Ljava/lang/String;)V
+ */
+extern "C"
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_setSAAltRoot0
+ (JNIEnv *env, jobject this_obj, jstring altroot) {
+ if (saaltroot != NULL) {
+ free(saaltroot);
+ }
+ const char *path = env->GetStringUTFChars(altroot, JNI_FALSE);
+ /*
+ * `saaltroot` is used for putenv().
+ * So we need to keep this memory.
+ */
+ static const char *PREFIX = "SA_ALTROOT=";
+ size_t len = strlen(PREFIX) + strlen(path) + 1;
+ saaltroot = (char *)malloc(len);
+ snprintf(saaltroot, len, "%s%s", PREFIX, path);
+ putenv(saaltroot);
+ env->ReleaseStringUTFChars(altroot, path);
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: attach0
+ * Signature: (I)V
+ */
+extern "C"
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__I
+ (JNIEnv *env, jobject this_obj, jint jpid) {
+
+ // For bitness checking, locate binary at /proc/jpid/exe
+ char buf[PATH_MAX];
+ snprintf((char *) &buf, PATH_MAX, "/proc/%d/exe", jpid);
+ verifyBitness(env, (char *) &buf);
+ CHECK_EXCEPTION;
+
+ char err_buf[200];
+ struct ps_prochandle* ph;
+ if ((ph = Pgrab(jpid, err_buf, sizeof(err_buf))) == NULL) {
+ char msg[230];
+ snprintf(msg, sizeof(msg), "Can't attach to the process: %s", err_buf);
+ THROW_NEW_DEBUGGER_EXCEPTION(msg);
+ }
+ env->SetLongField(this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
+ fillThreadsAndLoadObjects(env, this_obj, ph);
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: attach0
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)V
+ */
+extern "C"
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_attach0__Ljava_lang_String_2Ljava_lang_String_2
+ (JNIEnv *env, jobject this_obj, jstring execName, jstring coreName) {
+ const char *execName_cstr;
+ const char *coreName_cstr;
+ jboolean isCopy;
+ struct ps_prochandle* ph;
+
+ execName_cstr = env->GetStringUTFChars(execName, &isCopy);
+ CHECK_EXCEPTION;
+ coreName_cstr = env->GetStringUTFChars(coreName, &isCopy);
+ CHECK_EXCEPTION;
+
+ verifyBitness(env, execName_cstr);
+ CHECK_EXCEPTION;
+
+ if ( (ph = Pgrab_core(execName_cstr, coreName_cstr)) == NULL) {
+ env->ReleaseStringUTFChars(execName, execName_cstr);
+ env->ReleaseStringUTFChars(coreName, coreName_cstr);
+ THROW_NEW_DEBUGGER_EXCEPTION("Can't attach to the core file");
+ }
+ env->SetLongField(this_obj, p_ps_prochandle_ID, (jlong)(intptr_t)ph);
+ env->ReleaseStringUTFChars(execName, execName_cstr);
+ env->ReleaseStringUTFChars(coreName, coreName_cstr);
+ fillThreadsAndLoadObjects(env, this_obj, ph);
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: detach0
+ * Signature: ()V
+ */
+extern "C"
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_detach0
+ (JNIEnv *env, jobject this_obj) {
+ struct ps_prochandle* ph = get_proc_handle(env, this_obj);
+ if (ph != NULL) {
+ Prelease(ph);
+ }
+ if (saaltroot != NULL) {
+ free(saaltroot);
+ saaltroot = NULL;
+ }
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: lookupByName0
+ * Signature: (Ljava/lang/String;Ljava/lang/String;)J
+ */
+extern "C"
+JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByName0
+ (JNIEnv *env, jobject this_obj, jstring objectName, jstring symbolName) {
+ const char *objectName_cstr, *symbolName_cstr;
+ jlong addr;
+ jboolean isCopy;
+ struct ps_prochandle* ph = get_proc_handle(env, this_obj);
+
+ objectName_cstr = NULL;
+ if (objectName != NULL) {
+ objectName_cstr = env->GetStringUTFChars(objectName, &isCopy);
+ CHECK_EXCEPTION_(0);
+ }
+ symbolName_cstr = env->GetStringUTFChars(symbolName, &isCopy);
+ CHECK_EXCEPTION_(0);
+
+ addr = (jlong) lookup_symbol(ph, objectName_cstr, symbolName_cstr);
+
+ if (objectName_cstr != NULL) {
+ env->ReleaseStringUTFChars(objectName, objectName_cstr);
+ }
+ env->ReleaseStringUTFChars(symbolName, symbolName_cstr);
+ return addr;
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: lookupByAddress0
+ * Signature: (J)Lsun/jvm/hotspot/debugger/cdbg/ClosestSymbol;
+ */
+extern "C"
+JNIEXPORT jobject JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_lookupByAddress0
+ (JNIEnv *env, jobject this_obj, jlong addr) {
+ uintptr_t offset;
+ jobject obj;
+ jstring str;
+ const char* sym = NULL;
+
+ struct ps_prochandle* ph = get_proc_handle(env, this_obj);
+ sym = symbol_for_pc(ph, (uintptr_t) addr, &offset);
+ if (sym == NULL) return 0;
+ str = env->NewStringUTF(sym);
+ CHECK_EXCEPTION_(NULL);
+ obj = env->CallObjectMethod(this_obj, createClosestSymbol_ID, str, (jlong)offset);
+ CHECK_EXCEPTION_(NULL);
+ return obj;
+}
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: readBytesFromProcess0
+ * Signature: (JJ)Lsun/jvm/hotspot/debugger/ReadResult;
+ */
+extern "C"
+JNIEXPORT jbyteArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0
+ (JNIEnv *env, jobject this_obj, jlong addr, jlong numBytes) {
+
+ jboolean isCopy;
+ jbyteArray array;
+ jbyte *bufPtr;
+ ps_err_e err;
+
+ array = env->NewByteArray(numBytes);
+ CHECK_EXCEPTION_(0);
+ bufPtr = env->GetByteArrayElements(array, &isCopy);
+ CHECK_EXCEPTION_(0);
+
+ err = ps_pdread(get_proc_handle(env, this_obj), (psaddr_t) (uintptr_t)addr, bufPtr, numBytes);
+ env->ReleaseByteArrayElements(array, bufPtr, 0);
+ return (err == PS_OK)? array : 0;
+}
+
+#if defined(i586) || defined(amd64) || defined(sparc) || defined(sparcv9) | defined(ppc64) || defined(ppc64le) || defined(aarch64)
+extern "C"
+JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0
+ (JNIEnv *env, jobject this_obj, jint lwp_id) {
+
+ struct user_regs_struct gregs;
+ jboolean isCopy;
+ jlongArray array;
+ jlong *regs;
+ int i;
+
+ struct ps_prochandle* ph = get_proc_handle(env, this_obj);
+ if (get_lwp_regs(ph, lwp_id, &gregs) != true) {
+ THROW_NEW_DEBUGGER_EXCEPTION_("get_thread_regs failed for a lwp", 0);
+ }
+
+#undef NPRGREG
+#ifdef i586
+#define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+#endif
+#ifdef amd64
+#define NPRGREG sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_NPRGREG
+#endif
+#ifdef aarch64
+#define NPRGREG sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_NPRGREG
+#endif
+#if defined(sparc) || defined(sparcv9)
+#define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG
+#endif
+#if defined(ppc64) || defined(ppc64le)
+#define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG
+#endif
+
+
+ array = env->NewLongArray(NPRGREG);
+ CHECK_EXCEPTION_(0);
+ regs = env->GetLongArrayElements(array, &isCopy);
+
+#undef REG_INDEX
+
+#ifdef i586
+#define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+ regs[REG_INDEX(FS)] = (uintptr_t) gregs.xfs;
+ regs[REG_INDEX(ES)] = (uintptr_t) gregs.xes;
+ regs[REG_INDEX(DS)] = (uintptr_t) gregs.xds;
+ regs[REG_INDEX(EDI)] = (uintptr_t) gregs.edi;
+ regs[REG_INDEX(ESI)] = (uintptr_t) gregs.esi;
+ regs[REG_INDEX(FP)] = (uintptr_t) gregs.ebp;
+ regs[REG_INDEX(SP)] = (uintptr_t) gregs.esp;
+ regs[REG_INDEX(EBX)] = (uintptr_t) gregs.ebx;
+ regs[REG_INDEX(EDX)] = (uintptr_t) gregs.edx;
+ regs[REG_INDEX(ECX)] = (uintptr_t) gregs.ecx;
+ regs[REG_INDEX(EAX)] = (uintptr_t) gregs.eax;
+ regs[REG_INDEX(PC)] = (uintptr_t) gregs.eip;
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+
+#endif /* i586 */
+
+#ifdef amd64
+#define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg
+
+ regs[REG_INDEX(R15)] = gregs.r15;
+ regs[REG_INDEX(R14)] = gregs.r14;
+ regs[REG_INDEX(R13)] = gregs.r13;
+ regs[REG_INDEX(R12)] = gregs.r12;
+ regs[REG_INDEX(RBP)] = gregs.rbp;
+ regs[REG_INDEX(RBX)] = gregs.rbx;
+ regs[REG_INDEX(R11)] = gregs.r11;
+ regs[REG_INDEX(R10)] = gregs.r10;
+ regs[REG_INDEX(R9)] = gregs.r9;
+ regs[REG_INDEX(R8)] = gregs.r8;
+ regs[REG_INDEX(RAX)] = gregs.rax;
+ regs[REG_INDEX(RCX)] = gregs.rcx;
+ regs[REG_INDEX(RDX)] = gregs.rdx;
+ regs[REG_INDEX(RSI)] = gregs.rsi;
+ regs[REG_INDEX(RDI)] = gregs.rdi;
+ regs[REG_INDEX(RIP)] = gregs.rip;
+ regs[REG_INDEX(CS)] = gregs.cs;
+ regs[REG_INDEX(RSP)] = gregs.rsp;
+ regs[REG_INDEX(SS)] = gregs.ss;
+ regs[REG_INDEX(FSBASE)] = gregs.fs_base;
+ regs[REG_INDEX(GSBASE)] = gregs.gs_base;
+ regs[REG_INDEX(DS)] = gregs.ds;
+ regs[REG_INDEX(ES)] = gregs.es;
+ regs[REG_INDEX(FS)] = gregs.fs;
+ regs[REG_INDEX(GS)] = gregs.gs;
+
+#endif /* amd64 */
+
+#if defined(sparc) || defined(sparcv9)
+
+#define REG_INDEX(reg) sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_##reg
+
+#ifdef _LP64
+ regs[REG_INDEX(R_PSR)] = gregs.tstate;
+ regs[REG_INDEX(R_PC)] = gregs.tpc;
+ regs[REG_INDEX(R_nPC)] = gregs.tnpc;
+ regs[REG_INDEX(R_Y)] = gregs.y;
+#else
+ regs[REG_INDEX(R_PSR)] = gregs.psr;
+ regs[REG_INDEX(R_PC)] = gregs.pc;
+ regs[REG_INDEX(R_nPC)] = gregs.npc;
+ regs[REG_INDEX(R_Y)] = gregs.y;
+#endif
+ regs[REG_INDEX(R_G0)] = 0 ;
+ regs[REG_INDEX(R_G1)] = gregs.u_regs[0];
+ regs[REG_INDEX(R_G2)] = gregs.u_regs[1];
+ regs[REG_INDEX(R_G3)] = gregs.u_regs[2];
+ regs[REG_INDEX(R_G4)] = gregs.u_regs[3];
+ regs[REG_INDEX(R_G5)] = gregs.u_regs[4];
+ regs[REG_INDEX(R_G6)] = gregs.u_regs[5];
+ regs[REG_INDEX(R_G7)] = gregs.u_regs[6];
+ regs[REG_INDEX(R_O0)] = gregs.u_regs[7];
+ regs[REG_INDEX(R_O1)] = gregs.u_regs[8];
+ regs[REG_INDEX(R_O2)] = gregs.u_regs[ 9];
+ regs[REG_INDEX(R_O3)] = gregs.u_regs[10];
+ regs[REG_INDEX(R_O4)] = gregs.u_regs[11];
+ regs[REG_INDEX(R_O5)] = gregs.u_regs[12];
+ regs[REG_INDEX(R_O6)] = gregs.u_regs[13];
+ regs[REG_INDEX(R_O7)] = gregs.u_regs[14];
+#endif /* sparc */
+
+#if defined(aarch64)
+
+#define REG_INDEX(reg) sun_jvm_hotspot_debugger_aarch64_AARCH64ThreadContext_##reg
+
+ {
+ int i;
+ for (i = 0; i < 31; i++)
+ regs[i] = gregs.regs[i];
+ regs[REG_INDEX(SP)] = gregs.sp;
+ regs[REG_INDEX(PC)] = gregs.pc;
+ }
+#endif /* aarch64 */
+
+#if defined(ppc64) || defined(ppc64le)
+#define REG_INDEX(reg) sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_##reg
+
+ regs[REG_INDEX(LR)] = gregs.link;
+ regs[REG_INDEX(NIP)] = gregs.nip;
+ regs[REG_INDEX(R0)] = gregs.gpr[0];
+ regs[REG_INDEX(R1)] = gregs.gpr[1];
+ regs[REG_INDEX(R2)] = gregs.gpr[2];
+ regs[REG_INDEX(R3)] = gregs.gpr[3];
+ regs[REG_INDEX(R4)] = gregs.gpr[4];
+ regs[REG_INDEX(R5)] = gregs.gpr[5];
+ regs[REG_INDEX(R6)] = gregs.gpr[6];
+ regs[REG_INDEX(R7)] = gregs.gpr[7];
+ regs[REG_INDEX(R8)] = gregs.gpr[8];
+ regs[REG_INDEX(R9)] = gregs.gpr[9];
+ regs[REG_INDEX(R10)] = gregs.gpr[10];
+ regs[REG_INDEX(R11)] = gregs.gpr[11];
+ regs[REG_INDEX(R12)] = gregs.gpr[12];
+ regs[REG_INDEX(R13)] = gregs.gpr[13];
+ regs[REG_INDEX(R14)] = gregs.gpr[14];
+ regs[REG_INDEX(R15)] = gregs.gpr[15];
+ regs[REG_INDEX(R16)] = gregs.gpr[16];
+ regs[REG_INDEX(R17)] = gregs.gpr[17];
+ regs[REG_INDEX(R18)] = gregs.gpr[18];
+ regs[REG_INDEX(R19)] = gregs.gpr[19];
+ regs[REG_INDEX(R20)] = gregs.gpr[20];
+ regs[REG_INDEX(R21)] = gregs.gpr[21];
+ regs[REG_INDEX(R22)] = gregs.gpr[22];
+ regs[REG_INDEX(R23)] = gregs.gpr[23];
+ regs[REG_INDEX(R24)] = gregs.gpr[24];
+ regs[REG_INDEX(R25)] = gregs.gpr[25];
+ regs[REG_INDEX(R26)] = gregs.gpr[26];
+ regs[REG_INDEX(R27)] = gregs.gpr[27];
+ regs[REG_INDEX(R28)] = gregs.gpr[28];
+ regs[REG_INDEX(R29)] = gregs.gpr[29];
+ regs[REG_INDEX(R30)] = gregs.gpr[30];
+ regs[REG_INDEX(R31)] = gregs.gpr[31];
+
+#endif
+
+ env->ReleaseLongArrayElements(array, regs, JNI_COMMIT);
+ return array;
+}
+#endif
+
+/*
+ * Class: sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal
+ * Method: demangle
+ * Signature: (Ljava/lang/String;)Ljava/lang/String;
+ */
+extern "C"
+JNIEXPORT jstring JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_demangle
+ (JNIEnv *env, jobject this_obj, jstring jsym) {
+ int status;
+ jstring result = NULL;
+
+ const char *sym = env->GetStringUTFChars(jsym, JNI_FALSE);
+ char *demangled = abi::__cxa_demangle(sym, NULL, 0, &status);
+ env->ReleaseStringUTFChars(jsym, sym);
+ if ((demangled != NULL) && (status == 0)) {
+ result = env->NewStringUTF(demangled);
+ free(demangled);
+ } else if (status == -2) { // not C++ ABI mangling rules - maybe C style
+ result = jsym;
+ } else {
+ THROW_NEW_DEBUGGER_EXCEPTION_("Could not demangle", NULL);
+ }
+
+ return result;
+}
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/libproc.h Thu Nov 07 18:44:09 2019 +0000
@@ -47,13 +47,18 @@
// This C bool type must be int for compatibility with Linux calls and
// it would be a mistake to equivalence it to C++ bool on many platforms
-
+#ifndef __cplusplus
typedef int bool;
#define true 1
#define false 0
+#endif
struct ps_prochandle;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// attach to a process
JNIEXPORT struct ps_prochandle* JNICALL
Pgrab(pid_t pid, char* err_buf, size_t err_buf_len);
@@ -105,4 +110,8 @@
void throw_new_debugger_exception(JNIEnv* env, const char* errMsg);
+#ifdef __cplusplus
+}
+#endif
+
#endif //__LIBPROC_H_
--- a/src/jdk.hotspot.agent/linux/native/libsaproc/proc_service.h Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/linux/native/libsaproc/proc_service.h Thu Nov 07 18:44:09 2019 +0000
@@ -42,6 +42,10 @@
PS_NOFREGS /* FPU register set not available for given lwp */
} ps_err_e;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// ps_getpid() is only defined on Linux to return a thread's process ID
JNIEXPORT pid_t JNICALL
ps_getpid(struct ps_prochandle *ph);
@@ -77,4 +81,8 @@
JNIEXPORT ps_err_e JNICALL
ps_lgetregs(struct ps_prochandle *ph, lwpid_t lid, prgregset_t gregset);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _PROC_SERVICE_H_ */
--- a/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/macosx/native/libsaproc/ps_core.c Thu Nov 07 18:44:09 2019 +0000
@@ -364,7 +364,8 @@
strcpy(filepath, java_home);
} else {
char* dyldpath = getenv("DYLD_LIBRARY_PATH");
- char* dypath = strtok(dyldpath, ":");
+ char* save_ptr;
+ char* dypath = strtok_r(dyldpath, ":", &save_ptr);
while (dypath != NULL) {
strcpy(filepath, dypath);
strcat(filepath, filename);
@@ -372,7 +373,7 @@
strcpy(rpath, filepath);
return true;
}
- dypath = strtok(dyldpath, ":");
+ dypath = strtok_r(NULL, ":", &save_ptr);
}
// not found
return false;
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxCDebugger.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -133,10 +133,10 @@
}
public boolean canDemangle() {
- return false;
+ return true;
}
public String demangle(String sym) {
- throw new UnsupportedOperationException();
+ return dbg.demangle(sym);
}
}
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java Thu Nov 07 18:44:09 2019 +0000
@@ -57,6 +57,7 @@
public List getThreadList();
public List getLoadObjectList();
public ClosestSymbol lookup(long address);
+ public String demangle(String sym);
// NOTE: this interface implicitly contains the following methods:
// From the Debugger interface via JVMDebugger
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java Thu Nov 07 18:44:09 2019 +0000
@@ -118,6 +118,9 @@
throws DebuggerException;
public native static int getAddressSize() ;
+ @Override
+ public native String demangle(String sym);
+
// Note on Linux threads are really processes. When target process is
// attached by a serviceability agent thread, only that thread can do
// ptrace operations on the target. This is because from kernel's point
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/OSThread.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/OSThread.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
// The OSThread class holds OS-specific thread information. It is equivalent
// to the sys_thread_t structure of the classic JVM implementation.
public class OSThread extends VMObject {
- private static JIntField interruptedField;
private static Field threadIdField;
private static CIntegerField threadStateField;
@@ -56,7 +55,6 @@
private static synchronized void initialize(TypeDataBase db) {
Type type = db.lookupType("OSThread");
- interruptedField = type.getJIntField("_interrupted");
threadIdField = type.getField("_thread_id");
threadStateField = type.getCIntegerField("_state");
@@ -75,10 +73,6 @@
super(addr);
}
- public boolean interrupted() {
- return ((int)interruptedField.getValue(addr)) != 0;
- }
-
public int threadId() {
return threadIdField.getJInt(addr);
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/keymap/BindingReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/keymap/BindingReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.keymap;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/keymap/KeyMap.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/keymap/KeyMap.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.keymap;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Binding.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Binding.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Buffer.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Buffer.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Candidate.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Candidate.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Completer.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Completer.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/CompletingParsedLine.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/CompletingParsedLine.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/EndOfFileException.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/EndOfFileException.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Expander.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Expander.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Highlighter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Highlighter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/History.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/History.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,11 +4,12 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
import java.io.IOException;
+import java.nio.file.Path;
import java.time.Instant;
import java.util.Iterator;
import java.util.ListIterator;
@@ -42,6 +43,26 @@
void save() throws IOException;
/**
+ * Write history to the file. If incremental only the events that are new since the last incremental operation to
+ * the file are added.
+ * @throws IOException if a problem occurs
+ */
+ void write(Path file, boolean incremental) throws IOException;
+
+ /**
+ * Append history to the file. If incremental only the events that are new since the last incremental operation to
+ * the file are added.
+ * @throws IOException if a problem occurs
+ */
+ void append(Path file, boolean incremental) throws IOException;
+
+ /**
+ * Read history from the file. If incremental only the events that are not contained within the internal list are added.
+ * @throws IOException if a problem occurs
+ */
+ void read(Path file, boolean incremental) throws IOException;
+
+ /**
* Purge history.
* @throws IOException if a problem occurs
*/
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
@@ -95,7 +95,10 @@
String CALLBACK_FINISH = "callback-finish";
String CALLBACK_KEYMAP = "callback-keymap";
+ String ACCEPT_AND_INFER_NEXT_HISTORY = "accept-and-infer-next-history";
+ String ACCEPT_AND_HOLD = "accept-and-hold";
String ACCEPT_LINE = "accept-line";
+ String ACCEPT_LINE_AND_DOWN_HISTORY = "accept-line-and-down-history";
String ARGUMENT_BASE = "argument-base";
String BACKWARD_CHAR = "backward-char";
String BACKWARD_DELETE_CHAR = "backward-delete-char";
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReaderBuilder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/LineReaderBuilder.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
@@ -85,7 +85,7 @@
public LineReaderBuilder parser(Parser parser) {
if (parser != null) {
try {
- if (!Boolean.parseBoolean(LineReader.PROP_SUPPORT_PARSEDLINE)
+ if (!Boolean.getBoolean(LineReader.PROP_SUPPORT_PARSEDLINE)
&& !(parser.parse("", 0) instanceof CompletingParsedLine)) {
Log.warn("The Parser of class " + parser.getClass().getName() + " does not support the CompletingParsedLine interface. " +
"Completion with escaped or quoted words won't work correctly.");
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Macro.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Macro.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/MaskingCallback.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/MaskingCallback.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/ParsedLine.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/ParsedLine.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Parser.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Parser.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
@@ -16,6 +16,10 @@
return parse(line, cursor, ParseContext.UNSPECIFIED);
}
+ default boolean isEscapeChar(char ch) {
+ return ch == '\\';
+ }
+
enum ParseContext {
UNSPECIFIED,
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Reference.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Reference.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/UserInterruptException.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/UserInterruptException.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Widget.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Widget.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/BufferImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/BufferImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultExpander.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultExpander.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultHighlighter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultHighlighter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultParser.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/DefaultParser.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
@@ -18,6 +18,13 @@
public class DefaultParser implements Parser {
+ public enum Bracket {
+ ROUND, // ()
+ CURLY, // {}
+ SQUARE, // []
+ ANGLE; // <>
+ }
+
private char[] quoteChars = {'\'', '"'};
private char[] escapeChars = {'\\'};
@@ -26,6 +33,10 @@
private boolean eofOnEscapedNewLine;
+ private char[] openingBrackets = null;
+
+ private char[] closingBrackets = null;
+
//
// Chainable setters
//
@@ -45,6 +56,11 @@
return this;
}
+ public DefaultParser eofOnUnclosedBracket(Bracket... brackets){
+ setEofOnUnclosedBracket(brackets);
+ return this;
+ }
+
public DefaultParser eofOnEscapedNewLine(boolean eofOnEscapedNewLine) {
this.eofOnEscapedNewLine = eofOnEscapedNewLine;
return this;
@@ -86,6 +102,39 @@
return eofOnEscapedNewLine;
}
+ public void setEofOnUnclosedBracket(Bracket... brackets){
+ if (brackets == null) {
+ openingBrackets = null;
+ closingBrackets = null;
+ } else {
+ Set<Bracket> bs = new HashSet<>(Arrays.asList(brackets));
+ openingBrackets = new char[bs.size()];
+ closingBrackets = new char[bs.size()];
+ int i = 0;
+ for (Bracket b : bs) {
+ switch (b) {
+ case ROUND:
+ openingBrackets[i] = '(';
+ closingBrackets[i] = ')';
+ break;
+ case CURLY:
+ openingBrackets[i] = '{';
+ closingBrackets[i] = '}';
+ break;
+ case SQUARE:
+ openingBrackets[i] = '[';
+ closingBrackets[i] = ']';
+ break;
+ case ANGLE:
+ openingBrackets[i] = '<';
+ closingBrackets[i] = '>';
+ break;
+ }
+ i++;
+ }
+ }
+ }
+
public ParsedLine parse(final String line, final int cursor, ParseContext context) {
List<String> words = new LinkedList<>();
StringBuilder current = new StringBuilder();
@@ -95,6 +144,8 @@
int rawWordCursor = -1;
int rawWordLength = -1;
int rawWordStart = 0;
+ BracketChecker bracketChecker = new BracketChecker();
+ boolean quotedWord = false;
for (int i = 0; (line != null) && (i < line.length()); i++) {
// once we reach the cursor, set the
@@ -110,36 +161,35 @@
if (quoteStart < 0 && isQuoteChar(line, i)) {
// Start a quote block
quoteStart = i;
- } else if (quoteStart >= 0) {
- // In a quote block
- if (line.charAt(quoteStart) == line.charAt(i) && !isEscaped(line, i)) {
- // End the block; arg could be empty, but that's fine
+ if (current.length()==0) {
+ quotedWord = true;
+ } else {
+ current.append(line.charAt(i));
+ }
+ } else if (quoteStart >= 0 && line.charAt(quoteStart) == line.charAt(i) && !isEscaped(line, i)) {
+ // End quote block
+ if (!quotedWord) {
+ current.append(line.charAt(i));
+ } else if (rawWordCursor >= 0 && rawWordLength < 0) {
+ rawWordLength = i - rawWordStart + 1;
+ }
+ quoteStart = -1;
+ quotedWord = false;
+ } else if (quoteStart < 0 && isDelimiter(line, i)) {
+ // Delimiter
+ if (current.length() > 0) {
words.add(current.toString());
- current.setLength(0);
- quoteStart = -1;
+ current.setLength(0); // reset the arg
if (rawWordCursor >= 0 && rawWordLength < 0) {
- rawWordLength = i - rawWordStart + 1;
- }
- } else {
- if (!isEscapeChar(line, i)) {
- // Take the next character
- current.append(line.charAt(i));
+ rawWordLength = i - rawWordStart;
}
}
+ rawWordStart = i + 1;
} else {
- // Not in a quote block
- if (isDelimiter(line, i)) {
- if (current.length() > 0) {
- words.add(current.toString());
- current.setLength(0); // reset the arg
- if (rawWordCursor >= 0 && rawWordLength < 0) {
- rawWordLength = i - rawWordStart;
- }
- }
- rawWordStart = i + 1;
- } else {
- if (!isEscapeChar(line, i)) {
- current.append(line.charAt(i));
+ if (!isEscapeChar(line, i)) {
+ current.append(line.charAt(i));
+ if (quoteStart < 0) {
+ bracketChecker.check(line, i);
}
}
}
@@ -159,21 +209,29 @@
rawWordLength = rawWordCursor;
}
- if (eofOnEscapedNewLine && isEscapeChar(line, line.length() - 1)) {
- throw new EOFError(-1, -1, "Escaped new line", "newline");
- }
- if (eofOnUnclosedQuote && quoteStart >= 0 && context != ParseContext.COMPLETE) {
- throw new EOFError(-1, -1, "Missing closing quote", line.charAt(quoteStart) == '\''
- ? "quote" : "dquote");
+ if (context != ParseContext.COMPLETE) {
+ if (eofOnEscapedNewLine && isEscapeChar(line, line.length() - 1)) {
+ throw new EOFError(-1, -1, "Escaped new line", "newline");
+ }
+ if (eofOnUnclosedQuote && quoteStart >= 0) {
+ throw new EOFError(-1, -1, "Missing closing quote", line.charAt(quoteStart) == '\''
+ ? "quote" : "dquote");
+ }
+ if (bracketChecker.isOpeningBracketMissing()) {
+ throw new EOFError(-1, -1, "Missing opening bracket", "missing: " + bracketChecker.getMissingOpeningBracket());
+ }
+ if (bracketChecker.isClosingBracketMissing()) {
+ throw new EOFError(-1, -1, "Missing closing brackets", "add: " + bracketChecker.getMissingClosingBrackets());
+ }
}
- String openingQuote = quoteStart >= 0 ? line.substring(quoteStart, quoteStart + 1) : null;
+ String openingQuote = quotedWord ? line.substring(quoteStart, quoteStart + 1) : null;
return new ArgumentList(line, words, wordIndex, wordCursor, cursor, openingQuote, rawWordCursor, rawWordLength);
}
/**
* Returns true if the specified character is a whitespace parameter. Check to ensure that the character is not
- * escaped by any of {@link #getQuoteChars}, and is not escaped by ant of the {@link #getEscapeChars}, and
+ * escaped by any of {@link #getQuoteChars}, and is not escaped by any of the {@link #getEscapeChars}, and
* returns true from {@link #isDelimiterChar}.
*
* @param buffer The complete command buffer
@@ -202,6 +260,18 @@
return false;
}
+ @Override
+ public boolean isEscapeChar(char ch) {
+ if (escapeChars != null) {
+ for (char e : escapeChars) {
+ if (e == ch) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* Check if this character is a valid escape char (i.e. one that has not been escaped)
*
@@ -216,14 +286,8 @@
if (pos < 0) {
return false;
}
- if (escapeChars != null) {
- for (char e : escapeChars) {
- if (e == buffer.charAt(pos)) {
- return !isEscaped(buffer, pos);
- }
- }
- }
- return false;
+ char ch = buffer.charAt(pos);
+ return isEscapeChar(ch) && !isEscaped(buffer, pos);
}
/**
@@ -245,7 +309,7 @@
/**
* Returns true if the character at the specified position if a delimiter. This method will only be called if
- * the character is not enclosed in any of the {@link #getQuoteChars}, and is not escaped by ant of the
+ * the character is not enclosed in any of the {@link #getQuoteChars}, and is not escaped by any of the
* {@link #getEscapeChars}. To perform escaping manually, override {@link #isDelimiter} instead.
*
* @param buffer
@@ -280,6 +344,67 @@
return false;
}
+ private class BracketChecker {
+ private int missingOpeningBracket = -1;
+ private List<Integer> nested = new ArrayList<>();
+
+ public BracketChecker(){}
+
+ public void check(final CharSequence buffer, final int pos){
+ if (openingBrackets == null || pos < 0) {
+ return;
+ }
+ int bid = bracketId(openingBrackets, buffer, pos);
+ if (bid >= 0) {
+ nested.add(bid);
+ } else {
+ bid = bracketId(closingBrackets, buffer, pos);
+ if (bid >= 0) {
+ if (!nested.isEmpty() && bid == nested.get(nested.size()-1)) {
+ nested.remove(nested.size()-1);
+ } else {
+ missingOpeningBracket = bid;
+ }
+ }
+ }
+ }
+
+ public boolean isOpeningBracketMissing(){
+ return missingOpeningBracket != -1;
+ }
+
+ public String getMissingOpeningBracket(){
+ if (!isOpeningBracketMissing()) {
+ return null;
+ }
+ return Character.toString(openingBrackets[missingOpeningBracket]);
+ }
+
+ public boolean isClosingBracketMissing(){
+ return !nested.isEmpty();
+ }
+
+ public String getMissingClosingBrackets(){
+ if (!isClosingBracketMissing()) {
+ return null;
+ }
+ StringBuilder out = new StringBuilder();
+ for (int i = nested.size() - 1; i > -1; i--) {
+ out.append(closingBrackets[nested.get(i)]);
+ }
+ return out.toString();
+ }
+
+ private int bracketId(final char[] brackets, final CharSequence buffer, final int pos){
+ for (int i=0; i < brackets.length; i++) {
+ if (buffer.charAt(pos) == brackets[i]) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ }
+
/**
* The result of a delimited buffer.
*
@@ -367,26 +492,50 @@
public CharSequence escape(CharSequence candidate, boolean complete) {
StringBuilder sb = new StringBuilder(candidate);
Predicate<Integer> needToBeEscaped;
- // Completion is protected by an opening quote:
- // Delimiters (spaces) don't need to be escaped, nor do other quotes, but everything else does.
- // Also, close the quote at the end
- if (openingQuote != null) {
- needToBeEscaped = i -> isRawEscapeChar(sb.charAt(i)) || String.valueOf(sb.charAt(i)).equals(openingQuote);
- }
- // No quote protection, need to escape everything: delimiter chars (spaces), quote chars
- // and escapes themselves
- else {
- needToBeEscaped = i -> isDelimiterChar(sb, i) || isRawEscapeChar(sb.charAt(i)) || isRawQuoteChar(sb.charAt(i));
- }
- for (int i = 0; i < sb.length(); i++) {
- if (needToBeEscaped.test(i)) {
- sb.insert(i++, escapeChars[0]);
+ String quote = openingQuote;
+ boolean middleQuotes = false;
+ if (openingQuote==null) {
+ for (int i=0; i < sb.length(); i++) {
+ if (isQuoteChar(sb, i)) {
+ middleQuotes = true;
+ break;
+ }
}
}
- if (openingQuote != null) {
- sb.insert(0, openingQuote);
+ if (escapeChars != null) {
+ // Completion is protected by an opening quote:
+ // Delimiters (spaces) don't need to be escaped, nor do other quotes, but everything else does.
+ // Also, close the quote at the end
+ if (openingQuote != null) {
+ needToBeEscaped = i -> isRawEscapeChar(sb.charAt(i)) || String.valueOf(sb.charAt(i)).equals(openingQuote);
+ }
+ // Completion is protected by middle quotes:
+ // Delimiters (spaces) don't need to be escaped, nor do quotes, but everything else does.
+ else if (middleQuotes) {
+ needToBeEscaped = i -> isRawEscapeChar(sb.charAt(i));
+ }
+ // No quote protection, need to escape everything: delimiter chars (spaces), quote chars
+ // and escapes themselves
+ else {
+ needToBeEscaped = i -> isDelimiterChar(sb, i) || isRawEscapeChar(sb.charAt(i)) || isRawQuoteChar(sb.charAt(i));
+ }
+ for (int i = 0; i < sb.length(); i++) {
+ if (needToBeEscaped.test(i)) {
+ sb.insert(i++, escapeChars[0]);
+ }
+ }
+ } else if (openingQuote == null && !middleQuotes) {
+ for (int i = 0; i < sb.length(); i++) {
+ if (isDelimiterChar(sb, i)) {
+ quote = "'";
+ break;
+ }
+ }
+ }
+ if (quote != null) {
+ sb.insert(0, quote);
if (complete) {
- sb.append(openingQuote);
+ sb.append(quote);
}
}
return sb;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/KillRing.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/KillRing.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2018, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
@@ -17,10 +17,13 @@
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
import java.util.function.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
+import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jdk.internal.org.jline.keymap.BindingReader;
@@ -32,6 +35,7 @@
import jdk.internal.org.jline.terminal.Attributes.ControlChar;
import jdk.internal.org.jline.terminal.Terminal.Signal;
import jdk.internal.org.jline.terminal.Terminal.SignalHandler;
+import jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal;
import jdk.internal.org.jline.utils.AttributedString;
import jdk.internal.org.jline.utils.AttributedStringBuilder;
import jdk.internal.org.jline.utils.AttributedStyle;
@@ -159,8 +163,8 @@
protected final Size size = new Size();
- protected AttributedString prompt;
- protected AttributedString rightPrompt;
+ protected AttributedString prompt = AttributedString.EMPTY;
+ protected AttributedString rightPrompt = AttributedString.EMPTY;
protected MaskingCallback maskingCallback;
@@ -210,6 +214,10 @@
protected UndoTree<Buffer> undo = new UndoTree<>(this::setBuffer);
protected boolean isUndo;
+ /**
+ * State lock
+ */
+ protected final ReentrantLock lock = new ReentrantLock();
/*
* Current internal state of the line reader
*/
@@ -239,6 +247,11 @@
protected int smallTerminalOffset = 0;
+ /*
+ * accept-and-infer-next-history, accept-and-hold & accept-line-and-down-history
+ */
+ protected boolean nextCommandFromHistory = false;
+ protected int nextHistoryId = -1;
public LineReaderImpl(Terminal terminal) throws IOException {
@@ -266,6 +279,7 @@
builtinWidgets = builtinWidgets();
widgets = new HashMap<>(builtinWidgets);
bindingReader = new BindingReader(terminal.reader());
+ doDisplay();
}
public Terminal getTerminal() {
@@ -467,8 +481,7 @@
SignalHandler previousWinchHandler = null;
SignalHandler previousContHandler = null;
Attributes originalAttributes = null;
- boolean dumb = Terminal.TYPE_DUMB.equals(terminal.getType())
- || Terminal.TYPE_DUMB_COLOR.equals(terminal.getType());
+ boolean dumb = isTerminalDumb();
try {
this.maskingCallback = maskingCallback;
@@ -495,6 +508,17 @@
if (buffer != null) {
buf.write(buffer);
}
+ if (nextCommandFromHistory && nextHistoryId > 0) {
+ if (history.size() > nextHistoryId) {
+ history.moveTo(nextHistoryId);
+ } else {
+ history.moveTo(history.last());
+ }
+ buf.write(history.current());
+ } else {
+ nextHistoryId = -1;
+ }
+ nextCommandFromHistory = false;
undo.clear();
parsedLine = null;
keyMap = MAIN;
@@ -503,7 +527,9 @@
history.attach(this);
}
- synchronized (this) {
+ try {
+ lock.lock();
+
this.reading = true;
previousIntrHandler = terminal.handle(Signal.INT, signal -> readLineThread.interrupt());
@@ -511,18 +537,7 @@
previousContHandler = terminal.handle(Signal.CONT, this::handleSignal);
originalAttributes = terminal.enterRawMode();
- // Cache terminal size for the duration of the call to readLine()
- // It will eventually be updated with WINCH signals
- size.copy(terminal.getSize());
-
- display = new Display(terminal, false);
- if (size.getRows() == 0 || size.getColumns() == 0) {
- display.resize(1, Integer.MAX_VALUE);
- } else {
- display.resize(size.getRows(), size.getColumns());
- }
- if (isSet(Option.DELAY_LINE_WRAP))
- display.setDelayLineWrap(true);
+ doDisplay();
// Move into application mode
if (!dumb) {
@@ -547,6 +562,8 @@
// Draw initial prompt
redrawLine();
redisplay();
+ } finally {
+ lock.unlock();
}
while (true) {
@@ -578,7 +595,8 @@
regionActive = RegionType.NONE;
}
- synchronized (this) {
+ try {
+ lock.lock();
// Get executable widget
Buffer copy = buf.copy();
Widget w = getWidget(o);
@@ -610,6 +628,8 @@
if (!dumb) {
redisplay();
}
+ } finally {
+ lock.unlock();
}
}
} catch (IOError e) {
@@ -620,7 +640,9 @@
}
}
finally {
- synchronized (this) {
+ try {
+ lock.lock();
+
this.reading = false;
cleanup();
@@ -636,26 +658,54 @@
if (previousContHandler != null) {
terminal.handle(Signal.CONT, previousContHandler);
}
+ } finally {
+ lock.unlock();
}
startedReading.set(false);
}
}
+ private boolean isTerminalDumb(){
+ return Terminal.TYPE_DUMB.equals(terminal.getType())
+ || Terminal.TYPE_DUMB_COLOR.equals(terminal.getType());
+ }
+
+ private void doDisplay(){
+ // Cache terminal size for the duration of the call to readLine()
+ // It will eventually be updated with WINCH signals
+ size.copy(terminal.getBufferSize());
+
+ display = new Display(terminal, false);
+ if (size.getRows() == 0 || size.getColumns() == 0) {
+ display.resize(1, Integer.MAX_VALUE);
+ } else {
+ display.resize(size.getRows(), size.getColumns());
+ }
+ if (isSet(Option.DELAY_LINE_WRAP))
+ display.setDelayLineWrap(true);
+ }
+
@Override
- public synchronized void printAbove(String str) {
- boolean reading = this.reading;
- if (reading) {
- display.update(Collections.emptyList(), 0);
- }
- if (str.endsWith("\n")) {
- terminal.writer().print(str);
- } else {
- terminal.writer().println(str);
- }
- if (reading) {
- redisplay(false);
- }
- terminal.flush();
+ public void printAbove(String str) {
+ try {
+ lock.lock();
+
+ boolean reading = this.reading;
+ if (reading) {
+ display.update(Collections.emptyList(), 0);
+ }
+ if (str.endsWith("\n") || str.endsWith("\n\033[m") || str.endsWith("\n\033[0m")) {
+ terminal.writer().print(str);
+ } else {
+ terminal.writer().println(str);
+ }
+ if (reading) {
+ redisplay(false);
+ }
+ terminal.flush();
+ } finally {
+ lock.unlock();
+ }
}
@Override
@@ -664,8 +714,13 @@
}
@Override
- public synchronized boolean isReading() {
- return reading;
+ public boolean isReading() {
+ try {
+ lock.lock();
+ return reading;
+ } finally {
+ lock.unlock();
+ }
}
/* Make sure we position the cursor on column 0 */
@@ -700,27 +755,32 @@
sb.append(" ");
sb.append(KeyMap.key(terminal, Capability.carriage_return));
}
- print(sb.toAnsi(terminal));
+ sb.print(terminal);
return true;
}
@Override
- public synchronized void callWidget(String name) {
- if (!reading) {
- throw new IllegalStateException("Widgets can only be called during a `readLine` call");
- }
+ public void callWidget(String name) {
try {
- Widget w;
- if (name.startsWith(".")) {
- w = builtinWidgets.get(name.substring(1));
- } else {
- w = widgets.get(name);
- }
- if (w != null) {
- w.apply();
- }
- } catch (Throwable t) {
- Log.debug("Error executing widget '", name, "'", t);
+ lock.lock();
+ if (!reading) {
+ throw new IllegalStateException("Widgets can only be called during a `readLine` call");
+ }
+ try {
+ Widget w;
+ if (name.startsWith(".")) {
+ w = builtinWidgets.get(name.substring(1));
+ } else {
+ w = widgets.get(name);
+ }
+ if (w != null) {
+ w.apply();
+ }
+ } catch (Throwable t) {
+ Log.debug("Error executing widget '", name, "'", t);
+ }
+ } finally {
+ lock.unlock();
}
}
@@ -760,13 +820,35 @@
* @return the character, or -1 if an EOF is received.
*/
public int readCharacter() {
- return bindingReader.readCharacter();
+ if (lock.isHeldByCurrentThread()) {
+ try {
+ lock.unlock();
+ return bindingReader.readCharacter();
+ } finally {
+ lock.lock();
+ }
+ } else {
+ return bindingReader.readCharacter();
+ }
}
public int peekCharacter(long timeout) {
return bindingReader.peekCharacter(timeout);
}
+ protected <T> T doReadBinding(KeyMap<T> keys, KeyMap<T> local) {
+ if (lock.isHeldByCurrentThread()) {
+ try {
+ lock.unlock();
+ return bindingReader.readBinding(keys, local);
+ } finally {
+ lock.lock();
+ }
+ } else {
+ return bindingReader.readBinding(keys, local);
+ }
+ }
+
/**
* Read from the input stream and decode an operation from the key map.
*
@@ -783,7 +865,7 @@
}
public Binding readBinding(KeyMap<Binding> keys, KeyMap<Binding> local) {
- Binding o = bindingReader.readBinding(keys, local);
+ Binding o = doReadBinding(keys, local);
/*
* The kill ring keeps record of whether or not the
* previous command was a yank or a kill. We reset
@@ -926,7 +1008,7 @@
if (ch != '\n') {
sb.append(ch);
}
- } else if (ch == '\\') {
+ } else if (parser.isEscapeChar(ch)) {
escaped = true;
} else {
sb.append(ch);
@@ -948,13 +1030,18 @@
protected void handleSignal(Signal signal) {
if (signal == Signal.WINCH) {
- size.copy(terminal.getSize());
+ Status status = Status.getStatus(terminal, false);
+ if (status != null) {
+ status.hardReset();
+ }
+ size.copy(terminal.getBufferSize());
display.resize(size.getRows(), size.getColumns());
+ redrawLine();
redisplay();
}
else if (signal == Signal.CONT) {
terminal.enterRawMode();
- size.copy(terminal.getSize());
+ size.copy(terminal.getBufferSize());
display.resize(size.getRows(), size.getColumns());
terminal.puts(Capability.keypad_xmit);
redrawLine();
@@ -1903,7 +1990,7 @@
while (true) {
post = () -> new AttributedString(searchPrompt + searchBuffer.toString() + "_");
redisplay();
- Binding b = bindingReader.readBinding(keyMap);
+ Binding b = doReadBinding(keyMap, null);
if (b instanceof Reference) {
String func = ((Reference) b).name();
switch (func) {
@@ -2300,7 +2387,7 @@
} else {
viMoveMode = mode;
mark = -1;
- Binding b = bindingReader.readBinding(getKeys(), keyMaps.get(VIOPP));
+ Binding b = doReadBinding(getKeys(), keyMaps.get(VIOPP));
if (b == null || new Reference(SEND_BREAK).equals(b)) {
viMoveMode = ViMoveMode.NORMAL;
mark = oldMark;
@@ -2710,6 +2797,42 @@
return acceptLine();
}
+ protected boolean acceptAndHold() {
+ nextCommandFromHistory = false;
+ acceptLine();
+ if (!buf.toString().isEmpty()) {
+ nextHistoryId = Integer.MAX_VALUE;
+ nextCommandFromHistory = true;
+ }
+ return nextCommandFromHistory;
+ }
+
+ protected boolean acceptLineAndDownHistory() {
+ nextCommandFromHistory = false;
+ acceptLine();
+ if (nextHistoryId < 0) {
+ nextHistoryId = history.index();
+ }
+ if (history.size() > nextHistoryId + 1) {
+ nextHistoryId++;
+ nextCommandFromHistory = true;
+ }
+ return nextCommandFromHistory;
+ }
+
+ protected boolean acceptAndInferNextHistory() {
+ nextCommandFromHistory = false;
+ acceptLine();
+ if (!buf.toString().isEmpty()) {
+ nextHistoryId = searchBackwards(buf.toString(), history.last());
+ if (nextHistoryId >= 0 && history.size() > nextHistoryId + 1) {
+ nextHistoryId++;
+ nextCommandFromHistory = true;
+ }
+ }
+ return nextCommandFromHistory;
+ }
+
protected boolean acceptLine() {
parsedLine = null;
if (!isSet(Option.DISABLE_EVENT_EXPANSION)) {
@@ -3343,255 +3466,317 @@
protected Map<String, Widget> builtinWidgets() {
Map<String, Widget> widgets = new HashMap<>();
- widgets.put(ACCEPT_LINE, this::acceptLine);
- widgets.put(ARGUMENT_BASE, this::argumentBase);
- widgets.put(BACKWARD_CHAR, this::backwardChar);
- widgets.put(BACKWARD_DELETE_CHAR, this::backwardDeleteChar);
- widgets.put(BACKWARD_DELETE_WORD, this::backwardDeleteWord);
- widgets.put(BACKWARD_KILL_LINE, this::backwardKillLine);
- widgets.put(BACKWARD_KILL_WORD, this::backwardKillWord);
- widgets.put(BACKWARD_WORD, this::backwardWord);
- widgets.put(BEEP, this::beep);
- widgets.put(BEGINNING_OF_BUFFER_OR_HISTORY, this::beginningOfBufferOrHistory);
- widgets.put(BEGINNING_OF_HISTORY, this::beginningOfHistory);
- widgets.put(BEGINNING_OF_LINE, this::beginningOfLine);
- widgets.put(BEGINNING_OF_LINE_HIST, this::beginningOfLineHist);
- widgets.put(CAPITALIZE_WORD, this::capitalizeWord);
- widgets.put(CLEAR, this::clear);
- widgets.put(CLEAR_SCREEN, this::clearScreen);
- widgets.put(COMPLETE_PREFIX, this::completePrefix);
- widgets.put(COMPLETE_WORD, this::completeWord);
- widgets.put(COPY_PREV_WORD, this::copyPrevWord);
- widgets.put(COPY_REGION_AS_KILL, this::copyRegionAsKill);
- widgets.put(DELETE_CHAR, this::deleteChar);
- widgets.put(DELETE_CHAR_OR_LIST, this::deleteCharOrList);
- widgets.put(DELETE_WORD, this::deleteWord);
- widgets.put(DIGIT_ARGUMENT, this::digitArgument);
- widgets.put(DO_LOWERCASE_VERSION, this::doLowercaseVersion);
- widgets.put(DOWN_CASE_WORD, this::downCaseWord);
- widgets.put(DOWN_LINE, this::downLine);
- widgets.put(DOWN_LINE_OR_HISTORY, this::downLineOrHistory);
- widgets.put(DOWN_LINE_OR_SEARCH, this::downLineOrSearch);
- widgets.put(DOWN_HISTORY, this::downHistory);
- widgets.put(EMACS_EDITING_MODE, this::emacsEditingMode);
- widgets.put(EMACS_BACKWARD_WORD, this::emacsBackwardWord);
- widgets.put(EMACS_FORWARD_WORD, this::emacsForwardWord);
- widgets.put(END_OF_BUFFER_OR_HISTORY, this::endOfBufferOrHistory);
- widgets.put(END_OF_HISTORY, this::endOfHistory);
- widgets.put(END_OF_LINE, this::endOfLine);
- widgets.put(END_OF_LINE_HIST, this::endOfLineHist);
- widgets.put(EXCHANGE_POINT_AND_MARK, this::exchangePointAndMark);
- widgets.put(EXPAND_HISTORY, this::expandHistory);
- widgets.put(EXPAND_OR_COMPLETE, this::expandOrComplete);
- widgets.put(EXPAND_OR_COMPLETE_PREFIX, this::expandOrCompletePrefix);
- widgets.put(EXPAND_WORD, this::expandWord);
- widgets.put(FRESH_LINE, this::freshLine);
- widgets.put(FORWARD_CHAR, this::forwardChar);
- widgets.put(FORWARD_WORD, this::forwardWord);
- widgets.put(HISTORY_INCREMENTAL_SEARCH_BACKWARD, this::historyIncrementalSearchBackward);
- widgets.put(HISTORY_INCREMENTAL_SEARCH_FORWARD, this::historyIncrementalSearchForward);
- widgets.put(HISTORY_SEARCH_BACKWARD, this::historySearchBackward);
- widgets.put(HISTORY_SEARCH_FORWARD, this::historySearchForward);
- widgets.put(INSERT_CLOSE_CURLY, this::insertCloseCurly);
- widgets.put(INSERT_CLOSE_PAREN, this::insertCloseParen);
- widgets.put(INSERT_CLOSE_SQUARE, this::insertCloseSquare);
- widgets.put(INSERT_COMMENT, this::insertComment);
- widgets.put(KILL_BUFFER, this::killBuffer);
- widgets.put(KILL_LINE, this::killLine);
- widgets.put(KILL_REGION, this::killRegion);
- widgets.put(KILL_WHOLE_LINE, this::killWholeLine);
- widgets.put(KILL_WORD, this::killWord);
- widgets.put(LIST_CHOICES, this::listChoices);
- widgets.put(MENU_COMPLETE, this::menuComplete);
- widgets.put(MENU_EXPAND_OR_COMPLETE, this::menuExpandOrComplete);
- widgets.put(NEG_ARGUMENT, this::negArgument);
- widgets.put(OVERWRITE_MODE, this::overwriteMode);
-// widgets.put(QUIT, this::quit);
- widgets.put(QUOTED_INSERT, this::quotedInsert);
- widgets.put(REDISPLAY, this::redisplay);
- widgets.put(REDRAW_LINE, this::redrawLine);
- widgets.put(REDO, this::redo);
- widgets.put(SELF_INSERT, this::selfInsert);
- widgets.put(SELF_INSERT_UNMETA, this::selfInsertUnmeta);
- widgets.put(SEND_BREAK, this::sendBreak);
- widgets.put(SET_MARK_COMMAND, this::setMarkCommand);
- widgets.put(TRANSPOSE_CHARS, this::transposeChars);
- widgets.put(TRANSPOSE_WORDS, this::transposeWords);
- widgets.put(UNDEFINED_KEY, this::undefinedKey);
- widgets.put(UNIVERSAL_ARGUMENT, this::universalArgument);
- widgets.put(UNDO, this::undo);
- widgets.put(UP_CASE_WORD, this::upCaseWord);
- widgets.put(UP_HISTORY, this::upHistory);
- widgets.put(UP_LINE, this::upLine);
- widgets.put(UP_LINE_OR_HISTORY, this::upLineOrHistory);
- widgets.put(UP_LINE_OR_SEARCH, this::upLineOrSearch);
- widgets.put(VI_ADD_EOL, this::viAddEol);
- widgets.put(VI_ADD_NEXT, this::viAddNext);
- widgets.put(VI_BACKWARD_CHAR, this::viBackwardChar);
- widgets.put(VI_BACKWARD_DELETE_CHAR, this::viBackwardDeleteChar);
- widgets.put(VI_BACKWARD_BLANK_WORD, this::viBackwardBlankWord);
- widgets.put(VI_BACKWARD_BLANK_WORD_END, this::viBackwardBlankWordEnd);
- widgets.put(VI_BACKWARD_KILL_WORD, this::viBackwardKillWord);
- widgets.put(VI_BACKWARD_WORD, this::viBackwardWord);
- widgets.put(VI_BACKWARD_WORD_END, this::viBackwardWordEnd);
- widgets.put(VI_BEGINNING_OF_LINE, this::viBeginningOfLine);
- widgets.put(VI_CMD_MODE, this::viCmdMode);
- widgets.put(VI_DIGIT_OR_BEGINNING_OF_LINE, this::viDigitOrBeginningOfLine);
- widgets.put(VI_DOWN_LINE_OR_HISTORY, this::viDownLineOrHistory);
- widgets.put(VI_CHANGE, this::viChange);
- widgets.put(VI_CHANGE_EOL, this::viChangeEol);
- widgets.put(VI_CHANGE_WHOLE_LINE, this::viChangeWholeLine);
- widgets.put(VI_DELETE_CHAR, this::viDeleteChar);
- widgets.put(VI_DELETE, this::viDelete);
- widgets.put(VI_END_OF_LINE, this::viEndOfLine);
- widgets.put(VI_KILL_EOL, this::viKillEol);
- widgets.put(VI_FIRST_NON_BLANK, this::viFirstNonBlank);
- widgets.put(VI_FIND_NEXT_CHAR, this::viFindNextChar);
- widgets.put(VI_FIND_NEXT_CHAR_SKIP, this::viFindNextCharSkip);
- widgets.put(VI_FIND_PREV_CHAR, this::viFindPrevChar);
- widgets.put(VI_FIND_PREV_CHAR_SKIP, this::viFindPrevCharSkip);
- widgets.put(VI_FORWARD_BLANK_WORD, this::viForwardBlankWord);
- widgets.put(VI_FORWARD_BLANK_WORD_END, this::viForwardBlankWordEnd);
- widgets.put(VI_FORWARD_CHAR, this::viForwardChar);
- widgets.put(VI_FORWARD_WORD, this::viForwardWord);
- widgets.put(VI_FORWARD_WORD, this::viForwardWord);
- widgets.put(VI_FORWARD_WORD_END, this::viForwardWordEnd);
- widgets.put(VI_HISTORY_SEARCH_BACKWARD, this::viHistorySearchBackward);
- widgets.put(VI_HISTORY_SEARCH_FORWARD, this::viHistorySearchForward);
- widgets.put(VI_INSERT, this::viInsert);
- widgets.put(VI_INSERT_BOL, this::viInsertBol);
- widgets.put(VI_INSERT_COMMENT, this::viInsertComment);
- widgets.put(VI_JOIN, this::viJoin);
- widgets.put(VI_KILL_LINE, this::viKillWholeLine);
- widgets.put(VI_MATCH_BRACKET, this::viMatchBracket);
- widgets.put(VI_OPEN_LINE_ABOVE, this::viOpenLineAbove);
- widgets.put(VI_OPEN_LINE_BELOW, this::viOpenLineBelow);
- widgets.put(VI_PUT_AFTER, this::viPutAfter);
- widgets.put(VI_PUT_BEFORE, this::viPutBefore);
- widgets.put(VI_REPEAT_FIND, this::viRepeatFind);
- widgets.put(VI_REPEAT_SEARCH, this::viRepeatSearch);
- widgets.put(VI_REPLACE_CHARS, this::viReplaceChars);
- widgets.put(VI_REV_REPEAT_FIND, this::viRevRepeatFind);
- widgets.put(VI_REV_REPEAT_SEARCH, this::viRevRepeatSearch);
- widgets.put(VI_SWAP_CASE, this::viSwapCase);
- widgets.put(VI_UP_LINE_OR_HISTORY, this::viUpLineOrHistory);
- widgets.put(VI_YANK, this::viYankTo);
- widgets.put(VI_YANK_WHOLE_LINE, this::viYankWholeLine);
- widgets.put(VISUAL_LINE_MODE, this::visualLineMode);
- widgets.put(VISUAL_MODE, this::visualMode);
- widgets.put(WHAT_CURSOR_POSITION, this::whatCursorPosition);
- widgets.put(YANK, this::yank);
- widgets.put(YANK_POP, this::yankPop);
- widgets.put(MOUSE, this::mouse);
- widgets.put(BEGIN_PASTE, this::beginPaste);
- widgets.put(FOCUS_IN, this::focusIn);
- widgets.put(FOCUS_OUT, this::focusOut);
+ addBuiltinWidget(widgets, ACCEPT_AND_INFER_NEXT_HISTORY, this::acceptAndInferNextHistory);
+ addBuiltinWidget(widgets, ACCEPT_AND_HOLD, this::acceptAndHold);
+ addBuiltinWidget(widgets, ACCEPT_LINE, this::acceptLine);
+ addBuiltinWidget(widgets, ACCEPT_LINE_AND_DOWN_HISTORY, this::acceptLineAndDownHistory);
+ addBuiltinWidget(widgets, ARGUMENT_BASE, this::argumentBase);
+ addBuiltinWidget(widgets, BACKWARD_CHAR, this::backwardChar);
+ addBuiltinWidget(widgets, BACKWARD_DELETE_CHAR, this::backwardDeleteChar);
+ addBuiltinWidget(widgets, BACKWARD_DELETE_WORD, this::backwardDeleteWord);
+ addBuiltinWidget(widgets, BACKWARD_KILL_LINE, this::backwardKillLine);
+ addBuiltinWidget(widgets, BACKWARD_KILL_WORD, this::backwardKillWord);
+ addBuiltinWidget(widgets, BACKWARD_WORD, this::backwardWord);
+ addBuiltinWidget(widgets, BEEP, this::beep);
+ addBuiltinWidget(widgets, BEGINNING_OF_BUFFER_OR_HISTORY, this::beginningOfBufferOrHistory);
+ addBuiltinWidget(widgets, BEGINNING_OF_HISTORY, this::beginningOfHistory);
+ addBuiltinWidget(widgets, BEGINNING_OF_LINE, this::beginningOfLine);
+ addBuiltinWidget(widgets, BEGINNING_OF_LINE_HIST, this::beginningOfLineHist);
+ addBuiltinWidget(widgets, CAPITALIZE_WORD, this::capitalizeWord);
+ addBuiltinWidget(widgets, CLEAR, this::clear);
+ addBuiltinWidget(widgets, CLEAR_SCREEN, this::clearScreen);
+ addBuiltinWidget(widgets, COMPLETE_PREFIX, this::completePrefix);
+ addBuiltinWidget(widgets, COMPLETE_WORD, this::completeWord);
+ addBuiltinWidget(widgets, COPY_PREV_WORD, this::copyPrevWord);
+ addBuiltinWidget(widgets, COPY_REGION_AS_KILL, this::copyRegionAsKill);
+ addBuiltinWidget(widgets, DELETE_CHAR, this::deleteChar);
+ addBuiltinWidget(widgets, DELETE_CHAR_OR_LIST, this::deleteCharOrList);
+ addBuiltinWidget(widgets, DELETE_WORD, this::deleteWord);
+ addBuiltinWidget(widgets, DIGIT_ARGUMENT, this::digitArgument);
+ addBuiltinWidget(widgets, DO_LOWERCASE_VERSION, this::doLowercaseVersion);
+ addBuiltinWidget(widgets, DOWN_CASE_WORD, this::downCaseWord);
+ addBuiltinWidget(widgets, DOWN_LINE, this::downLine);
+ addBuiltinWidget(widgets, DOWN_LINE_OR_HISTORY, this::downLineOrHistory);
+ addBuiltinWidget(widgets, DOWN_LINE_OR_SEARCH, this::downLineOrSearch);
+ addBuiltinWidget(widgets, DOWN_HISTORY, this::downHistory);
+ addBuiltinWidget(widgets, EMACS_EDITING_MODE, this::emacsEditingMode);
+ addBuiltinWidget(widgets, EMACS_BACKWARD_WORD, this::emacsBackwardWord);
+ addBuiltinWidget(widgets, EMACS_FORWARD_WORD, this::emacsForwardWord);
+ addBuiltinWidget(widgets, END_OF_BUFFER_OR_HISTORY, this::endOfBufferOrHistory);
+ addBuiltinWidget(widgets, END_OF_HISTORY, this::endOfHistory);
+ addBuiltinWidget(widgets, END_OF_LINE, this::endOfLine);
+ addBuiltinWidget(widgets, END_OF_LINE_HIST, this::endOfLineHist);
+ addBuiltinWidget(widgets, EXCHANGE_POINT_AND_MARK, this::exchangePointAndMark);
+ addBuiltinWidget(widgets, EXPAND_HISTORY, this::expandHistory);
+ addBuiltinWidget(widgets, EXPAND_OR_COMPLETE, this::expandOrComplete);
+ addBuiltinWidget(widgets, EXPAND_OR_COMPLETE_PREFIX, this::expandOrCompletePrefix);
+ addBuiltinWidget(widgets, EXPAND_WORD, this::expandWord);
+ addBuiltinWidget(widgets, FRESH_LINE, this::freshLine);
+ addBuiltinWidget(widgets, FORWARD_CHAR, this::forwardChar);
+ addBuiltinWidget(widgets, FORWARD_WORD, this::forwardWord);
+ addBuiltinWidget(widgets, HISTORY_INCREMENTAL_SEARCH_BACKWARD, this::historyIncrementalSearchBackward);
+ addBuiltinWidget(widgets, HISTORY_INCREMENTAL_SEARCH_FORWARD, this::historyIncrementalSearchForward);
+ addBuiltinWidget(widgets, HISTORY_SEARCH_BACKWARD, this::historySearchBackward);
+ addBuiltinWidget(widgets, HISTORY_SEARCH_FORWARD, this::historySearchForward);
+ addBuiltinWidget(widgets, INSERT_CLOSE_CURLY, this::insertCloseCurly);
+ addBuiltinWidget(widgets, INSERT_CLOSE_PAREN, this::insertCloseParen);
+ addBuiltinWidget(widgets, INSERT_CLOSE_SQUARE, this::insertCloseSquare);
+ addBuiltinWidget(widgets, INSERT_COMMENT, this::insertComment);
+ addBuiltinWidget(widgets, KILL_BUFFER, this::killBuffer);
+ addBuiltinWidget(widgets, KILL_LINE, this::killLine);
+ addBuiltinWidget(widgets, KILL_REGION, this::killRegion);
+ addBuiltinWidget(widgets, KILL_WHOLE_LINE, this::killWholeLine);
+ addBuiltinWidget(widgets, KILL_WORD, this::killWord);
+ addBuiltinWidget(widgets, LIST_CHOICES, this::listChoices);
+ addBuiltinWidget(widgets, MENU_COMPLETE, this::menuComplete);
+ addBuiltinWidget(widgets, MENU_EXPAND_OR_COMPLETE, this::menuExpandOrComplete);
+ addBuiltinWidget(widgets, NEG_ARGUMENT, this::negArgument);
+ addBuiltinWidget(widgets, OVERWRITE_MODE, this::overwriteMode);
+// addBuiltinWidget(widgets, QUIT, this::quit);
+ addBuiltinWidget(widgets, QUOTED_INSERT, this::quotedInsert);
+ addBuiltinWidget(widgets, REDISPLAY, this::redisplay);
+ addBuiltinWidget(widgets, REDRAW_LINE, this::redrawLine);
+ addBuiltinWidget(widgets, REDO, this::redo);
+ addBuiltinWidget(widgets, SELF_INSERT, this::selfInsert);
+ addBuiltinWidget(widgets, SELF_INSERT_UNMETA, this::selfInsertUnmeta);
+ addBuiltinWidget(widgets, SEND_BREAK, this::sendBreak);
+ addBuiltinWidget(widgets, SET_MARK_COMMAND, this::setMarkCommand);
+ addBuiltinWidget(widgets, TRANSPOSE_CHARS, this::transposeChars);
+ addBuiltinWidget(widgets, TRANSPOSE_WORDS, this::transposeWords);
+ addBuiltinWidget(widgets, UNDEFINED_KEY, this::undefinedKey);
+ addBuiltinWidget(widgets, UNIVERSAL_ARGUMENT, this::universalArgument);
+ addBuiltinWidget(widgets, UNDO, this::undo);
+ addBuiltinWidget(widgets, UP_CASE_WORD, this::upCaseWord);
+ addBuiltinWidget(widgets, UP_HISTORY, this::upHistory);
+ addBuiltinWidget(widgets, UP_LINE, this::upLine);
+ addBuiltinWidget(widgets, UP_LINE_OR_HISTORY, this::upLineOrHistory);
+ addBuiltinWidget(widgets, UP_LINE_OR_SEARCH, this::upLineOrSearch);
+ addBuiltinWidget(widgets, VI_ADD_EOL, this::viAddEol);
+ addBuiltinWidget(widgets, VI_ADD_NEXT, this::viAddNext);
+ addBuiltinWidget(widgets, VI_BACKWARD_CHAR, this::viBackwardChar);
+ addBuiltinWidget(widgets, VI_BACKWARD_DELETE_CHAR, this::viBackwardDeleteChar);
+ addBuiltinWidget(widgets, VI_BACKWARD_BLANK_WORD, this::viBackwardBlankWord);
+ addBuiltinWidget(widgets, VI_BACKWARD_BLANK_WORD_END, this::viBackwardBlankWordEnd);
+ addBuiltinWidget(widgets, VI_BACKWARD_KILL_WORD, this::viBackwardKillWord);
+ addBuiltinWidget(widgets, VI_BACKWARD_WORD, this::viBackwardWord);
+ addBuiltinWidget(widgets, VI_BACKWARD_WORD_END, this::viBackwardWordEnd);
+ addBuiltinWidget(widgets, VI_BEGINNING_OF_LINE, this::viBeginningOfLine);
+ addBuiltinWidget(widgets, VI_CMD_MODE, this::viCmdMode);
+ addBuiltinWidget(widgets, VI_DIGIT_OR_BEGINNING_OF_LINE, this::viDigitOrBeginningOfLine);
+ addBuiltinWidget(widgets, VI_DOWN_LINE_OR_HISTORY, this::viDownLineOrHistory);
+ addBuiltinWidget(widgets, VI_CHANGE, this::viChange);
+ addBuiltinWidget(widgets, VI_CHANGE_EOL, this::viChangeEol);
+ addBuiltinWidget(widgets, VI_CHANGE_WHOLE_LINE, this::viChangeWholeLine);
+ addBuiltinWidget(widgets, VI_DELETE_CHAR, this::viDeleteChar);
+ addBuiltinWidget(widgets, VI_DELETE, this::viDelete);
+ addBuiltinWidget(widgets, VI_END_OF_LINE, this::viEndOfLine);
+ addBuiltinWidget(widgets, VI_KILL_EOL, this::viKillEol);
+ addBuiltinWidget(widgets, VI_FIRST_NON_BLANK, this::viFirstNonBlank);
+ addBuiltinWidget(widgets, VI_FIND_NEXT_CHAR, this::viFindNextChar);
+ addBuiltinWidget(widgets, VI_FIND_NEXT_CHAR_SKIP, this::viFindNextCharSkip);
+ addBuiltinWidget(widgets, VI_FIND_PREV_CHAR, this::viFindPrevChar);
+ addBuiltinWidget(widgets, VI_FIND_PREV_CHAR_SKIP, this::viFindPrevCharSkip);
+ addBuiltinWidget(widgets, VI_FORWARD_BLANK_WORD, this::viForwardBlankWord);
+ addBuiltinWidget(widgets, VI_FORWARD_BLANK_WORD_END, this::viForwardBlankWordEnd);
+ addBuiltinWidget(widgets, VI_FORWARD_CHAR, this::viForwardChar);
+ addBuiltinWidget(widgets, VI_FORWARD_WORD, this::viForwardWord);
+ addBuiltinWidget(widgets, VI_FORWARD_WORD, this::viForwardWord);
+ addBuiltinWidget(widgets, VI_FORWARD_WORD_END, this::viForwardWordEnd);
+ addBuiltinWidget(widgets, VI_HISTORY_SEARCH_BACKWARD, this::viHistorySearchBackward);
+ addBuiltinWidget(widgets, VI_HISTORY_SEARCH_FORWARD, this::viHistorySearchForward);
+ addBuiltinWidget(widgets, VI_INSERT, this::viInsert);
+ addBuiltinWidget(widgets, VI_INSERT_BOL, this::viInsertBol);
+ addBuiltinWidget(widgets, VI_INSERT_COMMENT, this::viInsertComment);
+ addBuiltinWidget(widgets, VI_JOIN, this::viJoin);
+ addBuiltinWidget(widgets, VI_KILL_LINE, this::viKillWholeLine);
+ addBuiltinWidget(widgets, VI_MATCH_BRACKET, this::viMatchBracket);
+ addBuiltinWidget(widgets, VI_OPEN_LINE_ABOVE, this::viOpenLineAbove);
+ addBuiltinWidget(widgets, VI_OPEN_LINE_BELOW, this::viOpenLineBelow);
+ addBuiltinWidget(widgets, VI_PUT_AFTER, this::viPutAfter);
+ addBuiltinWidget(widgets, VI_PUT_BEFORE, this::viPutBefore);
+ addBuiltinWidget(widgets, VI_REPEAT_FIND, this::viRepeatFind);
+ addBuiltinWidget(widgets, VI_REPEAT_SEARCH, this::viRepeatSearch);
+ addBuiltinWidget(widgets, VI_REPLACE_CHARS, this::viReplaceChars);
+ addBuiltinWidget(widgets, VI_REV_REPEAT_FIND, this::viRevRepeatFind);
+ addBuiltinWidget(widgets, VI_REV_REPEAT_SEARCH, this::viRevRepeatSearch);
+ addBuiltinWidget(widgets, VI_SWAP_CASE, this::viSwapCase);
+ addBuiltinWidget(widgets, VI_UP_LINE_OR_HISTORY, this::viUpLineOrHistory);
+ addBuiltinWidget(widgets, VI_YANK, this::viYankTo);
+ addBuiltinWidget(widgets, VI_YANK_WHOLE_LINE, this::viYankWholeLine);
+ addBuiltinWidget(widgets, VISUAL_LINE_MODE, this::visualLineMode);
+ addBuiltinWidget(widgets, VISUAL_MODE, this::visualMode);
+ addBuiltinWidget(widgets, WHAT_CURSOR_POSITION, this::whatCursorPosition);
+ addBuiltinWidget(widgets, YANK, this::yank);
+ addBuiltinWidget(widgets, YANK_POP, this::yankPop);
+ addBuiltinWidget(widgets, MOUSE, this::mouse);
+ addBuiltinWidget(widgets, BEGIN_PASTE, this::beginPaste);
+ addBuiltinWidget(widgets, FOCUS_IN, this::focusIn);
+ addBuiltinWidget(widgets, FOCUS_OUT, this::focusOut);
return widgets;
}
+ private void addBuiltinWidget(Map<String, Widget> widgets, String name, Widget widget) {
+ widgets.put(name, namedWidget(name, widget));
+ }
+
+ private Widget namedWidget(String name, Widget widget) {
+ return new Widget() {
+ @Override
+ public String toString() {
+ return name;
+ }
+ @Override
+ public boolean apply() {
+ return widget.apply();
+ }
+ };
+ }
+
public boolean redisplay() {
redisplay(true);
return true;
}
- protected synchronized void redisplay(boolean flush) {
- if (skipRedisplay) {
- skipRedisplay = false;
- return;
- }
-
- Status status = Status.getStatus(terminal, false);
- if (status != null) {
- status.redraw();
- }
-
- if (size.getRows() > 0 && size.getRows() < MIN_ROWS) {
- AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH);
-
- sb.append(prompt);
- concat(getHighlightedBuffer(buf.toString()).columnSplitLength(Integer.MAX_VALUE), sb);
- AttributedString full = sb.toAttributedString();
-
- sb.setLength(0);
- sb.append(prompt);
- String line = buf.upToCursor();
- if(maskingCallback != null) {
- line = maskingCallback.display(line);
- }
-
- concat(new AttributedString(line).columnSplitLength(Integer.MAX_VALUE), sb);
- AttributedString toCursor = sb.toAttributedString();
-
- int w = WCWidth.wcwidth('\u2026');
- int width = size.getColumns();
- int cursor = toCursor.columnLength();
- int inc = width /2 + 1;
- while (cursor <= smallTerminalOffset + w) {
- smallTerminalOffset -= inc;
- }
- while (cursor >= smallTerminalOffset + width - w) {
- smallTerminalOffset += inc;
- }
- if (smallTerminalOffset > 0) {
- sb.setLength(0);
- sb.append("\u2026");
- sb.append(full.columnSubSequence(smallTerminalOffset + w, Integer.MAX_VALUE));
- full = sb.toAttributedString();
- }
- int length = full.columnLength();
- if (length >= smallTerminalOffset + width) {
+ protected void redisplay(boolean flush) {
+ try {
+ lock.lock();
+
+ if (skipRedisplay) {
+ skipRedisplay = false;
+ return;
+ }
+
+ Status status = Status.getStatus(terminal, false);
+ if (status != null) {
+ status.redraw();
+ }
+
+ if (size.getRows() > 0 && size.getRows() < MIN_ROWS) {
+ AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH);
+
+ sb.append(prompt);
+ concat(getHighlightedBuffer(buf.toString()).columnSplitLength(Integer.MAX_VALUE), sb);
+ AttributedString full = sb.toAttributedString();
+
sb.setLength(0);
- sb.append(full.columnSubSequence(0, width - w));
- sb.append("\u2026");
- full = sb.toAttributedString();
- }
-
- display.update(Collections.singletonList(full), cursor - smallTerminalOffset, flush);
- return;
- }
-
- List<AttributedString> secondaryPrompts = new ArrayList<>();
- AttributedString full = getDisplayedBufferWithPrompts(secondaryPrompts);
-
- List<AttributedString> newLines;
- if (size.getColumns() <= 0) {
- newLines = new ArrayList<>();
- newLines.add(full);
- } else {
- newLines = full.columnSplitLength(size.getColumns(), true, display.delayLineWrap());
- }
-
- List<AttributedString> rightPromptLines;
- if (rightPrompt.length() == 0 || size.getColumns() <= 0) {
- rightPromptLines = new ArrayList<>();
- } else {
- rightPromptLines = rightPrompt.columnSplitLength(size.getColumns());
- }
- while (newLines.size() < rightPromptLines.size()) {
- newLines.add(new AttributedString(""));
- }
- for (int i = 0; i < rightPromptLines.size(); i++) {
- AttributedString line = rightPromptLines.get(i);
- newLines.set(i, addRightPrompt(line, newLines.get(i)));
- }
-
- int cursorPos = -1;
- if (size.getColumns() > 0) {
- AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH);
- sb.append(prompt);
- String buffer = buf.upToCursor();
- if (maskingCallback != null) {
- buffer = maskingCallback.display(buffer);
- }
- sb.append(insertSecondaryPrompts(new AttributedString(buffer), secondaryPrompts, false));
- List<AttributedString> promptLines = sb.columnSplitLength(size.getColumns(), false, display.delayLineWrap());
- if (!promptLines.isEmpty()) {
- cursorPos = size.cursorPos(promptLines.size() - 1,
- promptLines.get(promptLines.size() - 1).columnLength());
- }
- }
-
- display.update(newLines, cursorPos, flush);
+ sb.append(prompt);
+ String line = buf.upToCursor();
+ if (maskingCallback != null) {
+ line = maskingCallback.display(line);
+ }
+
+ concat(new AttributedString(line).columnSplitLength(Integer.MAX_VALUE), sb);
+ AttributedString toCursor = sb.toAttributedString();
+
+ int w = WCWidth.wcwidth('\u2026');
+ int width = size.getColumns();
+ int cursor = toCursor.columnLength();
+ int inc = width / 2 + 1;
+ while (cursor <= smallTerminalOffset + w) {
+ smallTerminalOffset -= inc;
+ }
+ while (cursor >= smallTerminalOffset + width - w) {
+ smallTerminalOffset += inc;
+ }
+ if (smallTerminalOffset > 0) {
+ sb.setLength(0);
+ sb.append("\u2026");
+ sb.append(full.columnSubSequence(smallTerminalOffset + w, Integer.MAX_VALUE));
+ full = sb.toAttributedString();
+ }
+ int length = full.columnLength();
+ if (length >= smallTerminalOffset + width) {
+ sb.setLength(0);
+ sb.append(full.columnSubSequence(0, width - w));
+ sb.append("\u2026");
+ full = sb.toAttributedString();
+ }
+
+ display.update(Collections.singletonList(full), cursor - smallTerminalOffset, flush);
+ return;
+ }
+
+ List<AttributedString> secondaryPrompts = new ArrayList<>();
+ AttributedString full = getDisplayedBufferWithPrompts(secondaryPrompts);
+
+ List<AttributedString> newLines;
+ if (size.getColumns() <= 0) {
+ newLines = new ArrayList<>();
+ newLines.add(full);
+ } else {
+ newLines = full.columnSplitLength(size.getColumns(), true, display.delayLineWrap());
+ }
+
+ List<AttributedString> rightPromptLines;
+ if (rightPrompt.length() == 0 || size.getColumns() <= 0) {
+ rightPromptLines = new ArrayList<>();
+ } else {
+ rightPromptLines = rightPrompt.columnSplitLength(size.getColumns());
+ }
+ while (newLines.size() < rightPromptLines.size()) {
+ newLines.add(new AttributedString(""));
+ }
+ for (int i = 0; i < rightPromptLines.size(); i++) {
+ AttributedString line = rightPromptLines.get(i);
+ newLines.set(i, addRightPrompt(line, newLines.get(i)));
+ }
+
+ int cursorPos = -1;
+ int cursorNewLinesId = -1;
+ int cursorColPos = -1;
+ if (size.getColumns() > 0) {
+ AttributedStringBuilder sb = new AttributedStringBuilder().tabs(TAB_WIDTH);
+ sb.append(prompt);
+ String buffer = buf.upToCursor();
+ if (maskingCallback != null) {
+ buffer = maskingCallback.display(buffer);
+ }
+ sb.append(insertSecondaryPrompts(new AttributedString(buffer), secondaryPrompts, false));
+ List<AttributedString> promptLines = sb.columnSplitLength(size.getColumns(), false, display.delayLineWrap());
+ if (!promptLines.isEmpty()) {
+ cursorNewLinesId = promptLines.size() - 1;
+ cursorColPos = promptLines.get(promptLines.size() - 1).columnLength();
+ cursorPos = size.cursorPos(cursorNewLinesId, cursorColPos);
+ }
+ }
+
+ List<AttributedString> newLinesToDisplay = new ArrayList<>();
+ int displaySize = size.getRows() - (status != null ? status.size() : 0);
+ if (newLines.size() > displaySize && !isTerminalDumb()) {
+ StringBuilder sb = new StringBuilder(">....");
+ // blanks are needed when displaying command completion candidate list
+ for (int i = sb.toString().length(); i < size.getColumns(); i++) {
+ sb.append(" ");
+ }
+ AttributedString partialCommandInfo = new AttributedString(sb.toString());
+ int lineId = newLines.size() - displaySize + 1;
+ int endId = displaySize;
+ int startId = 1;
+ if (lineId > cursorNewLinesId) {
+ lineId = cursorNewLinesId;
+ endId = displaySize - 1;
+ startId = 0;
+ } else {
+ newLinesToDisplay.add(partialCommandInfo);
+ }
+ int cursorRowPos = 0;
+ for (int i = startId; i < endId; i++) {
+ if (cursorNewLinesId == lineId) {
+ cursorRowPos = i;
+ }
+ newLinesToDisplay.add(newLines.get(lineId++));
+ }
+ if (startId == 0) {
+ newLinesToDisplay.add(partialCommandInfo);
+ }
+ cursorPos = size.cursorPos(cursorRowPos, cursorColPos);
+ } else {
+ newLinesToDisplay = newLines;
+ }
+ display.update(newLinesToDisplay, cursorPos, flush);
+ } finally {
+ lock.unlock();
+ }
}
private void concat(List<AttributedString> lines, AttributedStringBuilder sb) {
@@ -3656,26 +3841,26 @@
decode: while (true) {
ch = pattern.charAt(i++);
switch (ch) {
- case '{':
- case '}':
- String str = sb.toString();
- AttributedString astr;
- if (!isHidden) {
- astr = AttributedString.fromAnsi(str);
- cols += astr.columnLength();
- } else {
- astr = new AttributedString(str, AttributedStyle.HIDDEN);
- }
- if (padPartIndex == parts.size()) {
- padPartString = sb;
- if (i < plen) {
- sb = new StringBuilder();
- }
- } else {
- sb.setLength(0);
- }
- parts.add(astr);
- isHidden = ch == '{';
+ case '{':
+ case '}':
+ String str = sb.toString();
+ AttributedString astr;
+ if (!isHidden) {
+ astr = AttributedString.fromAnsi(str);
+ cols += astr.columnLength();
+ } else {
+ astr = new AttributedString(str, AttributedStyle.HIDDEN);
+ }
+ if (padPartIndex == parts.size()) {
+ padPartString = sb;
+ if (i < plen) {
+ sb = new StringBuilder();
+ }
+ } else {
+ sb.setLength(0);
+ }
+ parts.add(astr);
+ isHidden = ch == '{';
break decode;
case '%':
sb.append(ch);
@@ -4048,113 +4233,117 @@
if (matching.isEmpty()) {
return false;
}
-
- // If we only need to display the list, do it now
- if (lst == CompletionType.List) {
+ size.copy(terminal.getSize());
+ try {
+ // If we only need to display the list, do it now
+ if (lst == CompletionType.List) {
+ List<Candidate> possible = matching.entrySet().stream()
+ .flatMap(e -> e.getValue().stream())
+ .collect(Collectors.toList());
+ doList(possible, line.word(), false, line::escape);
+ return !possible.isEmpty();
+ }
+
+ // Check if there's a single possible match
+ Candidate completion = null;
+ // If there's a single possible completion
+ if (matching.size() == 1) {
+ completion = matching.values().stream().flatMap(Collection::stream)
+ .findFirst().orElse(null);
+ }
+ // Or if RECOGNIZE_EXACT is set, try to find an exact match
+ else if (isSet(Option.RECOGNIZE_EXACT)) {
+ completion = matching.values().stream().flatMap(Collection::stream)
+ .filter(Candidate::complete)
+ .filter(c -> exact.test(c.value()))
+ .findFirst().orElse(null);
+ }
+ // Complete and exit
+ if (completion != null && !completion.value().isEmpty()) {
+ if (prefix) {
+ buf.backspace(line.rawWordCursor());
+ } else {
+ buf.move(line.rawWordLength() - line.rawWordCursor());
+ buf.backspace(line.rawWordLength());
+ }
+ buf.write(line.escape(completion.value(), completion.complete()));
+ if (completion.complete()) {
+ if (buf.currChar() != ' ') {
+ buf.write(" ");
+ } else {
+ buf.move(1);
+ }
+ }
+ if (completion.suffix() != null) {
+ redisplay();
+ Binding op = readBinding(getKeys());
+ if (op != null) {
+ String chars = getString(REMOVE_SUFFIX_CHARS, DEFAULT_REMOVE_SUFFIX_CHARS);
+ String ref = op instanceof Reference ? ((Reference) op).name() : null;
+ if (SELF_INSERT.equals(ref) && chars.indexOf(getLastBinding().charAt(0)) >= 0
+ || ACCEPT_LINE.equals(ref)) {
+ buf.backspace(completion.suffix().length());
+ if (getLastBinding().charAt(0) != ' ') {
+ buf.write(' ');
+ }
+ }
+ pushBackBinding(true);
+ }
+ }
+ return true;
+ }
+
List<Candidate> possible = matching.entrySet().stream()
.flatMap(e -> e.getValue().stream())
.collect(Collectors.toList());
- doList(possible, line.word(), false, line::escape);
- return !possible.isEmpty();
- }
-
- // Check if there's a single possible match
- Candidate completion = null;
- // If there's a single possible completion
- if (matching.size() == 1) {
- completion = matching.values().stream().flatMap(Collection::stream)
- .findFirst().orElse(null);
- }
- // Or if RECOGNIZE_EXACT is set, try to find an exact match
- else if (isSet(Option.RECOGNIZE_EXACT)) {
- completion = matching.values().stream().flatMap(Collection::stream)
- .filter(Candidate::complete)
- .filter(c -> exact.test(c.value()))
- .findFirst().orElse(null);
- }
- // Complete and exit
- if (completion != null && !completion.value().isEmpty()) {
+
+ if (useMenu) {
+ buf.move(line.word().length() - line.wordCursor());
+ buf.backspace(line.word().length());
+ doMenu(possible, line.word(), line::escape);
+ return true;
+ }
+
+ // Find current word and move to end
+ String current;
if (prefix) {
- buf.backspace(line.rawWordCursor());
+ current = line.word().substring(0, line.wordCursor());
} else {
+ current = line.word();
buf.move(line.rawWordLength() - line.rawWordCursor());
+ }
+ // Now, we need to find the unambiguous completion
+ // TODO: need to find common suffix
+ String commonPrefix = null;
+ for (String key : matching.keySet()) {
+ commonPrefix = commonPrefix == null ? key : getCommonStart(commonPrefix, key, caseInsensitive);
+ }
+ boolean hasUnambiguous = commonPrefix.startsWith(current) && !commonPrefix.equals(current);
+
+ if (hasUnambiguous) {
buf.backspace(line.rawWordLength());
- }
- buf.write(line.escape(completion.value(), completion.complete()));
- if (completion.complete()) {
- if (buf.currChar() != ' ') {
- buf.write(" ");
- } else {
- buf.move(1);
+ buf.write(line.escape(commonPrefix, false));
+ current = commonPrefix;
+ if ((!isSet(Option.AUTO_LIST) && isSet(Option.AUTO_MENU))
+ || (isSet(Option.AUTO_LIST) && isSet(Option.LIST_AMBIGUOUS))) {
+ if (!nextBindingIsComplete()) {
+ return true;
+ }
}
}
- if (completion.suffix() != null) {
- redisplay();
- Binding op = readBinding(getKeys());
- if (op != null) {
- String chars = getString(REMOVE_SUFFIX_CHARS, DEFAULT_REMOVE_SUFFIX_CHARS);
- String ref = op instanceof Reference ? ((Reference) op).name() : null;
- if (SELF_INSERT.equals(ref) && chars.indexOf(getLastBinding().charAt(0)) >= 0
- || ACCEPT_LINE.equals(ref)) {
- buf.backspace(completion.suffix().length());
- if (getLastBinding().charAt(0) != ' ') {
- buf.write(' ');
- }
- }
- pushBackBinding(true);
+ if (isSet(Option.AUTO_LIST)) {
+ if (!doList(possible, current, true, line::escape)) {
+ return true;
}
}
+ if (isSet(Option.AUTO_MENU)) {
+ buf.backspace(current.length());
+ doMenu(possible, line.word(), line::escape);
+ }
return true;
- }
-
- List<Candidate> possible = matching.entrySet().stream()
- .flatMap(e -> e.getValue().stream())
- .collect(Collectors.toList());
-
- if (useMenu) {
- buf.move(line.word().length() - line.wordCursor());
- buf.backspace(line.word().length());
- doMenu(possible, line.word(), line::escape);
- return true;
- }
-
- // Find current word and move to end
- String current;
- if (prefix) {
- current = line.word().substring(0, line.wordCursor());
- } else {
- current = line.word();
- buf.move(line.rawWordLength() - line.rawWordCursor());
- }
- // Now, we need to find the unambiguous completion
- // TODO: need to find common suffix
- String commonPrefix = null;
- for (String key : matching.keySet()) {
- commonPrefix = commonPrefix == null ? key : getCommonStart(commonPrefix, key, caseInsensitive);
- }
- boolean hasUnambiguous = commonPrefix.startsWith(current) && !commonPrefix.equals(current);
-
- if (hasUnambiguous) {
- buf.backspace(line.rawWordLength());
- buf.write(line.escape(commonPrefix, false));
- current = commonPrefix;
- if ((!isSet(Option.AUTO_LIST) && isSet(Option.AUTO_MENU))
- || (isSet(Option.AUTO_LIST) && isSet(Option.LIST_AMBIGUOUS))) {
- if (!nextBindingIsComplete()) {
- return true;
- }
- }
- }
- if (isSet(Option.AUTO_LIST)) {
- if (!doList(possible, current, true, line::escape)) {
- return true;
- }
- }
- if (isSet(Option.AUTO_MENU)) {
- buf.backspace(current.length());
- doMenu(possible, line.word(), line::escape);
- }
- return true;
+ } finally {
+ size.copy(terminal.getBufferSize());
+ }
}
private CompletingParsedLine wrap(ParsedLine line) {
@@ -4534,7 +4723,7 @@
if (listMax > 0 && possible.size() >= listMax
|| lines >= size.getRows() - promptLines) {
// prompt
- post = () -> new AttributedString(getAppName() + ": do you wish to see to see all " + possible.size()
+ post = () -> new AttributedString(getAppName() + ": do you wish to see all " + possible.size()
+ " possibilities (" + lines + " lines)?");
redisplay(true);
int c = readCharacter();
@@ -4586,7 +4775,7 @@
}
redisplay();
// TODO: use a different keyMap ?
- Binding b = bindingReader.readBinding(getKeys());
+ Binding b = doReadBinding(getKeys(), null);
if (b instanceof Reference) {
String name = ((Reference) b).name();
if (BACKWARD_DELETE_CHAR.equals(name) || VI_BACKWARD_DELETE_CHAR.equals(name)) {
@@ -4731,7 +4920,7 @@
@SuppressWarnings("unchecked")
protected void toColumns(Object items, int width, int maxWidth, AttributedStringBuilder sb, Candidate selection, String completed, boolean rowsFirst, int[] out) {
- if (maxWidth <= 0) {
+ if (maxWidth <= 0 || width <= 0) {
return;
}
// This is a group
@@ -4985,7 +5174,9 @@
while (end < buf.length() && buf.atChar(end) != '\n') {
end++;
}
- end++;
+ if (end < buf.length()) {
+ end++;
+ }
}
}
String killed = buf.substring(start, end);
@@ -5188,7 +5379,7 @@
keyMap.bind(END_PASTE, BRACKETED_PASTE_END);
StringBuilder sb = new StringBuilder();
while (true) {
- Object b = bindingReader.readBinding(keyMap);
+ Object b = doReadBinding(keyMap, null);
if (b == END_PASTE) {
break;
}
@@ -5227,6 +5418,11 @@
*/
public boolean clearScreen() {
if (terminal.puts(Capability.clear_screen)) {
+ // ConEMU extended fonts support
+ if (AbstractWindowsTerminal.TYPE_WINDOWS_CONEMU.equals(terminal.getType())
+ && !Boolean.getBoolean("org.jline.terminal.conemu.disable-activate")) {
+ terminal.writer().write("\u001b[9999E");
+ }
Status status = Status.getStatus(terminal, false);
if (status != null) {
status.reset();
@@ -5358,6 +5554,7 @@
public KeyMap<Binding> emacs() {
KeyMap<Binding> emacs = new KeyMap<>();
+ bindKeys(emacs);
bind(emacs, SET_MARK_COMMAND, ctrl('@'));
bind(emacs, BEGINNING_OF_LINE, ctrl('A'));
bind(emacs, BACKWARD_CHAR, ctrl('B'));
@@ -5372,6 +5569,7 @@
bind(emacs, CLEAR_SCREEN, ctrl('L'));
bind(emacs, ACCEPT_LINE, ctrl('M'));
bind(emacs, DOWN_LINE_OR_HISTORY, ctrl('N'));
+ bind(emacs, ACCEPT_LINE_AND_DOWN_HISTORY, ctrl('O'));
bind(emacs, UP_LINE_OR_HISTORY, ctrl('P'));
bind(emacs, HISTORY_INCREMENTAL_SEARCH_BACKWARD, ctrl('R'));
bind(emacs, HISTORY_INCREMENTAL_SEARCH_FORWARD, ctrl('S'));
@@ -5415,6 +5613,7 @@
bind(emacs, END_OF_HISTORY, alt('>'));
bind(emacs, LIST_CHOICES, alt('?'));
bind(emacs, DO_LOWERCASE_VERSION, range("^[A-^[Z"));
+ bind(emacs, ACCEPT_AND_HOLD, alt('a'));
bind(emacs, BACKWARD_WORD, alt('b'));
bind(emacs, CAPITALIZE_WORD, alt('c'));
bind(emacs, KILL_WORD, alt('d'));
@@ -5439,6 +5638,7 @@
public KeyMap<Binding> viInsertion() {
KeyMap<Binding> viins = new KeyMap<>();
+ bindKeys(viins);
bind(viins, SELF_INSERT, range("^@-^_"));
bind(viins, LIST_CHOICES, ctrl('D'));
bind(viins, SEND_BREAK, ctrl('G'));
@@ -5638,6 +5838,14 @@
return KeyMap.key(terminal, capability);
}
+ private void bindKeys(KeyMap<Binding> emacs) {
+ Widget beep = namedWidget("beep", this::beep);
+ Stream.of(Capability.values())
+ .filter(c -> c.name().startsWith("key_"))
+ .map(this::key)
+ .forEach(k -> bind(emacs, beep, k));
+ }
+
private void bindArrowKeys(KeyMap<Binding> map) {
bind(map, UP_LINE_OR_SEARCH, key(Capability.key_up));
bind(map, DOWN_LINE_OR_SEARCH, key(Capability.key_down));
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/ReaderUtils.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/ReaderUtils.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/SimpleMaskingCallback.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/SimpleMaskingCallback.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/UndoTree.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/UndoTree.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/AggregateCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/AggregateCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/ArgumentCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/ArgumentCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/EnumCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/EnumCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/FileNameCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/FileNameCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/NullCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/NullCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/StringsCompleter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/StringsCompleter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.completer;
@@ -43,6 +43,11 @@
}
}
+ public StringsCompleter(Candidate ... candidates) {
+ assert candidates != null;
+ this.candidates.addAll(Arrays.asList(candidates));
+ }
+
public void complete(LineReader reader, final ParsedLine commandLine, final List<Candidate> candidates) {
assert commandLine != null;
assert candidates != null;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/completer/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
/**
* JLine 3.
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/history/DefaultHistory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/history/DefaultHistory.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,12 +4,13 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.reader.impl.history;
import java.io.*;
import java.nio.file.*;
+import java.time.DateTimeException;
import java.time.Instant;
import java.util.*;
@@ -36,8 +37,7 @@
private LineReader reader;
- private int lastLoaded = 0;
- private int nbEntriesInFile = 0;
+ private Map<String, HistoryFileData> historyFiles = new HashMap<>();
private int offset = 0;
private int index = 0;
@@ -68,7 +68,7 @@
try {
load();
}
- catch (IOException e) {
+ catch (IllegalArgumentException | IOException e) {
Log.warn("Failed to load history", e);
}
}
@@ -84,12 +84,11 @@
try (BufferedReader reader = Files.newBufferedReader(path)) {
internalClear();
reader.lines().forEach(line -> addHistoryLine(path, line));
- lastLoaded = items.size();
- nbEntriesInFile = lastLoaded;
+ setHistoryFileData(path, new HistoryFileData(items.size(), items.size()));
maybeResize();
}
}
- } catch (IOException e) {
+ } catch (IllegalArgumentException | IOException e) {
Log.debug("Failed to load history; clearing", e);
internalClear();
throw e;
@@ -97,20 +96,100 @@
}
}
+ @Override
+ public void read(Path file, boolean incremental) throws IOException {
+ Path path = file != null ? file : getPath();
+ if (path != null) {
+ try {
+ if (Files.exists(path)) {
+ Log.trace("Reading history from: ", path);
+ try (BufferedReader reader = Files.newBufferedReader(path)) {
+ reader.lines().forEach(line -> addHistoryLine(path, line, incremental));
+ setHistoryFileData(path, new HistoryFileData(items.size(), items.size()));
+ maybeResize();
+ }
+ }
+ } catch (IllegalArgumentException | IOException e) {
+ Log.debug("Failed to read history; clearing", e);
+ internalClear();
+ throw e;
+ }
+ }
+ }
+
+ private String doHistoryFileDataKey (Path path){
+ return path != null ? path.toAbsolutePath().toString() : null;
+ }
+
+ private HistoryFileData getHistoryFileData(Path path) {
+ String key = doHistoryFileDataKey(path);
+ if (!historyFiles.containsKey(key)){
+ historyFiles.put(key, new HistoryFileData());
+ }
+ return historyFiles.get(key);
+ }
+
+ private void setHistoryFileData(Path path, HistoryFileData historyFileData) {
+ historyFiles.put(doHistoryFileDataKey(path), historyFileData);
+ }
+
+ private boolean isLineReaderHistory (Path path) throws IOException {
+ Path lrp = getPath();
+ if (lrp == null) {
+ if (path != null) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return Files.isSameFile(lrp, path);
+ }
+
+ private void setLastLoaded(Path path, int lastloaded){
+ getHistoryFileData(path).setLastLoaded(lastloaded);
+ }
+
+ private void setEntriesInFile(Path path, int entriesInFile){
+ getHistoryFileData(path).setEntriesInFile(entriesInFile);
+ }
+
+ private void incEntriesInFile(Path path, int amount){
+ getHistoryFileData(path).incEntriesInFile(amount);
+ }
+
+ private int getLastLoaded(Path path){
+ return getHistoryFileData(path).getLastLoaded();
+ }
+
+ private int getEntriesInFile(Path path){
+ return getHistoryFileData(path).getEntriesInFile();
+ }
+
protected void addHistoryLine(Path path, String line) {
+ addHistoryLine(path, line, false);
+ }
+
+ protected void addHistoryLine(Path path, String line, boolean checkDuplicates) {
if (reader.isSet(LineReader.Option.HISTORY_TIMESTAMPED)) {
int idx = line.indexOf(':');
+ final String badHistoryFileSyntax = "Bad history file syntax! " +
+ "The history file `" + path + "` may be an older history: " +
+ "please remove it or use a different history file.";
if (idx < 0) {
- throw new IllegalArgumentException("Bad history file syntax! " +
- "The history file `" + path + "` may be an older history: " +
- "please remove it or use a different history file.");
+ throw new IllegalArgumentException(badHistoryFileSyntax);
}
- Instant time = Instant.ofEpochMilli(Long.parseLong(line.substring(0, idx)));
+ Instant time;
+ try {
+ time = Instant.ofEpochMilli(Long.parseLong(line.substring(0, idx)));
+ } catch (DateTimeException | NumberFormatException e) {
+ throw new IllegalArgumentException(badHistoryFileSyntax);
+ }
+
String unescaped = unescape(line.substring(idx + 1));
- internalAdd(time, unescaped);
+ internalAdd(time, unescaped, checkDuplicates);
}
else {
- internalAdd(Instant.now(), unescape(line));
+ internalAdd(Instant.now(), unescape(line), checkDuplicates);
}
}
@@ -125,28 +204,45 @@
}
@Override
+ public void write(Path file, boolean incremental) throws IOException {
+ Path path = file != null ? file : getPath();
+ if (path != null && Files.exists(path)) {
+ path.toFile().delete();
+ }
+ internalWrite(path, incremental ? getLastLoaded(path) : 0);
+ }
+
+ @Override
+ public void append(Path file, boolean incremental) throws IOException {
+ internalWrite(file != null ? file : getPath(),
+ incremental ? getLastLoaded(file) : 0);
+ }
+
+ @Override
public void save() throws IOException {
- Path path = getPath();
+ internalWrite(getPath(), getLastLoaded(getPath()));
+ }
+
+ private void internalWrite(Path path, int from) throws IOException {
if (path != null) {
Log.trace("Saving history to: ", path);
Files.createDirectories(path.toAbsolutePath().getParent());
// Append new items to the history file
try (BufferedWriter writer = Files.newBufferedWriter(path.toAbsolutePath(),
StandardOpenOption.WRITE, StandardOpenOption.APPEND, StandardOpenOption.CREATE)) {
- for (Entry entry : items.subList(lastLoaded, items.size())) {
+ for (Entry entry : items.subList(from, items.size())) {
if (isPersistable(entry)) {
writer.append(format(entry));
}
}
}
- nbEntriesInFile += items.size() - lastLoaded;
- // If we are over 25% max size, trim history file
+ incEntriesInFile(path, items.size() - from);
int max = getInt(reader, LineReader.HISTORY_FILE_SIZE, DEFAULT_HISTORY_FILE_SIZE);
- if (nbEntriesInFile > max + max / 4) {
+ if (getEntriesInFile(path) > max + max / 4) {
trimHistory(path, max);
}
}
- lastLoaded = items.size();
+ setLastLoaded(path, items.size());
}
protected void trimHistory(Path path, int max) throws IOException {
@@ -172,11 +268,14 @@
}
Files.move(temp, path, StandardCopyOption.REPLACE_EXISTING);
// Keep items in memory
- internalClear();
- offset = allItems.get(0).index();
- items.addAll(allItems);
- lastLoaded = items.size();
- nbEntriesInFile = items.size();
+ if (isLineReaderHistory(path)) {
+ internalClear();
+ offset = allItems.get(0).index();
+ items.addAll(allItems);
+ setHistoryFileData(path, new HistoryFileData(items.size(), items.size()));
+ } else {
+ setEntriesInFile(path, allItems.size());
+ }
maybeResize();
}
@@ -194,8 +293,7 @@
private void internalClear() {
offset = 0;
index = 0;
- lastLoaded = 0;
- nbEntriesInFile = 0;
+ historyFiles = new HashMap<>();
items.clear();
}
@@ -302,7 +400,18 @@
}
protected void internalAdd(Instant time, String line) {
+ internalAdd(time, line, false);
+ }
+
+ protected void internalAdd(Instant time, String line, boolean checkDuplicates) {
Entry entry = new EntryImpl(offset + items.size(), time, line);
+ if (checkDuplicates) {
+ for (Entry e: items) {
+ if (e.line().trim().equals(line.trim())) {
+ return;
+ }
+ }
+ }
items.add(entry);
maybeResize();
}
@@ -310,7 +419,9 @@
private void maybeResize() {
while (size() > getInt(reader, LineReader.HISTORY_SIZE, DEFAULT_HISTORY_SIZE)) {
items.removeFirst();
- lastLoaded--;
+ for (HistoryFileData hfd: historyFiles.values()) {
+ hfd.decLastLoaded();
+ }
offset++;
}
index = size();
@@ -503,5 +614,46 @@
return sb.toString();
}
+ private class HistoryFileData {
+ private int lastLoaded = 0;
+ private int entriesInFile = 0;
+
+ public HistoryFileData() {
+ }
+
+ public HistoryFileData(int lastLoaded, int entriesInFile) {
+ this.lastLoaded = lastLoaded;
+ this.entriesInFile = entriesInFile;
+ }
+
+ public int getLastLoaded() {
+ return lastLoaded;
+ }
+
+ public void setLastLoaded(int lastLoaded) {
+ this.lastLoaded = lastLoaded;
+ }
+
+ public void decLastLoaded() {
+ lastLoaded = lastLoaded - 1;
+ if (lastLoaded < 0) {
+ lastLoaded = 0;
+ }
+ }
+
+ public int getEntriesInFile() {
+ return entriesInFile;
+ }
+
+ public void setEntriesInFile(int entriesInFile) {
+ this.entriesInFile = entriesInFile;
+ }
+
+ public void incEntriesInFile(int amount) {
+ entriesInFile = entriesInFile + amount;
+ }
+
+ }
+
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/history/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/history/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
/**
* JLine 3.
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
/**
* JLine 3.
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Attributes.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Attributes.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Cursor.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Cursor.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/MouseEvent.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/MouseEvent.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Size.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Size.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Terminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/Terminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
@@ -111,7 +111,7 @@
*
* @return The output stream
*
- * @see #writer();
+ * @see #writer()
*/
OutputStream output();
@@ -183,6 +183,11 @@
void setAttributes(Attributes attr);
+ /**
+ * Retrieve the size of the visible window
+ * @return the visible terminal size
+ * @see #getBufferSize()
+ */
Size getSize();
void setSize(Size size);
@@ -195,6 +200,22 @@
return getSize().getRows();
}
+ /**
+ * Retrieve the size of the window buffer.
+ * Some terminals can be configured to have a buffer size
+ * larger than the visible window size and provide scroll bars.
+ * In such cases, this method should attempt to return the size
+ * of the whole buffer. The <code>getBufferSize()</code> method
+ * can be used to avoid wrapping when using the terminal in a line
+ * editing mode, while the {@link #getSize()} method should be
+ * used when using full screen mode.
+ * @return the terminal buffer size
+ * @see #getSize()
+ */
+ default Size getBufferSize() {
+ return getSize();
+ }
+
void flush();
//
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/TerminalBuilder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/TerminalBuilder.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2018, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal;
@@ -33,9 +33,6 @@
import jdk.internal.org.jline.utils.Log;
import jdk.internal.org.jline.utils.OSUtils;
-import static jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.TYPE_WINDOWS;
-import static jdk.internal.org.jline.terminal.impl.AbstractWindowsTerminal.TYPE_WINDOWS_256_COLOR;
-
/**
* Builder class to create terminals.
*/
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractPosixTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractPosixTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractPty.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractPty.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2002-2019, the original author or authors.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the documentation provided with this software.
+ *
+ * https://opensource.org/licenses/BSD-3-Clause
+ */
package jdk.internal.org.jline.terminal.impl;
import jdk.internal.org.jline.terminal.Attributes;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractWindowsConsoleWriter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractWindowsConsoleWriter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractWindowsTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/AbstractWindowsTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2018, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
@@ -21,12 +21,10 @@
import jdk.internal.org.jline.utils.Signals;
import jdk.internal.org.jline.utils.WriterOutputStream;
-import java.io.IOError;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
-import java.io.StringWriter;
import java.io.Writer;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
@@ -50,6 +48,7 @@
public static final String TYPE_WINDOWS = "windows";
public static final String TYPE_WINDOWS_256_COLOR = "windows-256color";
+ public static final String TYPE_WINDOWS_CONEMU = "windows-conemu";
public static final String TYPE_WINDOWS_VTP = "windows-vtp";
public static final int ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
@@ -110,7 +109,7 @@
closer = this::close;
ShutdownHooks.add(closer);
// ConEMU extended fonts support
- if (TYPE_WINDOWS_256_COLOR.equals(getType())
+ if (TYPE_WINDOWS_CONEMU.equals(getType())
&& !Boolean.getBoolean("org.jline.terminal.conemu.disable-activate")) {
writer.write("\u001b[9999E");
writer.flush();
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/CursorSupport.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/CursorSupport.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/DumbTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/DumbTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExecPty.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2019, the original author or authors.
+ * Copyright (c) 2002-2016, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
@@ -137,15 +137,12 @@
}
String undef = System.getProperty("os.name").toLowerCase().startsWith("hp") ? "^-" : "undef";
for (ControlChar cchar : ControlChar.values()) {
- if (attr.getControlChar(cchar) != current.getControlChar(cchar)) {
+ int v = attr.getControlChar(cchar);
+ if (v >= 0 && v != current.getControlChar(cchar)) {
String str = "";
- int v = attr.getControlChar(cchar);
- if (v == -1) { // Skip if ControlChar is <UNDEF>
- continue;
- }
commands.add(cchar.name().toLowerCase().substring(1));
if (cchar == ControlChar.VMIN || cchar == ControlChar.VTIME) {
- commands.add(Integer.toBinaryString(v));
+ commands.add(Integer.toString(v));
}
else if (v == 0) {
commands.add(undef);
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExternalTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/ExternalTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/LineDisciplineTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/LineDisciplineTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/MouseSupport.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/MouseSupport.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/NativeSignalHandler.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/NativeSignalHandler.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/PosixPtyTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/PosixPtyTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/PosixSysTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/PosixSysTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
/**
* JLine 3.
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JansiSupport.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JansiSupport.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2002-2019, the original author or authors.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the documentation provided with this software.
+ *
+ * https://opensource.org/licenses/BSD-3-Clause
+ */
package jdk.internal.org.jline.terminal.spi;
import jdk.internal.org.jline.terminal.Attributes;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JnaSupport.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/JnaSupport.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2002-2019, the original author or authors.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the documentation provided with this software.
+ *
+ * https://opensource.org/licenses/BSD-3-Clause
+ */
package jdk.internal.org.jline.terminal.spi;
import jdk.internal.org.jline.terminal.Attributes;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/Pty.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/spi/Pty.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.spi;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedCharSequence.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedCharSequence.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2016, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
@@ -38,6 +38,14 @@
// cache the value here as we can't afford to get it each time
static final boolean DISABLE_ALTERNATE_CHARSET = Boolean.getBoolean(PROP_DISABLE_ALTERNATE_CHARSET);
+ public void print(Terminal terminal) {
+ terminal.writer().print(toAnsi(terminal));
+ }
+
+ public void println(Terminal terminal) {
+ terminal.writer().println(toAnsi(terminal));
+ }
+
public String toAnsi() {
return toAnsi(null);
}
@@ -54,7 +62,8 @@
if (max_colors != null) {
colors = max_colors;
}
- force256colors = AbstractWindowsTerminal.TYPE_WINDOWS_256_COLOR.equals(terminal.getType());
+ force256colors = AbstractWindowsTerminal.TYPE_WINDOWS_256_COLOR.equals(terminal.getType())
+ || AbstractWindowsTerminal.TYPE_WINDOWS_CONEMU.equals(terminal.getType());
if (!DISABLE_ALTERNATE_CHARSET) {
alternateIn = Curses.tputs(terminal.getStringCapability(Capability.enter_alt_charset_mode));
alternateOut = Curses.tputs(terminal.getStringCapability(Capability.exit_alt_charset_mode));
@@ -293,7 +302,7 @@
if (col + w > start) {
break;
}
- begin++;
+ begin += Character.charCount(cp);
col += w;
}
int end = begin;
@@ -305,7 +314,7 @@
if (col + w > stop) {
break;
}
- end++;
+ end += Character.charCount(cp);
col += w;
}
return subSequence(begin, end);
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedString.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedString.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,12 +4,13 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
import java.security.InvalidParameterException;
import java.util.Arrays;
+import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -98,6 +99,10 @@
}
public static AttributedString fromAnsi(String ansi, int tabs) {
+ return fromAnsi(ansi, Arrays.asList(tabs));
+ }
+
+ public static AttributedString fromAnsi(String ansi, List<Integer> tabs) {
if (ansi == null) {
return null;
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStringBuilder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStringBuilder.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,11 +4,13 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.regex.Matcher;
@@ -24,7 +26,7 @@
private char[] buffer;
private int[] style;
private int length;
- private int tabs = 0;
+ private TabStops tabs = new TabStops(0);
private int lastLineLength = 0;
private AttributedStyle current = AttributedStyle.DEFAULT;
@@ -151,7 +153,7 @@
for (int i = start; i < end; i++) {
char c = str.charAt(i);
int s = str.styleCodeAt(i) & ~current.getMask() | current.getStyle();
- if (tabs > 0 && c == '\t') {
+ if (tabs.defined() && c == '\t') {
insertTab(new AttributedStyle(s, 0));
} else {
ensureCapacity(length + 1);
@@ -332,7 +334,7 @@
// This is not a SGR code, so ignore
ansiState = 0;
}
- } else if (c == '\t' && tabs > 0) {
+ } else if (c == '\t' && tabs.defined()) {
insertTab(current);
} else {
ensureCapacity(length + 1);
@@ -350,7 +352,7 @@
}
protected void insertTab(AttributedStyle s) {
- int nb = tabs - lastLineLength % tabs;
+ int nb = tabs.spaces(lastLineLength);
ensureCapacity(length + nb);
for (int i = 0; i < nb; i++) {
buffer[length] = ' ';
@@ -373,13 +375,17 @@
* @return this
*/
public AttributedStringBuilder tabs(int tabsize) {
+ if (tabsize < 0) {
+ throw new IllegalArgumentException("Tab size must be non negative");
+ }
+ return tabs(Arrays.asList(tabsize));
+ }
+
+ public AttributedStringBuilder tabs(List<Integer> tabs) {
if (length > 0) {
throw new IllegalStateException("Cannot change tab size after appending text");
}
- if (tabsize < 0) {
- throw new IllegalArgumentException("Tab size must be non negative");
- }
- this.tabs = tabsize;
+ this.tabs = new TabStops(tabs);
return this;
}
@@ -393,4 +399,60 @@
return this;
}
+ public AttributedStringBuilder styleMatches(Pattern pattern, List<AttributedStyle> styles) {
+ Matcher matcher = pattern.matcher(this);
+ while (matcher.find()) {
+ for (int group = 0; group < matcher.groupCount(); group++) {
+ AttributedStyle s = styles.get(group);
+ for (int i = matcher.start(group + 1); i < matcher.end(group + 1); i++) {
+ style[i] = (style[i] & ~s.getMask()) | s.getStyle();
+ }
+ }
+ }
+ return this;
+ }
+
+ private class TabStops {
+ private List<Integer> tabs = new ArrayList<>();
+ private int lastStop = 0;
+ private int lastSize = 0;
+
+ public TabStops(int tabs) {
+ this.lastSize = tabs;
+ }
+
+ public TabStops(List<Integer> tabs) {
+ this.tabs = tabs;
+ int p = 0;
+ for (int s: tabs) {
+ if (s <= p) {
+ continue;
+ }
+ lastStop = s;
+ lastSize = s - p;
+ p = s;
+ }
+ }
+
+ boolean defined() {
+ return lastSize > 0;
+ }
+
+ int spaces(int lastLineLength) {
+ int out = 0;
+ if (lastLineLength >= lastStop) {
+ out = lastSize - (lastLineLength - lastStop) % lastSize;
+ } else {
+ for (int s: tabs) {
+ if (s > lastLineLength) {
+ out = s - lastLineLength;
+ break;
+ }
+ }
+ }
+ return out;
+ }
+
+ }
+
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStyle.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/AttributedStyle.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ClosedException.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ClosedException.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Colors.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Colors.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Curses.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
@@ -74,8 +74,16 @@
switch (ch) {
case '\\':
ch = str.charAt(index++);
- if (ch >= '0' && ch <= '9') {
- throw new UnsupportedOperationException(); // todo
+ if (ch >= '0' && ch <= '7') {
+ int val = ch - '0';
+ for (int i = 0; i < 2; i++) {
+ ch = str.charAt(index++);
+ if (ch < '0' || ch > '7') {
+ throw new IllegalStateException();
+ }
+ val = val * 8 + (ch - '0');
+ }
+ out.append((char) val);
} else {
switch (ch) {
case 'e':
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/DiffHelper.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/DiffHelper.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Display.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Display.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
@@ -492,7 +492,7 @@
}
void rawPrint(AttributedString str) {
- terminal.writer().write(str.toAnsi(terminal));
+ str.print(terminal);
}
public int wcwidth(String str) {
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ExecHelper.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ExecHelper.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InfoCmp.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InfoCmp.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2016, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
@@ -578,6 +578,8 @@
int iVal;
if (val.startsWith("0x")) {
iVal = Integer.parseInt(val.substring(2), 16);
+ } else if (val.startsWith("0")) {
+ iVal = Integer.parseInt(val.substring(1), 8);
} else {
iVal = Integer.parseInt(val);
}
@@ -614,7 +616,7 @@
static {
for (String s : Arrays.asList("dumb", "ansi", "xterm", "xterm-256color",
- "windows", "windows-256color", "windows-vtp",
+ "windows", "windows-256color", "windows-conemu", "windows-vtp",
"screen", "screen-256color")) {
setDefaultInfoCmp(s, () -> loadDefaultInfoCmp(s));
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InputStreamReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InputStreamReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Levenshtein.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Levenshtein.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Log.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Log.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlocking.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlocking.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStream.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStream.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStreamImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingInputStreamImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpInputStream.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpInputStream.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingPumpReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingReaderImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/NonBlockingReaderImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/OSUtils.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/OSUtils.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/PumpReader.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/PumpReader.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ShutdownHooks.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/ShutdownHooks.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Signals.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Signals.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,10 +4,11 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
+import java.lang.reflect.Constructor;
import java.lang.reflect.Proxy;
import java.util.Objects;
@@ -85,13 +86,16 @@
private static Object doRegister(String name, Object handler) throws Exception {
Log.trace(() -> "Registering signal " + name + " with handler " + toString(handler));
- if ("QUIT".equals(name) || "INFO".equals(name) && "9".equals(System.getProperty("java.specification.version"))) {
+ Class<?> signalClass = Class.forName("sun.misc.Signal");
+ Constructor<?> constructor = signalClass.getConstructor(String.class);
+ Object signal;
+ try {
+ signal = constructor.newInstance(name);
+ } catch (IllegalArgumentException e) {
Log.trace(() -> "Ignoring unsupported signal " + name);
return null;
}
- Class<?> signalClass = Class.forName("sun.misc.Signal");
Class<?> signalHandlerClass = Class.forName("sun.misc.SignalHandler");
- Object signal = signalClass.getConstructor(String.class).newInstance(name);
return signalClass.getMethod("handle", signalClass, signalHandlerClass)
.invoke(null, signal, handler);
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Status.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/Status.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
@@ -24,9 +24,11 @@
protected final AbstractTerminal terminal;
protected final boolean supported;
protected List<AttributedString> oldLines = Collections.emptyList();
+ protected List<AttributedString> linesToRestore = Collections.emptyList();
protected int rows;
protected int columns;
protected boolean force;
+ protected boolean suspended = false;
public static Status getStatus(Terminal terminal) {
return getStatus(terminal, true);
@@ -61,15 +63,34 @@
this.force = true;
}
+ public void hardReset() {
+ if (suspended) {
+ return;
+ }
+ List<AttributedString> lines = new ArrayList<>(oldLines);
+ update(null);
+ update(lines);
+ }
+
public void redraw() {
+ if (suspended) {
+ return;
+ }
update(oldLines);
}
public void update(List<AttributedString> lines) {
+ if (!supported) {
+ return;
+ }
if (lines == null) {
lines = Collections.emptyList();
}
- if (!supported || (oldLines.equals(lines) && !force)) {
+ if (suspended) {
+ linesToRestore = new ArrayList<>(lines);
+ return;
+ }
+ if (oldLines.equals(lines) && !force) {
return;
}
int nb = lines.size() - oldLines.size();
@@ -82,10 +103,11 @@
}
}
terminal.puts(Capability.save_cursor);
+ terminal.puts(Capability.cursor_address, rows - lines.size(), 0);
terminal.puts(Capability.clr_eos);
for (int i = 0; i < lines.size(); i++) {
terminal.puts(Capability.cursor_address, rows - lines.size() + i, 0);
- terminal.writer().write(lines.get(i).columnSubSequence(0, columns).toAnsi(terminal));
+ lines.get(i).columnSubSequence(0, columns).print(terminal);
}
terminal.puts(Capability.change_scroll_region, 0, rows - 1 - lines.size());
terminal.puts(Capability.restore_cursor);
@@ -93,4 +115,27 @@
oldLines = new ArrayList<>(lines);
force = false;
}
+
+ public void suspend() {
+ if (suspended) {
+ return;
+ }
+ linesToRestore = new ArrayList<>(oldLines);
+ update(null);
+ suspended = true;
+ }
+
+ public void restore() {
+ if (!suspended) {
+ return;
+ }
+ suspended = false;
+ update(linesToRestore);
+ linesToRestore = Collections.emptyList();
+ }
+
+ public int size() {
+ return oldLines.size();
+ }
+
}
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/StyleResolver.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/StyleResolver.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/WCWidth.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/WCWidth.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/WriterOutputStream.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/WriterOutputStream.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.utils;
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/capabilities.txt Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/capabilities.txt Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
# This software is distributable under the BSD license. See the terms of the
# BSD license in the documentation provided with this software.
#
-# http://www.opensource.org/licenses/bsd-license.php
+# https://opensource.org/licenses/BSD-3-Clause
#
auto_left_margin, bw, bw
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/colors.txt Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/colors.txt Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
# This software is distributable under the BSD license. See the terms of the
# BSD license in the documentation provided with this software.
#
-# http://www.opensource.org/licenses/bsd-license.php
+# https://opensource.org/licenses/BSD-3-Clause
#
black
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/dumb-colors.caps Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,4 @@
+dumb-color|80-column dumb tty with 256 coors,
+ am,
+ colors#256, cols#80,
+ bel=^G, cr=^M, cud1=^J, ind=^J,
--- a/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
/**
* JLine 3.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/windows-conemu.caps Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,27 @@
+windows-conemu|conemu windows terminal,
+ am, mc5i, mir, msgr,
+ colors#256, cols#80, it#8, lines#24, ncv#3, pairs#64,
+ bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J,
+ cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B,
+ cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+ cuu=\E[%p1%dA, cuu1=\E[A,
+ il=\E[%p1%dL, il1=\E[L,
+ dl=\E[%p1%dM, dl1=\E[M,
+ ech=\E[%p1%dX,
+ el=\E[K, ed=\E[2K,
+ el1=\E[1K, home=\E[H, hpa=\E[%i%p1%dG,
+ ind=^J,
+ invis=\E[8m, kbs=^H, kcbt=\E[Z,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+ khome=\E[H,
+ op=\E[39;49m,
+ rev=\E[7m,
+ rmacs=\E[10m, rmpch=\E[10m, rmso=\E[m, rmul=\E[m,
+ setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
+ sgr0=\E[0;10m,
+ smso=\E[7m,
+ smul=\E[4m,
+ kdch1=\E[3~, kich1=\E[2~, kend=\E[4~, knp=\E[6~, kpp=\E[5~,
+ kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~,
+ kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
--- a/src/jdk.internal.le/share/legal/jline.md Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/share/legal/jline.md Thu Nov 07 18:44:09 2019 +0000
@@ -1,4 +1,4 @@
-## JLine v3.9.0
+## JLine v3.12.1
### JLine License
<pre>
--- a/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/JnaSupportImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/JnaSupportImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,3 +1,11 @@
+/*
+ * Copyright (c) 2002-2018, the original author or authors.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the documentation provided with this software.
+ *
+ * https://opensource.org/licenses/BSD-3-Clause
+ */
package jdk.internal.org.jline.terminal.impl.jna;
import jdk.internal.org.jline.terminal.Attributes;
--- a/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/JnaWinConsoleWriter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/JnaWinConsoleWriter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl.jna.win;
--- a/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/JnaWinSysTerminal.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/JnaWinSysTerminal.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,10 +1,10 @@
/*
- * Copyright (c) 2002-2018, the original author or authors.
+ * Copyright (c) 2002-2019, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl.jna.win;
@@ -36,7 +36,7 @@
Writer writer;
if (ansiPassThrough) {
if (type == null) {
- type = OSUtils.IS_CONEMU ? TYPE_WINDOWS_256_COLOR : TYPE_WINDOWS;
+ type = OSUtils.IS_CONEMU ? TYPE_WINDOWS_CONEMU : TYPE_WINDOWS;
}
writer = new JnaWinConsoleWriter(consoleOut);
} else {
@@ -51,7 +51,7 @@
} catch (LastErrorException e) {
if (OSUtils.IS_CONEMU) {
if (type == null) {
- type = TYPE_WINDOWS_256_COLOR;
+ type = TYPE_WINDOWS_CONEMU;
}
writer = new JnaWinConsoleWriter(consoleOut);
} else {
@@ -95,6 +95,12 @@
public Size getSize() {
Kernel32.CONSOLE_SCREEN_BUFFER_INFO info = new Kernel32.CONSOLE_SCREEN_BUFFER_INFO();
Kernel32.INSTANCE.GetConsoleScreenBufferInfo(consoleOut, info);
+ return new Size(info.windowWidth(), info.windowHeight());
+ }
+
+ public Size getBufferSize() {
+ Kernel32.CONSOLE_SCREEN_BUFFER_INFO info = new Kernel32.CONSOLE_SCREEN_BUFFER_INFO();
+ Kernel32.INSTANCE.GetConsoleScreenBufferInfo(consoleOut, info);
return new Size(info.dwSize.X, info.dwSize.Y);
}
--- a/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/Kernel32.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/Kernel32.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl.jna.win;
@@ -26,7 +26,7 @@
interface Kernel32 {//extends StdCallLibrary {
Kernel32 INSTANCE = new Kernel32Impl();
-// Kernel32 INSTANCE = (Kernel32) Native.loadLibrary("kernel32", Kernel32.class, W32APIOptions.UNICODE_OPTIONS);
+// Kernel32 INSTANCE = Native.load("kernel32", Kernel32.class, W32APIOptions.UNICODE_OPTIONS);
// Pointer INVALID_HANDLE_VALUE = Pointer.createConstant(-1L);
--- a/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.le/windows/classes/jdk/internal/org/jline/terminal/impl/jna/win/WindowsAnsiWriter.java Thu Nov 07 18:44:09 2019 +0000
@@ -4,7 +4,7 @@
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
- * http://www.opensource.org/licenses/bsd-license.php
+ * https://opensource.org/licenses/BSD-3-Clause
*/
package jdk.internal.org.jline.terminal.impl.jna.win;
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/EconomicMap.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/EconomicMap.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/EconomicSet.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/EconomicSet.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/Equivalence.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/Equivalence.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/MapCursor.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/MapCursor.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/Pair.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/Pair.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableEconomicMap.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableEconomicMap.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableEconomicSet.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableEconomicSet.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableMapCursor.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/UnmodifiableMapCursor.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.collections/src/jdk/internal/vm/compiler/collections/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/ComparableWord.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/ComparableWord.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/LocationIdentity.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/LocationIdentity.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/Pointer.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/Pointer.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/PointerBase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/PointerBase.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/SignedWord.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/SignedWord.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/UnsignedWord.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/UnsignedWord.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/WordBase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/WordBase.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/WordFactory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/WordFactory.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/package-info.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/jdk.internal.vm.compiler.word/src/jdk/internal/vm/compiler/word/package-info.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitution.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,9 +35,7 @@
/**
* Denotes a method whose body is used by a compiler as the substitute (or intrinsification) of
* another method. The exact mechanism used to do the substitution is compiler dependent but every
- * compiler should require substitute methods to be annotated with {@link MethodSubstitution}. In
- * addition, a compiler is recommended to implement {@link MethodSubstitutionRegistry} to advertise
- * the mechanism by which it supports registration of method substitutes.
+ * compiler should require substitute methods to be annotated with {@link MethodSubstitution}.
*
* A compiler may support partial intrinsification where only a part of a method is implemented by
* the compiler. The unsupported path is expressed by a call to either the original or substitute
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.replacements/src/org/graalvm/compiler/api/replacements/MethodSubstitutionRegistry.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
- * 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.
- *
- * 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 org.graalvm.compiler.api.replacements;
-
-import java.lang.reflect.Type;
-
-/**
- * A registry for {@link MethodSubstitution}s.
- */
-public interface MethodSubstitutionRegistry {
-
- /**
- * Gets the type representing the receiver (i.e., {@code this}) argument in a non-static method.
- */
- Class<?> getReceiverType();
-
- /**
- * Registers a substitution method.
- *
- * @param substituteDeclaringClass the class declaring the substitute method
- * @param name the name of both the original and substitute method
- * @param argumentTypes the argument types of the method. Element 0 of this array must be
- * {@link #getReceiverType()} iff the method is non-static. Upon returning, element 0
- * will have been rewritten to {@code declaringClass}.
- */
- default void registerMethodSubstitution(Class<?> substituteDeclaringClass, String name, Type... argumentTypes) {
- registerMethodSubstitution(substituteDeclaringClass, name, name, argumentTypes);
- }
-
- /**
- * Registers a substitution method.
- *
- * @param substituteDeclaringClass the class declaring the substitute method
- * @param name the name of both the original method
- * @param substituteName the name of the substitute method
- * @param argumentTypes the argument types of the method. Element 0 of this array must be
- * {@link #getReceiverType()} iff the method is non-static. Upon returning, element 0
- * will have been rewritten to {@code declaringClass}.
- */
- void registerMethodSubstitution(Class<?> substituteDeclaringClass, String name, String substituteName, Type... argumentTypes);
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/ExportingClassLoader.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.api.test;
+
+/**
+ * A class loader that exports all packages in the module defining the class loader to all classes
+ * in the unnamed module associated with the loader.
+ */
+public class ExportingClassLoader extends ClassLoader {
+ public ExportingClassLoader() {
+ ModuleSupport.exportAllPackagesTo(getClass(), this);
+ }
+
+ public ExportingClassLoader(ClassLoader parent) {
+ super(parent);
+ ModuleSupport.exportAllPackagesTo(getClass(), this);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.test/src/org/graalvm/compiler/api/test/ModuleSupport.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.api.test;
+
+import java.io.IOException;
+import java.lang.module.ModuleDescriptor.Requires;
+import java.net.URI;
+import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.graalvm.compiler.debug.DebugOptions;
+
+import jdk.internal.module.Modules;
+
+public class ModuleSupport {
+
+ public static void exportPackageTo(Class<?> moduleMember, String packageName, Class<?> requestor) {
+ Module moduleToExport = moduleMember.getModule();
+ Module requestorModule = requestor.getModule();
+ if (moduleToExport != requestorModule) {
+ Modules.addExports(moduleToExport, packageName, requestorModule);
+ }
+ }
+
+ public static void exportAllPackagesTo(Class<?> moduleMember, Class<?> requestor) {
+ Module moduleToExport = moduleMember.getModule();
+ Module requestorModule = requestor.getModule();
+ if (moduleToExport != requestorModule) {
+ for (String packageName : moduleToExport.getPackages()) {
+ Modules.addExports(moduleToExport, packageName, requestorModule);
+ }
+ }
+ }
+
+ public static void exportAllPackagesTo(Class<?> moduleMember, ClassLoader cl) {
+ Module moduleToExport = moduleMember.getModule();
+ Module unnamedModule = cl.getUnnamedModule();
+ for (String packageName : moduleToExport.getPackages()) {
+ Modules.addExports(moduleToExport, packageName, unnamedModule);
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public static void exportAndOpenAllPackagesToUnnamed(String name) {
+ Module module = ModuleLayer.boot().findModule(name).orElseThrow();
+ Set<String> packages = module.getPackages();
+ for (String pkg : packages) {
+ Modules.addExportsToAllUnnamed(module, pkg);
+ Modules.addOpensToAllUnnamed(module, pkg);
+ }
+ }
+
+ public static List<String> getJRTGraalClassNames() throws IOException {
+ List<String> classNames = new ArrayList<>();
+ FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), Collections.emptyMap());
+ Module graalModule = DebugOptions.class.getModule();
+ Set<String> graalModuleSet = new HashSet<>();
+ graalModuleSet.add(graalModule.getName());
+ for (Module module : graalModule.getLayer().modules()) {
+ if (requires(module, graalModule)) {
+ graalModuleSet.add(module.getName());
+ }
+ }
+
+ Path top = fs.getPath("/modules/");
+ Files.find(top, Integer.MAX_VALUE,
+ (path, attrs) -> attrs.isRegularFile()).forEach(p -> {
+ int nameCount = p.getNameCount();
+ if (nameCount > 2) {
+ String base = p.getName(nameCount - 1).toString();
+ if (base.endsWith(".class") && !base.equals("module-info.class")) {
+ String module = p.getName(1).toString();
+ if (graalModuleSet.contains(module)) {
+ // Strip module prefix and convert to dotted
+ // form
+ String className = p.subpath(2, nameCount).toString().replace('/', '.');
+ // Strip ".class" suffix
+ className = className.replace('/', '.').substring(0, className.length() - ".class".length());
+ classNames.add(className);
+ }
+ }
+ }
+ });
+ return classNames;
+ }
+
+ private static boolean requires(Module module, Module graalModule) {
+ ModuleLayer graalLayer = graalModule.getLayer();
+ for (Requires r : module.getDescriptor().requires()) {
+ if (r.name().equals(graalModule.getName())) {
+ return true;
+ }
+ Module dep = graalLayer.findModule(r.name()).get();
+ if (requires(dep, graalModule)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java Thu Nov 07 18:44:09 2019 +0000
@@ -471,6 +471,7 @@
private static final int AddSubExtendedOp = 0x0B200000;
private static final int MulOp = 0x1B000000;
+ private static final int SignedMulLongOp = 0x9B200000;
private static final int DataProcessing1SourceOp = 0x5AC00000;
private static final int DataProcessing2SourceOp = 0x1AC00000;
@@ -2313,7 +2314,7 @@
}
/**
- * unsigned multiply high. dst = (src1 * src2)[127:64]
+ * Unsigned multiply high. dst = (src1 * src2)[127:64]
*
* @param dst general purpose register. May not be null or the stackpointer.
* @param src1 general purpose register. May not be null or the stackpointer.
@@ -2327,7 +2328,7 @@
}
/**
- * unsigned multiply add-long. xDst = xSrc3 + (wSrc1 * wSrc2)
+ * Unsigned multiply add-long. xDst = xSrc3 + (wSrc1 * wSrc2)
*
* @param dst general purpose register. May not be null or the stackpointer.
* @param src1 general purpose register. May not be null or the stackpointer.
@@ -2343,7 +2344,7 @@
}
/**
- * signed multiply add-long. xDst = xSrc3 + (wSrc1 * wSrc2)
+ * Signed multiply-add long. xDst = xSrc3 + (wSrc1 * wSrc2)
*
* @param dst general purpose register. May not be null or the stackpointer.
* @param src1 general purpose register. May not be null or the stackpointer.
@@ -2351,11 +2352,19 @@
* @param src3 general purpose register. May not be null or the stackpointer.
*/
public void smaddl(Register dst, Register src1, Register src2, Register src3) {
- assert !dst.equals(sp);
- assert !src1.equals(sp);
- assert !src2.equals(sp);
- assert !src3.equals(sp);
- emitInt(0b10011011001 << 21 | dst.encoding | rs1(src1) | rs2(src2) | rs3(src3));
+ smullInstruction(MADD, dst, src1, src2, src3);
+ }
+
+ /**
+ * Signed multiply-sub long. xDst = xSrc3 - (wSrc1 * wSrc2)
+ *
+ * @param dst general purpose register. May not be null or the stackpointer.
+ * @param src1 general purpose register. May not be null or the stackpointer.
+ * @param src2 general purpose register. May not be null or the stackpointer.
+ * @param src3 general purpose register. May not be null or the stackpointer.
+ */
+ public void smsubl(Register dst, Register src1, Register src2, Register src3) {
+ smullInstruction(MSUB, dst, src1, src2, src3);
}
private void mulInstruction(Instruction instr, Register dst, Register src1, Register src2, Register src3, InstructionType type) {
@@ -2366,6 +2375,14 @@
emitInt(type.encoding | instr.encoding | MulOp | rd(dst) | rs1(src1) | rs2(src2) | rs3(src3));
}
+ private void smullInstruction(Instruction instr, Register dst, Register src1, Register src2, Register src3) {
+ assert !dst.equals(sp);
+ assert !src1.equals(sp);
+ assert !src2.equals(sp);
+ assert !src3.equals(sp);
+ emitInt(instr.encoding | SignedMulLongOp | rd(dst) | rs1(src1) | rs2(src2) | rs3(src3));
+ }
+
/**
* Signed divide. dst = src1 / src2.
*
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64MacroAssembler.java Thu Nov 07 18:44:09 2019 +0000
@@ -817,7 +817,7 @@
}
/**
- * unsigned multiply high. dst = (src1 * src2) >> size
+ * Unsigned multiply high. dst = (src1 * src2) >> size
*
* @param size register size. Has to be 32 or 64.
* @param dst general purpose register. May not be null or the stackpointer.
@@ -838,7 +838,7 @@
}
/**
- * signed multiply high. dst = (src1 * src2) >> size
+ * Signed multiply high. dst = (src1 * src2) >> size
*
* @param size register size. Has to be 32 or 64.
* @param dst general purpose register. May not be null or the stackpointer.
@@ -859,6 +859,60 @@
}
/**
+ * Signed multiply long. xDst = wSrc1 * wSrc2
+ *
+ * @param size destination register size. Has to be 64.
+ * @param dst 64-bit general purpose register. May not be null or the stackpointer.
+ * @param src1 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src2 32-bit general purpose register. May not be null or the stackpointer.
+ */
+ public void smull(int size, Register dst, Register src1, Register src2) {
+ this.smaddl(size, dst, src1, src2, zr);
+ }
+
+ /**
+ * Signed multiply-negate long. xDst = -(wSrc1 * wSrc2)
+ *
+ * @param size destination register size. Has to be 64.
+ * @param dst 64-bit general purpose register. May not be null or the stackpointer.
+ * @param src1 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src2 32-bit general purpose register. May not be null or the stackpointer.
+ */
+ public void smnegl(int size, Register dst, Register src1, Register src2) {
+ this.smsubl(size, dst, src1, src2, zr);
+ }
+
+ /**
+ * Signed multiply-add long. xDst = xSrc3 + (wSrc1 * wSrc2)
+ *
+ * @param size destination register size. Has to be 64.
+ * @param dst 64-bit general purpose register. May not be null or the stackpointer.
+ * @param src1 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src2 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src3 64-bit general purpose register. May not be null or the stackpointer.
+ */
+ public void smaddl(int size, Register dst, Register src1, Register src2, Register src3) {
+ assert (!dst.equals(sp) && !src1.equals(sp) && !src2.equals(sp) && !src3.equals(sp));
+ assert size == 64;
+ super.smaddl(dst, src1, src2, src3);
+ }
+
+ /**
+ * Signed multiply-sub long. xDst = xSrc3 - (wSrc1 * wSrc2)
+ *
+ * @param size destination register size. Has to be 64.
+ * @param dst 64-bit general purpose register. May not be null or the stackpointer.
+ * @param src1 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src2 32-bit general purpose register. May not be null or the stackpointer.
+ * @param src3 64-bit general purpose register. May not be null or the stackpointer.
+ */
+ public void smsubl(int size, Register dst, Register src1, Register src2, Register src3) {
+ assert (!dst.equals(sp) && !src1.equals(sp) && !src2.equals(sp) && !src3.equals(sp));
+ assert size == 64;
+ super.smsubl(dst, src1, src2, src3);
+ }
+
+ /**
* dst = src1 % src2. Signed.
*
* @param size register size. Has to be 32 or 64.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64.test/src/org/graalvm/compiler/core/aarch64/test/AArch64MultiplyLongTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, Arm Limited. All rights reserved.
+ * 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 org.graalvm.compiler.core.aarch64.test;
+
+import org.junit.Test;
+
+public class AArch64MultiplyLongTest extends AArch64MatchRuleTest {
+
+ public long signedMulLong(int a, int b) {
+ return a * (long) b;
+ }
+
+ public long signedMulLongFromShort(short a, short b) {
+ return (long) a * b;
+ }
+
+ public long signedMulLongFromChar(char a, char b) {
+ return a * (long) b;
+ }
+
+ public long signedMulLongFromByte(byte a, byte b) {
+ return (long) a * b;
+ }
+
+ @Test
+ public void testSignedMulLong() {
+ test("signedMulLong", 0x12345678, 0x87654321);
+ checkLIR("signedMulLong", op -> op.name().equals("SMULL"), 1);
+ test("signedMulLongFromShort", (short) 32767, (short) -32768);
+ checkLIR("signedMulLongFromShort", op -> op.name().equals("SMULL"), 1);
+ test("signedMulLongFromChar", (char) 59999, (char) 65535);
+ checkLIR("signedMulLongFromChar", op -> op.name().equals("SMULL"), 1);
+ test("signedMulLongFromByte", (byte) 10, (byte) -256);
+ checkLIR("signedMulLongFromByte", op -> op.name().equals("SMULL"), 1);
+ }
+
+ public long signedMNegLong1(int a, int b) {
+ return -(a * (long) b);
+ }
+
+ public long signedMNegLong2(int a, int b) {
+ return a * (-(long) b);
+ }
+
+ @Test
+ public void testSignedMNegLong() {
+ test("signedMNegLong1", 0x89abcdef, 0xfedcba98);
+ checkLIR("signedMNegLong1", op -> op.name().equals("SMNEGL"), 1);
+ test("signedMNegLong2", 0x89abcdef, 0xfedcba98);
+ checkLIR("signedMNegLong2", op -> op.name().equals("SMNEGL"), 1);
+ }
+
+ public long signedMAddLong1(int a, int b, long c) {
+ return c + a * (long) b;
+ }
+
+ public long signedMAddLong2(int a, int b, long c) {
+ return a * (long) b + c;
+ }
+
+ @Test
+ public void testSignedMAddLong() {
+ test("signedMAddLong1", 0x22228888, 0xaaaacccc, 0x123456789abcdL);
+ checkLIR("signedMAddLong1", op -> op.name().equals("SMADDL"), 1);
+ test("signedMAddLong2", 0x22228888, 0xaaaacccc, 0x123456789abcdL);
+ checkLIR("signedMAddLong2", op -> op.name().equals("SMADDL"), 1);
+ }
+
+ public long signedMSubLong(int a, int b, long c) {
+ return c - a * (long) b;
+ }
+
+ @Test
+ public void testSignedMSubLong() {
+ test("signedMSubLong", 0x99995555, 0xeeeebbbb, 0x3456789abcdefL);
+ checkLIR("signedMSubLong", op -> op.name().equals("SMSUBL"), 1);
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64ArithmeticLIRGenerator.java Thu Nov 07 18:44:09 2019 +0000
@@ -220,23 +220,34 @@
return result;
}
- public Value emitMAdd(Value a, Value b, Value c) {
- return emitMultiplyAddSub(AArch64ArithmeticOp.ADD, a, b, c);
+ Value emitIntegerMAdd(Value a, Value b, Value c, boolean isI2L) {
+ return emitMultiplyAddSub(isI2L ? AArch64ArithmeticOp.SMADDL : AArch64ArithmeticOp.MADD, a, b, c);
}
- public Value emitMSub(Value a, Value b, Value c) {
- return emitMultiplyAddSub(AArch64ArithmeticOp.SUB, a, b, c);
+ Value emitIntegerMSub(Value a, Value b, Value c, boolean isI2L) {
+ return emitMultiplyAddSub(isI2L ? AArch64ArithmeticOp.SMSUBL : AArch64ArithmeticOp.MSUB, a, b, c);
}
private Value emitMultiplyAddSub(AArch64ArithmeticOp op, Value a, Value b, Value c) {
- assert a.getPlatformKind() == b.getPlatformKind() && b.getPlatformKind() == c.getPlatformKind();
- if (op == AArch64ArithmeticOp.ADD || op == AArch64ArithmeticOp.SUB) {
- assert isNumericInteger(a.getPlatformKind());
- } else if (op == AArch64ArithmeticOp.FADD) {
- assert a.getPlatformKind() == AArch64Kind.SINGLE || a.getPlatformKind() == AArch64Kind.DOUBLE;
+ assert a.getPlatformKind() == b.getPlatformKind();
+ Variable result;
+ if (op == AArch64ArithmeticOp.SMADDL || op == AArch64ArithmeticOp.SMSUBL) {
+ // For signed multiply int and then add/sub long.
+ assert a.getPlatformKind() != c.getPlatformKind();
+ result = getLIRGen().newVariable(LIRKind.combine(c));
+ } else {
+ assert a.getPlatformKind() == c.getPlatformKind();
+ if (op == AArch64ArithmeticOp.FADD) {
+ // For floating-point Math.fma intrinsic.
+ assert a.getPlatformKind() == AArch64Kind.SINGLE || a.getPlatformKind() == AArch64Kind.DOUBLE;
+ } else {
+ // For int/long multiply add or sub.
+ assert op == AArch64ArithmeticOp.MADD || op == AArch64ArithmeticOp.MSUB;
+ assert isNumericInteger(a.getPlatformKind());
+ }
+ result = getLIRGen().newVariable(LIRKind.combine(a, b, c));
}
- Variable result = getLIRGen().newVariable(LIRKind.combine(a, b, c));
AllocatableValue x = moveSp(asAllocatable(a));
AllocatableValue y = moveSp(asAllocatable(b));
AllocatableValue z = moveSp(asAllocatable(c));
@@ -451,7 +462,7 @@
@Override
public Value emitFusedMultiplyAdd(Value a, Value b, Value c) {
- return emitMultiplyAddSub(AArch64ArithmeticOp.FADD, a, b, c);
+ return emitMultiplyAddSub(AArch64ArithmeticOp.FMADD, a, b, c);
}
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.aarch64/src/org/graalvm/compiler/core/aarch64/AArch64NodeMatchRules.java Thu Nov 07 18:44:09 2019 +0000
@@ -57,6 +57,7 @@
import org.graalvm.compiler.nodes.calc.BinaryNode;
import org.graalvm.compiler.nodes.calc.IntegerLessThanNode;
import org.graalvm.compiler.nodes.calc.LeftShiftNode;
+import org.graalvm.compiler.nodes.calc.MulNode;
import org.graalvm.compiler.nodes.calc.NotNode;
import org.graalvm.compiler.nodes.calc.OrNode;
import org.graalvm.compiler.nodes.calc.RightShiftNode;
@@ -224,6 +225,33 @@
return emitBinaryShift(op, a, shift, isShiftNot);
}
+ @MatchRule("(Add=binary (Mul (SignExtend a) (SignExtend b)) c)")
+ @MatchRule("(Sub=binary c (Mul (SignExtend a) (SignExtend b)))")
+ public ComplexMatchResult signedMultiplyAddSubLong(BinaryNode binary, ValueNode a, ValueNode b, ValueNode c) {
+ assert a.getStackKind() == JavaKind.Int && b.getStackKind() == JavaKind.Int && c.getStackKind() == JavaKind.Long;
+ if (binary instanceof AddNode) {
+ return builder -> getArithmeticLIRGenerator().emitIntegerMAdd(operand(a), operand(b), operand(c), true);
+ }
+ return builder -> getArithmeticLIRGenerator().emitIntegerMSub(operand(a), operand(b), operand(c), true);
+ }
+
+ @MatchRule("(Negate (Mul=mul (SignExtend a) (SignExtend b)))")
+ @MatchRule("(Mul=mul (Negate (SignExtend a)) (SignExtend b))")
+ public ComplexMatchResult signedMultiplyNegLong(MulNode mul, ValueNode a, ValueNode b) {
+ assert a.getStackKind() == JavaKind.Int && b.getStackKind() == JavaKind.Int;
+ LIRKind resultKind = LIRKind.fromJavaKind(gen.target().arch, mul.getStackKind());
+ return builder -> getArithmeticLIRGenerator().emitBinary(
+ resultKind, AArch64ArithmeticOp.SMNEGL, true, operand(a), operand(b));
+ }
+
+ @MatchRule("(Mul=mul (SignExtend a) (SignExtend b))")
+ public ComplexMatchResult signedMultiplyLong(MulNode mul, ValueNode a, ValueNode b) {
+ assert a.getStackKind() == JavaKind.Int && b.getStackKind() == JavaKind.Int;
+ LIRKind resultKind = LIRKind.fromJavaKind(gen.target().arch, mul.getStackKind());
+ return builder -> getArithmeticLIRGenerator().emitBinary(
+ resultKind, AArch64ArithmeticOp.SMULL, true, operand(a), operand(b));
+ }
+
@MatchRule("(Mul (Negate a) b)")
@MatchRule("(Negate (Mul a b))")
public ComplexMatchResult multiplyNegate(ValueNode a, ValueNode b) {
@@ -244,9 +272,9 @@
}
if (binary instanceof AddNode) {
- return builder -> getArithmeticLIRGenerator().emitMAdd(operand(a), operand(b), operand(c));
+ return builder -> getArithmeticLIRGenerator().emitIntegerMAdd(operand(a), operand(b), operand(c), false);
}
- return builder -> getArithmeticLIRGenerator().emitMSub(operand(a), operand(b), operand(c));
+ return builder -> getArithmeticLIRGenerator().emitIntegerMSub(operand(a), operand(b), operand(c), false);
}
/**
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.amd64/src/org/graalvm/compiler/core/amd64/AMD64NodeMatchRules.java Thu Nov 07 18:44:09 2019 +0000
@@ -359,6 +359,7 @@
@MatchRule("(If (IntegerTest Read=access value))")
@MatchRule("(If (IntegerTest FloatingRead=access value))")
+ @MatchRule("(If (IntegerTest VolatileRead=access value))")
public ComplexMatchResult integerTestBranchMemory(IfNode root, LIRLowerableAccess access, ValueNode value) {
return emitIntegerTestBranchMemory(root, value, access);
}
@@ -369,14 +370,21 @@
@MatchRule("(If (IntegerEquals=compare value FloatingRead=access))")
@MatchRule("(If (IntegerLessThan=compare value FloatingRead=access))")
@MatchRule("(If (IntegerBelow=compare value FloatingRead=access))")
+ @MatchRule("(If (IntegerEquals=compare value VolatileRead=access))")
+ @MatchRule("(If (IntegerLessThan=compare value VolatileRead=access))")
+ @MatchRule("(If (IntegerBelow=compare value VolatileRead=access))")
@MatchRule("(If (FloatEquals=compare value Read=access))")
@MatchRule("(If (FloatEquals=compare value FloatingRead=access))")
+ @MatchRule("(If (FloatEquals=compare value VolatileRead=access))")
@MatchRule("(If (FloatLessThan=compare value Read=access))")
@MatchRule("(If (FloatLessThan=compare value FloatingRead=access))")
+ @MatchRule("(If (FloatLessThan=compare value VolatileRead=access))")
@MatchRule("(If (PointerEquals=compare value Read=access))")
@MatchRule("(If (PointerEquals=compare value FloatingRead=access))")
+ @MatchRule("(If (PointerEquals=compare value VolatileRead=access))")
@MatchRule("(If (ObjectEquals=compare value Read=access))")
@MatchRule("(If (ObjectEquals=compare value FloatingRead=access))")
+ @MatchRule("(If (ObjectEquals=compare value VolatileRead=access))")
public ComplexMatchResult ifCompareMemory(IfNode root, CompareNode compare, ValueNode value, LIRLowerableAccess access) {
return emitCompareBranchMemory(root, compare, value, access);
}
@@ -478,6 +486,7 @@
@MatchRule("(Add value Read=access)")
@MatchRule("(Add value FloatingRead=access)")
+ @MatchRule("(Add value VolatileRead=access)")
public ComplexMatchResult addMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -493,6 +502,7 @@
@MatchRule("(Sub value Read=access)")
@MatchRule("(Sub value FloatingRead=access)")
+ @MatchRule("(Sub value VolatileRead=access)")
public ComplexMatchResult subMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -508,6 +518,7 @@
@MatchRule("(Mul value Read=access)")
@MatchRule("(Mul value FloatingRead=access)")
+ @MatchRule("(Mul value VolatileRead=access)")
public ComplexMatchResult mulMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -523,6 +534,7 @@
@MatchRule("(And value Read=access)")
@MatchRule("(And value FloatingRead=access)")
+ @MatchRule("(And value VolatileRead=access)")
public ComplexMatchResult andMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -534,6 +546,7 @@
@MatchRule("(Or value Read=access)")
@MatchRule("(Or value FloatingRead=access)")
+ @MatchRule("(Or value VolatileRead=access)")
public ComplexMatchResult orMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -545,6 +558,7 @@
@MatchRule("(Xor value Read=access)")
@MatchRule("(Xor value FloatingRead=access)")
+ @MatchRule("(Xor value VolatileRead=access)")
public ComplexMatchResult xorMemory(ValueNode value, LIRLowerableAccess access) {
OperandSize size = getMemorySize(access);
if (size.isXmmType()) {
@@ -565,12 +579,14 @@
@MatchRule("(SignExtend Read=access)")
@MatchRule("(SignExtend FloatingRead=access)")
+ @MatchRule("(SignExtend VolatileRead=access)")
public ComplexMatchResult signExtend(SignExtendNode root, LIRLowerableAccess access) {
return emitSignExtendMemory(access, root.getInputBits(), root.getResultBits(), null);
}
@MatchRule("(ZeroExtend Read=access)")
@MatchRule("(ZeroExtend FloatingRead=access)")
+ @MatchRule("(ZeroExtend VolatileRead=access)")
public ComplexMatchResult zeroExtend(ZeroExtendNode root, LIRLowerableAccess access) {
AMD64Kind memoryKind = getMemoryKind(access);
return builder -> getArithmeticLIRGenerator().emitZeroExtendMemory(memoryKind, root.getResultBits(), (AMD64AddressValue) operand(access.getAddress()), getState(access));
@@ -578,6 +594,7 @@
@MatchRule("(Narrow Read=access)")
@MatchRule("(Narrow FloatingRead=access)")
+ @MatchRule("(Narrow VolatileRead=access)")
public ComplexMatchResult narrowRead(NarrowNode root, LIRLowerableAccess access) {
return new ComplexMatchResult() {
@Override
@@ -595,6 +612,7 @@
@MatchRule("(SignExtend (Narrow=narrow Read=access))")
@MatchRule("(SignExtend (Narrow=narrow FloatingRead=access))")
+ @MatchRule("(SignExtend (Narrow=narrow VolatileRead=access))")
public ComplexMatchResult signExtendNarrowRead(SignExtendNode root, NarrowNode narrow, LIRLowerableAccess access) {
LIRKind kind = getLIRGeneratorTool().getLIRKind(narrow.stamp(NodeView.DEFAULT));
return emitSignExtendMemory(access, narrow.getResultBits(), root.getResultBits(), kind);
@@ -602,6 +620,7 @@
@MatchRule("(FloatConvert Read=access)")
@MatchRule("(FloatConvert FloatingRead=access)")
+ @MatchRule("(FloatConvert VolatileRead=access)")
public ComplexMatchResult floatConvert(FloatConvertNode root, LIRLowerableAccess access) {
switch (root.getFloatConvert()) {
case D2F:
@@ -631,6 +650,7 @@
@MatchRule("(Reinterpret Read=access)")
@MatchRule("(Reinterpret FloatingRead=access)")
+ @MatchRule("(Reinterpret VolatileRead=access)")
public ComplexMatchResult reinterpret(ReinterpretNode root, LIRLowerableAccess access) {
return builder -> {
LIRKind kind = getLIRGeneratorTool().getLIRKind(root.stamp(NodeView.DEFAULT));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/GraalOptions.java Thu Nov 07 18:44:09 2019 +0000
@@ -115,7 +115,7 @@
public static final OptionKey<Boolean> PartialUnroll = new OptionKey<>(true);
@Option(help = "", type = OptionType.Expert)
- public static final OptionKey<Float> MinimumPeelProbability = new OptionKey<>(0.35f);
+ public static final OptionKey<Float> MinimumPeelFrequency = new OptionKey<>(0.35f);
@Option(help = "", type = OptionType.Expert)
public static final OptionKey<Integer> LoopMaxUnswitch = new OptionKey<>(3);
@@ -242,9 +242,6 @@
public static final OptionKey<Boolean> OptImplicitNullChecks = new OptionKey<>(true);
@Option(help = "", type = OptionType.Debug)
- public static final OptionKey<Boolean> OptLoopTransform = new OptionKey<>(true);
-
- @Option(help = "", type = OptionType.Debug)
public static final OptionKey<Boolean> OptFloatingReads = new OptionKey<>(true);
@Option(help = "", type = OptionType.Debug)
@@ -291,4 +288,7 @@
@Option(help = "Alignment in bytes for loop header blocks.", type = OptionType.Expert)
public static final OptionKey<Integer> LoopHeaderAlignment = new OptionKey<>(16);
+
+ @Option(help = "Do not include membars for volatile accesses until the end of optimizations.", type = OptionType.Expert)
+ public static final OptionKey<Boolean> LateMembars = new OptionKey<>(true);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractBlockBase.java Thu Nov 07 18:44:09 2019 +0000
@@ -94,6 +94,38 @@
return dominator;
}
+ /**
+ * Returns the next dominator of this block that is either in the same loop of this block or in
+ * an outer loop.
+ *
+ * @return the next dominator while skipping over loops
+ */
+ public T getDominatorSkipLoops() {
+ T d = getDominator();
+
+ if (d == null) {
+ // We are at the start block and don't have a dominator.
+ return null;
+ }
+
+ if (isLoopHeader()) {
+ // We are moving out of current loop => just return dominator.
+ assert d.getLoopDepth() == getLoopDepth() - 1;
+ assert d.getLoop() != getLoop();
+ return d;
+ }
+
+ while (d.getLoop() != getLoop()) {
+ // We have a case where our dominator is in a different loop. Move further along
+ // the domiantor tree until we hit our loop again.
+ d = d.getDominator();
+ }
+
+ assert d.getLoopDepth() <= getLoopDepth();
+
+ return d;
+ }
+
public void setDominator(T dominator) {
this.dominator = dominator;
this.domDepth = dominator.domDepth + 1;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/AbstractControlFlowGraph.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
T getStartBlock();
/**
- * True if block {@code a} is dominated by block {@code b}.
+ * True if block {@code a} is dominated by block {@code b} or {@code a} is equal to {@code b}.
*/
static boolean isDominatedBy(AbstractBlockBase<?> a, AbstractBlockBase<?> b) {
int domNumberA = a.getDominatorNumber();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/cfg/Loop.java Thu Nov 07 18:44:09 2019 +0000
@@ -177,25 +177,6 @@
return true;
}
- /**
- * Determines if one loop is a transitive parent of another loop.
- *
- * @param childLoop The loop for which parentLoop might be a transitive parent loop.
- * @param parentLoop The loop which might be a transitive parent loop of child loop.
- * @return {@code true} if parentLoop is a (transitive) parent loop of childLoop, {@code false}
- * otherwise
- */
- public static <T extends AbstractBlockBase<T>> boolean transitiveParentLoop(Loop<T> childLoop, Loop<T> parentLoop) {
- Loop<T> curr = childLoop;
- while (curr != null) {
- if (curr == parentLoop) {
- return true;
- }
- curr = curr.getParent();
- }
- return false;
- }
-
@Override
public int hashCode() {
return index + depth * 31;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.common/src/org/graalvm/compiler/core/common/type/IntegerStamp.java Thu Nov 07 18:44:09 2019 +0000
@@ -167,8 +167,15 @@
@Override
public Stamp constant(Constant c, MetaAccessProvider meta) {
if (c instanceof PrimitiveConstant) {
- long value = ((PrimitiveConstant) c).asLong();
- return StampFactory.forInteger(getBits(), value, value);
+ PrimitiveConstant primitiveConstant = (PrimitiveConstant) c;
+ long value = primitiveConstant.asLong();
+ if (primitiveConstant.getJavaKind() == JavaKind.Boolean && value == 1) {
+ // Need to special case booleans as integer stamps are always signed values.
+ value = -1;
+ }
+ Stamp returnedStamp = StampFactory.forInteger(getBits(), value, value);
+ assert returnedStamp.hasValues();
+ return returnedStamp;
}
return this;
}
@@ -1605,7 +1612,10 @@
long newUpMask = stamp.upMask() & defaultMask;
long newLowerBound = CodeUtil.signExtend((lowerBound | newDownMask) & newUpMask, resultBits);
long newUpperBound = CodeUtil.signExtend((upperBound | newDownMask) & newUpMask, resultBits);
- return new IntegerStamp(resultBits, newLowerBound, newUpperBound, newDownMask, newUpMask);
+
+ IntegerStamp result = new IntegerStamp(resultBits, newLowerBound, newUpperBound, newDownMask, newUpMask);
+ assert result.hasValues();
+ return result;
}
},
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.sparc/src/org/graalvm/compiler/core/sparc/SPARCNodeMatchRules.java Thu Nov 07 18:44:09 2019 +0000
@@ -134,12 +134,14 @@
@MatchRule("(SignExtend Read=access)")
@MatchRule("(SignExtend FloatingRead=access)")
+ @MatchRule("(SignExtend VolatileRead=access)")
public ComplexMatchResult signExtend(SignExtendNode root, Access access) {
return emitSignExtendMemory(access, root.getInputBits(), root.getResultBits());
}
@MatchRule("(ZeroExtend Read=access)")
@MatchRule("(ZeroExtend FloatingRead=access)")
+ @MatchRule("(ZeroExtend VolatileRead=access)")
public ComplexMatchResult zeroExtend(ZeroExtendNode root, Access access) {
return emitZeroExtendMemory(access, root.getInputBits(), root.getResultBits());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/BoxingEliminationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -313,7 +313,7 @@
graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
- new PartialEscapePhase(false, new CanonicalizerPhase(), graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(false, createCanonicalizerPhase(), graph.getOptions()).apply(graph, context);
}
private void compareGraphs(final String snippet, final String referenceSnippet) {
@@ -323,7 +323,7 @@
private void compareGraphs(final String snippet, final String referenceSnippet, final boolean loopPeeling, final boolean excludeVirtual) {
graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
canonicalizer.apply(graph, context);
createInliningPhase().apply(graph, context);
if (loopPeeling) {
@@ -339,7 +339,7 @@
StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.YES);
createInliningPhase().apply(referenceGraph, context);
new DeadCodeEliminationPhase().apply(referenceGraph);
- new CanonicalizerPhase().apply(referenceGraph, context);
+ this.createCanonicalizerPhase().apply(referenceGraph, context);
assertEquals(referenceGraph, graph, excludeVirtual, true);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CheckGraalInvariants.java Thu Nov 07 18:44:09 2019 +0000
@@ -78,7 +78,7 @@
import org.graalvm.compiler.runtime.RuntimeProvider;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.compiler.test.AddExports;
-import org.graalvm.compiler.test.ModuleSupport;
+import org.graalvm.compiler.api.test.ModuleSupport;
import jdk.internal.vm.compiler.word.LocationIdentity;
import org.junit.Assert;
import org.junit.Assume;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,14 +31,13 @@
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.calc.ConditionalNode;
import org.graalvm.compiler.nodes.calc.IntegerTestNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class CompareCanonicalizerTest extends GraalCompilerTest {
private StructuredGraph getCanonicalizedGraph(String name) {
StructuredGraph graph = parseEager(name, AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
return graph;
}
@@ -55,7 +54,7 @@
StructuredGraph graph = parseEager("canonicalCompare" + i, AllowAssumptions.NO);
assertEquals(referenceGraph, graph);
}
- new CanonicalizerPhase().apply(referenceGraph, getProviders());
+ createCanonicalizerPhase().apply(referenceGraph, getProviders());
for (int i = 1; i < 4; i++) {
StructuredGraph graph = getCanonicalizedGraph("canonicalCompare" + i);
assertEquals(referenceGraph, graph);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest2.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest2.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,7 +26,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class CompareCanonicalizerTest2 extends GraalCompilerTest {
@@ -35,7 +34,7 @@
private StructuredGraph getCanonicalizedGraph(String name) {
StructuredGraph graph = getRegularGraph(name);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest3.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CompareCanonicalizerTest3.java Thu Nov 07 18:44:09 2019 +0000
@@ -239,7 +239,7 @@
protected void assertCanonicallyEqual(String snippet, String reference) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
canonicalizer.apply(graph, context);
new GuardLoweringPhase().apply(graph, new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo()));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationMulTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
new ConditionalEliminationPhase(false).apply(graph, context);
- CanonicalizerPhase c = new CanonicalizerPhase();
+ CanonicalizerPhase c = createCanonicalizerPhase();
c.apply(graph, context);
new ConditionalEliminationPhase(false).apply(graph, context);
c.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest10.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,7 +30,6 @@
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.ConditionalEliminationPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.junit.Assert;
@@ -95,7 +94,7 @@
private void test(String snippet, int guardCount) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new ConditionalEliminationPhase(true).apply(graph, context);
Assert.assertEquals(guardCount, graph.getNodes().filter(GuardNode.class).count());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest14.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest14.java Thu Nov 07 18:44:09 2019 +0000
@@ -70,7 +70,7 @@
@Test
public void test1() {
StructuredGraph graph = parseEager("test1Snippet", AllowAssumptions.YES);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
CoreProviders context = getProviders();
/* Convert the LoadIndexNode to ReadNode with floating guards. */
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest15.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest15.java Thu Nov 07 18:44:09 2019 +0000
@@ -47,10 +47,10 @@
private void checkNodeCount(String methodName, Class<? extends Node> nodeClass, int count) {
StructuredGraph graph = parseEager(methodName, AllowAssumptions.YES);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(this.createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
canonicalizer.apply(graph, context);
// Merge arr.length reads.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest16.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest16.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,7 +31,6 @@
import org.graalvm.compiler.nodes.ParameterNode;
import org.graalvm.compiler.nodes.PiNode;
import org.graalvm.compiler.nodes.StructuredGraph;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Before;
import org.junit.Test;
@@ -69,7 +68,7 @@
break;
}
}
- new CanonicalizerPhase().apply(graph, getDefaultHighTierContext());
+ this.createCanonicalizerPhase().apply(graph, getDefaultHighTierContext());
}
super.checkHighTierGraph(graph);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTest2.java Thu Nov 07 18:44:09 2019 +0000
@@ -109,7 +109,7 @@
@Test
public void testRedundantCompares() {
StructuredGraph graph = parseEager("testRedundantComparesSnippet", AllowAssumptions.YES);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
CoreProviders context = getProviders();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
@@ -132,7 +132,7 @@
public void testInstanceOfCheckCastLowered() {
StructuredGraph graph = parseEager("testInstanceOfCheckCastSnippet", AllowAssumptions.YES);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
CoreProviders context = getProviders();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
@@ -146,7 +146,7 @@
private void checkInstanceOfCount(String methodName, int count) {
StructuredGraph graph = parseEager(methodName, AllowAssumptions.YES);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
CoreProviders context = getProviders();
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ConditionalEliminationTestBase.java Thu Nov 07 18:44:09 2019 +0000
@@ -69,8 +69,8 @@
DebugContext debug = graph.getDebug();
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer1 = new CanonicalizerPhase();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer1 = createCanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
try (DebugContext.Scope scope = debug.scope("ConditionalEliminationTest", graph)) {
prepareGraph(graph, canonicalizer1, context, applyLowering);
new IterativeConditionalEliminationPhase(canonicalizer, true).apply(graph, context);
@@ -106,10 +106,9 @@
public void testProxies(String snippet, int expectedProxiesCreated) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer1 = new CanonicalizerPhase();
- canonicalizer1.disableSimplification();
+ CanonicalizerPhase canonicalizer1 = CanonicalizerPhase.createWithoutCFGSimplification();
canonicalizer1.apply(graph, context);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/CountedLoopTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -43,6 +43,7 @@
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Registration;
import org.graalvm.compiler.nodes.spi.LIRLowerable;
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
+import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -559,7 +560,7 @@
}
public void rewrite(LoopsData loops) {
- InductionVariable inductionVariable = loops.getInductionVariable(iv);
+ InductionVariable inductionVariable = loops.getInductionVariable(GraphUtil.unproxify(iv));
ValueNode node = null;
if (inductionVariable == null) {
assert loopCanBeRemoved;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DeMorganCanonicalizationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DeMorganCanonicalizationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,6 @@
import org.graalvm.compiler.nodes.calc.AndNode;
import org.graalvm.compiler.nodes.calc.NotNode;
import org.graalvm.compiler.nodes.calc.OrNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Assert;
import org.junit.Test;
@@ -46,7 +45,7 @@
@Test
public void testAnd() {
StructuredGraph g = parseEager("and", AllowAssumptions.NO, getInitialOptions());
- new CanonicalizerPhase().apply(g, getDefaultHighTierContext());
+ createCanonicalizerPhase().apply(g, getDefaultHighTierContext());
Assert.assertEquals(1, g.getNodes().filter(OrNode.class).count());
Assert.assertEquals(1, g.getNodes().filter(NotNode.class).count());
@@ -59,7 +58,7 @@
@Test
public void testOr() {
StructuredGraph g = parseEager("or", AllowAssumptions.NO, getInitialOptions());
- new CanonicalizerPhase().apply(g, getDefaultHighTierContext());
+ createCanonicalizerPhase().apply(g, getDefaultHighTierContext());
Assert.assertEquals(1, g.getNodes().filter(AndNode.class).count());
Assert.assertEquals(1, g.getNodes().filter(NotNode.class).count());
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/DegeneratedLoopsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
import org.graalvm.compiler.debug.DebugDumpScope;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -85,7 +84,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
StructuredGraph referenceGraph = parseEager(REFERENCE_SNIPPET, AllowAssumptions.YES);
debug.dump(DebugContext.BASIC_LEVEL, referenceGraph, "ReferenceGraph");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/EnumSwitchTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -29,7 +29,6 @@
import org.graalvm.compiler.nodes.java.LoadIndexedNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.Phase;
-import org.graalvm.compiler.phases.common.RemoveValueProxyPhase;
import org.graalvm.compiler.phases.tiers.Suites;
import org.junit.Assume;
import org.junit.Test;
@@ -157,7 +156,7 @@
return "CheckGraphPhase";
}
});
- ret.getHighTier().findPhase(RemoveValueProxyPhase.class).add(new Phase() {
+ ret.getHighTier().addBeforeLast(new Phase() {
@Override
protected void run(StructuredGraph graph) {
/* Re-writing of the switch cases eliminates the array load. */
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FinalizableSubclassTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,6 @@
import org.graalvm.compiler.nodes.java.RegisterFinalizerNode;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
import org.junit.Test;
@@ -80,7 +79,7 @@
new GraphBuilderPhase.Instance(getProviders(), conf, OptimisticOptimizations.ALL, null).apply(graph);
HighTierContext context = new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL);
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/FloatingReadTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,7 +34,6 @@
import org.graalvm.compiler.nodes.memory.FloatingReadNode;
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FloatingReadPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.junit.Assert;
@@ -68,7 +67,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new FloatingReadPhase().apply(graph);
ReturnNode returnNode = null;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraalCompilerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -126,7 +126,7 @@
import org.graalvm.compiler.runtime.RuntimeProvider;
import org.graalvm.compiler.test.AddExports;
import org.graalvm.compiler.test.GraalTest;
-import org.graalvm.compiler.test.ModuleSupport;
+import org.graalvm.compiler.api.test.ModuleSupport;
import org.junit.After;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -643,7 +643,7 @@
}
protected final BasePhase<HighTierContext> createInliningPhase() {
- return createInliningPhase(new CanonicalizerPhase());
+ return createInliningPhase(this.createCanonicalizerPhase());
}
protected BasePhase<HighTierContext> createInliningPhase(CanonicalizerPhase canonicalizer) {
@@ -1119,6 +1119,12 @@
return graph;
}
+ protected StructuredGraph getFinalGraph(ResolvedJavaMethod method, OptionValues options) {
+ StructuredGraph graph = parseForCompile(method, options);
+ applyFrontEnd(graph);
+ return graph;
+ }
+
@SuppressWarnings("try")
protected void applyFrontEnd(StructuredGraph graph) {
DebugContext debug = graph.getDebug();
@@ -1515,4 +1521,8 @@
protected boolean isArchitecture(String name) {
return name.equals(backend.getTarget().arch.getName());
}
+
+ protected CanonicalizerPhase createCanonicalizerPhase() {
+ return CanonicalizerPhase.create();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GraphEncoderTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -35,7 +35,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.spi.CoreProviders;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
import jdk.vm.ci.meta.ResolvedJavaMethod;
@@ -61,7 +60,7 @@
StructuredGraph originalGraph = parseEager(javaMethod, AllowAssumptions.YES);
if (canonicalize) {
CoreProviders context = getProviders();
- new CanonicalizerPhase().apply(originalGraph, context);
+ createCanonicalizerPhase().apply(originalGraph, context);
}
originalGraphs.add(originalGraph);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardPrioritiesTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/GuardPrioritiesTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -86,7 +86,7 @@
private StructuredGraph prepareGraph(String method) {
StructuredGraph graph = parseEager(method, StructuredGraph.AllowAssumptions.YES);
HighTierContext highTierContext = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new ConvertDeoptimizeToGuardPhase().apply(graph, highTierContext);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
new FloatingReadPhase().apply(graph);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IfCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -35,7 +35,6 @@
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FloatingReadPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
@@ -227,12 +226,12 @@
private void testCombinedIf(String snippet, int count) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new FloatingReadPhase().apply(graph);
MidTierContext midContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
new GuardLoweringPhase().apply(graph, midContext);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
- new CanonicalizerPhase().apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
+ createCanonicalizerPhase().apply(graph, context);
assertDeepEquals(count, graph.getNodes().filter(IfNode.class).count());
}
@@ -247,7 +246,7 @@
}
}
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
for (FrameState fs : param.usages().filter(FrameState.class).snapshot()) {
fs.replaceFirstInput(param, null);
param.safeDelete();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,7 +34,6 @@
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FloatingReadPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
@@ -72,7 +71,7 @@
try (DebugContext.Scope s = debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES, debug);
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new FloatingReadPhase().apply(graph);
MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
new GuardLoweringPhase().apply(graph, midTierContext);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/IntegerEqualsCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,6 @@
import org.graalvm.compiler.nodes.FrameState;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class IntegerEqualsCanonicalizerTest extends GraalCompilerTest {
@@ -166,7 +165,7 @@
private StructuredGraph getCanonicalizedGraph(String snippet) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
for (FrameState state : graph.getNodes(FrameState.TYPE).snapshot()) {
state.replaceAtUsages(null);
state.safeDelete();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InterfaceMethodHandleTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
import org.graalvm.compiler.code.CompilationResult;
import org.graalvm.compiler.debug.DebugContext;
-import org.graalvm.compiler.test.ExportingClassLoader;
+import org.graalvm.compiler.api.test.ExportingClassLoader;
import org.junit.Test;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Label;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeExceptionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
import org.graalvm.compiler.nodes.Invoke;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -69,8 +68,8 @@
hints.put(invoke, 1000d);
}
HighTierContext context = getDefaultHighTierContext();
- createInliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createInliningPhase(hints, createCanonicalizerPhase()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/InvokeHintsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
import org.graalvm.compiler.nodes.Invoke;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -80,8 +79,8 @@
}
HighTierContext context = getDefaultHighTierContext();
- createInliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createInliningPhase(hints, createCanonicalizerPhase()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
StructuredGraph referenceGraph = parseEager(REFERENCE_SNIPPET, AllowAssumptions.NO);
assertEquals(referenceGraph, graph);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LateMembarInsertionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,233 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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 org.graalvm.compiler.core.test;
+
+import jdk.vm.ci.meta.ConstantReflectionProvider;
+import jdk.vm.ci.meta.MetaAccessProvider;
+import jdk.vm.ci.meta.ResolvedJavaType;
+import jdk.internal.vm.compiler.collections.EconomicMap;
+import org.graalvm.compiler.core.common.type.Stamp;
+import org.graalvm.compiler.nodes.ConstantNode;
+import org.graalvm.compiler.nodes.NodeView;
+import org.graalvm.compiler.nodes.StructuredGraph;
+import org.graalvm.compiler.nodes.ValueNode;
+import org.graalvm.compiler.nodes.cfg.Block;
+import org.graalvm.compiler.nodes.cfg.ControlFlowGraph;
+import org.graalvm.compiler.nodes.memory.FixedAccessNode;
+import org.graalvm.compiler.nodes.memory.MemoryAccess;
+import org.graalvm.compiler.nodes.memory.ReadNode;
+import org.graalvm.compiler.nodes.memory.address.AddressNode;
+import org.graalvm.compiler.options.OptionKey;
+import org.graalvm.compiler.options.OptionValues;
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.graalvm.compiler.core.common.GraalOptions.StressTestEarlyReads;
+
+public class LateMembarInsertionTest extends GraalCompilerTest {
+
+ private final ResolvedJavaType volatileAccessType = getMetaAccess().lookupJavaType(VolatileAccess.class);
+ private final ResolvedJavaType regularAccessField = getMetaAccess().lookupJavaType(RegularAccess.class);
+ private final ResolvedJavaType volatileAccess2Type = getMetaAccess().lookupJavaType(VolatileAccess2.class);
+
+ static class VolatileAccess {
+ static volatile int field;
+ }
+
+ static class VolatileAccess2 {
+ static volatile int field;
+ }
+
+ static class RegularAccess {
+ static int field;
+ }
+
+ public static int volatileFieldLoadFieldLoad() {
+ int v1 = VolatileAccess.field;
+ int v2 = RegularAccess.field;
+ return v1 + v2;
+ }
+
+ @Test
+ public void test01() {
+ List<TypePair> accesses = compile("volatileFieldLoadFieldLoad", stressTestEarlyReads());
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), volatileAccessType);
+ Assert.assertEquals(accesses.get(1).getType(), regularAccessField);
+ Assert.assertTrue(accesses.get(0).isRead());
+ Assert.assertTrue(accesses.get(1).isRead());
+ }
+
+ public static int volatileFieldLoadVolatileFieldLoad() {
+ int v1 = VolatileAccess.field;
+ int v2 = VolatileAccess2.field;
+ return v1 + v2;
+ }
+
+ @Test
+ public void test02() {
+ List<TypePair> accesses = compile("volatileFieldLoadVolatileFieldLoad", stressTestEarlyReads());
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), volatileAccessType);
+ Assert.assertEquals(accesses.get(1).getType(), volatileAccess2Type);
+ Assert.assertTrue(accesses.get(0).isRead());
+ Assert.assertTrue(accesses.get(1).isRead());
+ }
+
+ public static int volatileFieldLoadVolatileFieldStore(int v2) {
+ int v1 = VolatileAccess.field;
+ VolatileAccess2.field = v2;
+ return v1;
+ }
+
+ @Test
+ public void test03() {
+ List<TypePair> accesses = compile("volatileFieldLoadVolatileFieldStore");
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), volatileAccessType);
+ Assert.assertEquals(accesses.get(1).getType(), volatileAccess2Type);
+ Assert.assertTrue(accesses.get(0).isRead());
+ Assert.assertTrue(accesses.get(1).isWrite());
+ }
+
+ public static int volatileFieldStoreVolatileFieldLoad(int v2) {
+ VolatileAccess.field = v2;
+ return VolatileAccess2.field;
+ }
+
+ @Test
+ public void test04() {
+ List<TypePair> accesses = compile("volatileFieldStoreVolatileFieldLoad", stressTestEarlyReads());
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), volatileAccessType);
+ Assert.assertEquals(accesses.get(1).getType(), volatileAccess2Type);
+ Assert.assertTrue(accesses.get(0).isWrite());
+ Assert.assertTrue(accesses.get(1).isRead());
+ }
+
+ public static int fieldLoadVolatileFieldStore(int v2) {
+ int v1 = RegularAccess.field;
+ VolatileAccess2.field = v2;
+ return v1;
+ }
+
+ @Test
+ public void test05() {
+ List<TypePair> accesses = compile("fieldLoadVolatileFieldStore");
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), regularAccessField);
+ Assert.assertEquals(accesses.get(1).getType(), volatileAccess2Type);
+ Assert.assertTrue(accesses.get(0).isRead());
+ Assert.assertTrue(accesses.get(1).isWrite());
+ }
+
+ public static void volatileFieldStoreVolatileFieldStore(int v1, int v2) {
+ VolatileAccess.field = v1;
+ VolatileAccess2.field = v2;
+ }
+
+ @Test
+ public void test06() {
+ List<TypePair> accesses = compile("volatileFieldStoreVolatileFieldStore");
+
+ Assert.assertEquals(accesses.size(), 2);
+ Assert.assertEquals(accesses.get(0).getType(), volatileAccessType);
+ Assert.assertEquals(accesses.get(1).getType(), volatileAccess2Type);
+ Assert.assertTrue(accesses.get(0).isWrite());
+ Assert.assertTrue(accesses.get(1).isWrite());
+ }
+
+ private static OptionValues stressTestEarlyReads() {
+ EconomicMap<OptionKey<?>, Object> overrides = OptionValues.newOptionMap();
+ overrides.put(StressTestEarlyReads, true);
+ return new OptionValues(getInitialOptions(), overrides);
+ }
+
+ static class TypePair {
+ private boolean isRead;
+ private ResolvedJavaType type;
+
+ TypePair(boolean isRead, ResolvedJavaType type) {
+ this.isRead = isRead;
+ this.type = type;
+ }
+
+ public boolean isRead() {
+ return isRead;
+ }
+
+ public boolean isWrite() {
+ return !isRead;
+ }
+
+ public ResolvedJavaType getType() {
+ return type;
+ }
+ }
+
+ private List<TypePair> compile(String test, OptionValues options) {
+ StructuredGraph graph = getFinalGraph(getResolvedJavaMethod(test), options);
+ return getAccesses(graph);
+ }
+
+ private List<TypePair> getAccesses(StructuredGraph graph) {
+ StructuredGraph.ScheduleResult schedule = graph.getLastSchedule();
+ ControlFlowGraph cfg = schedule.getCFG();
+ Block[] blocks = cfg.getBlocks();
+
+ return Arrays.stream(blocks).flatMap(b -> schedule.nodesFor(b).stream()).filter(n -> n instanceof MemoryAccess).map(
+ n -> new TypePair(n instanceof ReadNode, classForAccess((FixedAccessNode) n))).collect(Collectors.toList());
+ }
+
+ private List<TypePair> compile(String test) {
+ StructuredGraph graph = getFinalGraph(getResolvedJavaMethod(test));
+ return getAccesses(graph);
+ }
+
+ private ResolvedJavaType classForAccess(FixedAccessNode n) {
+ AddressNode address = n.getAddress();
+ ValueNode base = address.getBase();
+ Stamp stamp = base.stamp(NodeView.DEFAULT);
+ MetaAccessProvider metaAccess = getMetaAccess();
+ ResolvedJavaType javaType = stamp.javaType(metaAccess);
+ if (javaType == metaAccess.lookupJavaType(Class.class) && base instanceof ConstantNode) {
+ ConstantReflectionProvider constantReflection = getConstantReflection();
+ javaType = constantReflection.asJavaType(base.asConstant());
+ }
+ return javaType;
+ }
+
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LockEliminationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -69,7 +69,7 @@
test("testSynchronizedSnippet", new A(), new A());
StructuredGraph graph = getGraph("testSynchronizedSnippet", false);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
new LockEliminationPhase().apply(graph);
assertDeepEquals(1, graph.getNodes().filter(RawMonitorEnterNode.class).count());
assertDeepEquals(1, graph.getNodes().filter(MonitorExitNode.class).count());
@@ -87,7 +87,7 @@
test("testSynchronizedMethodSnippet", new A());
StructuredGraph graph = getGraph("testSynchronizedMethodSnippet", false);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
new LockEliminationPhase().apply(graph);
assertDeepEquals(1, graph.getNodes().filter(RawMonitorEnterNode.class).count());
assertDeepEquals(1, graph.getNodes().filter(MonitorExitNode.class).count());
@@ -104,7 +104,7 @@
@Test
public void testUnrolledSync() {
StructuredGraph graph = getGraph("testUnrolledSyncSnippet", false);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, getProviders());
HighTierContext context = getDefaultHighTierContext();
new LoopFullUnrollPhase(canonicalizer, new DefaultLoopPolicies()).apply(graph, context);
@@ -117,15 +117,15 @@
ResolvedJavaMethod method = getResolvedJavaMethod(snippet);
StructuredGraph graph = parseEager(method, AllowAssumptions.YES);
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
if (doEscapeAnalysis) {
new PartialEscapePhase(true, canonicalizer, graph.getOptions()).apply(graph, context);
}
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LongNodeChainTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.calc.AddNode;
import org.graalvm.compiler.nodes.extended.OpaqueNode;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.schedule.SchedulePhase;
import org.graalvm.compiler.phases.schedule.SchedulePhase.SchedulingStrategy;
import org.graalvm.compiler.phases.tiers.HighTierContext;
@@ -85,7 +84,7 @@
new SchedulePhase(s).apply(graph);
}
- new CanonicalizerPhase().apply(graph, context);
+ this.createCanonicalizerPhase().apply(graph, context);
JavaConstant asConstant = (JavaConstant) returnNode.result().asConstant();
Assert.assertEquals(N + 1, asConstant.asInt());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopFullUnrollTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopFullUnrollTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -32,7 +32,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.spi.CoreProviders;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class LoopFullUnrollTest extends GraalCompilerTest {
@@ -89,7 +88,7 @@
final StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO, debug);
CoreProviders context = getProviders();
- new LoopFullUnrollPhase(new CanonicalizerPhase(), new DefaultLoopPolicies()).apply(graph, context);
+ new LoopFullUnrollPhase(createCanonicalizerPhase(), new DefaultLoopPolicies()).apply(graph, context);
assertTrue(graph.getNodes().filter(LoopBeginNode.class).count() == loopCount);
} catch (Throwable e) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/LoopUnswitchTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,7 +30,6 @@
import org.graalvm.compiler.loop.phases.LoopUnswitchingPhase;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class LoopUnswitchTest extends GraalCompilerTest {
@@ -133,8 +132,8 @@
graph.clearAllStateAfter();
referenceGraph.clearAllStateAfter();
- new CanonicalizerPhase().apply(graph, getProviders());
- new CanonicalizerPhase().apply(referenceGraph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(referenceGraph, getProviders());
try (DebugContext.Scope s = debug.scope("Test", new DebugDumpScope("Test:" + snippet))) {
assertEquals(referenceGraph, graph);
} catch (Throwable e) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MarkUnsafeAccessTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@
import java.nio.file.Path;
import org.graalvm.compiler.nodes.StructuredGraph;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.inlining.InliningPhase;
import org.graalvm.compiler.phases.common.inlining.policy.InlineEverythingPolicy;
import org.graalvm.compiler.phases.tiers.HighTierContext;
@@ -125,8 +124,8 @@
Assert.assertNotNull(getMethodImpl);
StructuredGraph graph = parseForCompile(getMethodImpl);
HighTierContext highContext = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(graph, highContext);
- new InliningPhase(new InlineEverythingPolicy(), new CanonicalizerPhase()).apply(graph, highContext);
+ createCanonicalizerPhase().apply(graph, highContext);
+ new InliningPhase(new InlineEverythingPolicy(), createCanonicalizerPhase()).apply(graph, highContext);
InstalledCode compiledCode = getCode(getMethodImpl, graph);
testMappedByteBuffer(mbb -> {
try {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryGraphCanonicalizeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryGraphCanonicalizeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.memory.WriteNode;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FloatingReadPhase;
import org.graalvm.compiler.phases.common.IncrementalCanonicalizerPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
@@ -76,10 +75,9 @@
public void testGraph(String name, int expectedWrites) {
StructuredGraph graph = parseEager(name, StructuredGraph.AllowAssumptions.YES);
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
- new IncrementalCanonicalizerPhase<>(canonicalizer, new FloatingReadPhase()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new IncrementalCanonicalizerPhase<>(createCanonicalizerPhase(), new FloatingReadPhase()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
int writes = graph.getNodes().filter(WriteNode.class).count();
assertTrue(writes == expectedWrites, "Expected %d writes, found %d", expectedWrites, writes);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MemoryScheduleTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,6 @@
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodes.ReturnNode;
-import org.graalvm.compiler.nodes.StartNode;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult;
@@ -177,7 +176,6 @@
@Test
public void testLoop1() {
ScheduleResult schedule = getFinalSchedule("testLoop1Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(6, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, true);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -202,7 +200,6 @@
@Test
public void testLoop2() {
ScheduleResult schedule = getFinalSchedule("testLoop2Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(6, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, true);
}
@@ -224,7 +221,6 @@
@Test
public void testLoop3() {
ScheduleResult schedule = getFinalSchedule("testLoop3Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(6, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, true);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -260,7 +256,6 @@
@Test
public void testLoop5() {
ScheduleResult schedule = getFinalSchedule("testLoop5Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(10, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -289,7 +284,6 @@
@Test
public void testLoop6() {
ScheduleResult schedule = getFinalSchedule("testLoop6Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(13, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -322,7 +316,6 @@
@Test
public void testLoop7() {
ScheduleResult schedule = getFinalSchedule("testLoop7Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(18, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -349,7 +342,6 @@
@Test
public void testLoop8() {
ScheduleResult schedule = getFinalSchedule("testLoop8Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(10, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, true);
assertReadWithinAllReturnBlocks(schedule, false);
}
@@ -391,7 +383,6 @@
@Test
public void testIfRead1() {
ScheduleResult schedule = getFinalSchedule("testIfRead1Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(3, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, true);
assertReadAndWriteInSameBlock(schedule, false);
}
@@ -412,7 +403,6 @@
@Test
public void testIfRead2() {
ScheduleResult schedule = getFinalSchedule("testIfRead2Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(3, schedule.getCFG().getBlocks().length);
assertDeepEquals(1, schedule.getCFG().graph.getNodes().filter(FloatingReadNode.class).count());
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
@@ -434,7 +424,6 @@
@Test
public void testIfRead3() {
ScheduleResult schedule = getFinalSchedule("testIfRead3Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(4, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, true);
}
@@ -455,7 +444,6 @@
@Test
public void testIfRead4() {
ScheduleResult schedule = getFinalSchedule("testIfRead4Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(3, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
assertReadAndWriteInSameBlock(schedule, true);
@@ -474,7 +462,6 @@
@Test
public void testIfRead5() {
ScheduleResult schedule = getFinalSchedule("testIfRead5Snippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(4, schedule.getCFG().getBlocks().length);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, true);
assertReadAndWriteInSameBlock(schedule, false);
@@ -500,7 +487,6 @@
@Test
public void testAntiDependency() {
ScheduleResult schedule = getFinalSchedule("testAntiDependencySnippet", TestMode.WITHOUT_FRAMESTATES);
- assertDeepEquals(4, schedule.getCFG().getBlocks().length);
assertReadBeforeAllWritesInStartBlock(schedule);
}
@@ -527,7 +513,6 @@
StructuredGraph graph = schedule.getCFG().graph;
NodeIterable<WriteNode> writeNodes = graph.getNodes().filter(WriteNode.class);
- assertDeepEquals(1, schedule.getCFG().getBlocks().length);
assertDeepEquals(8, writeNodes.count());
assertDeepEquals(1, graph.getNodes().filter(FloatingReadNode.class).count());
@@ -708,7 +693,7 @@
DebugContext debug = graph.getDebug();
try (DebugContext.Scope d = debug.scope("FloatingReadTest", graph)) {
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
if (mode == TestMode.INLINED_WITHOUT_FRAMESTATES) {
createInliningPhase(canonicalizer).apply(graph, context);
@@ -729,7 +714,6 @@
SchedulePhase schedule = new SchedulePhase(schedulingStrategy);
schedule.apply(graph);
- assertDeepEquals(1, graph.getNodes().filter(StartNode.class).count());
return graph.getLastSchedule();
} catch (Throwable e) {
throw debug.handle(e);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MergeCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,7 +30,6 @@
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -70,8 +69,8 @@
private void testReturnCount(String snippet, int returnCount) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, getProviders());
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
graph.getDebug().dump(DebugContext.BASIC_LEVEL, graph, "Graph");
assertDeepEquals(returnCount, graph.getNodes(ReturnNode.TYPE).count());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/MonitorGraphTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.java.MonitorExitNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
@@ -103,8 +102,8 @@
hints.put(invoke, 1000d);
}
HighTierContext context = getDefaultHighTierContext();
- createInliningPhase(hints, new CanonicalizerPhase()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, context);
+ createInliningPhase(hints, createCanonicalizerPhase()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/NodePropertiesTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -36,7 +36,7 @@
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.phases.BasePhase;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase.CustomCanonicalizer;
+import org.graalvm.compiler.phases.common.CanonicalizerPhase.CustomSimplification;
import org.graalvm.compiler.phases.contract.NodeCostUtil;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
@@ -162,19 +162,21 @@
@Test
public void testCanonicalizationExample() {
HighTierContext htc = getDefaultHighTierContext();
- ImprovementSavingCanonicalizer c1 = new ImprovementSavingCanonicalizer();
+ ImprovementSavingCalculator c1 = new ImprovementSavingCalculator();
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("test1Snippet"));
- new CanonicalizerPhase(c1).apply(g1, htc);
- ImprovementSavingCanonicalizer c2 = new ImprovementSavingCanonicalizer();
+ CanonicalizerPhase canonicalizer1 = this.createCanonicalizerPhase().copyWithCustomSimplification(c1);
+ canonicalizer1.apply(g1, htc);
+ ImprovementSavingCalculator c2 = new ImprovementSavingCalculator();
StructuredGraph g2 = parseForCompile(getResolvedJavaMethod("test2Snippet"));
- new CanonicalizerPhase(c2).apply(g2, htc);
+ CanonicalizerPhase canonicalizer2 = this.createCanonicalizerPhase().copyWithCustomSimplification(c2);
+ canonicalizer2.apply(g2, htc);
Assert.assertEquals(0, c1.savedCycles);
Assert.assertEquals(0, c2.savedCycles);
}
- private static void prepareGraphForLoopFrequencies(StructuredGraph g, HighTierContext htc) {
+ private void prepareGraphForLoopFrequencies(StructuredGraph g, HighTierContext htc) {
// let canonicalizer work away branch probability nodes
- new CanonicalizerPhase().apply(g, htc);
+ createCanonicalizerPhase().apply(g, htc);
// recompute the loop frequencies
ComputeLoopFrequenciesClosure.compute(g);
}
@@ -242,8 +244,8 @@
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("test1Snippet"));
StructuredGraph g2 = parseForCompile(getResolvedJavaMethod("test2Snippet"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
- new CanonicalizerPhase().apply(g2, htc);
+ createCanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g2, htc);
GraphCostPhase gc1 = new GraphCostPhase();
GraphCostPhase gc2 = new GraphCostPhase();
gc1.apply(g1, htc);
@@ -257,7 +259,7 @@
public void testExpectUntrusted() {
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("untrused01"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g1, htc);
GraphCostPhase gc1 = new GraphCostPhase();
gc1.apply(g1, htc);
}
@@ -266,7 +268,7 @@
public void testArrayLoad() {
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("arrayLoadTest"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g1, htc);
GraphCostPhase gc1 = new GraphCostPhase();
gc1.apply(g1, htc);
Assert.assertEquals(15, gc1.finalCycles, 25);
@@ -276,7 +278,7 @@
public void testArrayStore() {
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("arrayStoreTest"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g1, htc);
GraphCostPhase gc1 = new GraphCostPhase();
gc1.apply(g1, htc);
Assert.assertEquals(15, gc1.finalCycles, 25);
@@ -286,7 +288,7 @@
public void testFieldLoad() {
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("fieldLoad"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g1, htc);
GraphCostPhase gc1 = new GraphCostPhase();
gc1.apply(g1, htc);
Assert.assertEquals(15, gc1.finalCycles, 25);
@@ -296,13 +298,13 @@
public void testFieldStore() {
StructuredGraph g1 = parseForCompile(getResolvedJavaMethod("fieldStore"));
HighTierContext htc = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(g1, htc);
+ createCanonicalizerPhase().apply(g1, htc);
GraphCostPhase gc1 = new GraphCostPhase();
gc1.apply(g1, htc);
Assert.assertEquals(15, gc1.finalCycles, 25);
}
- static class ImprovementSavingCanonicalizer extends CustomCanonicalizer {
+ static class ImprovementSavingCalculator implements CustomSimplification {
private int savedCycles;
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushNodesThroughPiTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -104,7 +104,7 @@
private StructuredGraph compileTestSnippet(final String snippet) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
canonicalizer.apply(graph, context);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/PushThroughIfTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -29,7 +29,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.util.GraphUtil;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class PushThroughIfTest extends GraalCompilerTest {
@@ -65,15 +64,15 @@
fs.replaceAtUsages(null);
GraphUtil.killWithUnusedFloatingInputs(fs);
}
- new CanonicalizerPhase().apply(graph, getProviders());
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
StructuredGraph referenceGraph = parseEager(reference, AllowAssumptions.YES);
for (FrameState fs : referenceGraph.getNodes(FrameState.TYPE).snapshot()) {
fs.replaceAtUsages(null);
GraphUtil.killWithUnusedFloatingInputs(fs);
}
- new CanonicalizerPhase().apply(referenceGraph, getProviders());
+ createCanonicalizerPhase().apply(referenceGraph, getProviders());
assertEquals(referenceGraph, graph);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReadAfterCheckCastTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -90,7 +90,7 @@
// structure changes significantly
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new FloatingReadPhase().apply(graph);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ReassociateAndCanonicalTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,7 +28,6 @@
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class ReassociateAndCanonicalTest extends GraalCompilerTest {
@@ -245,9 +244,9 @@
private <T extends Node & IterableNodeType> void test(String test, String ref) {
StructuredGraph testGraph = parseEager(test, AllowAssumptions.NO);
- new CanonicalizerPhase().apply(testGraph, getProviders());
+ createCanonicalizerPhase().apply(testGraph, getProviders());
StructuredGraph refGraph = parseEager(ref, AllowAssumptions.NO);
- new CanonicalizerPhase().apply(refGraph, getProviders());
+ createCanonicalizerPhase().apply(refGraph, getProviders());
assertEquals(testGraph, refGraph);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ScalarTypeSystemTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,7 +28,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.spi.CoreProviders;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
/**
@@ -134,7 +133,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
graph.getDebug().dump(DebugContext.BASIC_LEVEL, graph, "Graph");
CoreProviders context = getProviders();
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.NO);
assertEquals(referenceGraph, graph);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SchedulingTest2.java Thu Nov 07 18:44:09 2019 +0000
@@ -44,7 +44,6 @@
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FrameStateAssignmentPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
@@ -99,8 +98,8 @@
}
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, context);
MidTierContext midContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
new GuardLoweringPhase().apply(graph, midContext);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StampCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,6 @@
import org.graalvm.compiler.core.common.type.IntegerStamp;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.junit.Test;
@@ -111,7 +110,7 @@
private void testZeroReturn(String methodName) {
StructuredGraph graph = parseEager(methodName, AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
new DeadCodeEliminationPhase().apply(graph);
assertConstantReturn(graph, 0);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/StraighteningTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,6 @@
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class StraighteningTest extends GraalCompilerTest {
@@ -90,7 +89,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
DebugContext debug = graph.getDebug();
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
StructuredGraph referenceGraph = parseEager(REFERENCE_SNIPPET, AllowAssumptions.YES);
assertEquals(referenceGraph, graph);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,7 +26,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.extended.IntegerSwitchNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class SwitchCanonicalizerTest extends GraalCompilerTest {
@@ -119,7 +118,7 @@
private void shouldFoldSwitch(String methodName) {
StructuredGraph graph = parseForCompile(getResolvedJavaMethod(methodName));
- new CanonicalizerPhase().apply(graph, getDefaultHighTierContext());
+ createCanonicalizerPhase().apply(graph, getDefaultHighTierContext());
assertTrue(graph.getNodes().filter(IntegerSwitchNode.class).isEmpty());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchDyingLoopTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchDyingLoopTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -70,7 +70,7 @@
@Test
public void test() {
- CanonicalizerPhase canonicalizerPhase = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizerPhase = createCanonicalizerPhase();
HighTierContext highTierContext = getDefaultHighTierContext();
StructuredGraph graph = parseEager("snippet", StructuredGraph.AllowAssumptions.YES);
// there should be 1 loop and 1 switch
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchFoldingTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/SwitchFoldingTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,6 @@
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.nodes.StructuredGraph;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class SwitchFoldingTest extends GraalCompilerTest {
@@ -484,7 +483,7 @@
StructuredGraph graph = parseEager(snippet, StructuredGraph.AllowAssumptions.YES);
DebugContext debug = graph.getDebug();
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
StructuredGraph referenceGraph = parseEager(ref, StructuredGraph.AllowAssumptions.YES);
assertEquals(referenceGraph, graph);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/TypeSystemTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -41,7 +41,6 @@
import org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult;
import org.graalvm.compiler.nodes.cfg.Block;
import org.graalvm.compiler.nodes.java.InstanceOfNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.ConditionalEliminationPhase;
import org.graalvm.compiler.phases.schedule.SchedulePhase;
import org.junit.Assert;
@@ -188,13 +187,13 @@
* reference graph.
*/
new ConditionalEliminationPhase(false).apply(graph, getProviders());
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
// a second canonicalizer is needed to process nested MaterializeNodes
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.NO);
new ConditionalEliminationPhase(false).apply(referenceGraph, getProviders());
- new CanonicalizerPhase().apply(referenceGraph, getProviders());
- new CanonicalizerPhase().apply(referenceGraph, getProviders());
+ this.createCanonicalizerPhase().apply(referenceGraph, getProviders());
+ this.createCanonicalizerPhase().apply(referenceGraph, getProviders());
assertEquals(referenceGraph, graph);
}
@@ -244,8 +243,8 @@
private <T extends Node> void testHelper(String snippet, Class<T> clazz) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
- new CanonicalizerPhase().apply(graph, getProviders());
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
DebugContext debug = graph.getDebug();
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph " + snippet);
Assert.assertFalse("shouldn't have nodes of type " + clazz, graph.getNodes().filter(clazz).iterator().hasNext());
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeReadEliminationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -119,7 +119,7 @@
public void testEarlyReadElimination(StructuredGraph graph, int reads, int writes) {
CoreProviders context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
new EarlyReadEliminationPhase(canonicalizer).apply(graph, context);
Assert.assertEquals(3, graph.getNodes().filter(UnsafeAccessNode.class).count());
@@ -134,7 +134,7 @@
public void testPartialEscapeReadElimination(StructuredGraph graph, int reads, int writes) {
OptionValues options = graph.getOptions();
CoreProviders context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
new PartialEscapePhase(true, true, canonicalizer, null, options).apply(graph, context);
Assert.assertEquals(3, graph.getNodes().filter(UnsafeAccessNode.class).count());
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeVirtualizationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnsafeVirtualizationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -147,7 +147,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
OptionValues options = graph.getOptions();
CoreProviders context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
if (canonicalizeBefore) {
canonicalizer.apply(graph, context);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnusedArray.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/UnusedArray.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,7 +30,6 @@
import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.java.NewArrayNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Test;
public class UnusedArray extends GraalCompilerTest {
@@ -66,7 +65,7 @@
public void test(String method) {
StructuredGraph graph = parseEager(method, StructuredGraph.AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
NodeIterable<NewArrayNode> newArrayNodes = graph.getNodes().filter(NewArrayNode.class);
assertThat(newArrayNodes, isEmpty());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/deopt/CompiledMethodTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -29,7 +29,6 @@
import org.graalvm.compiler.nodes.ConstantNode;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.junit.Assert;
import org.junit.Test;
@@ -62,7 +61,7 @@
public void test1() {
final ResolvedJavaMethod javaMethod = getResolvedJavaMethod("testMethod");
final StructuredGraph graph = parseEager(javaMethod, AllowAssumptions.NO);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
new DeadCodeEliminationPhase().apply(graph);
for (ConstantNode node : ConstantNode.getConstantNodes(graph)) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EATestBase.java Thu Nov 07 18:44:09 2019 +0000
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.java.NewInstanceNode;
import org.graalvm.compiler.nodes.virtual.AllocatedObjectNode;
import org.graalvm.compiler.nodes.virtual.CommitAllocationNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
@@ -173,7 +172,7 @@
createInliningPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
canonicalizeGraph();
- new PartialEscapePhase(iterativeEscapeAnalysis, false, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(iterativeEscapeAnalysis, false, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
postEACanonicalizeGraph();
returnNodes = graph.getNodes(ReturnNode.TYPE).snapshot();
} catch (Throwable e) {
@@ -185,6 +184,6 @@
}
protected void canonicalizeGraph() {
- new CanonicalizerPhase().apply(graph, context);
+ this.createCanonicalizerPhase().apply(graph, context);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EarlyReadEliminationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,9 @@
import java.util.List;
import org.graalvm.compiler.core.test.GraalCompilerTest;
+import org.graalvm.compiler.graph.Node;
+import org.graalvm.compiler.nodes.IfNode;
+import org.graalvm.compiler.nodes.LogicConstantNode;
import org.graalvm.compiler.nodes.ProxyNode;
import org.graalvm.compiler.nodes.ReturnNode;
import org.graalvm.compiler.nodes.StructuredGraph;
@@ -37,7 +40,6 @@
import org.graalvm.compiler.nodes.java.StoreFieldNode;
import org.graalvm.compiler.nodes.memory.ReadNode;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.virtual.phases.ea.EarlyReadEliminationPhase;
@@ -47,6 +49,50 @@
public static Object staticField;
+ static void cfgSnippet() {
+ if (staticField != null) {
+ staticField = 12;
+ if (staticField != null) {
+ staticField = 12;
+ }
+ if (staticField != null) {
+ staticField = 12;
+ }
+ if (staticField != null) {
+ staticField = 12;
+ }
+ if (staticField != null) {
+ staticField = 12;
+ }
+ } else {
+ if (staticField != null) {
+ staticField = 12;
+ } else {
+ if (staticField != null) {
+ staticField = 12;
+ }
+ }
+ }
+ }
+
+ @Test
+ public void testDeadBranches() {
+ StructuredGraph graph = parseEager(getResolvedJavaMethod("cfgSnippet"), AllowAssumptions.NO);
+ HighTierContext context = getDefaultHighTierContext();
+ int index = 0;
+ boolean[] conditions = new boolean[]{true, false, false, true, true, true, false};
+ /*
+ * Create a graph with "dead" branches in the beginning.
+ */
+ for (Node n : graph.getNodes()) {
+ if (n instanceof IfNode) {
+ IfNode ifNode = (IfNode) n;
+ ifNode.setCondition(LogicConstantNode.forBoolean(conditions[index++], graph));
+ }
+ }
+ new EarlyReadEliminationPhase(createCanonicalizerPhase()).apply(graph, context);
+ }
+
public static class TestObject {
public int x;
@@ -264,9 +310,9 @@
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
if (doLowering) {
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
}
- new EarlyReadEliminationPhase(new CanonicalizerPhase()).apply(graph, context);
+ new EarlyReadEliminationPhase(createCanonicalizerPhase()).apply(graph, context);
return graph;
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/EscapeAnalysisTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,6 @@
import org.graalvm.compiler.nodes.java.LoadFieldNode;
import org.graalvm.compiler.nodes.virtual.AllocatedObjectNode;
import org.graalvm.compiler.nodes.virtual.CommitAllocationNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.schedule.SchedulePhase;
import org.graalvm.compiler.test.SubprocessUtil;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
@@ -327,7 +326,7 @@
Assert.assertEquals(1, graph.getNodes().filter(BoxNode.class).count());
List<Node> nodes = graph.getNodes().snapshot();
// verify that an additional run doesn't add or remove nodes
- new PartialEscapePhase(false, false, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(false, false, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
Assert.assertEquals(nodes.size(), graph.getNodeCount());
for (Node node : nodes) {
Assert.assertTrue(node.isAlive());
@@ -362,9 +361,9 @@
Assert.assertEquals(2, graph.getNodes().filter(CommitAllocationNode.class).count());
// create the situation by removing the if
graph.replaceFixedWithFloating(graph.getNodes().filter(LoadFieldNode.class).first(), graph.unique(ConstantNode.forInt(0)));
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
// verify that an additional run removes all allocations
- new PartialEscapePhase(false, false, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(false, false, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
Assert.assertEquals(0, graph.getNodes().filter(CommitAllocationNode.class).count());
}
@@ -440,8 +439,8 @@
@Test
public void testFullyUnrolledLoop() {
prepareGraph("testFullyUnrolledLoopSnippet", false);
- new LoopFullUnrollPhase(new CanonicalizerPhase(), new DefaultLoopPolicies()).apply(graph, context);
- new PartialEscapePhase(false, new CanonicalizerPhase(), graph.getOptions()).apply(graph, context);
+ new LoopFullUnrollPhase(createCanonicalizerPhase(), new DefaultLoopPolicies()).apply(graph, context);
+ new PartialEscapePhase(false, createCanonicalizerPhase(), graph.getOptions()).apply(graph, context);
Assert.assertEquals(1, returnNodes.size());
Assert.assertTrue(returnNodes.get(0).result() instanceof AllocatedObjectNode);
CommitAllocationNode commit = ((AllocatedObjectNode) returnNodes.get(0).result()).getCommit();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.nodes.java.LoadIndexedNode;
import org.graalvm.compiler.nodes.java.StoreIndexedNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
import org.junit.Test;
@@ -181,7 +180,7 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
- new PartialEscapePhase(false, true, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(false, true, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
return graph;
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisIterationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisIterationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
import org.graalvm.compiler.nodes.extended.UnboxNode;
import org.graalvm.compiler.nodes.java.StoreFieldNode;
import org.graalvm.compiler.nodes.virtual.CommitAllocationNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
import org.junit.Assert;
import org.junit.Test;
@@ -147,7 +146,7 @@
for (String name : new String[]{"noLoopIterationEmpty", "noLoopIteration"}) {
prepareGraph(name, false);
List<CommitAllocationNode> allocations = graph.getNodes().filter(CommitAllocationNode.class).snapshot();
- new PartialEscapePhase(true, false, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(true, false, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
Assert.assertEquals(1, allocations.size());
Assert.assertTrue(allocations.get(0).isAlive());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,6 @@
import org.graalvm.compiler.nodes.java.NewInstanceNode;
import org.graalvm.compiler.nodes.java.StoreFieldNode;
import org.graalvm.compiler.nodes.virtual.CommitAllocationNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
/**
@@ -287,7 +286,7 @@
merge.setStateAfter(null);
}
new DeadCodeEliminationPhase().apply(graph);
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
try {
Assert.assertTrue("partial escape analysis should have removed all NewInstanceNode allocations", graph.getNodes().filter(NewInstanceNode.class).isEmpty());
Assert.assertTrue("partial escape analysis should have removed all NewArrayNode allocations", graph.getNodes().filter(NewArrayNode.class).isEmpty());
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTreesTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PartialEscapeAnalysisTreesTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
import org.graalvm.compiler.core.test.GraalCompilerTest;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.nodes.debug.BlackholeNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.junit.Assert;
import org.junit.Test;
@@ -118,7 +117,7 @@
graph.removeFixed(node);
}
new DeadCodeEliminationPhase().apply(graph);
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
InstalledCode code = getCode(method, graph, true);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PoorMansEATest.java Thu Nov 07 18:44:09 2019 +0000
@@ -35,7 +35,6 @@
import org.graalvm.compiler.nodes.java.NewInstanceNode;
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Test;
@@ -68,7 +67,7 @@
HighTierContext highTierContext = getDefaultHighTierContext();
createInliningPhase().apply(graph, highTierContext);
CoreProviders context = getProviders();
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
// remove framestates in order to trigger the simplification.
cleanup: for (FrameState fs : graph.getNodes(FrameState.TYPE).snapshot()) {
@@ -80,7 +79,7 @@
}
}
}
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
} catch (Throwable e) {
throw debug.handle(e);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/TrufflePEATest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/TrufflePEATest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.nodes.extended.RawStoreNode;
import org.graalvm.compiler.nodes.virtual.CommitAllocationNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
import org.junit.Test;
@@ -123,7 +122,7 @@
StructuredGraph graph = parseEager(snippet, StructuredGraph.AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
- new PartialEscapePhase(true, true, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
+ new PartialEscapePhase(true, true, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/UnsafeEATest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.extended.RawStoreNode;
import org.graalvm.compiler.nodes.extended.UnsafeAccessNode;
import org.graalvm.compiler.nodes.java.LoadFieldNode;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Assert;
import org.junit.Test;
@@ -123,7 +122,7 @@
for (UnpackEndianHalfNode node : graph.getNodes().filter(UnpackEndianHalfNode.class)) {
node.lower(getTarget().arch.getByteOrder());
}
- new CanonicalizerPhase().applyIncremental(graph, context, mark);
+ createCanonicalizerPhase().applyIncremental(graph, context, mark);
}
private boolean testingUnsafe;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/InliningTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,6 @@
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.OptimisticOptimizations;
import org.graalvm.compiler.phases.PhaseSuite;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.junit.Assert;
@@ -291,10 +290,10 @@
: getDefaultGraphBuilderSuite();
HighTierContext context = new HighTierContext(getProviders(), graphBuilderSuite, OptimisticOptimizations.ALL);
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
createInliningPhase().apply(graph, context);
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/NestedLoopEffectsPhaseComplexityTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/inlining/NestedLoopEffectsPhaseComplexityTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -112,8 +112,8 @@
StructuredGraph g1 = prepareGraph(snippet, i);
StructuredGraph g2 = (StructuredGraph) g1.copy(g1.getDebug());
ResolvedJavaMethod method = g1.method();
- long elapsedRE = runAndTimePhase(g1, new EarlyReadEliminationPhase(new CanonicalizerPhase()));
- long elapsedPEA = runAndTimePhase(g2, new PartialEscapePhase(true, new CanonicalizerPhase(), g1.getOptions()));
+ long elapsedRE = runAndTimePhase(g1, new EarlyReadEliminationPhase(createCanonicalizerPhase()));
+ long elapsedPEA = runAndTimePhase(g2, new PartialEscapePhase(true, createCanonicalizerPhase(), g1.getOptions()));
if (LOG_PHASE_TIMINGS) {
TTY.printf("Needed %dms to run early partial escape analysis on a graph with %d nested loops compiling method %s\n", elapsedPEA, i, method);
}
@@ -138,7 +138,7 @@
StructuredGraph callerGraph = parseEager(callerMethod, AllowAssumptions.YES);
PhaseSuite<HighTierContext> graphBuilderSuite = getDefaultGraphBuilderSuite();
HighTierContext context = new HighTierContext(getProviders(), graphBuilderSuite, OptimisticOptimizations.ALL);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
Invoke next = callerGraph.getNodes(MethodCallTargetNode.TYPE).first().invoke();
StructuredGraph calleeGraph = parseBytecodes(next.callTarget().targetMethod(), context, canonicalizer);
ResolvedJavaMethod calleeMethod = next.callTarget().targetMethod();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/gen/NodeMatchRules.java Thu Nov 07 18:44:09 2019 +0000
@@ -63,6 +63,7 @@
import org.graalvm.compiler.nodes.java.ValueCompareAndSwapNode;
import org.graalvm.compiler.nodes.memory.FloatingReadNode;
import org.graalvm.compiler.nodes.memory.ReadNode;
+import org.graalvm.compiler.nodes.memory.VolatileReadNode;
import org.graalvm.compiler.nodes.memory.WriteNode;
import jdk.vm.ci.meta.Value;
@@ -75,6 +76,7 @@
@MatchableNode(nodeClass = LeftShiftNode.class, inputs = {"x", "y"}, ignoresSideEffects = true)
@MatchableNode(nodeClass = NarrowNode.class, inputs = {"value"}, ignoresSideEffects = true)
@MatchableNode(nodeClass = ReadNode.class, inputs = {"address"})
+@MatchableNode(nodeClass = VolatileReadNode.class, inputs = {"address"})
@MatchableNode(nodeClass = ReinterpretNode.class, inputs = {"value"}, ignoresSideEffects = true)
@MatchableNode(nodeClass = SignExtendNode.class, inputs = {"value"}, ignoresSideEffects = true)
@MatchableNode(nodeClass = UnsignedRightShiftNode.class, inputs = {"x", "y"}, ignoresSideEffects = true)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/BaseTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.core.phases;
+
+import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
+
+import org.graalvm.compiler.loop.DefaultLoopPolicies;
+import org.graalvm.compiler.loop.LoopPolicies;
+import org.graalvm.compiler.options.OptionValues;
+import org.graalvm.compiler.phases.PhaseSuite;
+import org.graalvm.compiler.phases.common.CanonicalizerPhase;
+
+public class BaseTier<C> extends PhaseSuite<C> {
+
+ public LoopPolicies createLoopPolicies() {
+ return new DefaultLoopPolicies();
+ }
+
+ public CanonicalizerPhase createCanonicalizerPhase(OptionValues options) {
+ CanonicalizerPhase canonicalizer = null;
+ if (ImmutableCode.getValue(options)) {
+ canonicalizer = CanonicalizerPhase.createWithoutReadCanonicalization();
+ } else {
+ canonicalizer = CanonicalizerPhase.create();
+ }
+ return canonicalizer;
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyHighTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,23 +24,16 @@
package org.graalvm.compiler.core.phases;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
-
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
-public class EconomyHighTier extends PhaseSuite<HighTierContext> {
+public class EconomyHighTier extends BaseTier<HighTierContext> {
public EconomyHighTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- }
-
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase(options);
appendPhase(canonicalizer);
appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER));
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyLowTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,29 +24,20 @@
package org.graalvm.compiler.core.phases;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
-
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.ExpandLogicPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.schedule.SchedulePhase;
import org.graalvm.compiler.phases.tiers.LowTierContext;
-public class EconomyLowTier extends PhaseSuite<LowTierContext> {
+public class EconomyLowTier extends BaseTier<LowTierContext> {
public EconomyLowTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- }
-
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase(options);
appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.LOW_TIER));
-
appendPhase(new ExpandLogicPhase());
-
appendPhase(new SchedulePhase(SchedulePhase.SchedulingStrategy.LATEST_OUT_OF_LOOPS));
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/EconomyMidTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,11 +24,8 @@
package org.graalvm.compiler.core.phases;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
-
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.FrameStateAssignmentPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
@@ -38,23 +35,15 @@
import org.graalvm.compiler.phases.common.WriteBarrierAdditionPhase;
import org.graalvm.compiler.phases.tiers.MidTierContext;
-public class EconomyMidTier extends PhaseSuite<MidTierContext> {
+public class EconomyMidTier extends BaseTier<MidTierContext> {
public EconomyMidTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- }
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase(options);
appendPhase(new RemoveValueProxyPhase());
-
appendPhase(new LoopSafepointInsertionPhase());
-
appendPhase(new GuardLoweringPhase());
-
appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.MID_TIER));
-
appendPhase(new FrameStateAssignmentPhase());
-
appendPhase(new WriteBarrierAdditionPhase());
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/HighTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -25,17 +25,16 @@
package org.graalvm.compiler.core.phases;
import static org.graalvm.compiler.core.common.GraalOptions.ConditionalElimination;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
import static org.graalvm.compiler.core.common.GraalOptions.LoopPeeling;
import static org.graalvm.compiler.core.common.GraalOptions.LoopUnswitch;
import static org.graalvm.compiler.core.common.GraalOptions.OptConvertDeoptsToGuards;
-import static org.graalvm.compiler.core.common.GraalOptions.OptLoopTransform;
import static org.graalvm.compiler.core.common.GraalOptions.OptReadElimination;
import static org.graalvm.compiler.core.common.GraalOptions.PartialEscapeAnalysis;
import static org.graalvm.compiler.phases.common.DeadCodeEliminationPhase.Optionality.Optional;
import org.graalvm.compiler.loop.DefaultLoopPolicies;
import org.graalvm.compiler.loop.LoopPolicies;
+import org.graalvm.compiler.loop.phases.ConvertDeoptimizeToGuardPhase;
import org.graalvm.compiler.loop.phases.LoopFullUnrollPhase;
import org.graalvm.compiler.loop.phases.LoopPeelingPhase;
import org.graalvm.compiler.loop.phases.LoopUnswitchingPhase;
@@ -44,22 +43,19 @@
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionType;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
-import org.graalvm.compiler.loop.phases.ConvertDeoptimizeToGuardPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.common.IncrementalCanonicalizerPhase;
import org.graalvm.compiler.phases.common.IterativeConditionalEliminationPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.common.NodeCounterPhase;
-import org.graalvm.compiler.phases.common.RemoveValueProxyPhase;
import org.graalvm.compiler.phases.common.inlining.InliningPhase;
import org.graalvm.compiler.phases.common.inlining.policy.GreedyInliningPolicy;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.virtual.phases.ea.EarlyReadEliminationPhase;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
-public class HighTier extends PhaseSuite<HighTierContext> {
+public class HighTier extends BaseTier<HighTierContext> {
public static class Options {
@@ -70,11 +66,7 @@
}
public HighTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- }
-
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase(options);
appendPhase(canonicalizer);
if (NodeCounterPhase.Options.NodeCounters.getValue(options)) {
@@ -101,13 +93,12 @@
LoopPolicies loopPolicies = createLoopPolicies();
appendPhase(new LoopFullUnrollPhase(canonicalizer, loopPolicies));
- if (OptLoopTransform.getValue(options)) {
- if (LoopPeeling.getValue(options)) {
- appendPhase(new IncrementalCanonicalizerPhase<>(canonicalizer, new LoopPeelingPhase(loopPolicies)));
- }
- if (LoopUnswitch.getValue(options)) {
- appendPhase(new IncrementalCanonicalizerPhase<>(canonicalizer, new LoopUnswitchingPhase(loopPolicies)));
- }
+ if (LoopPeeling.getValue(options)) {
+ appendPhase(new IncrementalCanonicalizerPhase<>(canonicalizer, new LoopPeelingPhase(loopPolicies)));
+ }
+
+ if (LoopUnswitch.getValue(options)) {
+ appendPhase(new IncrementalCanonicalizerPhase<>(canonicalizer, new LoopUnswitchingPhase(loopPolicies)));
}
if (PartialEscapeAnalysis.getValue(options)) {
@@ -118,8 +109,6 @@
appendPhase(new EarlyReadEliminationPhase(canonicalizer));
}
- appendPhase(new RemoveValueProxyPhase());
-
if (NodeCounterPhase.Options.NodeCounters.getValue(options)) {
appendPhase(new NodeCounterPhase(NodeCounterPhase.Stage.LATE));
}
@@ -127,6 +116,7 @@
appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER));
}
+ @Override
public LoopPolicies createLoopPolicies() {
return new DefaultLoopPolicies();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/LowTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,7 +24,7 @@
package org.graalvm.compiler.core.phases;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
+import static org.graalvm.compiler.core.common.GraalOptions.LateMembars;
import static org.graalvm.compiler.phases.common.DeadCodeEliminationPhase.Optionality.Required;
import org.graalvm.compiler.core.common.GraalOptions;
@@ -33,11 +33,11 @@
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionType;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.common.ExpandLogicPhase;
import org.graalvm.compiler.phases.common.FixReadsPhase;
+import org.graalvm.compiler.phases.common.InsertMembarsPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.common.ProfileCompiledMethodsPhase;
import org.graalvm.compiler.phases.common.PropagateDeoptimizeProbabilityPhase;
@@ -46,7 +46,7 @@
import org.graalvm.compiler.phases.schedule.SchedulePhase.SchedulingStrategy;
import org.graalvm.compiler.phases.tiers.LowTierContext;
-public class LowTier extends PhaseSuite<LowTierContext> {
+public class LowTier extends BaseTier<LowTierContext> {
static class Options {
@@ -58,13 +58,8 @@
}
public LowTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- CanonicalizerPhase canonicalizerWithoutGVN = new CanonicalizerPhase();
- canonicalizerWithoutGVN.disableGVN();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- canonicalizerWithoutGVN.disableReadCanonicalization();
- }
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase(options);
+ CanonicalizerPhase canonicalizerWithoutGVN = canonicalizer.copyWithoutGVN();
if (Options.ProfileCompiledMethods.getValue(options)) {
appendPhase(new ProfileCompiledMethodsPhase());
@@ -85,6 +80,9 @@
appendPhase(new PropagateDeoptimizeProbabilityPhase());
+ if (LateMembars.getValue(options)) {
+ appendPhase(new InsertMembarsPhase());
+ }
appendPhase(new SchedulePhase(SchedulePhase.SchedulingStrategy.LATEST_OUT_OF_LOOPS));
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core/src/org/graalvm/compiler/core/phases/MidTier.java Thu Nov 07 18:44:09 2019 +0000
@@ -25,10 +25,8 @@
package org.graalvm.compiler.core.phases;
import static org.graalvm.compiler.core.common.GraalOptions.ConditionalElimination;
-import static org.graalvm.compiler.core.common.GraalOptions.ImmutableCode;
import static org.graalvm.compiler.core.common.GraalOptions.OptDeoptimizationGrouping;
import static org.graalvm.compiler.core.common.GraalOptions.OptFloatingReads;
-import static org.graalvm.compiler.core.common.GraalOptions.OptLoopTransform;
import static org.graalvm.compiler.core.common.GraalOptions.PartialUnroll;
import static org.graalvm.compiler.core.common.GraalOptions.ReassociateInvariants;
import static org.graalvm.compiler.core.common.GraalOptions.VerifyHeapAtReturn;
@@ -43,7 +41,6 @@
import org.graalvm.compiler.loop.phases.ReassociateInvariantPhase;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.PhaseSuite;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeoptimizationGroupingPhase;
import org.graalvm.compiler.phases.common.FloatingReadPhase;
@@ -56,17 +53,15 @@
import org.graalvm.compiler.phases.common.LoopSafepointInsertionPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.common.OptimizeDivPhase;
+import org.graalvm.compiler.phases.common.RemoveValueProxyPhase;
import org.graalvm.compiler.phases.common.VerifyHeapAtReturnPhase;
import org.graalvm.compiler.phases.common.WriteBarrierAdditionPhase;
import org.graalvm.compiler.phases.tiers.MidTierContext;
-public class MidTier extends PhaseSuite<MidTierContext> {
+public class MidTier extends BaseTier<MidTierContext> {
public MidTier(OptionValues options) {
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
- if (ImmutableCode.getValue(options)) {
- canonicalizer.disableReadCanonicalization();
- }
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase(options);
appendPhase(new LockEliminationPhase());
@@ -80,8 +75,6 @@
appendPhase(new LoopSafepointEliminationPhase());
- appendPhase(new LoopSafepointInsertionPhase());
-
appendPhase(new GuardLoweringPhase());
if (MitigateSpeculativeExecutionAttacks.getValue(options) == GuardTargets || MitigateSpeculativeExecutionAttacks.getValue(options) == NonDeoptGuardTargets) {
@@ -92,18 +85,21 @@
appendPhase(new VerifyHeapAtReturnPhase());
}
+ appendPhase(new IncrementalCanonicalizerPhase<>(canonicalizer, new RemoveValueProxyPhase()));
+
+ appendPhase(new LoopSafepointInsertionPhase());
+
appendPhase(new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.MID_TIER));
appendPhase(new OptimizeDivPhase());
appendPhase(new FrameStateAssignmentPhase());
- LoopPolicies loopPolicies = createLoopPolicies();
- if (OptLoopTransform.getValue(options)) {
- if (PartialUnroll.getValue(options)) {
- appendPhase(new LoopPartialUnrollPhase(loopPolicies, canonicalizer));
- }
+ if (PartialUnroll.getValue(options)) {
+ LoopPolicies loopPolicies = createLoopPolicies();
+ appendPhase(new LoopPartialUnrollPhase(loopPolicies, canonicalizer));
}
+
if (ReassociateInvariants.getValue(options)) {
appendPhase(new ReassociateInvariantPhase());
}
@@ -117,6 +113,7 @@
appendPhase(new WriteBarrierAdditionPhase());
}
+ @Override
public LoopPolicies createLoopPolicies() {
return new DefaultLoopPolicies();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.aarch64/src/org/graalvm/compiler/hotspot/aarch64/AArch64HotSpotBackendFactory.java Thu Nov 07 18:44:09 2019 +0000
@@ -100,6 +100,7 @@
public HotSpotBackend createBackend(HotSpotGraalRuntimeProvider graalRuntime, CompilerConfiguration compilerConfiguration, HotSpotJVMCIRuntime jvmciRuntime, HotSpotBackend host) {
assert host == null;
+ OptionValues options = graalRuntime.getOptions();
JVMCIBackend jvmci = jvmciRuntime.getHostJVMCIBackend();
GraalHotSpotVMConfig config = graalRuntime.getVMConfig();
HotSpotProviders providers;
@@ -156,7 +157,7 @@
}
try (InitTimer rt = timer("create GraphBuilderPhase plugins")) {
plugins = createGraphBuilderPlugins(graalRuntime, compilerConfiguration, config, constantReflection, foreignCalls, metaAccess, snippetReflection, replacements, wordTypes,
- graalRuntime.getOptions());
+ graalRuntime.getOptions(), target);
replacements.setGraphBuilderPlugins(plugins);
}
try (InitTimer rt = timer("create Suites provider")) {
@@ -165,6 +166,7 @@
providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, suites, registers,
snippetReflection, wordTypes, plugins, gc);
replacements.setProviders(providers);
+ replacements.maybeInitializeEncoder(options);
}
try (InitTimer rt = timer("instantiate backend")) {
return createBackend(config, graalRuntime, providers);
@@ -180,7 +182,8 @@
HotSpotSnippetReflectionProvider snippetReflection,
HotSpotReplacementsImpl replacements,
HotSpotWordTypes wordTypes,
- OptionValues options) {
+ OptionValues options,
+ TargetDescription target) {
Plugins plugins = HotSpotGraphBuilderPlugins.create(graalRuntime,
compilerConfiguration,
config,
@@ -190,8 +193,9 @@
snippetReflection,
foreignCalls,
replacements,
- options);
- AArch64GraphBuilderPlugins.register(plugins, replacements.getDefaultReplacementBytecodeProvider(), false,
+ options,
+ target);
+ AArch64GraphBuilderPlugins.register(plugins, replacements, false, //
/* registerMathPlugins */true, /* emitJDK9StringSubstitutions */true, config.useFMAIntrinsics);
return plugins;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotBackendFactory.java Thu Nov 07 18:44:09 2019 +0000
@@ -158,6 +158,7 @@
providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, suites, registers,
snippetReflection, wordTypes, plugins, gc);
replacements.setProviders(providers);
+ replacements.maybeInitializeEncoder(options);
}
try (InitTimer rt = timer("instantiate backend")) {
return createBackend(config, graalRuntime, providers);
@@ -185,8 +186,9 @@
snippetReflection,
foreignCalls,
replacements,
- options);
- AMD64GraphBuilderPlugins.register(plugins, replacements.getDefaultReplacementBytecodeProvider(), (AMD64) target.arch, false, JavaVersionUtil.JAVA_SPEC >= 9, config.useFMAIntrinsics);
+ options,
+ target);
+ AMD64GraphBuilderPlugins.register(plugins, replacements, (AMD64) target.arch, false, JavaVersionUtil.JAVA_SPEC >= 9, config.useFMAIntrinsics);
return plugins;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.sparc/src/org/graalvm/compiler/hotspot/sparc/SPARCHotSpotBackendFactory.java Thu Nov 07 18:44:09 2019 +0000
@@ -87,6 +87,7 @@
public HotSpotBackend createBackend(HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, HotSpotJVMCIRuntime jvmciRuntime, HotSpotBackend host) {
assert host == null;
+ OptionValues options = runtime.getOptions();
GraalHotSpotVMConfig config = runtime.getVMConfig();
JVMCIBackend jvmci = jvmciRuntime.getHostJVMCIBackend();
HotSpotRegistersProvider registers = createRegisters();
@@ -106,12 +107,13 @@
BytecodeProvider bytecodeProvider = createBytecodeProvider(metaAccess, snippetReflection);
HotSpotReplacementsImpl replacements = createReplacements(target, p, snippetReflection, bytecodeProvider);
Plugins plugins = createGraphBuilderPlugins(runtime, compilerConfiguration, config, metaAccess, constantReflection, foreignCalls, snippetReflection, replacements, wordTypes,
- runtime.getOptions());
+ runtime.getOptions(), target);
replacements.setGraphBuilderPlugins(plugins);
HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins, replacements);
HotSpotProviders providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, constantFieldProvider, foreignCalls, lowerer, replacements, suites, registers,
snippetReflection, wordTypes, plugins, gc);
replacements.setProviders(providers);
+ replacements.maybeInitializeEncoder(options);
return createBackend(config, runtime, providers);
}
@@ -125,7 +127,8 @@
HotSpotSnippetReflectionProvider snippetReflection,
HotSpotReplacementsImpl replacements,
HotSpotWordTypes wordTypes,
- OptionValues options) {
+ OptionValues options,
+ TargetDescription target) {
Plugins plugins = HotSpotGraphBuilderPlugins.create(
graalRuntime,
compilerConfiguration,
@@ -136,8 +139,9 @@
snippetReflection,
foreignCalls,
replacements,
- options);
- SPARCGraphBuilderPlugins.register(plugins, replacements.getDefaultReplacementBytecodeProvider(), false);
+ options,
+ target);
+ SPARCGraphBuilderPlugins.register(plugins, replacements, false);
return plugins;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CheckGraalIntrinsics.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,9 +24,6 @@
package org.graalvm.compiler.hotspot.test;
-import static org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins.aesDecryptName;
-import static org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins.aesEncryptName;
-
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
@@ -368,10 +365,6 @@
add(ignore,
"com/sun/crypto/provider/GHASH.processBlocks([BII[J[J)V");
}
- if (!(config.useSHA1Intrinsics() || config.useSHA256Intrinsics() || config.useSHA512Intrinsics())) {
- add(ignore,
- "sun/security/provider/DigestBase.implCompressMultiBlock0([BII)I");
- }
if (!config.useFMAIntrinsics) {
add(ignore,
"java/lang/Math.fma(DDD)D",
@@ -516,15 +509,16 @@
"java/util/zip/CRC32C.updateDirectByteBuffer(IJII)I");
}
- boolean implNames = HotSpotGraphBuilderPlugins.cbcUsesImplNames(config);
- String cbcEncryptName = implNames ? "implEncrypt" : "encrypt";
- String cbcDecryptName = implNames ? "implDecrypt" : "decrypt";
+ String cbcEncryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(config, "com/sun/crypto/provider/CipherBlockChaining", "implEncrypt", "encrypt");
+ String cbcDecryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(config, "com/sun/crypto/provider/CipherBlockChaining", "implDecrypt", "decrypt");
+ String aesEncryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(config, "com/sun/crypto/provider/AESCrypt", "implEncryptBlock", "encryptBlock");
+ String aesDecryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(config, "com/sun/crypto/provider/AESCrypt", "implDecryptBlock", "decryptBlock");
// AES intrinsics
if (!config.useAESIntrinsics) {
add(ignore,
+ "com/sun/crypto/provider/AESCrypt." + aesEncryptName + "([BI[BI)V",
"com/sun/crypto/provider/AESCrypt." + aesDecryptName + "([BI[BI)V",
- "com/sun/crypto/provider/AESCrypt." + aesEncryptName + "([BI[BI)V",
"com/sun/crypto/provider/CipherBlockChaining." + cbcDecryptName + "([BII[BI)I",
"com/sun/crypto/provider/CipherBlockChaining." + cbcEncryptName + "([BII[BI)I");
}
@@ -549,28 +543,21 @@
if (!config.useSquareToLenIntrinsic()) {
add(ignore, "java/math/BigInteger.implSquareToLen([II[II)[I");
}
-
+ // DigestBase intrinsics
+ if (HotSpotGraphBuilderPlugins.isIntrinsicName(config, "sun/security/provider/DigestBase", "implCompressMultiBlock0") &&
+ !(config.useSHA1Intrinsics() || config.useSHA256Intrinsics() || config.useSHA512Intrinsics())) {
+ add(ignore, "sun/security/provider/DigestBase.implCompressMultiBlock0([BII)I");
+ }
// SHA intrinsics
+ String shaCompressName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(config, "sun/security/provider/SHA", "implCompress0", "implCompress");
if (!config.useSHA1Intrinsics()) {
- if (isJDK9OrHigher()) {
- add(ignore, "sun/security/provider/SHA.implCompress0([BI)V");
- } else {
- add(ignore, "sun/security/provider/SHA.implCompress([BI)V");
- }
+ add(ignore, "sun/security/provider/SHA." + shaCompressName + "([BI)V");
}
if (!config.useSHA256Intrinsics()) {
- if (isJDK9OrHigher()) {
- add(ignore, "sun/security/provider/SHA2.implCompress0([BI)V");
- } else {
- add(ignore, "sun/security/provider/SHA2.implCompress([BI)V");
- }
+ add(ignore, "sun/security/provider/SHA2." + shaCompressName + "([BI)V");
}
if (!config.useSHA512Intrinsics()) {
- if (isJDK9OrHigher()) {
- add(ignore, "sun/security/provider/SHA5.implCompress0([BI)V");
- } else {
- add(ignore, "sun/security/provider/SHA5.implCompress([BI)V");
- }
+ add(ignore, "sun/security/provider/SHA5." + shaCompressName + "([BI)V");
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/CompileTheWorld.java Thu Nov 07 18:44:09 2019 +0000
@@ -101,10 +101,10 @@
import org.graalvm.compiler.options.OptionsParser;
import org.graalvm.compiler.serviceprovider.GraalUnsafeAccess;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
-import org.graalvm.compiler.test.ModuleSupport;
+import org.graalvm.compiler.api.test.ModuleSupport;
import jdk.internal.vm.compiler.libgraal.LibGraal;
import jdk.internal.vm.compiler.libgraal.LibGraalScope;
-import jdk.internal.vm.compiler.libgraal.OptionsEncoder;
+import org.graalvm.util.OptionsEncoder;
import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider;
import jdk.vm.ci.hotspot.HotSpotCompilationRequest;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ConstantPoolSubstitutionsTests.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,7 +34,7 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
-import org.graalvm.compiler.test.ModuleSupport;
+import org.graalvm.compiler.api.test.ModuleSupport;
import org.junit.BeforeClass;
import org.junit.Test;
import org.objectweb.asm.ClassWriter;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DeferredBarrierAdditionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/DeferredBarrierAdditionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,7 +38,6 @@
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.common.WriteBarrierAdditionPhase;
@@ -83,12 +82,12 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO, debug);
HighTierContext highContext = getDefaultHighTierContext();
MidTierContext midContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
- new InliningPhase(new InlineEverythingPolicy(), new CanonicalizerPhase()).apply(graph, highContext);
- new CanonicalizerPhase().apply(graph, highContext);
- new PartialEscapePhase(false, new CanonicalizerPhase(), debug.getOptions()).apply(graph, highContext);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highContext);
+ new InliningPhase(new InlineEverythingPolicy(), createCanonicalizerPhase()).apply(graph, highContext);
+ this.createCanonicalizerPhase().apply(graph, highContext);
+ new PartialEscapePhase(false, createCanonicalizerPhase(), debug.getOptions()).apply(graph, highContext);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highContext);
new GuardLoweringPhase().apply(graph, midContext);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
+ new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
new WriteBarrierAdditionPhase().apply(graph, midContext);
debug.dump(DebugContext.BASIC_LEVEL, graph, "After Write Barrier Addition");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotCryptoSubstitutionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -80,7 +80,9 @@
@Test
public void testAESCryptIntrinsics() throws Exception {
- if (compileAndInstall("com.sun.crypto.provider.AESCrypt", HotSpotGraphBuilderPlugins.aesEncryptName, HotSpotGraphBuilderPlugins.aesDecryptName)) {
+ String aesEncryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(runtime().getVMConfig(), "com/sun/crypto/provider/AESCrypt", "implEncryptBlock", "encryptBlock");
+ String aesDecryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(runtime().getVMConfig(), "com/sun/crypto/provider/AESCrypt", "implDecryptBlock", "decryptBlock");
+ if (compileAndInstall("com.sun.crypto.provider.AESCrypt", aesEncryptName, aesDecryptName)) {
ByteArrayOutputStream actual = new ByteArrayOutputStream();
actual.write(runEncryptDecrypt(aesKey, "AES/CBC/NoPadding"));
actual.write(runEncryptDecrypt(aesKey, "AES/CBC/PKCS5Padding"));
@@ -90,9 +92,8 @@
@Test
public void testCipherBlockChainingIntrinsics() throws Exception {
- boolean implNames = HotSpotGraphBuilderPlugins.cbcUsesImplNames(runtime().getVMConfig());
- String cbcEncryptName = implNames ? "implEncrypt" : "encrypt";
- String cbcDecryptName = implNames ? "implDecrypt" : "decrypt";
+ String cbcEncryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(runtime().getVMConfig(), "com/sun/crypto/provider/CipherBlockChaining", "implEncrypt", "encrypt");
+ String cbcDecryptName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(runtime().getVMConfig(), "com/sun/crypto/provider/CipherBlockChaining", "implDecrypt", "decrypt");
if (compileAndInstall("com.sun.crypto.provider.CipherBlockChaining", cbcEncryptName, cbcDecryptName)) {
ByteArrayOutputStream actual = new ByteArrayOutputStream();
actual.write(runEncryptDecrypt(aesKey, "AES/CBC/NoPadding"));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotInvokeDynamicPluginTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotInvokeDynamicPluginTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -93,7 +93,7 @@
StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true));
MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
Assert.assertEquals(expectedResolves, graph.getNodes().filter(ResolveDynamicConstantNode.class).count());
Assert.assertEquals(0, graph.getNodes().filter(ResolveDynamicStubCall.class).count());
CoreProviders context = getProviders();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/HotSpotMethodSubstitutionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,12 +28,13 @@
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
-import org.graalvm.compiler.nodes.IfNode;
-import org.junit.Test;
-
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
+import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
+import org.graalvm.compiler.hotspot.HotSpotBackend;
+import org.graalvm.compiler.nodes.IfNode;
import org.graalvm.compiler.replacements.test.MethodSubstitutionTest;
+import org.junit.Test;
/**
* Tests HotSpot specific {@link MethodSubstitution}s.
@@ -133,13 +134,18 @@
@Test
public void testThreadSubstitutions() {
+ GraalHotSpotVMConfig config = ((HotSpotBackend) getBackend()).getRuntime().getVMConfig();
testGraph("currentThread");
- assertInGraph(testGraph("threadIsInterrupted", "isInterrupted", true), IfNode.class);
- assertInGraph(testGraph("threadInterrupted", "isInterrupted", true), IfNode.class);
+ if (config.osThreadInterruptedOffset != Integer.MAX_VALUE) {
+ assertInGraph(testGraph("threadIsInterrupted", "isInterrupted", true), IfNode.class);
+ assertInGraph(testGraph("threadInterrupted", "isInterrupted", true), IfNode.class);
+ }
Thread currentThread = Thread.currentThread();
test("currentThread", currentThread);
- test("threadIsInterrupted", currentThread);
+ if (config.osThreadInterruptedOffset != Integer.MAX_VALUE) {
+ test("threadIsInterrupted", currentThread);
+ }
}
@SuppressWarnings("all")
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReplaceConstantNodesPhaseTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReplaceConstantNodesPhaseTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -117,7 +117,7 @@
private void test(String name, int expectedInits, int expectedResolves, int expectedLoads) {
StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true));
HighTierContext highTierContext = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new EliminateRedundantInitializationPhase().apply(graph, highTierContext);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
new LoadJavaMirrorWithKlassPhase(config).apply(graph, highTierContext);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/TestSHASubstitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,9 +34,7 @@
import org.graalvm.compiler.api.test.Graal;
import org.graalvm.compiler.hotspot.GraalHotSpotVMConfig;
import org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider;
-import org.graalvm.compiler.hotspot.replacements.SHA2Substitutions;
-import org.graalvm.compiler.hotspot.replacements.SHA5Substitutions;
-import org.graalvm.compiler.hotspot.replacements.SHASubstitutions;
+import org.graalvm.compiler.hotspot.meta.HotSpotGraphBuilderPlugins;
import org.graalvm.compiler.runtime.RuntimeProvider;
import jdk.vm.ci.code.InstalledCode;
@@ -74,7 +72,8 @@
@Test
public void testSha1() {
if (getConfig().useSHA1Intrinsics()) {
- testWithInstalledIntrinsic("sun.security.provider.SHA", SHASubstitutions.implCompressName, "testDigest", "SHA-1", getData());
+ String implCompressName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(getConfig(), "sun/security/provider/SHA", "implCompress0", "implCompress");
+ testWithInstalledIntrinsic("sun.security.provider.SHA", implCompressName, "testDigest", "SHA-1", getData());
}
}
@@ -107,14 +106,16 @@
@Test
public void testSha256() {
if (getConfig().useSHA256Intrinsics()) {
- testWithInstalledIntrinsic("sun.security.provider.SHA2", SHA2Substitutions.implCompressName, "testDigest", "SHA-256", getData());
+ String implCompressName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(getConfig(), "sun/security/provider/SHA", "implCompress0", "implCompress");
+ testWithInstalledIntrinsic("sun.security.provider.SHA2", implCompressName, "testDigest", "SHA-256", getData());
}
}
@Test
public void testSha512() {
if (getConfig().useSHA512Intrinsics()) {
- testWithInstalledIntrinsic("sun.security.provider.SHA5", SHA5Substitutions.implCompressName, "testDigest", "SHA-512", getData());
+ String implCompressName = HotSpotGraphBuilderPlugins.lookupIntrinsicName(getConfig(), "sun/security/provider/SHA", "implCompress0", "implCompress");
+ testWithInstalledIntrinsic("sun.security.provider.SHA5", implCompressName, "testDigest", "SHA-512", getData());
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/WriteBarrierAdditionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -44,7 +44,6 @@
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
import org.graalvm.compiler.nodes.spi.LoweringTool;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.GuardLoweringPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.common.WriteBarrierAdditionPhase;
@@ -263,11 +262,11 @@
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO, debug);
HighTierContext highContext = getDefaultHighTierContext();
MidTierContext midContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
- new InliningPhase(new InlineEverythingPolicy(), new CanonicalizerPhase()).apply(graph, highContext);
- new CanonicalizerPhase().apply(graph, highContext);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highContext);
+ new InliningPhase(new InlineEverythingPolicy(), createCanonicalizerPhase()).apply(graph, highContext);
+ this.createCanonicalizerPhase().apply(graph, highContext);
+ new LoweringPhase(this.createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highContext);
new GuardLoweringPhase().apply(graph, midContext);
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
+ new LoweringPhase(this.createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, midContext);
new WriteBarrierAdditionPhase().apply(graph, midContext);
debug.dump(DebugContext.BASIC_LEVEL, graph, "After Write Barrier Addition");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/GraalHotSpotVMConfig.java Thu Nov 07 18:44:09 2019 +0000
@@ -315,7 +315,7 @@
public final int javaThreadAnchorOffset = getFieldOffset("JavaThread::_anchor", Integer.class, "JavaFrameAnchor");
public final int javaThreadShouldPostOnExceptionsFlagOffset = getFieldOffset("JavaThread::_should_post_on_exceptions_flag", Integer.class, "int", Integer.MIN_VALUE);
public final int threadObjectOffset = getFieldOffset("JavaThread::_threadObj", Integer.class, "oop");
- public final int osThreadOffset = getFieldOffset("JavaThread::_osthread", Integer.class, "OSThread*");
+ public final int osThreadOffset = getFieldOffset("JavaThread::_osthread", Integer.class, "OSThread*", Integer.MAX_VALUE);
public final int threadIsMethodHandleReturnOffset = getFieldOffset("JavaThread::_is_method_handle_return", Integer.class, "int");
public final int threadObjectResultOffset = getFieldOffset("JavaThread::_vm_result", Integer.class, "oop");
public final int jvmciCountersThreadOffset = getFieldOffset("JavaThread::_jvmci_counters", Integer.class, "jlong*");
@@ -419,7 +419,7 @@
public final int frameInterpreterFrameSenderSpOffset = getConstant("frame::interpreter_frame_sender_sp_offset", Integer.class, intRequiredOnAMD64);
public final int frameInterpreterFrameLastSpOffset = getConstant("frame::interpreter_frame_last_sp_offset", Integer.class, intRequiredOnAMD64);
- public final int osThreadInterruptedOffset = getFieldOffset("OSThread::_interrupted", Integer.class, "jint");
+ public final int osThreadInterruptedOffset = getFieldOffset("OSThread::_interrupted", Integer.class, "jint", Integer.MAX_VALUE);
public final long markWordHashShift = getConstant(markWordField("hash_shift"), Long.class);
@@ -714,7 +714,6 @@
return true;
}
- public final long threadIsInterruptedAddress = getAddress("JVMCIRuntime::thread_is_interrupted");
public final long vmMessageAddress = getAddress("JVMCIRuntime::vm_message");
public final long identityHashCodeAddress = getAddress("JVMCIRuntime::identity_hash_code");
public final long exceptionHandlerForPcAddress = getAddress("JVMCIRuntime::exception_handler_for_pc");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotReplacementsImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -72,26 +72,40 @@
replacements.getDefaultReplacementBytecodeProvider(), replacements.target);
}
+ public void maybeInitializeEncoder(OptionValues options) {
+ if (IS_BUILDING_NATIVE_IMAGE || UseEncodedGraphs.getValue(options)) {
+ synchronized (HotSpotReplacementsImpl.class) {
+ if (snippetEncoder == null) {
+ snippetEncoder = new SymbolicSnippetEncoder(this);
+ }
+ }
+ }
+ }
+
@Override
public Class<? extends GraphBuilderPlugin> getIntrinsifyingPlugin(ResolvedJavaMethod method) {
return method.getAnnotation(HotSpotOperation.class) != null ? HotSpotWordOperationPlugin.class : super.getIntrinsifyingPlugin(method);
}
@Override
- public void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options) {
- if (!IS_IN_NATIVE_IMAGE) {
- if (IS_BUILDING_NATIVE_IMAGE || UseEncodedGraphs.getValue(options)) {
- synchronized (HotSpotReplacementsImpl.class) {
- if (snippetEncoder == null) {
- snippetEncoder = new SymbolicSnippetEncoder(this);
- }
- snippetEncoder.registerMethodSubstitution(plugin, original, context, options);
- }
- }
+ public void registerMethodSubstitution(MethodSubstitutionPlugin plugin) {
+ if (snippetEncoder != null) {
+ snippetEncoder.registerMethodSubstitution(plugin);
}
}
@Override
+ public void registerConditionalPlugin(InvocationPlugin plugin) {
+ if (snippetEncoder != null) {
+ snippetEncoder.registerConditionalPlugin(plugin);
+ }
+ }
+
+ public void checkRegistered(MethodSubstitutionPlugin plugin) {
+ snippetEncoder.checkRegistered(plugin);
+ }
+
+ @Override
public StructuredGraph getIntrinsicGraph(ResolvedJavaMethod method, CompilationIdentifier compilationId, DebugContext debug, Cancellable cancellable) {
boolean useEncodedGraphs = UseEncodedGraphs.getValue(debug.getOptions());
if (IS_IN_NATIVE_IMAGE || useEncodedGraphs) {
@@ -99,8 +113,9 @@
InvocationPlugin plugin = replacements.getGraphBuilderPlugins().getInvocationPlugins().lookupInvocation(method);
if (plugin instanceof MethodSubstitutionPlugin) {
MethodSubstitutionPlugin msp = (MethodSubstitutionPlugin) plugin;
- if (useEncodedGraphs) {
- replacements.registerMethodSubstitution(msp, method, ROOT_COMPILATION, debug.getOptions());
+ if (!IS_IN_NATIVE_IMAGE && useEncodedGraphs) {
+ replacements.maybeInitializeEncoder(debug.getOptions());
+ replacements.registerMethodSubstitution(msp);
}
StructuredGraph methodSubstitution = replacements.getMethodSubstitution(msp, method, ROOT_COMPILATION, StructuredGraph.AllowAssumptions.YES, cancellable, debug.getOptions());
methodSubstitution.resetDebug(debug);
@@ -119,7 +134,8 @@
if (plugin instanceof MethodSubstitutionPlugin && (!plugin.inlineOnly() || invokeBci >= 0)) {
MethodSubstitutionPlugin msPlugin = (MethodSubstitutionPlugin) plugin;
if (!IS_IN_NATIVE_IMAGE && useEncodedGraphs) {
- registerMethodSubstitution(msPlugin, targetMethod, INLINE_AFTER_PARSING, options);
+ maybeInitializeEncoder(options);
+ registerMethodSubstitution(msPlugin);
}
// This assumes the normal path creates the graph using
// GraphBuilderConfiguration.getSnippetDefault with omits exception edges
@@ -155,9 +171,6 @@
assert registeredSnippets.add(method) : "Cannot register snippet twice: " + method.format("%H.%n(%p)");
if (IS_BUILDING_NATIVE_IMAGE || UseEncodedGraphs.getValue(options)) {
synchronized (HotSpotReplacementsImpl.class) {
- if (snippetEncoder == null) {
- snippetEncoder = new SymbolicSnippetEncoder(this);
- }
snippetEncoder.registerSnippet(method, original, receiver, trackNodeSourcePosition, options);
}
}
@@ -169,7 +182,10 @@
snippetRegistrationClosed = true;
}
- private static SymbolicSnippetEncoder.EncodedSnippets getEncodedSnippets() {
+ private static SymbolicSnippetEncoder.EncodedSnippets getEncodedSnippets(OptionValues options) {
+ if (!IS_IN_NATIVE_IMAGE && snippetEncoder != null) {
+ snippetEncoder.encode(options);
+ }
return encodedSnippets;
}
@@ -210,20 +226,15 @@
@SuppressWarnings("try")
private StructuredGraph getEncodedSnippet(ResolvedJavaMethod method, Object[] args, StructuredGraph.AllowAssumptions allowAssumptions, OptionValues options) {
- boolean useEncodedGraphs = UseEncodedGraphs.getValue(options);
- if (IS_IN_NATIVE_IMAGE || useEncodedGraphs) {
+ if (IS_IN_NATIVE_IMAGE || UseEncodedGraphs.getValue(options)) {
synchronized (HotSpotReplacementsImpl.class) {
- if (!IS_IN_NATIVE_IMAGE) {
- snippetEncoder.encode(options);
- }
-
- if (getEncodedSnippets() == null) {
+ if (getEncodedSnippets(options) == null) {
throw GraalError.shouldNotReachHere("encoded snippets not found");
}
// Snippets graphs can contain foreign object reference and
// outlive a single compilation.
try (CompilationContext scope = HotSpotGraalServices.enterGlobalCompilationContext()) {
- StructuredGraph graph = getEncodedSnippets().getEncodedSnippet(method, this, args, allowAssumptions, options);
+ StructuredGraph graph = getEncodedSnippets(options).getEncodedSnippet(method, this, args, allowAssumptions, options);
if (graph == null) {
throw GraalError.shouldNotReachHere("snippet not found: " + method.format("%H.%n(%p)"));
}
@@ -239,16 +250,11 @@
@Override
public StructuredGraph getMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context,
StructuredGraph.AllowAssumptions allowAssumptions, Cancellable cancellable, OptionValues options) {
- boolean useEncodedGraphs = UseEncodedGraphs.getValue(options);
- if (IS_IN_NATIVE_IMAGE || useEncodedGraphs) {
- if (!IS_IN_NATIVE_IMAGE) {
- snippetEncoder.encode(options);
- }
-
- if (getEncodedSnippets() == null) {
+ if (IS_IN_NATIVE_IMAGE || UseEncodedGraphs.getValue(options)) {
+ if (getEncodedSnippets(options) == null) {
throw GraalError.shouldNotReachHere("encoded snippets not found");
}
- return getEncodedSnippets().getMethodSubstitutionGraph(plugin, original, this, context, allowAssumptions, cancellable, options);
+ return getEncodedSnippets(options).getMethodSubstitutionGraph(plugin, original, this, context, allowAssumptions, cancellable, options);
}
return null;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/SymbolicSnippetEncoder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/SymbolicSnippetEncoder.java Thu Nov 07 18:44:09 2019 +0000
@@ -30,6 +30,7 @@
import static org.graalvm.compiler.core.common.GraalOptions.UseEncodedGraphs;
import static org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin.InlineInfo.createIntrinsicInlineInfo;
import static org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext.CompilationContext.INLINE_AFTER_PARSING;
+import static org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext.CompilationContext.ROOT_COMPILATION;
import java.util.ArrayList;
import java.util.Arrays;
@@ -156,6 +157,12 @@
*/
private Map<String, StructuredGraph> preparedSnippetGraphs = new HashMap<>();
+ private Set<MethodSubstitutionPlugin> knownPlugins = new HashSet<>();
+
+ private Set<InvocationPlugin> conditionalPlugins = new HashSet<>();
+
+ private int preparedPlugins = 0;
+
/**
* The invocation plugins which were delayed during graph preparation.
*/
@@ -239,7 +246,7 @@
* for lookup.
*/
private static String methodKey(ResolvedJavaMethod method) {
- return method.format("%f %H.%n(%P)");
+ return method.format("%H.%n(%P)");
}
SymbolicSnippetEncoder(HotSpotReplacementsImpl replacements) {
@@ -255,15 +262,30 @@
this.snippetReplacements.setGraphBuilderPlugins(copy);
}
+ synchronized void registerMethodSubstitution(MethodSubstitutionPlugin plugin) {
+ knownPlugins.add(plugin);
+ }
+
+ void registerConditionalPlugin(InvocationPlugin plugin) {
+ conditionalPlugins.add(plugin);
+ }
+
+ synchronized void checkRegistered(MethodSubstitutionPlugin plugin) {
+ if (!knownPlugins.contains(plugin)) {
+ throw new GraalError("missing plugin should have been registered during construction");
+ }
+ }
+
/**
* Compiles the snippet and stores the graph.
*/
- synchronized void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options) {
+ private synchronized void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options) {
ResolvedJavaMethod method = plugin.getSubstitute(snippetReplacements.getProviders().getMetaAccess());
assert method.getAnnotation(MethodSubstitution.class) != null : "MethodSubstitution must be annotated with @" + MethodSubstitution.class.getSimpleName();
- StructuredGraph subst = buildGraph(method, original, null, true, false, context, options);
+ String originalMethodString = plugin.originalMethodAsString();
+ StructuredGraph subst = buildGraph(method, original, originalMethodString, null, true, false, context, options);
snippetMethods.add(method);
- originalMethods.put(methodKey(method), methodKey(original));
+ originalMethods.put(methodKey(method), originalMethodString);
preparedSnippetGraphs.put(plugin.toString() + context, subst);
}
@@ -370,7 +392,7 @@
}
}
- private StructuredGraph buildGraph(ResolvedJavaMethod method, ResolvedJavaMethod original, Object receiver, boolean requireInlining, boolean trackNodeSourcePosition,
+ private StructuredGraph buildGraph(ResolvedJavaMethod method, ResolvedJavaMethod original, String originalMethodString, Object receiver, boolean requireInlining, boolean trackNodeSourcePosition,
IntrinsicContext.CompilationContext context, OptionValues options) {
assert method.hasBytecodes() : "Snippet must not be abstract or native";
Object[] args = null;
@@ -378,7 +400,13 @@
args = new Object[method.getSignature().getParameterCount(true)];
args[0] = receiver;
}
- try (DebugContext debug = openDebugContext("Snippet_", method, options)) {
+ // To get dumping out from this context during image building, it's necessary to pass the
+ // dumping options directly to the VM, otherwise they aren't available during initialization
+ // of the backend. Use this:
+ //
+ // -J-Dgraal.Dump=SymbolicSnippetEncoder_:2 -J-Dgraal.PrintGraph=File
+ // -J-Dgraal.DebugStubsAndSnippets=true
+ try (DebugContext debug = openDebugContext("SymbolicSnippetEncoder_", method, options)) {
StructuredGraph graph = snippetReplacements.makeGraph(debug, snippetReplacements.getDefaultReplacementBytecodeProvider(), method, args, original, trackNodeSourcePosition, null, context);
// Check if all methods which should be inlined are really inlined.
@@ -388,7 +416,7 @@
throw GraalError.shouldNotReachHere("method " + callee.format("%H.%n") + " not inlined in snippet " + method.getName() + " (maybe not final?)");
}
}
- assert verifySnippetEncodeDecode(method, original, trackNodeSourcePosition, graph);
+ assert verifySnippetEncodeDecode(debug, method, original, originalMethodString, trackNodeSourcePosition, graph);
debug.dump(DebugContext.VERBOSE_LEVEL, graph, "After buildGraph");
return graph;
}
@@ -426,46 +454,45 @@
}
@SuppressWarnings("try")
- private boolean verifySnippetEncodeDecode(ResolvedJavaMethod method, ResolvedJavaMethod original, boolean trackNodeSourcePosition, StructuredGraph graph) {
+ private boolean verifySnippetEncodeDecode(DebugContext debug, ResolvedJavaMethod method, ResolvedJavaMethod original, String originalMethodString, boolean trackNodeSourcePosition,
+ StructuredGraph graph) {
// Verify the encoding and decoding process
EncodedGraph encodedGraph = GraphEncoder.encodeSingleGraph(graph, HotSpotJVMCIRuntime.runtime().getHostJVMCIBackend().getTarget().arch);
- try (DebugContext debug = snippetReplacements.openDebugContext("VerifySnippetEncodeDecode_", method, graph.getOptions())) {
- HotSpotProviders originalProvider = (HotSpotProviders) snippetReplacements.getProviders();
+ HotSpotProviders originalProvider = (HotSpotProviders) snippetReplacements.getProviders();
- SnippetReflectionProvider snippetReflection = originalProvider.getSnippetReflection();
- SymbolicSnippetEncoder.HotSpotSubstrateConstantReflectionProvider constantReflection = new SymbolicSnippetEncoder.HotSpotSubstrateConstantReflectionProvider(
- originalProvider.getConstantReflection());
- HotSpotProviders newProviders = new HotSpotProviders(originalProvider.getMetaAccess(), originalProvider.getCodeCache(), constantReflection,
- originalProvider.getConstantFieldProvider(), originalProvider.getForeignCalls(), originalProvider.getLowerer(), null, originalProvider.getSuites(),
- originalProvider.getRegisters(), snippetReflection, originalProvider.getWordTypes(), originalProvider.getGraphBuilderPlugins(), originalProvider.getGC());
- HotSpotSnippetReplacementsImpl filteringReplacements = new HotSpotSnippetReplacementsImpl(newProviders, snippetReflection,
- originalProvider.getReplacements().getDefaultReplacementBytecodeProvider(), originalProvider.getCodeCache().getTarget());
- filteringReplacements.setGraphBuilderPlugins(originalProvider.getReplacements().getGraphBuilderPlugins());
- try (DebugContext.Scope scaope = debug.scope("VerifySnippetEncodeDecode", graph)) {
- for (int i = 0; i < encodedGraph.getNumObjects(); i++) {
- filterSnippetObject(encodedGraph.getObject(i));
- }
- StructuredGraph snippet = filteringReplacements.makeGraph(debug, filteringReplacements.getDefaultReplacementBytecodeProvider(), method, null, original,
- trackNodeSourcePosition, null);
- SymbolicEncodedGraph symbolicGraph = new SymbolicEncodedGraph(encodedGraph, method.getDeclaringClass(), original != null ? methodKey(original) : null);
- StructuredGraph decodedSnippet = decodeSnippetGraph(symbolicGraph, original != null ? original : method, originalReplacements, null,
- StructuredGraph.AllowAssumptions.ifNonNull(graph.getAssumptions()), graph.getOptions());
- String snippetString = getCanonicalGraphString(snippet, true, false);
- String decodedSnippetString = getCanonicalGraphString(decodedSnippet, true, false);
- if (snippetString.equals(decodedSnippetString)) {
- debug.log("Snippet decode for %s produces exactly same graph", method);
- debug.dump(DebugContext.VERBOSE_LEVEL, decodedSnippet, "Decoded snippet graph for %s", method);
- } else {
- debug.log("Snippet decode for %s produces different graph", method);
- debug.log("%s", compareGraphStrings(snippet, snippetString, decodedSnippet, decodedSnippetString));
- debug.dump(DebugContext.VERBOSE_LEVEL, snippet, "Snippet graph for %s", method);
- debug.dump(DebugContext.VERBOSE_LEVEL, graph, "Encoded snippet graph for %s", method);
- debug.dump(DebugContext.VERBOSE_LEVEL, decodedSnippet, "Decoded snippet graph for %s", method);
- }
- } catch (Throwable t) {
- throw debug.handle(t);
+ SnippetReflectionProvider snippetReflection = originalProvider.getSnippetReflection();
+ SymbolicSnippetEncoder.HotSpotSubstrateConstantReflectionProvider constantReflection = new SymbolicSnippetEncoder.HotSpotSubstrateConstantReflectionProvider(
+ originalProvider.getConstantReflection());
+ HotSpotProviders newProviders = new HotSpotProviders(originalProvider.getMetaAccess(), originalProvider.getCodeCache(), constantReflection,
+ originalProvider.getConstantFieldProvider(), originalProvider.getForeignCalls(), originalProvider.getLowerer(), null, originalProvider.getSuites(),
+ originalProvider.getRegisters(), snippetReflection, originalProvider.getWordTypes(), originalProvider.getGraphBuilderPlugins(), originalProvider.getGC());
+ HotSpotSnippetReplacementsImpl filteringReplacements = new HotSpotSnippetReplacementsImpl(newProviders, snippetReflection,
+ originalProvider.getReplacements().getDefaultReplacementBytecodeProvider(), originalProvider.getCodeCache().getTarget());
+ filteringReplacements.setGraphBuilderPlugins(originalProvider.getReplacements().getGraphBuilderPlugins());
+ try (DebugContext.Scope scaope = debug.scope("VerifySnippetEncodeDecode", graph)) {
+ for (int i = 0; i < encodedGraph.getNumObjects(); i++) {
+ filterSnippetObject(encodedGraph.getObject(i));
}
+ StructuredGraph snippet = filteringReplacements.makeGraph(debug, filteringReplacements.getDefaultReplacementBytecodeProvider(), method, null, original,
+ trackNodeSourcePosition, null);
+ SymbolicEncodedGraph symbolicGraph = new SymbolicEncodedGraph(encodedGraph, method.getDeclaringClass(), originalMethodString);
+ StructuredGraph decodedSnippet = decodeSnippetGraph(symbolicGraph, original != null ? original : method, originalReplacements, null,
+ StructuredGraph.AllowAssumptions.ifNonNull(graph.getAssumptions()), graph.getOptions());
+ String snippetString = getCanonicalGraphString(snippet, true, false);
+ String decodedSnippetString = getCanonicalGraphString(decodedSnippet, true, false);
+ if (snippetString.equals(decodedSnippetString)) {
+ debug.log("Snippet decode for %s produces exactly same graph", method);
+ debug.dump(DebugContext.VERBOSE_LEVEL, decodedSnippet, "Decoded snippet graph for %s", method);
+ } else {
+ debug.log("Snippet decode for %s produces different graph", method);
+ debug.log("%s", compareGraphStrings(snippet, snippetString, decodedSnippet, decodedSnippetString));
+ debug.dump(DebugContext.VERBOSE_LEVEL, snippet, "Snippet graph for %s", method);
+ debug.dump(DebugContext.VERBOSE_LEVEL, graph, "Encoded snippet graph for %s", method);
+ debug.dump(DebugContext.VERBOSE_LEVEL, decodedSnippet, "Decoded snippet graph for %s", method);
+ }
+ } catch (Throwable t) {
+ throw debug.handle(t);
}
return true;
}
@@ -475,6 +502,17 @@
*/
@SuppressWarnings("try")
private synchronized EncodedSnippets maybeEncodeSnippets(OptionValues options) {
+ Set<MethodSubstitutionPlugin> plugins = this.knownPlugins;
+ if (preparedPlugins != plugins.size()) {
+ for (MethodSubstitutionPlugin plugin : plugins) {
+ ResolvedJavaMethod original = plugin.getOriginalMethod(originalReplacements.getProviders().getMetaAccess());
+ registerMethodSubstitution(plugin, original, INLINE_AFTER_PARSING, options);
+ if (!original.isNative()) {
+ registerMethodSubstitution(plugin, original, ROOT_COMPILATION, options);
+ }
+ }
+ preparedPlugins = plugins.size();
+ }
Map<String, StructuredGraph> graphs = this.preparedSnippetGraphs;
if (encodedGraphs != graphs.size()) {
DebugContext debug = openDebugContext("SnippetEncoder", null, options);
@@ -499,7 +537,7 @@
if (original != null) {
originalMethods.put(key, methodKey(original));
}
- StructuredGraph snippet = buildGraph(method, original, receiver, true, trackNodeSourcePosition, INLINE_AFTER_PARSING, options);
+ StructuredGraph snippet = buildGraph(method, original, null, receiver, true, trackNodeSourcePosition, INLINE_AFTER_PARSING, options);
snippetMethods.add(method);
preparedSnippetGraphs.put(key, snippet);
}
@@ -1001,7 +1039,7 @@
* This horror show of classes exists solely get {@link HotSpotSnippetBytecodeParser} to be used
* as the parser for these snippets.
*/
- static class HotSpotSnippetReplacementsImpl extends HotSpotReplacementsImpl {
+ class HotSpotSnippetReplacementsImpl extends HotSpotReplacementsImpl {
HotSpotSnippetReplacementsImpl(HotSpotReplacementsImpl replacements, Providers providers) {
super(replacements, providers);
}
@@ -1016,7 +1054,7 @@
}
}
- static class SnippetGraphMaker extends ReplacementsImpl.GraphMaker {
+ class SnippetGraphMaker extends ReplacementsImpl.GraphMaker {
SnippetGraphMaker(ReplacementsImpl replacements, ResolvedJavaMethod substitute, ResolvedJavaMethod substitutedMethod) {
super(replacements, substitute, substitutedMethod);
}
@@ -1028,7 +1066,7 @@
}
}
- static class HotSpotSnippetGraphBuilderPhase extends GraphBuilderPhase.Instance {
+ class HotSpotSnippetGraphBuilderPhase extends GraphBuilderPhase.Instance {
HotSpotSnippetGraphBuilderPhase(Providers theProviders, GraphBuilderConfiguration graphBuilderConfig, OptimisticOptimizations optimisticOpts, IntrinsicContext initialIntrinsicContext) {
super(theProviders, graphBuilderConfig, optimisticOpts, initialIntrinsicContext);
}
@@ -1039,7 +1077,7 @@
}
}
- static class HotSpotSnippetBytecodeParser extends BytecodeParser {
+ class HotSpotSnippetBytecodeParser extends BytecodeParser {
HotSpotSnippetBytecodeParser(GraphBuilderPhase.Instance graphBuilderInstance, StructuredGraph graph, BytecodeParser parent, ResolvedJavaMethod method, int entryBCI,
IntrinsicContext intrinsicContext) {
super(graphBuilderInstance, graph, parent, method, entryBCI, intrinsicContext);
@@ -1066,6 +1104,13 @@
// Always defer Fold until decode time but NodeIntrinsics may fold if they are able.
return false;
}
+ InvocationPlugin plugin = graphBuilderConfig.getPlugins().getInvocationPlugins().lookupInvocation(targetMethod);
+ if (conditionalPlugins.contains(plugin)) {
+ // Because supporting arbitrary plugins in the context of encoded graphs is complex
+ // we disallow it. This limitation can be worked around through the use of method
+ // substitutions.
+ throw new GraalError("conditional plugins are unsupported in snippets and method substitutions: " + targetMethod + " " + plugin);
+ }
return super.tryInvocationPlugin(invokeKind, args, targetMethod, resultType);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/DefaultHotSpotLoweringProvider.java Thu Nov 07 18:44:09 2019 +0000
@@ -646,7 +646,7 @@
// write the displaced mark to the correct stack slot
AddressNode addressDisplacedMark = createOffsetAddress(graph, beginLockScope, runtime.getVMConfig().basicLockDisplacedHeaderOffset);
- WriteNode writeStackSlot = graph.add(new WriteNode(addressDisplacedMark, DISPLACED_MARK_WORD_LOCATION, loadDisplacedHeader, BarrierType.NONE));
+ WriteNode writeStackSlot = graph.add(new WriteNode(addressDisplacedMark, DISPLACED_MARK_WORD_LOCATION, loadDisplacedHeader, BarrierType.NONE, false));
graph.addBeforeFixed(migrationEnd, writeStackSlot);
// load the lock object from the osr buffer
@@ -776,7 +776,7 @@
}
AddressNode address = createOffsetAddress(graph, object, runtime.getVMConfig().hubOffset);
- return graph.add(new WriteNode(address, HUB_WRITE_LOCATION, writeValue, BarrierType.NONE));
+ return graph.add(new WriteNode(address, HUB_WRITE_LOCATION, writeValue, BarrierType.NONE, false));
}
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotGraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -39,7 +39,6 @@
import java.util.zip.CRC32;
import org.graalvm.compiler.api.replacements.SnippetReflectionProvider;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
import org.graalvm.compiler.core.common.type.ObjectStamp;
import org.graalvm.compiler.core.common.type.StampFactory;
@@ -92,6 +91,7 @@
import org.graalvm.compiler.nodes.memory.ReadNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
+import org.graalvm.compiler.nodes.spi.Replacements;
import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.tiers.CompilerConfiguration;
@@ -108,6 +108,7 @@
import jdk.internal.vm.compiler.word.LocationIdentity;
import jdk.vm.ci.code.CodeUtil;
+import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
import jdk.vm.ci.meta.ConstantReflectionProvider;
import jdk.vm.ci.meta.DeoptimizationAction;
@@ -128,6 +129,7 @@
* @param snippetReflection
* @param foreignCalls
* @param options
+ * @param target
*/
public static Plugins create(HotSpotGraalRuntimeProvider graalRuntime,
CompilerConfiguration compilerConfiguration,
@@ -138,11 +140,11 @@
SnippetReflectionProvider snippetReflection,
ForeignCallsProvider foreignCalls,
ReplacementsImpl replacements,
- OptionValues options) {
+ OptionValues options, TargetDescription target) {
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration);
Plugins plugins = new Plugins(invocationPlugins);
- NodeIntrinsificationProvider nodeIntrinsificationProvider = new NodeIntrinsificationProvider(metaAccess, snippetReflection, foreignCalls, wordTypes);
+ NodeIntrinsificationProvider nodeIntrinsificationProvider = new NodeIntrinsificationProvider(metaAccess, snippetReflection, foreignCalls, wordTypes, target);
HotSpotWordOperationPlugin wordOperationPlugin = new HotSpotWordOperationPlugin(snippetReflection, wordTypes);
HotSpotNodePlugin nodePlugin = new HotSpotNodePlugin(wordOperationPlugin, config, wordTypes);
@@ -171,29 +173,28 @@
@Override
public void run() {
- BytecodeProvider replacementBytecodeProvider = replacements.getDefaultReplacementBytecodeProvider();
- registerObjectPlugins(invocationPlugins, options, config, replacementBytecodeProvider);
- registerClassPlugins(plugins, config, replacementBytecodeProvider);
+ registerObjectPlugins(invocationPlugins, options, config, replacements);
+ registerClassPlugins(plugins, config, replacements);
registerSystemPlugins(invocationPlugins, foreignCalls);
- registerThreadPlugins(invocationPlugins, metaAccess, wordTypes, config, replacementBytecodeProvider);
+ registerThreadPlugins(invocationPlugins, metaAccess, wordTypes, config, replacements);
if (!GeneratePIC.getValue(options)) {
registerCallSitePlugins(invocationPlugins);
}
- registerReflectionPlugins(invocationPlugins, replacementBytecodeProvider);
- registerConstantPoolPlugins(invocationPlugins, wordTypes, config, replacementBytecodeProvider);
- registerAESPlugins(invocationPlugins, config, replacementBytecodeProvider);
- registerCRC32Plugins(invocationPlugins, config, replacementBytecodeProvider);
- registerCRC32CPlugins(invocationPlugins, config, replacementBytecodeProvider);
- registerBigIntegerPlugins(invocationPlugins, config, replacementBytecodeProvider);
- registerSHAPlugins(invocationPlugins, config, replacementBytecodeProvider);
+ registerReflectionPlugins(invocationPlugins, replacements);
+ registerConstantPoolPlugins(invocationPlugins, wordTypes, config, replacements);
+ registerAESPlugins(invocationPlugins, config, replacements);
+ registerCRC32Plugins(invocationPlugins, config, replacements);
+ registerCRC32CPlugins(invocationPlugins, config, replacements);
+ registerBigIntegerPlugins(invocationPlugins, config, replacements);
+ registerSHAPlugins(invocationPlugins, config, replacements);
registerGHASHPlugins(invocationPlugins, config, metaAccess, foreignCalls);
- registerCounterModePlugins(invocationPlugins, config, replacementBytecodeProvider);
+ registerCounterModePlugins(invocationPlugins, config, replacements);
registerBase64Plugins(invocationPlugins, config, metaAccess, foreignCalls);
- registerUnsafePlugins(invocationPlugins, config, replacementBytecodeProvider);
- StandardGraphBuilderPlugins.registerInvocationPlugins(metaAccess, snippetReflection, invocationPlugins, replacementBytecodeProvider, true, false);
- registerArrayPlugins(invocationPlugins, replacementBytecodeProvider);
- registerStringPlugins(invocationPlugins, replacementBytecodeProvider);
- registerArraysSupportPlugins(invocationPlugins, config, replacementBytecodeProvider);
+ registerUnsafePlugins(invocationPlugins, config, replacements);
+ StandardGraphBuilderPlugins.registerInvocationPlugins(metaAccess, snippetReflection, invocationPlugins, replacements, true, false);
+ registerArrayPlugins(invocationPlugins, replacements);
+ registerStringPlugins(invocationPlugins, replacements);
+ registerArraysSupportPlugins(invocationPlugins, config, replacements);
for (NodeIntrinsicPluginFactory factory : GraalServices.load(NodeIntrinsicPluginFactory.class)) {
factory.registerPlugins(invocationPlugins, nodeIntrinsificationProvider);
@@ -203,8 +204,8 @@
return plugins;
}
- private static void registerObjectPlugins(InvocationPlugins plugins, OptionValues options, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Object.class, bytecodeProvider);
+ private static void registerObjectPlugins(InvocationPlugins plugins, OptionValues options, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins, Object.class, replacements);
if (!GeneratePIC.getValue(options)) {
// FIXME: clone() requires speculation and requires a fix in here (to check that
// b.getAssumptions() != null), and in ReplacementImpl.getSubstitution() where there is
@@ -235,8 +236,8 @@
}
}
- private static void registerClassPlugins(Plugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins.getInvocationPlugins(), Class.class, bytecodeProvider);
+ private static void registerClassPlugins(Plugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins.getInvocationPlugins(), Class.class, replacements);
r.registerMethodSubstitution(HotSpotClassSubstitutions.class, "getModifiers", Receiver.class);
r.registerMethodSubstitution(HotSpotClassSubstitutions.class, "isInterface", Receiver.class);
@@ -273,8 +274,8 @@
plugins.register(plugin, VolatileCallSite.class, "getTarget", Receiver.class);
}
- private static void registerReflectionPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, reflectionClass, bytecodeProvider);
+ private static void registerReflectionPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, reflectionClass, replacements);
r.register0("getCallerClass", new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
@@ -290,12 +291,12 @@
r.registerMethodSubstitution(ReflectionSubstitutions.class, "getClassAccessFlags", Class.class);
}
- private static void registerUnsafePlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider replacementBytecodeProvider) {
+ private static void registerUnsafePlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
Registration r;
if (JavaVersionUtil.JAVA_SPEC <= 8) {
- r = new Registration(plugins, Unsafe.class, replacementBytecodeProvider);
+ r = new Registration(plugins, Unsafe.class, replacements);
} else {
- r = new Registration(plugins, "jdk.internal.misc.Unsafe", replacementBytecodeProvider);
+ r = new Registration(plugins, "jdk.internal.misc.Unsafe", replacements);
}
String substituteMethodName = config.doingUnsafeAccessOffset != Integer.MAX_VALUE ? "copyMemoryGuarded" : "copyMemory";
r.registerMethodSubstitution(HotSpotUnsafeSubstitutions.class, HotSpotUnsafeSubstitutions.copyMemoryName, substituteMethodName, Receiver.class, Object.class, long.class, Object.class,
@@ -340,8 +341,8 @@
return true;
}
- private static void registerConstantPoolPlugins(InvocationPlugins plugins, WordTypes wordTypes, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, constantPoolClass, bytecodeProvider);
+ private static void registerConstantPoolPlugins(InvocationPlugins plugins, WordTypes wordTypes, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins, constantPoolClass, replacements);
r.register2("getSize0", Receiver.class, Object.class, new InvocationPlugin() {
@Override
@@ -411,22 +412,22 @@
});
}
- private static void registerArrayPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Array.class, bytecodeProvider);
+ private static void registerArrayPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, Array.class, replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(HotSpotArraySubstitutions.class, "newInstance", Class.class, int.class);
}
- private static void registerStringPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
+ private static void registerStringPlugins(InvocationPlugins plugins, Replacements replacements) {
if (JavaVersionUtil.JAVA_SPEC > 8) {
- final Registration utf16r = new Registration(plugins, "java.lang.StringUTF16", bytecodeProvider);
+ final Registration utf16r = new Registration(plugins, "java.lang.StringUTF16", replacements);
utf16r.registerMethodSubstitution(StringUTF16Substitutions.class, "toBytes", char[].class, int.class, int.class);
utf16r.registerMethodSubstitution(StringUTF16Substitutions.class, "getChars", byte[].class, int.class, int.class, char[].class, int.class);
}
}
- private static void registerThreadPlugins(InvocationPlugins plugins, MetaAccessProvider metaAccess, WordTypes wordTypes, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Thread.class, bytecodeProvider);
+ private static void registerThreadPlugins(InvocationPlugins plugins, MetaAccessProvider metaAccess, WordTypes wordTypes, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins, Thread.class, replacements);
r.register0("currentThread", new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
@@ -440,43 +441,57 @@
}
});
- r.registerMethodSubstitution(ThreadSubstitutions.class, "isInterrupted", Receiver.class, boolean.class);
- }
+ if (config.osThreadInterruptedOffset != Integer.MAX_VALUE) {
+ r.registerMethodSubstitution(ThreadSubstitutions.class, "isInterrupted", Receiver.class, boolean.class);
+ }
- public static final String aesEncryptName;
- public static final String aesDecryptName;
+ }
public static final String reflectionClass;
public static final String constantPoolClass;
static {
if (JavaVersionUtil.JAVA_SPEC <= 8) {
- aesEncryptName = "encryptBlock";
- aesDecryptName = "decryptBlock";
reflectionClass = "sun.reflect.Reflection";
constantPoolClass = "sun.reflect.ConstantPool";
} else {
- aesEncryptName = "implEncryptBlock";
- aesDecryptName = "implDecryptBlock";
reflectionClass = "jdk.internal.reflect.Reflection";
constantPoolClass = "jdk.internal.reflect.ConstantPool";
}
}
- public static boolean cbcUsesImplNames(GraalHotSpotVMConfig config) {
+ public static String lookupIntrinsicName(GraalHotSpotVMConfig config, String className, String name1, String name2) {
+ boolean foundName1 = false;
+ boolean foundName2 = false;
+ String name = name1;
for (VMIntrinsicMethod intrinsic : config.getStore().getIntrinsics()) {
- if ("com/sun/crypto/provider/CipherBlockChaining".equals(intrinsic.declaringClass)) {
- if ("encrypt".equals(intrinsic.name)) {
- return false;
- } else if ("implEncrypt".equals(intrinsic.name)) {
+ if (className.equals(intrinsic.declaringClass)) {
+ if (name1.equals(intrinsic.name)) {
+ foundName1 = true;
+ } else if (name2.equals(intrinsic.name)) {
+ foundName2 = true;
+ name = name2;
+ }
+ }
+ }
+ if (foundName1 != foundName2) {
+ return name;
+ }
+ throw GraalError.shouldNotReachHere();
+ }
+
+ public static boolean isIntrinsicName(GraalHotSpotVMConfig config, String className, String name) {
+ for (VMIntrinsicMethod intrinsic : config.getStore().getIntrinsics()) {
+ if (className.equals(intrinsic.declaringClass)) {
+ if (name.equals(intrinsic.name)) {
return true;
}
}
}
- throw GraalError.shouldNotReachHere();
+ return false;
}
- private static void registerAESPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
+ private static void registerAESPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
if (config.useAESIntrinsics) {
assert config.aescryptEncryptBlockStub != 0L;
assert config.aescryptDecryptBlockStub != 0L;
@@ -484,72 +499,66 @@
assert config.cipherBlockChainingDecryptAESCryptStub != 0L;
String arch = config.osArch;
String decryptSuffix = arch.equals("sparc") ? "WithOriginalKey" : "";
- Registration r = new Registration(plugins, "com.sun.crypto.provider.CipherBlockChaining", bytecodeProvider);
- boolean implNames = cbcUsesImplNames(config);
- String cbcEncryptName = implNames ? "implEncrypt" : "encrypt";
- String cbcDecryptName = implNames ? "implDecrypt" : "decrypt";
-
+ String cbcEncryptName = lookupIntrinsicName(config, "com/sun/crypto/provider/CipherBlockChaining", "implEncrypt", "encrypt");
+ String cbcDecryptName = lookupIntrinsicName(config, "com/sun/crypto/provider/CipherBlockChaining", "implDecrypt", "decrypt");
+ Registration r = new Registration(plugins, "com.sun.crypto.provider.CipherBlockChaining", replacements);
r.registerMethodSubstitution(CipherBlockChainingSubstitutions.class, cbcEncryptName, Receiver.class, byte[].class, int.class, int.class, byte[].class, int.class);
r.registerMethodSubstitution(CipherBlockChainingSubstitutions.class, cbcDecryptName, cbcDecryptName + decryptSuffix, Receiver.class, byte[].class, int.class, int.class, byte[].class,
int.class);
- r = new Registration(plugins, "com.sun.crypto.provider.AESCrypt", bytecodeProvider);
+ String aesEncryptName = lookupIntrinsicName(config, "com/sun/crypto/provider/AESCrypt", "implEncryptBlock", "encryptBlock");
+ String aesDecryptName = lookupIntrinsicName(config, "com/sun/crypto/provider/AESCrypt", "implDecryptBlock", "decryptBlock");
+
+ r = new Registration(plugins, "com.sun.crypto.provider.AESCrypt", replacements);
r.registerMethodSubstitution(AESCryptSubstitutions.class, aesEncryptName, Receiver.class, byte[].class, int.class, byte[].class, int.class);
r.registerMethodSubstitution(AESCryptSubstitutions.class, aesDecryptName, aesDecryptName + decryptSuffix, Receiver.class, byte[].class, int.class, byte[].class, int.class);
}
}
- private static void registerBigIntegerPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, BigInteger.class, bytecodeProvider);
- if (config.useMultiplyToLenIntrinsic()) {
- assert config.multiplyToLen != 0L;
- if (JavaVersionUtil.JAVA_SPEC <= 8) {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "multiplyToLen", "multiplyToLenStatic", int[].class, int.class, int[].class, int.class,
- int[].class);
- } else {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "implMultiplyToLen", "multiplyToLenStatic", int[].class, int.class, int[].class, int.class,
- int[].class);
- }
+ private static void registerBigIntegerPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins, BigInteger.class, replacements);
+ assert !config.useMultiplyToLenIntrinsic() || config.multiplyToLen != 0L;
+ if (JavaVersionUtil.JAVA_SPEC <= 8) {
+ r.registerConditionalMethodSubstitution(config.useMultiplyToLenIntrinsic(), BigIntegerSubstitutions.class, "multiplyToLen", "multiplyToLenStatic", int[].class, int.class, int[].class,
+ int.class, int[].class);
+ } else {
+ r.registerConditionalMethodSubstitution(config.useMultiplyToLenIntrinsic(), BigIntegerSubstitutions.class, "implMultiplyToLen", "multiplyToLenStatic", int[].class, int.class, int[].class,
+ int.class, int[].class);
}
- if (config.useMulAddIntrinsic()) {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "implMulAdd", int[].class, int[].class, int.class, int.class, int.class);
- }
- if (config.useMontgomeryMultiplyIntrinsic()) {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "implMontgomeryMultiply", int[].class, int[].class, int[].class, int.class, long.class, int[].class);
- }
- if (config.useMontgomerySquareIntrinsic()) {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "implMontgomerySquare", int[].class, int[].class, int.class, long.class, int[].class);
- }
- if (config.useSquareToLenIntrinsic()) {
- r.registerMethodSubstitution(BigIntegerSubstitutions.class, "implSquareToLen", int[].class, int.class, int[].class, int.class);
- }
+ r.registerConditionalMethodSubstitution(config.useMulAddIntrinsic(), BigIntegerSubstitutions.class, "implMulAdd", int[].class, int[].class, int.class, int.class, int.class);
+ r.registerConditionalMethodSubstitution(config.useMontgomeryMultiplyIntrinsic(), BigIntegerSubstitutions.class, "implMontgomeryMultiply", int[].class, int[].class, int[].class, int.class,
+ long.class, int[].class);
+ r.registerConditionalMethodSubstitution(config.useMontgomerySquareIntrinsic(), BigIntegerSubstitutions.class, "implMontgomerySquare", int[].class, int[].class, int.class, long.class,
+ int[].class);
+ r.registerConditionalMethodSubstitution(config.useSquareToLenIntrinsic(), BigIntegerSubstitutions.class, "implSquareToLen", int[].class, int.class, int[].class, int.class);
}
- private static void registerSHAPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
+ private static void registerSHAPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
boolean useSha1 = config.useSHA1Intrinsics();
boolean useSha256 = config.useSHA256Intrinsics();
boolean useSha512 = config.useSHA512Intrinsics();
- if (JavaVersionUtil.JAVA_SPEC > 8 && (useSha1 || useSha256 || useSha512)) {
- Registration r = new Registration(plugins, "sun.security.provider.DigestBase", bytecodeProvider);
+ if (isIntrinsicName(config, "sun/security/provider/DigestBase", "implCompressMultiBlock0") && (useSha1 || useSha256 || useSha512)) {
+ Registration r = new Registration(plugins, "sun.security.provider.DigestBase", replacements);
r.registerMethodSubstitution(DigestBaseSubstitutions.class, "implCompressMultiBlock0", Receiver.class, byte[].class, int.class, int.class);
}
+ String implCompressName = lookupIntrinsicName(config, "sun/security/provider/SHA", "implCompress", "implCompress0");
if (useSha1) {
assert config.sha1ImplCompress != 0L;
- Registration r = new Registration(plugins, "sun.security.provider.SHA", bytecodeProvider);
- r.registerMethodSubstitution(SHASubstitutions.class, SHASubstitutions.implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
+ Registration r = new Registration(plugins, "sun.security.provider.SHA", replacements);
+ r.registerMethodSubstitution(SHASubstitutions.class, implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
}
if (useSha256) {
assert config.sha256ImplCompress != 0L;
- Registration r = new Registration(plugins, "sun.security.provider.SHA2", bytecodeProvider);
- r.registerMethodSubstitution(SHA2Substitutions.class, SHA2Substitutions.implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
+ Registration r = new Registration(plugins, "sun.security.provider.SHA2", replacements);
+ r.registerMethodSubstitution(SHA2Substitutions.class, implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
}
if (useSha512) {
assert config.sha512ImplCompress != 0L;
- Registration r = new Registration(plugins, "sun.security.provider.SHA5", bytecodeProvider);
- r.registerMethodSubstitution(SHA5Substitutions.class, SHA5Substitutions.implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
+ Registration r = new Registration(plugins, "sun.security.provider.SHA5", replacements);
+ r.registerMethodSubstitution(SHA5Substitutions.class, implCompressName, "implCompress0", Receiver.class, byte[].class, int.class);
}
}
@@ -586,11 +595,12 @@
}
}
- private static void registerCounterModePlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- if (config.useAESCTRIntrinsics) {
- assert config.counterModeAESCrypt != 0L;
- Registration r = new Registration(plugins, "com.sun.crypto.provider.CounterMode", bytecodeProvider);
- r.registerMethodSubstitution(CounterModeSubstitutions.class, "implCrypt", Receiver.class, byte[].class, int.class, int.class, byte[].class, int.class);
+ private static void registerCounterModePlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ if (JavaVersionUtil.JAVA_SPEC > 8) {
+ assert !config.useAESCTRIntrinsics || config.counterModeAESCrypt != 0L;
+ Registration r = new Registration(plugins, "com.sun.crypto.provider.CounterMode", replacements);
+ r.registerConditionalMethodSubstitution(config.useAESCTRIntrinsics, CounterModeSubstitutions.class, "implCrypt", Receiver.class, byte[].class, int.class, int.class, byte[].class,
+ int.class);
}
}
@@ -626,32 +636,31 @@
}
}
- private static void registerCRC32Plugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- if (config.useCRC32Intrinsics) {
- Registration r = new Registration(plugins, CRC32.class, bytecodeProvider);
- r.registerMethodSubstitution(CRC32Substitutions.class, "update", int.class, int.class);
- if (JavaVersionUtil.JAVA_SPEC <= 8) {
- r.registerMethodSubstitution(CRC32Substitutions.class, "updateBytes", int.class, byte[].class, int.class, int.class);
- r.registerMethodSubstitution(CRC32Substitutions.class, "updateByteBuffer", int.class, long.class, int.class, int.class);
- } else {
- r.registerMethodSubstitution(CRC32Substitutions.class, "updateBytes0", int.class, byte[].class, int.class, int.class);
- r.registerMethodSubstitution(CRC32Substitutions.class, "updateByteBuffer0", int.class, long.class, int.class, int.class);
- }
+ private static void registerCRC32Plugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ Registration r = new Registration(plugins, CRC32.class, replacements);
+ r.registerConditionalMethodSubstitution(config.useCRC32Intrinsics, CRC32Substitutions.class, "update", int.class, int.class);
+ if (JavaVersionUtil.JAVA_SPEC <= 8) {
+ r.registerConditionalMethodSubstitution(config.useCRC32Intrinsics, CRC32Substitutions.class, "updateBytes", int.class, byte[].class, int.class, int.class);
+ r.registerConditionalMethodSubstitution(config.useCRC32Intrinsics, CRC32Substitutions.class, "updateByteBuffer", int.class, long.class, int.class, int.class);
+ } else {
+ r.registerConditionalMethodSubstitution(config.useCRC32Intrinsics, CRC32Substitutions.class, "updateBytes0", int.class, byte[].class, int.class, int.class);
+ r.registerConditionalMethodSubstitution(config.useCRC32Intrinsics, CRC32Substitutions.class, "updateByteBuffer0", int.class, long.class, int.class, int.class);
}
}
- private static void registerCRC32CPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- if (config.useCRC32CIntrinsics) {
- Registration r = new Registration(plugins, "java.util.zip.CRC32C", bytecodeProvider);
- r.registerMethodSubstitution(CRC32CSubstitutions.class, "updateBytes", int.class, byte[].class, int.class, int.class);
- r.registerMethodSubstitution(CRC32CSubstitutions.class, "updateDirectByteBuffer", int.class, long.class, int.class, int.class);
+ private static void registerCRC32CPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ if (JavaVersionUtil.JAVA_SPEC > 8) {
+ Registration r = new Registration(plugins, "java.util.zip.CRC32C", replacements);
+ r.registerConditionalMethodSubstitution(config.useCRC32CIntrinsics, CRC32CSubstitutions.class, "updateBytes", int.class, byte[].class, int.class, int.class);
+ r.registerConditionalMethodSubstitution(config.useCRC32CIntrinsics, CRC32CSubstitutions.class, "updateDirectByteBuffer", int.class, long.class, int.class, int.class);
}
}
- private static void registerArraysSupportPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, BytecodeProvider bytecodeProvider) {
- if (config.useVectorizedMismatchIntrinsic) {
- Registration r = new Registration(plugins, "jdk.internal.util.ArraysSupport", bytecodeProvider);
- r.registerMethodSubstitution(ArraysSupportSubstitutions.class, "vectorizedMismatch", Object.class, long.class, Object.class, long.class, int.class, int.class);
+ private static void registerArraysSupportPlugins(InvocationPlugins plugins, GraalHotSpotVMConfig config, Replacements replacements) {
+ if (JavaVersionUtil.JAVA_SPEC > 8) {
+ Registration r = new Registration(plugins, "jdk.internal.util.ArraysSupport", replacements);
+ r.registerConditionalMethodSubstitution(config.useVectorizedMismatchIntrinsic, ArraysSupportSubstitutions.class, "vectorizedMismatch", Object.class, long.class, Object.class, long.class,
+ int.class, int.class);
}
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotHostForeignCallsProvider.java Thu Nov 07 18:44:09 2019 +0000
@@ -339,8 +339,8 @@
linkForeignCall(options, providers, REGISTER_FINALIZER, c.registerFinalizerAddress, PREPEND_THREAD, SAFEPOINT, NOT_REEXECUTABLE, any());
linkForeignCall(options, providers, MONITORENTER, c.monitorenterAddress, PREPEND_THREAD, SAFEPOINT, NOT_REEXECUTABLE, any());
linkForeignCall(options, providers, MONITOREXIT, c.monitorexitAddress, PREPEND_THREAD, STACK_INSPECTABLE_LEAF, NOT_REEXECUTABLE, any());
- linkForeignCall(options, providers, NOTIFY, c.notifyAddress, PREPEND_THREAD, SAFEPOINT, NOT_REEXECUTABLE, any());
- linkForeignCall(options, providers, NOTIFY_ALL, c.notifyAllAddress, PREPEND_THREAD, SAFEPOINT, NOT_REEXECUTABLE, any());
+ linkForeignCall(options, providers, NOTIFY, c.notifyAddress, PREPEND_THREAD, LEAF_NO_VZERO, NOT_REEXECUTABLE, any());
+ linkForeignCall(options, providers, NOTIFY_ALL, c.notifyAllAddress, PREPEND_THREAD, LEAF_NO_VZERO, NOT_REEXECUTABLE, any());
linkForeignCall(options, providers, LOG_PRINTF, c.logPrintfAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS);
linkForeignCall(options, providers, LOG_OBJECT, c.logObjectAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS);
linkForeignCall(options, providers, LOG_PRIMITIVE, c.logPrimitiveAddress, PREPEND_THREAD, LEAF, REEXECUTABLE, NO_LOCATIONS);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/meta/HotSpotSuitesProvider.java Thu Nov 07 18:44:09 2019 +0000
@@ -168,7 +168,7 @@
if (profileInstructions != null) {
suites.getPostAllocationOptimizationStage().appendPhase(new HotSpotInstructionProfiling(profileInstructions));
}
- if (Assertions.detailedAssertionsEnabled(options)) {
+ if (Assertions.assertionsEnabled()) {
suites.getPostAllocationOptimizationStage().appendPhase(new VerifyMaxRegisterSizePhase(config.maxVectorSize));
}
return suites;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/BeginLockScopeNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/EndLockScopeNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -56,7 +56,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/StubForeignCallNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -72,7 +72,7 @@
}
@Override
- public LocationIdentity[] getLocationIdentities() {
+ public LocationIdentity[] getKilledLocationIdentities() {
LocationIdentity[] killedLocations = foreignCalls.getKilledLocations(descriptor);
killedLocations = Arrays.copyOf(killedLocations, killedLocations.length + 1);
killedLocations[killedLocations.length - 1] = HotSpotReplacementsUtil.PENDING_EXCEPTION_LOCATION;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/InitializeKlassStubCall.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -98,7 +98,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveDynamicConstantNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveDynamicConstantNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveDynamicStubCall.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/aot/ResolveDynamicStubCall.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/phases/AheadOfTimeVerificationPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -70,10 +70,22 @@
}
private static boolean isDirectMethodHandle(ConstantNode node) {
+ String typeName = StampTool.typeOrNull(node).getName();
if (!isObject(node)) {
return false;
}
- return "Ljava/lang/invoke/DirectMethodHandle;".equals(StampTool.typeOrNull(node).getName());
+
+ switch (typeName) {
+ case "Ljava/lang/invoke/DirectMethodHandle;":
+ case "Ljava/lang/invoke/DirectMethodHandle$StaticAccessor;":
+ case "Ljava/lang/invoke/DirectMethodHandle$Accessor;":
+ case "Ljava/lang/invoke/DirectMethodHandle$Constructor;":
+ case "Ljava/lang/invoke/DirectMethodHandle$Special;":
+ case "Ljava/lang/invoke/DirectMethodHandle$Interface;":
+ return true;
+ default:
+ return false;
+ }
}
private static boolean isBoundMethodHandle(ConstantNode node) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/HotSpotReplacementsUtil.java Thu Nov 07 18:44:09 2019 +0000
@@ -308,11 +308,13 @@
@Fold
public static int osThreadOffset(@InjectedParameter GraalHotSpotVMConfig config) {
+ assert config.osThreadOffset != Integer.MAX_VALUE;
return config.osThreadOffset;
}
@Fold
public static int osThreadInterruptedOffset(@InjectedParameter GraalHotSpotVMConfig config) {
+ assert config.osThreadInterruptedOffset != Integer.MAX_VALUE;
return config.osThreadInterruptedOffset;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/IdentityHashCodeNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return HotSpotReplacementsUtil.MARK_WORD_LOCATION;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA2Substitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -36,7 +36,6 @@
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
import org.graalvm.compiler.replacements.ReplacementsUtil;
-import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.compiler.word.Word;
import jdk.internal.vm.compiler.word.LocationIdentity;
import jdk.internal.vm.compiler.word.WordFactory;
@@ -46,8 +45,6 @@
@ClassSubstitution(className = "sun.security.provider.SHA2", optional = true)
public class SHA2Substitutions {
- public static final String implCompressName = JavaVersionUtil.JAVA_SPEC <= 8 ? "implCompress" : "implCompress0";
-
@MethodSubstitution(isStatic = false)
static void implCompress0(Object receiver, byte[] buf, int ofs) {
Object realReceiver = PiNode.piCastNonNull(receiver, HotSpotReplacementsUtil.methodHolderClass(INJECTED_INTRINSIC_CONTEXT));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHA5Substitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
import org.graalvm.compiler.replacements.ReplacementsUtil;
-import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.compiler.word.Word;
import jdk.internal.vm.compiler.word.LocationIdentity;
import jdk.internal.vm.compiler.word.WordFactory;
@@ -47,8 +46,6 @@
@ClassSubstitution(className = "sun.security.provider.SHA5", optional = true)
public class SHA5Substitutions {
- public static final String implCompressName = JavaVersionUtil.JAVA_SPEC <= 8 ? "implCompress" : "implCompress0";
-
@MethodSubstitution(isStatic = false)
static void implCompress0(Object receiver, byte[] buf, int ofs) {
Object realReceiver = PiNode.piCastNonNull(receiver, HotSpotReplacementsUtil.methodHolderClass(INJECTED_INTRINSIC_CONTEXT));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/SHASubstitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.extended.RawLoadNode;
import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
import org.graalvm.compiler.replacements.ReplacementsUtil;
-import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
import org.graalvm.compiler.word.Word;
import jdk.internal.vm.compiler.word.LocationIdentity;
import jdk.internal.vm.compiler.word.WordFactory;
@@ -47,8 +46,6 @@
@ClassSubstitution(className = "sun.security.provider.SHA", optional = true)
public class SHASubstitutions {
- public static final String implCompressName = JavaVersionUtil.JAVA_SPEC <= 8 ? "implCompress" : "implCompress0";
-
@MethodSubstitution(isStatic = false)
static void implCompress0(Object receiver, byte[] buf, int ofs) {
Object realReceiver = PiNode.piCastNonNull(receiver, HotSpotReplacementsUtil.methodHolderClass(INJECTED_INTRINSIC_CONTEXT));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/ForeignCallStub.java Thu Nov 07 18:44:09 2019 +0000
@@ -56,7 +56,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.common.RemoveValueProxyPhase;
import org.graalvm.compiler.replacements.GraphKit;
import org.graalvm.compiler.replacements.nodes.ReadRegisterNode;
import org.graalvm.compiler.word.Word;
@@ -258,7 +257,6 @@
debug.dump(DebugContext.VERBOSE_LEVEL, graph, "Initial stub graph");
kit.inlineInvokes("Foreign call stub.", "Backend");
- new RemoveValueProxyPhase().apply(graph);
debug.dump(DebugContext.VERBOSE_LEVEL, graph, "Stub graph before compilation");
return graph;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/stubs/SnippetStub.java Thu Nov 07 18:44:09 2019 +0000
@@ -41,7 +41,6 @@
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
-import org.graalvm.compiler.phases.common.RemoveValueProxyPhase;
import org.graalvm.compiler.replacements.SnippetTemplate;
import org.graalvm.compiler.replacements.Snippets;
@@ -100,9 +99,8 @@
}
}
- new RemoveValueProxyPhase().apply(graph);
graph.setGuardsStage(GuardsStage.FLOATING_GUARDS);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = CanonicalizerPhase.create();
canonicalizer.apply(graph, providers);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, providers);
} catch (Throwable e) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/BytecodeParser.java Thu Nov 07 18:44:09 2019 +0000
@@ -3221,7 +3221,7 @@
lastInstr = loopBegin;
// Create phi functions for all local variables and operand stack slots.
- frameState.insertLoopPhis(liveness, block.loopId, loopBegin, forceLoopPhis(), stampFromValueForForcedPhis());
+ frameState.insertLoopPhis(liveness, block.loopId, loopBegin, forceLoopPhis() || this.graphBuilderConfig.replaceLocalsWithConstants(), stampFromValueForForcedPhis());
loopBegin.setStateAfter(createFrameState(block.startBci, loopBegin));
/*
@@ -3545,8 +3545,9 @@
* will never see that the branch is taken. This can lead to deopt loops or OSR
* failure.
*/
+ double calculatedProbability = negated ? BranchProbabilityNode.DEOPT_PROBABILITY : 1.0 - BranchProbabilityNode.DEOPT_PROBABILITY;
FixedNode deoptSuccessor = BeginNode.begin(deopt);
- ValueNode ifNode = genIfNode(condition, negated ? deoptSuccessor : noDeoptSuccessor, negated ? noDeoptSuccessor : deoptSuccessor, negated ? 1 - probability : probability);
+ ValueNode ifNode = genIfNode(condition, negated ? deoptSuccessor : noDeoptSuccessor, negated ? noDeoptSuccessor : deoptSuccessor, calculatedProbability);
postProcessIfNode(ifNode);
append(ifNode);
}
@@ -3569,8 +3570,28 @@
}
this.controlFlowSplit = true;
- FixedNode trueSuccessor = createTarget(trueBlock, frameState, false, false);
- FixedNode falseSuccessor = createTarget(falseBlock, frameState, false, true);
+ FixedNode falseSuccessor = createTarget(falseBlock, frameState, false, false);
+ FixedNode trueSuccessor = createTarget(trueBlock, frameState, false, true);
+
+ if (this.graphBuilderConfig.replaceLocalsWithConstants() && condition instanceof CompareNode) {
+ CompareNode compareNode = (CompareNode) condition;
+ if (compareNode.condition() == CanonicalCondition.EQ) {
+ ValueNode constantNode = null;
+ ValueNode nonConstantNode = null;
+ if (compareNode.getX() instanceof ConstantNode) {
+ constantNode = compareNode.getX();
+ nonConstantNode = compareNode.getY();
+ } else if (compareNode.getY() instanceof ConstantNode) {
+ constantNode = compareNode.getY();
+ nonConstantNode = compareNode.getX();
+ }
+
+ if (constantNode != null && nonConstantNode != null) {
+ this.getEntryState(trueBlock).replaceValue(nonConstantNode, constantNode);
+ }
+ }
+ }
+
ValueNode ifNode = genIfNode(condition, trueSuccessor, falseSuccessor, probability);
postProcessIfNode(ifNode);
append(ifNode);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/FrameStateBuilder.java Thu Nov 07 18:44:09 2019 +0000
@@ -328,8 +328,7 @@
outerFrameState = parent.getFrameStateBuilder().create(parent.bci(), parent.getNonIntrinsicAncestor(), true, null, null);
}
if (bci == BytecodeFrame.AFTER_EXCEPTION_BCI && parent != null) {
- FrameState newFrameState = outerFrameState.duplicateModified(outerFrameState.bci, true, false, JavaKind.Void, new JavaKind[]{JavaKind.Object}, new ValueNode[]{stack[0]});
- return newFrameState;
+ return outerFrameState.duplicateModified(graph, outerFrameState.bci, true, false, JavaKind.Void, new JavaKind[]{JavaKind.Object}, new ValueNode[]{stack[0]});
}
if (bci == BytecodeFrame.INVALID_FRAMESTATE_BCI) {
throw shouldNotReachHere();
@@ -527,21 +526,21 @@
ValueNode value = locals[i];
if (value != null && value != TWO_SLOT_MARKER && (!loopEntryState.contains(value) || loopExit.loopBegin().isPhiAtMerge(value))) {
debug.log(" inserting proxy for %s", value);
- locals[i] = ProxyNode.forValue(value, loopExit, graph);
+ locals[i] = ProxyNode.forValue(value, loopExit);
}
}
for (int i = 0; i < stackSize(); i++) {
ValueNode value = stack[i];
if (value != null && value != TWO_SLOT_MARKER && (!loopEntryState.contains(value) || loopExit.loopBegin().isPhiAtMerge(value))) {
debug.log(" inserting proxy for %s", value);
- stack[i] = ProxyNode.forValue(value, loopExit, graph);
+ stack[i] = ProxyNode.forValue(value, loopExit);
}
}
for (int i = 0; i < lockedObjects.length; i++) {
ValueNode value = lockedObjects[i];
if (value != null && (!loopEntryState.contains(value) || loopExit.loopBegin().isPhiAtMerge(value))) {
debug.log(" inserting proxy for %s", value);
- lockedObjects[i] = ProxyNode.forValue(value, loopExit, graph);
+ lockedObjects[i] = ProxyNode.forValue(value, loopExit);
}
}
}
@@ -1028,4 +1027,17 @@
}
sideEffects.add(sideEffect);
}
+
+ public void replaceValue(ValueNode oldValue, ValueNode newValue) {
+ for (int i = 0; i < locals.length; ++i) {
+ if (locals[i] == oldValue) {
+ locals[i] = newValue;
+ }
+ }
+ for (int i = 0; i < stack.length; ++i) {
+ if (stack[i] == oldValue) {
+ stack[i] = newValue;
+ }
+ }
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/backend/LargeConstantSectionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
import org.graalvm.compiler.debug.GraalError;
import org.graalvm.compiler.jtt.JTTTest;
-import org.graalvm.compiler.test.ExportingClassLoader;
+import org.graalvm.compiler.api.test.ExportingClassLoader;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/except/UntrustedInterfaces.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
package org.graalvm.compiler.jtt.except;
import org.graalvm.compiler.jtt.JTTTest;
-import org.graalvm.compiler.test.ExportingClassLoader;
+import org.graalvm.compiler.api.test.ExportingClassLoader;
import org.junit.BeforeClass;
import org.junit.Test;
import org.objectweb.asm.ClassWriter;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/NestedLoop_EA.java Thu Nov 07 18:44:09 2019 +0000
@@ -44,7 +44,7 @@
protected Suites createSuites(OptionValues options) {
Suites suites = super.createSuites(options);
ListIterator<BasePhase<? super HighTierContext>> position = suites.getHighTier().findPhase(PartialEscapePhase.class);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
// incremental canonicalizer of PEA is missing some important canonicalization (TODO?)
position.add(canonicalizer);
position.add(new PartialEscapePhase(true, canonicalizer, options));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TrichotomyTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/TrichotomyTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2527,7 +2527,7 @@
// test folding
StructuredGraph graph = self.parseForCompile(self.getResolvedJavaMethod(name));
HighTierContext context = self.getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = self.createCanonicalizerPhase();
canonicalizer.apply(graph, context);
Assert.assertTrue("Too many ConditionalNodes after canonicalization", graph.getNodes().filter(ConditionalNode.class).count() <= 1);
Assert.assertTrue("Unexpected IfNodes after canonicalization", graph.getNodes().filter(IfNode.class).isEmpty());
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.aarch64/src/org/graalvm/compiler/lir/aarch64/AArch64ArithmeticOp.java Thu Nov 07 18:44:09 2019 +0000
@@ -58,6 +58,13 @@
DIV,
SMULH,
UMULH,
+ SMULL,
+ SMNEGL,
+ MADD,
+ MSUB,
+ FMADD,
+ SMADDL,
+ SMSUBL,
REM,
UDIV,
UREM,
@@ -279,6 +286,12 @@
case MNEG:
masm.mneg(size, dst, src1, src2);
break;
+ case SMULL:
+ masm.smull(size, dst, src1, src2);
+ break;
+ case SMNEGL:
+ masm.smnegl(size, dst, src1, src2);
+ break;
case DIV:
masm.sdiv(size, dst, src1, src2);
break;
@@ -477,11 +490,10 @@
@Use(REG) protected AllocatableValue src3;
/**
- * Computes <code>result = src3 <op> src1 * src2</code>.
+ * Computes <code>result = src3 +/- src1 * src2</code>.
*/
public MultiplyAddSubOp(AArch64ArithmeticOp op, AllocatableValue result, AllocatableValue src1, AllocatableValue src2, AllocatableValue src3) {
super(TYPE);
- assert op == ADD || op == SUB || op == FADD;
this.op = op;
this.result = result;
this.src1 = src1;
@@ -493,15 +505,23 @@
public void emitCode(CompilationResultBuilder crb, AArch64MacroAssembler masm) {
int size = result.getPlatformKind().getSizeInBytes() * Byte.SIZE;
switch (op) {
- case ADD:
+ case MADD:
masm.madd(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3));
break;
- case SUB:
+ case MSUB:
masm.msub(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3));
break;
- case FADD:
+ case FMADD:
masm.fmadd(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3));
break;
+ case SMADDL:
+ assert size == 64;
+ masm.smaddl(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3));
+ break;
+ case SMSUBL:
+ assert size == 64;
+ masm.smsubl(size, asRegister(result), asRegister(src1), asRegister(src2), asRegister(src3));
+ break;
default:
throw GraalError.shouldNotReachHere();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64Move.java Thu Nov 07 18:44:09 2019 +0000
@@ -96,7 +96,7 @@
public static final class MoveToRegOp extends AbstractMoveOp {
public static final LIRInstructionClass<MoveToRegOp> TYPE = LIRInstructionClass.create(MoveToRegOp.class);
- @Def({REG, HINT}) protected AllocatableValue result;
+ @Def({REG, STACK, HINT}) protected AllocatableValue result;
@Use({REG, STACK}) protected AllocatableValue input;
public MoveToRegOp(AMD64Kind moveKind, AllocatableValue result, AllocatableValue input) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringLatin1InflateOp.java Thu Nov 07 18:44:09 2019 +0000
@@ -32,6 +32,8 @@
import static jdk.vm.ci.code.ValueUtil.asRegister;
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
+import java.util.EnumSet;
+
import org.graalvm.compiler.asm.Label;
import org.graalvm.compiler.asm.amd64.AMD64Address;
import org.graalvm.compiler.asm.amd64.AMD64Assembler;
@@ -43,8 +45,10 @@
import org.graalvm.compiler.lir.gen.LIRGeneratorTool;
import jdk.vm.ci.amd64.AMD64;
+import jdk.vm.ci.amd64.AMD64.CPUFeature;
import jdk.vm.ci.amd64.AMD64Kind;
import jdk.vm.ci.code.Register;
+import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.meta.Value;
@Opcode("AMD64_STRING_INFLATE")
@@ -73,7 +77,7 @@
rdstTemp = rdst = dst;
rlenTemp = rlen = len;
- vtmp1 = tool.newVariable(LIRKind.value(AMD64Kind.V512_BYTE));
+ vtmp1 = useAVX512ForStringInflateCompress(tool.target()) ? tool.newVariable(LIRKind.value(AMD64Kind.V512_BYTE)) : tool.newVariable(LIRKind.value(AMD64Kind.V128_BYTE));
rtmp2 = tool.newVariable(LIRKind.value(AMD64Kind.DWORD));
}
@@ -89,6 +93,13 @@
byteArrayInflate(masm, src, dst, len, tmp1, tmp2);
}
+ public static boolean useAVX512ForStringInflateCompress(TargetDescription target) {
+ EnumSet<CPUFeature> features = ((AMD64) target.arch).getFeatures();
+ return features.contains(AMD64.CPUFeature.AVX512BW) &&
+ features.contains(AMD64.CPUFeature.AVX512VL) &&
+ features.contains(AMD64.CPUFeature.BMI2);
+ }
+
/**
* Inflate a Latin1 string using a byte[] array representation into a UTF16 string using a
* char[] array representation.
@@ -110,10 +121,7 @@
assert dst.number != len.number && dst.number != tmp.number;
assert len.number != tmp.number;
- if (masm.supports(AMD64.CPUFeature.AVX512BW) &&
- masm.supports(AMD64.CPUFeature.AVX512VL) &&
- masm.supports(AMD64.CPUFeature.BMI2)) {
-
+ if (useAVX512ForStringInflateCompress(masm.target)) {
// If the length of the string is less than 16, we chose not to use the
// AVX512 instructions.
masm.testl(len, -16);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/AMD64StringUTF16CompressOp.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,6 +34,7 @@
import static jdk.vm.ci.amd64.AMD64.rsp;
import static jdk.vm.ci.code.ValueUtil.asRegister;
import static org.graalvm.compiler.lir.LIRInstruction.OperandFlag.REG;
+import static org.graalvm.compiler.lir.amd64.AMD64StringLatin1InflateOp.useAVX512ForStringInflateCompress;
import org.graalvm.compiler.asm.Label;
import org.graalvm.compiler.asm.amd64.AMD64Address;
@@ -82,7 +83,7 @@
rdstTemp = rdst = dst;
rlenTemp = rlen = len;
- LIRKind vkind = LIRKind.value(AMD64Kind.V512_BYTE);
+ LIRKind vkind = useAVX512ForStringInflateCompress(tool.target()) ? LIRKind.value(AMD64Kind.V512_BYTE) : LIRKind.value(AMD64Kind.V128_BYTE);
vtmp1 = tool.newVariable(vkind);
vtmp2 = tool.newVariable(vkind);
@@ -139,10 +140,7 @@
masm.push(len); // Save length for return.
- if (masm.supports(AMD64.CPUFeature.AVX512BW) &&
- masm.supports(AMD64.CPUFeature.AVX512VL) &&
- masm.supports(AMD64.CPUFeature.BMI2)) {
-
+ if (useAVX512ForStringInflateCompress(masm.target)) {
Label labelRestoreK1ReturnZero = new Label();
Label labelAvxPostAlignment = new Label();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AMD64VectorMove.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir.amd64/src/org/graalvm/compiler/lir/amd64/vector/AMD64VectorMove.java Thu Nov 07 18:44:09 2019 +0000
@@ -74,7 +74,7 @@
public static final class MoveToRegOp extends AMD64LIRInstruction implements ValueMoveOp {
public static final LIRInstructionClass<MoveToRegOp> TYPE = LIRInstructionClass.create(MoveToRegOp.class);
- @Def({REG, HINT}) protected AllocatableValue result;
+ @Def({REG, STACK, HINT}) protected AllocatableValue result;
@Use({REG, STACK}) protected AllocatableValue input;
public MoveToRegOp(AllocatableValue result, AllocatableValue input) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/LIRIntrospection.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -214,6 +214,23 @@
}
}
+ private static boolean verifyAssignment(LIRInstruction inst, Value newValue, EnumSet<OperandFlag> flags) {
+ Class<?> type = newValue.getClass();
+ if (!flags.contains(REG)) {
+ assert !type.isAssignableFrom(REGISTER_VALUE_CLASS) && !type.isAssignableFrom(VARIABLE_CLASS) : "Cannot assign RegisterValue / Variable to field without REG flag: " + inst + " newValue=" +
+ newValue;
+ }
+ if (!flags.contains(STACK)) {
+ assert !type.isAssignableFrom(STACK_SLOT_CLASS) : "Cannot assign StackSlot to field without STACK flag: " + inst + " newValue=" +
+ newValue;
+ }
+ if (!flags.contains(CONST)) {
+ assert !type.isAssignableFrom(CONSTANT_VALUE_CLASS) : "Cannot assign Constant to field without CONST flag: " + inst + " newValue=" +
+ newValue;
+ }
+ return true;
+ }
+
protected static void forEach(LIRInstruction inst, Values values, OperandMode mode, InstructionValueProcedure proc) {
for (int i = 0; i < values.getCount(); i++) {
assert LIRInstruction.ALLOWED_FLAGS.get(mode).containsAll(values.getFlags(i));
@@ -228,6 +245,9 @@
newValue = proc.doValue(inst, value, mode, values.getFlags(i));
}
if (!value.identityEquals(newValue)) {
+ if (!(value instanceof CompositeValue)) {
+ assert verifyAssignment(inst, newValue, values.getFlags(i));
+ }
values.setValue(inst, i, newValue);
}
} else {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -881,7 +881,12 @@
}
}
}
- return move.getConstant();
+ Constant constant = move.getConstant();
+ if (!(constant instanceof JavaConstant)) {
+ // Other kinds of constants might not be supported by the generic move operation.
+ return null;
+ }
+ return constant;
}
return null;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ConvertDeoptimizeToGuardPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/ConvertDeoptimizeToGuardPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -217,7 +217,7 @@
Node newGuard = guard;
if (survivingSuccessor instanceof LoopExitNode) {
- newGuard = ProxyNode.forGuard(guard, (LoopExitNode) survivingSuccessor, graph);
+ newGuard = ProxyNode.forGuard(guard, (LoopExitNode) survivingSuccessor);
}
survivingSuccessor.replaceAtUsages(InputType.Guard, newGuard);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopPeelingPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,6 +24,7 @@
package org.graalvm.compiler.loop.phases;
+import org.graalvm.compiler.debug.CounterKey;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.loop.LoopEx;
import org.graalvm.compiler.loop.LoopPolicies;
@@ -33,6 +34,8 @@
public class LoopPeelingPhase extends LoopPhase<LoopPolicies> {
+ public static final CounterKey PEELED = DebugContext.counter("Peeled");
+
public LoopPeelingPhase(LoopPolicies policies) {
super(policies);
}
@@ -45,10 +48,13 @@
LoopsData data = new LoopsData(graph);
try (DebugContext.Scope s = debug.scope("peeling", data.getCFG())) {
for (LoopEx loop : data.outerFirst()) {
- if (getPolicies().shouldPeel(loop, data.getCFG(), context.getMetaAccess())) {
- debug.log("Peeling %s", loop);
- LoopTransformations.peel(loop);
- debug.dump(DebugContext.DETAILED_LEVEL, graph, "Peeling %s", loop);
+ if (loop.canDuplicateLoop() && loop.loopBegin().getLoopEndCount() > 0) {
+ if (LoopPolicies.Options.PeelALot.getValue(graph.getOptions()) || getPolicies().shouldPeel(loop, data.getCFG(), context.getMetaAccess())) {
+ debug.log("Peeling %s", loop);
+ PEELED.add(debug, 1);
+ LoopTransformations.peel(loop);
+ debug.dump(DebugContext.DETAILED_LEVEL, graph, "Peeling %s", loop);
+ }
}
}
data.deleteUnusedNodes();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.phases/src/org/graalvm/compiler/loop/phases/LoopTransformations.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,9 +35,13 @@
import org.graalvm.compiler.core.common.calc.CanonicalCondition;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.graph.Graph.Mark;
+import org.graalvm.compiler.graph.Graph.NodeEventScope;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.Position;
+import org.graalvm.compiler.graph.spi.Simplifiable;
+import org.graalvm.compiler.graph.spi.SimplifierTool;
import org.graalvm.compiler.loop.CountedLoopInfo;
+import org.graalvm.compiler.loop.DefaultLoopPolicies;
import org.graalvm.compiler.loop.InductionVariable.Direction;
import org.graalvm.compiler.loop.LoopEx;
import org.graalvm.compiler.loop.LoopFragmentInside;
@@ -49,6 +53,7 @@
import org.graalvm.compiler.nodes.BeginNode;
import org.graalvm.compiler.nodes.ControlSplitNode;
import org.graalvm.compiler.nodes.EndNode;
+import org.graalvm.compiler.nodes.FixedGuardNode;
import org.graalvm.compiler.nodes.FixedNode;
import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.IfNode;
@@ -65,8 +70,10 @@
import org.graalvm.compiler.nodes.extended.OpaqueNode;
import org.graalvm.compiler.nodes.extended.SwitchNode;
import org.graalvm.compiler.nodes.spi.CoreProviders;
+import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.nodes.util.IntegerHelper;
import org.graalvm.compiler.phases.common.CanonicalizerPhase;
+import org.graalvm.compiler.phases.common.util.EconomicSetNodeEventListener;
public abstract class LoopTransformations {
@@ -75,24 +82,63 @@
}
public static void peel(LoopEx loop) {
+ loop.detectCounted();
loop.inside().duplicate().insertBefore(loop);
- loop.loopBegin().setLoopFrequency(Math.max(0.0, loop.loopBegin().loopFrequency() - 1));
+ if (loop.isCounted()) {
+ // For counted loops we assume that we have an effect on the loop frequency.
+ loop.loopBegin().setLoopFrequency(Math.max(1.0, loop.loopBegin().loopFrequency() - 1));
+ }
}
+ @SuppressWarnings("try")
public static void fullUnroll(LoopEx loop, CoreProviders context, CanonicalizerPhase canonicalizer) {
// assert loop.isCounted(); //TODO (gd) strengthen : counted with known trip count
LoopBeginNode loopBegin = loop.loopBegin();
StructuredGraph graph = loopBegin.graph();
int initialNodeCount = graph.getNodeCount();
- while (!loopBegin.isDeleted()) {
- Mark mark = graph.getMark();
- peel(loop);
- canonicalizer.applyIncremental(graph, context, mark);
- loop.invalidateFragments();
- if (graph.getNodeCount() > initialNodeCount + MaximumDesiredSize.getValue(graph.getOptions()) * 2) {
- throw new RetryableBailoutException("FullUnroll : Graph seems to grow out of proportion");
+ SimplifierTool defaultSimplifier = GraphUtil.getDefaultSimplifier(context.getMetaAccess(), context.getConstantReflection(), context.getConstantFieldProvider(),
+ canonicalizer.getCanonicalizeReads(), graph.getAssumptions(), graph.getOptions());
+ /*
+ * IMPORTANT: Canonicalizations inside the body of the remaining loop can introduce new
+ * control flow that is not automatically picked up by the control flow graph computation of
+ * the original LoopEx data structure, thus we disable simplification and manually simplify
+ * conditions in the peeled iteration to simplify the exit path.
+ */
+ CanonicalizerPhase c = canonicalizer.copyWithoutSimplification();
+ EconomicSetNodeEventListener l = new EconomicSetNodeEventListener();
+ int peelings = 0;
+ try (NodeEventScope ev = graph.trackNodeEvents(l)) {
+ while (!loopBegin.isDeleted()) {
+ Mark newNodes = graph.getMark();
+ /*
+ * Mark is not enough for the canonicalization of the floating nodes in the unrolled
+ * code since pre-existing constants are not new nodes. Therefore, we canonicalize
+ * (without simplification) all floating nodes changed during peeling but only
+ * simplify new (in the peeled iteration) ones.
+ */
+ EconomicSetNodeEventListener peeledListener = new EconomicSetNodeEventListener();
+ try (NodeEventScope peeledScope = graph.trackNodeEvents(peeledListener)) {
+ LoopTransformations.peel(loop);
+ }
+ graph.getDebug().dump(DebugContext.VERY_DETAILED_LEVEL, graph, "After peeling loop %s", loop);
+ c.applyIncremental(graph, context, peeledListener.getNodes());
+ loop.invalidateFragments();
+ for (Node n : graph.getNewNodes(newNodes)) {
+ if (n.isAlive() && (n instanceof IfNode || n instanceof SwitchNode || n instanceof FixedGuardNode || n instanceof BeginNode)) {
+ Simplifiable s = (Simplifiable) n;
+ s.simplify(defaultSimplifier);
+ graph.getDebug().dump(DebugContext.VERY_DETAILED_LEVEL, graph, "After simplifying if %s", s);
+ }
+ }
+ if (graph.getNodeCount() > initialNodeCount + MaximumDesiredSize.getValue(graph.getOptions()) * 2 ||
+ peelings > DefaultLoopPolicies.Options.FullUnrollMaxIterations.getValue(graph.getOptions())) {
+ throw new RetryableBailoutException("FullUnroll : Graph seems to grow out of proportion");
+ }
+ peelings++;
}
}
+ // Canonicalize with the original canonicalizer to capture all simplifications
+ canonicalizer.applyIncremental(graph, context, l.getNodes());
}
public static void unswitch(LoopEx loop, List<ControlSplitNode> controlSplitNodeSet) {
@@ -280,9 +326,9 @@
// Change the preLoop to execute one iteration for now
updatePreLoopLimit(preCounted);
- preLoopBegin.setLoopFrequency(1);
- mainLoopBegin.setLoopFrequency(Math.max(0.0, mainLoopBegin.loopFrequency() - 2));
- postLoopBegin.setLoopFrequency(Math.max(0.0, postLoopBegin.loopFrequency() - 1));
+ preLoopBegin.setLoopFrequency(1.0);
+ mainLoopBegin.setLoopFrequency(Math.max(1.0, mainLoopBegin.loopFrequency() - 2));
+ postLoopBegin.setLoopFrequency(Math.max(1.0, postLoopBegin.loopFrequency() - 1));
// The pre and post loops don't require safepoints at all
for (SafepointNode safepoint : preLoop.nodes().filter(SafepointNode.class)) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.test/src/org/graalvm/compiler/loop/test/LoopPartialUnrollTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop.test/src/org/graalvm/compiler/loop/test/LoopPartialUnrollTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -302,7 +302,7 @@
try (DebugContext.Scope buildScope = graph.getDebug().scope(name, method, graph)) {
MidTierContext context = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, null);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = this.createCanonicalizerPhase();
canonicalizer.apply(graph, context);
new RemoveValueProxyPhase().apply(graph);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
@@ -338,7 +338,7 @@
StructuredGraph referenceGraph = buildGraph(reference, false);
StructuredGraph testGraph = buildGraph(test, true);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(testGraph, getDefaultMidTierContext());
canonicalizer.apply(referenceGraph, getDefaultMidTierContext());
assertEquals(referenceGraph, testGraph);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/CountedLoopInfo.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -122,18 +122,18 @@
}
ValueNode range = sub(max, min);
- ConstantNode one = ConstantNode.forIntegerStamp(stamp, 1);
+ ConstantNode one = ConstantNode.forIntegerStamp(stamp, 1, graph);
if (oneOff) {
range = add(range, one);
}
// round-away-from-zero divison: (range + stride -/+ 1) / stride
- ValueNode denominator = add(range, sub(absStride, one));
+ ValueNode denominator = add(graph, range, sub(absStride, one), NodeView.DEFAULT);
ValueNode div = unsignedDivBefore(graph, loop.entryPoint(), denominator, absStride, null);
if (assumeLoopEntered) {
return graph.addOrUniqueWithInputs(div);
}
- ConstantNode zero = ConstantNode.forIntegerStamp(stamp, 0);
+ ConstantNode zero = ConstantNode.forIntegerStamp(stamp, 0, graph);
// This check is "wide": it looks like min <= max
// That's OK even if the loop is strict (`!isLimitIncluded()`)
// because in this case, `div` will be zero when min == max
@@ -142,6 +142,40 @@
}
/**
+ * Determine if the loop might be entered. Returns {@code false} if we can tell statically that
+ * the loop cannot be entered; returns {@code true} if the loop might possibly be entered,
+ * including in the case where we cannot be sure statically.
+ *
+ * @return false if the loop can definitely not be entered, true otherwise
+ */
+ public boolean loopMightBeEntered() {
+ Stamp stamp = iv.valueNode().stamp(NodeView.DEFAULT);
+
+ ValueNode max;
+ ValueNode min;
+ if (iv.direction() == Direction.Up) {
+ max = end;
+ min = iv.initNode();
+ } else {
+ assert iv.direction() == Direction.Down;
+ max = iv.initNode();
+ min = end;
+ }
+ if (oneOff) {
+ max = add(max, ConstantNode.forIntegerStamp(stamp, 1));
+ }
+
+ LogicNode entryCheck = getCounterIntegerHelper().createCompareNode(min, max, NodeView.DEFAULT);
+ if (entryCheck.isContradiction()) {
+ // We can definitely not enter this loop.
+ return false;
+ } else {
+ // We don't know for sure that the loop can't be entered, so assume it can.
+ return true;
+ }
+ }
+
+ /**
* @return true if the loop has constant bounds.
*/
public boolean isConstantMaxTripCount() {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/DefaultLoopPolicies.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,7 +26,7 @@
import static org.graalvm.compiler.core.common.GraalOptions.LoopMaxUnswitch;
import static org.graalvm.compiler.core.common.GraalOptions.MaximumDesiredSize;
-import static org.graalvm.compiler.core.common.GraalOptions.MinimumPeelProbability;
+import static org.graalvm.compiler.core.common.GraalOptions.MinimumPeelFrequency;
import java.util.List;
@@ -38,9 +38,6 @@
import org.graalvm.compiler.graph.NodeBitMap;
import org.graalvm.compiler.nodes.AbstractBeginNode;
import org.graalvm.compiler.nodes.ControlSplitNode;
-import org.graalvm.compiler.nodes.DeoptimizeNode;
-import org.graalvm.compiler.nodes.FixedNode;
-import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.InvokeNode;
import org.graalvm.compiler.nodes.LoopBeginNode;
import org.graalvm.compiler.nodes.MergeNode;
@@ -51,7 +48,6 @@
import org.graalvm.compiler.nodes.cfg.Block;
import org.graalvm.compiler.nodes.cfg.ControlFlowGraph;
import org.graalvm.compiler.nodes.debug.ControlFlowAnchorNode;
-import org.graalvm.compiler.nodes.java.TypeSwitchNode;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionKey;
import org.graalvm.compiler.options.OptionType;
@@ -79,13 +75,32 @@
public boolean shouldPeel(LoopEx loop, ControlFlowGraph cfg, MetaAccessProvider metaAccess) {
LoopBeginNode loopBegin = loop.loopBegin();
double entryProbability = cfg.blockFor(loopBegin.forwardEnd()).getRelativeFrequency();
- OptionValues options = cfg.graph.getOptions();
- if (entryProbability > MinimumPeelProbability.getValue(options) && loop.size() + loopBegin.graph().getNodeCount() < MaximumDesiredSize.getValue(options)) {
- // check whether we're allowed to peel this loop
- return loop.canDuplicateLoop();
- } else {
+ StructuredGraph graph = cfg.graph;
+ OptionValues options = graph.getOptions();
+
+ if (entryProbability < MinimumPeelFrequency.getValue(options)) {
return false;
}
+
+ if (loop.parent() != null) {
+ if (loop.size() > loop.parent().size() >> 1) {
+ // This loops make up more than half of the parent loop in terms of number of nodes.
+ // There is a risk that this loop unproportionally increases parent loop body size.
+ return false;
+ }
+ }
+
+ if (loop.loop().getChildren().size() > 0) {
+ // This loop has child loops. Loop peeling could explode graph size.
+ return false;
+ }
+
+ if (loop.size() + graph.getNodeCount() > MaximumDesiredSize.getValue(options)) {
+ // We are out of budget for peeling.
+ return false;
+ }
+
+ return true;
}
@Override
@@ -189,7 +204,7 @@
return false;
}
OptionValues options = loop.entryPoint().getOptions();
- return loopBegin.unswitches() <= LoopMaxUnswitch.getValue(options);
+ return loopBegin.unswitches() < LoopMaxUnswitch.getValue(options);
}
private static final class CountingClosure implements VirtualClosure {
@@ -238,19 +253,9 @@
int loopTotal = loop.size() - loop.loopBegin().phis().count() - stateNodesCount.count - 1;
int actualDiff = (loopTotal - inBranchTotal);
ControlSplitNode firstSplit = controlSplits.get(0);
- if (firstSplit instanceof TypeSwitchNode) {
- int copies = firstSplit.successors().count() - 1;
- for (Node succ : firstSplit.successors()) {
- FixedNode current = (FixedNode) succ;
- while (current instanceof FixedWithNextNode) {
- current = ((FixedWithNextNode) current).next();
- }
- if (current instanceof DeoptimizeNode) {
- copies--;
- }
- }
- actualDiff = actualDiff * copies;
- }
+
+ int copies = firstSplit.successors().count() - 1;
+ actualDiff = actualDiff * copies;
debug.log("shouldUnswitch(%s, %s) : delta=%d (%.2f%% inside of branches), max=%d, f=%.2f, phis=%d -> %b", loop, controlSplits, actualDiff, (double) (inBranchTotal) / loopTotal * 100, maxDiff,
loopFrequency, phis, actualDiff <= maxDiff);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopEx.java Thu Nov 07 18:44:09 2019 +0000
@@ -81,6 +81,7 @@
private LoopsData data;
private EconomicMap<Node, InductionVariable> ivs;
private boolean countedLoopChecked;
+ private int size = -1;
LoopEx(Loop<Block> loop, LoopsData data) {
this.loop = loop;
@@ -156,7 +157,10 @@
}
public int size() {
- return whole().nodes().count();
+ if (size == -1) {
+ size = whole().nodes().count();
+ }
+ return size;
}
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragment.java Thu Nov 07 18:44:09 2019 +0000
@@ -349,12 +349,11 @@
TriState isAnchorInLoop = isLoopNode(anchor, loopNodes, nonLoopNodes);
if (isAnchorInLoop != TriState.FALSE) {
if (!(anchor instanceof LoopExitNode && ((LoopExitNode) anchor).loopBegin() == loopBeginNode)) {
- /*
- * (gd) this is wrong in general, it's completely avoidable while we
- * are doing loop transforms using ValueProxies. If it happens after
- * it could still cause problem.
- */
- assert !((GuardNode) current).graph().hasValueProxies();
+ // It is undecidable whether the node is in the loop or not. This is
+ // not an issue for getting counted loop information,
+ // but causes issues when using the information for actual loop
+ // transformations. This is why a loop transformation must
+ // not happen while guards are floating.
isLoopNode = true;
}
} else if (AbstractControlFlowGraph.strictlyDominates(cfg.blockFor(anchor), cfg.blockFor(loopBeginNode))) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopFragmentInside.java Thu Nov 07 18:44:09 2019 +0000
@@ -233,7 +233,7 @@
}
}
mainLoopBegin.setUnrollFactor(mainLoopBegin.getUnrollFactor() * 2);
- mainLoopBegin.setLoopFrequency(mainLoopBegin.loopFrequency() / 2);
+ mainLoopBegin.setLoopFrequency(Math.max(1.0, mainLoopBegin.loopFrequency() / 2));
graph.getDebug().dump(DebugContext.DETAILED_LEVEL, graph, "LoopPartialUnroll %s", loop);
mainLoopBegin.getDebug().dump(DebugContext.VERBOSE_LEVEL, mainLoopBegin.graph(), "After insertWithinAfter %s", mainLoopBegin);
@@ -438,7 +438,7 @@
for (int i = 0; i < phi.valueCount(); i++) {
ValueNode v = phi.valueAt(i);
if (loopBegin.isPhiAtMerge(v)) {
- PhiNode newV = peel.getDuplicatedNode((ValuePhiNode) v);
+ PhiNode newV = peel.getDuplicatedNode((PhiNode) v);
if (newV != null) {
phi.setValueAt(i, newV);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/LoopPolicies.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,18 @@
import org.graalvm.compiler.nodes.ControlSplitNode;
import org.graalvm.compiler.nodes.cfg.ControlFlowGraph;
+import org.graalvm.compiler.options.Option;
+import org.graalvm.compiler.options.OptionKey;
+import org.graalvm.compiler.options.OptionType;
import jdk.vm.ci.meta.MetaAccessProvider;
public interface LoopPolicies {
+
+ class Options {
+ @Option(help = "", type = OptionType.Expert) public static final OptionKey<Boolean> PeelALot = new OptionKey<>(false);
+ }
+
boolean shouldPeel(LoopEx loop, ControlFlowGraph cfg, MetaAccessProvider metaAccess);
boolean shouldFullUnroll(LoopEx loop);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.loop/src/org/graalvm/compiler/loop/MathUtil.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -94,7 +94,9 @@
if (before.predecessor() instanceof FixedBinaryNode) {
FixedBinaryNode binaryPredecessor = (FixedBinaryNode) before.predecessor();
if (fixedDiv.dataFlowEquals(binaryPredecessor)) {
- fixedDiv.safeDelete();
+ if (fixedDiv.isAlive()) {
+ fixedDiv.safeDelete();
+ }
return binaryPredecessor;
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/GraalBenchmark.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
import static org.graalvm.compiler.microbenchmarks.graal.GraalBenchmark.Defaults.MEASUREMENT_ITERATIONS;
import static org.graalvm.compiler.microbenchmarks.graal.GraalBenchmark.Defaults.WARMUP_ITERATIONS;
+import org.graalvm.compiler.api.test.ModuleSupport;
+
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Warmup;
@@ -41,6 +43,9 @@
@Measurement(iterations = MEASUREMENT_ITERATIONS)
@Fork(FORKS)
public class GraalBenchmark {
+ static {
+ ModuleSupport.exportAndOpenAllPackagesToUnnamed("jdk.internal.vm.compiler");
+ }
public static class Defaults {
public static final int MEASUREMENT_ITERATIONS = 5;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMHWhitebox.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.microbenchmarks/src/org/graalvm/compiler/microbenchmarks/graal/TestJMHWhitebox.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
/**
* This dummy class is used to verify that the JMH microbenchmarking environment is set up properly.
*/
-public class TestJMHWhitebox {
+public class TestJMHWhitebox extends GraalBenchmark {
@Benchmark
public void testJMH(@SuppressWarnings("unused") GraalState s) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/IfNodeCanonicalizationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -67,19 +67,19 @@
for (byte d : testValues) {
values[3] = d;
value = 2;
- super.test("testSnippet1", values, true);
- super.test("testSnippet1", values, false);
+ super.test("testSnippet1", values);
}
}
}
}
}
- public int testSnippet1(byte[] values, boolean test) {
+ public int testSnippet1(byte[] values) {
int v = values[0] - values[1];
- if (test) {
- v = values[2] - values[3];
+ if (v < 0) {
+ value = 2;
}
+ v = values[3] - values[2];
if (v < 0) {
value = 1;
}
@@ -156,13 +156,12 @@
StructuredGraph graph = parseEager(name, AllowAssumptions.YES);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new ConvertDeoptimizeToGuardPhase().apply(graph, context);
graph.clearAllStateAfter();
graph.setGuardsStage(StructuredGraph.GuardsStage.AFTER_FSA);
canonicalizer.apply(graph, context);
- // new DominatorConditionalEliminationPhase(true).apply(graph, context);
new IterativeConditionalEliminationPhase(canonicalizer, true).apply(graph, context);
canonicalizer.apply(graph, context);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/LoopPhiCanonicalizerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,7 +31,6 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.spi.CoreProviders;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -67,7 +66,7 @@
CoreProviders context = getProviders();
Assert.assertEquals(5, graph.getNodes().filter(loopPhis).count());
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
Assert.assertEquals(2, graph.getNodes().filter(loopPhis).count());
test("loopSnippet");
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes.test/src/org/graalvm/compiler/nodes/test/ShortCircuitOrNodeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -378,7 +378,7 @@
String snippet = "testCascadeSnippet" + i;
StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES);
CoreProviders context = getProviders();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new IncrementalCanonicalizerPhase<>(canonicalizer, new FloatingReadPhase()).apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/FrameState.java Thu Nov 07 18:44:09 2019 +0000
@@ -306,15 +306,8 @@
/**
* Gets a copy of this frame state.
*/
- public FrameState duplicate(int newBci) {
- return graph().add(new FrameState(outerFrameState(), code, newBci, values, localsSize, stackSize, rethrowException, duringCall, monitorIds, virtualObjectMappings));
- }
-
- /**
- * Gets a copy of this frame state.
- */
public FrameState duplicate() {
- return duplicate(bci);
+ return graph().add(new FrameState(outerFrameState(), code, bci, values, localsSize, stackSize, rethrowException, duringCall, monitorIds, virtualObjectMappings));
}
/**
@@ -350,20 +343,6 @@
}
/**
- * Creates a copy of this frame state with one stack element of type {@code popKind} popped from
- * the stack and the values in {@code pushedValues} pushed on the stack. The
- * {@code pushedValues} will be formatted correctly in slot encoding: a long or double will be
- * followed by a null slot.
- */
- public FrameState duplicateModified(int newBci, boolean newRethrowException, JavaKind popKind, JavaKind[] pushedSlotKinds, ValueNode[] pushedValues) {
- return duplicateModified(graph(), newBci, newRethrowException, duringCall, popKind, pushedSlotKinds, pushedValues);
- }
-
- public FrameState duplicateModified(int newBci, boolean newRethrowException, boolean newDuringCall, JavaKind popKind, JavaKind[] pushedSlotKinds, ValueNode[] pushedValues) {
- return duplicateModified(graph(), newBci, newRethrowException, newDuringCall, popKind, pushedSlotKinds, pushedValues);
- }
-
- /**
* Creates a copy of this frame state with the top of stack replaced with with
* {@code pushedValue} which must be of type {@code popKind}.
*/
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GraphDecoder.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -1748,7 +1748,7 @@
"Value flowing out of loop, but we are not prepared to insert a ProxyNode");
ProxyPlaceholder proxyPlaceholder = (ProxyPlaceholder) value;
- ValueProxyNode proxy = ProxyNode.forValue(proxyPlaceholder.value, loopExit, graph);
+ ValueProxyNode proxy = ProxyNode.forValue(proxyPlaceholder.value, loopExit);
proxyPlaceholder.setValue(proxy);
newValues.add(proxy);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/GuardProxyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,19 +25,13 @@
package org.graalvm.compiler.nodes;
import org.graalvm.compiler.core.common.type.StampFactory;
-import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
-import org.graalvm.compiler.graph.spi.Canonicalizable;
-import org.graalvm.compiler.graph.spi.CanonicalizerTool;
import org.graalvm.compiler.nodeinfo.InputType;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.extended.GuardingNode;
-import org.graalvm.compiler.nodes.spi.LIRLowerable;
-import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
-import org.graalvm.compiler.nodes.spi.Proxy;
-@NodeInfo(allowedUsageTypes = {InputType.Guard}, nameTemplate = "Proxy({i#value})")
-public final class GuardProxyNode extends ProxyNode implements GuardingNode, Proxy, LIRLowerable, Canonicalizable {
+@NodeInfo(allowedUsageTypes = {InputType.Guard}, nameTemplate = "GuardProxy({i#value})")
+public final class GuardProxyNode extends ProxyNode implements GuardingNode {
public static final NodeClass<GuardProxyNode> TYPE = NodeClass.create(GuardProxyNode.class);
@OptionalInput(InputType.Guard) GuardingNode value;
@@ -47,10 +41,6 @@
this.value = value;
}
- @Override
- public void generate(NodeLIRBuilderTool generator) {
- }
-
public void setValue(GuardingNode newValue) {
this.updateUsages(value.asNode(), newValue.asNode());
this.value = newValue;
@@ -65,17 +55,4 @@
public PhiNode createPhi(AbstractMergeNode merge) {
return graph().addWithoutUnique(new GuardPhiNode(merge));
}
-
- @Override
- public Node getOriginalNode() {
- return (value == null ? null : value.asNode());
- }
-
- @Override
- public Node canonical(CanonicalizerTool tool) {
- if (value == null) {
- return null;
- }
- return this;
- }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/IfNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -54,7 +54,6 @@
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.NodeSourcePosition;
import org.graalvm.compiler.graph.iterators.NodeIterable;
-import org.graalvm.compiler.graph.spi.Canonicalizable;
import org.graalvm.compiler.graph.spi.Simplifiable;
import org.graalvm.compiler.graph.spi.SimplifierTool;
import org.graalvm.compiler.nodeinfo.InputType;
@@ -95,9 +94,6 @@
public final class IfNode extends ControlSplitNode implements Simplifiable, LIRLowerable, IterableNodeType, SwitchFoldable {
public static final NodeClass<IfNode> TYPE = NodeClass.create(IfNode.class);
- private static final int MAX_USAGE_COLOR_SET_SIZE = 64;
- private static final int MAX_FRAMESTATE_SEARCH_DEPTH = 4;
-
private static final CounterKey CORRECTED_PROBABILITIES = DebugContext.counter("CorrectedProbabilities");
@Successor AbstractBeginNode trueSuccessor;
@@ -297,10 +293,6 @@
return;
}
- if (splitIfAtPhi(tool)) {
- return;
- }
-
if (conditionalNodeOptimization(tool)) {
return;
}
@@ -1185,400 +1177,6 @@
}
/**
- * Take an if that is immediately dominated by a merge with a single phi and split off any paths
- * where the test would be statically decidable creating a new merge below the appropriate side
- * of the IfNode. Any undecidable tests will continue to use the original IfNode.
- *
- * @param tool
- */
- @SuppressWarnings("try")
- private boolean splitIfAtPhi(SimplifierTool tool) {
- if (!(predecessor() instanceof MergeNode)) {
- return false;
- }
- MergeNode merge = (MergeNode) predecessor();
- if (merge.forwardEndCount() == 1) {
- // Don't bother.
- return false;
- }
- if (merge.getUsageCount() != 1 || merge.phis().count() != 1) {
- // Don't trigger with multiple phis. Would require more rewiring.
- // Most of the time the additional phis are memory phis that are removed after
- // fixed read phase.
- return false;
- }
- if (graph().getGuardsStage().areFrameStatesAtSideEffects() && merge.stateAfter() == null) {
- return false;
- }
-
- PhiNode generalPhi = merge.phis().first();
- if (!(generalPhi instanceof ValuePhiNode)) {
- return false;
- }
-
- if (trueSuccessor().isUsedAsGuardInput() || falseSuccessor().isUsedAsGuardInput()) {
- return false;
- }
-
- ValuePhiNode phi = (ValuePhiNode) generalPhi;
-
- EconomicMap<Node, NodeColor> coloredNodes = EconomicMap.create(Equivalence.IDENTITY, 8);
-
- /*
- * Check that the condition uses the phi and that there is only one user of the condition
- * expression.
- */
- if (!conditionUses(condition(), phi, coloredNodes)) {
- return false;
- }
-
- if (!mayRemoveSplit(merge)) {
- return false;
- }
-
- LogicNode[] results = new LogicNode[merge.forwardEndCount()];
- boolean success = false;
- for (int i = 0; i < results.length; ++i) {
- ValueNode value = phi.valueAt(i);
- LogicNode curResult = computeCondition(tool, condition, phi, value);
- if (curResult != condition) {
- for (Node n : curResult.inputs()) {
- if (n instanceof ConstantNode || n instanceof ParameterNode || n instanceof FixedNode) {
- // Constant inputs or parameters or fixed nodes are OK.
- } else if (n == value) {
- // References to the value itself are also OK.
- } else {
- // Input may cause scheduling issues.
- curResult = condition;
- break;
- }
- }
- success = true;
- }
- results[i] = curResult;
- }
-
- if (!success) {
- return false;
- }
-
- for (Node usage : phi.usages()) {
- if (usage == merge.stateAfter()) {
- // This usage can be ignored, because it is directly in the state after.
- } else {
- NodeColor color = colorUsage(coloredNodes, usage, merge, this.trueSuccessor(), this.falseSuccessor());
- if (color == NodeColor.MIXED) {
- return false;
- }
- }
- }
-
- /*
- * We could additionally filter for the case that at least some of the Phi inputs or one of
- * the condition inputs are constants but there are cases where a non-constant is
- * simplifiable, usually where the stamp allows the question to be answered.
- */
-
- /* Each successor of the if gets a new merge if needed. */
- MergeNode trueMerge = null;
- MergeNode falseMerge = null;
- int i = 0;
- for (EndNode end : merge.forwardEnds().snapshot()) {
- ValueNode value = phi.valueAt(end);
- LogicNode result = results[i++];
- if (result instanceof LogicConstantNode) {
- if (((LogicConstantNode) result).getValue()) {
- if (trueMerge == null) {
- trueMerge = insertMerge(trueSuccessor(), phi, merge.stateAfter(), tool);
- replaceNodesInBranch(coloredNodes, NodeColor.TRUE_BRANCH, phi, trueMerge.phis().first());
- }
- trueMerge.phis().first().addInput(value);
- trueMerge.addForwardEnd(end);
- } else {
- if (falseMerge == null) {
- falseMerge = insertMerge(falseSuccessor(), phi, merge.stateAfter(), tool);
- replaceNodesInBranch(coloredNodes, NodeColor.FALSE_BRANCH, phi, falseMerge.phis().first());
- }
- falseMerge.phis().first().addInput(value);
- falseMerge.addForwardEnd(end);
- }
- merge.removeEnd(end);
- } else if (result != condition) {
- // Build a new IfNode using the new condition
- BeginNode trueBegin = graph().add(new BeginNode());
- trueBegin.setNodeSourcePosition(trueSuccessor().getNodeSourcePosition());
- BeginNode falseBegin = graph().add(new BeginNode());
- falseBegin.setNodeSourcePosition(falseSuccessor().getNodeSourcePosition());
-
- if (result.graph() == null) {
- result = graph().addOrUniqueWithInputs(result);
- result.setNodeSourcePosition(condition.getNodeSourcePosition());
- }
- IfNode newIfNode = graph().add(new IfNode(result, trueBegin, falseBegin, trueSuccessorProbability));
- newIfNode.setNodeSourcePosition(getNodeSourcePosition());
-
- if (trueMerge == null) {
- trueMerge = insertMerge(trueSuccessor(), phi, merge.stateAfter(), tool);
- replaceNodesInBranch(coloredNodes, NodeColor.TRUE_BRANCH, phi, trueMerge.phis().first());
- }
- trueMerge.phis().first().addInput(value);
- trueBegin.setNext(graph().add(new EndNode()));
- trueMerge.addForwardEnd((EndNode) trueBegin.next());
-
- if (falseMerge == null) {
- falseMerge = insertMerge(falseSuccessor(), phi, merge.stateAfter(), tool);
- replaceNodesInBranch(coloredNodes, NodeColor.FALSE_BRANCH, phi, falseMerge.phis().first());
- }
- falseMerge.phis().first().addInput(value);
- falseBegin.setNext(graph().add(new EndNode()));
- falseMerge.addForwardEnd((EndNode) falseBegin.next());
-
- merge.removeEnd(end);
- ((FixedWithNextNode) end.predecessor()).setNext(newIfNode);
- end.safeDelete();
- }
- }
-
- cleanupMerge(merge);
- cleanupMerge(trueMerge);
- cleanupMerge(falseMerge);
-
- return true;
- }
-
- private static void replaceNodesInBranch(EconomicMap<Node, NodeColor> coloredNodes, NodeColor branch, ValuePhiNode phi, ValueNode newValue) {
- for (Node n : phi.usages().snapshot()) {
- if (coloredNodes.get(n) == branch) {
- n.replaceAllInputs(phi, newValue);
- } else if (coloredNodes.get(n) == NodeColor.PHI_MIXED) {
- assert n instanceof PhiNode;
- PhiNode phiNode = (PhiNode) n;
- AbstractMergeNode merge = phiNode.merge();
- for (int i = 0; i < merge.forwardEndCount(); ++i) {
- if (phiNode.valueAt(i) == phi && coloredNodes.get(merge.forwardEndAt(i)) == branch) {
- phiNode.setValueAt(i, newValue);
- }
- }
- }
- }
- }
-
- private NodeColor colorUsage(EconomicMap<Node, NodeColor> coloredNodes, Node node, MergeNode merge, AbstractBeginNode trueSucc, AbstractBeginNode falseSucc) {
- NodeColor color = coloredNodes.get(node);
- if (color == null) {
-
- if (coloredNodes.size() >= MAX_USAGE_COLOR_SET_SIZE) {
- return NodeColor.MIXED;
- }
-
- coloredNodes.put(node, NodeColor.MIXED);
-
- if (node == merge) {
- color = NodeColor.MIXED;
- } else if (node == trueSucc) {
- color = NodeColor.TRUE_BRANCH;
- } else if (node == falseSucc) {
- color = NodeColor.FALSE_BRANCH;
- } else {
- if (node instanceof AbstractMergeNode) {
- AbstractMergeNode mergeNode = (AbstractMergeNode) node;
- NodeColor combinedColor = null;
- for (int i = 0; i < mergeNode.forwardEndCount(); ++i) {
- NodeColor curColor = colorUsage(coloredNodes, mergeNode.forwardEndAt(i), merge, trueSucc, falseSucc);
- if (combinedColor == null) {
- combinedColor = curColor;
- } else if (combinedColor != curColor) {
- combinedColor = NodeColor.MIXED;
- break;
- }
- }
- color = combinedColor;
- } else if (node instanceof StartNode) {
- color = NodeColor.MIXED;
- } else if (node instanceof FixedNode) {
- FixedNode fixedNode = (FixedNode) node;
- Node predecessor = fixedNode.predecessor();
- assert predecessor != null : fixedNode;
- color = colorUsage(coloredNodes, predecessor, merge, trueSucc, falseSucc);
- } else if (node instanceof PhiNode) {
- PhiNode phiNode = (PhiNode) node;
- AbstractMergeNode phiMerge = phiNode.merge();
-
- if (phiMerge instanceof LoopBeginNode) {
- color = colorUsage(coloredNodes, phiMerge, merge, trueSucc, falseSucc);
- } else {
-
- for (int i = 0; i < phiMerge.forwardEndCount(); ++i) {
- NodeColor curColor = colorUsage(coloredNodes, phiMerge.forwardEndAt(i), merge, trueSucc, falseSucc);
- if (curColor != NodeColor.TRUE_BRANCH && curColor != NodeColor.FALSE_BRANCH) {
- color = NodeColor.MIXED;
- break;
- }
- }
-
- if (color == null) {
- // Each of the inputs to the phi are either coming unambigously from
- // true or false branch.
- color = NodeColor.PHI_MIXED;
- assert node instanceof PhiNode;
- }
- }
- } else {
- NodeColor combinedColor = null;
- for (Node n : node.usages()) {
- if (n != node) {
- NodeColor curColor = colorUsage(coloredNodes, n, merge, trueSucc, falseSucc);
- if (combinedColor == null) {
- combinedColor = curColor;
- } else if (combinedColor != curColor) {
- combinedColor = NodeColor.MIXED;
- break;
- }
- }
- }
- if (combinedColor == NodeColor.PHI_MIXED) {
- combinedColor = NodeColor.MIXED;
- }
- if (combinedColor == null) {
- // Floating node without usages => association unclear.
- combinedColor = NodeColor.MIXED;
- }
- color = combinedColor;
- }
- }
-
- assert color != null : node;
- coloredNodes.put(node, color);
- }
- return color;
- }
-
- /**
- * @param condition
- * @param phi
- * @param coloredNodes
- * @return true if the passed in {@code condition} uses {@code phi} and the condition is only
- * used once. Since the phi will go dead the condition using it will also have to be
- * dead after the optimization.
- */
- private static boolean conditionUses(LogicNode condition, PhiNode phi, EconomicMap<Node, NodeColor> coloredNodes) {
- if (!condition.hasExactlyOneUsage()) {
- return false;
- }
- if (condition instanceof ShortCircuitOrNode) {
- if (condition.graph().getGuardsStage().areDeoptsFixed()) {
- /*
- * It can be unsafe to simplify a ShortCircuitOr before deopts are fixed because
- * conversion to guards assumes that all the required conditions are being tested.
- * Simplfying the condition based on context before this happens may lose a
- * condition.
- */
- ShortCircuitOrNode orNode = (ShortCircuitOrNode) condition;
- return (conditionUses(orNode.x, phi, coloredNodes) || conditionUses(orNode.y, phi, coloredNodes));
- }
- } else if (condition instanceof Canonicalizable.Unary<?>) {
- Canonicalizable.Unary<?> unary = (Canonicalizable.Unary<?>) condition;
- if (unary.getValue() == phi) {
- coloredNodes.put(condition, NodeColor.CONDITION_USAGE);
- return true;
- }
- } else if (condition instanceof Canonicalizable.Binary<?>) {
- Canonicalizable.Binary<?> binary = (Canonicalizable.Binary<?>) condition;
- if (binary.getX() == phi || binary.getY() == phi) {
- coloredNodes.put(condition, NodeColor.CONDITION_USAGE);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Canonicalize {@code} condition using {@code value} in place of {@code phi}.
- *
- * @param tool
- * @param condition
- * @param phi
- * @param value
- * @return an improved LogicNode or the original condition
- */
- @SuppressWarnings("unchecked")
- private static LogicNode computeCondition(SimplifierTool tool, LogicNode condition, PhiNode phi, Node value) {
- if (condition instanceof ShortCircuitOrNode) {
- if (condition.graph().getGuardsStage().areDeoptsFixed() && !condition.graph().isAfterExpandLogic()) {
- ShortCircuitOrNode orNode = (ShortCircuitOrNode) condition;
- LogicNode resultX = computeCondition(tool, orNode.x, phi, value);
- LogicNode resultY = computeCondition(tool, orNode.y, phi, value);
- if (resultX != orNode.x || resultY != orNode.y) {
- LogicNode result = orNode.canonical(tool, resultX, resultY);
- if (result != orNode) {
- return result;
- }
- /*
- * Create a new node to carry the optimized inputs.
- */
- ShortCircuitOrNode newOr = new ShortCircuitOrNode(resultX, orNode.xNegated, resultY,
- orNode.yNegated, orNode.getShortCircuitProbability());
- return newOr.canonical(tool);
- }
- return orNode;
- }
- } else if (condition instanceof Canonicalizable.Binary<?>) {
- Canonicalizable.Binary<Node> compare = (Canonicalizable.Binary<Node>) condition;
- if (compare.getX() == phi || compare.getY() == phi) {
- return (LogicNode) compare.canonical(tool, compare.getX() == phi ? value : compare.getX(), compare.getY() == phi ? value : compare.getY());
- }
- } else if (condition instanceof Canonicalizable.Unary<?>) {
- Canonicalizable.Unary<Node> compare = (Canonicalizable.Unary<Node>) condition;
- if (compare.getValue() == phi) {
- return (LogicNode) compare.canonical(tool, value);
- }
- }
- if (condition instanceof Canonicalizable) {
- return (LogicNode) ((Canonicalizable) condition).canonical(tool);
- }
- return condition;
- }
-
- private void cleanupMerge(MergeNode merge) {
- if (merge != null && merge.isAlive()) {
- if (merge.forwardEndCount() == 0) {
- GraphUtil.killCFG(merge);
- } else if (merge.forwardEndCount() == 1) {
- graph().reduceTrivialMerge(merge);
- }
- }
- }
-
- @SuppressWarnings("try")
- private MergeNode insertMerge(AbstractBeginNode begin, ValuePhiNode oldPhi, FrameState stateAfter, SimplifierTool tool) {
- MergeNode merge = graph().add(new MergeNode());
-
- AbstractBeginNode newBegin;
- try (DebugCloseable position = begin.withNodeSourcePosition()) {
- newBegin = graph().add(new BeginNode());
- begin.replaceAtPredecessor(newBegin);
- newBegin.setNext(begin);
- }
-
- FixedNode next = newBegin.next();
- next.replaceAtPredecessor(merge);
- newBegin.setNext(graph().add(new EndNode()));
- merge.addForwardEnd((EndNode) newBegin.next());
-
- ValuePhiNode phi = begin.graph().addOrUnique(new ValuePhiNode(oldPhi.stamp(NodeView.DEFAULT), merge));
- phi.addInput(oldPhi);
-
- if (stateAfter != null) {
- FrameState newState = stateAfter.duplicate();
- newState.replaceAllInputs(oldPhi, phi);
- merge.setStateAfter(newState);
- }
- merge.setNext(next);
- tool.addToWorkList(begin);
- return merge;
- }
-
- /**
* Tries to connect code that initializes a variable directly with the successors of an if
* construct that switches on the variable. For example, the pseudo code below:
*
@@ -1709,7 +1307,7 @@
return false;
}
- if (!mayRemoveSplit(merge)) {
+ if (merge.stateAfter() != null && !GraphUtil.mayRemoveSplit(this)) {
return false;
}
@@ -1771,15 +1369,6 @@
return true;
}
- private boolean mayRemoveSplit(AbstractMergeNode merge) {
-
- if (merge.stateAfter() != null && (!checkFrameState(trueSuccessor, MAX_FRAMESTATE_SEARCH_DEPTH) || !checkFrameState(trueSuccessor, MAX_FRAMESTATE_SEARCH_DEPTH))) {
- return false;
- }
-
- return true;
- }
-
private static void propagateZeroProbability(FixedNode startNode) {
Node prev = null;
for (FixedNode node : GraphUtil.predecessorIterable(startNode)) {
@@ -1817,53 +1406,6 @@
}
/**
- * Snippet lowerings may produce patterns without a frame state on the merge. We need to take
- * extra care when optimizing these patterns.
- */
- private static boolean checkFrameState(FixedNode start, int maxDepth) {
- if (maxDepth == 0) {
- return false;
- }
- FixedNode node = start;
- while (true) {
- if (node instanceof AbstractMergeNode) {
- AbstractMergeNode mergeNode = (AbstractMergeNode) node;
- if (mergeNode.stateAfter() == null) {
- return false;
- } else {
- return true;
- }
- } else if (node instanceof StateSplit) {
- StateSplit stateSplitNode = (StateSplit) node;
- if (stateSplitNode.stateAfter() != null) {
- return true;
- }
- }
-
- if (node instanceof ControlSplitNode) {
- ControlSplitNode controlSplitNode = (ControlSplitNode) node;
- for (Node succ : controlSplitNode.cfgSuccessors()) {
- if (checkFrameState((FixedNode) succ, maxDepth - 1)) {
- return true;
- }
- }
- return false;
- } else if (node instanceof FixedWithNextNode) {
- FixedWithNextNode fixedWithNextNode = (FixedWithNextNode) node;
- node = fixedWithNextNode.next();
- } else if (node instanceof AbstractEndNode) {
- AbstractEndNode endNode = (AbstractEndNode) node;
- node = endNode.merge();
- } else if (node instanceof ControlSinkNode) {
- return true;
- } else {
- assert false : "unexpected node";
- return false;
- }
- }
- }
-
- /**
* Connects a set of ends to a given successor, inserting a merge node if there is more than one
* end. If {@code ends} is not empty, then {@code successor} is added to {@code tool}'s
* {@linkplain SimplifierTool#addToWorkList(org.graalvm.compiler.graph.Node) work list}.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -109,7 +109,7 @@
this.bci = invoke.bci;
this.polymorphic = invoke.polymorphic;
this.useForInlining = invoke.useForInlining;
- this.identity = invoke.getLocationIdentity();
+ this.identity = invoke.getKilledLocationIdentity();
}
@Override
@@ -181,7 +181,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return identity;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/InvokeWithExceptionNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -159,7 +159,7 @@
@Override
public void setNext(FixedNode x) {
if (x != null) {
- this.setNext(KillingBeginNode.begin(x, getLocationIdentity()));
+ this.setNext(KillingBeginNode.begin(x, this.getKilledLocationIdentity()));
} else {
this.setNext(null);
}
@@ -192,7 +192,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
@@ -290,7 +290,7 @@
* code.
*/
public InvokeNode replaceWithInvoke() {
- InvokeNode newInvoke = graph().add(new InvokeNode(callTarget, bci, stamp, getLocationIdentity()));
+ InvokeNode newInvoke = graph().add(new InvokeNode(callTarget, bci, stamp, this.getKilledLocationIdentity()));
newInvoke.setStateAfter(stateAfter);
newInvoke.setStateDuring(stateDuring);
AbstractBeginNode oldException = this.exceptionEdge;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/KillingBeginNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locationIdentity;
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/LoopBeginNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -141,7 +141,7 @@
}
public void setLoopFrequency(double loopFrequency) {
- assert loopFrequency >= 0;
+ assert loopFrequency >= 1.0;
this.loopFrequency = loopFrequency;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/MemoryProxyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.nodes;
+
+import org.graalvm.compiler.core.common.type.StampFactory;
+import org.graalvm.compiler.graph.NodeClass;
+import org.graalvm.compiler.nodeinfo.InputType;
+import org.graalvm.compiler.nodeinfo.NodeInfo;
+import org.graalvm.compiler.nodes.memory.MemoryNode;
+import org.graalvm.compiler.nodes.memory.MemoryPhiNode;
+import jdk.internal.vm.compiler.word.LocationIdentity;
+
+@NodeInfo(allowedUsageTypes = {InputType.Memory}, nameTemplate = "MemoryProxy({i#value})")
+public final class MemoryProxyNode extends ProxyNode implements MemoryNode {
+
+ public static final NodeClass<MemoryProxyNode> TYPE = NodeClass.create(MemoryProxyNode.class);
+ @OptionalInput(InputType.Memory) MemoryNode value;
+ protected final LocationIdentity locationIdentity;
+
+ public MemoryProxyNode(MemoryNode value, LoopExitNode proxyPoint, LocationIdentity locationIdentity) {
+ super(TYPE, StampFactory.forVoid(), proxyPoint);
+ this.value = value;
+ this.locationIdentity = locationIdentity;
+ }
+
+ public void setValue(MemoryNode newValue) {
+ this.updateUsages(value.asNode(), newValue.asNode());
+ this.value = newValue;
+ }
+
+ @Override
+ public ValueNode value() {
+ return (value == null ? null : value.asNode());
+ }
+
+ @Override
+ public PhiNode createPhi(AbstractMergeNode merge) {
+ return graph().addWithoutUnique(new MemoryPhiNode(merge, locationIdentity));
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ProxyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,18 +29,24 @@
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_0;
import org.graalvm.compiler.core.common.type.Stamp;
+import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.Node.ValueNumberable;
+import org.graalvm.compiler.graph.spi.Canonicalizable;
+import org.graalvm.compiler.graph.spi.CanonicalizerTool;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.calc.FloatingNode;
import org.graalvm.compiler.nodes.extended.GuardingNode;
+import org.graalvm.compiler.nodes.memory.MemoryNode;
+import org.graalvm.compiler.nodes.spi.Proxy;
+import jdk.internal.vm.compiler.word.LocationIdentity;
/**
* A proxy is inserted at loop exits for any value that is created inside the loop (i.e. was not
* live on entry to the loop) and is (potentially) used after the loop.
*/
@NodeInfo(cycles = CYCLES_0, size = SIZE_0)
-public abstract class ProxyNode extends FloatingNode implements ValueNumberable {
+public abstract class ProxyNode extends FloatingNode implements Proxy, ValueNumberable, Canonicalizable {
public static final NodeClass<ProxyNode> TYPE = NodeClass.create(ProxyNode.class);
@Input(Association) LoopExitNode loopExit;
@@ -63,17 +69,34 @@
}
@Override
+ public ValueNode getOriginalNode() {
+ return value();
+ }
+
+ @Override
public boolean verify() {
assert !(value() instanceof ProxyNode) || ((ProxyNode) value()).loopExit != loopExit;
return super.verify();
}
- public static ValueProxyNode forValue(ValueNode value, LoopExitNode exit, StructuredGraph graph) {
- return graph.unique(new ValueProxyNode(value, exit));
+ public static ValueProxyNode forValue(ValueNode value, LoopExitNode exit) {
+ return exit.graph().unique(new ValueProxyNode(value, exit));
+ }
+
+ public static GuardProxyNode forGuard(GuardingNode value, LoopExitNode exit) {
+ return exit.graph().unique(new GuardProxyNode(value, exit));
}
- public static GuardProxyNode forGuard(GuardingNode value, LoopExitNode exit, StructuredGraph graph) {
- return graph.unique(new GuardProxyNode(value, exit));
+ public static MemoryProxyNode forMemory(MemoryNode value, LoopExitNode exit, LocationIdentity locationIdentity) {
+ return exit.graph().unique(new MemoryProxyNode(value, exit, locationIdentity));
+ }
+
+ @Override
+ public Node canonical(CanonicalizerTool tool) {
+ if (value() == null) {
+ return null;
+ }
+ return this;
}
public abstract PhiNode createPhi(AbstractMergeNode merge);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StartNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java Thu Nov 07 18:44:09 2019 +0000
@@ -125,6 +125,10 @@
public boolean areDeoptsFixed() {
return this.ordinal() >= FIXED_DEOPTS.ordinal();
}
+
+ public boolean requiresValueProxies() {
+ return this != AFTER_FSA;
+ }
}
/**
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/ValueProxyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
import org.graalvm.compiler.nodes.spi.VirtualizerTool;
import org.graalvm.compiler.nodes.virtual.VirtualObjectNode;
-@NodeInfo(nameTemplate = "Proxy({i#value})")
+@NodeInfo(nameTemplate = "ValueProxy({i#value})")
public final class ValueProxyNode extends ProxyNode implements Canonicalizable, Virtualizable, ValueProxy {
public static final NodeClass<ValueProxyNode> TYPE = NodeClass.create(ValueProxyNode.class);
@@ -65,8 +65,13 @@
@Override
public Node canonical(CanonicalizerTool tool) {
+ Node result = super.canonical(tool);
+ if (result != this) {
+ return result;
+ }
+
ValueNode curValue = value;
- if (curValue.isConstant()) {
+ if (curValue.getNodeClass().isLeafNode()) {
return curValue;
}
if (loopPhiProxy && !loopExit.loopBegin().isPhiAtMerge(curValue)) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/AndNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,7 +28,6 @@
import org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp;
import org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp.And;
import org.graalvm.compiler.core.common.type.IntegerStamp;
-import org.graalvm.compiler.core.common.type.PrimitiveStamp;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.spi.Canonicalizable.BinaryCommutative;
@@ -41,7 +40,6 @@
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.util.GraphUtil;
-import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.PrimitiveConstant;
@@ -61,7 +59,7 @@
if (tryConstantFold != null) {
return tryConstantFold;
}
- return canonical(null, op, stamp, x, y, view);
+ return canonical(null, op, x, y, view);
}
@Override
@@ -77,16 +75,29 @@
}
NodeView view = NodeView.from(tool);
- return canonical(this, getOp(forX, forY), stamp(view), forX, forY, view);
+ return canonical(this, getOp(forX, forY), forX, forY, view);
}
- private static ValueNode canonical(AndNode self, BinaryOp<And> op, Stamp stamp, ValueNode forX, ValueNode forY, NodeView view) {
+ private static ValueNode canonical(AndNode self, BinaryOp<And> op, ValueNode forX, ValueNode forY, NodeView view) {
if (GraphUtil.unproxify(forX) == GraphUtil.unproxify(forY)) {
return forX;
}
if (forX.isConstant() && !forY.isConstant()) {
return new AndNode(forY, forX);
}
+
+ Stamp rawXStamp = forX.stamp(view);
+ Stamp rawYStamp = forY.stamp(view);
+ if (rawXStamp instanceof IntegerStamp && rawYStamp instanceof IntegerStamp) {
+ IntegerStamp xStamp = (IntegerStamp) rawXStamp;
+ IntegerStamp yStamp = (IntegerStamp) rawYStamp;
+ if (((~xStamp.downMask()) & yStamp.upMask()) == 0) {
+ return forY;
+ } else if (((~yStamp.downMask()) & xStamp.upMask()) == 0) {
+ return forX;
+ }
+ }
+
if (forY.isConstant()) {
Constant c = forY.asConstant();
if (op.isNeutral(c)) {
@@ -95,21 +106,12 @@
if (c instanceof PrimitiveConstant && ((PrimitiveConstant) c).getJavaKind().isNumericInteger()) {
long rawY = ((PrimitiveConstant) c).asLong();
- long mask = CodeUtil.mask(PrimitiveStamp.getBits(stamp));
- if ((rawY & mask) == 0) {
- return ConstantNode.forIntegerStamp(stamp, 0);
- }
if (forX instanceof SignExtendNode) {
SignExtendNode ext = (SignExtendNode) forX;
if (rawY == ((1L << ext.getInputBits()) - 1)) {
return new ZeroExtendNode(ext.getValue(), ext.getResultBits());
}
}
- IntegerStamp xStamp = (IntegerStamp) forX.stamp(view);
- if (((xStamp.upMask() | xStamp.downMask()) & ~rawY) == 0) {
- // No bits are set which are outside the mask, so the mask will have no effect.
- return forX;
- }
}
return reassociate(self != null ? self : (AndNode) new AndNode(forX, forY).maybeCommuteInputs(), ValueNode.isConstantPredicate(), forX, forY, view);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/BinaryArithmeticNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -59,6 +59,10 @@
super(c, opForStampComputation.foldStamp(x.stamp(NodeView.DEFAULT), y.stamp(NodeView.DEFAULT)), x, y);
}
+ protected BinaryArithmeticNode(NodeClass<? extends BinaryArithmeticNode<OP>> c, Stamp stamp, ValueNode x, ValueNode y) {
+ super(c, stamp, x, y);
+ }
+
public static ArithmeticOpTable getArithmeticOpTable(ValueNode forValue) {
return ArithmeticOpTable.forStamp(forValue.stamp(NodeView.DEFAULT));
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/CompareNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,8 +33,11 @@
import org.graalvm.compiler.core.common.type.AbstractObjectStamp;
import org.graalvm.compiler.core.common.type.AbstractPointerStamp;
import org.graalvm.compiler.core.common.type.IntegerStamp;
+import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
+import org.graalvm.compiler.graph.Position;
import org.graalvm.compiler.graph.spi.Canonicalizable;
+import org.graalvm.compiler.nodeinfo.InputType;
import org.graalvm.compiler.nodeinfo.NodeInfo;
import org.graalvm.compiler.nodes.BinaryOpLogicNode;
import org.graalvm.compiler.nodes.ConstantNode;
@@ -44,6 +47,7 @@
import org.graalvm.compiler.nodes.NodeView;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.ValueNode;
+import org.graalvm.compiler.nodes.memory.VolatileReadNode;
import org.graalvm.compiler.options.OptionValues;
import jdk.vm.ci.meta.Constant;
@@ -189,6 +193,19 @@
} else if (nonConstant instanceof ConvertNode) {
ConvertNode convert = (ConvertNode) nonConstant;
boolean multiUsage = (convert.asNode().hasMoreThanOneUsage() && convert.getValue().hasExactlyOneUsage());
+ if (!multiUsage && convert.asNode().hasMoreThanOneUsage() && convert.getValue() instanceof VolatileReadNode) {
+ // Only account for data usages
+ VolatileReadNode read = (VolatileReadNode) convert.getValue();
+ int nonMemoryEdges = 0;
+ for (Node u : read.usages()) {
+ for (Position pos : u.inputPositions()) {
+ if (pos.get(u) == read && pos.getInputType() != InputType.Memory) {
+ nonMemoryEdges++;
+ }
+ }
+ }
+ multiUsage = nonMemoryEdges == 1;
+ }
if (convert instanceof IntegerConvertNode && multiUsage) {
// Do not perform for integer convers if it could introduce
// new live values.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/OrNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
import org.graalvm.compiler.core.common.type.ArithmeticOpTable;
import org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp;
import org.graalvm.compiler.core.common.type.ArithmeticOpTable.BinaryOp.Or;
-import org.graalvm.compiler.core.common.type.PrimitiveStamp;
+import org.graalvm.compiler.core.common.type.IntegerStamp;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.graph.spi.Canonicalizable.BinaryCommutative;
@@ -40,9 +40,7 @@
import org.graalvm.compiler.nodes.spi.NodeLIRBuilderTool;
import org.graalvm.compiler.nodes.util.GraphUtil;
-import jdk.vm.ci.code.CodeUtil;
import jdk.vm.ci.meta.Constant;
-import jdk.vm.ci.meta.PrimitiveConstant;
@NodeInfo(shortName = "|")
public final class OrNode extends BinaryArithmeticNode<Or> implements BinaryCommutative<ValueNode>, NarrowableArithmeticNode {
@@ -53,6 +51,18 @@
super(TYPE, getArithmeticOpTable(x).getOr(), x, y);
}
+ private OrNode(ValueNode x, ValueNode y, Stamp forcedStamp) {
+ super(TYPE, forcedStamp, x, y);
+ }
+
+ /**
+ * Create a new XorNode with a forced stamp, without eager folding. This should only be used in
+ * snippet code, where native-image may assign wrong stamps during graph generation.
+ */
+ public static ValueNode createForSnippet(ValueNode x, ValueNode y, Stamp forcedStamp) {
+ return new OrNode(x, y, forcedStamp);
+ }
+
public static ValueNode create(ValueNode x, ValueNode y, NodeView view) {
BinaryOp<Or> op = ArithmeticOpTable.forStamp(x.stamp(view)).getOr();
Stamp stamp = op.foldStamp(x.stamp(view), y.stamp(view));
@@ -60,7 +70,7 @@
if (tryConstantFold != null) {
return tryConstantFold;
}
- return canonical(null, op, stamp, x, y, view);
+ return canonical(null, op, x, y, view);
}
@Override
@@ -76,34 +86,42 @@
return ret;
}
- return canonical(this, getOp(forX, forY), stamp(view), forX, forY, view);
+ return canonical(this, getOp(forX, forY), forX, forY, view);
}
- private static ValueNode canonical(OrNode self, BinaryOp<Or> op, Stamp stamp, ValueNode forX, ValueNode forY, NodeView view) {
+ private static ValueNode canonical(OrNode self, BinaryOp<Or> op, ValueNode forX, ValueNode forY, NodeView view) {
if (GraphUtil.unproxify(forX) == GraphUtil.unproxify(forY)) {
return forX;
}
if (forX.isConstant() && !forY.isConstant()) {
return new OrNode(forY, forX);
}
+
+ Stamp rawXStamp = forX.stamp(view);
+ Stamp rawYStamp = forY.stamp(view);
+ if (rawXStamp instanceof IntegerStamp && rawYStamp instanceof IntegerStamp) {
+ IntegerStamp xStamp = (IntegerStamp) rawXStamp;
+ IntegerStamp yStamp = (IntegerStamp) rawYStamp;
+ if (((~xStamp.downMask()) & yStamp.upMask()) == 0) {
+ return forX;
+ } else if (((~yStamp.downMask()) & xStamp.upMask()) == 0) {
+ return forY;
+ }
+ }
+
if (forY.isConstant()) {
Constant c = forY.asConstant();
if (op.isNeutral(c)) {
return forX;
}
- if (c instanceof PrimitiveConstant && ((PrimitiveConstant) c).getJavaKind().isNumericInteger()) {
- long rawY = ((PrimitiveConstant) c).asLong();
- long mask = CodeUtil.mask(PrimitiveStamp.getBits(stamp));
- if ((rawY & mask) == mask) {
- return ConstantNode.forIntegerStamp(stamp, mask);
- }
- }
return reassociate(self != null ? self : (OrNode) new OrNode(forX, forY).maybeCommuteInputs(), ValueNode.isConstantPredicate(), forX, forY, view);
}
+
if (forX instanceof NotNode && forY instanceof NotNode) {
return new NotNode(AndNode.create(((NotNode) forX).getValue(), ((NotNode) forY).getValue(), view));
}
+
return self != null ? self : new OrNode(forX, forY).maybeCommuteInputs();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/XorNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -54,6 +54,18 @@
assert x.stamp(NodeView.DEFAULT).isCompatible(y.stamp(NodeView.DEFAULT));
}
+ private XorNode(ValueNode x, ValueNode y, Stamp forcedStamp) {
+ super(TYPE, forcedStamp, x, y);
+ }
+
+ /**
+ * Create a new XorNode with a forced stamp, without eager folding. This should only be used in
+ * snippet code, where native-image may assign wrong stamps during graph generation.
+ */
+ public static ValueNode createForSnippet(ValueNode x, ValueNode y, Stamp forcedStamp) {
+ return new XorNode(x, y, forcedStamp);
+ }
+
public static ValueNode create(ValueNode x, ValueNode y, NodeView view) {
BinaryOp<Xor> op = ArithmeticOpTable.forStamp(x.stamp(view)).getXor();
Stamp stamp = op.foldStamp(x.stamp(view), y.stamp(view));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/Block.java Thu Nov 07 18:44:09 2019 +0000
@@ -260,10 +260,10 @@
LocationSet result = new LocationSet();
for (FixedNode node : this.getNodes()) {
if (node instanceof MemoryCheckpoint.Single) {
- LocationIdentity identity = ((MemoryCheckpoint.Single) node).getLocationIdentity();
+ LocationIdentity identity = ((MemoryCheckpoint.Single) node).getKilledLocationIdentity();
result.add(identity);
} else if (node instanceof MemoryCheckpoint.Multi) {
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getKilledLocationIdentities()) {
result.add(identity);
}
}
@@ -365,4 +365,26 @@
protected void setPostDominator(Block postdominator) {
this.postdominator = postdominator;
}
+
+ /**
+ * Checks whether {@code this} block is in the same loop or an outer loop of the block given as
+ * parameter.
+ */
+ public boolean isInSameOrOuterLoopOf(Block block) {
+
+ if (this.loop == null) {
+ // We are in no loop, so this holds true for every other block.
+ return true;
+ }
+
+ Loop<Block> l = block.loop;
+ while (l != null) {
+ if (l == this.loop) {
+ return true;
+ }
+ l = l.getParent();
+ }
+
+ return false;
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,6 +38,7 @@
import org.graalvm.compiler.debug.GraalError;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeMap;
+import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodes.AbstractBeginNode;
import org.graalvm.compiler.nodes.AbstractEndNode;
import org.graalvm.compiler.nodes.ControlSinkNode;
@@ -416,6 +417,15 @@
return nodeToBlock.get(node);
}
+ public Block commonDominatorFor(NodeIterable<? extends Node> nodes) {
+ Block commonDom = null;
+ for (Node n : nodes) {
+ Block b = blockFor(n);
+ commonDom = (Block) AbstractControlFlowGraph.commonDominator(commonDom, b);
+ }
+ return commonDom;
+ }
+
@Override
public List<Loop<Block>> getLoops() {
return loops;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/debug/StringToBytesNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return NamedLocationIdentity.getArrayLocation(JavaKind.Byte);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/BytecodeExceptionNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -100,7 +100,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/ForeignCallNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -159,7 +159,7 @@
}
@Override
- public LocationIdentity[] getLocationIdentities() {
+ public LocationIdentity[] getKilledLocationIdentities() {
return foreignCalls.getKilledLocations(descriptor);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/JavaWriteNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -79,4 +79,9 @@
public Stamp getAccessStamp() {
return StampFactory.forKind(writeKind);
}
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/MembarNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return location;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/RawLoadNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/RawLoadNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -161,7 +161,7 @@
@Override
protected ValueNode cloneAsFieldAccess(Assumptions assumptions, ResolvedJavaField field, boolean volatileAccess) {
- return LoadFieldNode.create(assumptions, object(), field, volatileAccess);
+ return LoadFieldNode.create(assumptions, field.isStatic() ? null : object(), field, volatileAccess);
}
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/RawStoreNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/RawStoreNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -134,7 +134,7 @@
@Override
protected ValueNode cloneAsFieldAccess(Assumptions assumptions, ResolvedJavaField field, boolean volatileAccess) {
- return new StoreFieldNode(object(), field, value(), stateAfter(), volatileAccess);
+ return new StoreFieldNode(field.isStatic() ? null : object(), field, value(), stateAfter(), volatileAccess);
}
@Override
@@ -145,4 +145,9 @@
public FrameState getState() {
return stateAfter;
}
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/SwitchNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -290,4 +290,7 @@
}
}
+ public int[] getKeySuccessors() {
+ return keySuccessors.clone();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeAccessNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
+import java.nio.ByteOrder;
+
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeClass;
@@ -40,6 +42,8 @@
import jdk.internal.vm.compiler.word.LocationIdentity;
import jdk.vm.ci.meta.Assumptions;
+import jdk.vm.ci.meta.ConstantReflectionProvider;
+import jdk.vm.ci.meta.JavaConstant;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaField;
import jdk.vm.ci.meta.ResolvedJavaType;
@@ -95,10 +99,14 @@
// Try to canonicalize to a field access.
ResolvedJavaType receiverType = StampTool.typeOrNull(object());
if (receiverType != null) {
- ResolvedJavaField field = receiverType.findInstanceFieldWithOffset(constantOffset, accessKind());
- // No need for checking that the receiver is non-null. The field access includes
- // the null check and if a field is found, the offset is so small that this is
- // never a valid access of an arbitrary address.
+ ResolvedJavaField field = getStaticFieldUnsafeAccess(tool.getConstantReflection());
+ if (field == null) {
+ field = receiverType.findInstanceFieldWithOffset(constantOffset, accessKind());
+ }
+
+ // No need for checking that the receiver is non-null. The field access
+ // includes the null check and if a field is found, the offset is so small that
+ // this is never a valid access of an arbitrary address.
if (field != null && field.getJavaKind() == this.accessKind()) {
assert !graph().isAfterFloatingReadPhase() : "cannot add more precise memory location after floating read phase";
// Unsafe accesses never have volatile semantics.
@@ -128,4 +136,58 @@
protected abstract ValueNode cloneAsFieldAccess(Assumptions assumptions, ResolvedJavaField field, boolean volatileAccess);
protected abstract ValueNode cloneAsArrayAccess(ValueNode location, LocationIdentity identity);
+
+ /**
+ * In this method we check if the unsafe access is to a static field. This is the case when
+ * {@code object} is a constant of type {@link Class} (static field's declaring class) and
+ * {@code offset} is a constant (HotSpot-specific field offset from the declaring class).
+ *
+ * @return the static field, if any, that this node is reading
+ */
+ private ResolvedJavaField getStaticFieldUnsafeAccess(ConstantReflectionProvider constantReflection) {
+ if (!object().isJavaConstant() || !offset().isJavaConstant() ||
+ object().isNullConstant() || offset().isNullConstant()) {
+ return null;
+ }
+ JavaConstant objectConstant = object().asJavaConstant();
+ JavaConstant offsetConstant = offset().asJavaConstant();
+ assert objectConstant != null && offsetConstant != null : "Verified by the check at the beginning.";
+ ResolvedJavaType staticReceiverType = constantReflection.asJavaType(objectConstant);
+ if (staticReceiverType == null) {
+ // object is not of type Class so it is not a static field
+ return null;
+ }
+ return findStaticFieldWithOffset(staticReceiverType, offsetConstant.asLong(), accessKind);
+ }
+
+ private static ResolvedJavaField findStaticFieldWithOffset(ResolvedJavaType type, long offset, JavaKind expectedEntryKind) {
+ try {
+ ResolvedJavaField[] declaredFields = type.getStaticFields();
+ return findFieldWithOffset(offset, expectedEntryKind, declaredFields);
+ } catch (UnsupportedOperationException e) {
+ return null;
+ }
+ }
+
+ /**
+ * NOTE GR-18873: this is a copy-paste implementation derived from
+ * {@code jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl#findStaticFieldWithOffset}.
+ */
+ private static ResolvedJavaField findFieldWithOffset(long offset, JavaKind expectedEntryKind, ResolvedJavaField[] declaredFields) {
+ for (ResolvedJavaField field : declaredFields) {
+ long resolvedFieldOffset = field.getOffset();
+ if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN &&
+ expectedEntryKind.isPrimitive() &&
+ !expectedEntryKind.equals(JavaKind.Void) &&
+ field.getJavaKind().isPrimitive()) {
+ resolvedFieldOffset += field.getJavaKind().getByteCount() -
+ Math.min(field.getJavaKind().getByteCount(), 4 + expectedEntryKind.getByteCount());
+ }
+ if (resolvedFieldOffset == offset) {
+ return field;
+ }
+ }
+ return null;
+ }
+
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/extended/UnsafeMemoryStoreNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -77,7 +77,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locationIdentity;
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/GraphBuilderConfiguration.java Thu Nov 07 18:44:09 2019 +0000
@@ -203,6 +203,7 @@
private final boolean trackNodeSourcePosition;
private final boolean retainLocalVariables;
private final Plugins plugins;
+ private final boolean replaceLocalsWithConstants;
public enum BytecodeExceptionMode {
/**
@@ -231,6 +232,7 @@
boolean insertFullInfopoints,
boolean trackNodeSourcePosition,
boolean retainLocalVariables,
+ boolean replaceLocalsWithConstants,
List<ResolvedJavaType> skippedExceptionTypes,
Plugins plugins) {
this.eagerResolving = eagerResolving;
@@ -240,6 +242,7 @@
this.insertFullInfopoints = insertFullInfopoints;
this.trackNodeSourcePosition = trackNodeSourcePosition;
this.retainLocalVariables = retainLocalVariables;
+ this.replaceLocalsWithConstants = replaceLocalsWithConstants;
this.skippedExceptionTypes = skippedExceptionTypes;
this.plugins = plugins;
}
@@ -259,6 +262,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
newPlugins);
return result;
@@ -279,6 +283,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -292,6 +297,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -305,6 +311,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
Collections.unmodifiableList(Arrays.asList(newSkippedExceptionTypes)),
plugins);
}
@@ -317,6 +324,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -330,6 +338,7 @@
insertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -343,6 +352,7 @@
newInsertFullInfopoints,
trackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -356,6 +366,7 @@
insertFullInfopoints,
newTrackNodeSourcePosition,
retainLocalVariables,
+ replaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -369,6 +380,21 @@
insertFullInfopoints,
trackNodeSourcePosition,
newRetainLocalVariables,
+ replaceLocalsWithConstants,
+ skippedExceptionTypes,
+ plugins);
+ }
+
+ public GraphBuilderConfiguration withReplaceLocalsWithConstants(boolean newReplaceLocalsWithConstants) {
+ return new GraphBuilderConfiguration(
+ eagerResolving,
+ unresolvedIsError,
+ bytecodeExceptionMode,
+ omitAssertions,
+ insertFullInfopoints,
+ trackNodeSourcePosition,
+ retainLocalVariables,
+ newReplaceLocalsWithConstants,
skippedExceptionTypes,
plugins);
}
@@ -401,6 +427,10 @@
return insertFullInfopoints;
}
+ public boolean replaceLocalsWithConstants() {
+ return this.replaceLocalsWithConstants;
+ }
+
public static GraphBuilderConfiguration getDefault(Plugins plugins) {
return new GraphBuilderConfiguration(
/* eagerResolving: */ false,
@@ -410,6 +440,7 @@
/* insertFullInfopoints: */ false,
/* trackNodeSourcePosition: */ false,
/* retainLocalVariables */ false,
+ /* replaceLocalsWithConstants */ false,
Collections.emptyList(),
plugins);
}
@@ -423,6 +454,7 @@
/* insertFullInfopoints: */ false,
/* trackNodeSourcePosition: */ false,
/* retainLocalVariables */ false,
+ /* replaceLocalsWithConstants */ false,
Collections.emptyList(),
plugins);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/InvocationPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -46,7 +46,6 @@
import jdk.internal.vm.compiler.collections.UnmodifiableEconomicMap;
import jdk.internal.vm.compiler.collections.UnmodifiableMapCursor;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
-import org.graalvm.compiler.api.replacements.MethodSubstitutionRegistry;
import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.core.common.SuppressFBWarnings;
import org.graalvm.compiler.debug.Assertions;
@@ -55,6 +54,7 @@
import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin.Receiver;
+import org.graalvm.compiler.nodes.spi.Replacements;
import jdk.vm.ci.meta.MetaUtil;
import jdk.vm.ci.meta.ResolvedJavaMethod;
@@ -175,21 +175,25 @@
}
/**
- * Utility for {@linkplain InvocationPlugins#register(InvocationPlugin, Class, String, Class...)
- * registration} of invocation plugins.
+ * Utility for {@linkplain InvocationPlugins#register registration} of invocation plugins.
*/
- public static class Registration implements MethodSubstitutionRegistry {
+ public static class Registration {
private final InvocationPlugins plugins;
+
private final Type declaringType;
- private final BytecodeProvider methodSubstitutionBytecodeProvider;
+ private final Replacements replacements;
+ private final BytecodeProvider bytecodeProvider;
private boolean allowOverwrite;
- @Override
public Class<?> getReceiverType() {
return Receiver.class;
}
+ public Type getDeclaringType() {
+ return declaringType;
+ }
+
/**
* Creates an object for registering {@link InvocationPlugin}s for methods declared by a
* given class.
@@ -201,7 +205,8 @@
public Registration(InvocationPlugins plugins, Type declaringType) {
this.plugins = plugins;
this.declaringType = declaringType;
- this.methodSubstitutionBytecodeProvider = null;
+ this.replacements = null;
+ this.bytecodeProvider = null;
}
/**
@@ -211,13 +216,29 @@
* @param plugins where to register the plugins
* @param declaringType the class declaring the methods for which plugins will be registered
* via this object
- * @param methodSubstitutionBytecodeProvider provider used to get the bytecodes to parse for
- * method substitutions
+ * @param replacements the current Replacements provider
*/
- public Registration(InvocationPlugins plugins, Type declaringType, BytecodeProvider methodSubstitutionBytecodeProvider) {
+ public Registration(InvocationPlugins plugins, Type declaringType, Replacements replacements) {
this.plugins = plugins;
this.declaringType = declaringType;
- this.methodSubstitutionBytecodeProvider = methodSubstitutionBytecodeProvider;
+ this.replacements = replacements;
+ this.bytecodeProvider = replacements != null ? replacements.getDefaultReplacementBytecodeProvider() : null;
+ }
+
+ /**
+ * Creates an object for registering {@link InvocationPlugin}s for methods declared by a
+ * given class.
+ *
+ * @param plugins where to register the plugins
+ * @param declaringType the class declaring the methods for which plugins will be registered
+ * via this object
+ * @param replacements the current Replacements provider
+ */
+ public Registration(InvocationPlugins plugins, Type declaringType, Replacements replacements, BytecodeProvider bytecodeProvider) {
+ this.plugins = plugins;
+ this.declaringType = declaringType;
+ this.replacements = replacements;
+ this.bytecodeProvider = bytecodeProvider;
}
/**
@@ -231,7 +252,8 @@
public Registration(InvocationPlugins plugins, String declaringClassName) {
this.plugins = plugins;
this.declaringType = new OptionalLazySymbol(declaringClassName);
- this.methodSubstitutionBytecodeProvider = null;
+ this.replacements = null;
+ this.bytecodeProvider = null;
}
/**
@@ -241,13 +263,13 @@
* @param plugins where to register the plugins
* @param declaringClassName the name of the class class declaring the methods for which
* plugins will be registered via this object
- * @param methodSubstitutionBytecodeProvider provider used to get the bytecodes to parse for
- * method substitutions
+ * @param replacements the current Replacements provider
*/
- public Registration(InvocationPlugins plugins, String declaringClassName, BytecodeProvider methodSubstitutionBytecodeProvider) {
+ public Registration(InvocationPlugins plugins, String declaringClassName, Replacements replacements) {
this.plugins = plugins;
this.declaringType = new OptionalLazySymbol(declaringClassName);
- this.methodSubstitutionBytecodeProvider = methodSubstitutionBytecodeProvider;
+ this.replacements = replacements;
+ this.bytecodeProvider = replacements != null ? replacements.getDefaultReplacementBytecodeProvider() : null;
}
/**
@@ -339,6 +361,118 @@
}
/**
+ * Registers a plugin for a method with no arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional0(boolean isEnabled, String name, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 1 argument that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional1(boolean isEnabled, String name, Type arg, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 2 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional2(boolean isEnabled, String name, Type arg1, Type arg2, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 3 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional3(boolean isEnabled, String name, Type arg1, Type arg2, Type arg3, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 4 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional4(boolean isEnabled, String name, Type arg1, Type arg2, Type arg3, Type arg4, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 5 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional5(boolean isEnabled, String name, Type arg1, Type arg2, Type arg3, Type arg4, Type arg5, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 6 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional6(boolean isEnabled, String name, Type arg1, Type arg2, Type arg3, Type arg4, Type arg5, Type arg6, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5, arg6);
+ }
+ }
+
+ /**
+ * Registers a plugin for a method with 7 arguments that is conditionally enabled. This
+ * ensures that {@code Replacements} is aware of this plugin.
+ *
+ * @param name the name of the method
+ * @param plugin the plugin to be registered
+ */
+ public void registerConditional7(boolean isEnabled, String name, Type arg1, Type arg2, Type arg3, Type arg4, Type arg5, Type arg6, Type arg7, InvocationPlugin plugin) {
+ replacements.registerConditionalPlugin(plugin);
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
+ }
+ }
+
+ /**
* Registers a plugin for an optional method with no arguments.
*
* @param name the name of the method
@@ -398,7 +532,6 @@
* is non-static. Upon returning, element 0 will have been rewritten to
* {@code declaringClass}
*/
- @Override
public void registerMethodSubstitution(Class<?> substituteDeclaringClass, String name, Type... argumentTypes) {
registerMethodSubstitution(substituteDeclaringClass, name, name, argumentTypes);
}
@@ -407,25 +540,63 @@
* Registers a plugin that implements a method based on the bytecode of a substitute method.
*
* @param substituteDeclaringClass the class declaring the substitute method
- * @param name the name of both the original method
+ * @param name the name of the original method
* @param substituteName the name of the substitute method
* @param argumentTypes the argument types of the method. Element 0 of this array must be
* the {@link Class} value for {@link InvocationPlugin.Receiver} iff the method
* is non-static. Upon returning, element 0 will have been rewritten to
* {@code declaringClass}
*/
- @Override
public void registerMethodSubstitution(Class<?> substituteDeclaringClass, String name, String substituteName, Type... argumentTypes) {
- MethodSubstitutionPlugin plugin = createMethodSubstitution(substituteDeclaringClass, substituteName, argumentTypes);
- plugins.register(plugin, false, allowOverwrite, declaringType, name, argumentTypes);
+ doMethodSubstitutionRegistration(false, true, substituteDeclaringClass, name, substituteName, argumentTypes);
+ }
+
+ /**
+ * Registers a plugin that implements a method based on the bytecode of a substitute method
+ * that is conditinally enabled. This ensures that {@code Replacements} is aware of this
+ * plugin.
+ *
+ * @param isEnabled whether the plugin is enabled in the current compiler
+ * @param substituteDeclaringClass the class declaring the substitute method
+ * @param name the name of both the original and substitute method
+ * @param argumentTypes the argument types of the method. Element 0 of this array must be
+ * the {@link Class} value for {@link InvocationPlugin.Receiver} iff the method
+ * is non-static. Upon returning, element 0 will have been rewritten to
+ * {@code declaringClass}
+ */
+ public void registerConditionalMethodSubstitution(boolean isEnabled, Class<?> substituteDeclaringClass, String name, Type... argumentTypes) {
+ registerConditionalMethodSubstitution(isEnabled, substituteDeclaringClass, name, name, argumentTypes);
}
- public MethodSubstitutionPlugin createMethodSubstitution(Class<?> substituteDeclaringClass, String substituteName, Type... argumentTypes) {
- assert methodSubstitutionBytecodeProvider != null : "Registration used for method substitutions requires a non-null methodSubstitutionBytecodeProvider";
- MethodSubstitutionPlugin plugin = new MethodSubstitutionPlugin(methodSubstitutionBytecodeProvider, substituteDeclaringClass, substituteName, argumentTypes);
- return plugin;
+ /**
+ * Registers a plugin that implements a method based on the bytecode of a substitute method
+ * that is conditinally enabled. This ensures that {@code Replacements} is aware of this
+ * plugin.
+ *
+ * @param isEnabled whether the plugin is enabled in the current compiler
+ * @param substituteDeclaringClass the class declaring the substitute method
+ * @param name the name of the original method
+ * @param substituteName the name of the substitute method
+ * @param argumentTypes the argument types of the method. Element 0 of this array must be
+ * the {@link Class} value for {@link InvocationPlugin.Receiver} iff the method
+ * is non-static. Upon returning, element 0 will have been rewritten to
+ * {@code declaringClass}
+ */
+ public void registerConditionalMethodSubstitution(boolean isEnabled, Class<?> substituteDeclaringClass, String name, String substituteName, Type... argumentTypes) {
+ doMethodSubstitutionRegistration(true, isEnabled, substituteDeclaringClass, name, substituteName, argumentTypes);
}
+ private void doMethodSubstitutionRegistration(boolean isConditional, boolean isEnabled, Class<?> substituteDeclaringClass, String name, String substituteName, Type[] argumentTypes) {
+ MethodSubstitutionPlugin plugin = new MethodSubstitutionPlugin(this, bytecodeProvider, name, substituteDeclaringClass, substituteName, argumentTypes);
+ replacements.registerMethodSubstitution(plugin);
+ if (isConditional) {
+ // Notify Replacements about the plugin even if it's not current enabled
+ replacements.registerConditionalPlugin(plugin);
+ }
+ if (isEnabled) {
+ plugins.register(plugin, false, allowOverwrite, declaringType, name, argumentTypes);
+ }
+ }
}
/**
@@ -519,13 +690,7 @@
this.plugin = data;
this.isStatic = isStatic;
this.name = name;
- StringBuilder buf = new StringBuilder();
- buf.append('(');
- for (int i = isStatic ? 0 : 1; i < argumentTypes.length; i++) {
- buf.append(MetaUtil.toInternalName(argumentTypes[i].getTypeName()));
- }
- buf.append(')');
- this.argumentsDescriptor = buf.toString();
+ this.argumentsDescriptor = toArgumentDescriptor(isStatic, argumentTypes);
assert !name.equals("<init>") || !isStatic : this;
}
@@ -546,6 +711,16 @@
}
}
+ static String toArgumentDescriptor(boolean isStatic, Type[] argumentTypes) {
+ StringBuilder buf = new StringBuilder();
+ buf.append('(');
+ for (int i = isStatic ? 0 : 1; i < argumentTypes.length; i++) {
+ buf.append(MetaUtil.toInternalName(argumentTypes[i].getTypeName()));
+ }
+ buf.append(')');
+ return buf.toString();
+ }
+
/**
* Plugin registrations for already resolved methods. If non-null, then {@link #registrations}
* is null and no further registrations can be made.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/graphbuilderconf/MethodSubstitutionPlugin.java Thu Nov 07 18:44:09 2019 +0000
@@ -42,6 +42,7 @@
import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaMethod;
+import jdk.vm.ci.meta.ResolvedJavaType;
/**
* An {@link InvocationPlugin} for a method where the implementation of the method is provided by a
@@ -56,6 +57,8 @@
*/
public final class MethodSubstitutionPlugin implements InvocationPlugin {
+ private InvocationPlugins.Registration registration;
+
private ResolvedJavaMethod cachedSubstitute;
/**
@@ -64,9 +67,14 @@
private final Class<?> declaringClass;
/**
- * The name of the original and substitute method.
+ * The name of the substitute method.
*/
- private final String name;
+ private final String substituteName;
+
+ /**
+ * The name of the original method.
+ */
+ private final String originalName;
/**
* The parameter types of the substitute method.
@@ -81,16 +89,21 @@
* Creates a method substitution plugin.
*
* @param bytecodeProvider used to get the bytecodes to parse for the substitute method
+ * @param originalName the name of the original method
* @param declaringClass the class in which the substitute method is declared
- * @param name the name of the substitute method
+ * @param substituteName the name of the substitute method
* @param parameters the parameter types of the substitute method. If the original method is not
* static, then {@code parameters[0]} must be the {@link Class} value denoting
* {@link InvocationPlugin.Receiver}
*/
- public MethodSubstitutionPlugin(BytecodeProvider bytecodeProvider, Class<?> declaringClass, String name, Type... parameters) {
+ public MethodSubstitutionPlugin(InvocationPlugins.Registration registration, BytecodeProvider bytecodeProvider, String originalName, Class<?> declaringClass, String substituteName,
+ Type... parameters) {
+ assert bytecodeProvider != null : "Requires a non-null methodSubstitutionBytecodeProvider";
+ this.registration = registration;
this.bytecodeProvider = bytecodeProvider;
+ this.originalName = originalName;
this.declaringClass = declaringClass;
- this.name = name;
+ this.substituteName = substituteName;
this.parameters = parameters;
this.originalIsStatic = parameters.length == 0 || parameters[0] != InvocationPlugin.Receiver.class;
}
@@ -144,7 +157,7 @@
* Determines if a given method is the substitute method of this plugin.
*/
private boolean isSubstitute(Method m) {
- if (Modifier.isStatic(m.getModifiers()) && m.getName().equals(name)) {
+ if (Modifier.isStatic(m.getModifiers()) && m.getName().equals(substituteName)) {
if (parameters.length == m.getParameterCount()) {
Class<?>[] mparams = m.getParameterTypes();
int start = 0;
@@ -189,9 +202,6 @@
@Override
public boolean execute(GraphBuilderContext b, ResolvedJavaMethod targetMethod, InvocationPlugin.Receiver receiver, ValueNode[] argsIncludingReceiver) {
if (IS_IN_NATIVE_IMAGE || (UseEncodedGraphs.getValue(b.getOptions()) && !b.parsingIntrinsic())) {
- if (!IS_IN_NATIVE_IMAGE && UseEncodedGraphs.getValue(b.getOptions())) {
- b.getReplacements().registerMethodSubstitution(this, targetMethod, INLINE_AFTER_PARSING, b.getOptions());
- }
StructuredGraph subst = b.getReplacements().getMethodSubstitution(this,
targetMethod,
INLINE_AFTER_PARSING,
@@ -220,7 +230,27 @@
@Override
public String toString() {
- return String.format("%s[%s.%s(%s)]", getClass().getSimpleName(), declaringClass.getName(), name,
+ return String.format("%s[%s.%s(%s)]", getClass().getSimpleName(), declaringClass.getName(), substituteName,
Arrays.asList(parameters).stream().map(c -> c.getTypeName()).collect(Collectors.joining(", ")));
}
+
+ public String originalMethodAsString() {
+ return String.format("%s.%s(%s)", declaringClass.getName(), substituteName, Arrays.asList(parameters).stream().map(c -> c.getTypeName()).collect(Collectors.joining(", ")));
+ }
+
+ public ResolvedJavaMethod getOriginalMethod(MetaAccessProvider metaAccess) {
+ Class<?> clazz = resolveType(registration.getDeclaringType(), false);
+ if (clazz == null) {
+ throw new GraalError("Can't find original class for " + this + " with class " + registration.getDeclaringType());
+ }
+ ResolvedJavaType type = metaAccess.lookupJavaType(clazz);
+ String argumentsDescriptor = InvocationPlugins.toArgumentDescriptor(originalIsStatic, this.parameters);
+ for (ResolvedJavaMethod declared : type.getDeclaredMethods()) {
+ if (declared.getName().equals(originalName) && declared.isStatic() == originalIsStatic &&
+ declared.getSignature().toMethodDescriptor().startsWith(argumentsDescriptor)) {
+ return declared;
+ }
+ }
+ throw new GraalError("Can't find original method for " + this + " with class " + registration.getDeclaringType());
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractCompareAndSwapNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractCompareAndSwapNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,4 +93,9 @@
public Stamp getAccessStamp() {
return expectedValue.stamp(NodeView.DEFAULT).meet(newValue.stamp(NodeView.DEFAULT)).unrestricted();
}
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractUnsafeCompareAndSwapNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AbstractUnsafeCompareAndSwapNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -97,7 +97,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locationIdentity;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndAddNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -74,7 +74,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locationIdentity;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/AtomicReadAndWriteNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -80,7 +80,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locationIdentity;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/ExceptionObjectNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -60,7 +60,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
@@ -80,7 +80,7 @@
* Now the lowering to BeginNode+LoadExceptionNode can be performed, since no more
* deopts can float in between the begin node and the load exception node.
*/
- LocationIdentity locationsKilledByInvoke = ((InvokeWithExceptionNode) predecessor()).getLocationIdentity();
+ LocationIdentity locationsKilledByInvoke = ((InvokeWithExceptionNode) predecessor()).getKilledLocationIdentity();
AbstractBeginNode entry = graph().add(KillingBeginNode.create(locationsKilledByInvoke));
LoadExceptionObjectNode loadException = graph().add(new LoadExceptionObjectNode(stamp(NodeView.DEFAULT)));
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/LoweredAtomicReadAndWriteNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -103,4 +103,9 @@
public Stamp getAccessStamp() {
return stamp(NodeView.DEFAULT);
}
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorEnterNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/MonitorExitNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -70,7 +70,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/java/RawMonitorEnterNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/FixedAccessNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -25,6 +25,7 @@
package org.graalvm.compiler.nodes.memory;
import org.graalvm.compiler.core.common.type.Stamp;
+import org.graalvm.compiler.graph.IterableNodeType;
import org.graalvm.compiler.graph.NodeClass;
import org.graalvm.compiler.nodeinfo.InputType;
import org.graalvm.compiler.nodeinfo.NodeInfo;
@@ -39,7 +40,7 @@
* does not include a null check on the object.
*/
@NodeInfo
-public abstract class FixedAccessNode extends DeoptimizingFixedWithNextNode implements Access {
+public abstract class FixedAccessNode extends DeoptimizingFixedWithNextNode implements Access, IterableNodeType {
public static final NodeClass<FixedAccessNode> TYPE = NodeClass.create(FixedAccessNode.class);
@OptionalInput(InputType.Guard) protected GuardingNode guard;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/MemoryCheckpoint.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,8 +44,7 @@
*
* @return the identity of the location killed by this node.
*/
- LocationIdentity getLocationIdentity();
-
+ LocationIdentity getKilledLocationIdentity();
}
interface Multi extends MemoryCheckpoint {
@@ -57,7 +56,7 @@
*
* @return the identities of all locations killed by this node.
*/
- LocationIdentity[] getLocationIdentities();
+ LocationIdentity[] getKilledLocationIdentities();
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/VolatileReadNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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 org.graalvm.compiler.nodes.memory;
+
+import org.graalvm.compiler.core.common.GraalOptions;
+import org.graalvm.compiler.core.common.type.Stamp;
+import org.graalvm.compiler.graph.NodeClass;
+import org.graalvm.compiler.nodeinfo.NodeInfo;
+import org.graalvm.compiler.nodes.memory.address.AddressNode;
+import jdk.internal.vm.compiler.word.LocationIdentity;
+
+import static org.graalvm.compiler.nodeinfo.InputType.Memory;
+import static org.graalvm.compiler.nodeinfo.NodeCycles.CYCLES_2;
+import static org.graalvm.compiler.nodeinfo.NodeSize.SIZE_1;
+
+@NodeInfo(nameTemplate = "Read#{p#location/s}", allowedUsageTypes = Memory, cycles = CYCLES_2, size = SIZE_1)
+public class VolatileReadNode extends ReadNode implements MemoryCheckpoint.Single {
+ public static final NodeClass<VolatileReadNode> TYPE = NodeClass.create(VolatileReadNode.class);
+
+ public VolatileReadNode(AddressNode address, LocationIdentity location, Stamp stamp, BarrierType barrierType) {
+ super(TYPE, address, location, stamp, null, barrierType, false, null);
+ assert GraalOptions.LateMembars.getValue(address.getOptions());
+ }
+
+ @SuppressWarnings("try")
+ @Override
+ public FloatingAccessNode asFloatingNode() {
+ throw new RuntimeException();
+ }
+
+ @Override
+ public boolean canFloat() {
+ return false;
+ }
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return LocationIdentity.any();
+ }
+
+ @Override
+ public boolean canNullCheck() {
+ return false;
+ }
+
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/WriteNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -44,13 +44,16 @@
public class WriteNode extends AbstractWriteNode implements LIRLowerableAccess, Canonicalizable {
public static final NodeClass<WriteNode> TYPE = NodeClass.create(WriteNode.class);
+ private final boolean volatileAccess;
- public WriteNode(AddressNode address, LocationIdentity location, ValueNode value, BarrierType barrierType) {
+ public WriteNode(AddressNode address, LocationIdentity location, ValueNode value, BarrierType barrierType, boolean volatileAccess) {
super(TYPE, address, location, value, barrierType);
+ this.volatileAccess = volatileAccess;
}
protected WriteNode(NodeClass<? extends WriteNode> c, AddressNode address, LocationIdentity location, ValueNode value, BarrierType barrierType) {
super(c, address, location, value, barrierType);
+ this.volatileAccess = false;
}
@Override
@@ -61,7 +64,7 @@
@Override
public boolean canNullCheck() {
- return true;
+ return !isVolatile();
}
@Override
@@ -73,11 +76,23 @@
public Node canonical(CanonicalizerTool tool) {
if (tool.canonicalizeReads() && hasExactlyOneUsage() && next() instanceof WriteNode) {
WriteNode write = (WriteNode) next();
- if (write.lastLocationAccess == this && write.getAddress() == getAddress() && getAccessStamp().isCompatible(write.getAccessStamp())) {
+ if (write.lastLocationAccess == this && write.getAddress() == getAddress() && getAccessStamp().isCompatible(write.getAccessStamp()) && !isVolatile()) {
write.setLastLocationAccess(getLastLocationAccess());
return write;
}
}
return this;
}
+
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ if (isVolatile()) {
+ return LocationIdentity.any();
+ }
+ return getLocationIdentity();
+ }
+
+ public boolean isVolatile() {
+ return volatileAccess;
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DelegatingReplacements.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/DelegatingReplacements.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,6 +34,7 @@
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.IntrinsicContext;
+import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.MethodSubstitutionPlugin;
import org.graalvm.compiler.options.OptionValues;
@@ -82,8 +83,13 @@
}
@Override
- public void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options) {
- delegate.registerMethodSubstitution(plugin, original, context, options);
+ public void registerMethodSubstitution(MethodSubstitutionPlugin plugin) {
+ delegate.registerMethodSubstitution(plugin);
+ }
+
+ @Override
+ public void registerConditionalPlugin(InvocationPlugin plugin) {
+ delegate.registerConditionalPlugin(plugin);
}
@Override
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/spi/Replacements.java Thu Nov 07 18:44:09 2019 +0000
@@ -97,7 +97,14 @@
/**
* Registers a plugin as a substitution.
*/
- void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options);
+ void registerMethodSubstitution(MethodSubstitutionPlugin plugin);
+
+ /**
+ * Marks a plugin as conditionally applied. In the contenxt of libgraal conditional plugins
+ * can't be used in during graph encoding for snippets and method substitutions and this is used
+ * to detect violations of this restriction.
+ */
+ void registerConditionalPlugin(InvocationPlugin plugin);
/**
* Gets a graph that is a substitution for a given method.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/util/GraphUtil.java Thu Nov 07 18:44:09 2019 +0000
@@ -54,11 +54,13 @@
import org.graalvm.compiler.nodes.AbstractEndNode;
import org.graalvm.compiler.nodes.AbstractMergeNode;
import org.graalvm.compiler.nodes.ConstantNode;
+import org.graalvm.compiler.nodes.ControlSinkNode;
import org.graalvm.compiler.nodes.ControlSplitNode;
import org.graalvm.compiler.nodes.FixedNode;
import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.FrameState;
import org.graalvm.compiler.nodes.GuardNode;
+import org.graalvm.compiler.nodes.IfNode;
import org.graalvm.compiler.nodes.LoopBeginNode;
import org.graalvm.compiler.nodes.LoopEndNode;
import org.graalvm.compiler.nodes.LoopExitNode;
@@ -105,6 +107,8 @@
public static final OptionKey<Boolean> VerifyKillCFGUnusedNodes = new OptionKey<>(false);
}
+ public static final int MAX_FRAMESTATE_SEARCH_DEPTH = 4;
+
private static void killCFGInner(FixedNode node) {
EconomicSet<Node> markedNodes = EconomicSet.create();
EconomicMap<AbstractMergeNode, List<AbstractEndNode>> unmarkedMerges = EconomicMap.create();
@@ -1110,4 +1114,55 @@
tool.createVirtualObject(newVirtualArray, newEntryState, Collections.<MonitorIdNode> emptyList(), false);
tool.replaceWithVirtual(newVirtualArray);
}
+
+ /**
+ * Snippet lowerings may produce patterns without a frame state on the merge. We need to take
+ * extra care when optimizing these patterns.
+ */
+ public static boolean checkFrameState(FixedNode start, int maxDepth) {
+ if (maxDepth == 0) {
+ return false;
+ }
+ FixedNode node = start;
+ while (true) {
+ if (node instanceof AbstractMergeNode) {
+ AbstractMergeNode mergeNode = (AbstractMergeNode) node;
+ if (mergeNode.stateAfter() == null) {
+ return false;
+ } else {
+ return true;
+ }
+ } else if (node instanceof StateSplit) {
+ StateSplit stateSplitNode = (StateSplit) node;
+ if (stateSplitNode.stateAfter() != null) {
+ return true;
+ }
+ }
+
+ if (node instanceof ControlSplitNode) {
+ ControlSplitNode controlSplitNode = (ControlSplitNode) node;
+ for (Node succ : controlSplitNode.cfgSuccessors()) {
+ if (checkFrameState((FixedNode) succ, maxDepth - 1)) {
+ return true;
+ }
+ }
+ return false;
+ } else if (node instanceof FixedWithNextNode) {
+ FixedWithNextNode fixedWithNextNode = (FixedWithNextNode) node;
+ node = fixedWithNextNode.next();
+ } else if (node instanceof AbstractEndNode) {
+ AbstractEndNode endNode = (AbstractEndNode) node;
+ node = endNode.merge();
+ } else if (node instanceof ControlSinkNode) {
+ return true;
+ } else {
+ assert false : "unexpected node";
+ return false;
+ }
+ }
+ }
+
+ public static boolean mayRemoveSplit(IfNode ifNode) {
+ return GraphUtil.checkFrameState(ifNode.trueSuccessor(), MAX_FRAMESTATE_SEARCH_DEPTH) && GraphUtil.checkFrameState(ifNode.falseSuccessor(), MAX_FRAMESTATE_SEARCH_DEPTH);
+ }
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/AllocatedObjectNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.calc.FloatingNode;
import org.graalvm.compiler.nodes.spi.ArrayLengthProvider;
-import org.graalvm.compiler.nodes.spi.Virtualizable;
+import org.graalvm.compiler.nodes.spi.VirtualizableAllocation;
import org.graalvm.compiler.nodes.spi.VirtualizerTool;
import org.graalvm.compiler.nodes.util.GraphUtil;
@@ -45,7 +45,7 @@
* {@link VirtualObjectNode}.
*/
@NodeInfo(cycles = CYCLES_0, size = SIZE_0)
-public final class AllocatedObjectNode extends FloatingNode implements Virtualizable, ArrayLengthProvider {
+public final class AllocatedObjectNode extends FloatingNode implements VirtualizableAllocation, ArrayLengthProvider {
public static final NodeClass<AllocatedObjectNode> TYPE = NodeClass.create(AllocatedObjectNode.class);
@Input VirtualObjectNode virtualObject;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/virtual/CommitAllocationNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -121,7 +121,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return locks.isEmpty() ? LocationIdentity.init() : LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/CanonicalizerPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,6 +24,12 @@
package org.graalvm.compiler.phases.common;
+import static org.graalvm.compiler.phases.common.CanonicalizerPhase.CanonicalizerFeature.CFG_SIMPLIFICATION;
+import static org.graalvm.compiler.phases.common.CanonicalizerPhase.CanonicalizerFeature.GVN;
+import static org.graalvm.compiler.phases.common.CanonicalizerPhase.CanonicalizerFeature.READ_CANONICALIZATION;
+
+import java.util.EnumSet;
+
import org.graalvm.compiler.core.common.spi.ConstantFieldProvider;
import org.graalvm.compiler.core.common.type.Stamp;
import org.graalvm.compiler.debug.CounterKey;
@@ -66,6 +72,12 @@
public class CanonicalizerPhase extends BasePhase<CoreProviders> {
+ public enum CanonicalizerFeature {
+ READ_CANONICALIZATION,
+ CFG_SIMPLIFICATION,
+ GVN
+ }
+
private static final int MAX_ITERATION_PER_NODE = 10;
private static final CounterKey COUNTER_CANONICALIZED_NODES = DebugContext.counter("CanonicalizedNodes");
private static final CounterKey COUNTER_PROCESSED_NODES = DebugContext.counter("ProcessedNodes");
@@ -75,40 +87,79 @@
private static final CounterKey COUNTER_SIMPLIFICATION_CONSIDERED_NODES = DebugContext.counter("SimplificationConsideredNodes");
private static final CounterKey COUNTER_GLOBAL_VALUE_NUMBERING_HITS = DebugContext.counter("GlobalValueNumberingHits");
- private boolean globalValueNumber = true;
- private boolean canonicalizeReads = true;
- private boolean simplify = true;
- private final CustomCanonicalizer customCanonicalizer;
+ private final EnumSet<CanonicalizerFeature> features;
+ private final CustomCanonicalization customCanonicalization;
+ private final CustomSimplification customSimplification;
- public abstract static class CustomCanonicalizer {
+ public interface CustomCanonicalization {
+ /**
+ * @param node the node to be canonicalized
+ * @return the same node if no action should be taken, {@code null} if the node should be
+ * deleted, or a new node that should replace the given node
+ */
+ Node canonicalize(Node node);
+ }
- public Node canonicalize(Node node) {
- return node;
- }
+ public interface CustomSimplification {
+ /**
+ * @param node the node to be simplified
+ * @param tool utility available during the simplification process
+ */
+ void simplify(Node node, SimplifierTool tool);
+ }
- @SuppressWarnings("unused")
- public void simplify(Node node, SimplifierTool tool) {
- }
+ protected CanonicalizerPhase(EnumSet<CanonicalizerFeature> features) {
+ this(null, null, features);
+ }
+
+ protected CanonicalizerPhase() {
+ this(null, null, EnumSet.allOf(CanonicalizerFeature.class));
+ }
+
+ protected CanonicalizerPhase(CustomCanonicalization customCanonicalization, CustomSimplification customSimplification) {
+ this(customCanonicalization, customSimplification, EnumSet.allOf(CanonicalizerFeature.class));
}
- public CanonicalizerPhase() {
- this(null);
+ protected CanonicalizerPhase(CustomCanonicalization customCanonicalization, CustomSimplification customSimplification, EnumSet<CanonicalizerFeature> features) {
+ this.customCanonicalization = customCanonicalization;
+ this.customSimplification = customSimplification;
+ this.features = features;
}
- public CanonicalizerPhase(CustomCanonicalizer customCanonicalizer) {
- this.customCanonicalizer = customCanonicalizer;
+ public CanonicalizerPhase copyWithCustomCanonicalization(CustomCanonicalization newCanonicalization) {
+ return new CanonicalizerPhase(newCanonicalization, customSimplification, features);
+ }
+
+ public CanonicalizerPhase copyWithCustomSimplification(CustomSimplification newSimplification) {
+ return new CanonicalizerPhase(customCanonicalization, newSimplification, features);
+ }
+
+ public CanonicalizerPhase copyWithoutGVN() {
+ EnumSet<CanonicalizerFeature> newFeatures = EnumSet.copyOf(features);
+ newFeatures.remove(GVN);
+ return new CanonicalizerPhase(customCanonicalization, customSimplification, newFeatures);
}
- public void disableGVN() {
- globalValueNumber = false;
+ public CanonicalizerPhase copyWithoutSimplification() {
+ EnumSet<CanonicalizerFeature> newFeatures = EnumSet.copyOf(features);
+ newFeatures.remove(CFG_SIMPLIFICATION);
+ return new CanonicalizerPhase(customCanonicalization, customSimplification, newFeatures);
+ }
+
+ public static CanonicalizerPhase create() {
+ return new CanonicalizerPhase(null, null, EnumSet.allOf(CanonicalizerFeature.class));
}
- public void disableReadCanonicalization() {
- canonicalizeReads = false;
+ public static CanonicalizerPhase createWithoutReadCanonicalization() {
+ return new CanonicalizerPhase(EnumSet.complementOf(EnumSet.of(READ_CANONICALIZATION)));
}
- public void disableSimplification() {
- simplify = false;
+ public static CanonicalizerPhase createWithoutGVN() {
+ return new CanonicalizerPhase(EnumSet.complementOf(EnumSet.of(GVN)));
+ }
+
+ public static CanonicalizerPhase createWithoutCFGSimplification() {
+ return new CanonicalizerPhase(EnumSet.complementOf(EnumSet.of(CFG_SIMPLIFICATION)));
}
@Override
@@ -274,7 +325,7 @@
if (tryCanonicalize(node, nodeClass)) {
return true;
}
- if (globalValueNumber && tryGlobalValueNumbering(node, nodeClass)) {
+ if (features.contains(GVN) && tryGlobalValueNumbering(node, nodeClass)) {
return true;
}
if (node instanceof ValueNode) {
@@ -329,24 +380,18 @@
@SuppressWarnings("try")
public boolean tryCanonicalize(final Node node, NodeClass<?> nodeClass) {
try (DebugCloseable position = node.withNodeSourcePosition(); DebugContext.Scope scope = debug.withContext(node)) {
- if (customCanonicalizer != null) {
- Node canonical = customCanonicalizer.canonicalize(node);
- if (performReplacement(node, canonical)) {
- return true;
- } else {
- customCanonicalizer.simplify(node, tool);
- if (node.isDeleted()) {
- return true;
- }
- }
- }
if (nodeClass.isCanonicalizable()) {
COUNTER_CANONICALIZATION_CONSIDERED_NODES.increment(debug);
- Node canonical;
+ Node canonical = node;
try (AutoCloseable verify = getCanonicalizeableContractAssertion(node)) {
- canonical = ((Canonicalizable) node).canonical(tool);
- if (canonical == node && nodeClass.isCommutative()) {
- canonical = ((BinaryCommutative<?>) node).maybeCommuteInputs();
+ if (customCanonicalization != null) {
+ canonical = customCanonicalization.canonicalize(node);
+ }
+ if (canonical == node) {
+ canonical = ((Canonicalizable) node).canonical(tool);
+ if (canonical == node && nodeClass.isCommutative()) {
+ canonical = ((BinaryCommutative<?>) node).maybeCommuteInputs();
+ }
}
} catch (Throwable e) {
throw new GraalGraphError(e).addContext(node);
@@ -356,12 +401,17 @@
}
}
- if (nodeClass.isSimplifiable() && simplify) {
+ if (features.contains(CFG_SIMPLIFICATION) && nodeClass.isSimplifiable()) {
debug.log(DebugContext.VERBOSE_LEVEL, "Canonicalizer: simplifying %s", node);
COUNTER_SIMPLIFICATION_CONSIDERED_NODES.increment(debug);
- node.simplify(tool);
- if (node.isDeleted()) {
- debug.log("Canonicalizer: simplified %s", node);
+ if (customSimplification != null) {
+ customSimplification.simplify(node, tool);
+ }
+ if (node.isAlive()) {
+ node.simplify(tool);
+ if (node.isDeleted()) {
+ debug.log("Canonicalizer: simplified %s", node);
+ }
}
return node.isDeleted();
}
@@ -518,7 +568,7 @@
@Override
public boolean canonicalizeReads() {
- return canonicalizeReads;
+ return features.contains(READ_CANONICALIZATION);
}
@Override
@@ -549,7 +599,7 @@
}
public boolean getCanonicalizeReads() {
- return canonicalizeReads;
+ return features.contains(READ_CANONICALIZATION);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConditionalEliminationPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConditionalEliminationPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -186,6 +186,8 @@
// Check if we can move guards upwards.
AbstractBeginNode trueSuccessor = node.trueSuccessor();
+ AbstractBeginNode falseSuccessor = node.falseSuccessor();
+
EconomicMap<LogicNode, GuardNode> trueGuards = EconomicMap.create(Equivalence.IDENTITY);
for (GuardNode guard : trueSuccessor.guards()) {
LogicNode condition = guard.getCondition();
@@ -195,7 +197,7 @@
}
if (!trueGuards.isEmpty()) {
- for (GuardNode guard : node.falseSuccessor().guards().snapshot()) {
+ for (GuardNode guard : falseSuccessor.guards().snapshot()) {
GuardNode otherGuard = trueGuards.get(guard.getCondition());
if (otherGuard != null && guard.isNegated() == otherGuard.isNegated()) {
Speculation speculation = otherGuard.getSpeculation();
@@ -210,9 +212,17 @@
guard.getNoDeoptSuccessorPosition());
GuardNode newGuard = node.graph().unique(newlyCreatedGuard);
if (otherGuard.isAlive()) {
- otherGuard.replaceAndDelete(newGuard);
+ if (trueSuccessor instanceof LoopExitNode && beginNode.graph().hasValueProxies()) {
+ otherGuard.replaceAndDelete(ProxyNode.forGuard(newGuard, (LoopExitNode) trueSuccessor));
+ } else {
+ otherGuard.replaceAndDelete(newGuard);
+ }
}
- guard.replaceAndDelete(newGuard);
+ if (falseSuccessor instanceof LoopExitNode && beginNode.graph().hasValueProxies()) {
+ guard.replaceAndDelete(ProxyNode.forGuard(newGuard, (LoopExitNode) falseSuccessor));
+ } else {
+ guard.replaceAndDelete(newGuard);
+ }
}
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/FloatingReadPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -48,6 +48,7 @@
import org.graalvm.compiler.nodes.LoopEndNode;
import org.graalvm.compiler.nodes.LoopExitNode;
import org.graalvm.compiler.nodes.PhiNode;
+import org.graalvm.compiler.nodes.ProxyNode;
import org.graalvm.compiler.nodes.ReturnNode;
import org.graalvm.compiler.nodes.StartNode;
import org.graalvm.compiler.nodes.StructuredGraph;
@@ -166,9 +167,9 @@
protected void processNode(FixedNode node, EconomicSet<LocationIdentity> currentState) {
if (node instanceof MemoryCheckpoint.Single) {
- processIdentity(currentState, ((MemoryCheckpoint.Single) node).getLocationIdentity());
+ processIdentity(currentState, ((MemoryCheckpoint.Single) node).getKilledLocationIdentity());
} else if (node instanceof MemoryCheckpoint.Multi) {
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getKilledLocationIdentities()) {
processIdentity(currentState, identity);
}
}
@@ -274,7 +275,7 @@
}
mergedStatesCount++;
}
- newState.lastMemorySnapshot.put(key, merged);
+ newState.getMap().put(key, merged);
}
return newState;
@@ -301,6 +302,16 @@
@Override
protected MemoryMapImpl processNode(FixedNode node, MemoryMapImpl state) {
+
+ if (node instanceof LoopExitNode) {
+ final LoopExitNode loopExitNode = (LoopExitNode) node;
+ final EconomicSet<LocationIdentity> modifiedInLoop = modifiedInLoops.get(loopExitNode.loopBegin());
+ final boolean anyModified = modifiedInLoop.contains(LocationIdentity.any());
+ state.getMap().replaceAll((locationIdentity, memoryNode) -> (anyModified || modifiedInLoop.contains(locationIdentity))
+ ? ProxyNode.forMemory(memoryNode, loopExitNode, locationIdentity)
+ : memoryNode);
+ }
+
if (node instanceof MemoryAnchorNode) {
processAnchor((MemoryAnchorNode) node, state);
return state;
@@ -312,7 +323,8 @@
if (createFloatingReads && node instanceof FloatableAccessNode) {
processFloatable((FloatableAccessNode) node, state);
- } else if (node instanceof MemoryCheckpoint.Single) {
+ }
+ if (node instanceof MemoryCheckpoint.Single) {
processCheckpoint((MemoryCheckpoint.Single) node, state);
} else if (node instanceof MemoryCheckpoint.Multi) {
processCheckpoint((MemoryCheckpoint.Multi) node, state);
@@ -320,7 +332,7 @@
assert MemoryCheckpoint.TypeAssertion.correctType(node) : node;
if (createMemoryMapNodes && node instanceof ReturnNode) {
- ((ReturnNode) node).setMemoryMap(node.graph().unique(new MemoryMapNode(state.lastMemorySnapshot)));
+ ((ReturnNode) node).setMemoryMap(node.graph().unique(new MemoryMapNode(state.getMap())));
}
return state;
}
@@ -355,21 +367,21 @@
}
private static void processCheckpoint(MemoryCheckpoint.Single checkpoint, MemoryMapImpl state) {
- processIdentity(checkpoint.getLocationIdentity(), checkpoint, state);
+ processIdentity(checkpoint.getKilledLocationIdentity(), checkpoint, state);
}
private static void processCheckpoint(MemoryCheckpoint.Multi checkpoint, MemoryMapImpl state) {
- for (LocationIdentity identity : checkpoint.getLocationIdentities()) {
+ for (LocationIdentity identity : checkpoint.getKilledLocationIdentities()) {
processIdentity(identity, checkpoint, state);
}
}
private static void processIdentity(LocationIdentity identity, MemoryCheckpoint checkpoint, MemoryMapImpl state) {
if (identity.isAny()) {
- state.lastMemorySnapshot.clear();
+ state.getMap().clear();
}
if (identity.isMutable()) {
- state.lastMemorySnapshot.put(identity, checkpoint);
+ state.getMap().put(identity, checkpoint);
}
}
@@ -405,7 +417,7 @@
* side it needs to choose by putting in the location identity on both successors.
*/
InvokeWithExceptionNode invoke = (InvokeWithExceptionNode) node.predecessor();
- result.lastMemorySnapshot.put(invoke.getLocationIdentity(), (MemoryCheckpoint) node);
+ result.getMap().put(invoke.getKilledLocationIdentity(), (MemoryCheckpoint) node);
}
return result;
}
@@ -417,13 +429,13 @@
if (modifiedLocations.contains(LocationIdentity.any())) {
// create phis for all locations if ANY is modified in the loop
modifiedLocations = EconomicSet.create(Equivalence.DEFAULT, modifiedLocations);
- modifiedLocations.addAll(initialState.lastMemorySnapshot.getKeys());
+ modifiedLocations.addAll(initialState.getMap().getKeys());
}
for (LocationIdentity location : modifiedLocations) {
createMemoryPhi(loop, initialState, phis, location);
}
- initialState.lastMemorySnapshot.putAll(phis);
+ initialState.getMap().putAll(phis);
LoopInfo<MemoryMapImpl> loopInfo = ReentrantNodeIterator.processLoop(this, loop, initialState);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/GuardLoweringPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
package org.graalvm.compiler.phases.common;
-import org.graalvm.compiler.core.common.cfg.Loop;
import org.graalvm.compiler.debug.DebugCloseable;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.graph.Node;
@@ -34,8 +33,6 @@
import org.graalvm.compiler.nodes.FixedWithNextNode;
import org.graalvm.compiler.nodes.GuardNode;
import org.graalvm.compiler.nodes.IfNode;
-import org.graalvm.compiler.nodes.LoopBeginNode;
-import org.graalvm.compiler.nodes.LoopExitNode;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.StructuredGraph.GuardsStage;
import org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult;
@@ -62,11 +59,9 @@
private static class LowerGuards extends ScheduledNodeIterator {
- private final Block block;
private boolean useGuardIdAsDebugId;
- LowerGuards(Block block, boolean useGuardIdAsDebugId) {
- this.block = block;
+ LowerGuards(boolean useGuardIdAsDebugId) {
this.useGuardIdAsDebugId = useGuardIdAsDebugId;
}
@@ -95,7 +90,6 @@
AbstractBeginNode deoptBranch = BeginNode.begin(deopt);
AbstractBeginNode trueSuccessor;
AbstractBeginNode falseSuccessor;
- insertLoopExits(deopt);
if (guard.isNegated()) {
trueSuccessor = deoptBranch;
falseSuccessor = fastPath;
@@ -108,16 +102,6 @@
insert(ifNode, fastPath);
}
}
-
- private void insertLoopExits(DeoptimizeNode deopt) {
- Loop<Block> loop = block.getLoop();
- StructuredGraph graph = deopt.graph();
- while (loop != null) {
- LoopExitNode exit = graph.add(new LoopExitNode((LoopBeginNode) loop.getHeader().getBeginNode()));
- graph.addBeforeFixed(deopt, exit);
- loop = loop.getParent();
- }
- }
}
@Override
@@ -143,6 +127,6 @@
private static void processBlock(Block block, ScheduleResult schedule) {
DebugContext debug = block.getBeginNode().getDebug();
- new LowerGuards(block, debug.isDumpEnabledForMethod() || debug.isLogEnabledForMethod()).processNodes(block, schedule);
+ new LowerGuards(debug.isDumpEnabledForMethod() || debug.isLogEnabledForMethod()).processNodes(block, schedule);
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/InsertMembarsPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 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 org.graalvm.compiler.phases.common;
+
+import org.graalvm.compiler.nodes.StructuredGraph;
+import org.graalvm.compiler.nodes.extended.MembarNode;
+import org.graalvm.compiler.nodes.memory.FixedAccessNode;
+import org.graalvm.compiler.nodes.memory.ReadNode;
+import org.graalvm.compiler.nodes.memory.VolatileReadNode;
+import org.graalvm.compiler.nodes.memory.WriteNode;
+import org.graalvm.compiler.phases.Phase;
+
+import static jdk.vm.ci.code.MemoryBarriers.JMM_POST_VOLATILE_READ;
+import static jdk.vm.ci.code.MemoryBarriers.JMM_POST_VOLATILE_WRITE;
+import static jdk.vm.ci.code.MemoryBarriers.JMM_PRE_VOLATILE_READ;
+import static jdk.vm.ci.code.MemoryBarriers.JMM_PRE_VOLATILE_WRITE;
+
+public class InsertMembarsPhase extends Phase {
+ @Override
+ protected void run(StructuredGraph graph) {
+ for (FixedAccessNode access : graph.getNodes(FixedAccessNode.TYPE)) {
+ if (access instanceof VolatileReadNode) {
+ ReadNode read = (ReadNode) access;
+ MembarNode preMembar = graph.add(new MembarNode(JMM_PRE_VOLATILE_READ));
+ graph.addBeforeFixed(read, preMembar);
+ MembarNode postMembar = graph.add(new MembarNode(JMM_POST_VOLATILE_READ));
+ graph.addAfterFixed(read, postMembar);
+ } else if (access instanceof WriteNode && ((WriteNode) access).isVolatile()) {
+ WriteNode write = (WriteNode) access;
+ MembarNode preMembar = graph.add(new MembarNode(JMM_PRE_VOLATILE_WRITE));
+ graph.addBeforeFixed(write, preMembar);
+ MembarNode postMembar = graph.add(new MembarNode(JMM_POST_VOLATILE_WRITE));
+ graph.addAfterFixed(write, postMembar);
+ }
+ }
+ }
+
+ @Override
+ public float codeSizeIncrease() {
+ return 3f;
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/LoweringPhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -46,6 +46,7 @@
import org.graalvm.compiler.graph.Node;
import org.graalvm.compiler.graph.NodeBitMap;
import org.graalvm.compiler.graph.NodeClass;
+import org.graalvm.compiler.graph.NodeMap;
import org.graalvm.compiler.graph.NodeSourcePosition;
import org.graalvm.compiler.graph.iterators.NodeIterable;
import org.graalvm.compiler.nodeinfo.InputType;
@@ -131,12 +132,14 @@
private final NodeBitMap activeGuards;
private AnchoringNode guardAnchor;
private FixedWithNextNode lastFixedNode;
+ private NodeMap<Block> nodeMap;
- LoweringToolImpl(CoreProviders context, AnchoringNode guardAnchor, NodeBitMap activeGuards, FixedWithNextNode lastFixedNode) {
+ LoweringToolImpl(CoreProviders context, AnchoringNode guardAnchor, NodeBitMap activeGuards, FixedWithNextNode lastFixedNode, NodeMap<Block> nodeMap) {
this.context = context;
this.guardAnchor = guardAnchor;
this.activeGuards = activeGuards;
this.lastFixedNode = lastFixedNode;
+ this.nodeMap = nodeMap;
}
@Override
@@ -199,7 +202,8 @@
StructuredGraph graph = before.graph();
if (OptEliminateGuards.getValue(graph.getOptions())) {
for (Node usage : condition.usages()) {
- if (!activeGuards.isNew(usage) && activeGuards.isMarked(usage) && ((GuardNode) usage).isNegated() == negated) {
+ if (!activeGuards.isNew(usage) && activeGuards.isMarked(usage) && ((GuardNode) usage).isNegated() == negated &&
+ (!before.graph().hasValueProxies() || nodeMap.get(((GuardNode) usage).getAnchor().asNode()).isInSameOrOuterLoopOf(nodeMap.get(before)))) {
return (GuardNode) usage;
}
}
@@ -310,9 +314,9 @@
*/
boolean isAny = false;
if (n instanceof MemoryCheckpoint.Single) {
- isAny = ((MemoryCheckpoint.Single) n).getLocationIdentity().isAny();
+ isAny = ((MemoryCheckpoint.Single) n).getKilledLocationIdentity().isAny();
} else {
- for (LocationIdentity ident : ((MemoryCheckpoint.Multi) n).getLocationIdentities()) {
+ for (LocationIdentity ident : ((MemoryCheckpoint.Multi) n).getKilledLocationIdentities()) {
if (ident.isAny()) {
isAny = true;
}
@@ -447,7 +451,7 @@
@SuppressWarnings("try")
private AnchoringNode process(final Block b, final NodeBitMap activeGuards, final AnchoringNode startAnchor) {
- final LoweringToolImpl loweringTool = new LoweringToolImpl(context, startAnchor, activeGuards, b.getBeginNode());
+ final LoweringToolImpl loweringTool = new LoweringToolImpl(context, startAnchor, activeGuards, b.getBeginNode(), this.schedule.getNodeToBlockMap());
// Lower the instructions of this block.
List<Node> nodes = schedule.nodesFor(b);
@@ -613,69 +617,6 @@
}
}
- public static void processBlockBounded(final Frame<?> rootFrame) {
- ProcessBlockState state = ST_PROCESS;
- Frame<?> f = rootFrame;
- while (f != null) {
- ProcessBlockState nextState;
- if (state == ST_PROCESS || state == ST_PROCESS_ALWAYS_REACHED) {
- f.preprocess();
- nextState = state == ST_PROCESS_ALWAYS_REACHED ? ST_ENTER : ST_ENTER_ALWAYS_REACHED;
- } else if (state == ST_ENTER_ALWAYS_REACHED) {
- if (f.alwaysReachedBlock != null && f.alwaysReachedBlock.getDominator() == f.block) {
- Frame<?> continueRecur = f.enterAlwaysReached(f.alwaysReachedBlock);
- if (continueRecur == null) {
- // stop recursion here
- f.postprocess();
- f = f.parent;
- state = ST_ENTER;
- continue;
- }
- f = continueRecur;
- nextState = ST_PROCESS;
- } else {
- nextState = ST_ENTER;
- }
- } else if (state == ST_ENTER) {
- if (f.dominated != null) {
- Block n = f.dominated;
- f.dominated = n.getDominatedSibling();
- if (n == f.alwaysReachedBlock) {
- if (f.dominated != null) {
- n = f.dominated;
- f.dominated = n.getDominatedSibling();
- } else {
- n = null;
- }
- }
- if (n == null) {
- nextState = ST_LEAVE;
- } else {
- Frame<?> continueRecur = f.enter(n);
- if (continueRecur == null) {
- // stop recursion here
- f.postprocess();
- f = f.parent;
- state = ST_ENTER;
- continue;
- }
- f = continueRecur;
- nextState = ST_PROCESS;
- }
- } else {
- nextState = ST_LEAVE;
- }
- } else if (state == ST_LEAVE) {
- f.postprocess();
- f = f.parent;
- nextState = ST_ENTER;
- } else {
- throw GraalError.shouldNotReachHere();
- }
- state = nextState;
- }
- }
-
public abstract static class Frame<T extends Frame<?>> {
protected final Block block;
final T parent;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java Thu Nov 07 18:44:09 2019 +0000
@@ -56,6 +56,7 @@
import org.graalvm.compiler.graph.NodeMap;
import org.graalvm.compiler.graph.NodeSourcePosition;
import org.graalvm.compiler.graph.NodeWorkList;
+import org.graalvm.compiler.nodeinfo.InputType;
import org.graalvm.compiler.nodeinfo.Verbosity;
import org.graalvm.compiler.nodes.AbstractBeginNode;
import org.graalvm.compiler.nodes.AbstractEndNode;
@@ -87,6 +88,7 @@
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.calc.IsNullNode;
import org.graalvm.compiler.nodes.extended.ForeignCallNode;
+import org.graalvm.compiler.nodes.extended.GuardedNode;
import org.graalvm.compiler.nodes.extended.GuardingNode;
import org.graalvm.compiler.nodes.java.ExceptionObjectNode;
import org.graalvm.compiler.nodes.java.MethodCallTargetNode;
@@ -526,7 +528,17 @@
assert unwindNode.predecessor() != null;
assert invokeWithException.exceptionEdge().successors().count() == 1;
ExceptionObjectNode obj = (ExceptionObjectNode) invokeWithException.exceptionEdge();
- obj.replaceAtUsages(unwindNode.exception());
+ /*
+ * The exception object node is a begin node, i.e., it can be used as an anchor for
+ * other nodes, thus we need to re-route them to a valid anchor, i.e. the begin node
+ * of the unwind block.
+ */
+ assert obj.usages().filter(x -> x instanceof GuardedNode && ((GuardedNode) x).getGuard() == obj).count() == 0 : "Must not have guards attached to an exception object node";
+ AbstractBeginNode replacementAnchor = AbstractBeginNode.prevBegin(unwindNode);
+ assert replacementAnchor != null;
+ obj.replaceAtUsages(InputType.Anchor, replacementAnchor);
+ obj.replaceAtUsages(InputType.Value, unwindNode.exception());
+
Node n = obj.next();
obj.setNext(null);
unwindNode.replaceAndDelete(n);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/info/MultiTypeGuardInlineInfo.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -208,8 +208,10 @@
FixedNode exceptionSux = exceptionEdge.next();
graph.addBeforeFixed(exceptionSux, exceptionMerge);
exceptionObjectPhi = graph.addWithoutUnique(new ValuePhiNode(StampFactory.forKind(JavaKind.Object), exceptionMerge));
- exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(invoke.stateAfter().bci, true, JavaKind.Object, new JavaKind[]{JavaKind.Object},
- new ValueNode[]{exceptionObjectPhi}));
+
+ assert exceptionEdge.stateAfter().bci == invoke.bci();
+ assert exceptionEdge.stateAfter().rethrowException();
+ exceptionMerge.setStateAfter(exceptionEdge.stateAfter().duplicateModified(JavaKind.Object, JavaKind.Object, exceptionObjectPhi));
}
// create one separate block for each invoked method
@@ -396,7 +398,7 @@
JavaKind kind = invoke.asNode().getStackKind();
if (kind != JavaKind.Void) {
FrameState stateAfter = invoke.stateAfter();
- stateAfter = stateAfter.duplicate(stateAfter.bci);
+ stateAfter = stateAfter.duplicate();
stateAfter.replaceFirstInput(invoke.asNode(), result.asNode());
result.setStateAfter(stateAfter);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/MemoryScheduleVerification.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +0,0 @@
-/*
- * 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.
- *
- * 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 org.graalvm.compiler.phases.schedule;
-
-import java.util.List;
-
-import jdk.internal.vm.compiler.collections.EconomicSet;
-import jdk.internal.vm.compiler.collections.Equivalence;
-import org.graalvm.compiler.core.common.cfg.BlockMap;
-import org.graalvm.compiler.core.common.cfg.Loop;
-import org.graalvm.compiler.debug.DebugContext;
-import org.graalvm.compiler.graph.Node;
-import org.graalvm.compiler.nodes.AbstractBeginNode;
-import org.graalvm.compiler.nodes.AbstractMergeNode;
-import org.graalvm.compiler.nodes.LoopBeginNode;
-import org.graalvm.compiler.nodes.PhiNode;
-import org.graalvm.compiler.nodes.cfg.Block;
-import org.graalvm.compiler.nodes.cfg.HIRLoop;
-import org.graalvm.compiler.nodes.memory.FloatingReadNode;
-import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
-import org.graalvm.compiler.nodes.memory.MemoryNode;
-import org.graalvm.compiler.nodes.memory.MemoryPhiNode;
-import org.graalvm.compiler.phases.graph.ReentrantBlockIterator;
-import org.graalvm.compiler.phases.graph.ReentrantBlockIterator.BlockIteratorClosure;
-import jdk.internal.vm.compiler.word.LocationIdentity;
-
-public final class MemoryScheduleVerification extends BlockIteratorClosure<EconomicSet<FloatingReadNode>> {
-
- private final BlockMap<List<Node>> blockToNodesMap;
-
- public static boolean check(Block startBlock, BlockMap<List<Node>> blockToNodesMap) {
- ReentrantBlockIterator.apply(new MemoryScheduleVerification(blockToNodesMap), startBlock);
- return true;
- }
-
- private MemoryScheduleVerification(BlockMap<List<Node>> blockToNodesMap) {
- this.blockToNodesMap = blockToNodesMap;
- }
-
- @Override
- protected EconomicSet<FloatingReadNode> getInitialState() {
- return EconomicSet.create(Equivalence.IDENTITY);
- }
-
- @Override
- protected EconomicSet<FloatingReadNode> processBlock(Block block, EconomicSet<FloatingReadNode> currentState) {
- AbstractBeginNode beginNode = block.getBeginNode();
- if (beginNode instanceof AbstractMergeNode) {
- AbstractMergeNode abstractMergeNode = (AbstractMergeNode) beginNode;
- for (PhiNode phi : abstractMergeNode.phis()) {
- if (phi instanceof MemoryPhiNode) {
- MemoryPhiNode memoryPhiNode = (MemoryPhiNode) phi;
- addFloatingReadUsages(currentState, memoryPhiNode);
- }
- }
- }
- for (Node n : blockToNodesMap.get(block)) {
- if (n instanceof MemoryCheckpoint) {
- if (n instanceof MemoryCheckpoint.Single) {
- MemoryCheckpoint.Single single = (MemoryCheckpoint.Single) n;
- processLocation(n, single.getLocationIdentity(), currentState);
- } else if (n instanceof MemoryCheckpoint.Multi) {
- MemoryCheckpoint.Multi multi = (MemoryCheckpoint.Multi) n;
- for (LocationIdentity location : multi.getLocationIdentities()) {
- processLocation(n, location, currentState);
- }
- }
-
- addFloatingReadUsages(currentState, n);
- } else if (n instanceof MemoryNode) {
- addFloatingReadUsages(currentState, n);
- } else if (n instanceof FloatingReadNode) {
- FloatingReadNode floatingReadNode = (FloatingReadNode) n;
- if (floatingReadNode.getLastLocationAccess() != null && floatingReadNode.getLocationIdentity().isMutable()) {
- if (currentState.contains(floatingReadNode)) {
- // Floating read was found in the state.
- currentState.remove(floatingReadNode);
- } else {
- throw new RuntimeException("Floating read node " + n + " was not found in the state, i.e., it was killed by a memory check point before its place in the schedule. Block=" +
- block + ", block begin: " + block.getBeginNode() + " block loop: " + block.getLoop() + ", " + blockToNodesMap.get(block).get(0));
- }
- }
-
- }
- }
- return currentState;
- }
-
- private static void addFloatingReadUsages(EconomicSet<FloatingReadNode> currentState, Node n) {
- for (FloatingReadNode read : n.usages().filter(FloatingReadNode.class)) {
- if (read.getLastLocationAccess() == n && read.getLocationIdentity().isMutable()) {
- currentState.add(read);
- }
- }
- }
-
- private void processLocation(Node n, LocationIdentity location, EconomicSet<FloatingReadNode> currentState) {
- assert n != null;
- if (location.isImmutable()) {
- return;
- }
-
- for (FloatingReadNode r : cloneState(currentState)) {
- if (r.getLocationIdentity().overlaps(location)) {
- // This read is killed by this location.
- r.getDebug().log(DebugContext.VERBOSE_LEVEL, "%s removing %s from state", n, r);
- currentState.remove(r);
- }
- }
- }
-
- @Override
- protected EconomicSet<FloatingReadNode> merge(Block merge, List<EconomicSet<FloatingReadNode>> states) {
- EconomicSet<FloatingReadNode> result = states.get(0);
- for (int i = 1; i < states.size(); ++i) {
- result.retainAll(states.get(i));
- }
- return result;
- }
-
- @Override
- protected EconomicSet<FloatingReadNode> cloneState(EconomicSet<FloatingReadNode> oldState) {
- EconomicSet<FloatingReadNode> result = EconomicSet.create(Equivalence.IDENTITY);
- if (oldState != null) {
- result.addAll(oldState);
- }
- return result;
- }
-
- @Override
- protected List<EconomicSet<FloatingReadNode>> processLoop(Loop<Block> loop, EconomicSet<FloatingReadNode> initialState) {
- HIRLoop l = (HIRLoop) loop;
- for (MemoryPhiNode memoryPhi : ((LoopBeginNode) l.getHeader().getBeginNode()).memoryPhis()) {
- for (FloatingReadNode r : cloneState(initialState)) {
- if (r.getLocationIdentity().overlaps(memoryPhi.getLocationIdentity())) {
- initialState.remove(r);
- }
- }
- }
- return ReentrantBlockIterator.processLoop(this, loop, initialState).exitStates;
- }
-}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/SchedulePhase.java Thu Nov 07 18:44:09 2019 +0000
@@ -206,7 +206,8 @@
sortNodesLatestWithinBlock(cfg, earliestBlockToNodesMap, latestBlockToNodesMap, currentNodeMap, watchListMap, visited);
assert verifySchedule(cfg, latestBlockToNodesMap, currentNodeMap);
- assert (!Assertions.detailedAssertionsEnabled(graph.getOptions())) || MemoryScheduleVerification.check(cfg.getStartBlock(), latestBlockToNodesMap);
+ assert (!Assertions.detailedAssertionsEnabled(graph.getOptions())) ||
+ ScheduleVerification.check(cfg.getStartBlock(), latestBlockToNodesMap, currentNodeMap);
this.blockToNodesMap = latestBlockToNodesMap;
@@ -358,7 +359,7 @@
}
if (lastBlock.getBeginNode() instanceof KillingBeginNode) {
- LocationIdentity locationIdentity = ((KillingBeginNode) lastBlock.getBeginNode()).getLocationIdentity();
+ LocationIdentity locationIdentity = ((KillingBeginNode) lastBlock.getBeginNode()).getKilledLocationIdentity();
if ((locationIdentity.isAny() || locationIdentity.equals(location)) && lastBlock != earliestBlock) {
// The begin of this block kills the location, so we *have* to schedule the node
// in the dominating block.
@@ -374,13 +375,13 @@
for (Node n : subList) {
// Check if this node kills a node in the watch list.
if (n instanceof MemoryCheckpoint.Single) {
- LocationIdentity identity = ((MemoryCheckpoint.Single) n).getLocationIdentity();
+ LocationIdentity identity = ((MemoryCheckpoint.Single) n).getKilledLocationIdentity();
killed.add(identity);
if (killed.isAny()) {
return;
}
} else if (n instanceof MemoryCheckpoint.Multi) {
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) n).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) n).getKilledLocationIdentities()) {
killed.add(identity);
if (killed.isAny()) {
return;
@@ -471,10 +472,10 @@
if (watchList != null && !watchList.isEmpty()) {
// Check if this node kills a node in the watch list.
if (n instanceof MemoryCheckpoint.Single) {
- LocationIdentity identity = ((MemoryCheckpoint.Single) n).getLocationIdentity();
+ LocationIdentity identity = ((MemoryCheckpoint.Single) n).getKilledLocationIdentity();
checkWatchList(watchList, identity, b, result, nodeMap, unprocessed);
} else if (n instanceof MemoryCheckpoint.Multi) {
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) n).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) n).getKilledLocationIdentities()) {
checkWatchList(watchList, identity, b, result, nodeMap, unprocessed);
}
}
@@ -896,7 +897,7 @@
}
}
- assert (!Assertions.detailedAssertionsEnabled(cfg.graph.getOptions())) || MemoryScheduleVerification.check(cfg.getStartBlock(), blockToNodes);
+ assert (!Assertions.detailedAssertionsEnabled(cfg.graph.getOptions())) || ScheduleVerification.check(cfg.getStartBlock(), blockToNodes, nodeToBlock);
}
private static void processNodes(NodeBitMap visited, NodeMap<MicroBlock> entries, NodeStack stack, MicroBlock startBlock, Iterable<? extends Node> nodes) {
@@ -1183,10 +1184,10 @@
Formatter buf = new Formatter();
buf.format("%s", n);
if (n instanceof MemoryCheckpoint.Single) {
- buf.format(" // kills %s", ((MemoryCheckpoint.Single) n).getLocationIdentity());
+ buf.format(" // kills %s", ((MemoryCheckpoint.Single) n).getKilledLocationIdentity());
} else if (n instanceof MemoryCheckpoint.Multi) {
buf.format(" // kills ");
- for (LocationIdentity locid : ((MemoryCheckpoint.Multi) n).getLocationIdentities()) {
+ for (LocationIdentity locid : ((MemoryCheckpoint.Multi) n).getKilledLocationIdentities()) {
buf.format("%s, ", locid);
}
} else if (n instanceof FloatingReadNode) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/schedule/ScheduleVerification.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,229 @@
+/*
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.phases.schedule;
+
+import java.util.List;
+
+import jdk.internal.vm.compiler.collections.EconomicSet;
+import jdk.internal.vm.compiler.collections.Equivalence;
+import org.graalvm.compiler.core.common.cfg.BlockMap;
+import org.graalvm.compiler.core.common.cfg.Loop;
+import org.graalvm.compiler.debug.DebugContext;
+import org.graalvm.compiler.graph.Node;
+import org.graalvm.compiler.graph.NodeMap;
+import org.graalvm.compiler.nodes.AbstractBeginNode;
+import org.graalvm.compiler.nodes.AbstractMergeNode;
+import org.graalvm.compiler.nodes.LoopBeginNode;
+import org.graalvm.compiler.nodes.LoopExitNode;
+import org.graalvm.compiler.nodes.MemoryProxyNode;
+import org.graalvm.compiler.nodes.PhiNode;
+import org.graalvm.compiler.nodes.ProxyNode;
+import org.graalvm.compiler.nodes.StructuredGraph;
+import org.graalvm.compiler.nodes.VirtualState;
+import org.graalvm.compiler.nodes.cfg.Block;
+import org.graalvm.compiler.nodes.cfg.HIRLoop;
+import org.graalvm.compiler.nodes.memory.FloatingReadNode;
+import org.graalvm.compiler.nodes.memory.MemoryCheckpoint;
+import org.graalvm.compiler.nodes.memory.MemoryNode;
+import org.graalvm.compiler.nodes.memory.MemoryPhiNode;
+import org.graalvm.compiler.phases.graph.ReentrantBlockIterator;
+import org.graalvm.compiler.phases.graph.ReentrantBlockIterator.BlockIteratorClosure;
+import jdk.internal.vm.compiler.word.LocationIdentity;
+
+/**
+ * Verifies that the schedule of the graph is correct. Checks that floating reads are not killed
+ * between definition and usage. Also checks that there are no usages spanning loop exits without a
+ * proper proxy node.
+ */
+public final class ScheduleVerification extends BlockIteratorClosure<EconomicSet<FloatingReadNode>> {
+
+ private final BlockMap<List<Node>> blockToNodesMap;
+ private final NodeMap<Block> nodeMap;
+ private final StructuredGraph graph;
+
+ public static boolean check(Block startBlock, BlockMap<List<Node>> blockToNodesMap, NodeMap<Block> nodeMap) {
+ ReentrantBlockIterator.apply(new ScheduleVerification(blockToNodesMap, nodeMap, startBlock.getBeginNode().graph()), startBlock);
+ return true;
+ }
+
+ private ScheduleVerification(BlockMap<List<Node>> blockToNodesMap, NodeMap<Block> nodeMap, StructuredGraph graph) {
+ this.blockToNodesMap = blockToNodesMap;
+ this.nodeMap = nodeMap;
+ this.graph = graph;
+ }
+
+ @Override
+ protected EconomicSet<FloatingReadNode> getInitialState() {
+ return EconomicSet.create(Equivalence.IDENTITY);
+ }
+
+ @Override
+ protected EconomicSet<FloatingReadNode> processBlock(Block block, EconomicSet<FloatingReadNode> currentState) {
+ AbstractBeginNode beginNode = block.getBeginNode();
+ if (beginNode instanceof AbstractMergeNode) {
+ AbstractMergeNode abstractMergeNode = (AbstractMergeNode) beginNode;
+ for (PhiNode phi : abstractMergeNode.phis()) {
+ if (phi instanceof MemoryPhiNode) {
+ MemoryPhiNode memoryPhiNode = (MemoryPhiNode) phi;
+ addFloatingReadUsages(currentState, memoryPhiNode);
+ }
+ }
+ }
+ if (beginNode instanceof LoopExitNode) {
+ LoopExitNode loopExitNode = (LoopExitNode) beginNode;
+ for (ProxyNode proxy : loopExitNode.proxies()) {
+ if (proxy instanceof MemoryProxyNode) {
+ MemoryProxyNode memoryProxyNode = (MemoryProxyNode) proxy;
+ addFloatingReadUsages(currentState, memoryProxyNode);
+ }
+ }
+ }
+ for (Node n : blockToNodesMap.get(block)) {
+ if (n instanceof MemoryCheckpoint) {
+ if (n instanceof MemoryCheckpoint.Single) {
+ MemoryCheckpoint.Single single = (MemoryCheckpoint.Single) n;
+ processLocation(n, single.getKilledLocationIdentity(), currentState);
+ } else if (n instanceof MemoryCheckpoint.Multi) {
+ MemoryCheckpoint.Multi multi = (MemoryCheckpoint.Multi) n;
+ for (LocationIdentity location : multi.getKilledLocationIdentities()) {
+ processLocation(n, location, currentState);
+ }
+ }
+
+ addFloatingReadUsages(currentState, n);
+ } else if (n instanceof MemoryNode) {
+ addFloatingReadUsages(currentState, n);
+ } else if (n instanceof FloatingReadNode) {
+ FloatingReadNode floatingReadNode = (FloatingReadNode) n;
+ if (floatingReadNode.getLastLocationAccess() != null && floatingReadNode.getLocationIdentity().isMutable()) {
+ if (currentState.contains(floatingReadNode)) {
+ // Floating read was found in the state.
+ currentState.remove(floatingReadNode);
+ } else {
+ throw new RuntimeException("Floating read node " + n + " was not found in the state, i.e., it was killed by a memory check point before its place in the schedule. Block=" +
+ block + ", block begin: " + block.getBeginNode() + " block loop: " + block.getLoop() + ", " + blockToNodesMap.get(block).get(0));
+ }
+ }
+ }
+ assert nodeMap.get(n) == block;
+ if (graph.hasValueProxies() && block.getLoop() != null && !(n instanceof VirtualState)) {
+ for (Node usage : n.usages()) {
+ Node usageNode = usage;
+
+ if (usageNode instanceof PhiNode) {
+ PhiNode phiNode = (PhiNode) usage;
+ usageNode = phiNode.merge();
+ }
+
+ if (usageNode instanceof LoopExitNode) {
+ LoopExitNode loopExitNode = (LoopExitNode) usageNode;
+ if (loopExitNode.loopBegin() == n || loopExitNode.stateAfter() == n) {
+ continue;
+ }
+ }
+ Block usageBlock = nodeMap.get(usageNode);
+
+ Loop<Block> usageLoop = null;
+ if (usageNode instanceof ProxyNode) {
+ ProxyNode proxyNode = (ProxyNode) usageNode;
+ usageLoop = nodeMap.get(proxyNode.proxyPoint().loopBegin()).getLoop();
+ } else {
+ if (usageBlock.getBeginNode() instanceof LoopExitNode) {
+ // For nodes in the loop exit node block, we don't know for sure
+ // whether they are "in the loop" or not. It depends on whether
+ // one of their transient usages is a loop proxy node.
+ // For now, let's just assume those nodes are OK, i.e., "in the loop".
+ LoopExitNode loopExitNode = (LoopExitNode) usageBlock.getBeginNode();
+ usageLoop = nodeMap.get(loopExitNode.loopBegin()).getLoop();
+ } else {
+ usageLoop = usageBlock.getLoop();
+ }
+ }
+
+ assert usageLoop != null : n + ", " + nodeMap.get(n) + " / " + usageNode + ", " + nodeMap.get(usageNode);
+ while (usageLoop != block.getLoop() && usageLoop != null) {
+ usageLoop = usageLoop.getParent();
+ }
+ assert usageLoop != null : n + ", " + usageNode + ", " + usageBlock + ", " + usageBlock.getLoop() + ", " + block + ", " + block.getLoop();
+ }
+ }
+ }
+ return currentState;
+ }
+
+ private static void addFloatingReadUsages(EconomicSet<FloatingReadNode> currentState, Node n) {
+ for (FloatingReadNode read : n.usages().filter(FloatingReadNode.class)) {
+ if (read.getLastLocationAccess() == n && read.getLocationIdentity().isMutable()) {
+ currentState.add(read);
+ }
+ }
+ }
+
+ private void processLocation(Node n, LocationIdentity location, EconomicSet<FloatingReadNode> currentState) {
+ assert n != null;
+ if (location.isImmutable()) {
+ return;
+ }
+
+ for (FloatingReadNode r : cloneState(currentState)) {
+ if (r.getLocationIdentity().overlaps(location)) {
+ // This read is killed by this location.
+ r.getDebug().log(DebugContext.VERBOSE_LEVEL, "%s removing %s from state", n, r);
+ currentState.remove(r);
+ }
+ }
+ }
+
+ @Override
+ protected EconomicSet<FloatingReadNode> merge(Block merge, List<EconomicSet<FloatingReadNode>> states) {
+ EconomicSet<FloatingReadNode> result = states.get(0);
+ for (int i = 1; i < states.size(); ++i) {
+ result.retainAll(states.get(i));
+ }
+ return result;
+ }
+
+ @Override
+ protected EconomicSet<FloatingReadNode> cloneState(EconomicSet<FloatingReadNode> oldState) {
+ EconomicSet<FloatingReadNode> result = EconomicSet.create(Equivalence.IDENTITY);
+ if (oldState != null) {
+ result.addAll(oldState);
+ }
+ return result;
+ }
+
+ @Override
+ protected List<EconomicSet<FloatingReadNode>> processLoop(Loop<Block> loop, EconomicSet<FloatingReadNode> initialState) {
+ HIRLoop l = (HIRLoop) loop;
+ for (MemoryPhiNode memoryPhi : ((LoopBeginNode) l.getHeader().getBeginNode()).memoryPhis()) {
+ for (FloatingReadNode r : cloneState(initialState)) {
+ if (r.getLocationIdentity().overlaps(memoryPhi.getLocationIdentity())) {
+ initialState.remove(r);
+ }
+ }
+ }
+ return ReentrantBlockIterator.processLoop(this, loop, initialState).exitStates;
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.aarch64/src/org/graalvm/compiler/replacements/aarch64/AArch64GraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -32,7 +32,6 @@
import static org.graalvm.compiler.replacements.nodes.UnaryMathIntrinsicNode.UnaryOperation.SIN;
import static org.graalvm.compiler.replacements.nodes.UnaryMathIntrinsicNode.UnaryOperation.TAN;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.lir.aarch64.AArch64ArithmeticLIRGeneratorTool.RoundingMode;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
@@ -45,6 +44,7 @@
import org.graalvm.compiler.nodes.java.AtomicReadAndWriteNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
+import org.graalvm.compiler.nodes.spi.Replacements;
import org.graalvm.compiler.replacements.TargetGraphBuilderPlugins;
import org.graalvm.compiler.replacements.nodes.BinaryMathIntrinsicNode;
import org.graalvm.compiler.replacements.nodes.FusedMultiplyAddNode;
@@ -60,39 +60,39 @@
public class AArch64GraphBuilderPlugins implements TargetGraphBuilderPlugins {
@Override
- public void register(Plugins plugins, BytecodeProvider replacementsBytecodeProvider, Architecture arch, boolean explicitUnsafeNullChecks, boolean registerMathPlugins,
+ public void register(Plugins plugins, Replacements replacements, Architecture arch, boolean explicitUnsafeNullChecks, boolean registerMathPlugins,
boolean emitJDK9StringSubstitutions, boolean useFMAIntrinsics) {
- register(plugins, replacementsBytecodeProvider, explicitUnsafeNullChecks, registerMathPlugins, emitJDK9StringSubstitutions, useFMAIntrinsics);
+ register(plugins, replacements, explicitUnsafeNullChecks, registerMathPlugins, emitJDK9StringSubstitutions, useFMAIntrinsics);
}
- public static void register(Plugins plugins, BytecodeProvider bytecodeProvider, boolean explicitUnsafeNullChecks,
+ public static void register(Plugins plugins, Replacements replacements, boolean explicitUnsafeNullChecks,
boolean registerMathPlugins, boolean emitJDK9StringSubstitutions, boolean useFMAIntrinsics) {
InvocationPlugins invocationPlugins = plugins.getInvocationPlugins();
invocationPlugins.defer(new Runnable() {
@Override
public void run() {
- registerIntegerLongPlugins(invocationPlugins, JavaKind.Int, bytecodeProvider);
- registerIntegerLongPlugins(invocationPlugins, JavaKind.Long, bytecodeProvider);
+ registerIntegerLongPlugins(invocationPlugins, JavaKind.Int, replacements);
+ registerIntegerLongPlugins(invocationPlugins, JavaKind.Long, replacements);
if (registerMathPlugins) {
registerMathPlugins(invocationPlugins, useFMAIntrinsics);
}
if (emitJDK9StringSubstitutions) {
- registerStringLatin1Plugins(invocationPlugins, bytecodeProvider);
- registerStringUTF16Plugins(invocationPlugins, bytecodeProvider);
+ registerStringLatin1Plugins(invocationPlugins, replacements);
+ registerStringUTF16Plugins(invocationPlugins, replacements);
}
- registerUnsafePlugins(invocationPlugins, bytecodeProvider);
+ registerUnsafePlugins(invocationPlugins, replacements);
// This is temporarily disabled until we implement correct emitting of the CAS
// instructions of the proper width.
- registerPlatformSpecificUnsafePlugins(invocationPlugins, bytecodeProvider, explicitUnsafeNullChecks,
+ registerPlatformSpecificUnsafePlugins(invocationPlugins, replacements, explicitUnsafeNullChecks,
new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object});
}
});
}
- private static void registerIntegerLongPlugins(InvocationPlugins plugins, JavaKind kind, BytecodeProvider bytecodeProvider) {
+ private static void registerIntegerLongPlugins(InvocationPlugins plugins, JavaKind kind, Replacements replacements) {
Class<?> declaringClass = kind.toBoxedJavaClass();
Class<?> type = kind.toJavaClass();
- Registration r = new Registration(plugins, declaringClass, bytecodeProvider);
+ Registration r = new Registration(plugins, declaringClass, replacements);
r.register1("numberOfLeadingZeros", type, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
@@ -196,29 +196,29 @@
});
}
- private static void registerStringLatin1Plugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
+ private static void registerStringLatin1Plugins(InvocationPlugins plugins, Replacements replacements) {
if (JavaVersionUtil.JAVA_SPEC >= 9) {
- Registration r = new Registration(plugins, "java.lang.StringLatin1", replacementsBytecodeProvider);
+ Registration r = new Registration(plugins, "java.lang.StringLatin1", replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(AArch64StringLatin1Substitutions.class, "compareTo", byte[].class, byte[].class);
r.registerMethodSubstitution(AArch64StringLatin1Substitutions.class, "compareToUTF16", byte[].class, byte[].class);
}
}
- private static void registerStringUTF16Plugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
+ private static void registerStringUTF16Plugins(InvocationPlugins plugins, Replacements replacements) {
if (JavaVersionUtil.JAVA_SPEC >= 9) {
- Registration r = new Registration(plugins, "java.lang.StringUTF16", replacementsBytecodeProvider);
+ Registration r = new Registration(plugins, "java.lang.StringUTF16", replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(AArch64StringUTF16Substitutions.class, "compareTo", byte[].class, byte[].class);
r.registerMethodSubstitution(AArch64StringUTF16Substitutions.class, "compareToLatin1", byte[].class, byte[].class);
}
}
- private static void registerUnsafePlugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
+ private static void registerUnsafePlugins(InvocationPlugins plugins, Replacements replacements) {
registerUnsafePlugins(new Registration(plugins, Unsafe.class),
new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object}, "Object");
if (JavaVersionUtil.JAVA_SPEC > 8) {
- registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", replacementsBytecodeProvider),
+ registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", replacements),
new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object},
JavaVersionUtil.JAVA_SPEC <= 11 ? "Object" : "Reference");
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountLeadingZerosNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,4 +90,10 @@
public void generate(NodeLIRBuilderTool builder, ArithmeticLIRGeneratorTool gen) {
builder.setResult(this, ((AMD64ArithmeticLIRGeneratorTool) gen).emitCountLeadingZeros(builder.operand(getValue())));
}
+
+ @NodeIntrinsic
+ public static native int countLeadingZeros(int i);
+
+ @NodeIntrinsic
+ public static native int countLeadingZeros(long i);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64CountTrailingZerosNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,4 +90,10 @@
public void generate(NodeLIRBuilderTool builder, ArithmeticLIRGeneratorTool gen) {
builder.setResult(this, ((AMD64ArithmeticLIRGeneratorTool) gen).emitCountTrailingZeros(builder.operand(getValue())));
}
+
+ @NodeIntrinsic
+ public static native int countTrailingZeros(int i);
+
+ @NodeIntrinsic
+ public static native int countTrailingZeros(long i);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64GraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -35,7 +35,6 @@
import java.util.Arrays;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.lir.amd64.AMD64ArithmeticLIRGeneratorTool.RoundingMode;
import org.graalvm.compiler.nodes.PauseNode;
import org.graalvm.compiler.nodes.ValueNode;
@@ -48,9 +47,8 @@
import org.graalvm.compiler.nodes.java.AtomicReadAndAddNode;
import org.graalvm.compiler.nodes.java.AtomicReadAndWriteNode;
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
+import org.graalvm.compiler.nodes.spi.Replacements;
import org.graalvm.compiler.replacements.ArraysSubstitutions;
-import org.graalvm.compiler.replacements.IntegerSubstitutions;
-import org.graalvm.compiler.replacements.LongSubstitutions;
import org.graalvm.compiler.replacements.StandardGraphBuilderPlugins.UnsafeAccessPlugin;
import org.graalvm.compiler.replacements.StandardGraphBuilderPlugins.UnsafeGetPlugin;
import org.graalvm.compiler.replacements.StandardGraphBuilderPlugins.UnsafePutPlugin;
@@ -72,30 +70,31 @@
public class AMD64GraphBuilderPlugins implements TargetGraphBuilderPlugins {
@Override
- public void register(Plugins plugins, BytecodeProvider replacementsBytecodeProvider, Architecture architecture, boolean explicitUnsafeNullChecks,
+ public void register(Plugins plugins, Replacements replacements, Architecture architecture, boolean explicitUnsafeNullChecks,
boolean registerMathPlugins, boolean emitJDK9StringSubstitutions, boolean useFMAIntrinsics) {
- register(plugins, replacementsBytecodeProvider, (AMD64) architecture, explicitUnsafeNullChecks, emitJDK9StringSubstitutions, useFMAIntrinsics);
+ register(plugins, replacements, (AMD64) architecture, explicitUnsafeNullChecks, emitJDK9StringSubstitutions, useFMAIntrinsics);
}
- public static void register(Plugins plugins, BytecodeProvider replacementsBytecodeProvider, AMD64 arch, boolean explicitUnsafeNullChecks, boolean emitJDK9StringSubstitutions,
+ public static void register(Plugins plugins, Replacements replacements, AMD64 arch, boolean explicitUnsafeNullChecks,
+ boolean emitJDK9StringSubstitutions,
boolean useFMAIntrinsics) {
InvocationPlugins invocationPlugins = plugins.getInvocationPlugins();
invocationPlugins.defer(new Runnable() {
@Override
public void run() {
registerThreadPlugins(invocationPlugins, arch);
- registerIntegerLongPlugins(invocationPlugins, IntegerSubstitutions.class, JavaKind.Int, arch, replacementsBytecodeProvider);
- registerIntegerLongPlugins(invocationPlugins, LongSubstitutions.class, JavaKind.Long, arch, replacementsBytecodeProvider);
- registerPlatformSpecificUnsafePlugins(invocationPlugins, replacementsBytecodeProvider, explicitUnsafeNullChecks,
+ registerIntegerLongPlugins(invocationPlugins, AMD64IntegerSubstitutions.class, JavaKind.Int, arch, replacements);
+ registerIntegerLongPlugins(invocationPlugins, AMD64LongSubstitutions.class, JavaKind.Long, arch, replacements);
+ registerPlatformSpecificUnsafePlugins(invocationPlugins, replacements, explicitUnsafeNullChecks,
new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object, JavaKind.Boolean, JavaKind.Byte, JavaKind.Short, JavaKind.Char, JavaKind.Float, JavaKind.Double});
- registerUnsafePlugins(invocationPlugins, replacementsBytecodeProvider, explicitUnsafeNullChecks);
- registerStringPlugins(invocationPlugins, replacementsBytecodeProvider);
+ registerUnsafePlugins(invocationPlugins, replacements, explicitUnsafeNullChecks);
+ registerStringPlugins(invocationPlugins, replacements);
if (emitJDK9StringSubstitutions) {
- registerStringLatin1Plugins(invocationPlugins, replacementsBytecodeProvider);
- registerStringUTF16Plugins(invocationPlugins, replacementsBytecodeProvider);
+ registerStringLatin1Plugins(invocationPlugins, replacements);
+ registerStringUTF16Plugins(invocationPlugins, replacements);
}
- registerMathPlugins(invocationPlugins, useFMAIntrinsics, arch, replacementsBytecodeProvider);
- registerArraysEqualsPlugins(invocationPlugins, replacementsBytecodeProvider);
+ registerMathPlugins(invocationPlugins, useFMAIntrinsics, arch, replacements);
+ registerArraysEqualsPlugins(invocationPlugins, replacements);
}
});
}
@@ -103,72 +102,37 @@
private static void registerThreadPlugins(InvocationPlugins plugins, AMD64 arch) {
if (JavaVersionUtil.JAVA_SPEC > 8) {
// Pause instruction introduced with SSE2
- if (arch.getFeatures().contains(AMD64.CPUFeature.SSE2)) {
- Registration r = new Registration(plugins, Thread.class);
- r.register0("onSpinWait", new InvocationPlugin() {
- @Override
- public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
- b.append(new PauseNode());
- return true;
- }
- });
- }
- }
- }
-
- private static void registerIntegerLongPlugins(InvocationPlugins plugins, Class<?> substituteDeclaringClass, JavaKind kind, AMD64 arch, BytecodeProvider bytecodeProvider) {
- Class<?> declaringClass = kind.toBoxedJavaClass();
- Class<?> type = kind.toJavaClass();
- Registration r = new Registration(plugins, declaringClass, bytecodeProvider);
- r.registerMethodSubstitution(substituteDeclaringClass, "numberOfLeadingZeros", type);
- if (arch.getFeatures().contains(AMD64.CPUFeature.LZCNT) && arch.getFlags().contains(AMD64.Flag.UseCountLeadingZerosInstruction)) {
- r.setAllowOverwrite(true);
- r.register1("numberOfLeadingZeros", type, new InvocationPlugin() {
+ assert (arch.getFeatures().contains(AMD64.CPUFeature.SSE2));
+ Registration r = new Registration(plugins, Thread.class);
+ r.register0("onSpinWait", new InvocationPlugin() {
@Override
- public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
- ValueNode folded = AMD64CountLeadingZerosNode.tryFold(value);
- if (folded != null) {
- b.addPush(JavaKind.Int, folded);
- } else {
- b.addPush(JavaKind.Int, new AMD64CountLeadingZerosNode(value));
- }
+ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
+ b.append(new PauseNode());
return true;
}
});
}
-
- r.registerMethodSubstitution(substituteDeclaringClass, "numberOfTrailingZeros", type);
- if (arch.getFeatures().contains(AMD64.CPUFeature.BMI1) && arch.getFlags().contains(AMD64.Flag.UseCountTrailingZerosInstruction)) {
- r.setAllowOverwrite(true);
- r.register1("numberOfTrailingZeros", type, new InvocationPlugin() {
-
- @Override
- public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
- ValueNode folded = AMD64CountTrailingZerosNode.tryFold(value);
- if (folded != null) {
- b.addPush(JavaKind.Int, folded);
- } else {
- b.addPush(JavaKind.Int, new AMD64CountTrailingZerosNode(value));
- }
- return true;
- }
- });
- }
-
- if (arch.getFeatures().contains(AMD64.CPUFeature.POPCNT)) {
- r.register1("bitCount", type, new InvocationPlugin() {
- @Override
- public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
- b.push(JavaKind.Int, b.append(new BitCountNode(value).canonical(null)));
- return true;
- }
- });
- }
-
}
- private static void registerMathPlugins(InvocationPlugins plugins, boolean useFMAIntrinsics, AMD64 arch, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Math.class, bytecodeProvider);
+ private static void registerIntegerLongPlugins(InvocationPlugins plugins, Class<?> substituteDeclaringClass, JavaKind kind, AMD64 arch, Replacements replacements) {
+ Class<?> declaringClass = kind.toBoxedJavaClass();
+ Class<?> type = kind.toJavaClass();
+ Registration r = new Registration(plugins, declaringClass, replacements);
+ r.registerMethodSubstitution(substituteDeclaringClass, "numberOfLeadingZeros", type);
+ r.registerMethodSubstitution(substituteDeclaringClass, "numberOfTrailingZeros", type);
+
+ r.registerConditional1(arch.getFeatures().contains(AMD64.CPUFeature.POPCNT),
+ "bitCount", type, new InvocationPlugin() {
+ @Override
+ public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode value) {
+ b.push(JavaKind.Int, b.append(new BitCountNode(value).canonical(null)));
+ return true;
+ }
+ });
+ }
+
+ private static void registerMathPlugins(InvocationPlugins plugins, boolean useFMAIntrinsics, AMD64 arch, Replacements replacements) {
+ Registration r = new Registration(plugins, Math.class, replacements);
registerUnaryMath(r, "log", LOG);
registerUnaryMath(r, "log10", LOG10);
registerUnaryMath(r, "exp", EXP);
@@ -177,19 +141,18 @@
registerUnaryMath(r, "cos", COS);
registerUnaryMath(r, "tan", TAN);
- if (arch.getFeatures().contains(CPUFeature.SSE4_1)) {
- registerRound(r, "rint", RoundingMode.NEAREST);
- registerRound(r, "ceil", RoundingMode.UP);
- registerRound(r, "floor", RoundingMode.DOWN);
- }
+ boolean roundEnabled = arch.getFeatures().contains(CPUFeature.SSE4_1);
+ registerRound(roundEnabled, r, "rint", RoundingMode.NEAREST);
+ registerRound(roundEnabled, r, "ceil", RoundingMode.UP);
+ registerRound(roundEnabled, r, "floor", RoundingMode.DOWN);
- if (useFMAIntrinsics && JavaVersionUtil.JAVA_SPEC > 8 && arch.getFeatures().contains(CPUFeature.FMA)) {
- registerFMA(r);
+ if (JavaVersionUtil.JAVA_SPEC > 8) {
+ registerFMA(r, useFMAIntrinsics && arch.getFeatures().contains(CPUFeature.FMA));
}
}
- private static void registerFMA(Registration r) {
- r.register3("fma",
+ private static void registerFMA(Registration r, boolean isEnabled) {
+ r.registerConditional3(isEnabled, "fma",
Double.TYPE,
Double.TYPE,
Double.TYPE,
@@ -205,7 +168,7 @@
return true;
}
});
- r.register3("fma",
+ r.registerConditional3(isEnabled, "fma",
Float.TYPE,
Float.TYPE,
Float.TYPE,
@@ -243,8 +206,8 @@
});
}
- private static void registerRound(Registration r, String name, RoundingMode mode) {
- r.register1(name, Double.TYPE, new InvocationPlugin() {
+ private static void registerRound(boolean isEnabled, Registration r, String name, RoundingMode mode) {
+ r.registerConditional1(isEnabled, name, Double.TYPE, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg) {
b.push(JavaKind.Double, b.append(new AMD64RoundNode(arg, mode)));
@@ -253,10 +216,10 @@
});
}
- private static void registerStringPlugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
+ private static void registerStringPlugins(InvocationPlugins plugins, Replacements replacements) {
if (JavaVersionUtil.JAVA_SPEC <= 8) {
Registration r;
- r = new Registration(plugins, String.class, replacementsBytecodeProvider);
+ r = new Registration(plugins, String.class, replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(AMD64StringSubstitutions.class, "indexOf", char[].class, int.class,
int.class, char[].class, int.class, int.class, int.class);
@@ -265,8 +228,8 @@
}
}
- private static void registerStringLatin1Plugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
- Registration r = new Registration(plugins, "java.lang.StringLatin1", replacementsBytecodeProvider);
+ private static void registerStringLatin1Plugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, "java.lang.StringLatin1", replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(AMD64StringLatin1Substitutions.class, "compareTo", byte[].class, byte[].class);
r.registerMethodSubstitution(AMD64StringLatin1Substitutions.class, "compareToUTF16", byte[].class, byte[].class);
@@ -276,8 +239,8 @@
r.registerMethodSubstitution(AMD64StringLatin1Substitutions.class, "indexOf", byte[].class, int.class, byte[].class, int.class, int.class);
}
- private static void registerStringUTF16Plugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider) {
- Registration r = new Registration(plugins, "java.lang.StringUTF16", replacementsBytecodeProvider);
+ private static void registerStringUTF16Plugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, "java.lang.StringUTF16", replacements);
r.setAllowOverwrite(true);
r.registerMethodSubstitution(AMD64StringUTF16Substitutions.class, "compareTo", byte[].class, byte[].class);
r.registerMethodSubstitution(AMD64StringUTF16Substitutions.class, "compareToLatin1", byte[].class, byte[].class);
@@ -288,10 +251,10 @@
r.registerMethodSubstitution(AMD64StringUTF16Substitutions.class, "indexOfLatin1Unsafe", byte[].class, int.class, byte[].class, int.class, int.class);
}
- private static void registerUnsafePlugins(InvocationPlugins plugins, BytecodeProvider replacementsBytecodeProvider, boolean explicitUnsafeNullChecks) {
+ private static void registerUnsafePlugins(InvocationPlugins plugins, Replacements replacements, boolean explicitUnsafeNullChecks) {
registerUnsafePlugins(new Registration(plugins, Unsafe.class), explicitUnsafeNullChecks, new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object}, true);
if (JavaVersionUtil.JAVA_SPEC > 8) {
- registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", replacementsBytecodeProvider), explicitUnsafeNullChecks,
+ registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", replacements), explicitUnsafeNullChecks,
new JavaKind[]{JavaKind.Boolean, JavaKind.Byte, JavaKind.Char, JavaKind.Short, JavaKind.Int, JavaKind.Long, JavaKind.Object},
JavaVersionUtil.JAVA_SPEC <= 11);
}
@@ -330,8 +293,8 @@
}
}
- private static void registerArraysEqualsPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Arrays.class, bytecodeProvider);
+ private static void registerArraysEqualsPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, Arrays.class, replacements);
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", float[].class, float[].class);
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", double[].class, double[].class);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64IntegerSubstitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.replacements.amd64;
+
+import static org.graalvm.compiler.replacements.NodeIntrinsificationProvider.INJECTED_TARGET;
+
+import org.graalvm.compiler.api.replacements.ClassSubstitution;
+import org.graalvm.compiler.api.replacements.Fold;
+import org.graalvm.compiler.api.replacements.MethodSubstitution;
+import org.graalvm.compiler.core.common.SuppressFBWarnings;
+import org.graalvm.compiler.replacements.nodes.BitScanForwardNode;
+import org.graalvm.compiler.replacements.nodes.BitScanReverseNode;
+
+import jdk.vm.ci.amd64.AMD64;
+import jdk.vm.ci.code.TargetDescription;
+
+@ClassSubstitution(Integer.class)
+public class AMD64IntegerSubstitutions {
+
+ @Fold
+ static boolean lzcnt(@Fold.InjectedParameter TargetDescription target) {
+ AMD64 arch = (AMD64) target.arch;
+ return arch.getFeatures().contains(AMD64.CPUFeature.LZCNT) && arch.getFlags().contains(AMD64.Flag.UseCountLeadingZerosInstruction);
+ }
+
+ @Fold
+ static boolean tzcnt(@Fold.InjectedParameter TargetDescription target) {
+ AMD64 arch = (AMD64) target.arch;
+ return arch.getFeatures().contains(AMD64.CPUFeature.BMI1) && arch.getFlags().contains(AMD64.Flag.UseCountTrailingZerosInstruction);
+ }
+
+ @MethodSubstitution
+ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL", justification = "foldable method parameters are injected")
+ public static int numberOfLeadingZeros(int i) {
+ if (lzcnt(INJECTED_TARGET)) {
+ return AMD64CountLeadingZerosNode.countLeadingZeros(i);
+ }
+ if (i == 0) {
+ return 32;
+ }
+ return 31 - BitScanReverseNode.unsafeScan(i);
+ }
+
+ @MethodSubstitution
+ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL", justification = "foldable method parameters are injected")
+ public static int numberOfTrailingZeros(int i) {
+ if (tzcnt(INJECTED_TARGET)) {
+ return AMD64CountTrailingZerosNode.countTrailingZeros(i);
+ }
+ if (i == 0) {
+ return 32;
+ }
+ return BitScanForwardNode.unsafeScan(i);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64LongSubstitutions.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.compiler.replacements.amd64;
+
+// JaCoCo Exclude
+
+import static org.graalvm.compiler.replacements.NodeIntrinsificationProvider.INJECTED_TARGET;
+
+import org.graalvm.compiler.api.replacements.ClassSubstitution;
+import org.graalvm.compiler.api.replacements.Fold;
+import org.graalvm.compiler.api.replacements.MethodSubstitution;
+import org.graalvm.compiler.core.common.SuppressFBWarnings;
+import org.graalvm.compiler.replacements.nodes.BitScanForwardNode;
+import org.graalvm.compiler.replacements.nodes.BitScanReverseNode;
+
+import jdk.vm.ci.amd64.AMD64;
+import jdk.vm.ci.code.TargetDescription;
+
+@ClassSubstitution(Long.class)
+public class AMD64LongSubstitutions {
+
+ @Fold
+ static boolean lzcnt(@Fold.InjectedParameter TargetDescription target) {
+ AMD64 arch = (AMD64) target.arch;
+ return arch.getFeatures().contains(AMD64.CPUFeature.LZCNT) && arch.getFlags().contains(AMD64.Flag.UseCountLeadingZerosInstruction);
+ }
+
+ @Fold
+ static boolean tzcnt(@Fold.InjectedParameter TargetDescription target) {
+ AMD64 arch = (AMD64) target.arch;
+ return arch.getFeatures().contains(AMD64.CPUFeature.BMI1) && arch.getFlags().contains(AMD64.Flag.UseCountTrailingZerosInstruction);
+ }
+
+ @MethodSubstitution
+ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL", justification = "foldable method parameters are injected")
+ public static int numberOfLeadingZeros(long i) {
+ if (lzcnt(INJECTED_TARGET)) {
+ return AMD64CountLeadingZerosNode.countLeadingZeros(i);
+ }
+ if (i == 0) {
+ return 64;
+ }
+ return 63 - BitScanReverseNode.unsafeScan(i);
+ }
+
+ @MethodSubstitution
+ @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL", justification = "foldable method parameters are injected")
+ public static int numberOfTrailingZeros(long i) {
+ if (tzcnt(INJECTED_TARGET)) {
+ return AMD64CountTrailingZerosNode.countTrailingZeros(i);
+ }
+
+ if (i == 0) {
+ return 64;
+ }
+ return BitScanForwardNode.unsafeScan(i);
+ }
+}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1InflateNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringLatin1InflateNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -82,7 +82,7 @@
}
@Override
- public LocationIdentity[] getLocationIdentities() {
+ public LocationIdentity[] getKilledLocationIdentities() {
// Model write access via 'dst' using:
return new LocationIdentity[]{NamedLocationIdentity.getArrayLocation(writeKind)};
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16CompressNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64StringUTF16CompressNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -82,7 +82,7 @@
}
@Override
- public LocationIdentity[] getLocationIdentities() {
+ public LocationIdentity[] getKilledLocationIdentities() {
// Model write access via 'dst' using:
return new LocationIdentity[]{NamedLocationIdentity.getArrayLocation(JavaKind.Byte)};
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.jdk9.test/src/org/graalvm/compiler/replacements/jdk9/test/VarHandleTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.jdk9.test/src/org/graalvm/compiler/replacements/jdk9/test/VarHandleTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -162,12 +162,12 @@
startNodes++;
} else if (n instanceof MemoryCheckpoint.Single) {
MemoryCheckpoint.Single single = (MemoryCheckpoint.Single) n;
- if (single.getLocationIdentity().isAny()) {
+ if (single.getKilledLocationIdentity().isAny()) {
anyKillCount++;
}
} else if (n instanceof MemoryCheckpoint.Multi) {
MemoryCheckpoint.Multi multi = (MemoryCheckpoint.Multi) n;
- for (LocationIdentity loc : multi.getLocationIdentities()) {
+ for (LocationIdentity loc : multi.getKilledLocationIdentities()) {
if (loc.isAny()) {
anyKillCount++;
break;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.sparc/src/org/graalvm/compiler/replacements/sparc/SPARCGraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,13 +32,13 @@
import static org.graalvm.compiler.replacements.nodes.UnaryMathIntrinsicNode.UnaryOperation.SIN;
import static org.graalvm.compiler.replacements.nodes.UnaryMathIntrinsicNode.UnaryOperation.TAN;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.nodes.ValueNode;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderContext;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugin;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins;
import org.graalvm.compiler.nodes.graphbuilderconf.InvocationPlugins.Registration;
+import org.graalvm.compiler.nodes.spi.Replacements;
import org.graalvm.compiler.replacements.IntegerSubstitutions;
import org.graalvm.compiler.replacements.LongSubstitutions;
import org.graalvm.compiler.replacements.nodes.BinaryMathIntrinsicNode;
@@ -51,26 +51,26 @@
public class SPARCGraphBuilderPlugins {
- public static void register(Plugins plugins, BytecodeProvider bytecodeProvider, boolean explicitUnsafeNullChecks) {
+ public static void register(Plugins plugins, Replacements replacements, boolean explicitUnsafeNullChecks) {
InvocationPlugins invocationPlugins = plugins.getInvocationPlugins();
invocationPlugins.defer(new Runnable() {
@Override
public void run() {
- registerIntegerLongPlugins(invocationPlugins, IntegerSubstitutions.class, JavaKind.Int, bytecodeProvider);
- registerIntegerLongPlugins(invocationPlugins, LongSubstitutions.class, JavaKind.Long, bytecodeProvider);
+ registerIntegerLongPlugins(invocationPlugins, IntegerSubstitutions.class, JavaKind.Int, replacements);
+ registerIntegerLongPlugins(invocationPlugins, LongSubstitutions.class, JavaKind.Long, replacements);
registerMathPlugins(invocationPlugins);
// This is temporarily disabled until we implement correct emitting of the CAS
// instructions of the proper width.
- registerPlatformSpecificUnsafePlugins(invocationPlugins, bytecodeProvider, explicitUnsafeNullChecks,
+ registerPlatformSpecificUnsafePlugins(invocationPlugins, replacements, explicitUnsafeNullChecks,
new JavaKind[]{JavaKind.Int, JavaKind.Long, JavaKind.Object});
}
});
}
- private static void registerIntegerLongPlugins(InvocationPlugins plugins, Class<?> substituteDeclaringClass, JavaKind kind, BytecodeProvider bytecodeProvider) {
+ private static void registerIntegerLongPlugins(InvocationPlugins plugins, Class<?> substituteDeclaringClass, JavaKind kind, Replacements replacements) {
Class<?> declaringClass = kind.toBoxedJavaClass();
Class<?> type = kind.toJavaClass();
- Registration r = new Registration(plugins, declaringClass, bytecodeProvider);
+ Registration r = new Registration(plugins, declaringClass, replacements);
r.registerMethodSubstitution(substituteDeclaringClass, "numberOfLeadingZeros", type);
r.registerMethodSubstitution(substituteDeclaringClass, "numberOfTrailingZeros", type);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ArraysSubstitutionsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,7 +31,6 @@
import org.graalvm.compiler.nodes.ReturnNode;
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.replacements.nodes.ArrayEqualsNode;
import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
@@ -132,7 +131,7 @@
StructuredGraph graph = parseEager("testCanonicalLengthSnippet", AllowAssumptions.NO);
HighTierContext context = new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL);
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
Assert.assertTrue(graph.getNodes(ReturnNode.TYPE).first().result().asJavaConstant().asLong() == 0);
}
@@ -148,7 +147,7 @@
StructuredGraph graph = parseEager("testCanonicalEqualSnippet", AllowAssumptions.NO);
HighTierContext context = new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL);
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
Assert.assertTrue(graph.getNodes(ReturnNode.TYPE).first().result().asJavaConstant().asLong() == 1);
}
@@ -162,9 +161,9 @@
StructuredGraph graph = parseEager("testVirtualEqualSnippet", AllowAssumptions.NO);
HighTierContext context = new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL);
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
- new PartialEscapePhase(false, new CanonicalizerPhase(), graph.getOptions()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ new PartialEscapePhase(false, this.createCanonicalizerPhase(), graph.getOptions()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, getProviders());
Assert.assertTrue(graph.getNodes(ReturnNode.TYPE).first().result().asJavaConstant().asLong() == 1);
}
@@ -180,9 +179,9 @@
StructuredGraph graph = parseEager("testVirtualNotEqualSnippet", AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
createInliningPhase().apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
- new PartialEscapePhase(false, new CanonicalizerPhase(), graph.getOptions()).apply(graph, context);
- new CanonicalizerPhase().apply(graph, getProviders());
+ createCanonicalizerPhase().apply(graph, getProviders());
+ new PartialEscapePhase(false, this.createCanonicalizerPhase(), graph.getOptions()).apply(graph, context);
+ createCanonicalizerPhase().apply(graph, getProviders());
Assert.assertTrue(graph.getNodes(ReturnNode.TYPE).first().result().asJavaConstant().asLong() == 0);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/BitOpNodesTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -303,7 +303,7 @@
private ValueNode parseAndInline(String name, Class<? extends ValueNode> expectedClass) {
StructuredGraph graph = parseEager(name, AllowAssumptions.YES);
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
canonicalizer.apply(graph, context);
createInliningPhase(canonicalizer).apply(graph, context);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/DeoptimizeOnExceptionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -35,7 +35,7 @@
import org.graalvm.compiler.options.OptionValues;
import org.graalvm.compiler.phases.common.AbstractInliningPhase;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
-import org.graalvm.compiler.test.ExportingClassLoader;
+import org.graalvm.compiler.api.test.ExportingClassLoader;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/EdgesTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,6 @@
import org.graalvm.compiler.nodes.calc.FloatingNode;
import org.graalvm.compiler.nodes.java.InstanceOfNode;
import org.graalvm.compiler.options.OptionValues;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.inlining.InliningPhase;
import org.graalvm.compiler.phases.common.inlining.policy.InlineMethodSubstitutionsPolicy;
import org.graalvm.compiler.phases.tiers.HighTierContext;
@@ -133,8 +132,8 @@
ResolvedJavaMethod javaMethod = getMetaAccess().lookupJavaMethod(method);
StructuredGraph g = parseProfiled(javaMethod, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
- new InliningPhase(new InlineMethodSubstitutionsPolicy(), new CanonicalizerPhase()).apply(g, context);
- new CanonicalizerPhase().apply(g, context);
+ new InliningPhase(new InlineMethodSubstitutionsPolicy(), createCanonicalizerPhase()).apply(g, context);
+ this.createCanonicalizerPhase().apply(g, context);
Assert.assertTrue(g.getNodes().filter(InstanceOfNode.class).isEmpty());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/FoldTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -81,10 +81,10 @@
@Override
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
- InjectionProvider injection = new NodeIntrinsificationProvider(getMetaAccess(), getSnippetReflection(), getProviders().getForeignCalls(), null);
+ InjectionProvider injection = new NodeIntrinsificationProvider(getMetaAccess(), getSnippetReflection(), getProviders().getForeignCalls(), null, getTarget());
new PluginFactory_FoldTest().registerPlugins(invocationPlugins, injection);
BytecodeProvider replacementBytecodeProvider = getSystemClassLoaderBytecodeProvider();
- Registration r = new Registration(invocationPlugins, TestMethod.class, replacementBytecodeProvider);
+ Registration r = new Registration(invocationPlugins, TestMethod.class, getReplacements(), replacementBytecodeProvider);
r.registerMethodSubstitution(TestMethodSubstitution.class, "test");
super.registerInvocationPlugins(invocationPlugins);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactFoldTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/IntegerExactFoldTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -94,7 +94,7 @@
Node originalNode = graph.getNodes().filter(x -> x instanceof IntegerExactArithmeticNode).first();
assertNotNull("original node must be in the graph", originalNode);
- new CanonicalizerPhase().apply(graph, getDefaultHighTierContext());
+ createCanonicalizerPhase().apply(graph, getDefaultHighTierContext());
ValueNode node = findNode(graph);
boolean overflowExpected = node instanceof IntegerExactArithmeticNode;
@@ -109,19 +109,19 @@
Node originalNode = graph.getNodes().filter(x -> x instanceof IntegerExactArithmeticNode).first();
assertNotNull("original node must be in the graph", originalNode);
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
HighTierContext highTierContext = getDefaultHighTierContext();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
MidTierContext midTierContext = getDefaultMidTierContext();
new GuardLoweringPhase().apply(graph, midTierContext);
- new CanonicalizerPhase().apply(graph, midTierContext);
+ createCanonicalizerPhase().apply(graph, midTierContext);
IntegerExactArithmeticSplitNode loweredNode = graph.getNodes().filter(IntegerExactArithmeticSplitNode.class).first();
assertNotNull("the lowered node must be in the graph", loweredNode);
loweredNode.getX().setStamp(StampFactory.forInteger(bits, lowerBoundA, upperBoundA));
loweredNode.getY().setStamp(StampFactory.forInteger(bits, lowerBoundB, upperBoundB));
- new CanonicalizerPhase().apply(graph, midTierContext);
+ createCanonicalizerPhase().apply(graph, midTierContext);
ValueNode node = findNode(graph);
boolean overflowExpected = node instanceof IntegerExactArithmeticSplitNode;
@@ -144,7 +144,7 @@
String snippet = "snippetInt" + bits;
StructuredGraph graph = parseEager(getResolvedJavaMethod(operation.getClass(), snippet), AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -25,6 +25,7 @@
package org.graalvm.compiler.replacements.test;
import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
import org.graalvm.compiler.api.replacements.MethodSubstitution;
import org.graalvm.compiler.core.test.GraalCompilerTest;
@@ -35,7 +36,6 @@
import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
import org.graalvm.compiler.nodes.java.MethodCallTargetNode;
import org.graalvm.compiler.nodes.spi.LoweringTool;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.common.DeadCodeEliminationPhase;
import org.graalvm.compiler.phases.common.LoweringPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
@@ -78,14 +78,14 @@
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
createInliningPhase().apply(graph, context);
debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph");
- new CanonicalizerPhase().apply(graph, context);
+ createCanonicalizerPhase().apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
// Try to ensure any macro nodes are lowered to expose any resulting invokes
if (graph.getNodes().filter(MacroNode.class).isNotEmpty()) {
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
+ new LoweringPhase(this.createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
}
if (graph.getNodes().filter(MacroNode.class).isNotEmpty()) {
- new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, context);
+ new LoweringPhase(this.createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.MID_TIER).apply(graph, context);
}
assertNotInGraph(graph, MacroNode.class);
if (name != null) {
@@ -153,13 +153,20 @@
}
}
- protected static StructuredGraph assertInGraph(StructuredGraph graph, Class<?> clazz) {
+ protected static StructuredGraph assertInGraph(StructuredGraph graph, Class<?>... clazzes) {
for (Node node : graph.getNodes()) {
- if (clazz.isInstance(node)) {
- return graph;
+ for (Class<?> clazz : clazzes) {
+ if (clazz.isInstance(node)) {
+ return graph;
+ }
}
}
- fail("Graph does not contain a node of class " + clazz.getName());
+ if (clazzes.length == 1) {
+ fail("Graph does not contain a node of class " + clazzes[0].getName());
+ } else {
+ fail("Graph does not contain a node of one these classes class " + Arrays.toString(clazzes));
+
+ }
return graph;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ObjectAccessTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -130,7 +130,7 @@
Assert.assertEquals(graph.getParameter(0), address.getBase());
Assert.assertEquals(BytecodeFrame.AFTER_BCI, write.stateAfter().bci);
- Assert.assertEquals(locationIdentity, write.getLocationIdentity());
+ Assert.assertEquals(locationIdentity, write.getKilledLocationIdentity());
if (indexConvert) {
SignExtendNode convert = (SignExtendNode) address.getOffset();
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -46,7 +46,6 @@
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
import org.graalvm.compiler.nodes.spi.CoreProviders;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.replacements.CachingPEGraphDecoder;
import jdk.internal.vm.compiler.word.LocationIdentity;
import org.junit.Test;
@@ -146,7 +145,7 @@
targetGraph.verify();
CoreProviders context = getProviders();
- new CanonicalizerPhase().apply(targetGraph, context);
+ createCanonicalizerPhase().apply(targetGraph, context);
targetGraph.verify();
} catch (Throwable ex) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PointerTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,6 @@
import org.graalvm.compiler.nodes.extended.JavaWriteNode;
import org.graalvm.compiler.nodes.memory.address.OffsetAddressNode;
import org.graalvm.compiler.phases.OptimisticOptimizations;
-import org.graalvm.compiler.phases.common.CanonicalizerPhase;
import org.graalvm.compiler.phases.tiers.HighTierContext;
import org.graalvm.compiler.word.Word;
import org.graalvm.compiler.word.WordCastNode;
@@ -150,7 +149,7 @@
Assert.assertEquals(graph.getParameter(0), cast.getInput());
Assert.assertEquals(target.wordJavaKind, cast.stamp(NodeView.DEFAULT).getStackKind());
- Assert.assertEquals(locationIdentity, write.getLocationIdentity());
+ Assert.assertEquals(locationIdentity, write.getKilledLocationIdentity());
if (indexConvert) {
SignExtendNode convert = (SignExtendNode) address.getOffset();
@@ -409,7 +408,7 @@
HighTierContext context = new HighTierContext(getProviders(), null, OptimisticOptimizations.ALL);
StructuredGraph graph = parseEager(snippetName, AllowAssumptions.YES);
- new CanonicalizerPhase().apply(graph, context);
+ this.createCanonicalizerPhase().apply(graph, context);
Assert.assertEquals(expectedWordCasts, graph.getNodes().filter(WordCastNode.class).count());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/ReplacementsParseTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -318,7 +318,7 @@
@Override
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
BytecodeProvider replacementBytecodeProvider = getSystemClassLoaderBytecodeProvider();
- Registration r = new Registration(invocationPlugins, TestObject.class, replacementBytecodeProvider);
+ Registration r = new Registration(invocationPlugins, TestObject.class, getReplacements(), replacementBytecodeProvider);
NodeIntrinsicPluginFactory.InjectionProvider injections = new DummyInjectionProvider();
new PluginFactory_ReplacementsParseTest().registerPlugins(invocationPlugins, injections);
r.registerMethodSubstitution(TestObjectSubstitutions.class, "nextAfter", double.class, double.class);
@@ -634,7 +634,7 @@
node.remove();
}
HighTierContext context = getDefaultHighTierContext();
- CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
+ CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
new FloatingReadPhase().apply(graph);
canonicalizer.apply(graph, context);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/StandardMethodSubstitutionsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,6 +31,8 @@
import org.graalvm.compiler.nodes.StructuredGraph;
import org.graalvm.compiler.nodes.calc.AbsNode;
import org.graalvm.compiler.nodes.calc.ReinterpretNode;
+import org.graalvm.compiler.replacements.amd64.AMD64CountLeadingZerosNode;
+import org.graalvm.compiler.replacements.amd64.AMD64CountTrailingZerosNode;
import org.graalvm.compiler.replacements.nodes.BitCountNode;
import org.graalvm.compiler.replacements.nodes.BitScanForwardNode;
import org.graalvm.compiler.replacements.nodes.BitScanReverseNode;
@@ -132,7 +134,7 @@
return Math.sqrt(value) + Math.log(value) + Math.log10(value) + Math.sin(value) + Math.cos(value) + Math.tan(value);
}
- public void testSubstitution(String testMethodName, Class<?> intrinsicClass, Class<?> holder, String methodName, boolean optional, Object... args) {
+ public void testSubstitution(String testMethodName, Class<?> holder, String methodName, boolean optional, Object[] args, Class<?>... intrinsicClasses) {
ResolvedJavaMethod realJavaMethod = getResolvedJavaMethod(holder, methodName);
ResolvedJavaMethod testJavaMethod = getResolvedJavaMethod(testMethodName);
StructuredGraph graph = testGraph(testMethodName);
@@ -140,7 +142,7 @@
// Check to see if the resulting graph contains the expected node
StructuredGraph replacement = getReplacements().getSubstitution(realJavaMethod, -1, false, null, graph.getOptions());
if (replacement == null && !optional) {
- assertInGraph(graph, intrinsicClass);
+ assertInGraph(graph, intrinsicClasses);
}
for (Object l : args) {
@@ -159,7 +161,7 @@
public void testCharSubstitutions() {
Object[] args = new Character[]{Character.MIN_VALUE, (char) -1, (char) 0, (char) 1, Character.MAX_VALUE};
- testSubstitution("charReverseBytes", ReverseBytesNode.class, Character.class, "reverseBytes", false, args);
+ testSubstitution("charReverseBytes", Character.class, "reverseBytes", false, args, ReverseBytesNode.class);
}
public static char charReverseBytes(char value) {
@@ -183,7 +185,7 @@
public void testShortSubstitutions() {
Object[] args = new Short[]{Short.MIN_VALUE, -1, 0, 1, Short.MAX_VALUE};
- testSubstitution("shortReverseBytes", ReverseBytesNode.class, Short.class, "reverseBytes", false, args);
+ testSubstitution("shortReverseBytes", Short.class, "reverseBytes", false, args, ReverseBytesNode.class);
}
public static short shortReverseBytes(short value) {
@@ -207,10 +209,10 @@
public void testIntegerSubstitutions() {
Object[] args = new Object[]{Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE};
- testSubstitution("integerReverseBytes", ReverseBytesNode.class, Integer.class, "reverseBytes", false, args);
- testSubstitution("integerNumberOfLeadingZeros", BitScanReverseNode.class, Integer.class, "numberOfLeadingZeros", true, args);
- testSubstitution("integerNumberOfTrailingZeros", BitScanForwardNode.class, Integer.class, "numberOfTrailingZeros", false, args);
- testSubstitution("integerBitCount", BitCountNode.class, Integer.class, "bitCount", true, args);
+ testSubstitution("integerReverseBytes", Integer.class, "reverseBytes", false, args, ReverseBytesNode.class);
+ testSubstitution("integerNumberOfLeadingZeros", Integer.class, "numberOfLeadingZeros", true, args, BitScanReverseNode.class, AMD64CountLeadingZerosNode.class);
+ testSubstitution("integerNumberOfTrailingZeros", Integer.class, "numberOfTrailingZeros", false, args, BitScanForwardNode.class, AMD64CountTrailingZerosNode.class);
+ testSubstitution("integerBitCount", Integer.class, "bitCount", true, args, BitCountNode.class);
}
public static int integerReverseBytes(int value) {
@@ -233,10 +235,10 @@
public void testLongSubstitutions() {
Object[] args = new Object[]{Long.MIN_VALUE, -1L, 0L, 1L, Long.MAX_VALUE};
- testSubstitution("longReverseBytes", ReverseBytesNode.class, Long.class, "reverseBytes", false, args);
- testSubstitution("longNumberOfLeadingZeros", BitScanReverseNode.class, Long.class, "numberOfLeadingZeros", true, args);
- testSubstitution("longNumberOfTrailingZeros", BitScanForwardNode.class, Long.class, "numberOfTrailingZeros", false, args);
- testSubstitution("longBitCount", BitCountNode.class, Long.class, "bitCount", true, args);
+ testSubstitution("longReverseBytes", Long.class, "reverseBytes", false, args, ReverseBytesNode.class);
+ testSubstitution("longNumberOfLeadingZeros", Long.class, "numberOfLeadingZeros", true, args, BitScanReverseNode.class, AMD64CountLeadingZerosNode.class);
+ testSubstitution("longNumberOfTrailingZeros", Long.class, "numberOfTrailingZeros", false, args, BitScanForwardNode.class, AMD64CountTrailingZerosNode.class);
+ testSubstitution("longBitCount", Long.class, "bitCount", true, args, BitCountNode.class);
}
public static long longReverseBytes(long value) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionNodeSourcePositionTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionNodeSourcePositionTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -84,7 +84,7 @@
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
new PluginFactory_SubstitutionNodeSourcePositionTest().registerPlugins(invocationPlugins, null);
ClassfileBytecodeProvider bytecodeProvider = getSystemClassLoaderBytecodeProvider();
- InvocationPlugins.Registration r = new InvocationPlugins.Registration(invocationPlugins, TestMethod.class, bytecodeProvider);
+ InvocationPlugins.Registration r = new InvocationPlugins.Registration(invocationPlugins, TestMethod.class, getReplacements(), bytecodeProvider);
r.registerMethodSubstitution(TestMethodSubstitution.class, "test", int.class);
super.registerInvocationPlugins(invocationPlugins);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/SubstitutionsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -120,7 +120,7 @@
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
new PluginFactory_SubstitutionsTest().registerPlugins(invocationPlugins, null);
ClassfileBytecodeProvider bytecodeProvider = getSystemClassLoaderBytecodeProvider();
- Registration r = new Registration(invocationPlugins, TestMethod.class, bytecodeProvider);
+ Registration r = new Registration(invocationPlugins, TestMethod.class, getReplacements(), bytecodeProvider);
r.registerMethodSubstitution(TestMethodSubstitution.class, "test");
super.registerInvocationPlugins(invocationPlugins);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/ClassfileBytecodeProviderTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -104,7 +104,7 @@
import org.graalvm.compiler.replacements.classfile.ClassfileBytecodeProvider;
import org.graalvm.compiler.runtime.RuntimeProvider;
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
-import org.graalvm.compiler.test.ModuleSupport;
+import org.graalvm.compiler.api.test.ModuleSupport;
import org.graalvm.compiler.test.SubprocessUtil;
import org.junit.Assert;
import org.junit.Assume;
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/classfile/RedefineIntrinsicTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -87,7 +87,7 @@
@Override
protected void registerInvocationPlugins(InvocationPlugins invocationPlugins) {
BytecodeProvider replacementBytecodeProvider = getSystemClassLoaderBytecodeProvider();
- Registration r = new Registration(invocationPlugins, Original.class, replacementBytecodeProvider);
+ Registration r = new Registration(invocationPlugins, Original.class, getReplacements(), replacementBytecodeProvider);
r.registerMethodSubstitution(Intrinsic.class, "getValue");
super.registerInvocationPlugins(invocationPlugins);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/CachingPEGraphDecoder.java Thu Nov 07 18:44:09 2019 +0000
@@ -132,7 +132,7 @@
: null;
GraphBuilderPhase.Instance graphBuilderPhaseInstance = createGraphBuilderPhaseInstance(initialIntrinsicContext);
graphBuilderPhaseInstance.apply(graphToEncode);
- new CanonicalizerPhase().apply(graphToEncode, providers);
+ CanonicalizerPhase.create().apply(graphToEncode, providers);
if (postParsingPhase != null) {
postParsingPhase.apply(graphToEncode, providers);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/DefaultJavaLoweringProvider.java Thu Nov 07 18:44:09 2019 +0000
@@ -47,6 +47,7 @@
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.api.replacements.Snippet;
import org.graalvm.compiler.api.replacements.SnippetReflectionProvider;
+import org.graalvm.compiler.core.common.GraalOptions;
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.spi.ForeignCallsProvider;
import org.graalvm.compiler.core.common.type.AbstractPointerStamp;
@@ -129,6 +130,7 @@
import org.graalvm.compiler.nodes.java.ValueCompareAndSwapNode;
import org.graalvm.compiler.nodes.memory.HeapAccess.BarrierType;
import org.graalvm.compiler.nodes.memory.ReadNode;
+import org.graalvm.compiler.nodes.memory.VolatileReadNode;
import org.graalvm.compiler.nodes.memory.WriteNode;
import org.graalvm.compiler.nodes.memory.address.AddressNode;
import org.graalvm.compiler.nodes.memory.address.IndexAddressNode;
@@ -397,12 +399,17 @@
AddressNode address = createFieldAddress(graph, object, field);
assert address != null : "Field that is loaded must not be eliminated: " + field.getDeclaringClass().toJavaName(true) + "." + field.getName();
- ReadNode memoryRead = graph.add(new ReadNode(address, fieldLocationIdentity(field), loadStamp, fieldLoadBarrierType(field)));
+ ReadNode memoryRead = null;
+ if (loadField.isVolatile() && GraalOptions.LateMembars.getValue(graph.getOptions())) {
+ memoryRead = graph.add(new VolatileReadNode(address, fieldLocationIdentity(field), loadStamp, fieldLoadBarrierType(field)));
+ } else {
+ memoryRead = graph.add(new ReadNode(address, fieldLocationIdentity(field), loadStamp, fieldLoadBarrierType(field)));
+ }
ValueNode readValue = implicitLoadConvert(graph, getStorageKind(field), memoryRead);
loadField.replaceAtUsages(readValue);
graph.replaceFixed(loadField, memoryRead);
- if (loadField.isVolatile()) {
+ if (loadField.isVolatile() && !GraalOptions.LateMembars.getValue(graph.getOptions())) {
MembarNode preMembar = graph.add(new MembarNode(JMM_PRE_VOLATILE_READ));
graph.addBeforeFixed(memoryRead, preMembar);
MembarNode postMembar = graph.add(new MembarNode(JMM_POST_VOLATILE_READ));
@@ -419,11 +426,11 @@
AddressNode address = createFieldAddress(graph, object, field);
assert address != null;
- WriteNode memoryWrite = graph.add(new WriteNode(address, fieldLocationIdentity(field), value, fieldStoreBarrierType(storeField.field())));
+ WriteNode memoryWrite = graph.add(new WriteNode(address, fieldLocationIdentity(field), value, fieldStoreBarrierType(storeField.field()), storeField.isVolatile()));
memoryWrite.setStateAfter(storeField.stateAfter());
graph.replaceFixedWithFixed(storeField, memoryWrite);
- if (storeField.isVolatile()) {
+ if (storeField.isVolatile() && !GraalOptions.LateMembars.getValue(graph.getOptions())) {
MembarNode preMembar = graph.add(new MembarNode(JMM_PRE_VOLATILE_WRITE));
graph.addBeforeFixed(memoryWrite, preMembar);
MembarNode postMembar = graph.add(new MembarNode(JMM_POST_VOLATILE_WRITE));
@@ -528,7 +535,7 @@
AddressNode address = createArrayIndexAddress(graph, array, elementKind, storeIndexed.index(), boundsCheck);
WriteNode memoryWrite = graph.add(new WriteNode(address, NamedLocationIdentity.getArrayLocation(elementKind), implicitStoreConvert(graph, elementKind, value),
- arrayStoreBarrierType(storeIndexed.elementKind())));
+ arrayStoreBarrierType(storeIndexed.elementKind()), false));
memoryWrite.setGuard(boundsCheck);
if (condition != null) {
tool.createGuard(storeIndexed, condition, DeoptimizationReason.ArrayStoreException, DeoptimizationAction.InvalidateReprofile);
@@ -623,7 +630,7 @@
AddressNode address = graph.unique(new OffsetAddressNode(cas.object(), cas.offset()));
BarrierType barrierType = guessStoreBarrierType(cas.object(), expectedValue);
- LogicCompareAndSwapNode atomicNode = graph.add(new LogicCompareAndSwapNode(address, cas.getLocationIdentity(), expectedValue, newValue, barrierType));
+ LogicCompareAndSwapNode atomicNode = graph.add(new LogicCompareAndSwapNode(address, cas.getKilledLocationIdentity(), expectedValue, newValue, barrierType));
atomicNode.setStateAfter(cas.stateAfter());
graph.replaceFixedWithFixed(cas, atomicNode);
}
@@ -637,7 +644,7 @@
AddressNode address = graph.unique(new OffsetAddressNode(cas.object(), cas.offset()));
BarrierType barrierType = guessStoreBarrierType(cas.object(), expectedValue);
- ValueCompareAndSwapNode atomicNode = graph.add(new ValueCompareAndSwapNode(address, expectedValue, newValue, cas.getLocationIdentity(), barrierType));
+ ValueCompareAndSwapNode atomicNode = graph.add(new ValueCompareAndSwapNode(address, expectedValue, newValue, cas.getKilledLocationIdentity(), barrierType));
ValueNode coercedNode = implicitLoadConvert(graph, valueKind, atomicNode, true);
atomicNode.setStateAfter(cas.stateAfter());
cas.replaceAtUsages(coercedNode);
@@ -653,7 +660,7 @@
AddressNode address = graph.unique(new OffsetAddressNode(n.object(), n.offset()));
BarrierType barrierType = guessStoreBarrierType(n.object(), n.newValue());
LIRKind lirAccessKind = LIRKind.fromJavaKind(target.arch, valueKind);
- LoweredAtomicReadAndWriteNode memoryRead = graph.add(new LoweredAtomicReadAndWriteNode(address, n.getLocationIdentity(), newValue, lirAccessKind, barrierType));
+ LoweredAtomicReadAndWriteNode memoryRead = graph.add(new LoweredAtomicReadAndWriteNode(address, n.getKilledLocationIdentity(), newValue, lirAccessKind, barrierType));
memoryRead.setStateAfter(n.stateAfter());
ValueNode readValue = implicitLoadConvert(graph, valueKind, memoryRead);
@@ -744,7 +751,7 @@
JavaKind valueKind = store.accessKind();
ValueNode value = implicitStoreConvert(graph, valueKind, store.value(), compressible);
AddressNode address = createUnsafeAddress(graph, store.object(), store.offset());
- WriteNode write = graph.add(new WriteNode(address, store.getLocationIdentity(), value, unsafeStoreBarrierType(store)));
+ WriteNode write = graph.add(new WriteNode(address, store.getKilledLocationIdentity(), value, unsafeStoreBarrierType(store), false));
write.setStateAfter(store.stateAfter());
graph.replaceFixedWithFixed(store, write);
}
@@ -755,7 +762,7 @@
JavaKind valueKind = store.getKind();
ValueNode value = implicitStoreConvert(graph, valueKind, store.getValue(), false);
AddressNode address = graph.addOrUniqueWithInputs(OffsetAddressNode.create(store.getAddress()));
- WriteNode write = graph.add(new WriteNode(address, store.getLocationIdentity(), value, BarrierType.NONE));
+ WriteNode write = graph.add(new WriteNode(address, store.getKilledLocationIdentity(), value, BarrierType.NONE, false));
write.setStateAfter(store.stateAfter());
graph.replaceFixedWithFixed(store, write);
}
@@ -782,7 +789,7 @@
protected void lowerJavaWriteNode(JavaWriteNode write) {
StructuredGraph graph = write.graph();
ValueNode value = implicitStoreConvert(graph, write.getWriteKind(), write.value(), write.isCompressible());
- WriteNode memoryWrite = graph.add(new WriteNode(write.getAddress(), write.getLocationIdentity(), value, write.getBarrierType()));
+ WriteNode memoryWrite = graph.add(new WriteNode(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType(), false));
memoryWrite.setStateAfter(write.stateAfter());
graph.replaceFixedWithFixed(write, memoryWrite);
memoryWrite.setGuard(write.getGuard());
@@ -842,7 +849,7 @@
barrierType = arrayInitializationBarrier(entryKind);
}
if (address != null) {
- WriteNode write = new WriteNode(address, LocationIdentity.init(), implicitStoreConvert(graph, entryKind, value), barrierType);
+ WriteNode write = new WriteNode(address, LocationIdentity.init(), implicitStoreConvert(graph, entryKind, value), barrierType, false);
graph.addAfterFixed(newObject, graph.add(write));
}
}
@@ -875,7 +882,7 @@
barrierType = arrayStoreBarrierType(virtual.entryKind(i));
}
if (address != null) {
- WriteNode write = new WriteNode(address, LocationIdentity.init(), implicitStoreConvert(graph, JavaKind.Object, allocValue), barrierType);
+ WriteNode write = new WriteNode(address, LocationIdentity.init(), implicitStoreConvert(graph, JavaKind.Object, allocValue), barrierType, false);
graph.addBeforeFixed(commit, graph.add(write));
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/NodeIntrinsificationProvider.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,22 +34,27 @@
import org.graalvm.compiler.replacements.arraycopy.ArrayCopyForeignCalls;
import org.graalvm.compiler.word.WordTypes;
+import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaType;
public class NodeIntrinsificationProvider implements InjectionProvider {
+ public static final TargetDescription INJECTED_TARGET = null;
+
private final MetaAccessProvider metaAccess;
private final SnippetReflectionProvider snippetReflection;
private final ForeignCallsProvider foreignCalls;
private final WordTypes wordTypes;
+ private final TargetDescription target;
- public NodeIntrinsificationProvider(MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection, ForeignCallsProvider foreignCalls, WordTypes wordTypes) {
+ public NodeIntrinsificationProvider(MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection, ForeignCallsProvider foreignCalls, WordTypes wordTypes, TargetDescription target) {
this.metaAccess = metaAccess;
this.snippetReflection = snippetReflection;
this.foreignCalls = foreignCalls;
this.wordTypes = wordTypes;
+ this.target = target;
}
@Override
@@ -78,6 +83,8 @@
return type.cast(snippetReflection);
} else if (type.equals(WordTypes.class)) {
return type.cast(wordTypes);
+ } else if (type.equals(TargetDescription.class)) {
+ return type.cast(target);
} else {
throw new GraalError("Cannot handle injected argument of type %s.", type.getName());
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/ReplacementsImpl.java Thu Nov 07 18:44:09 2019 +0000
@@ -269,11 +269,15 @@
}
@Override
- public void registerMethodSubstitution(MethodSubstitutionPlugin plugin, ResolvedJavaMethod original, IntrinsicContext.CompilationContext context, OptionValues options) {
+ public void registerMethodSubstitution(MethodSubstitutionPlugin plugin) {
// No initialization needed as method substitutions are parsed by the BytecodeParser.
}
@Override
+ public void registerConditionalPlugin(InvocationPlugin plugin) {
+ }
+
+ @Override
public boolean hasSubstitution(ResolvedJavaMethod method, int invokeBci) {
InvocationPlugin plugin = graphBuilderPlugins.getInvocationPlugins().lookupInvocation(method);
return plugin != null && (!plugin.inlineOnly() || invokeBci >= 0);
@@ -560,7 +564,7 @@
createGraphBuilder(replacements.providers, config, OptimisticOptimizations.NONE, initialIntrinsicContext).apply(graph);
- new CanonicalizerPhase().apply(graph, replacements.providers);
+ CanonicalizerPhase.create().apply(graph, replacements.providers);
} catch (Throwable e) {
throw debug.handle(e);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/SnippetTemplate.java Thu Nov 07 18:44:09 2019 +0000
@@ -891,7 +891,7 @@
}
snippetCopy.setGuardsStage(guardsStage);
try (DebugContext.Scope s = debug.scope("LoweringSnippetTemplate", snippetCopy)) {
- new LoweringPhase(new CanonicalizerPhase(), args.cacheKey.loweringStage).apply(snippetCopy, providers);
+ new LoweringPhase(CanonicalizerPhase.create(), args.cacheKey.loweringStage).apply(snippetCopy, providers);
} catch (Throwable e) {
throw debug.handle(e);
}
@@ -930,7 +930,10 @@
assert checkAllVarargPlaceholdersAreDeleted(parameterCount, placeholders);
new FloatingReadPhase(true, true).apply(snippetCopy);
- new RemoveValueProxyPhase().apply(snippetCopy);
+
+ if (!guardsStage.requiresValueProxies()) {
+ new RemoveValueProxyPhase().apply(snippetCopy);
+ }
MemoryAnchorNode anchor = snippetCopy.add(new MemoryAnchorNode());
snippetCopy.start().replaceAtUsages(InputType.Memory, anchor);
@@ -1059,8 +1062,14 @@
if (loopBegin != null) {
LoopEx loop = new LoopsData(snippetCopy).loop(loopBegin);
Mark mark = snippetCopy.getMark();
- LoopTransformations.fullUnroll(loop, providers, new CanonicalizerPhase());
- new CanonicalizerPhase().applyIncremental(snippetCopy, providers, mark, false);
+ CanonicalizerPhase canonicalizer = null;
+ if (GraalOptions.ImmutableCode.getValue(snippetCopy.getOptions())) {
+ canonicalizer = CanonicalizerPhase.createWithoutReadCanonicalization();
+ } else {
+ canonicalizer = CanonicalizerPhase.create();
+ }
+ LoopTransformations.fullUnroll(loop, providers, canonicalizer);
+ CanonicalizerPhase.create().applyIncremental(snippetCopy, providers, mark, false);
loop.deleteUnusedNodes();
}
GraphUtil.removeFixedWithUnusedInputs(explodeLoop);
@@ -1278,7 +1287,7 @@
if (replacee instanceof MemoryCheckpoint.Single) {
// check if some node in snippet graph also kills the same location
- LocationIdentity locationIdentity = ((MemoryCheckpoint.Single) replacee).getLocationIdentity();
+ LocationIdentity locationIdentity = ((MemoryCheckpoint.Single) replacee).getKilledLocationIdentity();
if (locationIdentity.isAny()) {
assert !(memoryMap.getLastLocationAccess(any()) instanceof MemoryAnchorNode) : replacee + " kills ANY_LOCATION, but snippet does not";
// if the replacee kills ANY_LOCATION, the snippet can kill arbitrary locations
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/StandardGraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -40,7 +40,6 @@
import org.graalvm.compiler.api.directives.GraalDirectives;
import org.graalvm.compiler.api.replacements.SnippetReflectionProvider;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.core.common.calc.Condition;
import org.graalvm.compiler.core.common.calc.Condition.CanonicalizedCondition;
import org.graalvm.compiler.core.common.calc.UnsignedMath;
@@ -115,6 +114,7 @@
import org.graalvm.compiler.nodes.java.UnsafeCompareAndSwapNode;
import org.graalvm.compiler.nodes.memory.HeapAccess;
import org.graalvm.compiler.nodes.memory.address.IndexAddressNode;
+import org.graalvm.compiler.nodes.spi.Replacements;
import org.graalvm.compiler.nodes.type.StampTool;
import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.nodes.virtual.EnsureVirtualizedNode;
@@ -154,30 +154,30 @@
*/
public class StandardGraphBuilderPlugins {
- public static void registerInvocationPlugins(MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection, InvocationPlugins plugins, BytecodeProvider bytecodeProvider,
+ public static void registerInvocationPlugins(MetaAccessProvider metaAccess, SnippetReflectionProvider snippetReflection, InvocationPlugins plugins, Replacements replacements,
boolean allowDeoptimization, boolean explicitUnsafeNullChecks) {
registerObjectPlugins(plugins);
registerClassPlugins(plugins);
registerMathPlugins(plugins, allowDeoptimization);
registerStrictMathPlugins(plugins);
registerUnsignedMathPlugins(plugins);
- registerStringPlugins(plugins, bytecodeProvider, snippetReflection);
+ registerStringPlugins(plugins, replacements, snippetReflection);
registerCharacterPlugins(plugins);
registerShortPlugins(plugins);
registerIntegerLongPlugins(plugins, JavaKind.Int);
registerIntegerLongPlugins(plugins, JavaKind.Long);
registerFloatPlugins(plugins);
registerDoublePlugins(plugins);
- registerArraysPlugins(plugins, bytecodeProvider);
- registerArrayPlugins(plugins, bytecodeProvider);
- registerUnsafePlugins(plugins, bytecodeProvider, explicitUnsafeNullChecks);
+ registerArraysPlugins(plugins, replacements);
+ registerArrayPlugins(plugins, replacements);
+ registerUnsafePlugins(plugins, replacements, explicitUnsafeNullChecks);
registerEdgesPlugins(metaAccess, plugins);
registerGraalDirectivesPlugins(plugins);
registerBoxingPlugins(plugins);
- registerJMHBlackholePlugins(plugins, bytecodeProvider);
- registerJFRThrowablePlugins(plugins, bytecodeProvider);
- registerMethodHandleImplPlugins(plugins, snippetReflection, bytecodeProvider);
- registerJcovCollectPlugins(plugins, bytecodeProvider);
+ registerJMHBlackholePlugins(plugins, replacements);
+ registerJFRThrowablePlugins(plugins, replacements);
+ registerMethodHandleImplPlugins(plugins, snippetReflection, replacements);
+ registerJcovCollectPlugins(plugins, replacements);
}
private static final Field STRING_VALUE_FIELD;
@@ -196,8 +196,8 @@
STRING_CODER_FIELD = coder;
}
- private static void registerStringPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider, SnippetReflectionProvider snippetReflection) {
- final Registration r = new Registration(plugins, String.class, bytecodeProvider);
+ private static void registerStringPlugins(InvocationPlugins plugins, Replacements replacements, SnippetReflectionProvider snippetReflection) {
+ final Registration r = new Registration(plugins, String.class, replacements);
r.register1("hashCode", Receiver.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {
@@ -243,7 +243,7 @@
});
} else {
r.registerMethodSubstitution(JDK9StringSubstitutions.class, "equals", Receiver.class, Object.class);
- Registration utf16sub = new Registration(plugins, StringUTF16Substitutions.class, bytecodeProvider);
+ Registration utf16sub = new Registration(plugins, StringUTF16Substitutions.class, replacements);
utf16sub.register2("getCharDirect", byte[].class, int.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode arg1, ValueNode arg2) {
@@ -261,10 +261,10 @@
}
});
- final Registration latin1r = new Registration(plugins, "java.lang.StringLatin1", bytecodeProvider);
+ final Registration latin1r = new Registration(plugins, "java.lang.StringLatin1", replacements);
latin1r.register5("indexOf", byte[].class, int.class, byte[].class, int.class, int.class, new StringLatin1IndexOfConstantPlugin());
- final Registration utf16r = new Registration(plugins, "java.lang.StringUTF16", bytecodeProvider);
+ final Registration utf16r = new Registration(plugins, "java.lang.StringUTF16", replacements);
utf16r.register5("indexOfUnsafe", byte[].class, int.class, byte[].class, int.class, int.class, new StringUTF16IndexOfConstantPlugin());
utf16r.setAllowOverwrite(true);
utf16r.registerMethodSubstitution(StringUTF16Substitutions.class, "getChar", byte[].class, int.class);
@@ -292,8 +292,8 @@
}
}
- private static void registerArraysPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Arrays.class, bytecodeProvider);
+ private static void registerArraysPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, Arrays.class, replacements);
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", boolean[].class, boolean[].class);
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", byte[].class, byte[].class);
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", short[].class, short[].class);
@@ -302,8 +302,8 @@
r.registerMethodSubstitution(ArraysSubstitutions.class, "equals", long[].class, long[].class);
}
- private static void registerArrayPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, Array.class, bytecodeProvider);
+ private static void registerArrayPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, Array.class, replacements);
r.register2("newInstance", Class.class, int.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver unused, ValueNode componentType, ValueNode length) {
@@ -381,10 +381,10 @@
private static UnsafeCompareAndExchangePluginsRegistrar unsafeCompareAndExchangePluginsRegistrar = new UnsafeCompareAndExchangePluginsRegistrar();
- public static void registerPlatformSpecificUnsafePlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider, boolean explicitUnsafeNullChecks, JavaKind[] supportedCasKinds) {
+ public static void registerPlatformSpecificUnsafePlugins(InvocationPlugins plugins, Replacements replacements, boolean explicitUnsafeNullChecks, JavaKind[] supportedCasKinds) {
registerPlatformSpecificUnsafePlugins(supportedCasKinds, new Registration(plugins, Unsafe.class), true, explicitUnsafeNullChecks);
if (JavaVersionUtil.JAVA_SPEC > 8) {
- registerPlatformSpecificUnsafePlugins(supportedCasKinds, new Registration(plugins, "jdk.internal.misc.Unsafe", bytecodeProvider), false, explicitUnsafeNullChecks);
+ registerPlatformSpecificUnsafePlugins(supportedCasKinds, new Registration(plugins, "jdk.internal.misc.Unsafe", replacements), false, explicitUnsafeNullChecks);
}
}
@@ -398,10 +398,10 @@
}
}
- private static void registerUnsafePlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider, boolean explicitUnsafeNullChecks) {
+ private static void registerUnsafePlugins(InvocationPlugins plugins, Replacements replacements, boolean explicitUnsafeNullChecks) {
registerUnsafePlugins(new Registration(plugins, Unsafe.class), true, explicitUnsafeNullChecks);
if (JavaVersionUtil.JAVA_SPEC > 8) {
- registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", bytecodeProvider), false, explicitUnsafeNullChecks);
+ registerUnsafePlugins(new Registration(plugins, "jdk.internal.misc.Unsafe", replacements), false, explicitUnsafeNullChecks);
}
}
@@ -1300,7 +1300,7 @@
});
}
- private static void registerJMHBlackholePlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
+ private static void registerJMHBlackholePlugins(InvocationPlugins plugins, Replacements replacements) {
InvocationPlugin blackholePlugin = new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver blackhole, ValueNode value) {
@@ -1316,7 +1316,7 @@
};
String[] names = {"org.openjdk.jmh.infra.Blackhole", "org.openjdk.jmh.logic.BlackHole"};
for (String name : names) {
- Registration r = new Registration(plugins, name, bytecodeProvider);
+ Registration r = new Registration(plugins, name, replacements);
for (JavaKind kind : JavaKind.values()) {
if ((kind.isPrimitive() && kind != JavaKind.Void) || kind == JavaKind.Object) {
Class<?> javaClass = kind == JavaKind.Object ? Object.class : kind.toJavaClass();
@@ -1327,8 +1327,8 @@
}
}
- private static void registerJFRThrowablePlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, "oracle.jrockit.jfr.jdkevents.ThrowableTracer", bytecodeProvider);
+ private static void registerJFRThrowablePlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, "oracle.jrockit.jfr.jdkevents.ThrowableTracer", replacements);
r.register2("traceThrowable", Throwable.class, String.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode throwable, ValueNode message) {
@@ -1343,8 +1343,8 @@
});
}
- private static void registerMethodHandleImplPlugins(InvocationPlugins plugins, SnippetReflectionProvider snippetReflection, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, "java.lang.invoke.MethodHandleImpl", bytecodeProvider);
+ private static void registerMethodHandleImplPlugins(InvocationPlugins plugins, SnippetReflectionProvider snippetReflection, Replacements replacements) {
+ Registration r = new Registration(plugins, "java.lang.invoke.MethodHandleImpl", replacements);
// In later JDKs this no longer exists and the usage is replace by Class.cast which is
// already an intrinsic
r.registerOptional2("castReference", Class.class, Object.class, new InvocationPlugin() {
@@ -1408,8 +1408,8 @@
* Registers a plugin to ignore {@code com.sun.tdk.jcov.runtime.Collect.hit} within an
* intrinsic.
*/
- private static void registerJcovCollectPlugins(InvocationPlugins plugins, BytecodeProvider bytecodeProvider) {
- Registration r = new Registration(plugins, "com.sun.tdk.jcov.runtime.Collect", bytecodeProvider);
+ private static void registerJcovCollectPlugins(InvocationPlugins plugins, Replacements replacements) {
+ Registration r = new Registration(plugins, "com.sun.tdk.jcov.runtime.Collect", replacements);
r.register1("hit", int.class, new InvocationPlugin() {
@Override
public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver, ValueNode object) {
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/TargetGraphBuilderPlugins.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/TargetGraphBuilderPlugins.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,12 +24,12 @@
package org.graalvm.compiler.replacements;
-import org.graalvm.compiler.bytecode.BytecodeProvider;
import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration.Plugins;
+import org.graalvm.compiler.nodes.spi.Replacements;
import jdk.vm.ci.code.Architecture;
public interface TargetGraphBuilderPlugins {
- void register(Plugins plugins, BytecodeProvider replacementsBytecodeProvider, Architecture arch, boolean explicitUnsafeNullChecks, boolean registerMathPlugins, boolean emitJDK9StringSubstitutions,
+ void register(Plugins plugins, Replacements replacements, Architecture arch, boolean explicitUnsafeNullChecks, boolean registerMathPlugins, boolean emitJDK9StringSubstitutions,
boolean useFMAIntrinsics);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyCallNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -188,6 +188,11 @@
return locationIdentity;
}
+ @Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
+
@NodeIntrinsic(hasSideEffect = true)
private static native void arraycopy(Object src, int srcPos, Object dest, int destPos, int length, @ConstantNodeParameter JavaKind elementKind, @ConstantNodeParameter boolean aligned,
@ConstantNodeParameter boolean disjoint, @ConstantNodeParameter boolean uninitialized, @ConstantNodeParameter int heapWordSize);
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/ArrayCopyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
if (!forceAnyLocation && elementKind == null) {
elementKind = ArrayCopySnippets.Templates.selectComponentKind(this);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/CheckcastArrayCopyCallNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/CheckcastArrayCopyCallNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -146,7 +146,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
/*
* Because of restrictions that the memory graph of snippets matches the original node,
* pretend that we kill any.
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/GenericArrayCopyCallNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/arraycopy/GenericArrayCopyCallNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -102,7 +102,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/BasicArrayCopyNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -128,6 +128,11 @@
}
@Override
+ public LocationIdentity getKilledLocationIdentity() {
+ return getLocationIdentity();
+ }
+
+ @Override
public MemoryNode getLastLocationAccess() {
return lastLocationAccess;
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -173,7 +173,7 @@
}
DebugContext debug = replacementGraph.getDebug();
try (DebugContext.Scope s = debug.scope("LoweringSnippetTemplate", replacementGraph)) {
- new LoweringPhase(new CanonicalizerPhase(), tool.getLoweringStage()).apply(replacementGraph, c);
+ new LoweringPhase(CanonicalizerPhase.create(), tool.getLoweringStage()).apply(replacementGraph, c);
} catch (Throwable e) {
throw debug.handle(e);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/MacroStateSplitNode.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,7 @@
}
@Override
- public LocationIdentity getLocationIdentity() {
+ public LocationIdentity getKilledLocationIdentity() {
return LocationIdentity.any();
}
@@ -87,7 +87,7 @@
}
assert invoke.stateAfter().bci == BytecodeFrame.AFTER_BCI;
// Here we need to fix the bci of the invoke
- InvokeNode newInvoke = snippetGraph.add(new InvokeNode(invoke.callTarget(), bci(), invoke.getLocationIdentity()));
+ InvokeNode newInvoke = snippetGraph.add(new InvokeNode(invoke.callTarget(), bci(), invoke.getKilledLocationIdentity()));
newInvoke.setStateAfter(invoke.stateAfter());
snippetGraph.replaceFixedWithFixed((InvokeNode) invoke.asNode(), newInvoke);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ExportingClassLoader.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 org.graalvm.compiler.test;
-
-/**
- * A class loader that exports all packages in the module defining the class loader to all classes
- * in the unnamed module associated with the loader.
- */
-public class ExportingClassLoader extends ClassLoader {
- public ExportingClassLoader() {
- ModuleSupport.exportAllPackagesTo(getClass(), this);
- }
-
- public ExportingClassLoader(ClassLoader parent) {
- super(parent);
- ModuleSupport.exportAllPackagesTo(getClass(), this);
- }
-}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.test/src/org/graalvm/compiler/test/ModuleSupport.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 org.graalvm.compiler.test;
-
-import java.io.IOException;
-import java.lang.module.ModuleDescriptor.Requires;
-import java.net.URI;
-import java.nio.file.FileSystem;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.graalvm.compiler.debug.DebugOptions;
-
-import jdk.internal.module.Modules;
-
-public class ModuleSupport {
-
- public static void exportPackageTo(Class<?> moduleMember, String packageName, Class<?> requestor) {
- Module moduleToExport = moduleMember.getModule();
- Module requestorModule = requestor.getModule();
- if (moduleToExport != requestorModule) {
- Modules.addExports(moduleToExport, packageName, requestorModule);
- }
- }
-
- public static void exportAllPackagesTo(Class<?> moduleMember, Class<?> requestor) {
- Module moduleToExport = moduleMember.getModule();
- Module requestorModule = requestor.getModule();
- if (moduleToExport != requestorModule) {
- for (String packageName : moduleToExport.getPackages()) {
- Modules.addExports(moduleToExport, packageName, requestorModule);
- }
- }
- }
-
- public static void exportAllPackagesTo(Class<?> moduleMember, ClassLoader cl) {
- Module moduleToExport = moduleMember.getModule();
- Module unnamedModule = cl.getUnnamedModule();
- for (String packageName : moduleToExport.getPackages()) {
- Modules.addExports(moduleToExport, packageName, unnamedModule);
- }
- }
-
- @SuppressWarnings("unused")
- public static void exportAndOpenAllPackagesToUnnamed(String name) {
- Module module = ModuleLayer.boot().findModule(name).orElseThrow();
- Set<String> packages = module.getPackages();
- for (String pkg : packages) {
- Modules.addExportsToAllUnnamed(module, pkg);
- Modules.addOpensToAllUnnamed(module, pkg);
- }
- }
-
- public static List<String> getJRTGraalClassNames() throws IOException {
- List<String> classNames = new ArrayList<>();
- FileSystem fs = FileSystems.newFileSystem(URI.create("jrt:/"), Collections.emptyMap());
- Module graalModule = DebugOptions.class.getModule();
- Set<String> graalModuleSet = new HashSet<>();
- graalModuleSet.add(graalModule.getName());
- for (Module module : graalModule.getLayer().modules()) {
- if (requires(module, graalModule)) {
- graalModuleSet.add(module.getName());
- }
- }
-
- Path top = fs.getPath("/modules/");
- Files.find(top, Integer.MAX_VALUE,
- (path, attrs) -> attrs.isRegularFile()).forEach(p -> {
- int nameCount = p.getNameCount();
- if (nameCount > 2) {
- String base = p.getName(nameCount - 1).toString();
- if (base.endsWith(".class") && !base.equals("module-info.class")) {
- String module = p.getName(1).toString();
- if (graalModuleSet.contains(module)) {
- // Strip module prefix and convert to dotted
- // form
- String className = p.subpath(2, nameCount).toString().replace('/', '.');
- // Strip ".class" suffix
- className = className.replace('/', '.').substring(0, className.length() - ".class".length());
- classNames.add(className);
- }
- }
- }
- });
- return classNames;
- }
-
- private static boolean requires(Module module, Module graalModule) {
- ModuleLayer graalLayer = graalModule.getLayer();
- for (Requires r : module.getDescriptor().requires()) {
- if (r.name().equals(graalModule.getName())) {
- return true;
- }
- Module dep = graalLayer.findModule(r.name()).get();
- if (requires(dep, graalModule)) {
- return true;
- }
- }
- return false;
- }
-}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/PEReadEliminationClosure.java Thu Nov 07 18:44:09 2019 +0000
@@ -121,11 +121,11 @@
return processUnsafeStore((RawStoreNode) node, state, effects);
} else if (node instanceof MemoryCheckpoint.Single) {
COUNTER_MEMORYCHECKPOINT.increment(node.getDebug());
- LocationIdentity identity = ((MemoryCheckpoint.Single) node).getLocationIdentity();
+ LocationIdentity identity = ((MemoryCheckpoint.Single) node).getKilledLocationIdentity();
processIdentity(state, identity);
} else if (node instanceof MemoryCheckpoint.Multi) {
COUNTER_MEMORYCHECKPOINT.increment(node.getDebug());
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getKilledLocationIdentities()) {
processIdentity(state, identity);
}
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationBlockState.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -152,6 +152,7 @@
}
public ReadEliminationBlockState(ReadEliminationBlockState other) {
+ super(other);
readCache = EconomicMap.create(Equivalence.DEFAULT, other.readCache);
}
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.virtual/src/org/graalvm/compiler/virtual/phases/ea/ReadEliminationClosure.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -135,9 +135,9 @@
}
} else if (node instanceof WriteNode) {
WriteNode write = (WriteNode) node;
- if (write.getLocationIdentity().isSingle()) {
+ if (write.getKilledLocationIdentity().isSingle()) {
ValueNode object = GraphUtil.unproxify(write.getAddress());
- LoadCacheEntry identifier = new LoadCacheEntry(object, write.getLocationIdentity());
+ LoadCacheEntry identifier = new LoadCacheEntry(object, write.getKilledLocationIdentity());
ValueNode cachedValue = state.getCacheEntry(identifier);
ValueNode value = getScalarAlias(write.value());
@@ -145,10 +145,10 @@
effects.deleteNode(write);
deleted = true;
}
- processIdentity(state, write.getLocationIdentity());
+ processIdentity(state, write.getKilledLocationIdentity());
state.addCacheEntry(identifier, value);
} else {
- processIdentity(state, write.getLocationIdentity());
+ processIdentity(state, write.getKilledLocationIdentity());
}
} else if (node instanceof UnsafeAccessNode) {
ResolvedJavaType type = StampTool.typeOrNull(((UnsafeAccessNode) node).object());
@@ -170,9 +170,9 @@
} else {
assert node instanceof RawStoreNode;
RawStoreNode write = (RawStoreNode) node;
- if (write.getLocationIdentity().isSingle()) {
+ if (write.getKilledLocationIdentity().isSingle()) {
ValueNode object = GraphUtil.unproxify(write.object());
- UnsafeLoadCacheEntry identifier = new UnsafeLoadCacheEntry(object, write.offset(), write.getLocationIdentity());
+ UnsafeLoadCacheEntry identifier = new UnsafeLoadCacheEntry(object, write.offset(), write.getKilledLocationIdentity());
ValueNode cachedValue = state.getCacheEntry(identifier);
ValueNode value = getScalarAlias(write.value());
@@ -180,18 +180,18 @@
effects.deleteNode(write);
deleted = true;
}
- processIdentity(state, write.getLocationIdentity());
+ processIdentity(state, write.getKilledLocationIdentity());
state.addCacheEntry(identifier, value);
} else {
- processIdentity(state, write.getLocationIdentity());
+ processIdentity(state, write.getKilledLocationIdentity());
}
}
}
} else if (node instanceof MemoryCheckpoint.Single) {
- LocationIdentity identity = ((MemoryCheckpoint.Single) node).getLocationIdentity();
+ LocationIdentity identity = ((MemoryCheckpoint.Single) node).getKilledLocationIdentity();
processIdentity(state, identity);
} else if (node instanceof MemoryCheckpoint.Multi) {
- for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getLocationIdentities()) {
+ for (LocationIdentity identity : ((MemoryCheckpoint.Multi) node).getKilledLocationIdentities()) {
processIdentity(state, identity);
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.util/src/org/graalvm/util/OptionsEncoder.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * Facilities for encoding/decoding a set of options to/from a byte array.
+ */
+public final class OptionsEncoder {
+
+ private OptionsEncoder() {
+ }
+
+ /**
+ * Determines if {@code value} is supported by {@link #encode(Map)}.
+ */
+ public static boolean isValueSupported(Object value) {
+ return TypedDataOutputStream.isValueSupported(value);
+ }
+
+ /**
+ * Encodes {@code options} into a byte array.
+ *
+ * @throws IllegalArgumentException if any value in {@code options} is not
+ * {@linkplain #isValueSupported(Object) supported}
+ */
+ public static byte[] encode(final Map<String, Object> options) {
+ try (ByteArrayOutputStream baout = new ByteArrayOutputStream()) {
+ try (TypedDataOutputStream out = new TypedDataOutputStream(baout)) {
+ out.writeInt(options.size());
+ for (Map.Entry<String, Object> e : options.entrySet()) {
+ out.writeUTF(e.getKey());
+ try {
+ out.writeTypedValue(e.getValue());
+ } catch (IllegalArgumentException iae) {
+ throw new IllegalArgumentException(String.format("Key: %s, Value: %s, Value type: %s",
+ e.getKey(), e.getValue(), e.getValue().getClass()), iae);
+ }
+ }
+ }
+ return baout.toByteArray();
+ } catch (IOException ioe) {
+ throw new IllegalArgumentException(ioe);
+ }
+ }
+
+ /**
+ * Decodes {@code input} into a name/value map.
+ *
+ * @throws IllegalArgumentException if {@code input} cannot be decoded
+ */
+ public static Map<String, Object> decode(byte[] input) {
+ Map<String, Object> res = new LinkedHashMap<>();
+ try (TypedDataInputStream in = new TypedDataInputStream(new ByteArrayInputStream(input))) {
+ final int size = in.readInt();
+ for (int i = 0; i < size; i++) {
+ final String key = in.readUTF();
+ final Object value = in.readTypedValue();
+ res.put(key, value);
+ }
+ if (in.available() != 0) {
+ throw new IllegalArgumentException(in.available() + " undecoded bytes");
+ }
+ } catch (IOException ioe) {
+ throw new IllegalArgumentException(ioe);
+ }
+ return res;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.util/src/org/graalvm/util/TypedDataInputStream.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.util;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * A stream that can read (trivial) values using their in-band data type information, intended for
+ * use with {@link TypedDataOutputStream}.
+ */
+public class TypedDataInputStream extends DataInputStream {
+ public TypedDataInputStream(InputStream in) {
+ super(in);
+ }
+
+ /**
+ * Reads a single value, using the data type encoded in the stream.
+ *
+ * @return The read value, such as a boxed primitive or a {@link String}.
+ * @exception IOException in case of an I/O error.
+ */
+ public Object readTypedValue() throws IOException {
+ Object value;
+ final byte type = readByte();
+ switch (type) {
+ case 'Z':
+ value = readBoolean();
+ break;
+ case 'B':
+ value = readByte();
+ break;
+ case 'S':
+ value = readShort();
+ break;
+ case 'C':
+ value = readChar();
+ break;
+ case 'I':
+ value = readInt();
+ break;
+ case 'J':
+ value = readLong();
+ break;
+ case 'F':
+ value = readFloat();
+ break;
+ case 'D':
+ value = readDouble();
+ break;
+ case 'U':
+ value = readUTF();
+ break;
+ default:
+ throw new IOException("Unsupported type: " + Integer.toHexString(type));
+ }
+ return value;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.util/src/org/graalvm/util/TypedDataOutputStream.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 org.graalvm.util;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * A stream that can write (trivial) values together with their data type, for use with
+ * {@link TypedDataInputStream}.
+ */
+public class TypedDataOutputStream extends DataOutputStream {
+ /** Determines if {@code value} is supported by {@link #writeTypedValue(Object)}. */
+ public static boolean isValueSupported(Object value) {
+ if (value == null) {
+ return false;
+ }
+ Class<?> valueClass = value.getClass();
+ return valueClass == Boolean.class ||
+ valueClass == Byte.class ||
+ valueClass == Short.class ||
+ valueClass == Character.class ||
+ valueClass == Integer.class ||
+ valueClass == Long.class ||
+ valueClass == Float.class ||
+ valueClass == Double.class ||
+ valueClass == String.class ||
+ value.getClass().isEnum();
+ }
+
+ public TypedDataOutputStream(OutputStream out) {
+ super(out);
+ }
+
+ /**
+ * Writes the value that is represented by the given non-null object, together with information
+ * on the value's data type.
+ *
+ * @param value A value of a {@linkplain #isValueSupported supported type}.
+ * @exception IllegalArgumentException when the provided type is not supported.
+ * @exception IOException in case of an I/O error.
+ */
+ public void writeTypedValue(Object value) throws IOException {
+ Class<?> valueClz = value.getClass();
+ if (valueClz == Boolean.class) {
+ this.writeByte('Z');
+ this.writeBoolean((Boolean) value);
+ } else if (valueClz == Byte.class) {
+ this.writeByte('B');
+ this.writeByte((Byte) value);
+ } else if (valueClz == Short.class) {
+ this.writeByte('S');
+ this.writeShort((Short) value);
+ } else if (valueClz == Character.class) {
+ this.writeByte('C');
+ this.writeChar((Character) value);
+ } else if (valueClz == Integer.class) {
+ this.writeByte('I');
+ this.writeInt((Integer) value);
+ } else if (valueClz == Long.class) {
+ this.writeByte('J');
+ this.writeLong((Long) value);
+ } else if (valueClz == Float.class) {
+ this.writeByte('F');
+ this.writeFloat((Float) value);
+ } else if (valueClz == Double.class) {
+ this.writeByte('D');
+ this.writeDouble((Double) value);
+ } else if (valueClz == String.class) {
+ this.writeByte('U');
+ this.writeUTF((String) value);
+ } else if (valueClz.isEnum()) {
+ this.writeByte('U');
+ this.writeUTF(((Enum<?>) value).name());
+ } else {
+ throw new IllegalArgumentException(String.format("Unsupported type: Value: %s, Value type: %s", value, valueClz));
+ }
+ }
+}
--- a/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.jdwp.agent/share/native/libdt_socket/socketTransport.c Thu Nov 07 18:44:09 2019 +0000
@@ -35,9 +35,11 @@
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
+ #include <iphlpapi.h>
#else
#include <arpa/inet.h>
#include <sys/socket.h>
+ #include <net/if.h>
#endif
/*
@@ -267,16 +269,101 @@
}
/*
+ * Parses scope id.
+ * Scope id is ulong on Windows, uint32 on unix, so returns long which can be cast to uint32.
+ * On error sets last error and returns -1.
+ */
+static long parseScopeId(const char *str) {
+ // try to handle scope as interface name
+ unsigned long scopeId = if_nametoindex(str);
+ if (scopeId == 0) {
+ // try to parse integer value
+ char *end;
+ scopeId = strtoul(str, &end, 10);
+ if (*end != '\0') {
+ setLastError(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "failed to parse scope");
+ return -1;
+ }
+ }
+ // ensure parsed value is in uint32 range
+ if (scopeId > 0xFFFFFFFF) {
+ setLastError(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "scope is out of range");
+ return -1;
+ }
+ return (long)scopeId;
+}
+
+/*
+ * Wrapper for dbgsysGetAddrInfo (getaddrinfo).
+ * Handles enclosing square brackets and scopes.
+ */
+static jdwpTransportError
+getAddrInfo(const char *hostname, size_t hostnameLen,
+ const char *service,
+ const struct addrinfo *hints,
+ struct addrinfo **result)
+{
+ int err = 0;
+ char *buffer = NULL;
+ long scopeId = 0;
+
+ if (hostname != NULL) {
+ char *scope = NULL;
+ // skip surrounding
+ if (hostnameLen > 2 && hostname[0] == '[' && hostname[hostnameLen - 1] == ']') {
+ hostname++;
+ hostnameLen -= 2;
+ }
+ buffer = (*callback->alloc)((int)hostnameLen + 1);
+ if (buffer == NULL) {
+ RETURN_ERROR(JDWPTRANSPORT_ERROR_OUT_OF_MEMORY, "out of memory");
+ }
+ memcpy(buffer, hostname, hostnameLen);
+ buffer[hostnameLen] = '\0';
+
+ scope = strchr(buffer, '%');
+ if (scope != NULL) {
+ // drop scope from the address
+ *scope = '\0';
+ // and parse the value
+ scopeId = parseScopeId(scope + 1);
+ if (scopeId < 0) {
+ (*callback->free)(buffer);
+ return JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT;
+ }
+ }
+ }
+
+ err = dbgsysGetAddrInfo(buffer, service, hints, result);
+
+ if (buffer != NULL) {
+ (*callback->free)(buffer);
+ }
+ if (err != 0) {
+ setLastError(err, "getaddrinfo: failed to parse address");
+ return JDWPTRANSPORT_ERROR_IO_ERROR;
+ }
+
+ if (scopeId > 0) {
+ if ((*result)->ai_family != AF_INET6) {
+ RETURN_ERROR(JDWPTRANSPORT_ERROR_ILLEGAL_ARGUMENT, "IPv4 address cannot contain scope");
+ }
+
+ ((struct sockaddr_in6 *)((*result)->ai_addr))->sin6_scope_id = (uint32_t)scopeId;
+ }
+
+ return JDWPTRANSPORT_ERROR_NONE;
+}
+
+/*
* Result must be released with dbgsysFreeAddrInfo.
*/
static jdwpTransportError
parseAddress(const char *address, struct addrinfo **result) {
const char *colon;
- size_t hostLen;
- char *host = NULL;
+ size_t hostnameLen;
const char *port;
struct addrinfo hints;
- int res;
*result = NULL;
@@ -295,39 +382,21 @@
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_NUMERICSERV; // port must be a number
- hostLen = (colon == NULL ? 0 : colon - address);
- if (hostLen == 0) {
+ hostnameLen = (colon == NULL ? 0 : colon - address);
+ if (hostnameLen == 0) {
/* no hostname - use localhost address (pass NULL to getaddrinfo) */
- } else if (*address == '*' && hostLen == 1) {
+ address = NULL;
+ } else if (*address == '*' && hostnameLen == 1) {
/* *:port - listen on all interfaces
* use IPv6 socket (to accept IPv6 and mapped IPv4),
* pass hostname == NULL to getaddrinfo.
*/
hints.ai_family = allowOnlyIPv4 ? AF_INET : AF_INET6;
hints.ai_flags |= AI_PASSIVE | (allowOnlyIPv4 ? 0 : AI_V4MAPPED | AI_ALL);
- } else {
- if (address[0] == '[' && colon[-1] == ']') {
- address++;
- hostLen -= 2;
- }
- host = (*callback->alloc)((int)hostLen + 1);
- if (host == NULL) {
- RETURN_ERROR(JDWPTRANSPORT_ERROR_OUT_OF_MEMORY, "out of memory");
- }
- strncpy(host, address, hostLen);
- host[hostLen] = '\0';
+ address = NULL;
}
- res = dbgsysGetAddrInfo(host, port, &hints, result);
- if (host != NULL) {
- (*callback->free)(host);
- }
- if (res != 0) {
- setLastError(res, "getaddrinfo: unknown host");
- return JDWPTRANSPORT_ERROR_IO_ERROR;
- }
-
- return JDWPTRANSPORT_ERROR_NONE;
+ return getAddrInfo(address, hostnameLen, port, &hints, result);
}
/*
@@ -352,7 +421,7 @@
parseAllowedAddr(const char *buffer, struct in6_addr *result, int *isIPv4) {
struct addrinfo hints;
struct addrinfo *addrInfo = NULL;
- int err;
+ jdwpTransportError err;
/*
* To parse both IPv4 and IPv6 need to specify AF_UNSPEC family
@@ -364,11 +433,10 @@
hints.ai_protocol = IPPROTO_TCP;
hints.ai_flags = AI_NUMERICHOST; // only numeric addresses, no resolution
- err = dbgsysGetAddrInfo(buffer, NULL, &hints, &addrInfo);
+ err = getAddrInfo(buffer, strlen(buffer), NULL, &hints, &addrInfo);
- if (err != 0) {
- setLastError(err, "getaddrinfo: failed to parse address");
- return JDWPTRANSPORT_ERROR_IO_ERROR;
+ if (err != JDWPTRANSPORT_ERROR_NONE) {
+ return err;
}
if (addrInfo->ai_family == AF_INET6) {
@@ -844,6 +912,7 @@
}
err = dbgsysConnect(socketFD, ai->ai_addr, (socklen_t)ai->ai_addrlen);
+
if (err == DBG_EINPROGRESS && timeout > 0) {
err = dbgsysFinishConnect(socketFD, (long)timeout);
--- a/src/jdk.scripting.nashorn/share/legal/double-conversion.md Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.scripting.nashorn/share/legal/double-conversion.md Thu Nov 07 18:44:09 2019 +0000
@@ -1,4 +1,4 @@
-## Double-conversion v1.1.5
+## Double-conversion v3.1.5
### Double-conversion License
--- a/src/jdk.scripting.nashorn/share/legal/joni.md Thu Oct 31 16:16:21 2019 +0000
+++ b/src/jdk.scripting.nashorn/share/legal/joni.md Thu Nov 07 18:44:09 2019 +0000
@@ -1,9 +1,9 @@
-## JRuby Joni v1.1.9
+## JRuby Joni v2.1.16
-### JRuby License
+### MIT License
<pre>
-Jruby 2012
+Copyright (c) 2017 JRuby Team
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
--- a/test/hotspot/gtest/utilities/test_population_count.cpp Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/gtest/utilities/test_population_count.cpp Thu Nov 07 18:44:09 2019 +0000
@@ -23,12 +23,13 @@
*/
#include "precompiled.hpp"
-#include "libadt/vectset.hpp"
#include "runtime/os.hpp"
#include "utilities/population_count.hpp"
#include "utilities/globalDefinitions.hpp"
#include "unittest.hpp"
+#define BITS_IN_BYTE_ARRAY_SIZE 256
+
uint8_t test_popcnt_bitsInByte[BITS_IN_BYTE_ARRAY_SIZE] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
--- a/test/hotspot/jtreg/ProblemList.txt Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/ProblemList.txt Thu Nov 07 18:44:09 2019 +0000
@@ -206,4 +206,16 @@
vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java 7199837 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t001/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t002/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP04/ap04t003/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP10/ap10t001/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/allocation/AP12/ap12t001/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/capability/CM02/cm02t001/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t002/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t003/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t005/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java 8233549 generic-all
+vmTestbase/nsk/jvmti/scenarios/events/EM07/em07t002/TestDescription.java 8233549 generic-all
#############################################################################
--- a/test/hotspot/jtreg/compiler/aot/DeoptimizationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/DeoptimizationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.aot.DeoptimizationTest
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname libDeoptimizationTest.so
--- a/test/hotspot/jtreg/compiler/aot/RecompilationTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/RecompilationTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.aot.RecompilationTest
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname libRecompilationTest1.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver compiler.calls.common.InvokeDynamicPatcher
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2CompiledTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2CompiledTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver compiler.calls.common.InvokeDynamicPatcher
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2InterpretedTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2InterpretedTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver compiler.calls.common.InvokeDynamicPatcher
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2NativeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeDynamic2NativeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver compiler.calls.common.InvokeDynamicPatcher
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeInterface2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2CompiledTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2CompiledTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2InterpretedTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2InterpretedTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2NativeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeInterface2NativeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeInterface2NativeTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeSpecial2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2CompiledTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2CompiledTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeSpecial2CompiledTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2InterpretedTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2InterpretedTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2NativeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeSpecial2NativeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeSpecial2NativeTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeStatic2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2CompiledTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2CompiledTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeStatic2CompiledTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2InterpretedTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2InterpretedTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2NativeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeStatic2NativeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeStatic2NativeTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeVirtual2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2CompiledTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2CompiledTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeVirtual2CompiledTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2InterpretedTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2InterpretedTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2NativeTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromAot/AotInvokeVirtual2NativeTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname AotInvokeVirtual2NativeTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeDynamic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeDynamic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.calls.common.InvokeDynamicPatcher
--- a/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeInterface2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeInterface2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeSpecial2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeSpecial2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname CompiledInvokeSpecial2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeStatic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeStatic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname CompiledInvokeStatic2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeVirtual2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromCompiled/CompiledInvokeVirtual2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname CompiledInvokeVirtual2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeDynamic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeDynamic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -28,8 +28,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeDynamic
- * compiler.calls.common.InvokeDynamicPatcher
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.calls.common.InvokeDynamicPatcher
--- a/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeInterface2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeInterface2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeInterface
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeSpecial2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeSpecial2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeStatic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeStatic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeVirtual2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromInterpreted/InterpretedInvokeVirtual2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler
--- a/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeSpecial2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeSpecial2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeSpecial
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname NativeInvokeSpecial2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeStatic2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeStatic2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeStatic
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname NativeInvokeStatic2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeVirtual2AotTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/calls/fromNative/NativeInvokeVirtual2AotTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -27,7 +27,7 @@
* @library /test/lib /testlibrary /
* @modules java.base/jdk.internal.misc
* @build compiler.calls.common.InvokeVirtual
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver compiler.aot.AotCompiler -libname NativeInvokeVirtual2AotTest.so
--- a/test/hotspot/jtreg/compiler/aot/fingerprint/SelfChangedCDS.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/aot/fingerprint/SelfChangedCDS.java Thu Nov 07 18:44:09 2019 +0000
@@ -29,7 +29,7 @@
* java.management
* @requires vm.aot & vm.cds
* @build compiler.aot.fingerprint.SelfChanged
- * compiler.aot.AotCompiler
+ * sun.hotspot.WhiteBox
*
* @run main compiler.aot.fingerprint.SelfChanged WRITE-UNMODIFIED-CLASS
* @run driver compiler.aot.AotCompiler -libname libSelfChanged.so
--- a/test/hotspot/jtreg/compiler/intrinsics/klass/TestIsPrimitive.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/intrinsics/klass/TestIsPrimitive.java Thu Nov 07 18:44:09 2019 +0000
@@ -24,12 +24,13 @@
/*
* @test
* @bug 8150669
+ * @bug 8233019
* @summary C1 intrinsic for Class.isPrimitive
* @modules java.base/jdk.internal.misc
*
* @run main/othervm -ea -Diters=200 -Xint
* compiler.intrinsics.klass.TestIsPrimitive
- * @run main/othervm -ea -Diters=30000 -XX:TieredStopAtLevel=1
+ * @run main/othervm -ea -XX:-UseSharedSpaces -Diters=30000 -XX:TieredStopAtLevel=1
* compiler.intrinsics.klass.TestIsPrimitive
* @run main/othervm -ea -Diters=30000 -XX:TieredStopAtLevel=4
* compiler.intrinsics.klass.TestIsPrimitive
@@ -53,6 +54,7 @@
testOK(true, InlineConstants::testDouble);
testOK(false, InlineConstants::testObject);
testOK(false, InlineConstants::testArray);
+ testOK(false, InlineConstants::testBooleanArray);
testOK(true, StaticConstants::testBoolean);
testOK(true, StaticConstants::testByte);
@@ -64,6 +66,7 @@
testOK(true, StaticConstants::testDouble);
testOK(false, StaticConstants::testObject);
testOK(false, StaticConstants::testArray);
+ testOK(false, StaticConstants::testBooleanArray);
testNPE( StaticConstants::testNull);
testOK(true, NoConstants::testBoolean);
@@ -76,6 +79,7 @@
testOK(true, NoConstants::testDouble);
testOK(false, NoConstants::testObject);
testOK(false, NoConstants::testArray);
+ testOK(false, NoConstants::testBooleanArray);
testNPE( NoConstants::testNull);
}
@@ -112,6 +116,7 @@
static volatile Class<?> classObject = Object.class;
static volatile Class<?> classArray = Object[].class;
static volatile Class<?> classNull = null;
+ static volatile Class<?> classBooleanArray = boolean[].class;
static final Class<?> staticClassBoolean = boolean.class;
static final Class<?> staticClassByte = byte.class;
@@ -124,6 +129,7 @@
static final Class<?> staticClassObject = Object.class;
static final Class<?> staticClassArray = Object[].class;
static final Class<?> staticClassNull = null;
+ static final Class<?> staticClassBooleanArray = boolean[].class;
static class InlineConstants {
static boolean testBoolean() { return boolean.class.isPrimitive(); }
@@ -136,6 +142,7 @@
static boolean testDouble() { return double.class.isPrimitive(); }
static boolean testObject() { return Object.class.isPrimitive(); }
static boolean testArray() { return Object[].class.isPrimitive(); }
+ static boolean testBooleanArray() { return boolean[].class.isPrimitive(); }
}
static class StaticConstants {
@@ -150,6 +157,7 @@
static boolean testObject() { return staticClassObject.isPrimitive(); }
static boolean testArray() { return staticClassArray.isPrimitive(); }
static boolean testNull() { return staticClassNull.isPrimitive(); }
+ static boolean testBooleanArray() { return staticClassBooleanArray.isPrimitive(); }
}
static class NoConstants {
@@ -164,7 +172,9 @@
static boolean testObject() { return classObject.isPrimitive(); }
static boolean testArray() { return classArray.isPrimitive(); }
static boolean testNull() { return classNull.isPrimitive(); }
+ static boolean testBooleanArray() { return classBooleanArray.isPrimitive(); }
}
+
}
--- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass/Launcher.java Thu Nov 07 18:44:09 2019 +0000
@@ -31,8 +31,7 @@
* @build compiler.profiling.spectrapredefineclass.Agent
* @run driver ClassFileInstaller compiler.profiling.spectrapredefineclass.Agent
* @run driver compiler.profiling.spectrapredefineclass.Launcher
- * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation
- * -XX:CompileThreshold=10000
+ * @run main/othervm -XX:CompilationMode=high-only -XX:-BackgroundCompilation -XX:CompileThreshold=10000
* -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222
* -XX:ReservedCodeCacheSize=3M -Djdk.attach.allowAttachSelf
* compiler.profiling.spectrapredefineclass.Agent
--- a/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,8 +34,7 @@
* compiler.profiling.spectrapredefineclass_classloaders.B
* @run driver ClassFileInstaller compiler.profiling.spectrapredefineclass_classloaders.Agent
* @run driver compiler.profiling.spectrapredefineclass_classloaders.Launcher
- * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation
- * -XX:CompileThreshold=10000
+ * @run main/othervm -XX:CompilationMode=high-only -XX:-BackgroundCompilation -XX:CompileThreshold=10000
* -XX:-UseOnStackReplacement -XX:TypeProfileLevel=222
* -XX:ReservedCodeCacheSize=3M -Djdk.attach.allowAttachSelf
* compiler.profiling.spectrapredefineclass_classloaders.Agent
--- a/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/gc/logging/TestMetaSpaceLog.java Thu Nov 07 18:44:09 2019 +0000
@@ -130,7 +130,7 @@
public static void loadClass(WhiteBox wb) {
try {
URLClassLoader ucl = new URLClassLoader(urls);
- ucl.loadClass("case00");
+ Class.forName("case00", false, ucl);
} catch (Exception e) {
e.printStackTrace();
}
--- a/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/runtime/LoadClass/LongBCP.java Thu Nov 07 18:44:09 2019 +0000
@@ -102,8 +102,6 @@
.shouldHaveExitValue(0);
// relative path tests
- // We currently cannot handle relative path specified in the
- // -Xbootclasspath/a on windows.
//
// relative path length within the file system limit
int fn_max_length = 255;
@@ -128,6 +126,22 @@
output.shouldContain("Hello World")
.shouldHaveExitValue(0);
+ // Test a relative path for a jar file < MAX_PATH, but where the
+ // absolute path is > MAX_PATH.
+ Path jarDir = Paths.get(".");
+ for (int i = 0; i < 21; ++i) {
+ jarDir = jarDir.resolve("0123456789");
+ }
+ Files.createDirectories(jarDir);
+ Path jarPath = jarDir.resolve("hello.jar");
+ Files.copy(Paths.get(helloJar), jarPath);
+ bootCP = "-Xbootclasspath/a:" + jarPath.toString();
+ pb = ProcessTools.createJavaProcessBuilder(bootCP, "Hello");
+
+ output = new OutputAnalyzer(pb.start());
+ output.shouldContain("Hello World")
+ .shouldHaveExitValue(0);
+
// total relative path length exceeds MAX_PATH
destDir = Paths.get(destDir.toString(), "yyyyyyyy");
--- a/test/hotspot/jtreg/runtime/Thread/CountStackFramesAtExit.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +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.
- */
-
-/**
- * @test
- * @bug 8167108
- * @summary Stress test java.lang.Thread.countStackFrames() at thread exit.
- * @run main/othervm -Xlog:thread+smr=debug CountStackFramesAtExit
- */
-
-import java.util.concurrent.CountDownLatch;
-
-public class CountStackFramesAtExit extends Thread {
- final static int N_THREADS = 32;
- final static int N_LATE_CALLS = 1000;
-
- public CountDownLatch exitSyncObj = new CountDownLatch(1);
- public CountDownLatch startSyncObj = new CountDownLatch(1);
-
- @Override
- public void run() {
- // Tell main thread we have started.
- startSyncObj.countDown();
- try {
- // Wait for main thread to interrupt us so we
- // can race to exit.
- exitSyncObj.await();
- } catch (InterruptedException e) {
- // ignore because we expect one
- }
- }
-
- public static void main(String[] args) {
- CountStackFramesAtExit threads[] = new CountStackFramesAtExit[N_THREADS];
-
- for (int i = 0; i < N_THREADS; i++ ) {
- threads[i] = new CountStackFramesAtExit();
- int late_count = 1;
- threads[i].start();
- try {
- // Wait for the worker thread to get going.
- threads[i].startSyncObj.await();
-
- // This interrupt() call will break the worker out of
- // the exitSyncObj.await() call and the countStackFrames()
- // calls will come in during thread exit.
- threads[i].interrupt();
- for (; late_count <= N_LATE_CALLS; late_count++) {
- try {
- threads[i].countStackFrames();
- } catch (IllegalThreadStateException itse) {
- // ignore because we expect it
- }
-
- if (!threads[i].isAlive()) {
- // Done with Thread.countStackFrames() calls since
- // thread is not alive.
- break;
- }
- }
- } catch (InterruptedException e) {
- throw new Error("Unexpected: " + e);
- }
-
- System.out.println("INFO: thread #" + i + ": made " + late_count +
- " late calls to java.lang.Thread.countStackFrames()");
- System.out.println("INFO: thread #" + i + ": N_LATE_CALLS==" +
- N_LATE_CALLS + " value is " +
- ((late_count >= N_LATE_CALLS) ? "NOT " : "") +
- "large enough to cause a Thread.countStackFrames() " +
- "call after thread exit.");
-
- try {
- threads[i].join();
- } catch (InterruptedException e) {
- throw new Error("Unexpected: " + e);
- }
- threads[i].countStackFrames();
- if (threads[i].isAlive()) {
- throw new Error("Expected !Thread.isAlive() after thread #" +
- i + " has been join()'ed");
- }
- }
-
- String cmd = System.getProperty("sun.java.command");
- if (cmd != null && !cmd.startsWith("com.sun.javatest.regtest.agent.MainWrapper")) {
- // Exit with success in a non-JavaTest environment:
- System.exit(0);
- }
- }
-}
--- a/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/runtime/cds/appcds/CommandLineFlagCombo.java Thu Nov 07 18:44:09 2019 +0000
@@ -44,6 +44,7 @@
import jdk.test.lib.process.OutputAnalyzer;
import sun.hotspot.code.Compiler;
+import sun.hotspot.WhiteBox;
public class CommandLineFlagCombo {
@@ -128,6 +129,12 @@
return true;
}
+ if (!WhiteBox.getWhiteBox().isJFRIncludedInVmBuild() && testEntry.equals("-XX:+FlightRecorder"))
+ {
+ System.out.println("JFR does not exist");
+ return true;
+ }
+
return false;
}
}
--- a/test/hotspot/jtreg/runtime/cds/appcds/ExtraSymbols.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/runtime/cds/appcds/ExtraSymbols.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,6 +34,7 @@
import java.io.*;
import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.cds.CDSTestUtils;
public class ExtraSymbols {
static final String CDS_LOGGING = "-Xlog:cds,cds+hashtables";
@@ -46,10 +47,9 @@
checkOutput(output);
int numEntries1 = numOfEntries(output);
- // 2. Dump an archive with extra symbols. All symbols in
- // ExtraSymbols.symbols.txt are valid. Dumping should succeed.
+ // 2. Dump an archive with lots of extra symbols.
output = TestCommon.dump(appJar, TestCommon.list("Hello"), CDS_LOGGING,
- "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile("ExtraSymbols.symbols.txt"));
+ "-XX:SharedArchiveConfigFile=" + makeLotsExtraSymbols());
checkOutput(output);
int numEntries2 = numOfEntries(output);
if (numEntries2 <= numEntries1) {
@@ -86,4 +86,30 @@
output.shouldContain("Shared symbol table stats -------- base:");
output.shouldHaveExitValue(0);
}
+
+ static String makeLotsExtraSymbols() throws Exception {
+ String fileName = "LotsExtraSymbols.txt";
+ File f = new File(fileName);
+ try (FileWriter fw = new FileWriter(f)) {
+ fw.write("VERSION: 1.0\n");
+ fw.write("@SECTION: Symbol\n");
+ appendSymbol(fw, "This file is auto-generated by test/hotspot/jtreg/runtime/cds/appcds/ExtraSymbols.java. Do not edit.");
+ appendSymbol(fw, "Hello");
+ appendSymbol(fw, ""); // empty string
+ appendSymbol(fw, "Hello_\u0001"); // <128 escaping with \x
+ appendSymbol(fw, "Hello_\u00ff"); // <256 escaping with \x
+ appendSymbol(fw, "Hello_\u1234"); // >= 256 escaping with \x
+ appendSymbol(fw, "Hello_\uffff"); // >= 256 escaping with \x
+
+ for (int i = 0; i < 10000; i++) {
+ appendSymbol(fw, "NewSymbol" + Integer.toString(i));
+ }
+ }
+ return fileName;
+ }
+
+ private static void appendSymbol(FileWriter fw, String symbol) throws Exception {
+ fw.write(CDSTestUtils.formatArchiveConfigSymbol(symbol));
+ fw.write("\n");
+ }
}
--- a/test/hotspot/jtreg/runtime/cds/appcds/ExtraSymbols.symbols.txt Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10826 +0,0 @@
-VERSION: 1.0
-@SECTION: Symbol
-69 -1: ------------------------------------------------------------123456789
-68 -1: # The values in this file are only used for testing the operation of
-63 -1: # adding extra symbols into the CDS archive. None of the values
-70 -1: # are interpreted in any way. So even if they contain names of classes
-70 -1: # that have been renamed or removed, or string literals that have been
-66 -1: # changed or remove from Java source code, it would not affect the
-26 -1: # correctness of the test.
-0 -1:
-41 -1: (Ljava/util/Set<TE;>;Ljava/lang/Object;)V
-11 -1: linkMethod
-18 -1: type can't be null
-20 -1: isAlphaNumericString
-43 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;)Z
-72 -1: (Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Process;
-1 -1: \t
-15 -1: IntCumulateTask
-1 -1: \n
-33 -1: java/util/Locale$LocaleNameGetter
-23 -1: sun/invoke/util/Wrapper
-57 -1: (Ljava/io/InputStream;Ljava/nio/charset/CharsetDecoder;)V
-12 -1: reduceToLong
-11 -1: setReadOnly
-34 -1: (Ljava/lang/reflect/Executable;)[B
-54 -1: ([Ljava/net/URL;Ljava/security/AccessControlContext;)V
-15 -1: LegacyMergeSort
-8 -1: endsWith
-55 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue<TT;>;TT;)V
-20 -1: createAnnotationData
-6 -1: OfLong
-90 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<TK;TV;>;)Ljava/util/Map<TK;TV;>;
-1 -1:
-17 -1: getClassSignature
-1 -1: "
-1 -1: #
-1 -1: (
-21 -1: MethodHandleImpl.java
-10 -1: getUTF8At0
-1 -1: )
-1 -1: *
-1 -1: +
-1 -1: ,
-1 -1: -
-1 -1: .
-18 -1: unsignedEntryNames
-1 -1: /
-1 -1: 0
-19 -1: java/io/InputStream
-38 -1: java/util/concurrent/ThreadLocalRandom
-1 -1: :
-1 -1: ;
-1 -1: <
-13 -1: getAndAddLong
-1 -1: =
-1 -1: >
-1 -1: ?
-20 -1: getMethodAtIfLoaded0
-1 -1: @
-1 -1: A
-7 -1: isAlive
-1 -1: B
-10 -1: checkIndex
-1 -1: C
-1 -1: D
-1 -1: E
-1 -1: F
-1 -1: I
-30 -1: sun/misc/JavaUtilZipFileAccess
-11 -1: classloader
-1 -1: J
-1 -1: L
-14 -1: packageEnabled
-8 -1: ([BIII)V
-24 -1: Ljava/io/BufferedWriter;
-1 -1: S
-32 -1: (Ljava/util/function/Consumer;)V
-11 -1: refKindName
-1 -1: U
-1 -1: V
-3 1: yyy
-18 -1: JavaNetAccess.java
-1 -1: Z
-7 -1: members
-1 -1: [
-1 -1: ]
-13 -1: ShortLanguage
-1 -1: _
-9 -1: invoke__L
-28 -1: (D)Ljava/lang/StringBuilder;
-15 -1: isInvokeSpecial
-1 -1: c
-17 -1: subListRangeCheck
-1 -1: e
-29 -1: Ljava/security/AllPermission;
-27 -1: (C)Ljava/lang/StringBuffer;
-28 -1: ([Ljava/lang/Comparable;II)V
-50 -1: (Ljava/util/zip/ZipFile;Ljava/util/zip/Inflater;)V
-9 -1: invoke__V
-1 -1: m
-101 -1: (Ljava/io/OutputStream;Ljava/lang/Object;Ljava/nio/charset/CharsetEncoder;)Lsun/nio/cs/StreamEncoder;
-13 -1: MAX_SURROGATE
-18 -1: Ljava/lang/String;
-21 -1: ensureProtectedAccess
-18 -1: getIfModifiedSince
-1 -1: r
-9 -1: setExtra0
-1 -1: s
-47 -1: Ljava/lang/Enum<Lsun/launcher/LauncherHelper;>;
-1 -1: x
-1 -1: {
-7 -1: getLast
-1 -1: |
-1 -1: }
-1 -1: ~
-71 -1: (Ljava/lang/Object;)Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
-34 -1: (Ljava/nio/charset/Charset;[BII)[C
-10 -1: DST_NSHIFT
-25 -1: ForEachTransformedKeyTask
-26 -1: Ljava/nio/charset/Charset;
-56 -1: (Ljava/lang/reflect/Method;)Lsun/reflect/MethodAccessor;
-22 -1: StackTraceElement.java
-24 -1: sun.zip.zipFile.openTime
-27 -1: JNI_COPY_TO_ARRAY_THRESHOLD
-26 -1: java/lang/ClassValue$Entry
-19 -1: [Ljava/lang/Thread;
-56 -1: (Ljava/lang/ClassLoader$NativeLibrary;)Ljava/lang/Class;
-7 -1: message
-18 -1: parameterToArgSlot
-20 -1: [[Ljava/lang/String;
-11 -1: bumpVersion
-26 -1: Ljava/lang/reflect/Method;
-9 -1: getMethod
-6 -1: (I)TE;
-49 -1: (Ljava/lang/String;)Ljava/lang/invoke/MemberName;
-33 -1: sun/misc/URLClassPath$JarLoader$1
-57 -1: (BLjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)V
-33 -1: sun/misc/URLClassPath$JarLoader$2
-33 -1: sun/misc/URLClassPath$JarLoader$3
-87 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/HashMap$Node;)Ljava/util/HashMap$Node;
-19 -1: FileDescriptor.java
-12 -1: forEachValue
-36 -1: (Ljava/util/List;)[Ljava/lang/Class;
-53 -1: (Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;
-8 -1: hasArray
-4 -1: ROWS
-10 -1: linkMethod
-9 -1: remaining
-23 -1: ARRAY_FLOAT_BASE_OFFSET
-35 -1: java/lang/reflect/ReflectPermission
-24 -1: ()Ljava/net/InetAddress;
-7 -1: ngroups
-81 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Ljava/lang/Class<*>;>;
-10 -1: putTreeVal
-4 -1: list
-5 -1: trace
-7 -1: blocker
-21 -1: reset() not supported
-8 -1: JAPANESE
-11 -1: PRIVATE_USE
-53 -1: (Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodHandle;
-32 -1: Invalid JavaFX launch parameters
-15 -1: SECONDS_PER_DAY
-11 -1: UTF_16.java
-24 -1: sun/nio/cs/UTF_8$Encoder
-102 -1: (Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;[Ljava/security/Permission;)V
-20 -1: (Lsun/misc/Signal;)V
-22 -1: MagicAccessorImpl.java
-84 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/CodeSource;)Ljava/lang/Class;
-14 -1: altMetafactory
-13 -1: queryOverflow
-30 -1: exists, but is not accessible
-3 -1: edt
-14 -1: MAX_ARRAY_SIZE
-20 -1: aliases_UTF_16LE_BOM
-34 -1: Ljava/lang/reflect/Constructor<*>;
-20 -1: (S)Ljava/lang/Short;
-6 -1: STRICT
-19 -1: internalCallerClass
-27 -1: java/nio/DirectLongBufferRU
-13 -1: TIMED_WAITING
-15 -1: toGenericString
-6 -1: client
-10 -1: attachImpl
-22 -1: ReflectionFactory.java
-8 -1: jsse.jar
-37 -1: (IZ)Ljava/lang/AbstractStringBuilder;
-41 -1: java/util/LinkedHashMap$LinkedKeyIterator
-15 -1: computeIfAbsent
-10 -1: GET_TARGET
-53 -1: <E:Ljava/lang/Enum<TE;>;>(Ljava/lang/Class<TE;>;)[TE;
-35 -1: java/util/Collections$SingletonList
-7 -1: addYear
-35 -1: Ljava/lang/Class<Ljava/lang/Byte;>;
-65 -1: (Ljava/util/LinkedHashMap$Entry;Ljava/util/LinkedHashMap$Entry;)V
-14 -1: image/x-bitmap
-10 -1: (IIII[JI)V
-50 -1: (Lsun/misc/URLClassPath$JarLoader;Ljava/net/URL;)V
-13 -1: getLineNumber
-20 -1: toUpperCaseCharArray
-62 -1: (Ljava/util/concurrent/locks/Condition;)Ljava/util/Collection;
-11 -1: rotateRight
-10 -1: checkPtype
-85 -1: (JLjava/util/function/ToLongFunction<-TK;>;JLjava/util/function/LongBinaryOperator;)J
-81 -1: (Ljava/lang/Class;Ljava/lang/reflect/Constructor;)Ljava/lang/reflect/Constructor;
-15 -1: Illegal style:
-28 -1: (Ljava/lang/StringBuilder;)V
-41 -1: 1.8.0-internal-iklam_2013_11_27_21_25-b00
-25 -1: Invalid authority field:
-55 -1: (Ljava/lang/CharSequence;)Ljava/util/function/Supplier;
-12 -1: staticOffset
-32 -1: java/util/HashMap$KeySpliterator
-13 -1: javaNioAccess
-24 -1: (Ljava/util/SortedSet;)V
-17 -1: thenComparingLong
-2 -1: \n\n
-22 -1: registerFieldsToFilter
-34 -1: java/lang/invoke/LambdaMetafactory
-225 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceMappingsTask;Ljava/util/function/BiFunction;Ljava/util/function/BiFunction;)V
-26 -1: [[Ljava/lang/CharSequence;
-32 -1: java/util/Collections$CheckedMap
-147 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractSequentialList<TE;>;Ljava/util/List<TE;>;Ljava/util/Deque<TE;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
-204 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
-27 -1: sun/nio/cs/UTF_16BE$Decoder
-12 -1: getZoneInfo0
-77 -1: (Ljava/lang/Class;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodType;
-9 -1: Traverser
-35 -1: Ljava/lang/ref/ReferenceQueue<TT;>;
-27 -1: lambda$comparing$ea9a8b3a$1
-7 -1: ([CI)[C
-6 -1: getenv
-9 -1: newMethod
-52 -1: <T:Ljava/lang/Object;>Ljava/lang/reflect/Executable;
-164 -1: (Ljava/security/ProtectionDomain;Ljava/security/DomainCombiner;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;[Ljava/security/Permission;)V
-40 -1: (Ljava/lang/String;)Ljava/util/TimeZone;
-11 -1: countTokens
-202 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/concurrent/ConcurrentHashMap$CollectionView<TK;TV;Ljava/util/Map$Entry<TK;TV;>;>;Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;Ljava/io/Serializable;
-78 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;)Ljava/util/Collection<TT;>;
-34 -1: (Ljava/lang/reflect/Constructor;)I
-15 -1: comparingDouble
-24 -1: ()Ljava/util/Collection;
-14 -1: invokeFinalize
-14 -1: encodeISOArray
-77 -1: (Ljava/lang/ref/Reference;Ljava/lang/ref/Reference;)Ljava/lang/ref/Reference;
-11 -1: bad index:
-34 -1: (Ljava/lang/reflect/Constructor;)V
-68 -1: (Ljava/util/jar/JarEntry;Lsun/security/util/ManifestEntryVerifier;)V
-53 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;IIIJ)V
-27 -1: ([CII)Ljava/nio/CharBuffer;
-6 -1: setOut
-41 -1: (ILjava/lang/Object;Ljava/lang/Object;I)V
-12 -1: MIN_EXPONENT
-30 -1: PrivilegedExceptionAction.java
-18 -1: key cannot be null
-6 -1: CENHDR
-73 -1: (ITK;TV;Ljava/util/HashMap$Node<TK;TV;>;)Ljava/util/HashMap$Node<TK;TV;>;
-23 -1: java/lang/reflect/Array
-8 -1: AF_LIMIT
-2 -1: \r\n
-11 -1: getFileName
-10 -1: parseShort
-22 -1: java/lang/LinkageError
-15 -1: FT_LAST_WRAPPER
-32 -1: java/util/ArrayDeque$DeqIterator
-24 -1: pc-multilingual-850+euro
-3 -1: zfc
-14 -1: incrementExact
-38 -1: (IIII)Lsun/util/calendar/CalendarDate;
-8 -1: (II[BI)V
-8 -1: isLocked
-13 -1: ZoneInfo.java
-36 -1: (Lsun/util/calendar/CalendarDate;J)V
-35 -1: java/lang/invoke/MethodHandleImpl$1
-31 -1: (Ljava/util/Comparator<-TE;>;)V
-19 -1: CharsetEncoder.java
-52 -1: <T:Ljava/lang/Object;>()Ljava/util/Enumeration<TT;>;
-44 -1: (Ljava/io/InputStream;)Ljava/io/InputStream;
-7 -1: field
-5 -1: abort
-25 -1: java/lang/SecurityManager
-66 -1: java/util/concurrent/ConcurrentHashMap$MapReduceValuesToDoubleTask
-1316 -1: \xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe5\xa0\x80\xe4\x80\x8f\xe5\x80\x80\xe4\x80\x8f\xe5\xa0\x80\xe4\x80\x8f\xe6\x80\x80\xe4\x80\x8f\xe5\x80\x80\xe4\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe5\x80\x80\xe4\x80\x8f\xe5\x80\x80\xe4\x80\x8f\xe5\x80\x80\xe4\x80\x8f\xe5\xa0\x80\xe4\x80\x8f\xe6\x80\x80\xe4\x80\x8c\xe6\xa0\x80\x18\xe6\xa0\x80\x18\xe2\xa0\x80\x18\xe2\xa0\x80\xe6\x80\x9a\xe2\xa0\x80\x18\xe6\xa0\x80\x18\xe6\xa0\x80\x18\xee\xa0\x80\x15\xee\xa0\x80\x16\xe6\xa0\x80\x18\xe2\x80\x80\x19\xe3\xa0\x80\x18\xe2\x80\x80\x14\xe3\xa0\x80\x18\xe3\xa0\x80\x18\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe1\xa0\x80\xe3\x98\x89\xe3\xa0\x80\x18\xe6\xa0\x80\x18\xee\xa0\x80\x19\xe6\xa0\x80\x19\xee\xa0\x80\x19\xe6\xa0\x80\x18\xe6\xa0\x80\x18\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xc2\x82\xe7\xbf\xa1\xee\xa0\x80\x15\xe6\xa0\x80\x18\xee\xa0\x80\x16\xe6\xa0\x80\x1b\xe6\xa0\x80\xe5\x80\x97\xe6\xa0\x80\x1b\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xc2\x81\xe7\xbf\xa2\xee\xa0\x80\x15\xe6\xa0\x80\x19\xee\xa0\x80\x16\xe6\xa0\x80\x19\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe5\x80\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe4\xa0\x80\xe1\x80\x8f\xe3\xa0\x80\x0c\xe6\xa0\x80\x18\xe2\xa0\x80\xe6\x80\x9a\xe2\xa0\x80\xe6\x80\x9a\xe2\xa0\x80\xe6\x80\x9a\xe2\xa0\x80\xe6\x80\x9a\xe6\xa0\x80\x1c\xe6\xa0\x80\x18\xe6\xa0\x80\x1b\xe6\xa0\x80\x1c\xc0\x80\xe7\x80\x85\xee\xa0\x80\x1d\xe6\xa0\x80\x19\xe4\xa0\x80\xe1\x80\x90\xe6\xa0\x80\x1c\xe6\xa0\x80\x1b\xe2\xa0\x80\x1c\xe2\xa0\x80\x19\xe1\xa0\x80\xd8\x8b\xe1\xa0\x80\xd8\x8b\xe6\xa0\x80\x1b\xdf\xbd\xe7\x80\x82\xe6\xa0\x80\x18\xe6\xa0\x80\x18\xe6\xa0\x80\x1b\xe1\xa0\x80\xd4\x8b\xc0\x80\xe7\x80\x85\xee\xa0\x80\x1e\xe6\xa0\x80\xe0\xa0\x8b\xe6\xa0\x80\xe0\xa0\x8b\xe6\xa0\x80\xe0\xa0\x8b\xe6\xa0\x80\x18\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xe6\xa0\x80\x19\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xc2\x82\xe7\x80\x81\xdf\xbd\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xe6\xa0\x80\x19\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xc2\x81\xe7\x80\x82\xd8\x9d\xe7\x80\x82
-6 -1: (J[I)I
-162 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/util/Locale;>;Ljava/util/Locale$FilteringMode;)Ljava/util/List<Ljava/util/Locale;>;
-21 -1: getQualifiedFieldName
-46 -1: Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;
-47 -1: (Ljava/util/Collection;Ljava/util/Collection;)Z
-10 -1: getRuntime
-30 -1: threadLocalRandomSecondarySeed
-18 -1: (Ljava/io/File;I)J
-10 -1: methodName
-34 -1: sun/reflect/generics/tree/TypeTree
-35 -1: (Ljava/io/File;)[Ljava/lang/String;
-31 -1: java/util/Collections$EmptyList
-15 -1: LF_INVINTERFACE
-9 -1: notifyAll
-18 -1: (Ljava/io/File;I)V
-94 -1: (Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class<*>;
-45 -1: (Ljava/lang/String;)Ljava/net/ContentHandler;
-3 -1: enc
-3 -1: end
-18 -1: (Ljava/io/File;I)Z
-47 -1: (Ljava/lang/Object;Ljava/lang/reflect/Method;)V
-76 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
-19 -1: getURLStreamHandler
-46 -1: (Ljava/lang/ClassLoader;Ljava/lang/Class<*>;)V
-17 -1: COMPILE_THRESHOLD
-15 -1: charset is null
-7 -1: ibm-912
-10 -1: basicTypes
-7 -1: ibm-914
-78 -1: (Ljava/lang/Class;Ljava/lang/ref/SoftReference;Ljava/lang/ref/SoftReference;)Z
-7 -1: ibm-915
-12 -1: JarFileEntry
-12 -1: setThreshold
-22 -1: (ILjava/lang/Object;)V
-55 -1: <T::Lsun/reflect/generics/tree/Tree;>Ljava/lang/Object;
-16 -1: Unknown signal:
-3 -1: zip
-13 -1: CR_UNMAPPABLE
-19 -1: getClassAtIfLoaded0
-21 -1: WindowsClientCounters
-29 -1: Ljava/lang/invoke/MethodType;
-91 -1: <E:Ljava/lang/Object;>Ljava/util/Collections$UnmodifiableList<TE;>;Ljava/util/RandomAccess;
-23 -1: StackOverflowError.java
-13 -1: Launcher.java
-9 -1: Signature
-7 -1: ibm-920
-153 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;ILjava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)V
-13 -1: setExtensions
-26 -1: [Ljava/lang/ref/Reference;
-7 -1: ibm-923
-12 -1: BMH.reinvoke
-34 -1: java/lang/IllegalArgumentException
-53 -1: (Ljava/lang/String;)Ljava/lang/NumberFormatException;
-5 -1: .dirs
-13 -1: finishToArray
-22 -1: (ZI)Ljava/lang/String;
-84 -1: (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/RuntimeException;
-15 -1: charsetProvider
-24 -1: ()Ljava/lang/Class<TT;>;
-10 -1: wordsInUse
-26 -1: (Ljava/io/ExpiringCache;)I
-53 -1: ()Ljava/util/Iterator<Ljava/util/Map$Entry<TK;TV;>;>;
-25 -1: com/sun/management/GcInfo
-26 -1: getCompatibilityExtensions
-69 -1: (Ljava/lang/ref/ReferenceQueue;Ljava/util/concurrent/ConcurrentMap;)V
-15 -1: getConstantPool
-24 -1: [[Ljava/lang/Comparable;
-26 -1: (Ljava/io/ExpiringCache;)V
-8 -1: getTable
-53 -1: sun/reflect/generics/repository/ConstructorRepository
-5 -1: range
-36 -1: (Ljava/lang/String;)Ljava/lang/Byte;
-72 -1: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;)V
-60 -1: <T:Ljava/lang/Object;>([TT;TT;Ljava/util/Comparator<-TT;>;)I
-20 -1: (Ljava/nio/Bits$1;)V
-30 -1: ()Ljava/util/Spliterator<TK;>;
-6 -1: ([BB)I
-53 -1: (Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V
-11 -1: memberTypes
-45 -1: (ILjava/lang/String;)Ljava/lang/StringBuffer;
-12 -1: OTHER_SYMBOL
-65 -1: (Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-43 -1: (Ljava/util/Set;)[Ljava/lang/reflect/Field;
-30 -1: (Ljava/lang/ref/Reference$1;)V
-18 -1: GREGORIAN_INSTANCE
-31 -1: Ljava/lang/FunctionalInterface;
-57 -1: (Ljava/lang/Error;Ljava/lang/Exception;)Ljava/lang/Error;
-54 -1: ([Ljava/lang/reflect/Field;)[Ljava/lang/reflect/Field;
-14 -1: not an array:
-6 -1: ([BB)V
-9 -1: ISO8859_1
-8 -1: addTrans
-27 -1: getFunctionalInterfaceClass
-29 -1: lambda$comparingInt$7b0bb60$1
-8 -1: TreeNode
-138 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/Dictionary<TK;TV;>;Ljava/util/Map<TK;TV;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
-3 -1: era
-22 -1: fakeMethodHandleInvoke
-9 -1: addToList
-39 -1: (Ljava/lang/Class;[Ljava/lang/String;)V
-17 -1: launchApplication
-21 -1: randomNumberGenerator
-51 -1: Ljava/lang/ThreadLocal<Ljava/lang/ThreadLocal<*>;>;
-35 -1: java/io/ObjectOutputStream$PutField
-42 -1: (ILjava/util/function/IntBinaryOperator;)I
-3 -1: err
-13 -1: cachedDecoder
-32 -1: sun/util/calendar/ZoneInfoFile$1
-23 -1: doIntersectionPrivilege
-19 -1: cspc850multilingual
-56 -1: Ljava/util/Map<Ljava/lang/Class<*>;[Ljava/lang/String;>;
-11 -1: loader_data
-27 -1: (Ljava/util/jar/Manifest;)V
-5 -1: files
-90 -1: Ljava/util/concurrent/ConcurrentMap<Ljava/lang/String;Lsun/util/calendar/CalendarSystem;>;
-36 -1: [[Ljava/lang/invoke/LambdaForm$Name;
-5 -1: lines
-55 -1: (Lsun/misc/URLClassPath$JarLoader;)Lsun/misc/MetaIndex;
-9 -1: ansi-1251
-15 -1: refKindIsMethod
-29 -1: java/lang/reflect/Constructor
-3 -1: est
-19 -1: Lsun/misc/Launcher;
-109 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedExceptionAction<TT;>;Ljava/security/AccessControlContext;)TT;
-10 -1: getOffsets
-9 -1: removeAll
-23 -1: java/util/regex/Matcher
-8 -1: sumCount
-7 -1: implies
-10 -1: MAIN_CLASS
-75 -1: (Ljava/util/List<Lsun/launcher/LauncherHelper$StdArg;>;)[Ljava/lang/String;
-11 -1: getISO3Code
-4 -1: high
-53 -1: (TK;Ljava/util/function/BiFunction<-TK;-TV;+TV;>;)TV;
-17 -1: setNormalizedDate
-23 -1: AbstractRepository.java
-28 -1: java/util/LinkedList$ListItr
-8 -1: isFrozen
-38 -1: (Ljava/lang/String;Z)Ljava/lang/Class;
-16 -1: ReflectUtil.java
-30 -1: ()Ljava/util/stream/IntStream;
-57 -1: (Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;
-11 -1: getResource
-16 -1: ThreadDeath.java
-24 -1: unmodifiableNavigableSet
-59 -1: (Ljava/lang/String;)Ljava/util/Enumeration<Ljava/net/URL;>;
-24 -1: java.security.auth.debug
-58 -1: (Ljava/io/FileInputStream;)Ljava/nio/channels/FileChannel;
-25 -1: ()Ljava/util/Enumeration;
-11 -1: getInstance
-6 -1: MONDAY
-15 -1: jdkMinorVersion
-16 -1: newThreadWithAcc
-6 -1: CENHOW
-32 -1: Max. Heap Size (Estimated):
-61 -1: (Ljava/lang/invoke/MethodType;Z)Ljava/lang/invoke/LambdaForm;
-11 -1: windows-932
-7 -1: Index:
-11 -1: composeList
-6 -1: utf-16
-6 -1: ibm437
-10 -1: getJarFile
-8 -1: , rem =
-13 -1: multiNewArray
-14 -1: getDefaultPort
-39 -1: Ljava/security/cert/CertificateFactory;
-10 -1: L_RESERVED
-19 -1: getMethodAtIfLoaded
-8 -1: needCast
-8 -1: IS_FIELD
-15 -1: ClassValue.java
-31 -1: ()Ljava/util/function/Supplier;
-125 -1: (Ljava/lang/Class<*>;)Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;Ljava/lang/annotation/Annotation;>;
-34 -1: lambda$comparingByValue$827a17d5$1
-4 -1: NONE
-21 -1: java/nio/DoubleBuffer
-33 -1: ()Lsun/reflect/LangReflectAccess;
-26 -1: invalid compression method
-6 -1: (TK;)Z
-16 -1: FT_UNCHECKED_REF
-14 -1: getGenericType
-17 -1: pathSeparatorChar
-8 -1: writeUTF
-8 -1: NO_PROXY
-188 -1: (Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/nio/charset/Charset;>;)V
-13 -1: finalRefCount
-12 -1: NF_checkCast
-6 -1: utf-32
-26 -1: (Ljava/util/ArrayDeque;I)Z
-19 -1: prefetchWriteStatic
-14 -1: computeInvoker
-5 -1: cap=
-19 -1: generateCertificate
-15 -1: methodModifiers
-3 -1: exc
-27 -1: ()Lsun/misc/JavaLangAccess;
-5 -1: State
-14 -1: NullComparator
-10 -1: getClassAt
-15 -1: printProperties
-110 -1: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Class;IILjava/lang/String;[B[B)Ljava/lang/reflect/Constructor;
-40 -1: (Ljava/util/List<*>;Ljava/util/Random;)V
-63 -1: ()[Ljava/lang/reflect/TypeVariable<Ljava/lang/reflect/Method;>;
-28 -1: (I)Ljava/lang/StringBuilder;
-48 -1: ([DIILjava/util/function/DoubleBinaryOperator;)V
-3 -1: exp
-11 -1: interpret_L
-17 -1: Serializable.java
-8 -1: FJDouble
-12 -1: HashMap.java
-9 -1: sys_paths
-17 -1: getMainAttributes
-14 -1: asDoubleBuffer
-10 -1: buildNames
-26 -1: TOPLEVEL_WINDOW_PERMISSION
-4 -1: Type
-31 -1: (Ljava/util/Collection<+TE;>;)V
-64 -1: (Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class<*>;
-100 -1: <E:Ljava/lang/Object;>(Ljava/util/Collection<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/Collection<TE;>;
-10 -1: checkError
-31 -1: (Ljava/util/Collection<+TE;>;)Z
-31 -1: java/lang/NoSuchMethodException
-6 -1: attach
-87 -1: (BLjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-9 -1: writeChar
-44 -1: java/util/ArraysParallelSortHelpers$FJObject
-34 -1: (Ljava/lang/Class;Ljava/io/File;)Z
-21 -1: java/util/zip/ZipFile
-5 -1: dirty
-6 -1: (JIZ)V
-12 -1: leftoverChar
-39 -1: is being loaded in another classloader
-10 -1: writeBytes
-6 -1: unlink
-41 -1: (TT;Ljava/lang/ref/ReferenceQueue<TT;>;)V
-21 -1: getBootstrapResources
-95 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/io/Serializable;
-10 -1: PathStatus
-25 -1: java/io/InputStreamReader
-15 -1: ISO_8859-9:1989
-37 -1: java/lang/ExceptionInInitializerError
-14 -1: exceptionTypes
-19 -1: BufferedReader.java
-34 -1: Could not create SecurityManager:
-13 -1: definePackage
-12 -1: getAndAddInt
-50 -1: (Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
-30 -1: (Ljava/lang/SecurityManager;)V
-12 -1: fxLaunchName
-22 -1: BINARYSEARCH_THRESHOLD
-29 -1: JVMTI_THREAD_STATE_TERMINATED
-9 -1: fullFence
-60 -1: (Ljava/lang/String;Z)Ljava/util/Enumeration<Ljava/net/URL;>;
-29 -1: java/lang/Thread$WeakClassKey
-47 -1: (Ljava/nio/charset/Charset;Ljava/lang/String;)V
-8 -1: (TV;)TV;
-60 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Object;I)V
-47 -1: java/security/cert/CertificateEncodingException
-12 -1: BA_DIRECTORY
-53 -1: (Ljava/lang/Class;ZLjava/lang/Class;)Ljava/util/List;
-9 -1: checkRead
-6 -1: <init>
-4 -1: args
-17 -1: genericMethodType
-10 -1: writeFloat
-26 -1: Can't handle static method
-49 -1: (Ljava/lang/String;)Ljava/lang/invoke/MethodType;
-22 -1: MapReduceKeysToIntTask
-17 -1: jvm_micro_version
-29 -1: (Ljava/util/Map<+TK;+TV;>;Z)V
-40 -1: ([Ljava/lang/Object;Ljava/lang/Object;)I
-7 -1: vmindex
-22 -1: maybeCompileToBytecode
-89 -1: Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl;
-11 -1: getLauncher
-17 -1: jvm_major_version
-36 -1: ([IIII)Ljava/util/Spliterator$OfInt;
-40 -1: ([Ljava/lang/Object;Ljava/lang/Object;)V
-33 -1: IllegalMonitorStateException.java
-73 -1: ([ILjava/util/function/IntUnaryOperator;)Ljava/util/function/IntConsumer;
-39 -1: (Ljava/lang/String;)Ljava/lang/Package;
-29 -1: java/lang/CharacterDataLatin1
-52 -1: (Ljava/lang/annotation/Annotation;)Ljava/lang/Class;
-49 -1: (Ljava/lang/CharSequence;II)Ljava/nio/CharBuffer;
-53 -1: (Ljava/lang/Object;)Ljava/nio/charset/CharsetDecoder;
-22 -1: Ljava/net/FileNameMap;
-16 -1: isAnonymousClass
-4 -1: item
-7 -1: compute
-12 -1: user.country
-22 -1: malformed context url:
-16 -1: jvm_build_number
-69 -1: (Ljava/lang/ThreadLocal;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-17 -1: getDirectionality
-4 -1: save
-8 -1: UNMARKED
-58 -1: (Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
-12 -1: searchFields
-9 -1: frequency
-23 -1: getLocalizedInputStream
-2 -1:
-126 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Object;ILjava/lang/Class<*>;)Ljava/util/List<Ljava/lang/invoke/MemberName;>;
-39 -1: (Ljava/lang/String;Z)Ljava/lang/String;
-7 -1: setZone
-2 -1: "
-9 -1: checkRef(
-11 -1: loadFromXML
-49 -1: (Ljava/util/jar/JarFile;Ljava/util/Enumeration;)V
-68 -1: (IILsun/util/calendar/CalendarDate;)Lsun/util/calendar/CalendarDate;
-2 -1: (
-54 -1: (Ljava/util/TimeZone;)Lsun/util/calendar/CalendarDate;
-6 -1: rewind
-13 -1: getAndSetLong
-30 -1: java/lang/invoke/MethodHandles
-11 -1: ListPattern
-97 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractList<TE;>;Ljava/util/RandomAccess;Ljava/io/Serializable;
-25 -1: (Ljava/io/InputStream;I)V
-9 -1: setMethod
-10 -1: H_REG_NAME
-39 -1: ([Ljava/lang/Object;)Ljava/lang/Object;
-16 -1: AbstractMap.java
-68 -1: Ljava/util/Hashtable<Ljava/lang/String;Ljava/net/URLStreamHandler;>;
-58 -1: (Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Process;
-23 -1: getFileSystemAttributes
-12 -1: toSurrogates
-2 -1: !/
-5 -1: empty
-24 -1: isUnicodeIdentifierStart
-35 -1: sun/nio/cs/StandardCharsets$Classes
-27 -1: [Ljava/security/Permission;
-13 -1: getDefinition
-11 -1: permission=
-42 -1: (ILjava/lang/String;)Ljava/nio/ByteBuffer;
-69 -1: (Ljava/util/List<Ljava/lang/Class<*>;>;)Ljava/lang/invoke/MethodType;
-3 1: zzz
-17 -1: hasLongPrimitives
-2 -1: !=
-13 -1: getInterfaces
-2 -1: "
-11 -1: noInflation
-14 -1: aliases_UTF_16
-2 -1: ")
-17 -1: ()Ljava/util/Map;
-55 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
-6 -1: charAt
-12 -1: getStringAt0
-10 -1: superClone
-28 -1: Ljava/util/AbstractSet<TK;>;
-40 -1: java/lang/ref/Reference$ReferenceHandler
-22 -1: NaturalOrderComparator
-9 -1: markValue
-9 -1: getRegion
-26 -1: null permissions parameter
-17 -1: Ljava/util/Stack;
-14 -1: codebase=<URL>
-36 -1: (Ljava/util/List;)Ljava/lang/Object;
-17 -1: setJavaLangAccess
-16 -1: hasQueuedThreads
-5 -1: (CC)I
-8 -1: toString
-5 -1: (CC)J
-11 -1: permissions
-10 -1: getHeaders
-27 -1: java/io/BufferedInputStream
-21 -1: unicodelittleunmarked
-51 -1: (Ljava/net/URLClassLoader;Ljava/util/Enumeration;)V
-14 -1: generateMethod
-11 -1: skipForward
-55 -1: java/util/concurrent/ConcurrentHashMap$ForEachEntryTask
-5 -1: (CC)Z
-15 -1: getURLClassPath
-84 -1: Ljava/lang/invoke/MethodType$ConcurrentWeakInternSet<Ljava/lang/invoke/MethodType;>;
-23 -1: primitiveParameterCount
-8 -1: security
-14 -1: aliases_UTF_32
-22 -1: ()Ljava/util/Set<TK;>;
-9 -1: listFiles
-15 -1: insertElementAt
-42 -1: Ljava/util/Comparator<Ljava/lang/String;>;
-11 -1: getUserInfo
-46 -1: ([JIILjava/util/function/LongBinaryOperator;)V
-23 -1: (Ljava/util/Iterator;)V
-46 -1: ([Ljava/lang/Object;II)Ljava/util/Spliterator;
-67 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Object;)Ljava/lang/Object;
-14 -1: normalizeMonth
-13 -1: getStackTrace
-51 -1: java/lang/invoke/MethodType$ConcurrentWeakInternSet
-8 -1: makeChar
-2 -1: %%
-9 -1: getTarget
-21 -1: packageDefinitionLock
-52 -1: java/util/concurrent/ConcurrentHashMap$ValueIterator
-12 -1: OTHER_NUMBER
-22 -1: java/util/jar/JarEntry
-11 -1: access$1000
-16 -1: NON_SPACING_MARK
-13 -1: last-modified
-68 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Ljava/lang/Void;>;
-16 -1: Australia/Darwin
-55 -1: (Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;)V
-29 -1: Ljava/lang/ref/WeakReference;
-19 -1: expungeStaleEntries
-41 -1: Ljava/security/PrivilegedActionException;
-6 -1: update
-23 -1: (Ljava/lang/Object;JB)V
-10 -1: newUpdater
-39 -1: (Ljava/net/URL;)Ljava/util/jar/JarFile;
-25 -1: Ljava/net/ContentHandler;
-21 -1: ARRAY_INT_INDEX_SCALE
-13 -1: hasSurrogates
-27 -1: (Ljava/lang/ThreadGroup;Z)Z
-20 -1: createGCNotification
-21 -1: negative day of week
-11 -1: getInIfOpen
-22 -1: java/util/RandomAccess
-24 -1: available locales =
-21 -1: AccessController.java
-44 -1: can not access a protected member of class
-4 -1: LONG
-15 -1: objectOnlyTypes
-75 -1: (Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/CharsetDecoder;)V
-14 -1: getFindClasses
-10 -1: storeFence
-16 -1: asNormalOriginal
-45 -1: (Ljava/lang/String;)Ljava/lang/StringBuilder;
-6 -1: millis
-16 -1: America/St_Johns
-38 -1: ()Ljava/lang/IllegalArgumentException;
-37 -1: DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
-15 -1: implReplaceWith
-29 -1: ([C)Ljava/lang/StringBuilder;
-15 -1: Appendable.java
-41 -1: (Ljava/lang/String;)Ljava/io/InputStream;
-26 -1: Illegal Initial Capacity:
-9 -1: checkBase
-7 -1: setYear
-15 -1: DISPLAY_VARIANT
-7 -1: getType
-31 -1: Ljava/lang/ref/Reference<+TT;>;
-15 -1: isFieldOrMethod
-35 -1: appendToClassPathForInstrumentation
-16 -1: LocaleNameGetter
-7 -1: compact
-55 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
-10 -1: dummyQueue
-3 -1: ROC
-2 -1: ("
-15 -1: checkPermission
-38 -1: java/util/zip/ZipFile$ZipEntryIterator
-8 -1: hexDigit
-8 -1: pairs:
-2 -1: ()
-2 -1: )\n
-43 -1: handler for url different from this handler
-15 -1: isAutoDetecting
-37 -1: (Ljava/util/LinkedList$Node<TE;>;)TE;
-11 -1: Unsafe.java
-12 -1: windows-1250
-39 -1: java/util/Collections$CheckedCollection
-12 -1: windows-1251
-15 -1: codePointAtImpl
-12 -1: windows-1252
-12 -1: windows-1253
-12 -1: windows-1254
-58 -1: (Ljava/lang/String;Ljava/lang/Integer;)Ljava/lang/Integer;
-5 -1: deref
-12 -1: windows-1255
-12 -1: windows-1256
-12 -1: windows-1257
-12 -1: windows-1258
-14 -1: FT_CHECKED_REF
-47 -1: (Ljava/util/Hashtable;Ljava/util/Hashtable$1;)V
-37 -1: (J)Lsun/util/calendar/Gregorian$Date;
-19 -1: checkPropertyAccess
-4 -1: file
-17 -1: emptyListIterator
-26 -1: sun/util/calendar/ZoneInfo
-14 -1: file.separator
-4 -1: fill
-62 -1: (Ljava/util/Spliterator$OfLong;Z)Ljava/util/stream/LongStream;
-18 -1: java/util/Iterator
-20 -1: reduceValuesToDouble
-12 -1: LF_CS_LINKER
-26 -1: java/util/Arrays$ArrayList
-45 -1: Ljava/util/concurrent/ConcurrentHashMap$Node;
-6 -1: skipLF
-2 -1: )=
-39 -1: (I[Ljava/lang/invoke/LambdaForm$Name;)I
-90 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;)V
-18 -1: parameterModifiers
-31 -1: (Ljava/util/Collection<+TK;>;)Z
-21 -1: proxy can not be null
-22 -1: java/io/FileDescriptor
-6 -1: Loader
-21 -1: numberOfTrailingZeros
-10 -1: addMapping
-39 -1: (I[Ljava/lang/invoke/LambdaForm$Name;)Z
-30 -1: java/util/Locale$LanguageRange
-20 -1: getReflectionFactory
-16 -1: shouldMeterInput
-56 -1: ([Ljava/lang/reflect/Method;)[Ljava/lang/reflect/Method;
-23 -1: sun/net/ProgressMonitor
-510 -1: \xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\x01\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\x01\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80\xc0\x80
-28 -1: java/util/Spliterator$OfLong
-24 -1: SynchronizedNavigableMap
-4 -1: find
-6 -1: unsafe
-31 -1: java/nio/ByteBufferAsIntBufferB
-2 -1: ,\n
-6 -1: [ call
-14 -1: registerFilter
-10 -1: ValuesView
-9 -1: untreeify
-59 -1: ([Ljava/lang/Object;IILjava/util/function/BinaryOperator;)V
-13 -1: getSimpleName
-41 -1: (Ljava/util/Vector;Ljava/util/Vector$1;)V
-31 -1: java/nio/ByteBufferAsIntBufferL
-45 -1: (Ljava/lang/reflect/Field;)Ljava/lang/Object;
-13 -1: getDefaultRef
-18 -1: mapAlternativeName
-30 -1: setDefaultAllowUserInteraction
-13 -1: cannotCastMsg
-4 -1: )=>{
-7 -1: println
-2 -1: ,
-70 -1: (Ljava/nio/Buffer;IILjava/nio/Buffer;II)Ljava/nio/charset/CoderResult;
-32 -1: (ILjava/util/Collection<+TE;>;)Z
-9 -1: interpret
-104 -1: <E:Ljava/lang/Object;>(Ljava/util/NavigableSet<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/NavigableSet<TE;>;
-7 -1: advance
-86 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Ljava/lang/reflect/Field;>;
-11 -1: Stack trace
-6 -1: raise0
-68 -1: ()Ljava/util/Collections$UnmodifiableNavigableMap$EmptyNavigableMap;
-32 -1: sun/util/calendar/Gregorian$Date
-33 -1: java/lang/ref/ReferenceQueue$Lock
-19 -1: constructorAccessor
-6 -1: IBM367
-18 -1: CharacterData.java
-8 -1: parseURL
-32 -1: java/io/FilePermissionCollection
-7 -1: ([JI)[J
-9 -1: JIS_X0201
-2 -1: -1
-8 -1: encoding
-63 -1: ([Ljava/util/WeakHashMap$Entry;[Ljava/util/WeakHashMap$Entry;)V
-9 -1: localhost
-66 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;Ljava/lang/ThreadLocal$1;)V
-54 -1: (II[Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-67 -1: (Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
-14 -1: containsAllPDs
-23 -1: setAllowUserInteraction
-30 -1: Ljava/security/DomainCombiner;
-26 -1: Ljava/security/Permission;
-30 -1: serializePropertiesToByteArray
-112 -1: (Ljava/util/Iterator<Ljava/nio/charset/Charset;>;Ljava/util/Map<Ljava/lang/String;Ljava/nio/charset/Charset;>;)V
-2 -1: ..
-6 -1: LOCEXT
-2 -1: ./
-26 -1: (Ljava/nio/ByteBuffer;II)V
-18 -1: (Ljava/io/File;J)Z
-45 -1: (Ljava/lang/StringBuffer;Ljava/lang/String;)V
-17 -1: asCollectorChecks
-7 -1: actions
-5 -1: ([I)I
-20 -1: asChange_otherthread
-20 -1: forInputStreamReader
-69 -1: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
-5 -1: FINAL
-17 -1: staticPermissions
-44 -1: (Ljava/lang/Object;)Ljava/lang/StringBuffer;
-5 -1: ([I)V
-4 -1: swap
-10 -1: readOffset
-2 -1: /*
-112 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TK;+TU;>;Ljava/util/function/BiFunction<-TU;-TU;+TU;>;)TU;
-12 -1: isAsciiDigit
-2 -1: /-
-2 -1: /.
-2 -1: //
-5 -1: zones
-37 -1: (ILjava/lang/Object;)Ljava/util/List;
-17 -1: SHUFFLE_THRESHOLD
-32 -1: java/lang/CharacterDataUndefined
-23 -1: sun.reflect.noInflation
-11 -1: Can not set
-36 -1: (Ljava/util/Properties$LineReader;)V
-9 -1: debugName
-78 -1: (Ljava/util/HashMap$Node;Ljava/util/HashMap$Node;)Ljava/util/HashMap$TreeNode;
-6 -1: (III)J
-58 -1: (Ljava/util/List;Ljava/util/Collection;)Ljava/lang/String;
-19 -1: BufferedWriter.java
-148 -1: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;[Ljava/lang/Class<*>;[Ljava/lang/Class<*>;IILjava/lang/String;[B[B)Ljava/lang/reflect/Constructor<TT;>;
-6 -1: printf
-7 -1: signers
-2 -1: 0.
-4 -1: Date
-15 -1: findReplacement
-6 -1: (III)V
-32 -1: java/nio/ReadOnlyBufferException
-92 -1: ([Ljava/lang/String;)Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
-6 -1: (III)Z
-43 -1: (Ljava/lang/ClassValue;Ljava/lang/Object;)V
-32 -1: java/nio/ByteBufferAsLongBufferB
-16 -1: Constructor.java
-10 -1: removeLast
-9 -1: ([CII[B)I
-40 -1: ()Ljava/util/List<Ljava/lang/Class<*>;>;
-2 -1: 1.
-7 -1: VARARGS
-32 -1: java/nio/ByteBufferAsLongBufferL
-18 -1: java/lang/Shutdown
-40 -1: not supported, using ISO-8859-1 instead
-40 -1: Ljava/util/Collections$EmptyEnumeration;
-146 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/SortedMap<TK;TV;>;Ljava/lang/Class<TK;>;Ljava/lang/Class<TV;>;)Ljava/util/SortedMap<TK;TV;>;
-20 -1: aliases_UTF_32LE_BOM
-23 -1: getEnclosingConstructor
-2 -1: 0X
-11 -1: NO_TIMEZONE
-37 -1: ()Lsun/misc/JavaNioAccess$BufferPool;
-18 -1: printXUsageMessage
-9 -1: isPrivate
-63 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/invoke/MethodHandle;)V
-17 -1: maxSkipBufferSize
-76 -1: (Ljava/io/OutputStream;Ljava/lang/Object;Ljava/nio/charset/CharsetEncoder;)V
-40 -1: (Ljava/lang/String;II)Ljava/lang/String;
-17 -1: selectAlternative
-53 -1: [Ljava/util/concurrent/ConcurrentHashMap$CounterCell;
-87 -1: <S:Ljava/lang/Object;>(Ljava/util/function/Supplier<+TS;>;)Ljava/lang/ThreadLocal<TS;>;
-40 -1: Ljava/util/concurrent/ConcurrentHashMap;
-41 -1: (Ljava/lang/Character;)Ljava/lang/String;
-19 -1: getMemberRefInfoAt0
-14 -1: reduceToDouble
-18 -1: SUPPRESSED_CAPTION
-6 -1: CANADA
-64 -1: (IZ[Ljava/lang/Class<*>;[Ljava/lang/Class<*>;)Ljava/lang/String;
-12 -1: UnicodeBlock
-2 -1: 0x
-44 -1: (Ljava/lang/CharSequence;II)Ljava/io/Writer;
-23 -1: getPermissionCollection
-19 -1: threadLocalHashCode
-9 -1: createMap
-25 -1: checkForSpecialAttributes
-12 -1: Mark invalid
-36 -1: java/lang/CharSequence$1CharIterator
-11 -1: local time
-16 -1: Enumeration.java
-27 -1: (Ljava/util/zip/ZipEntry;)V
-11 -1: MATH_SYMBOL
-8 -1: filename
-24 -1: (Ljava/util/List<*>;II)V
-9 -1: bindCache
-18 -1: java/io/FileFilter
-12 -1: checkInvoker
-18 -1: OSEnvironment.java
-8 -1: EmptyMap
-11 -1: getIterator
-35 -1: java/util/function/IntUnaryOperator
-35 -1: java/util/WeakHashMap$EntryIterator
-90 -1: <E:Ljava/lang/Object;>(Ljava/util/Queue<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/Queue<TE;>;
-8 -1: batchFor
-16 -1: isValidCodePoint
-27 -1: ([Lsun/util/calendar/Era;)V
-16 -1: ThreadGroup.java
-33 2: sun/net/www/protocol/file/Handler
-7 -1: isField
-22 -1: sun/misc/OSEnvironment
-38 -1: Ljava/lang/Class<Ljava/lang/Boolean;>;
-12 -1: ADDRESS_SIZE
-8 -1: forDigit
-49 -1: (Ljava/lang/Object;)Ljava/util/WeakHashMap$Entry;
-13 -1: getCodeSource
-41 -1: ([Ljava/lang/Class<*>;)Ljava/lang/String;
-39 -1: (Ljava/util/function/Predicate<-TE;>;)Z
-13 -1: asFloatBuffer
-34 -1: ()Lsun/reflect/generics/tree/Tree;
-3 -1: ftp
-18 -1: maybeReBoxElements
-82 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/Class;)[[Ljava/lang/annotation/Annotation;
-48 -1: ()Ljava/util/Set<Ljava/util/Map$Entry<TK;TV;>;>;
-27 -1: (Ljava/util/NavigableMap;)V
-18 -1: parameterSlotCount
-20 -1: NF_getCallSiteTarget
-16 -1: aliases_US_ASCII
-13 -1: NF_staticBase
-31 -1: sun/reflect/ConstructorAccessor
-26 -1: guessContentTypeFromStream
-10 -1: Deprecated
-35 -1: System initialization has completed
-11 -1: initialized
-7 -1: compare
-15 -1: maxDirectMemory
-19 -1: setLastModifiedTime
-7 -1: (J[BZ)J
-12 -1: readEpochSec
-66 -1: (Ljava/lang/String;Ljava/lang/String;)Lsun/util/locale/BaseLocale;
-69 -1: ()Lsun/misc/JavaSecurityProtectionDomainAccess$ProtectionDomainCache;
-9 -1: Constants
-11 -1: valueOffset
-62 -1: (Ljava/util/Hashtable<Ljava/lang/String;Ljava/lang/Object;>;)V
-33 -1: java/lang/CharacterDataPrivateUse
-21 -1: Exception in thread "
-40 -1: ()Ljava/util/Set<Ljava/lang/Character;>;
-12 -1: Asia/Yerevan
-40 -1: (Ljava/lang/Throwable;)Ljava/lang/Error;
-25 -1: (IS)Ljava/nio/ByteBuffer;
-7 -1: (I[CI)I
-45 -1: java/nio/charset/UnmappableCharacterException
-23 -1: java/util/WeakHashMap$1
-21 -1: setFXLaunchParameters
-1250 -1: ADANDAEAREAFAFGAGATGAIAIAALALBAMARMANANTAOAGOAQATAARARGASASMATAUTAUAUSAWABWAXALAAZAZEBABIHBBBRBBDBGDBEBELBFBFABGBGRBHBHRBIBDIBJBENBLBLMBMBMUBNBRNBOBOLBQBESBRBRABSBHSBTBTNBVBVTBWBWABYBLRBZBLZCACANCCCCKCDCODCFCAFCGCOGCHCHECICIVCKCOKCLCHLCMCMRCNCHNCOCOLCRCRICUCUBCVCPVCWCUWCXCXRCYCYPCZCZEDEDEUDJDJIDKDNKDMDMADODOMDZDZAECECUEEESTEGEGYEHESHERERIESESPETETHFIFINFJFJIFKFLKFMFSMFOFROFRFRAGAGABGBGBRGDGRDGEGEOGFGUFGGGGYGHGHAGIGIBGLGRLGMGMBGNGINGPGLPGQGNQGRGRCGSSGSGTGTMGUGUMGWGNBGYGUYHKHKGHMHMDHNHNDHRHRVHTHTIHUHUNIDIDNIEIRLILISRIMIMNININDIOIOTIQIRQIRIRNISISLITITAJEJEYJMJAMJOJORJPJPNKEKENKGKGZKHKHMKIKIRKMCOMKNKNAKPPRKKRKORKWKWTKYCYMKZKAZLALAOLBLBNLCLCALILIELKLKALRLBRLSLSOLTLTULULUXLVLVALYLBYMAMARMCMCOMDMDAMEMNEMFMAFMGMDGMHMHLMKMKDMLMLIMMMMRMNMNGMOMACMPMNPMQMTQMRMRTMSMSRMTMLTMUMUSMVMDVMWMWIMXMEXMYMYSMZMOZNANAMNCNCLNENERNFNFKNGNGANINICNLNLDNONORNPNPLNRNRUNUNIUNZNZLOMOMNPAPANPEPERPFPYFPGPNGPHPHLPKPAKPLPOLPMSPMPNPCNPRPRIPSPSEPTPRTPWPLWPYPRYQAQATREREUROROURSSRBRURUSRWRWASASAUSBSLBSCSYCSDSDNSESWESGSGPSHSHNSISVNSJSJMSKSVKSLSLESMSMRSNSENSOSOMSRSURSSSSDSTSTPSVSLVSXSXMSYSYRSZSWZTCTCATDTCDTFATFTGTGOTHTHATJTJKTKTKLTLTLSTMTKMTNTUNTOTONTRTURTTTTOTVTUVTWTWNTZTZAUAUKRUGUGAUMUMIUSUSAUYURYUZUZBVAVATVCVCTVEVENVGVGBVIVIRVNVNMVUVUTWFWLFWSWSMYEYEMYTMYTZAZAFZMZMBZWZWE
-60 -1: Ljava/util/Set<Ljava/lang/Class<+Ljava/lang/ClassLoader;>;>;
-24 -1: ()Ljava/security/Policy;
-7 -1: initted
-44 -1: java/util/Collections$UnmodifiableCollection
-12 -1: Pacific/Apia
-23 -1: checkProxyPackageAccess
-7 -1: (I[CI)V
-64 -1: ([Ljava/lang/Object;IILjava/lang/Object;Ljava/util/Comparator;)I
-16 -1: getJavaNioAccess
-7 -1: reverse
-7 -1: nocerts
-16 -1: activeGroupCount
-34 -1: java/util/jar/JarFile$JarFileEntry
-7 -1: loaders
-9 -1: toRadians
-24 -1: java/util/HashMap$KeySet
-37 -1: (Ljava/lang/Class;)Ljava/lang/Object;
-6 -1: getRef
-6 -1: H_DASH
-17 -1: LinkageError.java
-66 -1: (Ljava/lang/invoke/MethodTypeForm;)Ljava/lang/invoke/MethodHandle;
-41 -1: (Ljava/nio/ByteBuffer;)Ljava/util/BitSet;
-10 -1: addMinutes
-58 -1: <T:Ljava/lang/Object;>([TT;II)Ljava/util/Spliterator<TT;>;
-9 -1: parseJars
-13 -1: getUnsignedCS
-28 -1: (Ljava/util/AbstractList;I)V
-22 -1: threadLocalRandomProbe
-19 -1: newDirectByteBuffer
-27 -1: Filter already registered:
-8 -1: unescape
-31 -1: sun/misc/URLClassPath$JarLoader
-6 -1: TAIWAN
-53 -1: <T:Ljava/lang/Object;>()Ljava/util/ListIterator<TT;>;
-17 -1: REVERSE_THRESHOLD
-31 -1: Java(TM) SE Runtime Environment
-7 -1: SECONDS
-70 -1: (Ljava/util/function/ToLongFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-7 -1: BLOCKED
-6 -1: Caches
-63 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;)V
-2 -1: :
-210 -1: (Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;Ljava/lang/annotation/Annotation;>;Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;Ljava/lang/annotation/Annotation;>;I)V
-153 -1: (JLjava/util/function/BiFunction<Ljava/util/Map$Entry<TK;TV;>;Ljava/util/Map$Entry<TK;TV;>;+Ljava/util/Map$Entry<TK;TV;>;>;)Ljava/util/Map$Entry<TK;TV;>;
-22 -1: ()Ljava/lang/Class<*>;
-28 -1: Ljava/lang/OutOfMemoryError;
-19 -1: writeFileDescriptor
-39 -1: Ljava/util/LinkedHashMap$Entry<TK;TV;>;
-26 -1: (ILjava/util/Collection;)Z
-18 -1: getEncodedInternal
-16 -1: ForEachValueTask
-23 -1: (Ljava/util/List<*>;I)V
-19 -1: SharedArchiveLoader
-20 -1: probeBackupLocations
-24 -1: java/lang/StringCoding$1
-28 -1: lookupContentHandlerClassFor
-36 -1: ()Lsun/misc/Launcher$ExtClassLoader;
-27 -1: reflectionFactoryAccessPerm
-14 -1: ACCESSOR_FORMS
-35 -1: ([JII)Ljava/util/stream/LongStream;
-34 -1: ISO-8859-1 charset not available:
-8 -1: cscesu-8
-2 -1: ;/
-17 -1: typeToPackageName
-34 -1: (Ljava/net/URL;)Ljava/lang/String;
-5 -1: (IZ)V
-25 -1: Prohibited package name:
-51 -1: (Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V
-108 -1: (JLjava/util/function/ToIntFunction<Ljava/util/Map$Entry<TK;TV;>;>;ILjava/util/function/IntBinaryOperator;)I
-12 -1: soleInstance
-27 -1: (Ljava/io/BufferedReader;)V
-71 -1: (Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetDecoder;
-17 -1: Ljava/lang/Class;
-38 -1: (Ljava/lang/String;)Ljava/lang/Double;
-10 -1: viewAsType
-22 -1: (Ljava/io/DataInput;)I
-22 -1: (Ljava/io/DataInput;)J
-105 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/WrongMethodTypeException;
-16 -1: setJavaNetAccess
-73 -1: (ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/util/HashMap$Node<TK;TV;>;
-22 -1: (Ljava/io/DataInput;)V
-14 -1: getHostAddress
-37 -1: sun/reflect/annotation/TypeAnnotation
-14 -1: ENCLOSING_MARK
-5 -1: FALSE
-14 -1: preDefineClass
-9 -1: newKeySet
-18 -1: getWaitQueueLength
-32 -1: ()Lsun/misc/URLClassPath$Loader;
-54 -1: (Ljava/nio/CharBuffer;I)Ljava/nio/charset/CoderResult;
-3 -1: SEP
-45 -1: (ITK;TV;Ljava/util/Hashtable$Entry<TK;TV;>;)V
-17 -1: getDeclaredFields
-7 -1: getDate
-10 -1: getClasses
-240 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceEntriesToIntTask;Ljava/util/function/ToIntFunction;ILjava/util/function/IntBinaryOperator;)V
-12 -1: WeakClassKey
-14 -1: LF_GEN_INVOKER
-25 -1: Ljava/lang/StringBuilder;
-2 -1: >
-9 -1: getJarMap
-4 -1: asin
-37 -1: (Ljava/net/URLStreamHandlerFactory;)V
-30 -1: not a constructor type or name
-4 -1: main
-22 -1: java/io/FilenameFilter
-22 -1: sun.java.launcher.diag
-30 -1: ()Ljava/util/Spliterator<TE;>;
-57 -1: <T::Ljava/lang/Comparable<-TT;>;>(Ljava/util/List<TT;>;)V
-86 -1: <T:Ljava/lang/Object;>(Ljava/lang/ThreadLocal<Ljava/lang/ref/SoftReference<TT;>;>;)TT;
-18 -1: canBeCalledVirtual
-9 -1: Shift_JIS
-24 -1: ()Ljava/util/ArrayDeque;
-32 -1: (Ljava/lang/Class$MethodArray;)V
-22 -1: java/lang/StringCoding
-33 -1: sun/util/locale/LocaleObjectCache
-20 -1: Sorry, deque too big
-38 -1: java/lang/Throwable$WrappedPrintWriter
-25 -1: (Ljava/io/InputStream;J)J
-44 -1: (Ljava/security/Permission;)Ljava/util/List;
-5 -1: thunk
-5 -1: props
-15 -1: getLastModified
-120 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap<Ljava/lang/String;Ljava/util/LinkedList<Ljava/lang/String;>;>;)V
-146 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MemberName;Ljava/lang/Class;Ljava/lang/invoke/MethodHandleImpl$1;)V
-27 -1: parseExtensionsDependencies
-10 -1: getRawType
-39 -1: (Ljava/nio/charset/CodingErrorAction;)V
-22 -1: ObjectStreamField.java
-6 -1: handle
-11 -1: hasPrevious
-18 -1: instanceof Float:
-52 -1: (ZLjava/io/OutputStream;Ljava/nio/charset/Charset;)V
-4 -1: make
-13 -1: isIdeographic
-26 -1: java/util/HashMap$EntrySet
-51 -1: (Ljava/util/Hashtable;)[Ljava/util/Hashtable$Entry;
-91 -1: (Ljava/lang/CharSequence;Ljava/lang/Iterable<+Ljava/lang/CharSequence;>;)Ljava/lang/String;
-13 -1: makeAllocator
-10 -1: , headless
-20 -1: expungeStaleElements
-58 -1: sun/reflect/annotation/TypeAnnotation$TypeAnnotationTarget
-41 -1: ([Ljava/lang/Object;Ljava/lang/Class$1;)V
-50 -1: <T:Ljava/lang/Object;>(I)Ljava/util/Iterator<TT;>;
-7 -1: TreeBin
-21 -1: Ljava/io/IOException;
-56 -1: (I[Ljava/lang/Class;)[Ljava/lang/invoke/LambdaForm$Name;
-6 -1: LOCFLG
-6 -1: DIRECT
-3 -1: SIG
-37 -1: java/security/NoSuchProviderException
-39 -1: " with illegal data type conversion to
-16 -1: getCodeSourceURL
-51 -1: java/util/concurrent/ConcurrentHashMap$EntrySetView
-47 -1: (Ljava/util/ArrayList;Ljava/util/ArrayList$1;)V
-6 -1: delete
-38 -1: sun/reflect/UnsafeFieldAccessorFactory
-11 -1: isDestroyed
-140 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;ILjava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$Node;)Z
-9 -1: unaligned
-36 -1: ()Lsun/misc/Launcher$AppClassLoader;
-57 -1: (Ljava/lang/String;Ljava/util/Locale;)[Ljava/lang/String;
-37 -1: sun/reflect/annotation/AnnotationType
-49 -1: <T:Ljava/lang/Object;>([TT;)Ljava/util/List<TT;>;
-24 -1: (S)Ljava/nio/ByteBuffer;
-6 -1: ([DD)I
-9 -1: setTarget
-29 -1: (IF)Ljava/lang/StringBuilder;
-12 -1: forBasicType
-10 -1: (IIII[BI)V
-8 -1: ([DIID)I
-9 -1: BASE_YEAR
-19 -1: ()Ljava/lang/Error;
-42 -1: (Ljava/util/Map<TE;Ljava/lang/Boolean;>;)V
-6 -1: ([DD)V
-14 -1: Illegal size:
-8 -1: ([DIID)V
-7 -1: (II[I)I
-17 -1: java_profile_name
-28 -1: java/util/AbstractCollection
-43 -1: (Ljava/net/URL;)[Ljava/security/CodeSource;
-62 -1: (Lsun/misc/URLClassPath$JarLoader;)Ljava/net/URLStreamHandler;
-33 -1: [Ljava/util/HashMap$Node<TK;TV;>;
-15 -1: (Native Method)
-11 -1: fileNameMap
-26 -1: ()Ljava/util/ListIterator;
-25 -1: java/util/LinkedList$Node
-18 -1: SELECT_ALTERNATIVE
-35 -1: (Ljava/lang/Object;)Ljava/util/Set;
-19 -1: java/io/IOException
-16 -1: : already loaded
-9 -1: image/gif
-6 -1: (TE;)I
-25 -1: (Ljava/util/Properties;)V
-40 -1: (Ljava/lang/String;)Ljava/nio/file/Path;
-19 -1: checkedNavigableMap
-9 -1: checkInt(
-17 -1: getContentTypeFor
-26 -1: ()Ljava/io/FileDescriptor;
-69 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V
-6 -1: (TE;)V
-25 -1: WARNING: Default charset
-14 -1: ZipFile closed
-2 -1: CA
-6 -1: (TE;)Z
-64 -1: java/util/concurrent/ConcurrentHashMap$MapReduceValuesToLongTask
-15 -1: FileSystem.java
-75 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
-10 -1: FileLoader
-44 -1: (Lsun/util/PreHashedMap;)[Ljava/lang/Object;
-19 -1: availableProcessors
-2 -1: CN
-36 -1: ([JII)Ljava/util/Spliterator$OfLong;
-11 -1: access$1100
-18 -1: getFieldAtIfLoaded
-30 -1: PrivilegedActionException.java
-6 -1: EUC-JP
-20 -1: (F)Ljava/lang/Float;
-22 -1: unable to instantiate
-31 -1: java/lang/reflect/ReflectAccess
-23 -1: (Ljava/lang/Object;JC)V
-3 -1: get
-59 -1: <T:Ljava/lang/Object;>([TT;IILjava/util/Comparator<-TT;>;)V
-2 -1: DE
-13 -1: GMT_ID_LENGTH
-7 -1: execute
-12 -1: MethodHandle
-18 -1: AllPermission.java
-54 -1: (Ljava/util/Locale;)Lsun/util/locale/LocaleExtensions;
-23 -1: MapReduceKeysToLongTask
-12 -1: varargsArray
-23 -1: java/util/jar/JarFile$1
-23 -1: java/util/jar/JarFile$2
-23 -1: java/util/jar/JarFile$3
-12 -1: getAndUpdate
-13 -1: reserveMemory
-17 -1: expungeStaleEntry
-6 -1: EUC-KR
-120 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/ref/WeakReference<Ljava/lang/Object;>;Ljava/util/Map$Entry<TK;TV;>;
-69 -1: (Ljava/lang/StringBuffer;Ljava/lang/String;)Ljava/util/regex/Matcher;
-26 -1: ()Ljava/util/NavigableMap;
-7 -1: L_PCHAR
-23 -1: (Ljava/lang/String$1;)V
-4 -1: KEYS
-37 -1: (Ljava/util/List;Ljava/lang/Object;)I
-31 -1: Ljava/lang/ArithmeticException;
-15 -1: [Ljava/net/URL;
-37 -1: (Ljava/util/List;Ljava/lang/Object;)V
-18 -1: MAX_HIGH_SURROGATE
-6 -1: (JCZ)V
-4 -1: mark
-17 -1: setMethodAccessor
-21 -1: java/io/ExpiringCache
-21 -1: PrivilegedAction.java
-21 -1: MappedByteBuffer.java
-2 -1: FR
-10 -1: copyMemory
-8 -1: L_SERVER
-13 -1: assertionLock
-12 -1: searchValues
-46 -1: (Ljava/util/Collection<*>;Ljava/lang/Object;)I
-21 -1: ProtectionDomainCache
-32 -1: USE_PREDEFINED_INTERPRET_METHODS
-2 -1: GB
-16 -1: getFinalRefCount
-23 -1: Ljava/lang/ClassLoader;
-4 -1: mask
-94 -1: <T:Ljava/lang/Object;>(Ljava/util/function/ToDoubleFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-4 -1: bind
-41 -1: (Ljava/lang/Class<*>;I)Ljava/lang/Object;
-9 -1: COUNT_GWT
-16 -1: DASH_PUNCTUATION
-24 -1: UNICODE_LOCALE_EXTENSION
-15 -1: checkInvariants
-10 -1: stringSize
-12 -1: deepHashCode
-30 -1: java/security/cert/Certificate
-19 -1: America/Los_Angeles
-19 -1: unmappableForLength
-6 -1: UTF-16
-10 -1: methodType
-21 -1: sun/misc/URLClassPath
-19 -1: META-INF/INDEX.LIST
-10 -1: jniVersion
-6 -1: IBM437
-29 -1: sun/reflect/FieldAccessorImpl
-21 -1: ()Ljava/lang/Package;
-32 -1: java/security/SecurityPermission
-57 -1: (Lsun/util/calendar/Era;)Lsun/util/calendar/CalendarDate;
-34 -1: [Ljava/util/concurrent/locks/Lock;
-11 -1: replacement
-20 -1: ()Ljava/lang/String;
-6 -1: resize
-12 -1: UTF_32BE_BOM
-26 -1: (Ljava/util/jar/JarFile;)V
-24 -1: DEFAULT_INITIAL_CAPACITY
-87 -1: (ILjava/lang/Object;Ljava/lang/Class;)Ljava/util/concurrent/ConcurrentHashMap$TreeNode;
-74 -1: (Ljava/util/jar/JarFile;)Ljava/util/Enumeration<Ljava/util/jar/JarEntry;>;
-18 -1: parameterSlotDepth
-26 -1: (Ljava/util/jar/JarFile;)Z
-18 -1: makePlatformString
-24 -1: doPrivilegedWithCombiner
-48 -1: (Ljava/lang/String;)Lsun/util/calendar/ZoneInfo;
-27 -1: ()Ljava/lang/ref/Reference;
-40 -1: java/util/ArrayList$ArrayListSpliterator
-67 -1: ([Ljava/lang/Object;IILjava/util/Comparator;[Ljava/lang/Object;II)V
-2 -1: ID
-19 -1: stringPropertyNames
-28 -1: (Ljava/util/Collections$1;)V
-12 -1: STATE_YELLOW
-12 -1: isNormalized
-10 -1: fromIndex(
-16 -1: getFloatVolatile
-37 -1: Lsun/util/calendar/BaseCalendar$Date;
-10 -1: properties
-17 -1: peakFinalRefCount
-102 -1: (Ljava/util/HashMap$Node<TK;TV;>;Ljava/util/HashMap$Node<TK;TV;>;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-68 -1: (Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;
-2 -1: IT
-9 -1: ([BI[BI)V
-51 -1: scl permissions SecureClassLoader assigns
-36 -1: (Ljava/util/Set;Ljava/lang/Object;)V
-11 -1: ([SII[SII)V
-21 -1: sun.io.useCanonCaches
-18 -1: Illegal capacity:
-22 -1: (Ljava/lang/Integer;)I
-83 -1: ([Ljava/lang/Object;Ljava/lang/StringBuilder;Ljava/util/Set<[Ljava/lang/Object;>;)V
-65 -1: (Ljava/util/HashMap<TK;TV;>;[Ljava/util/HashMap$Node<TK;TV;>;II)V
-17 -1: java/util/Objects
-48 -1: (ILjava/util/List;)Ljava/lang/invoke/LambdaForm;
-31 -1: java/util/Properties$XmlSupport
-10 -1: L_LOWALPHA
-13 -1: long overflow
-25 -1: NullPointerException.java
-32 -1: (I)Ljava/lang/StackTraceElement;
-34 -1: ()[Ljava/lang/reflect/Constructor;
-2 -1: JP
-3 -1: SST
-12 -1: ShortCountry
-48 -1: (Ljava/util/stream/Collector;)Ljava/lang/Object;
-29 -1: Lsun/reflect/CallerSensitive;
-10 -1: addElement
-12 -1: lastReturned
-6 -1: putInt
-34 -1: sun.misc.JarIndex.metaInfFilenames
-13 -1: getBaseLocale
-20 -1: StringTokenizer.java
-8 -1: entrySet
-11 -1: getTypeName
-17 -1: America/Sao_Paulo
-5 -1: \t...
-35 -1: (Lsun/util/calendar/CalendarDate;)I
-28 -1: java/lang/StackOverflowError
-35 -1: (Lsun/util/calendar/CalendarDate;)J
-10 -1: logicalAnd
-18 -1: csISOLatinCyrillic
-43 -1: (Ljava/lang/String;II)Ljava/nio/CharBuffer;
-73 -1: (Ljava/lang/Class<*>;[Ljava/lang/Class<*>;Z)Ljava/lang/invoke/MethodType;
-14 -1: aliases_MS1250
-14 -1: aliases_MS1251
-17 -1: getImplMethodKind
-17 -1: getLastAccessTime
-14 -1: aliases_MS1252
-14 -1: aliases_MS1253
-35 -1: (Lsun/util/calendar/CalendarDate;)V
-2 -1: KR
-14 -1: aliases_MS1254
-14 -1: getGenericInfo
-8 -1: utf_32be
-14 -1: aliases_MS1257
-35 -1: (Lsun/util/calendar/CalendarDate;)Z
-13 -1: StringEncoder
-7 -1: LDT2037
-7 -1: generic
-2 -1: L9
-45 -1: ([DLjava/util/function/IntToDoubleFunction;)V
-17 -1: isOtherAlphabetic
-9 -1: implWrite
-24 -1: PC-Multilingual-850+euro
-12 -1: valueMatches
-78 -1: (Ljava/lang/String;Lsun/util/locale/ParseStatus;)Lsun/util/locale/LanguageTag;
-3 -1: gmt
-19 -1: (Ljava/io/Reader;)V
-25 -1: (JJ)Ljava/nio/ByteBuffer;
-7 -1: val$url
-26 -1: (Ljava/nio/ByteBuffer;IJ)V
-10 -1: isImplicit
-19 -1: getDeclaredClasses0
-4 -1: (I)B
-4 -1: (I)C
-4 -1: (I)D
-9 -1: byteValue
-4 -1: (I)F
-5 -1: ([J)I
-6 -1: isLive
-5 -1: sleep
-4 -1: (I)I
-4 -1: (I)J
-6 -1: outBuf
-77 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractCollection<TE;>;Ljava/util/Set<TE;>;
-4 -1: (I)S
-5 -1: ([J)V
-4 -1: (I)V
-30 -1: (I[C)Ljava/lang/StringBuilder;
-14 -1: intBitsToFloat
-4 -1: (I)Z
-15 -1: MethodType.java
-14 -1: resolveSibling
-9 -1: Enum.java
-111 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;[Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)V
-14 -1: IS_CONSTRUCTOR
-4 -1: bits
-34 -1: java/security/PermissionCollection
-9 -1: autoFlush
-21 -1: java/util/Collections
-12 -1: bindReceiver
-20 -1: DMH.invokeStaticInit
-11 -1: charsetName
-14 -1: x-utf-32be-bom
-5 -1: cause
-7 -1: handle0
-43 -1: ([I[C[Ljava/lang/invoke/LambdaForm$Name;I)Z
-30 -1: getDefaultAllowUserInteraction
-18 -1: ConcurrentMap.java
-35 -1: (Ljava/lang/String;Z)Ljava/net/URL;
-33 -1: Ljava/nio/charset/CharsetDecoder;
-36 -1: java/lang/invoke/MethodHandleStatics
-34 -1: java/util/concurrent/ConcurrentMap
-16 -1: collectArguments
-22 -1: packageAssertionStatus
-79 -1: (JLjava/util/function/ToLongFunction;JLjava/util/function/LongBinaryOperator;)J
-39 -1: Cannot reflectively create enum objects
-62 -1: attempt to add a Permission to a readonly PermissionCollection
-22 -1: FieldAccessorImpl.java
-9 -1: ByteCache
-4 -1: TRUE
-85 -1: Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/Character;>;
-17 -1: java.library.path
-7 -1: encoder
-21 -1: default locale =
-11 -1: secondOfDay
-37 -1: (Lsun/util/calendar/ZoneInfoFile$1;)V
-35 -1: sun/reflect/UnsafeFieldAccessorImpl
-24 -1: (Ljava/lang/Object;JJJ)V
-16 -1: countStackFrames
-24 -1: (Ljava/lang/Object;JJJ)Z
-17 -1: nonfairTryAcquire
-20 -1: ArrayListSpliterator
-5 -1: /DMH=
-68 -1: (Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
-2 -1: PI
-8 -1: cspcp852
-112 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/util/Locale;>;)Ljava/util/Locale;
-8 -1: cspcp855
-58 -1: (Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z
-33 -1: sun/misc/PerfCounter$CoreCounters
-6 -1: CESU_8
-7 -1: vmslots
-4 -1: Init
-7 -1: handler
-11 -1: getProperty
-10 -1: isVolatile
-8 -1: ([J[IJ)I
-25 -1: ()Ljava/lang/ClassLoader;
-8 -1: asChange
-81 -1: (Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;
-12 -1: naturalOrder
-8 -1: getState
-40 -1: (Ljava/lang/Object;I)[Ljava/lang/String;
-36 -1: java/security/AccessControlException
-10 -1: linkBefore
-48 -1: (Ljava/util/HashMap;[Ljava/util/HashMap$Node;Z)V
-26 -1: (Ljava/util/WeakHashMap;)V
-23 -1: bad method type alias:
-7 -1: putChar
-18 -1: basicTypeSignature
-33 -1: sun/misc/InvalidJarIndexException
-13 -1: getPrivateuse
-14 -1: isConstantZero
-24 -1: java/io/FilePermission$1
-9 -1: Long.java
-19 -1: getLocaleExtensions
-10 -1: discovered
-17 -1: Invalid file path
-12 -1: MAX_MH_ARITY
-20 -1: observesDaylightTime
-31 -1: Ljava/lang/invoke/MethodHandle;
-6 -1: , end
-24 -1: java/io/FileDescriptor$1
-12 -1: loadLibrary.
-11 -1: Method.java
-12 -1: loadLibrary0
-23 -1: java/util/stream/Stream
-37 -1: sun.lang.ClassLoader.allowArraySyntax
-8 -1: appClass
-15 -1: FileReader.java
-5 -1: (IF)I
-29 -1: [Ljava/lang/ClassValue$Entry;
-12 -1: (principals
-30 -1: jar jar verification
-22 -1: ARRAY_CHAR_BASE_OFFSET
-18 -1: newDirectoryStream
-4 -1: atan
-5 -1: (IF)V
-24 -1: (Ljava/lang/Character;)I
-2 -1: TH
-10 -1: startsWith
-9 -1: baseCount
-13 -1: canonicalize0
-47 -1: (Ljava/lang/ClassLoader;[Ljava/lang/Class<*>;)V
-22 -1: Ljava/io/OutputStream;
-2 -1: TW
-10 -1: H_RESERVED
-19 -1: URLClassLoader.java
-16 -1: isAccessibleFrom
-59 -1: Ljava/util/Hashtable<Ljava/lang/Object;Ljava/lang/Object;>;
-33 -1: java/lang/invoke/ConstantCallSite
-14 -1: Ljava/net/URL;
-12 -1: deleteOnExit
-20 -1: MAX_SKIP_BUFFER_SIZE
-30 -1: [Ljava/lang/ref/WeakReference;
-15 -1: contentPathProp
-9 -1: initCause
-53 -1: (Ljava/util/Queue;Ljava/lang/Class;)Ljava/util/Queue;
-20 -1: java/util/TimeZone$1
-2 -1: UK
-86 -1: (BLjava/lang/Class;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;
-51 -1: (II[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-18 -1: Lsun/misc/Cleaner;
-31 -1: RuntimeInvisibleTypeAnnotations
-2 -1: US
-7 -1: makeInt
-40 -1: sun/reflect/annotation/AnnotationSupport
-28 -1: sun/reflect/misc/ReflectUtil
-8 -1: utf_32le
-40 -1: (Ljava/lang/Object;JLjava/lang/Object;)V
-24 -1: java/nio/file/WatchEvent
-66 -1: (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/invoke/MethodType;
-91 -1: (Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
-114 -1: (Ljava/lang/ThreadLocal;ILjava/lang/ThreadLocal$ThreadLocalMap$Entry;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-20 -1: internalWriteEntries
-79 -1: <T:Ljava/lang/Object;>(TT;Ljava/util/function/Supplier<Ljava/lang/String;>;)TT;
-14 -1: bitIndex < 0:
-88 -1: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
-6 -1: , len
-28 -1: java/io/BufferedOutputStream
-11 -1: System.java
-11 -1: csISOLatin1
-11 -1: csISOLatin2
-28 -1: Ljava/io/OutputStreamWriter;
-27 -1: IllegalAccessException.java
-11 -1: csISOLatin4
-14 -1: isDaylightTime
-11 -1: csISOLatin5
-21 -1: getYearLengthInMonths
-13 -1: canonicalizes
-93 -1: "'s signer information does not match signer information of other classes in the same package
-32 -1: ()Lsun/management/GcInfoBuilder;
-37 -1: (IILjava/nio/charset/CoderResult$1;)V
-10 -1: stateNames
-46 -1: (Ljava/lang/String;)Ljava/nio/charset/Charset;
-21 -1: acquireMethodAccessor
-2 -1: X-
-32 -1: java/security/ProtectionDomain$1
-5 -1: atan2
-32 -1: java/security/ProtectionDomain$2
-32 -1: java/security/ProtectionDomain$3
-41 -1: malformed input: partial character at end
-18 -1: dropParameterTypes
-44 -1: (Ljava/lang/String;)Ljava/lang/StringBuffer;
-18 -1: CalendarUtils.java
-5 -1: month
-84 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Ljava/lang/ClassLoader;>;
-33 -1: sun/misc/JavaNioAccess$BufferPool
-18 -1: SearchMappingsTask
-38 -1: DelegatingConstructorAccessorImpl.java
-80 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Class<*>;)Ljava/lang/invoke/MemberName;
-8 -1: instance
-54 -1: Parameter annotations don't match number of parameters
-14 -1: createConstant
-35 -1: java/lang/invoke/MemberName$Factory
-4 -1: scrt
-34 -1: Ljava/lang/InstantiationException;
-20 -1: allowUserInteraction
-15 -1: java/util/Deque
-16 -1: forEachRemaining
-35 -1: (J)Lsun/util/calendar/CalendarDate;
-13 -1: no such field
-25 -1: java/nio/file/FileSystems
-16 -1: expectedModCount
-44 -1: (Ljava/io/File;ILjava/nio/charset/Charset;)V
-12 -1: createString
-15 -1: useDaylightTime
-31 -1: java/util/Properties$LineReader
-111 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Class<*>;I[Ljava/lang/invoke/MemberName;)I
-16 -1: java/util/Locale
-26 -1: URLClassPath.getResource("
-58 -1: (Ljava/util/SortedMap;Ljava/lang/Class;Ljava/lang/Class;)V
-10 -1: appendTail
-7 -1: cleaner
-78 -1: (Lsun/nio/cs/FastCharsetProvider;Ljava/lang/String;)Ljava/nio/charset/Charset;
-18 -1: convertOldISOCodes
-4 -1: year
-38 -1: java/lang/ReflectiveOperationException
-28 -1: (Ljava/lang/StringBuffer;B)V
-27 -1: (D)Ljava/lang/StringBuffer;
-17 -1: emptyNavigableSet
-7 -1: indices
-10 -1: is sealed
-21 -1: SPECIFICATION_VERSION
-3 -1: TE;
-8 -1: addMonth
-24 -1: java/util/HashMap$Values
-17 -1: SEARCH_ALL_SUPERS
-18 -1: uncaught exception
-14 -1: declaredFields
-2 -1: [B
-2 -1: [C
-8 -1: ABSTRACT
-2 -1: [D
-2 -1: [F
-2 -1: [I
-2 -1: [J
-5 -1: false
-36 -1: (Ljava/net/URL;Ljava/lang/String;J)V
-12 -1: equalContext
-11 -1: VOID_RESULT
-2 -1: [S
-24 -1: (JLjava/lang/Object;JJ)V
-36 -1: Ljava/security/PermissionCollection;
-2 -1: [Z
-17 -1: floatToRawIntBits
-2 -1: []
-21 -1: ()[Ljava/lang/Thread;
-20 -1: [Ljava/lang/Integer;
-42 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Z)V
-19 -1: checkPrintJobAccess
-40 -1: (Ljava/lang/Object;)Ljava/lang/Class<*>;
-31 -1: (Lsun/reflect/FieldAccessor;Z)V
-10 -1: reallyPoll
-52 -1: (Ljava/lang/ref/Reference;)Ljava/lang/ref/Reference;
-100 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TV;+TU;>;Ljava/util/function/Consumer<-TU;>;)V
-19 -1: CheckedNavigableMap
-48 -1: (Ljava/lang/String;)Ljava/lang/RuntimeException;
-35 -1: java/util/Hashtable$ValueCollection
-89 -1: (JLjava/util/function/ToDoubleFunction<-TK;>;DLjava/util/function/DoubleBinaryOperator;)D
-10 -1: Stack.java
-57 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Object;I)V
-12 -1: getTimeOfDay
-12 -1: reduceValues
-22 -1: warnUnsupportedCharset
-34 -1: (Ljava/lang/ref/Reference<+TS;>;)Z
-31 -1: EEE, dd MMM yyyy HH:mm:ss 'GMT'
-19 -1: setCachedLambdaForm
-21 -1: (I)Ljava/lang/Object;
-85 -1: (Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;Ljava/util/Locale$1;)V
-36 -1: java/security/AccessControlContext$1
-27 -1: Lsun/net/www/MessageHeader;
-23 -1: ()[Ljava/lang/Class<*>;
-14 -1: refKindIsValid
-41 -1: sun/reflect/NativeConstructorAccessorImpl
-6 -1: binary
-23 -1: ()Ljava/nio/CharBuffer;
-8 -1: getSpace
-45 -1: bootstrap method failed to produce a CallSite
-15 -1: getISO3Language
-17 -1: TRANSITION_NSHIFT
-163 -1: ([Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;)Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
-7 -1: os.name
-38 -1: java/util/function/IntToDoubleFunction
-8 -1: checkInt
-21 -1: java/lang/VerifyError
-42 -1: sunpkcs11 SunPKCS11 provider debugging
-19 -1: URI is not absolute
-23 -1: java/io/DataInputStream
-53 -1: (Ljava/lang/Object;)Ljava/nio/charset/CharsetEncoder;
-2 -1: _#
-41 -1: (Ljava/io/FilenameFilter;)[Ljava/io/File;
-26 -1: Ljava/util/jar/Attributes;
-7 -1: collect
-17 -1: Lsun/misc/Unsafe;
-97 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
-78 -1: <T:Ljava/lang/Object;>(Ljava/util/Enumeration<TT;>;)Ljava/util/ArrayList<TT;>;
-28 -1: (II)Ljava/lang/StringBuffer;
-54 -1: (Ljava/lang/reflect/Constructor<*>;)Ljava/lang/String;
-28 -1: ()Ljava/util/ResourceBundle;
-48 -1: java/util/ArraysParallelSortHelpers$FJInt$Sorter
-9 -1: no access
-57 -1: <S:Ljava/lang/Object;>Ljava/lang/ref/ReferenceQueue<TS;>;
-7 -1: getPerf
-11 -1: getClassAt0
-11 -1: rtypeOffset
-20 -1: thread can't be null
-12 -1: addArguments
-12 -1: utf_32le_bom
-21 -1: allowThreadSuspension
-25 -1: defaultExpectedLineLength
-11 -1: removeFirst
-13 -1: reduceEntries
-20 -1: Read-ahead limit < 0
-57 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<-TT;>;[TT;)Z
-39 -1: ()Ljava/lang/invoke/MemberName$Factory;
-13 -1: ZipCoder.java
-16 -1: java/lang/Thread
-27 -1: java/lang/NoSuchMethodError
-66 -1: (Ljava/util/jar/JarFile;Ljava/net/URL;)[Ljava/security/CodeSource;
-22 -1: java/lang/StringBuffer
-3 -1: TK;
-34 -1: (I)Ljava/lang/invoke/MethodHandle;
-30 -1: (Ljava/lang/reflect/Method;Z)V
-13 -1: file.encoding
-14 -1: removeTreeNode
-27 -1: sun/misc/JavaSecurityAccess
-58 -1: ([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;
-19 -1: equalLimitedContext
-22 -1: appendVmSynonymMessage
-10 -1: applyAsInt
-23 -1: privateGetPublicMethods
-11 -1: dumpThreads
-25 -1: RuntimeVisibleAnnotations
-37 -1: (IF)Ljava/lang/AbstractStringBuilder;
-18 -1: getBooleanVolatile
-27 -1: (Ljava/util/zip/ZipFile;J)V
-25 -1: INITIAL_QUOTE_PUNCTUATION
-51 -1: (Ljava/util/Map;)[Ljava/lang/annotation/Annotation;
-54 -1: (ILjava/lang/Object;)Ljava/lang/AbstractStringBuilder;
-20 -1: reflectionDataOffset
-2 1: aa
-51 -1: (Ljava/util/jar/Attributes$Name;)Ljava/lang/String;
-13 -1: transferLinks
-18 -1: java/util/Vector$1
-10 -1: ensureOpen
-22 -1: getDeclaredConstructor
-2 -1: am
-19 -1: NF_allocateInstance
-66 -1: (Ljava/util/Spliterator$OfDouble;Z)Ljava/util/stream/DoubleStream;
-6 -1: ([SS)I
-17 -1: newReflectionData
-19 -1: subclassAuditsQueue
-11 -1: access$1200
-16 -1: ValueSpliterator
-18 -1: preparedLambdaForm
-38 -1: (Ljava/net/URL;)Ljava/net/InetAddress;
-14 -1: getMaxPriority
-32 -1: ()[Ljava/lang/StackTraceElement;
-67 -1: java/util/concurrent/ConcurrentHashMap$MapReduceEntriesToDoubleTask
-62 -1: (Ljava/util/Hashtable<Ljava/lang/String;Ljava/lang/String;>;)V
-6 -1: EXTHDR
-14 -1: java/util/Date
-2 -1: az
-6 -1: ([SS)V
-15 -1: arrayBaseOffset
-9 -1: isTrusted
-23 -1: (Ljava/lang/Object;JD)V
-2 -1: bb
-10 -1: ([BII[BI)V
-7 -1: toLower
-14 -1: invoke_LLLLL_L
-7 -1: jarfile
-42 -1: (Ljava/lang/String;)Lsun/misc/PerfCounter;
-28 -1: java/lang/ref/Reference$Lock
-16 -1: java/util/BitSet
-22 -1: jarfile parsing error!
-18 -1: jdk_update_version
-14 -1: invoke_LLLLL_V
-20 -1: java/util/LinkedList
-22 -1: erasedInvokerWithDrops
-25 -1: timeout value is negative
-21 -1: getCalendarProperties
-25 -1: not a method descriptor:
-2 -1: cb
-31 -1: (Lsun/misc/JavaUtilJarAccess;)V
-2 -1: cd
-43 -1: Lsun/util/PreHashedMap<Ljava/lang/String;>;
-12 -1: getEntrySize
-2 -1: ce
-24 -1: guessContentTypeFromName
-2 -1: ch
-14 -1: JulianCalendar
-22 -1: [Ljava/lang/Cloneable;
-122 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractCollection<TE;>;Ljava/util/Deque<TE;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
-34 -1: Lsun/util/locale/BaseLocale$Cache;
-14 -1: LinkedEntrySet
-72 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractSet<TE;>;Ljava/io/Serializable;
-39 -1: ()Ljava/io/ObjectOutputStream$PutField;
-2 -1: cs
-8 -1: indexFor
-25 -1: (Ljava/util/List<+TE;>;)V
-7 -1: subpath
-11 -1: invokeExact
-14 -1: setFileNameMap
-22 -1: LangReflectAccess.java
-8 -1: referent
-34 -1: java/util/MissingResourceException
-77 -1: (Ljava/lang/String;Ljava/util/jar/Manifest;Ljava/net/URL;)Ljava/lang/Package;
-11 -1: ([FII[FII)V
-17 -1: getParameterCount
-18 -1: isMemberAccessible
-10 -1: getExtDirs
-69 -1: <T:Ljava/lang/Object;>(Ljava/util/List<-TT;>;Ljava/util/List<+TT;>;)V
-9 -1: getNextPC
-13 -1: setProperties
-2 -1: de
-16 -1: generateCertPath
-6 -1: decode
-16 -1: getDefaultParent
-50 -1: (Ljava/net/URL;[Ljava/security/cert/Certificate;)V
-24 -1: Certificate factory for
-35 -1: ()Ljava/lang/reflect/AnnotatedType;
-2 -1: ee
-12 -1: asLongBuffer
-7 -1: PRIVATE
-16 -1: aliases_UTF_32BE
-2 -1: en
-2 -1: eq
-7 -1: indexOf
-136 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class<+Ljava/lang/Throwable;>;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-24 -1: (Ljava/lang/Class<*>;I)V
-72 -1: (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/IllegalAccessException;
-35 -1: java/util/jar/JavaUtilJarAccessImpl
-24 -1: (Ljava/lang/Class<*>;I)Z
-2 -1: ex
-24 -1: getProtectionDomainCache
-101 -1: (Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;JLjava/security/AccessControlContext;)V
-3 -1: hit
-8 -1: UTF_16BE
-2 -1: fd
-16 -1: EmptyEnumeration
-4 -1: attr
-16 -1: fromIndex < -1:
-7 -1: getIntB
-22 -1: java/io/FilePermission
-2 -1: fr
-2 -1: fs
-7 -1: lazySet
-7 -1: getIntL
-37 -1: configfile JAAS ConfigFile loading
-24 -1: sun/nio/cs/StreamEncoder
-40 -1: (Ljava/time/ZoneId;)Ljava/util/TimeZone;
-132 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/BiConsumer;)V
-2 -1: gc
-18 -1: Ljava/lang/Thread;
-10 -1: cacheArray
-48 -1: (Ljava/util/jar/JarFile;)Ljava/util/jar/JarFile;
-61 -1: (Ljava/util/NavigableMap;Ljava/lang/Class;Ljava/lang/Class;)V
-8 -1: readByte
-7 -1: ([S[S)Z
-24 -1: findBootstrapClassOrNull
-2 -1: hb
-7 -1: REPLACE
-45 -1: ()Ljava/util/Enumeration<Ljava/lang/String;>;
-10 -1: isOverflow
-2 -1: he
-13 -1: getCachedJan1
-12 -1: getClassPath
-8 -1: leapYear
-31 -1: java/lang/invoke/MethodTypeForm
-10 -1: ANNOTATION
-20 -1: getGregorianCalendar
-11 -1: ISO_8859_13
-11 -1: ISO_8859_15
-6 -1: invoke
-2 -1: ht
-7 -1: ListItr
-15 -1: synchronizedMap
-7 -1: cleanup
-94 -1: (Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;)Lsun/reflect/annotation/AnnotationType;
-3 -1: TT;
-69 -1: (JLsun/util/calendar/CalendarDate;)Lsun/util/calendar/Gregorian$Date;
-81 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/HashMap$TreeNode<TK;TV;>;)Z
-20 -1: Min. Heap Size:
-33 -1: (IZ)Ljava/lang/invoke/MethodType;
-2 -1: id
-7 -1: ([DI)[D
-37 -1: (Ljava/lang/reflect/Constructor<*>;)I
-42 -1: <T::Ljava/lang/Comparable<-TT;>;>([TT;II)V
-13 -1: addSuppressed
-28 -1: internalMemberNameEnsureInit
-2 -1: in
-17 -1: getCompressedSize
-34 -1: sun/misc/Launcher$AppClassLoader$1
-88 -1: (Ljava/security/DomainCombiner;Ljava/lang/Class<*>;)Ljava/security/AccessControlContext;
-37 -1: (Ljava/lang/reflect/Constructor<*>;)V
-2 -1: is
-2 -1: it
-6 -1: ENDOFF
-4 -1: void
-2 -1: iw
-14 -1: emptySortedSet
-2 -1: ix
-17 -1: unicode-1-1-utf-8
-64 -1: (Ljava/lang/Class;Ljava/util/List;)Ljava/lang/invoke/MethodType;
-46 -1: (Lsun/misc/URLClassPath$Loader;)Ljava/net/URL;
-2 -1: ja
-13 -1: synchronized
-76 -1: ([DLjava/util/function/IntToDoubleFunction;)Ljava/util/function/IntConsumer;
-11 -1: wrapperType
-51 -1: <T:Ljava/lang/Object;>()Ljava/util/Comparator<TT;>;
-106 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/Object;
-17 -1: removeAllElements
-2 -1: ji
-24 -1: java/util/Vector$ListItr
-14 -1: getNestedTypes
-6 -1: L_MARK
-27 -1: Source does not fit in dest
-2 -1: l1
-2 -1: jp
-2 -1: l2
-4 -1: (J)B
-57 -1: (Ljava/lang/String;Ljava/util/Locale;I)Ljava/lang/String;
-4 -1: (J)C
-27 -1: ForEachTransformedValueTask
-2 -1: l4
-26 -1: java/util/Hashtable$KeySet
-4 -1: (J)D
-2 -1: l5
-39 -1: java/security/BasicPermissionCollection
-4 -1: (J)F
-2 -1: jv
-29 -1: MapReduceMappingsToDoubleTask
-18 -1: copyFromShortArray
-2 -1: l9
-3 -1: TV;
-4 -1: (J)I
-4 -1: (J)J
-23 -1: Lsun/util/calendar/Era;
-8 -1: x-EUC-TW
-15 -1: checkSetFactory
-7 -1: Special
-4 -1: (J)S
-4 -1: (J)V
-7 -1: invoke_
-25 -1: (IC)Ljava/nio/ByteBuffer;
-68 -1: (JLjava/util/concurrent/TimeUnit;)Ljava/nio/file/attribute/FileTime;
-36 -1: ()Ljava/net/URLStreamHandlerFactory;
-4 -1: (J)Z
-181 -1: <T:Ljava/lang/Object;>(Ljava/lang/Class<*>;Ljava/lang/ref/SoftReference<Ljava/lang/Class$ReflectionData<TT;>;>;Ljava/lang/ref/SoftReference<Ljava/lang/Class$ReflectionData<TT;>;>;)Z
-9 -1: getOffset
-46 -1: (ILjava/lang/String;)Ljava/lang/StringBuilder;
-7 -1: element
-15 -1: createByteArray
-17 -1: uncaughtException
-2 -1: ko
-29 -1: java/nio/file/DirectoryStream
-15 -1: getISOCountries
-246 -1: <NoSuchMemberException:Ljava/lang/ReflectiveOperationException;>(BLjava/lang/invoke/MemberName;Ljava/lang/Class<*>;Ljava/lang/Class<TNoSuchMemberException;>;)Ljava/lang/invoke/MemberName;^Ljava/lang/IllegalAccessException;^TNoSuchMemberException;
-7 -1: invoker
-17 -1: langReflectAccess
-10 -1: bindSingle
-23 -1: java/lang/reflect/Proxy
-2 -1: lb
-2 -1: lc
-29 -1: CREATE_CLASSLOADER_PERMISSION
-5 -1: isSet
-18 -1: ([Ljava/io/File;)V
-15 -1: urlNoFragString
-21 -1: DirectByteBuffer.java
-15 -1: java.class.path
-15 -1: createDirectory
-4 -1: GMT
-37 -1: sun/reflect/annotation/ExceptionProxy
-28 -1: (Ljava/util/Map<+TK;+TV;>;)V
-17 -1: getContentHandler
-26 -1: GenericDeclRepository.java
-56 -1: (Ljava/lang/String;)Ljava/lang/IllegalArgumentException;
-15 -1: getJavaIOAccess
-39 -1: java/util/Collections$EmptyListIterator
-34 -1: java/lang/ConditionalSpecialCasing
-82 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMBean;
-58 -1: (Ljava/util/function/ToIntFunction;)Ljava/util/Comparator;
-21 -1: ()Lsun/misc/Launcher;
-2 -1: lt
-92 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;IIILjava/util/concurrent/ConcurrentHashMap;)V
-8 -1: disjoint
-62 -1: (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V
-24 -1: ([Ljava/lang/Object;)TT;
-4 -1: lmap
-8 -1: SATURDAY
-12 -1: toStringUTF8
-91 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BinaryOperator;)Ljava/lang/Object;
-46 -1: pkcs11 PKCS11 session manager debugging
-27 -1: (Z)Ljava/lang/StringBuffer;
-7 -1: forEach
-17 -1: (Ljava/io/File;)I
-17 -1: (Ljava/io/File;)J
-5 -1: RESET
-6 -1: isFile
-14 -1: Exception.java
-8 -1: isPublic
-27 -1: computeInitialPreparedForms
-50 -1: (BZLjava/lang/Class;)Ljava/lang/invoke/LambdaForm;
-19 -1: getAvailableLocales
-17 -1: (Ljava/io/File;)V
-28 -1: ()Ljava/nio/charset/Charset;
-10 -1: appendNull
-17 -1: (Ljava/io/File;)Z
-23 -1: java/lang/InternalError
-2 -1: ne
-6 -1: radix
-8 -1: checksum
-66 -1: (Lsun/net/www/MessageHeader;Ljava/lang/String;Ljava/lang/Object;)V
-45 -1: (Ljava/io/FilenameFilter;)[Ljava/lang/String;
-8 -1: checkJar
-28 -1: default format locale =
-13 -1: normalizeTime
-26 -1: java/util/AbstractList$Itr
-30 -1: java/util/function/IntFunction
-7 -1: TIS-620
-12 -1: reverseBytes
-2 -1: of
-26 -1: java/lang/ClassFormatError
-109 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-10 -1: delimiters
-20 -1: indexOfSupplementary
-16 -1: aliases_UTF_32LE
-134 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<TK;TV;>;Ljava/lang/Class<TK;>;Ljava/lang/Class<TV;>;)Ljava/util/Map<TK;TV;>;
-17 -1: [Ljava/lang/Long;
-2 -1: or
-12 -1: getClassName
-31 -1: (Ljava/nio/charset/Charset;FF)V
-6 -1: ([FF)I
-39 -1: (Ljava/util/Locale;)[Ljava/lang/String;
-33 -1: java/util/WeakHashMap$KeyIterator
-8 -1: UTF_16LE
-12 -1: isISOControl
-75 -1: (Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;Z)Ljava/nio/charset/CoderResult;
-7 -1: ([I[I)Z
-28 -1: Self-causation not permitted
-6 -1: ([FF)V
-14 -1: defaultCharset
-12 -1: isJavaLetter
-2 -1: pm
-39 -1: cannot reflectively invoke MethodHandle
-20 -1: getSystemClassLoader
-42 -1: ([Ljava/lang/Object;IILjava/lang/Object;)I
-56 -1: (Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
-42 -1: ([Ljava/lang/Object;IILjava/lang/Object;)V
-12 -1: ZipFile.java
-43 -1: (Ljava/util/zip/ZipFile;)Ljava/lang/String;
-22 -1: Ljava/net/InetAddress;
-15 -1: getCharVolatile
-32 -1: ()[Ljava/lang/reflect/Parameter;
-13 -1: delimsChanged
-13 -1: getFileSystem
-13 -1: METHOD_RETURN
-20 -1: sun/misc/PerfCounter
-61 -1: (Ljava/util/HashMap<TK;TV;>;)Ljava/util/HashMap$Node<TK;TV;>;
-8 -1: newIndex
-18 -1: getDisplayLanguage
-36 -1: (C)Ljava/lang/AbstractStringBuilder;
-36 -1: java/lang/StringCoding$StringEncoder
-12 -1: forEachEntry
-23 -1: [Ljava/io/Serializable;
-13 -1: totalCapacity
-26 -1: java/io/FileOutputStream$1
-14 -1: signatureArity
-90 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/security/cert/Certificate;)V
-17 -1: reflectionFactory
-6 -1: ibm737
-17 -1: fillInStackTrace0
-16 -1: allocateInstance
-52 -1: (Lsun/util/locale/BaseLocale$Key;)Ljava/lang/String;
-9 -1: addExtURL
-16 -1: copyFromIntArray
-65 -1: (Ljava/security/Permission;Z)Ljava/security/PermissionCollection;
-57 -1: java/util/concurrent/ConcurrentHashMap$SearchMappingsTask
-10 -1: toEpochDay
-4 -1: gate
-24 -1: sun/nio/cs/UTF_8$Decoder
-8 -1: entries2
-18 -1: isCharsetSupported
-10 -1: toCustomID
-2 -1: rw
-33 -1: java/nio/ByteBufferAsFloatBufferB
-25 -1: (ID)Ljava/nio/ByteBuffer;
-12 -1: addTimeOfDay
-61 -1: (Ljava/security/ProtectionDomain;Ljava/security/Permission;)Z
-2 -1: sd
-25 -1: (Ljava/net/InetAddress;)V
-33 -1: java/nio/ByteBufferAsFloatBufferL
-2 -1: se
-15 -1: hasQueuedThread
-24 -1: assertMemberIsConsistent
-37 -1: java/util/Collections$UnmodifiableMap
-2 -1: sp
-20 -1: setJavaUtilJarAccess
-96 -1: (Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class;
-8 -1: language
-76 -1: <T:Ljava/lang/Object;>(Ljava/util/SortedSet<TT;>;)Ljava/util/SortedSet<TT;>;
-11 -1: findLibrary
-61 -1: (Ljava/lang/Class<*>;)Lsun/reflect/annotation/AnnotationType;
-6 -1: ([BZ)V
-24 -1: DEFAULT_BYTE_BUFFER_SIZE
-25 -1: (Ljava/util/ArrayList;I)V
-2 -1: th
-47 -1: (Ljava/util/Collection;)Ljava/util/Enumeration;
-49 -1: (Lsun/misc/URLClassPath$JarLoader;)Ljava/net/URL;
-7 -1: ([D[D)Z
-2 -1: to
-22 -1: java/util/Locale$Cache
-8 -1: iterator
-30 -1: (Ljava/lang/StringBuilder;IZ)V
-17 -1: ()Ljava/util/Set;
-2 -1: tr
-27 -1: (Ljava/nio/ByteBuffer;ISZ)V
-6 -1: method
-13 -1: allPermission
-9 -1: ruleArray
-8 -1: UTC_TIME
-10 -1: LF_COUNTER
-26 -1: Lsun/nio/cs/StreamDecoder;
-25 -1: ()Lsun/util/calendar/Era;
-6 -1: LOCHDR
-21 -1: sun/net/www/MimeTable
-12 -1: Cannot cast
-2 -1: us
-2 -1: ut
-52 -1: Ljava/lang/invoke/MethodHandle$PolymorphicSignature;
-6 -1: encode
-15 -1: CharBuffer.java
-24 -1: (C)Ljava/nio/ByteBuffer;
-56 -1: (Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;)V
-18 -1: getEnclosingMethod
-56 -1: (Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;)Z
-6 -1: ibm775
-9 -1: (IIIIII)I
-44 -1: ([JLjava/util/function/IntToLongFunction;I)V
-9 -1: (IIIIII)J
-64 -1: (Ljava/util/Locale$LocaleKey;)Lsun/util/locale/LocaleExtensions;
-2 -1: x-
-2 -1: vm
-5 -1: clock
-9 -1: (IIIIII)V
-10 -1: XmlSupport
-19 -1: sun/nio/cs/US_ASCII
-10 -1: toRealPath
-5 -1: cp367
-6 -1: ST_END
-58 -1: [Lsun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule;
-12 -1: hasSameRules
-108 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lsun/util/locale/LocaleExtensions;
-22 -1: java/lang/Class$Atomic
-4 -1: sync
-6 -1: listen
-12 -1: firstElement
-142 -1: (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/Class;IILjava/lang/String;[B[B[B)Ljava/lang/reflect/Method;
-18 -1: internalProperties
-28 -1: (Ljava/lang/StringBuffer;C)V
-7 -1: factory
-18 -1: ()Ljava/util/List;
-50 -1: (Ljava/util/concurrent/CountedCompleter;[D[DIIII)V
-44 -1: (Ljava/lang/Class;)Lsun/invoke/util/Wrapper;
-83 -1: (JLjava/util/function/ToDoubleFunction;DLjava/util/function/DoubleBinaryOperator;)D
-12 -1: erasedType:
-53 -1: (Ljava/util/AbstractList;Ljava/util/AbstractList$1;)V
-20 -1: Cannot find package
-27 -1: java/util/ArrayList$ListItr
-10 -1: copyMethod
-23 -1: java/lang/ThreadLocal$1
-16 -1: iso_646.irv:1983
-42 -1: (Ljava/lang/Thread;Ljava/lang/Throwable;)V
-19 -1: DEFAULT_LOAD_FACTOR
-40 -1: ([Ljava/lang/Object;)[Ljava/lang/Object;
-10 -1: (JJJ[BII)I
-12 -1: singletonMap
-8 -1: RESERVED
-9 -1: zipAccess
-21 -1: SynchronizedSortedMap
-4 -1: flag
-15 -1: UnmodifiableSet
-18 -1: WrappedPrintWriter
-7 -1: resume0
-2 -1: yi
-10 -1: erasedType
-31 -1: CHECK_AWT_EVENTQUEUE_PERMISSION
-8 -1: <clinit>
-59 -1: (Ljava/lang/String;)Ljava/security/cert/CertificateFactory;
-40 -1: java/lang/management/MemoryManagerMXBean
-33 -1: newGetIntIllegalArgumentException
-16 -1: iso_646.irv:1991
-58 -1: (Ljava/lang/ClassValue$Entry;)Ljava/lang/ClassValue$Entry;
-2 -1: zc
-26 -1: (Ljava/util/AbstractMap;)V
-6 -1: THROWS
-11 -1: toCharArray
-64 -1: (Ljava/lang/reflect/Constructor;)Ljava/lang/reflect/Constructor;
-2 -1: zh
-68 -1: Ljava/lang/ref/SoftReference<Ljava/lang/Class$ReflectionData<TT;>;>;
-25 -1: (Ljava/util/Collection;)V
-20 -1: getJdkSpecialVersion
-17 -1: getTypeParameters
-32 -1: [Ljava/lang/ClassValue$Entry<*>;
-25 -1: (Ljava/util/Collection;)Z
-26 -1: Lsun/nio/ch/Interruptible;
-5 -1: 0.0p0
-5 -1: CACHE
-7 -1: namesOK
-21 -1: Ljava/lang/Exception;
-51 -1: (Ljava/net/URL;Lsun/net/www/protocol/jar/Handler;)V
-19 -1: jdk_special_version
-66 -1: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;)Ljava/util/List<TT;>;
-75 -1: (Ljava/util/Comparator;Ljava/util/function/Function;)Ljava/util/Comparator;
-11 -1: Arrays.java
-19 -1: (Ljava/lang/Byte;)I
-17 -1: java/lang/Class$1
-17 -1: java/lang/Class$2
-17 -1: java/lang/Class$3
-47 -1: java/lang/invoke/MethodHandleImpl$WrappedMember
-17 -1: java/lang/Class$4
-44 -1: (Ljava/lang/Throwable;)Ljava/lang/Throwable;
-9 -1: charCount
-24 -1: ()Ljava/net/FileNameMap;
-44 -1: sun/util/locale/provider/TimeZoneNameUtility
-17 -1: not an array type
-2 -1: {}
-24 -1: (Lsun/misc/Launcher$1;)V
-12 -1: directMemory
-10 -1: parameters
-5 -1: java.
-14 -1: allocateDirect
-51 -1: (Ljava/lang/StringBuffer;)Ljava/lang/StringBuilder;
-23 -1: java/nio/file/Watchable
-37 -1: createDiagnosticFrameworkNotification
-54 -1: (Ljava/lang/Class<*>;Z)Ljava/lang/invoke/MethodHandle;
-35 -1: sun/nio/cs/StandardCharsets$Aliases
-9 -1: retDelims
-11 -1: MAX_ENTRIES
-12 -1: CumulateTask
-64 -1: java/util/concurrent/ConcurrentHashMap$ForEachTransformedKeyTask
-3 -1: iae
-12 -1: AF_PUTSTATIC
-21 -1: java/lang/Throwable$1
-45 -1: (Ljava/util/HashMap;)Ljava/util/HashMap$Node;
-77 -1: (JLjava/util/function/ToIntFunction;ILjava/util/function/IntBinaryOperator;)I
-5 -1: after
-29 -1: (Ljava/security/CodeSource;)Z
-248 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceValuesToDoubleTask;Ljava/util/function/ToDoubleFunction;DLjava/util/function/DoubleBinaryOperator;)V
-6 -1: H_URIC
-7 -1: L_DIGIT
-7 -1: toNanos
-24 -1: (D)Ljava/nio/ByteBuffer;
-25 -1: getDiagnosticCommandMBean
-6 2: [LFoo;
-14 -1: path.separator
-16 -1: toUnsignedString
-40 -1: DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
-87 -1: (Ljava/security/Permission;[Ljava/security/cert/Certificate;)Ljava/security/Permission;
-16 -1: inheritedChannel
-11 -1: audio/basic
-27 -1: sun.classloader.findClasses
-10 -1: queryCount
-20 -1: NF_ensureInitialized
-12 -1: getBufIfOpen
-23 -1: sun/nio/cs/UTF_16LE_BOM
-134 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;
-17 -1: getImplMethodName
-14 -1: linkMethod =>
-25 -1: Ljava/lang/invoke/Stable;
-32 -1: Ljava/lang/annotation/Retention;
-7 -1: doInput
-9 -1: -_.!~*'()
-62 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;B)V
-18 -1: separateWithCommas
-43 -1: com/sun/crypto/provider/CipherBlockChaining
-14 -1: createTempFile
-9 -1: implFlush
-20 -1: getOffsetsByStandard
-21 -1: OutOfMemoryError.java
-7 -1: jce.jar
-46 -1: java/util/Collections$UnmodifiableNavigableMap
-30 -1: (Ljava/io/File;)Ljava/io/File;
-15 -1: LinkedList.java
-15 -1: iso_8859-9:1989
-50 -1: sun/reflect/generics/factory/CoreReflectionFactory
-10 -1: : JVM has
-19 -1: HeapByteBuffer.java
-6 -1: getURL
-37 -1: java/security/cert/CertificateFactory
-23 -1: getAllowUserInteraction
-12 -1: otherParents
-25 -1: ARRAY_BOOLEAN_BASE_OFFSET
-9 -1: L_UPALPHA
-41 -1: ([Ljava/util/Hashtable$Entry<**>;TK;TV;)V
-6 -1: LOCHOW
-11 -1: access$1300
-30 -1: sun/reflect/MethodAccessorImpl
-130 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/util/Locale;>;)Ljava/util/List<Ljava/util/Locale;>;
-9 -1: MALFORMED
-38 -1: (Ljava/lang/String;I)Ljava/lang/Short;
-26 -1: File format not recognised
-12 -1: setTimeOfDay
-19 -1: java/lang/Exception
-15 -1: getOutputStream
-74 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-41 -1: (Ljava/lang/String;Z)Ljava/util/TimeZone;
-49 -1: Lsun/reflect/generics/repository/ClassRepository;
-8 -1: getCerts
-90 -1: (Ljava/lang/Class<*>;ZLjava/lang/Class<*>;)Ljava/util/List<Ljava/lang/invoke/MemberName;>;
-5 -1: clone
-32 -1: ()Ljava/lang/ref/Reference$Lock;
-15 -1: caseIgnoreMatch
-23 -1: (Ljava/util/Set<TE;>;)V
-25 -1: enumerateStringProperties
-9 -1: inherited
-4 -1: flip
-8 -1: setMonth
-38 -1: (Ljava/util/function/Consumer<-TV;>;)V
-55 -1: java/util/concurrent/ConcurrentHashMap$ReduceValuesTask
-37 -1: getJavaSecurityProtectionDomainAccess
-67 -1: (Ljava/util/NavigableSet;Ljava/lang/Class;)Ljava/util/NavigableSet;
-10 -1: reduceKeys
-14 -1: MAX_CODE_POINT
-24 -1: getGenericExceptionTypes
-8 -1: fraction
-30 -1: java/lang/InterruptedException
-46 -1: (Ljava/lang/String;II[BI)Ljava/nio/ByteBuffer;
-114 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>([Ljava/util/HashMap$Node<TK;TV;>;Ljava/util/HashMap$TreeNode<TK;TV;>;)V
-66 -1: (Ljava/lang/String;Ljava/lang/Throwable;)Ljava/lang/InternalError;
-45 -1: (Ljava/lang/Object;)Ljava/lang/StringBuilder;
-8 -1: putLongB
-101 -1: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/charset/CharsetDecoder;I)Lsun/nio/cs/StreamDecoder;
-16 -1: standardProvider
-14 -1: parameterCount
-59 -1: (Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/util/List;
-8 -1: putLongL
-12 -1: (TT;TV;TV;)Z
-37 -1: Lsun/reflect/ConstructorAccessorImpl;
-11 -1: ([CII[CII)V
-14 -1: parameterArray
-15 -1: | interpretName
-62 -1: (JLjava/util/function/Function;Ljava/util/function/Consumer;)V
-30 -1: (Z)Lsun/reflect/FieldAccessor;
-19 -1: jvm_special_version
-22 -1: java/util/ArrayDeque$1
-12 -1: initVersions
-22 -1: java/lang/CharSequence
-21 -1: NF_internalMemberName
-5 -1: ()TE;
-97 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;IZ)Ljava/lang/invoke/MethodHandle;
-25 -1: java/nio/MappedByteBuffer
-6 -1: addURL
-17 -1: isConvertibleFrom
-14 -1: extendWithType
-9 -1: interrupt
-11 -1: floorDivide
-16 -1: x-ISO-2022-CN-GB
-12 -1: CheckedQueue
-7 -1: setLong
-64 -1: (Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;)V
-108 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/NavigableMap<TK;TV;>;)Ljava/util/NavigableMap<TK;TV;>;
-38 -1: java/nio/channels/spi/SelectorProvider
-17 -1: makeGuardWithTest
-20 -1: (Ljava/util/List;Z)V
-8 -1: val$path
-12 -1: Runtime.java
-7 -1: channel
-71 -1: <T:Ljava/lang/Object;>([TT;IILjava/util/function/BinaryOperator<TT;>;)V
-18 -1: initializedHeaders
-32 -1: ()[Lsun/launcher/LauncherHelper;
-13 -1: jvInitialized
-10 -1: getSeconds
-7 -1: Decoder
-20 -1: getYearFromFixedDate
-6 -1: PREFIX
-21 -1: sun.boot.library.path
-11 -1: FIXED_DATES
-33 -1: (JLjava/util/function/Consumer;)V
-27 -1: initializeJavaAssertionMaps
-13 -1: toOctalString
-9 -1: fixResult
-10 -1: typeParams
-94 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;I)Ljava/util/concurrent/ConcurrentHashMap$Node;
-4 -1: Help
-11 -1: setIfNotSet
-39 -1: java/lang/UnsupportedOperationException
-15 -1: zip file closed
-8 -1: floorDiv
-10 -1: canExecute
-10 -1: encodeLoop
-18 -1: addRequestProperty
-56 -1: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;I)V
-10 -1: superclass
-5 -1: close
-56 -1: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;I)Z
-6 -1: ignore
-32 -1: ()Ljava/lang/ref/ReferenceQueue;
-19 -1: java/util/Formatter
-27 -1: java/lang/ClassLoaderHelper
-23 -1: (Ljava/lang/Object;JZ)V
-29 -1: java/nio/file/WatchEvent$Kind
-6 -1: CENLEN
-4 -1: SIZE
-68 -1: <T:Ljava/lang/Object;>(Ljava/util/Deque<TT;>;)Ljava/util/Queue<TT;>;
-9 -1: isEscaped
-12 -1: LF_INTERPRET
-22 -1: (I)Ljava/lang/Integer;
-60 -1: (Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName;
-49 -1: ([Ljava/lang/Class<*>;Ljava/lang/StringBuilder;)V
-11 -1: getZipEntry
-16 -1: metaInfFilenames
-27 -1: (Ljava/lang/StringBuffer;)V
-57 -1: (Ljava/lang/Object;)Ljava/util/WeakHashMap$Entry<TK;TV;>;
-76 -1: (Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class<*>;
-8 -1: ([CII)[B
-27 -1: (Ljava/lang/StringBuffer;)Z
-24 -1: getManifestFromReference
-8 -1: ([CII)[C
-10 -1: H_LOWALPHA
-18 -1: FileURLMapper.java
-12 -1: fxLaunchMode
-24 -1: isMethodHandleInvokeName
-17 -1: winTimeToFileTime
-19 -1: checkTopLevelWindow
-26 -1: MapReduceMappingsToIntTask
-13 -1: NORM_PRIORITY
-18 -1: lookupViaProviders
-30 -1: (I)Ljava/util/LinkedList$Node;
-3 -1: UTC
-10 -1: UNMAPPABLE
-68 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;B)V
-9 -1: META-INF/
-13 -1: Iterable.java
-71 -1: ([Ljava/lang/reflect/Field;Ljava/lang/String;)Ljava/lang/reflect/Field;
-9 -1: setOffset
-8 -1: FJObject
-50 -1: (Ljava/lang/CharSequence;)Ljava/util/StringJoiner;
-23 -1: java/nio/HeapByteBuffer
-23 -1: sun/util/PreHashedMap$1
-23 -1: sun/util/PreHashedMap$2
-34 -1: newGetCharIllegalArgumentException
-40 -1: jca JCA engine class debugging
-39 -1: (Ljava/lang/Object;I)Ljava/lang/Object;
-42 -1: (Ljava/lang/String;)Ljava/net/InetAddress;
-25 -1: (Ljava/net/FileNameMap;)V
-44 -1: (Ljava/util/SortedMap;)Ljava/util/SortedMap;
-52 -1: (Ljava/lang/String;Ljava/lang/Long;)Ljava/lang/Long;
-27 -1: ()[Ljava/util/HashMap$Node;
-29 -1: java/util/EmptyStackException
-16 -1: not a field type
-14 -1: Ljava/io/File;
-28 -1: ()[Ljava/security/Principal;
-69 -1: (Ljava/io/OutputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)V
-5 -1: ()TK;
-10 -1: ISO8859-13
-40 -1: java/lang/invoke/DirectMethodHandle$Lazy
-30 -1: The object is not initialized.
-10 -1: ISO8859-15
-88 -1: <E:Ljava/lang/Object;>(Ljava/util/List<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/List<TE;>;
-25 -1: (ZILjava/lang/String;II)Z
-9 -1: stackSize
-61 -1: (Ljava/util/Comparator;Ljava/lang/Object;Ljava/lang/Object;)I
-16 -1: synchronizedList
-90 -1: (Ljava/util/Comparator;Ljava/util/function/Function;Ljava/lang/Object;Ljava/lang/Object;)I
-9 -1: nullCheck
-174 -1: Ljava/util/concurrent/ConcurrentMap<Ljava/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry<TT;>;Ljava/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry<TT;>;>;
-14 -1: java/lang/Enum
-3 -1: int
-13 -1: detailMessage
-56 -1: java/util/concurrent/ConcurrentHashMap$SearchEntriesTask
-10 -1: ISO-8859-1
-10 -1: ISO-8859-2
-10 -1: ISO-8859-3
-10 -1: ISO-8859-4
-10 -1: ISO-8859-5
-10 -1: ISO-8859-6
-24 -1: ([Ljava/lang/Object;II)V
-10 -1: ISO-8859-7
-10 -1: ISO-8859-8
-139 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$Node;)[Ljava/util/concurrent/ConcurrentHashMap$Node;
-10 -1: ISO-8859-9
-5 -1: round
-25 -1: DIRECTIONALITY_WHITESPACE
-13 -1: NamedFunction
-10 -1: startAgent
-3 -1: ioe
-7 -1: closing
-24 -1: appendSchemeSpecificPart
-56 -1: sun/reflect/ReflectionFactory$GetReflectionFactoryAction
-83 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Lsun/reflect/ReflectionFactory;>;
-17 -1: isCharsetDetected
-11 -1: getJarFiles
-22 -1: getEnclosingMethodInfo
-11 -1: setReadable
-61 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;)V
-10 -1: attachment
-34 -1: (Ljava/io/File;)Ljava/lang/String;
-18 -1: ZipFileInputStream
-15 -1: CodeSource.java
-61 -1: (Ljava/util/jar/JarFile;)Ljava/util/List<Ljava/lang/Object;>;
-7 -1: cp00858
-108 -1: ([Ljava/lang/invoke/LambdaForm$Name;[Ljava/lang/invoke/LambdaForm$Name;II)Ljava/lang/invoke/LambdaForm$Name;
-38 -1: ([DII)Ljava/util/Spliterator$OfDouble;
-8 -1: val$name
-11 -1: LF_REINVOKE
-12 -1: validateTime
-17 -1: copyFromCharArray
-32 -1: throwSetIllegalArgumentException
-14 -1: fieldModifiers
-52 -1: (Ljava/lang/ClassValue;)Ljava/lang/ClassValue$Entry;
-58 -1: (Ljava/io/OutputStream;Ljava/nio/charset/CharsetEncoder;)V
-14 -1: generalInvoker
-11 -1: interrupted
-246 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceMappingsToLongTask;Ljava/util/function/ToLongBiFunction;JLjava/util/function/LongBinaryOperator;)V
-20 -1: java/util/Dictionary
-17 -1: getDoubleVolatile
-41 -1: (Ljava/lang/Class<*>;Ljava/lang/Object;)Z
-8 -1: intValue
-24 -1: (F)Ljava/nio/ByteBuffer;
-5 -1: reset
-54 -1: (ILjava/util/List;)[Ljava/lang/invoke/LambdaForm$Name;
-19 -1: [Ljava/util/Locale;
-43 -1: (Ljava/lang/String;II)Ljava/nio/ByteBuffer;
-38 -1: ()Ljava/io/ObjectInputStream$GetField;
-18 -1: [Locked by thread
-10 -1: checkedMap
-16 -1: checkedSortedMap
-14 -1: illegal symbol
-16 -1: TITLECASE_LETTER
-4 -1: root
-22 -1: (ZLjava/lang/String;)V
-27 -1: ([JII)Ljava/nio/LongBuffer;
-15 -1: printStackTrace
-30 -1: newConstructorForSerialization
-14 -1: getPermissions
-13 -1: toStringCache
-15 -1: equalParamTypes
-37 -1: throwFinalFieldIllegalAccessException
-35 -1: (Ljava/lang/String;Ljava/io/File;)V
-34 -1: java/nio/charset/CoderResult$Cache
-3 -1: .\n\n
-33 -1: Ljava/nio/charset/CharsetEncoder;
-11 -1: lambdaForms
-65 -1: <T::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TT;>;)TT;
-39 -1: (CLjava/lang/Class;Ljava/lang/Object;)Z
-3 -1: ise
-14 -1: forLanguageTag
-45 -1: ([Ljava/lang/Class<*>;[Ljava/lang/Class<*>;)Z
-36 -1: RuntimeInvisibleParameterAnnotations
-12 -1: binarySearch
-24 -1: getAssociatedAnnotations
-10 -1: decoderFor
-6 -1: ibm813
-10 -1: logicalXor
-10 -1: setVarargs
-71 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Void;)V
-4 -1: cast
-6 -1: ibm819
-23 -1: getParentDelegationTime
-8 -1: ([FII)[F
-4 -1: .tmp
-6 -1: (JII)J
-27 -1: ()Ljava/lang/ref/Finalizer;
-9 -1: sunec.jar
-22 -1: java/net/URLConnection
-41 -1: (Ljava/lang/Runnable;Ljava/lang/String;)V
-20 -1: SecurityManager.java
-18 -1: getZipFileOpenTime
-7 -1: country
-13 -1: inflaterCache
-4 -1:
-17 -1: java/lang/Runtime
-125 -1: (Lsun/management/GcInfoBuilder;JJJ[Ljava/lang/management/MemoryUsage;[Ljava/lang/management/MemoryUsage;[Ljava/lang/Object;)V
-24 -1: java/util/ResourceBundle
-64 -1: Ljava/util/Hashtable<Lsun/misc/Signal;Lsun/misc/SignalHandler;>;
-79 -1: ([Ljava/util/WeakHashMap$Entry<TK;TV;>;[Ljava/util/WeakHashMap$Entry<TK;TV;>;)V
-8 -1: x-ibm737
-39 -1: (Ljava/security/AccessControlContext;)Z
-21 -1: (Ljava/lang/Class;I)V
-4 -1: -
-15 -1: calculateFields
-22 -1: Ljava/util/Properties;
-8 -1: getArray
-21 -1: (Ljava/lang/Class;I)Z
-41 -1: (Ljava/lang/ThreadGroup;)Ljava/lang/Void;
-17 -1: Ljava/io/Console;
-115 -1: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;
-12 -1: nextThreadID
-81 -1: (Ljava/net/URLClassLoader;Ljava/lang/SecurityManager;Ljava/security/Permission;)V
-23 -1: ARRAY_SHORT_BASE_OFFSET
-10 -1: interpret_
-144 -1: (Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
-20 -1: isIPv6LiteralAddress
-13 -1: launcher_name
-36 -1: java/util/function/IntToLongFunction
-38 -1: java/util/WeakHashMap$EntrySpliterator
-8 -1: copyInto
-3 -1: ACT
-11 -1: metafactory
-31 -1: ([BLjava/nio/charset/Charset;)V
-30 -1: java/lang/annotation/Retention
-13 -1: getYearLength
-42 -1: java/util/AbstractMap$SimpleImmutableEntry
-31 -1: ()Ljava/lang/invoke/MemberName;
-21 -1: sun/misc/JavaIOAccess
-16 -1: jdk_build_number
-8 -1: ST_RESET
-96 -1: (BLjava/lang/Class;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName;
-13 -1: getTypeString
-15 -1: maxCharsPerByte
-8 -1: checkKey
-49 -1: (Ljava/nio/charset/Charset;Lsun/nio/cs/UTF_8$1;)V
-80 -1: (Ljava/lang/ClassValue;Ljava/lang/ClassValue$Entry;)Ljava/lang/ClassValue$Entry;
-32 -1: Ljava/security/ProtectionDomain;
-5 -1: ()TT;
-6 -1: insert
-10 -1: intersects
-38 -1: ([Ljava/lang/Class;Ljava/lang/Class;)V
-15 -1: java/lang/Class
-12 -1: getPublicKey
-37 -1: (ID)Ljava/lang/AbstractStringBuilder;
-6 -1: ibm850
-6 -1: locsig
-6 -1: ibm852
-19 -1: changeReferenceKind
-3 -1: AET
-42 -1: (Ljava/util/Collection;Ljava/lang/Class;)V
-6 -1: ibm855
-16 -1: getPolicyNoCheck
-39 -1: ([B)[[Ljava/lang/annotation/Annotation;
-6 -1: ibm857
-10 -1: Error.java
-38 -1: ()Ljava/util/List<Ljava/lang/Object;>;
-14 -1: createInstance
-5 -1: cp437
-28 -1: Lsun/util/locale/BaseLocale;
-17 -1: getStandardOffset
-29 -1: sun/nio/cs/StandardCharsets$1
-36 -1: Ljava/security/ProtectionDomain$Key;
-14 -1: ArrayList.java
-78 -1: (Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName;
-38 -1: java/lang/invoke/MethodHandleImpl$Lazy
-42 -1: (Ljava/util/LinkedHashMap$Entry<TK;TV;>;)V
-8 -1: getLongB
-7 -1: vmentry
-21 -1: lookupExtendedCharset
-32 -1: <T:Ljava/lang/Object;>([TT;)[TT;
-53 -1: Ljava/util/concurrent/ConcurrentHashMap$EntrySetView;
-6 -1: ibm862
-8 -1: getLongL
-32 -1: (Ljava/lang/invoke/MemberName;)J
-67 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Lsun/misc/Perf;>;
-6 -1: region
-6 -1: ibm866
-89 -1: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Class;I)Lsun/reflect/ConstructorAccessor;
-22 -1: java/util/ListIterator
-9 -1: wednesday
-16 -1: unsuspendThreads
-20 -1: Not a Proxy instance
-45 -1: Ljava/lang/reflect/InvocationTargetException;
-61 -1: (Ljava/lang/CharSequence;II)Ljava/lang/AbstractStringBuilder;
-5 -1: ()TV;
-32 -1: (Ljava/lang/invoke/MemberName;)V
-82 -1: (Ljava/util/jar/JarFile;Ljava/util/jar/JarEntry;)[Ljava/security/cert/Certificate;
-34 -1: java/lang/ClassValue$ClassValueMap
-32 -1: (Ljava/lang/invoke/MemberName;)Z
-15 -1: SPACE_SEPARATOR
-17 -1: caseIgnoreCompare
-58 -1: (Ljava/lang/Class;)Ljava/lang/invoke/MethodHandles$Lookup;
-4 -1: Code
-3 -1: AGT
-54 -1: (Ljava/lang/StringBuilder;II)Ljava/lang/StringBuilder;
-6 -1: ibm874
-15 -1: newMemberBuffer
-42 -1: (Ljava/nio/file/Path;)Ljava/nio/file/Path;
-33 -1: Ljava/lang/NumberFormatException;
-10 -1: Field.java
-67 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TK;+TU;>;)TU;
-4 -1: rows
-12 -1: MIN_PRIORITY
-25 -1: URI has a query component
-41 -1: provider security provider debugging
-29 -1: sun/nio/cs/ISO_8859_1$Encoder
-26 -1: (Ljava/util/zip/ZipFile;)I
-26 -1: (Ljava/util/zip/ZipFile;)J
-20 -1: Bad digit at end of
-29 -1: Ljava/lang/RuntimePermission;
-12 -1: initResolved
-9 -1: loadFence
-13 -1: fieldAccessor
-26 -1: (Ljava/util/zip/ZipFile;)V
-36 -1: java/lang/CloneNotSupportedException
-19 -1: getBasicConstraints
-16 -1: putOrderedObject
-26 -1: (Ljava/util/zip/ZipFile;)Z
-6 -1: target
-50 -1: (Ljava/util/concurrent/CountedCompleter;[I[IIIII)V
-16 -1: changeReturnType
-13 -1: CAUSE_CAPTION
-14 -1: checkExactType
-50 -1: sun/util/locale/provider/LocaleServiceProviderPool
-47 -1: java/lang/invoke/DirectMethodHandle$Constructor
-20 -1: CallerSensitive.java
-30 -1: java/security/ProtectionDomain
-26 -1: java.launcher.opt.vmselect
-4 -1: \tat
-42 -1: java/util/ArraysParallelSortHelpers$FJLong
-39 -1: (Ljava/lang/String;)[Ljava/lang/String;
-19 -1: sun.net.www.content
-34 -1: ([III)Ljava/util/stream/IntStream;
-20 -1: (Ljava/util/Deque;)V
-35 -1: (Ljava/lang/reflect/Constructor;)[B
-16 -1: WeakHashMap.java
-8 -1: ([III)[I
-46 -1: (Ljava/util/Properties;Ljava/io/InputStream;)V
-54 -1: (I)Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
-65 -1: (ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/util/HashMap$Node;
-27 -1: URI path component is empty
-3 -1: -1-
-32 -1: Ljava/io/InterruptedIOException;
-9 -1: setLocale
-7 -1: [^, ;]*
-6 -1: format
-61 -1: (Ljava/util/function/Supplier;IZ)Ljava/util/stream/IntStream;
-20 -1: getRequestProperties
-16 -1: reallocateMemory
-28 -1: java/lang/IllegalAccessError
-5 -1: query
-83 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;II)Ljava/lang/invoke/MethodHandle;
-7 -1: threadQ
-6 -1: STATIC
-7 -1: enqueue
-21 -1: uninitializedCallSite
-3 -1: -2-
-26 -1: ()Ljava/util/NavigableSet;
-27 -1: getUncaughtExceptionHandler
-42 -1: ([Ljava/net/URL;)Ljava/net/URLClassLoader;
-30 -1: java/lang/UnsatisfiedLinkError
-39 -1: java/util/Collections$ReverseComparator
-7 -1: resolve
-4 -1: poll
-7 -1: (TE;I)V
-21 -1: : Unknown launch mode
-53 -1: (Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;
-36 -1: sun.classloader.parentDelegationTime
-25 -1: java/net/URLStreamHandler
-39 -1: (Ljava/lang/Object;J)Ljava/lang/Object;
-53 -1: Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
-51 -1: java/util/ArraysParallelSortHelpers$FJDouble$Sorter
-26 -1: getAnnotatedParameterTypes
-18 -1: codePointCountImpl
-7 -1: threads
-12 -1: offsetBefore
-29 -1: ()Ljava/util/Collection<TV;>;
-58 -1: (Lsun/invoke/util/Wrapper;)Ljava/lang/invoke/MethodHandle;
-17 -1: DMH.invokeSpecial
-3 -1: -3-
-16 -1: decodeBufferLoop
-43 -1: java/util/concurrent/atomic/AtomicReference
-16 -1: reduceKeysToLong
-27 -1: newIllegalArgumentException
-3 -1: ALL
-5 -1: cache
-5 -1: queue
-4 -1: 8bit
-3 -1: -4-
-35 -1: Ljava/util/Set<Ljava/lang/String;>;
-9 -1: MIN_RADIX
-26 -1: ZipFileInflaterInputStream
-13 -1: MANIFEST_NAME
-18 -1: java/util/TimeZone
-175 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;Ljava/lang/invoke/MemberName;Ljava/lang/Class;Ljava/lang/invoke/DirectMethodHandle$1;)V
-16 -1: getContentLength
-11 -1: setDoOutput
-22 -1: (Ljava/io/Closeable;)V
-13 -1: TimeZone.java
-28 -1: sun/misc/ExtensionDependency
-6 -1: bindTo
-3 -1: -5-
-40 -1: ()[Ljava/util/WeakHashMap$Entry<TK;TV;>;
-20 -1: ()Lsun/misc/Cleaner;
-9 -1: compareTo
-68 -1: java/util/concurrent/ConcurrentHashMap$MapReduceMappingsToDoubleTask
-11 -1: checkedList
-14 -1: (ITK;TV;ZZ)TV;
-5 -1: greek
-3 -1: jar
-21 -1: (Ljava/lang/String;)B
-21 -1: (Ljava/lang/String;)C
-21 -1: (Ljava/lang/String;)D
-5 -1: (JS)V
-21 -1: (Ljava/lang/String;)F
-13 -1: LETTER_NUMBER
-14 -1: isAlphaNumeric
-21 -1: (Ljava/lang/String;)I
-73 -1: (Ljava/nio/charset/Charset;Ljava/lang/String;Ljava/lang/StringCoding$1;)V
-21 -1: (Ljava/lang/String;)J
-25 -1: makeExactOrGeneralInvoker
-3 -1: -6-
-25 -1: java/nio/StringCharBuffer
-21 -1: Ljava/util/Hashtable;
-8 -1: ENQUEUED
-8 -1: finalize
-22 -1: DirectLongBufferU.java
-21 -1: (Ljava/lang/String;)S
-10 -1: localhost:
-33 -1: isKnownNotToHaveSpecialAttributes
-21 -1: (Ljava/lang/String;)V
-45 -1: (Ljava/lang/Class<*>;[Ljava/lang/Class<*>;Z)V
-21 -1: (Ljava/lang/String;)Z
-22 -1: (Ljava/util/Vector;I)V
-44 -1: java/nio/charset/UnsupportedCharsetException
-23 -1: java/lang/CharacterName
-7 -1: checkIO
-33 -1: (I)Lsun/misc/URLClassPath$Loader;
-90 -1: (Ljava/lang/Class<*>;Ljava/lang/reflect/Constructor<*>;)Ljava/lang/reflect/Constructor<*>;
-18 -1: getHeaderFieldDate
-9 -1: MIN_VALUE
-95 -1: (Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)Ljava/util/Collection;
-44 -1: (Ljava/lang/String;Z)Ljava/util/Enumeration;
-8 -1: NOVEMBER
-4 -1: gcal
-17 -1: getConnectTimeout
-124 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
-24 -1: INDEXOFSUBLIST_THRESHOLD
-16 -1: isJulianLeapYear
-21 -1: reduceEntriesToDouble
-15 -1: getPrefixLength
-17 -1: is not param at
-14 -1: inDaylightTime
-39 -1: (Ljava/lang/Class;[I)Ljava/lang/Object;
-5 -1: force
-98 -1: (Ljava/lang/Class;Lsun/reflect/annotation/AnnotationType;Lsun/reflect/annotation/AnnotationType;)Z
-40 -1: (Lsun/reflect/ConstructorAccessorImpl;)V
-27 -1: RuntimeInvisibleAnnotations
-17 -1: checkTargetChange
-9 -1: skipBytes
-4 -1: port
-25 -1: sun/nio/cs/UTF_16$Encoder
-28 -1: MIN_SUPPLEMENTARY_CODE_POINT
-4 -1: node
-11 -1: not param:
-9 -1: debugInit
-6 -1: setURL
-14 -1: getMonthLength
-23 -1: ()Ljava/nio/ByteBuffer;
-17 -1: CALENDAR_JAPANESE
-11 -1: access$1400
-16 -1: ()Ljava/net/URI;
-29 -1: (IZ)Ljava/lang/StringBuilder;
-15 -1: Native Library
-30 -1: Invalid lambda deserialization
-14 -1: throwException
-18 -1: nothing to verify!
-23 -1: (Ljava/lang/Object;JF)V
-3 -1: ART
-16 -1: isExtClassLoader
-18 -1: Illegal Capacity:
-26 -1: java/util/zip/ZipException
-4 -1: /../
-34 -1: ([II)Ljava/util/Spliterator$OfInt;
-26 -1: (I)Ljava/util/Enumeration;
-60 -1: (Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodType;
-43 -1: not a field or nested class, no simple type
-12 -1: nextPutIndex
-15 -1: getConstructor0
-3 -1: AST
-11 -1: fromURIPath
-49 -1: (Ljava/util/Collections$UnmodifiableCollection;)V
-8 -1: makeImpl
-51 -1: (Ljava/util/WeakHashMap;Ljava/util/WeakHashMap$1;)V
-32 -1: (Ljava/util/function/Supplier;)V
-20 -1: namedFunctionInvoker
-37 -1: newGetBooleanIllegalArgumentException
-19 -1: (Ljava/io/File;ZI)V
-8 -1: NULL_KEY
-36 -1: Ljava/lang/reflect/Constructor<TT;>;
-21 -1: (Ljava/lang/Object;)B
-21 -1: (Ljava/lang/Object;)C
-21 -1: (Ljava/lang/Object;)D
-21 -1: (Ljava/lang/Object;)F
-30 -1: ()Lsun/util/locale/BaseLocale;
-21 -1: (Ljava/lang/Object;)I
-21 -1: (Ljava/lang/Object;)J
-10 -1: lineNumber
-95 -1: (JLjava/util/function/ToDoubleBiFunction<-TK;-TV;>;DLjava/util/function/DoubleBinaryOperator;)D
-16 -1: CoderResult.java
-44 -1: (Ljava/util/NavigableSet;Ljava/lang/Class;)V
-21 -1: (Ljava/lang/Object;)S
-13 -1: getNameString
-129 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;Ljava/lang/invoke/DirectMethodHandle$1;)V
-21 -1: (Ljava/lang/Object;)V
-21 -1: (Ljava/lang/Object;)Z
-81 -1: Ljava/util/HashMap<Ljava/lang/String;Ljava/util/LinkedList<Ljava/lang/String;>;>;
-49 -1: java/util/concurrent/locks/ReentrantLock$FairSync
-11 -1: csisolatin0
-11 -1: csisolatin1
-7 -1: isSpace
-10 -1: getDefault
-11 -1: csisolatin2
-16 -1: ()Ljava/net/URL;
-11 -1: csisolatin4
-14 -1: invokeExact_MT
-11 -1: csisolatin5
-28 -1: (Ljava/io/FileInputStream;)V
-11 -1: csisolatin9
-8 -1: isLetter
-15 -1: getConstructors
-21 -1: mainAppContextDefault
-29 -1: ()[Ljava/lang/reflect/Method;
-23 -1: Ljava/util/WeakHashMap;
-12 -1: LF_INVSTATIC
-17 -1: DirectBuffer.java
-10 -1: newEncoder
-10 -1: getVersion
-32 -1: java/lang/IllegalAccessException
-20 -1: java/util/Collection
-61 -1: (Ljava/util/concurrent/ConcurrentHashMap;Ljava/lang/Object;)V
-19 -1: $deserializeLambda$
-8 -1: removeIf
-25 -1: sun/reflect/FieldAccessor
-129 -1: <U::Ljava/lang/Comparable<-TU;>;>(Ljava/util/function/Function<-TT;+TU;>;Ljava/util/Comparator<-TU;>;)Ljava/util/Comparator<TT;>;
-17 -1: parseAbsoluteSpec
-37 -1: ([Ljava/util/HashMap$Node<TK;TV;>;I)V
-17 -1: java/util/HashSet
-13 -1: spreadInvoker
-20 -1: suppressAccessChecks
-32 -1: Ljava/lang/InterruptedException;
-11 -1: oldMappings
-9 -1: lookupTag
-16 -1: java/lang/System
-5 -1: LFI:
-6 -1: IBM737
-9 -1: SHORT_IDS
-45 -1: ([IIILjava/util/function/IntBinaryOperator;)V
-20 -1: getMetaInfEntryNames
-10 -1: isReadOnly
-50 -1: <E:Ljava/lang/Object;>()Ljava/util/SortedSet<TE;>;
-12 -1: java.vm.name
-30 -1: java/lang/Class$AnnotationData
-61 -1: (ILjava/lang/invoke/LambdaForm;)Ljava/lang/invoke/LambdaForm;
-7 -1: address
-44 -1: (Ljava/util/function/BiConsumer<-TK;-TV;>;)V
-58 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;I)V
-112 -1: (Ljava/lang/Object;TV;Ljava/lang/ref/ReferenceQueue<Ljava/lang/Object;>;ILjava/util/WeakHashMap$Entry<TK;TV;>;)V
-14 -1: aliases_KOI8_R
-3 -1: AWT
-14 -1: aliases_KOI8_U
-24 -1: ARRAY_DOUBLE_BASE_OFFSET
-23 -1: Ljava/util/jar/JarFile;
-91 -1: (Ljava/lang/Class<TT;>;[Ljava/lang/Class<*>;[Ljava/lang/Class<*>;IILjava/lang/String;[B[B)V
-14 -1: mappingAddress
-19 -1: [Ljava/lang/Object;
-17 -1: sun/misc/JarIndex
-9 -1: image/jpg
-49 -1: (Ljava/lang/String;I)Lsun/util/calendar/ZoneInfo;
-37 -1: java/lang/invoke/DirectMethodHandle$1
-34 -1: java/util/Collections$SingletonMap
-89 -1: (JLjava/util/function/ToIntBiFunction<-TK;-TV;>;ILjava/util/function/IntBinaryOperator;)I
-46 -1: (Ljava/util/Comparator;)Ljava/util/Comparator;
-11 -1: isTitleCase
-38 -1: java/lang/IllegalMonitorStateException
-33 -1: java/nio/BufferUnderflowException
-28 -1: java/lang/ClassValue$Version
-11 -1: printLocale
-13 -1: STORE_BARRIER
-42 -1: ([ILjava/util/function/IntUnaryOperator;)V
-26 -1: sun/util/locale/BaseLocale
-29 -1: java/io/ObjectStreamException
-41 -1: sun/reflect/UnsafeStaticFieldAccessorImpl
-60 -1: ([Ljava/lang/Object;Ljava/util/Iterator;)[Ljava/lang/Object;
-30 -1: (Ljava/nio/charset/Charset;)[B
-73 -1: ([Ljava/lang/String;[Ljava/lang/String;Ljava/io/File;)Ljava/lang/Process;
-3 -1: VST
-80 -1: Java(TM) SE Runtime Environment (build 1.8.0-internal-iklam_2013_11_27_21_25-b00
-85 -1: (Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V
-20 -1: getStackTraceElement
-36 -1: java/util/LinkedHashMap$LinkedKeySet
-17 -1: getNormalizedYear
-15 -1: maxBytesPerChar
-16 -1: java/util/Random
-34 -1: (I[C)Ljava/lang/invoke/LambdaForm;
-11 -1: nbits < 0:
-7 -1: H_PCHAR
-29 -1: (Ljava/nio/charset/Charset;)I
-36 -1: (I[I[C)Ljava/lang/invoke/LambdaForm;
-23 -1: java/lang/ClassLoader$1
-23 -1: java/lang/ClassLoader$2
-23 -1: java/lang/ClassLoader$3
-9 -1: sizeTable
-36 -1: (Z)Ljava/lang/AbstractStringBuilder;
-29 -1: (Ljava/nio/charset/Charset;)V
-25 -1: ARRAY_BOOLEAN_INDEX_SCALE
-29 -1: (Ljava/nio/charset/Charset;)Z
-6 -1: keySet
-20 -1: declaredConstructors
-25 -1: oracle/jrockit/jfr/Timing
-12 -1: sizeIsSticky
-6 -1: IBM775
-17 -1: currentTimeMillis
-28 -1: java/nio/DirectDoubleBufferS
-71 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/invoke/MethodType;B)V
-28 -1: java/nio/DirectDoubleBufferU
-19 -1: cachedFixedDateJan1
-15 -1: getClassContext
-65 -1: (Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V
-16 -1: unmodifiableList
-10 -1: getDoubleB
-82 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/String;
-11 -1: getEntryCrc
-10 -1: getDoubleL
-20 -1: (C)Ljava/lang/Class;
-11 -1: Null action
-22 -1: java/io/BufferedWriter
-67 -1: (Ljava/lang/String;[Ljava/lang/Class<*>;)Ljava/lang/reflect/Method;
-22 -1: parseSelectAnnotations
-6 -1: rename
-20 -1: acquireFieldAccessor
-43 -1: (Ljava/util/Vector;[Ljava/lang/Object;III)V
-32 -1: Ljava/lang/NullPointerException;
-29 -1: (Ljava/lang/ThreadLocal<*>;)V
-18 -1: descendingIterator
-37 -1: java/util/Collections$SynchronizedSet
-24 -1: mark/reset not supported
-12 -1: ) > toIndex(
-13 -1: <<ALL FILES>>
-10 -1: fastRemove
-4 -1: load
-31 -1: sun/reflect/ReflectionFactory$1
-39 -1: (Ljava/util/List<*>;)Ljava/lang/Object;
-39 -1: Ljava/util/Map<TE;Ljava/lang/Boolean;>;
-9 -1: offerLast
-31 -1: ()Ljava/lang/invoke/MethodType;
-40 -1: <E:Ljava/lang/Object;>Ljava/lang/Object;
-17 -1: getObjectVolatile
-14 -1: suspendThreads
-55 -1: (Ljava/lang/String;ZLjava/util/Set;)Lsun/misc/Resource;
-75 -1: <T:Ljava/lang/Object;>(Ljava/util/List<+Ljava/lang/Comparable<-TT;>;>;TT;)I
-6 -1: Lookup
-20 -1: java/io/OutputStream
-41 -1: Could not create application class loader
-28 -1: Lsun/misc/JavaUtilJarAccess;
-46 -1: java/util/Collections$SynchronizedNavigableSet
-8 -1: override
-21 -1: threadLocalRandomSeed
-10 -1: TEXT_PLAIN
-22 -1: ([B)Ljava/lang/String;
-29 -1: java/nio/InvalidMarkException
-14 -1: Throwable.java
-27 -1: newWrongMethodTypeException
-6 -1: ptypes
-8 -1: bugLevel
-62 -1: (ILjava/lang/CharSequence;II)Ljava/lang/AbstractStringBuilder;
-37 -1: ()Ljava/util/Locale$LocaleNameGetter;
-14 -1: getEntryMethod
-7 -1: getByte
-12 -1: UTF-32BE-BOM
-4 -1: lock
-34 -1: java/security/AccessControlContext
-79 -1: (Ljava/lang/String;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/MemberName;
-5 -1: DEBUG
-5 -1: unbox
-17 -1: CLASSPATH_OPTOSFT
-4 -1: cbrt
-21 -1: LocalizedObjectGetter
-21 -1: ProtectionDomain.java
-22 -1: ([J)Ljava/util/BitSet;
-17 -1: getUnresolvedName
-34 -1: (Ljava/util/Map;Ljava/util/Map;I)V
-7 -1: cskoi8r
-14 -1: getInterfaces0
-48 -1: (Lsun/net/www/MessageHeader;)[Ljava/lang/String;
-14 -1: getFileNameMap
-16 -1: preserveCombiner
-19 -1: getDefaultUseCaches
-57 -1: (Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class;
-21 -1: (D)Ljava/lang/Double;
-15 -1: iso8859_15_fdis
-23 -1: java/util/regex/Pattern
-6 -1: ibm912
-14 -1: findBuiltinLib
-42 -1: java/lang/annotation/AnnotationFormatError
-6 -1: ibm914
-6 -1: ibm915
-44 -1: java/nio/charset/IllegalCharsetNameException
-22 -1: COMBINING_SPACING_MARK
-20 -1: ()Ljava/lang/Thread;
-8 -1: readLine
-12 -1: (unresolved
-65 -1: (Ljava/lang/String;Z)Ljava/util/Enumeration<Lsun/misc/Resource;>;
-41 -1: ([Ljava/lang/String;[Ljava/lang/String;)V
-30 -1: java/lang/Class$ReflectionData
-8 -1: requests
-52 -1: (Ljava/nio/charset/Charset;Lsun/nio/cs/US_ASCII$1;)V
-12 -1: ACCESS_WRITE
-6 -1: ibm920
-12 -1: CR_ERROR_MIN
-6 -1: jarMap
-6 -1: ibm923
-15 -1: java/lang/Error
-11 -1: VM_SETTINGS
-18 -1: name can't be null
-7 -1: PRESENT
-19 -1: setSecurityManager0
-101 -1: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/charset/CharsetEncoder;I)Lsun/nio/cs/StreamEncoder;
-25 -1: ()Ljava/util/jar/JarFile;
-26 -1: java/io/ObjectOutputStream
-13 -1: no !/ in spec
-5 -1: (II)C
-12 -1: setPriority0
-30 -1: (Z)[Ljava/lang/reflect/Method;
-28 -1: sun/nio/cs/ThreadLocalCoders
-5 -1: (II)I
-22 -1: java/io/BufferedReader
-26 -1: ()Lsun/misc/JavaNetAccess;
-10 -1: Asia/Dhaka
-14 -1: parallelStream
-5 -1: (II)V
-5 -1: (II)Z
-31 -1: Ljava/lang/reflect/Constructor;
-21 -1: ()Ljava/time/Instant;
-31 -1: (Ljava/lang/String;III[J[I[IZ)V
-8 -1: Volatile
-23 -1: isUnicodeIdentifierPart
-27 -1: longPrimitiveParameterCount
-16 -1: Map is non-empty
-24 -1: getLocalizedOutputStream
-14 -1: java/lang/Byte
-10 -1: staticBase
-11 -1: lastElement
-17 -1: replaceStaleEntry
-17 -1: MAX_LOW_SURROGATE
-28 -1: java.launcher.X.macosx.usage
-20 -1: registerShutdownHook
-16 -1: SECOND_IN_MILLIS
-8 -1: Embedded
-16 -1: BootstrapMethods
-14 -1: numInvocations
-79 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;)Ljava/util/Enumeration<TT;>;
-10 -1: rotateLeft
-46 -1: ([Ljava/lang/Object;)Ljava/util/stream/Stream;
-6 -1: verify
-17 -1: OTHER_PUNCTUATION
-26 -1: acquireConstructorAccessor
-38 -1: (Ljava/lang/String;I)Ljava/lang/Class;
-30 -1: java/net/UnknownContentHandler
-20 -1: PREFIX_LENGTH_OFFSET
-12 -1: nextGetIndex
-14 -1: standardOffset
-10 -1: entryNames
-15 -1: application/xml
-3 -1: BET
-39 -1: ([DIII)Ljava/util/Spliterator$OfDouble;
-83 -1: (JLjava/util/function/BiFunction;Ljava/util/function/BiFunction;)Ljava/lang/Object;
-10 -1: initMethod
-47 -1: (Ljava/util/LinkedList$Node;)Ljava/lang/Object;
-8 -1: isSealed
-12 -1: isAccessible
-11 -1: audio/x-wav
-46 -1: (Ljava/lang/String;)Ljava/util/jar/Attributes;
-24 -1: ()Ljava/io/OutputStream;
-15 -1: FIELD_MODIFIERS
-30 -1: sun/misc/URLClassPath$Loader$1
-20 -1: recursive invocation
-34 -1: (Ljava/lang/String;)Ljava/net/URL;
-12 -1: linkNodeLast
-34 -1: call site initialization exception
-17 -1: casAnnotationType
-8 -1: x-ibm874
-7 -1: isUpper
-58 -1: java/util/concurrent/ConcurrentHashMap$MapReduceValuesTask
-31 -1: Ill-formed Unicode locale key:
-12 -1: defineClass0
-12 -1: defineClass1
-12 -1: defineClass2
-59 -1: Can not call newInstance() on the Class for java.lang.Class
-10 -1: codePoints
-3 -1: ...
-14 -1: readAheadLimit
-14 -1: parallelSetAll
-41 -1: ([Ljava/lang/Object;I)[Ljava/lang/Object;
-148 -1: (Ljava/lang/Throwable$PrintStreamOrWriter;[Ljava/lang/StackTraceElement;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set<Ljava/lang/Throwable;>;)V
-10 -1: Deque.java
-21 -1: Must be volatile type
-7 -1: setForm
-58 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Byte;>;
-47 -1: (Ljava/lang/String;Ljava/security/CodeSource;)V
-30 -1: java/io/InterruptedIOException
-44 -1: java/util/Collections$SynchronizedCollection
-16 -1: Invalid Jar file
-32 -1: sun/util/calendar/CalendarSystem
-67 -1: (JLsun/util/calendar/CalendarDate;)Lsun/util/calendar/CalendarDate;
-19 -1: DEFAULT_BUFFER_SIZE
-16 -1: readObjectNoData
-16 -1: setJavaNioAccess
-73 -1: (Ljava/lang/invoke/LambdaForm$Name;[Ljava/lang/Object;)Ljava/lang/Object;
-14 -1: copyToIntArray
-10 -1: hasWaiters
-20 -1: (I)Ljava/lang/Class;
-35 -1: all turn on all debugging
-14 -1: Invalid host:
-26 -1: Lsun/nio/cs/StreamEncoder;
-43 -1: sun/misc/JavaSecurityProtectionDomainAccess
-11 -1: getNamedCon
-8 -1: H_SERVER
-27 -1: java/util/function/Consumer
-12 -1: isLocalClass
-81 -1: (Ljava/util/LinkedHashMap$Entry<TK;TV;>;Ljava/util/LinkedHashMap$Entry<TK;TV;>;)V
-83 -1: Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/Boolean;>;
-4 -1: exec
-43 -1: java/lang/reflect/InvocationTargetException
-35 -1: (Ljava/io/File;Ljava/lang/String;)V
-9 -1: modifiers
-35 -1: (Ljava/io/File;Ljava/lang/String;)Z
-9 -1: Byte.java
-12 -1: unknown mode
-18 -1: initializeVerifier
-24 -1: (Ljava/nio/ByteBuffer;)I
-22 -1: ([Ljava/lang/Object;)I
-11 -1: correctType
-6 -1: escape
-52 -1: (Ljava/security/ProtectionDomain;)Ljava/lang/String;
-11 -1: annotations
-121 -1: (Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
-22 -1: using an instance of
-14 -1: getSpeciesData
-28 -1: ()Ljava/security/CodeSource;
-12 -1: JZENTRY_NAME
-24 -1: (Ljava/nio/ByteBuffer;)V
-4 -1: ZBSC
-22 -1: ([Ljava/lang/Object;)V
-7 -1: isParam
-165 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-70 -1: (ILjava/util/List<Ljava/lang/Class<*>;>;)Ljava/lang/invoke/LambdaForm;
-24 -1: Ljava/io/FilePermission;
-22 -1: ([Ljava/lang/Object;)Z
-11 -1: mergeHeader
-11 -1: applyAsLong
-28 -1: (IJ)Ljava/lang/StringBuffer;
-10 -1: arityCheck
-52 -1: (ILjava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-13 -1: toUpperCaseEx
-9 -1: nextIndex
-11 -1: start > end
-4 -1: long
-6 -1: Static
-27 -1: ()Ljava/lang/reflect/Field;
-10 -1: bufUpdater
-43 -1: averageBytesPerChar exceeds maxBytesPerChar
-105 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lsun/util/locale/BaseLocale$1;)V
-23 -1: ARRAY_SHORT_INDEX_SCALE
-15 -1: getHeaderFields
-36 -1: java/util/HashMap$HashMapSpliterator
-10 -1: Guard.java
-29 -1: java/util/RandomAccessSubList
-6 -1: addAll
-7 -1: getTime
-16 -1: invokeHandleForm
-32 -1: sun/util/locale/LocaleExtensions
-16 -1: checkAndLoadMain
-19 -1: INTERFACE_MODIFIERS
-11 -1: resolveName
-20 -1: getContentLengthLong
-53 -1: (ICLjava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-19 -1: name cannot be null
-23 -1: hasReceiverTypeDispatch
-12 -1: getExtension
-49 -1: Ljava/util/Set<Ljava/security/ProtectionDomain;>;
-114 -1: (Ljava/lang/String;[J[I[J[I[Lsun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule;)Lsun/util/calendar/ZoneInfo;
-24 -1: NativeSignalHandler.java
-58 -1: (Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
-10 -1: interface
-68 -1: (Ljava/lang/String;)Ljava/lang/invoke/BoundMethodHandle$SpeciesData;
-15 -1: addShutdownHook
-32 -1: java/security/AccessController$1
-10 -1: filterTags
-19 -1: [Ljava/lang/Number;
-92 -1: <T:Ljava/lang/Object;>(Ljava/util/function/ToLongFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-43 -1: java/util/LinkedHashMap$LinkedEntryIterator
-5 -1: utf-8
-11 -1: iso-8859-13
-11 -1: iso-8859-15
-58 -1: (Lsun/misc/URLClassPath$JarLoader;)Ljava/util/jar/JarFile;
-41 -1: CertPathValidator debugging
-22 -1: ARRAY_LONG_BASE_OFFSET
-57 -1: (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
-13 -1: queuePrintJob
-14 -1: Watchable.java
-15 -1: jdkMajorVersion
-62 -1: (Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMXBean;
-23 -1: twoToTheDoubleScaleDown
-22 -1: registerVMNotification
-30 -1: ()Lsun/misc/JavaUtilJarAccess;
-17 -1: getTargetVolatile
-4 -1: exit
-13 -1: StringDecoder
-12 -1: hasRemaining
-9 -1: bigEndian
-14 -1: checkMulticast
-13 -1: clearProperty
-18 -1: ForEachMappingTask
-15 -1: Collection.java
-55 -1: (Ljava/io/InputStream;)Ljava/security/cert/Certificate;
-5 -1: UTF-8
-11 -1: transitions
-7 -1: wrapAlt
-27 -1: ClassNotFoundException.java
-20 -1: UnresolvedPermission
-14 -1: charsetForName
-9 -1: getParent
-18 -1: [Ljava/lang/Short;
-24 -1: UnmodifiableNavigableMap
-5 -1: xflow
-10 -1: interfaces
-19 -1: doubleToRawLongBits
-73 -1: (Ljava/lang/reflect/Constructor<*>;[Ljava/lang/Object;)Ljava/lang/Object;
-10 -1: getInCheck
-21 -1: (Ljava/lang/Thread;)V
-15 -1: fromIndex < 0:
-63 -1: (ITK;TV;Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)V
-9 -1: pollFirst
-21 -1: (Ljava/lang/Thread;)Z
-16 -1: checkProxyMethod
-39 -1: generateLambdaFormInterpreterEntryPoint
-15 -1: findLoadedClass
-6 -1: system
-5 -1: ITALY
-45 -1: combiner SubjectDomainCombiner debugging
-34 -1: NativeConstructorAccessorImpl.java
-22 -1: ([C)Ljava/lang/String;
-39 -1: (Ljava/lang/String;Ljava/lang/Class;Z)V
-18 -1: java/lang/Thread$1
-20 -1: window can't be null
-10 -1: Debug.java
-17 -1: singletonIterator
-53 -1: java/util/concurrent/ConcurrentHashMap$ForEachKeyTask
-20 -1: java/security/Policy
-13 -1: getDescriptor
-32 -1: (I)Ljava/lang/invoke/MethodType;
-15 -1: nativeLibraries
-27 -1: sun/util/locale/LanguageTag
-8 -1: priority
-12 -1: IntegerCache
-14 -1: connectTimeout
-9 -1: namePairs
-17 -1: vmAllowSuspension
-16 -1: METHOD_MODIFIERS
-51 -1: (Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-20 -1: MIN_TREEIFY_CAPACITY
-13 -1: getEntryBytes
-33 -1: ()Lsun/reflect/ReflectionFactory;
-17 -1: getDisplayCountry
-13 -1: isWrapperType
-5 -1: utf16
-12 -1: parallelSort
-27 -1: (Ljava/nio/ByteBuffer;IIZ)V
-56 -1: (Ljava/lang/Class;Ljava/lang/Class;ILjava/lang/Class;I)Z
-9 -1: isDefined
-20 -1: sun/misc/FloatConsts
-10 -1: putDoubleB
-30 -1: java/lang/NoSuchFieldException
-27 -1: Value out of range. Value:"
-36 -1: sun/reflect/NativeMethodAccessorImpl
-7 -1: decoder
-38 -1: ([Ljava/lang/invoke/MutableCallSite;)V
-10 -1: putDoubleL
-68 -1: (Ljava/lang/reflect/Method;)Lsun/reflect/generics/scope/MethodScope;
-37 -1: java/lang/invoke/MethodHandles$Lookup
-9 -1: Void.java
-28 -1: sun/util/locale/BaseLocale$1
-10 -1: stackTrace
-7 -1: toClass
-11 -1: access$1500
-41 -1: (Ljava/lang/Object;I)Ljava/lang/Class<*>;
-148 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;Ljava/lang/Object;JLjava/lang/invoke/DirectMethodHandle$1;)V
-22 -1: ARRAY_BYTE_BASE_OFFSET
-13 -1: ZipEntry.java
-56 -1: (Ljava/util/List;Ljava/util/Collection;)Ljava/util/List;
-5 -1: utf32
-16 -1: ISO_646.irv:1991
-5 -1: p-126
-20 -1: sun.net.www.protocol
-3 -1: key
-20 -1: IMPLEMENTATION_TITLE
-93 -1: (Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;)Lsun/util/locale/LanguageTag;
-66 -1: ([Ljava/lang/Object;[Ljava/lang/Object;IIILjava/util/Comparator;)V
-27 -1: java/nio/DirectFloatBufferS
-27 -1: java/nio/DirectFloatBufferU
-15 -1: JZENTRY_COMMENT
-8 -1: casTabAt
-10 -1: getVariant
-24 -1: Ljava/lang/Thread$State;
-35 -1: ()Ljava/lang/AbstractStringBuilder;
-114 -1: (Ljava/security/CodeSource;Ljava/security/PermissionCollection;Ljava/lang/ClassLoader;[Ljava/security/Principal;)V
-16 -1: getShortVolatile
-18 -1: SoftReference.java
-3 -1: BST
-12 -1: isCastableTo
-28 -1: sun.zip.disableMemoryMapping
-11 -1: copyOfRange
-17 -1: ()Lsun/misc/Perf;
-59 -1: (Ljava/lang/String;[Ljava/io/File;Ljava/lang/ClassLoader;)V
-27 -1: (Lsun/misc/JavaAWTAccess;)V
-8 -1: DECLARED
-18 -1: loadedLibraryNames
-6 -1: CENNAM
-7 -1: encprop
-5 -1: ABASE
-27 -1: java/util/WeakHashMap$Entry
-13 -1: wrapWithPrims
-5 -1: UTF32
-29 -1: Ljava/net/URISyntaxException;
-6 -1: groups
-65 -1: <T:Ljava/lang/Object;>(Ljava/util/Set<+TT;>;)Ljava/util/Set<TT;>;
-32 -1: lambda$comparingByKey$6d558cbf$1
-15 -1: removeElementAt
-49 -1: [Ljava/util/concurrent/ConcurrentHashMap$Segment;
-32 -1: Sign character in wrong position
-6 -1: IBM819
-39 -1: java/security/cert/CertificateException
-4 -1: join
-30 -1: Ljava/lang/invoke/ForceInline;
-14 -1: expandCapacity
-19 -1: Ljava/lang/Integer;
-11 -1: NUMBER_THAI
-10 -1: getExtURLs
-9 -1: retainAll
-21 -1: (S)Ljava/lang/String;
-8 -1: truncate
-51 -1: java/util/ArraysParallelSortHelpers$FJObject$Sorter
-28 -1: newIndexOutOfBoundsException
-26 -1: JavaUtilJarAccessImpl.java
-22 -1: (II)Ljava/util/BitSet;
-10 -1: getLongAt0
-65 -1: <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
-26 -1: (Ljava/lang/ThreadLocal;)I
-5 -1: (J)[B
-27 -1: Ljava/lang/CharacterData00;
-18 -1: sun/misc/Cleaner$1
-59 -1: (Ljava/util/List;Ljava/lang/Object;Ljava/util/Comparator;)I
-114 -1: (JLjava/util/function/ToDoubleFunction<Ljava/util/Map$Entry<TK;TV;>;>;DLjava/util/function/DoubleBinaryOperator;)D
-28 -1: java/lang/ClassCastException
-26 -1: (Ljava/lang/ThreadLocal;)V
-27 -1: ()[Ljava/lang/reflect/Type;
-13 -1: not invoker:
-56 -1: (Ljava/net/URL;Ljava/net/Proxy;)Ljava/net/URLConnection;
-6 -1: before
-37 -1: ([DII)Ljava/util/stream/DoubleStream;
-9 -1: logicalOr
-9 -1: IS_METHOD
-12 -1: SPACE_USABLE
-12 -1: lastModified
-10 -1: setSigners
-8 -1: Invokers
-7 -1: nCopies
-12 -1: utf-32le-bom
-7 -1: (IIII)J
-17 -1: jdkSpecialVersion
-26 -1: ()Ljava/lang/StringBuffer;
-17 -1: SearchEntriesTask
-14 -1: java/net/Parts
-20 -1: Ljava/lang/Runnable;
-35 -1: java/util/WeakHashMap$ValueIterator
-19 -1: FinalReference.java
-7 -1: (IIII)V
-23 -1: Ljava/lang/ThreadGroup;
-10 -1: nullsFirst
-8 -1: setCache
-55 -1: (Ljava/util/List;Ljava/lang/Object;Ljava/lang/Object;)Z
-24 -1: java/util/SimpleTimeZone
-6 -1: IBM850
-6 -1: IBM852
-25 -1: sun/net/www/MeteredStream
-4 -1: exts
-6 -1: IBM855
-16 -1: allocateElements
-6 -1: IBM857
-19 -1: setDefaultUseCaches
-6 -1: IBM858
-5 -1: slice
-9 -1: marklimit
-77 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Ljava/lang/Void;>;
-32 -1: java/util/Collections$CheckedSet
-12 -1: getModifiers
-8 -1: protocol
-10 -1: getInteger
-33 -1: ([J)Ljava/util/stream/LongStream;
-6 -1: IBM862
-8 -1: Map.java
-35 -1: java/lang/Class$EnclosingMethodInfo
-25 -1: (J)Ljava/math/BigInteger;
-31 -1: (Ljava/net/URL;Ljava/io/File;)V
-6 -1: IBM866
-6 -1: unload
-28 -1: sun/invoke/util/VerifyAccess
-105 -1: ()Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;Ljava/lang/annotation/Annotation;>;
-25 -1: Resetting to invalid mark
-20 -1: java/util/Vector$Itr
-5 -1: SHIFT
-11 -1: NonfairSync
-18 -1: getSecurityManager
-34 -1: ()[Ljava/lang/ClassValue$Entry<*>;
-28 -1: (J)Ljava/lang/StringBuilder;
-28 -1: (Ljava/security/PublicKey;)V
-12 -1: getResources
-6 -1: IBM874
-27 -1: which Java does not define
-36 -1: (Ljava/lang/invoke/MethodTypeForm;)V
-48 -1: array length is not legal for long[] or double[]
-18 -1: IS_FIELD_OR_METHOD
-7 -1: Aliases
-17 -1: checkedExceptions
-13 -1: getDayOfMonth
-51 -1: (Ljava/util/Spliterator;Z)Ljava/util/stream/Stream;
-20 -1: java/io/EOFException
-26 -1: Enclosing method not found
-17 -1: flushLeftoverChar
-122 -1: (Ljava/lang/Class<*>;[Ljava/lang/Class<*>;[Ljava/lang/Class<*>;IILjava/lang/String;[B[B)Ljava/lang/reflect/Constructor<*>;
-18 -1: buildAnnotatedType
-21 -1: setContextClassLoader
-22 -1: java/io/UnixFileSystem
-20 -1: nonSyncContentEquals
-43 -1: java/util/Collections$SynchronizedSortedMap
-15 -1: Properties.java
-35 -1: com.oracle.usagetracker.config.file
-13 -1: java/util/Map
-18 -1: setEagerValidation
-13 -1: getSetMessage
-6 -1: unlock
-14 -1: refKindIsField
-22 -1: bad field type alias:
-17 -1: casAnnotationData
-6 -1: AUGUST
-106 -1: (Ljava/util/concurrent/CountedCompleter;[Ljava/lang/Object;[Ljava/lang/Object;IIIILjava/util/Comparator;)V
-11 -1: monitorExit
-17 -1: linkMethodTracing
-69 -1: (Ljava/lang/String;Ljava/lang/String;Lsun/util/locale/BaseLocale$1;)V
-21 -1: java/lang/ClassLoader
-39 -1: PKCS11 KeyStore debugging
-10 -1: checkRtype
-25 -1: getLocalGregorianCalendar
-23 -1: GenericDeclaration.java
-12 -1: isViewableAs
-22 -1: static_oop_field_count
-72 -1: (Ljava/util/function/ToDoubleFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-11 -1: languageKey
-6 -1: Class
-34 -1: java/util/HashMap$ValueSpliterator
-37 -1: (IJ)Ljava/lang/AbstractStringBuilder;
-17 -1: privilegedContext
-36 -1: java/util/LinkedHashMap$LinkedValues
-11 -1: getHostName
-10 -1: beginEntry
-7 -1: isAlpha
-61 -1: (Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;
-10 -1: expandArgs
-14 -1: Finalizer.java
-14 -1: timeDefinition
-28 -1: ()Ljava/util/jar/Attributes;
-14 -1: ansi_x3.4-1968
-11 -1: setPriority
-23 -1: (C)Ljava/lang/Class<*>;
-26 -1: (Ljava/lang/Object;TV;)TV;
-70 -1: (Ljava/util/function/BiFunction;Ljava/lang/Object;Ljava/lang/Object;)V
-48 -1: ()Lsun/reflect/generics/factory/GenericsFactory;
-25 -1: java/lang/invoke/CallSite
-8 -1: tzdb.dat
-17 -1: containsAllLimits
-17 -1: fileNameMapLoaded
-6 -1: values
-17 -1: setLastAccessTime
-12 -1: expandFromVM
-50 -1: java/lang/invoke/MethodHandle$PolymorphicSignature
-3 -1: .EC
-14 -1: access denied
-22 -1: java/util/AbstractList
-47 -1: (IILjava/lang/String;)Ljava/lang/StringBuilder;
-52 -1: ()Lsun/reflect/generics/repository/MethodRepository;
-22 -1: (Ljava/lang/String;)[B
-57 -1: (Ljava/lang/Object;)Ljava/lang/invoke/DirectMethodHandle;
-18 -1: compareAndSwapLong
-4 -1: !=
-6 -1: StdArg
-29 -1: (Ljava/security/Permission;)V
-22 -1: ([D)Ljava/lang/String;
-28 -1: Lsun/reflect/MethodAccessor;
-14 -1: ansi_x3.4-1986
-20 -1: getPeakFinalRefCount
-29 -1: (Ljava/security/Permission;)Z
-5 -1: debug
-38 -1: (Ljava/lang/reflect/Constructor<*>;)[B
-27 -1: java/util/GregorianCalendar
-16 -1: Null replacement
-26 -1: ()Ljava/lang/reflect/Type;
-28 -1: DIRECTIONALITY_LEFT_TO_RIGHT
-102 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lsun/util/locale/BaseLocale;
-15 -1: isConvertibleTo
-24 -1: ARRAY_DOUBLE_INDEX_SCALE
-16 -1: getComponentType
-29 -1: sun/util/locale/LocaleMatcher
-11 -1: LOCALECACHE
-6 -1: UNWRAP
-16 -1: AbstractSet.java
-3 -1: CAT
-36 -1: java/lang/annotation/RetentionPolicy
-14 -1: getParameters0
-8 -1: .Handler
-33 -1: Ljava/lang/IllegalStateException;
-10 -1: RAW_RETURN
-20 -1: java/lang/ClassValue
-16 -1: getDisplayString
-152 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;I)Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-67 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/Map<TK;TV;>;
-214 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-33 -1: java/lang/invoke/SerializedLambda
-42 -1: ([Ljava/lang/Object;II)[Ljava/lang/Object;
-22 -1: java/util/zip/ZipUtils
-9 -1: setDaemon
-26 -1: java/net/HttpURLConnection
-6 -1: mkdirs
-20 -1: (Ljava/io/Reader;I)V
-28 -1: (IC)Ljava/lang/StringBuffer;
-45 -1: ([Ljava/lang/Class<*>;I)[Ljava/lang/Class<*>;
-29 -1: java/lang/invoke/MethodHandle
-28 -1: sun/misc/CompoundEnumeration
-6 -1: setVal
-23 -1: INTERNED_ARGUMENT_LIMIT
-4 -1: NULL
-49 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Class;)Z
-43 -1: java/util/Collections$UnmodifiableSortedMap
-39 -1: (Ljava/lang/Object;Ljava/lang/Object;)I
-6 -1: ([JJ)I
-19 -1: java/io/PrintWriter
-25 -1: ()Ljava/lang/ThreadGroup;
-5 -1: (IJ)J
-16 -1: onMalformedInput
-15 -1: decrementAndGet
-11 -1: -2147483648
-6 -1: reduce
-12 -1: asCharBuffer
-39 -1: (Ljava/lang/Object;Ljava/lang/Object;)V
-44 -1: (Ljava/util/SortedSet;)Ljava/util/SortedSet;
-9 -1: backtrace
-3 3: Bar
-47 -1: ()Lsun/misc/JavaSecurityProtectionDomainAccess;
-39 -1: (Ljava/lang/Object;Ljava/lang/Object;)Z
-5 -1: (IJ)V
-6 -1: ([JJ)V
-22 -1: ([Ljava/lang/Thread;)I
-5 -1: (IJ)Z
-7 -1: ([BII)I
-79 -1: <T:Ljava/lang/Object;>(Ljava/util/Comparator<-TT;>;)Ljava/util/Comparator<TT;>;
-12 -1: getUnchecked
-10 -1: getBaseURL
-36 -1: (Ljava/lang/Object;)Ljava/util/List;
-53 -1: (Ljava/util/function/Function;)Ljava/util/Comparator;
-10 -1: getComment
-7 -1: ([BII)V
-30 -1: privateGetDeclaredConstructors
-58 -1: (Ljava/lang/String;ZILjava/util/Locale;)Ljava/lang/String;
-18 -1: unknown era name:
-13 -1: invokeSpecial
-9 -1: checkLink
-16 -1: cspc8codepage437
-6 -1: stream
-18 -1: sun/nio/cs/UTF_8$1
-18 -1: contextClassLoader
-50 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;I)V
-30 -1: sun/util/calendar/BaseCalendar
-11 -1: enumeration
-18 -1: key can't be empty
-137 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<Ljava/util/Map$Entry<TK;TV;>;+TU;>;Ljava/util/function/BiFunction<-TU;-TU;+TU;>;)TU;
-10 -1: getBoolean
-5 -1: eetop
-49 -1: (Ljava/lang/invoke/MethodType;)Ljava/lang/String;
-43 -1: sun/reflect/generics/scope/ConstructorScope
-13 -1: CANADA_FRENCH
-39 -1: Ljava/nio/channels/ReadableByteChannel;
-15 -1: java/lang/Float
-29 -1: DIRECTIONALITY_OTHER_NEUTRALS
-52 -1: (ZLjava/nio/charset/Charset;Ljava/io/OutputStream;)V
-8 -1: appendTo
-19 -1: PARAGRAPH_SEPARATOR
-16 -1: (Unknown Source)
-4 -1: tree
-38 -1: (I[C)Ljava/lang/AbstractStringBuilder;
-14 -1: VerifierStream
-48 -1: (Ljava/util/Collection<TE;>;Ljava/lang/Object;)V
-15 -1: releaseInflater
-20 -1: getHeaderNamesInList
-17 -1: getSystemPackages
-8 -1: teardown
-6 -1: (BZI)I
-10 -1: checkWrite
-19 -1: JavaLangAccess.java
-31 -1: Ljava/lang/ClassValue$Identity;
-50 -1: (Ljava/util/concurrent/CountedCompleter;[S[SIIII)V
-24 -1: getDeclaredConstructors0
-3 -1: /..
-3 -1: /./
-16 -1: hashCodeForCache
-18 -1: Property settings:
-26 -1: Illegal initial capacity:
-10 -1: text/plain
-61 -1: (Ljava/util/function/ToDoubleFunction;)Ljava/util/Comparator;
-24 -1: createMemoryManagerMBean
-10 -1: ,lastRule=
-9 -1: GMT-00:00
-5 -1: mtime
-40 -1: (Ljava/lang/String;I)[Ljava/lang/String;
-11 -1: (TT;TV;)TV;
-154 -1: (Ljava/lang/Class<*>;Ljava/lang/String;[Ljava/lang/Class<*>;Ljava/lang/Class<*>;[Ljava/lang/Class<*>;IILjava/lang/String;[B[B[B)Ljava/lang/reflect/Method;
-41 -1: (Ljava/util/jar/JarFile;)Ljava/util/List;
-43 -1: (JILjava/lang/Object;)Ljava/nio/ByteBuffer;
-19 -1: MethodTypeForm.java
-21 -1: java/util/jar/JarFile
-30 -1: java/lang/Integer$IntegerCache
-22 -1: getDisplayVariantArray
-6 -1: setAll
-13 -1: ClassValueMap
-52 -1: (Ljava/security/PublicKey;Ljava/security/Provider;)V
-51 -1: java/util/concurrent/ConcurrentHashMap$BaseIterator
-59 -1: (Ljava/lang/Runnable;Ljava/security/AccessControlContext;)V
-100 -1: (Ljava/util/concurrent/ConcurrentMap;Ljava/util/function/BiFunction;)Ljava/util/function/BiConsumer;
-8 -1: default
-13 -1: compareAndSet
-10 -1: iso8859-13
-9 -1: putShortB
-14 -1: skipDelimiters
-28 -1: URI has a fragment component
-10 -1: iso8859-15
-42 -1: (Ljava/net/Proxy;)Ljava/net/URLConnection;
-23 -1: needsPackageAccessCheck
-9 -1: putShortL
-3 -1: //[
-69 -1: (Ljava/security/AccessControlContext;Ljava/security/DomainCombiner;)V
-18 -1: too many arguments
-35 -1: ([III)Ljava/util/Spliterator$OfInt;
-10 -1: CopiesList
-10 -1: iso-8859-1
-9 -1: ([BII[C)I
-10 -1: iso-8859-2
-11 -1: returnCount
-10 -1: iso-8859-4
-10 -1: iso-8859-5
-8 -1: utf_16be
-10 -1: iso-8859-7
-9 -1: isLimited
-9 -1: parseByte
-10 -1: iso-8859-9
-13 -1: , s.length()
-10 -1: matchCerts
-14 -1: RECURSIVE_CHAR
-11 -1: reduceToInt
-11 -1: displayName
-9 -1: calendars
-64 -1: (Ljava/lang/String;ZLjava/util/jar/JarEntry;)Lsun/misc/Resource;
-11 -1: isProtected
-78 -1: (Ljava/util/SortedMap;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/SortedMap;
-4 -1: trim
-20 -1: java/nio/FloatBuffer
-17 -1: PreHashedMap.java
-74 -1: Ljava/util/concurrent/ConcurrentMap<Ljava/lang/String;Ljava/lang/String;>;
-22 -1: ([S)Ljava/lang/String;
-19 -1: PrintStreamOrWriter
-38 -1: java/util/Collections$EmptyEnumeration
-22 -1: java/util/LinkedList$1
-13 -1: sunpkcs11.jar
-25 -1: java/nio/DirectByteBuffer
-96 -1: (ZLjava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-7 -1: isArray
-43 -1: (Ljava/lang/String;)Ljava/util/Enumeration;
-52 -1: java/lang/invoke/MethodHandleImpl$AsVarargsCollector
-59 -1: (Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class<*>;
-26 -1: setJavaNetHttpCookieAccess
-15 -1: wrongTargetType
-57 -1: java/util/concurrent/ConcurrentHashMap$ForEachMappingTask
-33 -1: [Ljava/lang/reflect/TypeVariable;
-5 -1: load0
-39 -1: (Ljava/lang/String;)Ljava/lang/Boolean;
-21 -1: isHeldByCurrentThread
-14 -1: outOfBoundsMsg
-30 -1: Ljava/lang/ref/Reference$Lock;
-11 -1: ISO-8859-13
-84 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue<TT;>;)Ljava/lang/ClassValue$Entry<TT;>;
-11 -1: ISO-8859-15
-40 -1: (Ljava/net/URL;)Ljava/net/URLConnection;
-84 -1: <T:Ljava/lang/Object;:Ljava/lang/Comparable<-TT;>;>(Ljava/util/Collection<+TT;>;)TT;
-38 -1: sun/reflect/generics/scope/MethodScope
-5 -1: mutex
-11 -1: loaderTypes
-8 -1: defaults
-22 -1: getActualTypeArguments
-41 -1: DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
-4 -1: keys
-71 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-94 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/MethodHandle;
-113 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractSet<TE;>;Ljava/util/Set<TE;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
-12 -1: checkConnect
-39 -1: (Ljava/lang/String;Ljava/util/Locale;)V
-26 -1: ([CII[C)Ljava/lang/String;
-12 -1: isDoubleWord
-37 -1: configparser JAAS ConfigFile parsing
-27 -1: sun/misc/Perf$GetPerfAction
-44 -1: (Ljava/util/Collections$UnmodifiableList;I)V
-4 -1: acos
-26 -1: java/nio/DirectLongBufferS
-7 -1: (ITE;)V
-14 -1: putIntVolatile
-24 -1: setContentHandlerFactory
-26 -1: java/nio/DirectLongBufferU
-10 -1: fieldCount
-11 -1: invokeBasic
-50 -1: (Ljava/util/zip/ZipEntry;)Ljava/util/jar/JarEntry;
-24 -1: java/util/Locale$Builder
-9 -1: setParent
-11 -1: asLifoQueue
-33 -1: lambda$comparingDouble$8dcf42ea$1
-24 -1: (Ljava/lang/Throwable;)I
-35 -1: (Lsun/misc/JavaUtilZipFileAccess;)V
-49 -1: (ILjava/lang/Object;)Ljava/util/HashMap$TreeNode;
-10 -1: CLASS_PATH
-6 -1: tclass
-11 -1: getExponent
-23 -1: getAnnotatedReturnType0
-18 -1: checkPackageAccess
-35 -1: Can not instantiate java.lang.Class
-24 -1: (Ljava/lang/Throwable;)V
-195 -1: (Ljava/lang/invoke/LambdaForm$Name;Ljava/lang/invoke/LambdaForm$Name;Ljava/lang/invoke/BoundMethodHandle$SpeciesData;Ljava/lang/invoke/BoundMethodHandle$SpeciesData;)Ljava/lang/invoke/LambdaForm;
-17 -1: Empty replacement
-3 -1: .SF
-14 -1: ByteOrder.java
-39 -1: ()Lsun/util/calendar/BaseCalendar$Date;
-35 -1: ()[Ljava/security/ProtectionDomain;
-12 -1: setElementAt
-30 -1: (Ljava/security/CodeSource;Z)Z
-45 -1: (Ljava/lang/Class<*>;)Ljava/lang/ClassLoader;
-52 -1: (Ljava/nio/charset/Charset;)Ljava/util/zip/ZipCoder;
-13 -1: foldArguments
-23 -1: java/time/LocalDateTime
-30 -1: [Lsun/launcher/LauncherHelper;
-16 -1: 0123456789abcdef
-60 -1: (Ljava/util/Spliterator$OfInt;Z)Ljava/util/stream/IntStream;
-33 -1: (ILjava/lang/String;IIIIIIIIIII)V
-20 -1: DMH.newInvokeSpecial
-28 -1: java/nio/charset/CoderResult
-33 -1: sun/nio/cs/StandardCharsets$Cache
-11 -1: saveConvert
-14 -1: ExtClassLoader
-12 -1: parentOrNull
-20 -1: insertParameterTypes
-32 -1: (II)Ljava/util/stream/IntStream;
-13 -1: setStackTrace
-20 -1: is not an enum type
-3 -1: CNT
-4 -1: host
-85 -1: ([Ljava/lang/Object;Ljava/util/function/IntFunction;)Ljava/util/function/IntConsumer;
-11 -1: batchRemove
-8 -1: newField
-16 5: sun/nio/cs/UTF_8
-104 -1: (Ljava/lang/invoke/LambdaForm$Name;Ljava/lang/invoke/LambdaForm$Name;)Ljava/lang/invoke/LambdaForm$Name;
-8 -1: saturday
-35 -1: java/util/ArraysParallelSortHelpers
-15 -1: java/util/Queue
-40 -1: (Ljava/lang/Class<*>;)Ljava/lang/String;
-7 -1: toChars
-5 -1: first
-17 -1: ArrayDecoder.java
-30 -1: ()Lsun/reflect/MethodAccessor;
-26 -1: thread group can't be null
-13 -1: IllegalName:
-32 -1: java/util/Collections$SetFromMap
-14 -1: line.separator
-17 -1: getDeclaredMethod
-10 -1: getMinutes
-35 -1: (Lsun/util/locale/BaseLocale$Key;)I
-40 -1: ([Ljava/lang/String;)Ljava/lang/Process;
-31 -1: Ljava/util/LinkedHashMap$Entry;
-13 -1: , str.length
-8 -1: getProbe
-6 -1: ([DI)I
-5 -1: (CI)I
-23 -1: saveAndRemoveProperties
-6 -1: rehash
-3 -1: lcb
-31 -1: Ljava/util/Arrays$NaturalOrder;
-55 -1: (IILjava/lang/String;)Ljava/lang/AbstractStringBuilder;
-10 -1: loadFactor
-15 -1: putLongVolatile
-34 -1: sun/misc/URLClassPath$FileLoader$1
-12 -1: Europe/Paris
-8 -1: DECEMBER
-86 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Lsun/misc/Launcher$AppClassLoader;>;
-22 -1: getImplMethodSignature
-38 -1: Malformed enclosing method information
-8 -1: maskNull
-3 -1: lct
-21 -1: CONSTRUCTOR_MODIFIERS
-36 -1: ()Lsun/misc/JavaNetHttpCookieAccess;
-12 -1: HashIterator
-84 -1: (Ljava/lang/Class;Ljava/lang/Class$AnnotationData;Ljava/lang/Class$AnnotationData;)Z
-33 -1: java/lang/Character$UnicodeScript
-5 -1: toHex
-27 -1: java/security/AllPermission
-17 -1: appendReplacement
-20 -1: SimpleImmutableEntry
-18 -1: getRequestProperty
-12 -1: compareCerts
-44 -1: java/util/ArrayPrefixHelpers$IntCumulateTask
-19 -1: makeSpreadArguments
-222 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceEntriesTask;Ljava/util/function/Function;Ljava/util/function/BiFunction;)V
-8 -1: addFirst
-6 -1: nextUp
-35 -1: (Ljava/net/ContentHandlerFactory;)V
-40 -1: (Ljava/lang/String;)Ljava/lang/Class<*>;
-23 -1: java/util/LocaleISOData
-14 -1: PREPARED_FORMS
-6 -1: FJByte
-20 -1: getGenericSuperclass
-6 -1: offset
-16 -1: LocaleUtils.java
-12 -1: isUnresolved
-18 -1: aliases_ISO_8859_1
-18 -1: aliases_ISO_8859_2
-15 -1: isSurrogatePair
-18 -1: aliases_ISO_8859_4
-18 -1: aliases_ISO_8859_5
-6 -1: EXTLEN
-18 -1: aliases_ISO_8859_7
-15 -1: Comparator.java
-18 -1: aliases_ISO_8859_9
-15 -1: ISO_8859-2:1987
-22 -1: Ljava/util/List<+TE;>;
-16 -1: Unknown Category
-3 -1: CST
-51 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractList<TE;>;
-6 -1: FRIDAY
-40 -1: (Ljava/lang/String;ZZ)Ljava/lang/String;
-13 -1: isInterrupted
-8 -1: utf_16le
-89 -1: (BLjava/lang/Class<*>;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;
-22 -1: checkInvocationCounter
-12 -1: EPOCH_OFFSET
-35 -1: (JJILjava/nio/DirectByteBuffer$1;)V
-7 -1: canRead
-9 -1: getLoader
-18 -1: publicConstructors
-23 -1: factory already defined
-33 -1: java/lang/ref/ReferenceQueue$Null
-37 -1: (Ljava/util/List;Ljava/util/Random;)V
-25 -1: setPackageAssertionStatus
-20 -1: MapReduceEntriesTask
-11 -1: OPEN_DELETE
-35 -1: (Ljava/util/Set;Ljava/lang/Class;)V
-9 -1: rootGroup
-10 -1: updateForm
-22 -1: JavaUtilJarAccess.java
-3 -1: CTT
-57 -1: (Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Constructor;
-82 -1: <T:Ljava/lang/Object;>(Ljava/util/NavigableSet<TT;>;)Ljava/util/NavigableSet<TT;>;
-13 -1: getReturnType
-34 -1: java/util/HashMap$EntrySpliterator
-14 -1: TIME_UNDEFINED
-32 -1: com/sun/crypto/provider/AESCrypt
-7 -1: H_DIGIT
-20 -1: clearAssertionStatus
-44 -1: java/lang/invoke/MethodHandleImpl$BindCaller
-8 -1: scloader
-6 -1: IBM923
-5 -1: read0
-5 -1: read1
-4 -1: true
-9 -1: BA_HIDDEN
-16 -1: jvmUpdateVersion
-36 -1: java/lang/StringCoding$StringDecoder
-37 -1: (J)Ljava/nio/file/attribute/FileTime;
-3 -1: lib
-17 -1: getParameterTypes
-15 -1: FinalizerThread
-31 -1: ()Lsun/util/calendar/Gregorian;
-50 -1: (Ljava/lang/CharSequence;)Ljava/lang/StringBuffer;
-13 -1: PROP_SETTINGS
-33 -1: java/util/function/BinaryOperator
-70 -1: (ILjava/util/List<Ljava/lang/Class<*>;>;)Ljava/lang/invoke/MethodType;
-25 -1: getDefaultRequestProperty
-27 -1: (Ljava/util/jar/JarEntry;)V
-27 -1: SPLITERATOR_CHARACTERISTICS
-18 -1: FieldAccessor.java
-10 -1: setComment
-62 -1: (Ljava/lang/String;)Ljava/lang/management/MemoryManagerMXBean;
-11 -1: array_klass
-39 -1: ()Ljava/lang/Class$EnclosingMethodInfo;
-67 -1: ([Ljava/lang/ClassValue$Entry<*>;ILjava/lang/ClassValue$Entry<*>;)I
-9 -1: (II[CII)I
-50 -1: (Ljava/util/jar/JarFile;Ljava/util/zip/ZipEntry;)V
-20 -1: SPECIFICATION_VENDOR
-72 -1: (Lsun/misc/URLClassPath$JarLoader;Ljava/net/URL;)Ljava/util/jar/JarFile;
-87 -1: <T:Ljava/lang/Object;>(Ljava/lang/ThreadLocal<Ljava/lang/ref/SoftReference<TT;>;>;TT;)V
-9 -1: isVarArgs
-10 -1: setBoolean
-12 -1: (TK;TV;TV;)Z
-16 -1: findSharedClass0
-5 -1: csize
-49 -1: Ljava/security/cert/CertificateEncodingException;
-40 -1: java/util/concurrent/locks/ReentrantLock
-86 -1: (Ljava/io/OutputStream;Ljava/lang/Object;Ljava/lang/String;)Lsun/nio/cs/StreamEncoder;
-5 -1: ready
-38 -1: Ljava/security/AccessControlException;
-28 -1: UnmodifiableRandomAccessList
-69 -1: <T:Ljava/lang/Object;>([TT;Ljava/util/function/BinaryOperator<TT;>;)V
-27 -1: Ljava/lang/invoke/Invokers;
-39 -1: java/util/LinkedList$DescendingIterator
-11 -1: writeFields
-17 -1: classLoaderDepth0
-18 -1: permutedTypesMatch
-52 -1: (Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/List;
-12 -1: linkToStatic
-10 -1: CheckedMap
-6 -1: CENOFF
-8 -1: lastRule
-15 -1: java/lang/Short
-39 -1: ()Ljava/lang/Class$ReflectionData<TT;>;
-8 -1: nextDown
-14 -1: image/x-pixmap
-39 -1: (Ljava/lang/Class;[Ljava/lang/Object;)V
-25 -1: defineClassSourceLocation
-23 -1: sun/misc/PostVMInitHook
-15 -1: could not load
-16 -1: allowArraySyntax
-90 -1: Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<Ljava/io/BufferedInputStream;[B>;
-10 -1: putBoolean
-11 -1: has params
-14 -1: setMaxPriority
-10 -1: mayContain
-46 -1: java/lang/reflect/MalformedParametersException
-10 -1: baseLocale
-14 -1: isSubwordOrInt
-10 -1: nextDouble
-32 -1: java/lang/Character$UnicodeBlock
-85 -1: (JLjava/util/function/ToDoubleBiFunction;DLjava/util/function/DoubleBinaryOperator;)D
-20 -1: numberOfLeadingZeros
-59 -1: (I[Ljava/lang/Class<*>;)[Ljava/lang/invoke/LambdaForm$Name;
-7 -1: setSize
-29 -1: java/io/FileNotFoundException
-9 -1: getString
-24 -1: ([CII)Ljava/lang/String;
-38 -1: (Ljava/lang/String;Ljava/lang/Class;)V
-5 -1: shift
-18 -1: getConstructorSlot
-41 -1: java/lang/ThreadLocal$SuppliedThreadLocal
-16 -1: UNASSIGNED_STACK
-20 -1: Malformed class name
-12 -1: ofEpochMilli
-34 -1: sun/launcher/LauncherHelper$StdArg
-33 -1: java/nio/ByteBufferAsShortBufferB
-7 -1: convert
-21 -1: ()[Ljava/util/Locale;
-15 -1: ISO_8859-5:1988
-35 -1: av[0] not instace of MethodHandle:
-33 -1: java/nio/ByteBufferAsShortBufferL
-5 -1: hypot
-16 -1: InputStream.java
-13 -1: reinvokerForm
-39 -1: JVMTI_THREAD_STATE_WAITING_INDEFINITELY
-16 -1: sun/misc/Version
-66 -1: <T::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TT;>;)[TT;
-11 -1: codePointAt
-30 -1: ([Ljava/lang/reflect/Method;)V
-9 -1: duplicate
-9 -1: interface
-5 -1: X.509
-24 -1: SynchronizedNavigableSet
-8 -1: us-ascii
-17 -1: getUnresolvedType
-21 -1: PRIVATE_USE_EXTENSION
-4 -1: form
-93 -1: (Ljava/util/ArrayPrefixHelpers$LongCumulateTask;Ljava/util/function/LongBinaryOperator;[JII)V
-27 -1: sealing violation: package
-34 -1: RuntimeVisibleParameterAnnotations
-17 -1: LF_INVSTATIC_INIT
-14 -1: Gregorian.java
-32 -1: java/util/function/UnaryOperator
-3 -1: log
-3 -1: low
-22 -1: sun/misc/JavaNetAccess
-9 -1: getLength
-21 -1: getRawTypeAnnotations
-36 -1: (Ljava/lang/String;)Ljava/lang/Long;
-9 -1: getNumber
-66 -1: (ILjava/lang/Object;)Ljava/util/concurrent/ConcurrentHashMap$Node;
-20 -1: (Ljava/lang/Class;)C
-89 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Map$Entry<TK;TV;>;
-6 -1: ENDSIG
-20 -1: (Ljava/lang/Class;)I
-20 -1: (Ljava/lang/Class;)J
-24 -1: [[Ljava/io/Serializable;
-22 -1: serialPersistentFields
-7 -1: console
-142 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-27 -1: (Ljava/nio/ByteBuffer;ICZ)V
-20 -1: (Ljava/lang/Class;)V
-40 -1: java/lang/ArrayIndexOutOfBoundsException
-6 -1: this$0
-51 -1: (Ljava/lang/invoke/MemberName;[Ljava/lang/Object;)V
-18 -1: packageAccessValid
-33 -1: ([Ljava/lang/StackTraceElement;)V
-8 -1: constant
-113 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;IILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class<*>;
-8 -1: isMethod
-20 -1: (Ljava/lang/Class;)Z
-6 -1: ENDSIZ
-8 -1: newEntry
-57 -1: (Ljava/lang/Object;)Ljava/lang/IndexOutOfBoundsException;
-25 -1: (Ljava/util/Comparator;)V
-8 -1: isBridge
-6 -1: ([BI)I
-6 -1: ([BI)J
-16 -1: getReferenceKind
-26 -1: [Ljava/security/Principal;
-71 -1: (Ljava/lang/Class;[Ljava/lang/reflect/Field;)[Ljava/lang/reflect/Field;
-32 -1: ()Ljava/lang/ClassValue$Version;
-16 -1: SearchValuesTask
-17 -1: setCompressedSize
-16 -1: DEFAULT_CAPACITY
-108 -1: <K:Ljava/lang/Object;V::Ljava/lang/Comparable<-TV;>;>()Ljava/util/Comparator<Ljava/util/Map$Entry<TK;TV;>;>;
-27 -1: java/util/ComparableTimSort
-41 -1: null StackTraceElement in serial stream.
-6 -1: ([BI)V
-44 -1: (Ljava/util/jar/JarFile;)Lsun/misc/JarIndex;
-71 -1: (Ljava/util/jar/JarFile;Ljava/util/Enumeration;)Ljava/util/Enumeration;
-52 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Class<*>;)Z
-36 -1: [Ljava/lang/reflect/TypeVariable<*>;
-17 -1: OutputStream.java
-8 -1: combiner
-15 -1: decodeArrayLoop
-19 -1: (Ljava/io/Writer;)V
-41 -1: (Ljava/util/List<*>;Ljava/util/List<*>;)I
-35 -1: ()[Ljava/security/cert/Certificate;
-33 -1: ([I)Ljava/util/Spliterator$OfInt;
-9 -1: NF_asType
-17 -1: java/io/Closeable
-11 -1: updateBytes
-12 -1: charsets.jar
-18 -1: getDeclaredFields0
-47 -1: (Ljava/lang/Object;I)Ljava/lang/reflect/Member;
-60 -1: (Ljava/lang/String;ILjava/lang/String;)Ljava/nio/ByteBuffer;
-15 -1: getTotalSeconds
-57 -1: (Ljava/util/Collection<+Ljava/util/Map$Entry<TK;TV;>;>;)Z
-4 -1: JULY
-10 -1: Exceptions
-41 -1: ()Ljava/util/List<Ljava/io/IOException;>;
-14 -1: ParseUtil.java
-13 -1: getJarFileURL
-29 -1: setJavaIOFileDescriptorAccess
-24 -1: ARRAY_OBJECT_BASE_OFFSET
-21 -1: onUnmappableCharacter
-53 -1: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/Map;
-24 -1: MethodHandleNatives.java
-40 -1: java/nio/charset/MalformedInputException
-37 -1: [Ljava/lang/reflect/AnnotatedElement;
-15 -1: CLASSPATH_CHARS
-18 -1: [Ljava/lang/Class;
-7 -1: FJFloat
-47 -1: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;I)V
-19 -1: Ljava/lang/Runtime;
-23 -1: java/lang/CharacterData
-42 -1: (Ljava/lang/Void;Ljava/lang/ClassLoader;)V
-76 -1: (Ljava/nio/channels/ReadableByteChannel;Ljava/nio/charset/CharsetDecoder;I)V
-56 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;B)V
-19 -1: java/util/zip/CRC32
-33 -1: <T:Ljava/lang/Object;>([TT;I)[TT;
-22 -1: ([F)Ljava/lang/String;
-5 -1: UTF_8
-20 -1: aliases_UTF_32BE_BOM
-11 -1: Buffer.java
-78 -1: <T:Ljava/lang/Object;>(Ljava/util/Comparator<TT;>;)Ljava/util/Comparator<TT;>;
-44 -1: (Ljava/lang/String;)Ljava/util/zip/ZipEntry;
-9 -1: malformed
-4 -1: JUNE
-51 -1: (Ljava/util/jar/JarFile;Ljava/util/jar/JarFile$1;)V
-6 -1: locale
-34 -1: (Ljava/util/function/BiFunction;)V
-10 -1: setMinutes
-40 -1: (Ljava/lang/reflect/AccessibleObject;Z)V
-12 -1: maybeCompile
-46 -1: (Ljava/lang/Class;Ljava/lang/reflect/Method;)V
-7 -1: getEras
-55 -1: <T:Ljava/lang/Object;>([TT;Ljava/util/Iterator<*>;)[TT;
-17 -1: toUnsignedString0
-32 -1: (Ljava/lang/invoke/MethodType;)V
-32 -1: (Ljava/lang/invoke/MethodType;)Z
-10 -1: Class.java
-27 -1: ()Ljava/util/Iterator<TK;>;
-29 -1: WINDOWS_EPOCH_IN_MICROSECONDS
-41 -1: (Ljava/io/InputStream;)Ljava/lang/String;
-4 -1: prev
-24 -1: ()Ljava/util/Properties;
-11 -1: awaitBooted
-19 -1: generateConstructor
-22 -1: sun/misc/SharedSecrets
-19 -1: getDateTimeInstance
-43 -1: (IIILsun/util/calendar/BaseCalendar$Date;)J
-5 -1: setID
-11 -1: Locale.java
-12 -1: getRootGroup
-15 -1: setLastModified
-7 -1: trouble
-28 -1: (Z)Ljava/lang/StringBuilder;
-5 -1: setIO
-17 -1: loadClassInternal
-23 -1: java/lang/ref/Finalizer
-8 -1: EmptySet
-16 -1: aliases_UTF_16BE
-50 -1: (Ljava/util/NavigableMap;)Ljava/util/NavigableMap;
-15 -1: unmodifiableMap
-48 -1: (Ljava/lang/Class<*>;)Lsun/reflect/ConstantPool;
-15 -1: arrayContentsEq
-7 -1: EXT_TAG
-31 -1: (Ljava/util/HashMap$TreeNode;)Z
-5 -1: cp737
-22 -1: java/util/zip/Checksum
-5 -1: names
-22 -1: ConcurrentHashMap.java
-7 -1: ([J[J)Z
-7 -1: WAITING
-31 -1: sun.launcher.resources.launcher
-14 -1: getThreadGroup
-8 -1: PutField
-12 -1: hugeCapacity
-9 -1: isPackage
-72 -1: (Ljava/lang/ThreadLocal<*>;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-23 7: sun/nio/ch/DirectBuffer
-13 -1: Checksum.java
-25 -1: (Ljava/nio/ByteBuffer;I)C
-51 -1: (Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;
-25 -1: (Ljava/nio/ByteBuffer;I)D
-7 -1: treeify
-25 -1: (Ljava/nio/ByteBuffer;I)F
-5 -1: setIn
-25 -1: (Ljava/nio/ByteBuffer;I)I
-20 -1: TRACE_METHOD_LINKAGE
-25 -1: (Ljava/nio/ByteBuffer;I)J
-7 -1: putIntB
-22 -1: createGarbageCollector
-50 -1: <T:Ljava/lang/Object;>(Ljava/lang/Class<TT;>;)[TT;
-25 -1: (Ljava/nio/ByteBuffer;I)S
-7 -1: putIntL
-19 -1: (B)Ljava/lang/Byte;
-14 -1: Hashtable.java
-29 -1: java/lang/ArrayStoreException
-11 -1: all_allowed
-16 -1: getLastRawOffset
-7 -1: inReady
-36 -1: java/lang/ThreadLocal$ThreadLocalMap
-40 -1: (ILjava/lang/String;Ljava/lang/String;)V
-23 -1: Ljava/lang/ThreadLocal;
-16 -1: classValueOrNull
-62 -1: (Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/MethodHandle;
-23 -1: preparedFieldLambdaForm
-22 -1: (Z)Ljava/lang/Boolean;
-14 -1: ThreadLocalMap
-27 -1: java/lang/StackTraceElement
-13 -1: getEntryCSize
-19 -1: java.security.debug
-53 -1: (Ljava/util/Collection<*>;Ljava/util/Collection<*>;)Z
-6 -1: LOCLEN
-40 -1: Ljava/lang/Class<Ljava/lang/Character;>;
-6 -1: (JJB)V
-66 -1: Ljava/util/Hashtable<Ljava/lang/String;Ljava/net/ContentHandler;>;
-31 -1: [[Ljava/lang/StackTraceElement;
-9 -1: putStatic
-16 -1: Asia/Ho_Chi_Minh
-15 -1: getDisplayNames
-13 -1: convertToAbbr
-23 -1: Method not implemented.
-15 -1: isCCLOverridden
-14 -1: doubleCapacity
-137 -1: (Ljava/lang/Class<*>;ZLjava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Class<*>;)Ljava/util/List<Ljava/lang/invoke/MemberName;>;
-219 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceKeysTask;Ljava/util/function/Function;Ljava/util/function/BiFunction;)V
-7 -1: native
-29 -1: (Ljava/lang/reflect/Field;Z)V
-18 -1: Ljava/util/Locale;
-31 -1: Ljava/util/concurrent/TimeUnit;
-16 -1: threadsSuspended
-7 -1: ([III)V
-20 -1: setMaxDelimCodePoint
-18 -1: contentClassPrefix
-13 -1: mappingOffset
-10 -1: toIndex =
-47 -1: (Ljava/lang/CharSequence;)Ljava/io/PrintStream;
-12 -1: booleanValue
-13 -1: putMapEntries
-17 -1: defaultBundleName
-50 -1: (Ljava/util/concurrent/CountedCompleter;[B[BIIII)V
-10 -1: executable
-20 -1: java/time/ZoneOffset
-28 -1: java/lang/ref/FinalReference
-11 -1: newTreeNode
-7 -1: lookup2
-10 -1: TableStack
-59 -1: Ljava/util/concurrent/ConcurrentHashMap$ValuesView<TK;TV;>;
-11 -1: getAccessor
-9 -1: available
-18 -1: java/io/FileReader
-34 -1: java/security/ProtectionDomain$3$1
-16 -1: integer overflow
-11 -1: internTable
-28 -1: Ljava/util/HashMap$TreeNode;
-19 -1: | invocationCounter
-12 -1: findResource
-9 -1: isLoaded0
-5 -1: cp775
-24 -1: DIRECTIONALITY_UNDEFINED
-9 -1: isInvalid
-7 -1: lookupN
-35 -1: (Lsun/reflect/MethodAccessorImpl;)V
-6 -1: ENDSUB
-4 -1: to
-59 -1: ([Ljava/lang/Object;IILjava/lang/Class;)[Ljava/lang/Object;
-10 -1: meta-index
-6 -1: INDENT
-9 -1: WEDNESDAY
-40 -1: ()Ljava/lang/annotation/RetentionPolicy;
-14 -1: getUsableSpace
-7 -1: TUESDAY
-51 -1: (Ljava/lang/Class;I)Ljava/lang/invoke/MethodHandle;
-12 -1: getSubjectDN
-21 -1: Ljava/io/InputStream;
-25 -1: (IC)Ljava/nio/CharBuffer;
-52 -1: (Ljava/nio/CharBuffer;)Ljava/util/function/Supplier;
-17 -1: ()[Ljava/net/URL;
-6 -1: search
-10 -1: Main-Class
-8 -1: ([CIIC)I
-16 -1: Certificate.java
-14 -1: spreadInvokers
-22 -1: sun/nio/cs/ISO_8859_15
-6 -1: accept
-18 -1: ReflectAccess.java
-13 -1: java/nio/Bits
-14 -1: linkToCallSite
-46 -1: Ljava/nio/charset/UnsupportedCharsetException;
-8 -1: ([CIIC)V
-9 -1: (TT;TV;)V
-26 -1: java/lang/OutOfMemoryError
-34 -1: policy loading and granting
-76 -1: (Ljava/nio/CharBuffer;ILjava/nio/ByteBuffer;I)Ljava/nio/charset/CoderResult;
-13 -1: x-windows-949
-21 -1: Ljava/io/PrintStream;
-9 -1: initNames
-12 -1: testAnyFlags
-65 -1: (Ljava/lang/reflect/Method;)Ljava/lang/invoke/DirectMethodHandle;
-34 -1: (Ljava/util/List;)Ljava/util/List;
-10 -1: CacheEntry
-10 -1: hasAllPerm
-26 -1: java/nio/charset/Charset$1
-26 -1: java/nio/charset/Charset$2
-19 -1: ()Ljava/util/Stack;
-26 -1: java/nio/charset/Charset$3
-62 -1: (Ljava/lang/String;)Lsun/util/calendar/LocalGregorianCalendar;
-23 -1: ARRAY_FLOAT_INDEX_SCALE
-23 -1: (Ljava/lang/Object;IS)V
-13 -1: x-windows-950
-31 -1: Ljava/util/Hashtable$Entry<**>;
-87 -1: Ljava/util/WeakHashMap<Ljava/lang/ClassValue$Identity;Ljava/lang/ClassValue$Entry<*>;>;
-9 -1: permClass
-37 -1: (Ljava/security/ProtectionDomain$3;)V
-99 -1: <S::Lsun/reflect/generics/tree/Signature;>Lsun/reflect/generics/repository/AbstractRepository<TS;>;
-37 -1: ()Ljava/util/function/BinaryOperator;
-64 -1: java/util/Collections$UnmodifiableNavigableMap$EmptyNavigableMap
-91 -1: (Ljava/util/ArrayPrefixHelpers$IntCumulateTask;Ljava/util/function/IntBinaryOperator;[III)V
-6 -1: getCrc
-25 -1: ByteArrayInputStream.java
-9 -1: SYNTHETIC
-52 -1: Ljava/lang/ref/PhantomReference<Ljava/lang/Object;>;
-246 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceKeysToDoubleTask;Ljava/util/function/ToDoubleFunction;DLjava/util/function/DoubleBinaryOperator;)V
-38 -1: java/lang/Throwable$WrappedPrintStream
-21 -1: Illegal load factor:
-43 -1: Ljava/util/Deque<Ljava/util/zip/Inflater;>;
-3 -1: map
-6 -1: expand
-6 -1: access
-3 -1: max
-33 -1: impliesCreateAccessControlContext
-3 -1: may
-53 -1: java/util/concurrent/ConcurrentHashMap$ReduceKeysTask
-91 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Lsun/misc/URLClassPath$Loader;>;
-60 -1: attempt to add a Permission to a readonly Permissions object
-21 -1: canonicalizeExtension
-11 -1: copyValueOf
-25 -1: (IJ)Ljava/nio/LongBuffer;
-112 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TV;+TU;>;Ljava/util/function/BiFunction<-TU;-TU;+TU;>;)TU;
-11 -1: DeqIterator
-11 -1: SpeciesData
-8 -1: getCause
-16 -1: aliases_UTF_16LE
-51 -1: (TT;TV;Ljava/util/function/BinaryOperator<TV;>;)TV;
-25 -1: (JF)Ljava/nio/ByteBuffer;
-16 -1: sun/misc/IOUtils
-32 -1: Ljava/util/Locale$FilteringMode;
-6 -1: .class
-13 -1: getPermission
-13 -1: startsWithLOC
-8 -1: Identity
-23 -1: ([BII)Ljava/lang/Class;
-15 -1: putByteVolatile
-36 -1: (Ljava/util/Deque;)Ljava/util/Queue;
-22 -1: (Ljava/lang/Object;S)V
-47 -1: java/util/concurrent/ConcurrentHashMap$BulkTask
-4 -1: n =
-9 -1: (ITE;)TE;
-5 -1: zeroD
-18 -1: formatUnsignedLong
-29 -1: default display locale =
-23 -1: java/io/File$PathStatus
-5 -1: zeroF
-20 -1: Ljava/util/Set<TK;>;
-20 -1: (Ljava/util/List;I)V
-5 -1: zeroI
-5 -1: zeroJ
-7 -1: context
-39 -1: Ljava/nio/channels/WritableByteChannel;
-5 -1: zeroL
-34 -1: Lsun/util/calendar/CalendarSystem;
-24 -1: JVMTI_THREAD_STATE_ALIVE
-18 -1: (Ljava/util/Set;)V
-18 -1: (Ljava/util/Set;)Z
-42 -1: (TT;Ljava/lang/ref/ReferenceQueue<-TT;>;)V
-7 -1: entries
-30 -1: (Ljava/util/WeakHashMap;IIII)V
-15 -1: csisolatingreek
-38 -1: ([Ljava/lang/Class;)Ljava/lang/Object;
-12 -1: isMalformed3
-12 -1: isMalformed4
-5 -1: FJInt
-23 -1: java/util/LinkedHashMap
-20 -1: malformedInputAction
-12 -1: Charset.java
-5 -1: LLL_L
-42 -1: (Ljava/util/Collection;)Ljava/lang/Object;
-22 -1: makeMethodHandleInvoke
-3 -1: mdt
-7 -1: unicode
-12 -1: newInstance0
-10 -1: checkCerts
-34 -1: java/util/WeakHashMap$HashIterator
-23 -1: (Ljava/lang/Object;JI)I
-9 -1: hexDigits
-13 -1: javaToDosTime
-24 -1: (I)Ljava/nio/LongBuffer;
-6 -1: A_DATA
-12 -1: deepToString
-23 -1: (Ljava/lang/Object;JI)V
-91 -1: (JLjava/util/function/ToLongBiFunction<-TK;-TV;>;JLjava/util/function/LongBinaryOperator;)J
-23 -1: bad spread array length
-11 -1: readTimeout
-14 -1: toAbsolutePath
-8 -1: isFinite
-19 -1: currentLoadedClass0
-3 -1: \xef\xbf\xbd
-23 -1: (Ljava/nio/file/Path;)I
-8 -1: handlers
-21 -1: (Ljava/util/List;II)V
-89 -1: (Lsun/misc/URLClassPath$Loader;Ljava/lang/String;Ljava/net/URL;Ljava/net/URLConnection;)V
-8 -1: OVERFLOW
-8 -1: newTable
-8 -1: THURSDAY
-6 -1: notify
-12 -1: initialValue
-35 -1: (I)Ljava/util/LinkedList$Node<TE;>;
-18 -1: AsVarargsCollector
-26 -1: (Lsun/misc/JavaIOAccess;)V
-18 -1: ()Ljava/lang/Void;
-23 -1: (Ljava/nio/file/Path;)Z
-16 -1: MINUTE_IN_MILLIS
-67 -1: (Ljava/lang/Class;[Ljava/lang/Class;Z)Ljava/lang/invoke/MethodType;
-18 -1: Ljava/util/Vector;
-70 -1: (Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;
-40 -1: (Ljava/lang/Object;ILjava/lang/Object;)V
-25 -1: UnresolvedPermission.java
-14 -1: ReduceKeysTask
-21 -1: ()[Ljava/lang/Object;
-129 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Collection<TE;>;Ljava/io/Serializable;
-16 -1: ClassLoader.java
-46 -1: Ljava/util/Comparators$NaturalOrderComparator;
-17 -1: compareAndSwapInt
-22 -1: packageDefinitionValid
-41 -1: ([Ljava/lang/Object;[Ljava/lang/Object;)Z
-162 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/lang/String;>;Ljava/util/Locale$FilteringMode;)Ljava/util/List<Ljava/lang/String;>;
-16 -1: sun.zip.zipFiles
-17 -1: java_runtime_name
-31 -1: (Ljava/lang/ClassValue$Entry;)V
-31 -1: (Ljava/lang/ClassValue$Entry;)Z
-30 -1: <T:Ljava/lang/Object;>(TT;)TT;
-39 -1: JavaSecurityProtectionDomainAccess.java
-24 -1: (I)Ljava/lang/Throwable;
-7 -1: FJShort
-9 -1: putFloatB
-19 -1: checkedNavigableSet
-25 -1: java/lang/invoke/Invokers
-18 -1: setIfModifiedSince
-14 -1: parameterTypes
-41 -1: (Ljava/lang/Object;Ljava/lang/Runnable;)V
-9 -1: putFloatL
-11 -1: getTypeCode
-5 -1: (ZZ)I
-24 -1: java/lang/ProcessBuilder
-9 -1: UNDERFLOW
-21 -1: VolatileCallSite.java
-24 -1: (C)Ljava/nio/CharBuffer;
-55 -1: java/util/concurrent/ConcurrentHashMap$ForEachValueTask
-26 -1: (Ljava/lang/String;[CII)[B
-18 -1: reduceKeysToDouble
-5 -1: (ZZ)Z
-23 -1: setCallSiteTargetNormal
-3 -1: min
-4 -1: ceil
-62 -1: (Ljava/lang/String;)Ljava/util/LinkedList<Ljava/lang/String;>;
-29 -1: (Ljava/util/AbstractList;II)V
-32 -1: Ljava/lang/Class$AnnotationData;
-21 -1: createFileExclusively
-64 -1: (Ljava/lang/ref/SoftReference;I)Ljava/lang/Class$ReflectionData;
-26 -1: java/lang/Short$ShortCache
-54 -1: (Ljava/net/URL;Ljava/io/File;)Ljava/net/URLConnection;
-29 -1: Lsun/nio/cs/Surrogate$Parser;
-58 -1: (Ljava/lang/Class;)Lsun/reflect/annotation/AnnotationType;
-8 -1: findForm
-53 -1: Ljava/lang/invoke/MethodType$ConcurrentWeakInternSet;
-39 -1: (Lsun/misc/Perf;Ljava/nio/ByteBuffer;)V
-16 -1: mergePermissions
-11 -1: totalMemory
-53 -1: java/lang/invoke/DirectMethodHandle$EnsureInitialized
-139 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/concurrent/ConcurrentMap<TK;TV;>;Ljava/io/Serializable;
-29 -1: java/util/HashMap$KeyIterator
-20 -1: STACK_TRACE_SENTINEL
-5 -1: order
-18 -1: java/lang/Runnable
-8 -1: GetField
-13 -1: Empty command
-7 -1: CONTROL
-9 -1: blockedOn
-12 -1: testAllFlags
-11 -1: getInflater
-16 -1: threadTerminated
-44 -1: (Ljava/lang/ThreadGroup;Ljava/lang/String;)V
-20 -1: java.runtime.version
-8 -1: peekLast
-23 -1: java/util/ArrayList$Itr
-21 -1: (Ljava/util/Locale;)V
-13 -1: isOptimizable
-8 -1: FairSync
-7 -1: CHINESE
-15 -1: initHelpMessage
-30 -1: ()Ljava/util/HashMap$TreeNode;
-29 -1: Ljava/lang/SecurityException;
-7 -1: charset
-35 -1: sun/security/util/SecurityConstants
-19 -1: sun.nio.cs.bugLevel
-8 2: Foo.java
-49 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;)V
-12 -1: EntrySetView
-37 -1: (Lsun/misc/JavaNetHttpCookieAccess;)V
-35 -1: Ljava/util/Hashtable$Entry<TK;TV;>;
-20 -1: NF_constructorMethod
-8 -1: getMonth
-38 -1: (Ljava/util/Iterator;Ljava/util/Map;)V
-14 -1: getIntVolatile
-6 -1: [name=
-8 -1: oop_size
-20 -1: Can't load library:
-30 -1: ()Ljava/util/Spliterator<TV;>;
-33 -1: Lsun/reflect/ConstructorAccessor;
-61 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Integer;>;
-15 -1: printVmSettings
-33 -1: stack include stack trace
-45 -1: ([Ljava/lang/Object;I)Ljava/util/Spliterator;
-37 -1: sun/reflect/generics/scope/ClassScope
-36 -1: java/io/UnsupportedEncodingException
-24 -1: (J)Ljava/nio/LongBuffer;
-11 -1: addressSize
-15 -1: ByteBuffer.java
-62 -1: (Ljava/lang/String;)Lsun/reflect/generics/tree/ClassSignature;
-9 -1: (TT;TT;)I
-25 -1: java/io/DefaultFileSystem
-15 -1: BaseLocale.java
-14 -1: BitSetIterator
-17 -1: AbstractList.java
-57 -1: Ljava/lang/ref/WeakReference<Ljava/lang/ThreadLocal<*>;>;
-178 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-9 -1: arguments
-26 -1: java/util/Locale$LocaleKey
-9 -1: setLength
-29 -1: sun/nio/cs/ISO_8859_1$Decoder
-9 -1: zipfs.jar
-24 -1: Ljava/util/zip/ZipCoder;
-14 -1: , new state =
-93 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;IIIJLjava/util/concurrent/ConcurrentHashMap;)V
-39 -1: java/security/PrivilegedExceptionAction
-9 -1: dnsns.jar
-20 -1: iteratorBinarySearch
-14 -1: initializePath
-22 -1: DefaultFileSystem.java
-17 -1: Ljava/util/Deque;
-8 -1: DEFLATED
-11 -1: Can't load
-9 -1: ArrayList
-21 -1: negativeZeroFloatBits
-41 -1: (Ljava/lang/String;ILjava/util/Locale;)[C
-14 -1: ANSI_X3.4-1968
-39 -1: sun/reflect/annotation/AnnotationType$1
-3 -1: mod
-62 -1: Ljava/nio/Buffer;Ljava/lang/Comparable<Ljava/nio/ByteBuffer;>;
-29 -1: interpretWithArgumentsTracing
-6 -1: getDay
-47 -1: sun/reflect/generics/repository/ClassRepository
-19 -1: refKindDoesDispatch
-20 -1: getAnnotationsByType
-14 -1: needsExpansion
-18 -1: lastIndexOfSubList
-26 -1: JavaUtilZipFileAccess.java
-59 -1: (Ljava/lang/CharSequence;)Ljava/lang/AbstractStringBuilder;
-12 -1: ptypesOffset
-8 -1: hashcode
-18 -1: ([Ljava/net/URL;)V
-8 -1: iso-ir-6
-7 -1: jzentry
-52 -1: only dump output if specified codebase
-31 -1: lambda$comparingLong$6043328a$1
-5 -1: MARCH
-14 -1: ANSI_X3.4-1986
-14 -1: isMalformed3_2
-7 -1: IS_TYPE
-68 -1: Ljava/lang/Object;Ljava/lang/Comparable<Ljava/nio/charset/Charset;>;
-30 -1: protocol doesn't support input
-17 -1: getExtClassLoader
-14 -1: setProxiedHost
-73 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;>;
-16 -1: traceInterpreter
-17 -1: (Ljava/net/URL;)I
-5 -1: expm1
-18 -1: createInheritedMap
-66 -1: java/util/concurrent/ConcurrentHashMap$ForEachTransformedEntryTask
-17 -1: getTimeOfDayValue
-15 -1: zeroLengthArray
-20 -1: invalid permission:
-6 -1: REPORT
-15 -1: isNumericString
-78 -1: (Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;
-6 -1: (TV;)Z
-25 -1: Lsun/misc/JavaLangAccess;
-29 -1: (I)Ljava/lang/reflect/Method;
-17 -1: (Ljava/net/URL;)V
-34 -1: ()Ljava/lang/Class$ReflectionData;
-50 -1: java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE
-10 -1: copyWith:
-17 -1: (Ljava/net/URL;)Z
-32 -1: ()Ljava/util/stream/Stream<TE;>;
-22 -1: quickCheckMemberAccess
-29 -1: ()Lsun/net/www/MessageHeader;
-19 -1: getAssignedCombiner
-8 -1: ([JIIJ)I
-17 -1: formatUnsignedInt
-68 -1: <V:Ljava/lang/Object;>Ljava/util/AbstractMap<Ljava/lang/String;TV;>;
-34 -1: java/nio/ByteBufferAsDoubleBufferB
-32 -1: ([I)Ljava/util/stream/IntStream;
-9 -1: init_lock
-18 -1: must be resolved:
-42 -1: ()Ljava/nio/channels/spi/SelectorProvider;
-8 -1: ([JIIJ)V
-33 -1: IncompatibleClassChangeError.java
-34 -1: java/nio/ByteBufferAsDoubleBufferL
-31 -1: ()Ljava/util/function/Function;
-43 -1: Ljava/lang/Enum<Ljava/io/File$PathStatus;>;
-17 -1: availableCharsets
-49 -1: java/util/ArraysParallelSortHelpers$FJChar$Sorter
-22 -1: permission=<classname>
-22 -1: getAnnotatedSuperclass
-20 -1: isObjectPublicMethod
-15 -1: Attempt to get
-10 -1: createLong
-14 -1: HASH_INCREMENT
-32 -1: sun/management/ManagementFactory
-13 -1: separatorChar
-15 -1: bad field type
-8 -1: november
-27 -1: (F)Ljava/lang/StringBuffer;
-3 -1: EAT
-3 -1: mst
-54 -1: (Ljava/lang/reflect/Method;)Ljava/lang/reflect/Method;
-18 -1: Ljava/lang/Object;
-7 -1: ;:&=+$,
-12 -1: Handler.java
-7 -1: isDirty
-127 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;Ljava/security/AccessControlContext;[Ljava/security/Permission;)TT;
-14 -1: asTypeUncached
-5 -1: split
-200 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;Ljava/lang/reflect/Type;Lsun/reflect/annotation/TypeAnnotation$TypeAnnotationTarget;)Ljava/lang/reflect/AnnotatedType;
-47 -1: java.lang.invoke.MethodHandle.TRACE_INTERPRETER
-22 -1: sun/invoke/empty/Empty
-66 -1: (Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/Map;
-18 -1: jvm_update_version
-32 -1: (Ljava/util/Map;)Ljava/util/Map;
-14 -1: cacheLoadLimit
-8 -1: javaHome
-52 -1: (Ljava/lang/reflect/Field;)Ljava/lang/reflect/Field;
-20 -1: [[Ljava/lang/Object;
-19 -1: isJavaLetterOrDigit
-11 -1: loadLibrary
-32 -1: java/io/StreamCorruptedException
-14 -1: setAccessible0
-27 -1: sun/nio/cs/UTF_16LE$Encoder
-60 -1: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;
-8 -1: segments
-10 -1: UTF_8.java
-3 -1: ECT
-5 -1: cp813
-5 -1: cp819
-61 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/Comparator;)I
-5 -1: Cache
-4 -1: sinh
-32 -1: java/util/function/ToIntFunction
-10 -1: setFactory
-24 -1: Illegal mappings count:
-16 -1: fileToEncodedURL
-38 -1: Ljava/lang/annotation/RetentionPolicy;
-27 -1: Ljava/net/SocketPermission;
-46 -1: (Ljava/lang/CharSequence;I)[Ljava/lang/String;
-11 -1: cardinality
-13 -1: getMonthValue
-64 -1: (Ljava/lang/invoke/MethodType;II)Ljava/lang/invoke/MethodHandle;
-6 -1: ENDTOT
-12 -1: getBytesUTF8
-9 -1: cacheLoad
-13 -1: packageAccess
-14 -1: sharedToString
-5 -1: merge
-29 -1: parameter type cannot be void
-27 -1: makePreparedFieldLambdaForm
-40 -1: Couldn't find 3-letter country code for
-166 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;Ljava/lang/ClassLoader;)V
-19 -1: (Ljava/util/Map;Z)V
-13 -1: setExecutable
-17 -1: objectFieldOffset
-57 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
-128 -1: (Ljava/lang/Class<*>;ZLjava/lang/String;Ljava/lang/Class<*>;Ljava/lang/Class<*>;)Ljava/util/List<Ljava/lang/invoke/MemberName;>;
-61 -1: java/util/concurrent/ConcurrentHashMap$MapReduceKeysToIntTask
-6 -1: asType
-25 -1: java/io/ObjectStreamField
-15 -1: jvmMajorVersion
-124 -1: (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/lang/Object;
-23 -1: (Ljava/lang/Class<*>;)C
-6 -1: andNot
-15 -1: getResponseCode
-59 -1: (Ljava/lang/StringBuffer;)Ljava/lang/AbstractStringBuilder;
-23 -1: (Ljava/lang/Class<*>;)I
-7 -1: seeAllp
-44 -1: (Ljava/lang/ClassLoader;[Ljava/lang/Class;)V
-13 -1: loadFromCache
-35 -1: sun/nio/cs/HistoricallyNamedCharset
-38 -1: (Ljava/lang/Class;[Ljava/lang/Class;)V
-19 -1: INVOKER_METHOD_TYPE
-16 -1: putShortVolatile
-12 -1: Asia/Karachi
-8 -1: cyrillic
-12 -1: getISO2Table
-23 -1: (Ljava/lang/Class<*>;)V
-3 -1: 1.4
-15 -1: LongBuffer.java
-6 -1: (IFZ)V
-23 -1: (Ljava/lang/Class<*>;)Z
-10 -1: initOutput
-9 -1: CELLSBUSY
-39 -1: java/security/PrivilegedActionException
-31 -1: sun/util/calendar/CalendarUtils
-202 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;[Ljava/lang/reflect/Type;Lsun/reflect/annotation/TypeAnnotation$TypeAnnotationTarget;)[Ljava/lang/reflect/AnnotatedType;
-20 -1: Ljava/lang/Class<*>;
-5 -1: cp850
-25 -1: (JI)Ljava/nio/ByteBuffer;
-5 -1: cp852
-24 -1: Invalid parameter name "
-39 -1: ([CII)Ljava/lang/AbstractStringBuilder;
-5 -1: cp855
-11 -1: Deallocator
-5 -1: cp857
-5 -1: cp858
-7 -1: ([SI)[S
-37 -1: ([C)Ljava/lang/AbstractStringBuilder;
-27 -1: java/lang/SecurityException
-82 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)V
-38 -1: (Ljava/lang/String;)Ljava/lang/String;
-7 -1: connect
-7 -1: isEmpty
-11 -1: replaceNode
-19 -1: SuppliedThreadLocal
-12 -1: asFixedArity
-12 -1: fromIndex =
-19 -1: createMemoryManager
-9 -1: List.java
-8 -1: FEBRUARY
-21 -1: UnicodeLittleUnmarked
-6 -1: a null
-30 -1: ()Ljava/util/Spliterator<TT;>;
-5 -1: cp862
-17 -1: ZoneInfoFile.java
-5 -1: cp866
-8 -1: BulkTask
-53 -1: java/util/concurrent/locks/AbstractQueuedSynchronizer
-20 -1: FileInputStream.java
-12 -1: java.vm.info
-10 -1: newDecoder
-5 -1: (JB)V
-8 -1: filePath
-17 -1: spreadArrayChecks
-44 -1: ([Ljava/lang/Object;Ljava/util/Comparator;)V
-33 -1: java/util/Collections$AsLIFOQueue
-32 -1: Ljava/util/LinkedList$Node<TE;>;
-5 -1: cp874
-78 -1: (Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/io/PrintStream;
-39 -1: (JLjava/util/function/Consumer<-TK;>;)V
-15 -1: appendCodePoint
-20 -1: primitiveReturnCount
-54 -1: only dump output if specified permission
-20 -1: getGenericInterfaces
-41 -1: ([Ljava/lang/reflect/AccessibleObject;Z)V
-17 -1: nUnstartedThreads
-33 -1: (Ljava/lang/invoke/MemberName;Z)V
-24 -1: ARRAY_OBJECT_INDEX_SCALE
-40 -1: (Ljava/lang/String;ILjava/util/Locale;)I
-17 -1: java/io/Flushable
-22 -1: newConstructorAccessor
-26 -1: sun/misc/JavaUtilJarAccess
-6 -1: booted
-10 -1: setDoInput
-36 -1: (Ljava/lang/Class;)[Ljava/lang/Enum;
-19 -1: java/lang/Character
-52 -1: ([Ljava/net/URL;Ljava/net/URLStreamHandlerFactory;)V
-24 -1: (Ljava/nio/LongBuffer;)I
-16 -1: start > length()
-28 -1: (I)Ljava/lang/CharacterData;
-5 -1: val$c
-61 -1: (Ljava/lang/Throwable;Ljava/lang/String;[Ljava/lang/Object;)V
-13 -1: resolveOrNull
-9 -1: L_ESCAPED
-27 -1: MapReduceValuesToDoubleTask
-15 -1: getPreparedForm
-33 -1: (I)[Ljava/util/WeakHashMap$Entry;
-54 -1: ()Ljava/util/stream/Stream<+Ljava/util/zip/ZipEntry;>;
-16 -1: bad method type
-5 -1: val$s
-17 -1: Null charset name
-36 -1: java/lang/invoke/LambdaForm$Compiled
-24 -1: (Ljava/util/SortedMap;)V
-19 -1: java/time/LocalTime
-29 -1: not invocable, no method type
-21 -1: recalculateWordsInUse
-6 -1: val$id
-39 -1: sun/security/util/ManifestEntryVerifier
-60 -1: ([Ljava/lang/Class<*>;I)Ljava/lang/reflect/Constructor<TT;>;
-45 -1: java/util/ArrayPrefixHelpers$LongCumulateTask
-5 -1: OfInt
-11 -1: environment
-60 -1: ([Ljava/lang/Class<*>;[B)[[Ljava/lang/annotation/Annotation;
-7 -1: (JJJZ)V
-10 -1: BufferPool
-6 -1: isUTF8
-12 -1: threadLocals
-35 -1: (Ljava/lang/String;)[Ljava/net/URL;
-21 -1: Ljava/nio/LongBuffer;
-15 -1: copyConstructor
-25 -1: setCallSiteTargetVolatile
-15 -1: getNumericValue
-26 -1: Ljava/security/CodeSource;
-18 -1: Null output stream
-14 -1: cloneWithIndex
-23 -1: LOCAL_LISTEN_PERMISSION
-6 -1: (TT;)I
-46 -1: (Ljava/security/PublicKey;Ljava/lang/String;)V
-6 -1: setCrc
-26 -1: java/io/FilterOutputStream
-10 -1: access$000
-10 -1: access$001
-10 -1: access$002
-6 -1: (TT;)V
-78 -1: <T:Ljava/lang/Object;U:Ljava/lang/Object;>([TU;IILjava/lang/Class<+[TT;>;)[TT;
-41 -1: java/util/concurrent/atomic/AtomicInteger
-8 -1: renameTo
-40 -1: (Ljava/lang/Class<*>;)Ljava/lang/Object;
-17 -1: getRawAnnotations
-29 -1: java/lang/VirtualMachineError
-37 -1: java/lang/management/MemoryPoolMXBean
-25 -1: (II)Ljava/util/List<TE;>;
-6 -1: utf_16
-23 -1: (Ljava/lang/String;[B)V
-19 -1: MIN_ARRAY_SORT_GRAN
-25 -1: array length is not legal
-45 -1: java/util/concurrent/locks/ReentrantLock$Sync
-36 -1: Ljava/security/AccessControlContext;
-48 -1: sun/reflect/generics/repository/MethodRepository
-24 -1: MethodHandleStatics.java
-24 -1: addThreadDumpForMonitors
-64 -1: <T:Ljava/lang/Object;>(Ljava/util/Set<TT;>;)Ljava/util/Set<TT;>;
-58 -1: (Ljava/lang/String;[Ljava/lang/Object;Ljava/lang/Object;)Z
-37 -1: (III)Lsun/util/calendar/CalendarDate;
-9 -1: createURI
-15 -1: unreserveMemory
-52 -1: (Lsun/reflect/MethodInfo;)Ljava/lang/reflect/Method;
-66 -1: (Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-51 -1: (Ljava/lang/reflect/Constructor;)Ljava/lang/String;
-23 -1: inheritableThreadLocals
-63 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/reflect/Method;>;
-16 -1: setContentLength
-16 -1: LOWERCASE_LETTER
-4 -1: size
-25 -1: java.launcher.opt.hotspot
-19 -1: buildAnnotatedTypes
-26 -1: JAVAFX_LAUNCHER_CLASS_NAME
-11 -1: getAliasMap
-19 -1: CheckedNavigableSet
-15 -1: getAbsolutePath
-11 -1: doubleValue
-6 -1: utf_32
-22 -1: IMPLEMENTATION_VERSION
-3 -1: ne1
-11 -1: contentType
-8 -1: canWrite
-11 -1: Object.java
-14 -1: America/Denver
-8 -1: fileName
-13 -1: allPermDomain
-27 -1: ()Ljava/util/Iterator<TE;>;
-31 -1: (Lsun/reflect/MethodAccessor;)V
-11 -1: asTypeCache
-13 -1: lineSeparator
-9 -1: JarLoader
-15 -1: replacementNode
-18 -1: getContentEncoding
-12 -1: invoke_LLL_L
-22 -1: ()Ljava/util/TimeZone;
-17 -1: Reference Handler
-33 -1: java/lang/invoke/MethodHandleImpl
-47 -1: ()Ljava/util/concurrent/ConcurrentHashMap$Node;
-12 -1: invoke_LLL_V
-8 -1: form <<
-23 -1: (Ljava/lang/Object;JJ)J
-15 -1: isHighSurrogate
-31 -1: (Ljava/util/Collection<+TV;>;)Z
-36 -1: ([Ljava/util/HashMap$Node<TK;TV;>;)V
-23 -1: (Ljava/lang/Object;JJ)V
-12 -1: utf_32be_bom
-40 -1: sun/util/calendar/LocalGregorianCalendar
-27 -1: [Ljava/security/CodeSigner;
-15 -1: afterNodeAccess
-13 -1: nextThreadNum
-18 -1: INTERNED_ARGUMENTS
-11 -1: getMillisOf
-18 -1: offsetByCodePoints
-11 -1: writeObject
-48 -1: (Ljava/util/Locale$Category;Ljava/util/Locale;)V
-3 -1: nfe
-41 -1: (Ljava/util/Properties;Ljava/io/Reader;)V
-50 -1: (Ljava/util/concurrent/CountedCompleter;[C[CIIII)V
-15 -1: implFlushBuffer
-33 -1: (I)[Ljava/lang/invoke/MemberName;
-12 -1: Unicode.java
-17 -1: DMH.invokeVirtual
-5 -1: setup
-51 -1: (Ljava/util/Collection;[Ljava/lang/reflect/Field;)V
-3 -1: EST
-7 -1: TREEBIN
-7 -1: getFile
-10 -1: isLeapYear
-18 -1: LinkedHashIterator
-14 -1: DISPLAY_SCRIPT
-25 -1: privateGetDeclaredMethods
-68 -1: (Ljava/util/function/Function;Ljava/lang/Object;Ljava/lang/Object;)I
-22 -1: ()Ljava/util/Iterator;
-21 -1: sun/management/Sensor
-15 -1: getAvailableIDs
-51 -1: Lsun/util/PreHashedMap<Ljava/nio/charset/Charset;>;
-8 -1: elot_928
-6 -1: LATIN0
-45 -1: ([Ljava/lang/Object;II[Ljava/lang/Object;II)V
-10 -1: [Unlocked]
-15 -1: internArguments
-6 -1: LATIN9
-33 -1: (II)Ljava/lang/invoke/MethodType;
-12 -1: Version.java
-17 -1: setConnectTimeout
-75 -1: (Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
-13 -1: highSurrogate
-12 -1: Africa/Cairo
-21 -1: synchronizedSortedMap
-21 -1: in java.library.path
-45 -1: sun/reflect/generics/tree/FormalTypeParameter
-24 -1: UncaughtExceptionHandler
-14 -1: previousOrSame
-24 -1: java/security/Permission
-9 -1: x-ISCII91
-5 -1: L_HEX
-35 -1: java/lang/invoke/DirectMethodHandle
-35 -1: java/util/ArrayDeque$DeqSpliterator
-14 -1: java/util/List
-11 -1: toLowerCase
-24 -1: java/nio/charset/Charset
-10 -1: MIN_NORMAL
-110 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-13 -1: regionMatches
-17 -1: newMethodAccessor
-26 -1: (Ljava/net/InetAddress;B)V
-68 -1: (Ljava/util/zip/ZipFile;Ljava/lang/String;J)Ljava/util/zip/ZipEntry;
-22 -1: ()Ljava/io/FileSystem;
-19 -1: primitiveSimpleName
-5 -1: MOVED
-9 -1: STATE_RED
-13 -1: linkToSpecial
-19 -1: AnnotationType.java
-20 -1: (II)Ljava/util/List;
-252 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceMappingsToDoubleTask;Ljava/util/function/ToDoubleBiFunction;DLjava/util/function/DoubleBinaryOperator;)V
-12 -1: callSiteForm
-22 -1: isSiblingBindingBefore
-62 -1: <T:Ljava/lang/Object;>([TT;IITT;Ljava/util/Comparator<-TT;>;)I
-15 -1: buildEmptyNames
-11 -1: Thread.java
-30 -1: Ljava/lang/ref/Reference<TT;>;
-35 -1: sun/reflect/MethodAccessorGenerator
-152 -1: (Ljava/util/function/Function;Ljava/util/function/Function;Ljava/util/function/BinaryOperator;Ljava/util/function/Supplier;)Ljava/util/stream/Collector;
-5 -1: total
-242 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceValuesToLongTask;Ljava/util/function/ToLongFunction;JLjava/util/function/LongBinaryOperator;)V
-27 -1: javax/security/auth/Subject
-43 -1: JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
-17 -1: getSignerCertPath
-15 -1: registerNatives
-21 -1: sun/reflect/FieldInfo
-54 -1: (Ljava/nio/charset/Charset;Lsun/nio/cs/ISO_8859_1$1;)V
-17 -1: unwrapWithNoPrims
-17 -1: instanceof Long:
-20 -1: hasRealParameterData
-23 -1: ()Ljava/time/LocalTime;
-14 -1: getAnnotations
-8 -1: optimize
-7 -1: setChar
-11 -1: OFFSET_MASK
-4 -1: TYPE
-177 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/BiFunction;Ljava/util/concurrent/atomic/AtomicReference;)V
-18 -1: removeShutdownHook
-27 -1: ()Ljava/security/Principal;
-29 -1: JAVAFX_APPLICATION_CLASS_NAME
-6 -1: digits
-37 -1: [Ljava/lang/reflect/Constructor<TT;>;
-45 -1: ()Ljava/lang/Thread$UncaughtExceptionHandler;
-7 -1: tryLock
-19 -1: java/net/Proxy$Type
-21 -1: setJavaSecurityAccess
-13 -1: tieBreakOrder
-3 -1: no
-16 -1: Australia/Sydney
-13 -1: DAY_IN_MILLIS
-19 -1: ()Ljava/nio/Buffer;
-12 -1: Integer.java
-14 -1: isBmpCodePoint
-6 -1: daemon
-23 -1: Lsun/misc/JavaIOAccess;
-106 -1: <U:Ljava/lang/Object;>(JLjava/util/function/BiFunction<-TK;-TV;+TU;>;Ljava/util/function/Consumer<-TU;>;)V
-10 -1: getFloatAt
-15 -1: content/unknown
-52 -1: ()Ljava/util/Enumeration<+Ljava/util/zip/ZipEntry;>;
-123 -1: <T:Ljava/lang/Object;>(Ljava/lang/Class<*>;Lsun/reflect/annotation/AnnotationType;Lsun/reflect/annotation/AnnotationType;)Z
-4 -1: nsme
-12 -1: prefixLength
-9 -1: flagsMods
-95 -1: (BLjava/lang/invoke/MemberName;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/invoke/MemberName;
-62 -1: (Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/LambdaForm;
-16 -1: Illegal mode: 0x
-24 -1: java/io/FileOutputStream
-41 -1: [Pp][Ee][Rr][Mm][Ii][Ss][Ss][Ii][Oo][Nn]=
-24 -1: java/security/CodeSource
-16 -1: DUMP_CLASS_FILES
-25 -1: ([C)Ljava/nio/CharBuffer;
-12 -1: bindArgument
-50 -1: Ljava/lang/ref/FinalReference<Ljava/lang/Object;>;
-21 -1: unmodifiableSortedMap
-10 -1: jarHandler
-73 -1: (Ljava/lang/Class;[Ljava/lang/reflect/Method;)[Ljava/lang/reflect/Method;
-67 -1: ()Ljava/util/Map<Ljava/lang/Thread;[Ljava/lang/StackTraceElement;>;
-15 -1: threadSeqNumber
-18 -1: AutoCloseable.java
-9 -1: holdsLock
-25 -1: (Ljava/lang/Object;JJJJ)V
-7 -1: (IJII)I
-15 -1: copyToLongArray
-58 -1: Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Package;>;
-84 -1: (Ljava/lang/invoke/MethodHandle;I[Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-32 -1: getExecutableTypeAnnotationBytes
-17 -1: streamHandlerLock
-35 -1: java/lang/IndexOutOfBoundsException
-15 -1: moveRootToFront
-28 -1: ()Ljava/nio/file/FileSystem;
-14 -1: content-length
-61 -1: (Ljava/lang/invoke/CallSite;Ljava/lang/invoke/MethodHandle;)V
-7 -1: csASCII
-18 -1: staticIsConsistent
-21 -1: sharedToGenericString
-8 -1: linkLast
-21 -1: isUnicodeExtensionKey
-7 -1: readInt
-7 -1: compile
-32 -1: ()Ljava/lang/reflect/Executable;
-4 -1: Big5
-20 -1: Ljava/util/Set<TE;>;
-18 -1: ExpiringCache.java
-44 -1: (Ljava/lang/String;[BII)Ljava/lang/Class<*>;
-18 -1: LinkedHashMap.java
-32 -1: Ljava/lang/UnsatisfiedLinkError;
-13 -1: parameterType
-28 -1: (ID)Ljava/lang/StringBuffer;
-15 -1: synchronizedSet
-9 -1: implClose
-6 -1: member
-14 -1: MH_INVOKE_MODS
-21 -1: forOutputStreamWriter
-37 -1: Lsun/misc/JavaIOFileDescriptorAccess;
-28 -1: java/lang/ProcessEnvironment
-17 -1: setNormalizedYear
-14 -1: isMalformed4_2
-14 -1: isMalformed4_3
-38 -1: (Ljava/lang/Object;)Ljava/lang/String;
-16 -1: getJavaAWTAccess
-12 -1: isPrivileged
-30 -1: java/util/Collections$EmptyMap
-17 -1: LinkedKeyIterator
-7 -1: vmcount
-27 -1: java/lang/ref/WeakReference
-5 -1: march
-13 -1: addOldMapping
-58 -1: (Ljava/lang/Object;Ljava/lang/Runnable;)Lsun/misc/Cleaner;
-56 -1: (ILjava/lang/String;)[Ljava/lang/invoke/LambdaForm$Name;
-65 -1: java/util/concurrent/ConcurrentHashMap$MapReduceEntriesToLongTask
-55 -1: (Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object;
-17 -1: getEnclosingClass
-35 -1: (I)Lsun/util/calendar/BaseCalendar;
-13 -1: binarySearch0
-25 -1: ([J)Ljava/nio/LongBuffer;
-19 -1: java/util/Map$Entry
-22 -1: java/util/HashMap$Node
-26 -1: sun/reflect/MethodAccessor
-8 -1: LASTYEAR
-7 -1: disable
-36 -1: sun/launcher/LauncherHelper$FXHelper
-6 -1: toPath
-10 -1: shortValue
-6 -1: remove
-59 -1: ([Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Process;
-55 -1: java/util/concurrent/ConcurrentHashMap$ValueSpliterator
-64 -1: (Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/Collection;
-15 -1: asPrimitiveType
-16 -1: PrintStream.java
-10 -1: image/jpeg
-22 -1: specificToStringHeader
-7 -1: class "
-38 -1: java/util/Collections$CheckedSortedMap
-19 -1: SUPPRESSED_SENTINEL
-16 -1: getEnumConstants
-54 -1: (ILjava/lang/CharSequence;II)Ljava/lang/StringBuilder;
-36 -1: Ljava/lang/Class<Ljava/lang/Short;>;
-13 -1: toThreadState
-38 -1: (Ljava/lang/Class;)Ljava/lang/Package;
-24 -1: (C)Ljava/lang/Character;
-19 -1: UNTREEIFY_THRESHOLD
-4 -1: NCPU
-23 -1: ()Ljava/lang/Exception;
-42 -1: (ITK;TV;Ljava/util/HashMap$Node<TK;TV;>;)V
-15 -1: nothingToVerify
-15 -1: setInitialValue
-15 -1: getTimeInMillis
-12 -1: getDoubleAt0
-18 -1: parameterTypeCache
-86 -1: (Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind;)Ljava/nio/file/WatchKey;
-49 -1: java/util/concurrent/ConcurrentHashMap$ValuesView
-13 -1: <all actions>
-7 -1: exitVM.
-34 -1: Ljava/lang/ClassNotFoundException;
-68 -1: (Ljava/util/Map;Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;
-28 -1: getCalendarDateFromFixedDate
-28 -1: UnsafeFieldAccessorImpl.java
-27 -1: java/lang/RuntimePermission
-74 -1: Ljava/lang/Object;Ljava/lang/Comparable<Lsun/util/locale/BaseLocale$Key;>;
-62 -1: ()Ljava/util/Iterator<Ljava/nio/charset/spi/CharsetProvider;>;
-13 -1: LanguageRange
-239 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceValuesToIntTask;Ljava/util/function/ToIntFunction;ILjava/util/function/IntBinaryOperator;)V
-37 -1: DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
-62 -1: (Ljava/lang/invoke/MethodType;II)Ljava/lang/invoke/MethodType;
-16 -1: DMH.invokeStatic
-11 -1: (TK;TV;)TV;
-7 -1: ([FI)[F
-14 -1: newPerfCounter
-35 -1: ([JI)Ljava/util/Spliterator$OfLong;
-30 -1: java/util/AbstractList$ListItr
-5 -1: cp912
-5 -1: cp914
-45 -1: (Ljava/io/BufferedWriter;Ljava/lang/String;)V
-6 -1: LOCNAM
-8 -1: launcher
-5 -1: cp915
-14 -1: standardString
-26 -1: ()Ljava/lang/Thread$State;
-10 -1: L_ALPHANUM
-8 -1: (C[CII)I
-9 -1: SEPTEMBER
-20 -1: java/text/DateFormat
-38 -1: Ljava/lang/CloneNotSupportedException;
-5 -1: cp920
-23 -1: getConstructorSignature
-16 -1: ReferenceHandler
-19 -1: America/Puerto_Rico
-5 -1: cp923
-10 -1: typeString
-30 -1: Self-suppression not permitted
-25 -1: (Ljava/io/OutputStream;)V
-9 -1: implReset
-12 -1: fullAddCount
-34 -1: java/lang/invoke/LambdaForm$Hidden
-25 -1: ()Lsun/misc/JavaIOAccess;
-9 -1: Math.java
-9 -1: getAndSet
-7 -1: failure
-14 -1: LINE_SEPARATOR
-6 -1: parent
-30 -1: java/lang/BootstrapMethodError
-8 -1: indexMap
-9 -1: ALL_KINDS
-23 -1: desiredAssertionStatus0
-39 -1: (ILjava/lang/Object;)Ljava/lang/Object;
-22 -1: RuntimePermission.java
-21 -1: getContextClassLoader
-14 -1: VARARGS_INVOKE
-8 -1: zoneinfo
-130 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;ILjava/lang/invoke/DirectMethodHandle$1;)V
-18 -1: java/lang/Readable
-11 -1: containsAll
-11 -1: newPosition
-57 -1: sun/reflect/InstantiationExceptionConstructorAccessorImpl
-13 -1: REVERSE_ORDER
-29 -1: Required array size too large
-6 -1: sunday
-44 -1: <T:Ljava/lang/Object;>()Ljava/util/Set<TT;>;
-10 -1: toIntExact
-33 -1: ([BIILjava/nio/charset/Charset;)V
-14 -1: indexOfSubList
-15 -1: tryAcquireNanos
-31 -1: java/lang/InvalidClassException
-22 -1: SecureClassLoader.java
-12 -1: proxiedHosts
-7 -1: ([CII)I
-11 -1: toHexString
-30 -1: sun/util/calendar/ZoneInfoFile
-31 -1: Ljava/util/jar/Attributes$Name;
-10 -1: L_USERINFO
-25 -1: (IB)Ljava/nio/ByteBuffer;
-11 -1: parseDouble
-7 -1: ([CII)V
-13 -1: Asia/Shanghai
-5 -1: [...]
-57 -1: ([Ljava/lang/Class;[B)[[Ljava/lang/annotation/Annotation;
-19 -1: java/nio/LongBuffer
-15 -1: getCertificates
-9 -1: comparing
-83 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;IILjava/lang/String;[B)V
-43 -1: Ljava/util/concurrent/atomic/AtomicInteger;
-23 -1: toFieldDescriptorString
-20 -1: Lsun/misc/MetaIndex;
-37 -1: java/util/Collections$UnmodifiableSet
-5 -1: (JC)V
-37 -1: nanosecond timeout value out of range
-26 -1: AbstractStringBuilder.java
-43 -1: java/lang/invoke/DirectMethodHandle$Special
-49 -1: ([Ljava/nio/file/LinkOption;)Ljava/nio/file/Path;
-15 -1: currentPosition
-14 -1: java/net/Proxy
-13 -1: asConstructor
-8 -1: userInfo
-14 -1: parseClassPath
-15 -1: legacyMergeSort
-34 -1: java/security/UnresolvedPermission
-97 -1: Lsun/util/locale/LocaleObjectCache<Lsun/util/locale/BaseLocale$Key;Lsun/util/locale/BaseLocale;>;
-9 -1: freeEntry
-19 -1: delimiterCodePoints
-34 -1: Should be non-empty if initialized
-23 -1: (I)Ljava/lang/Class<*>;
-11 -1: Reader.java
-26 -1: checkClassLoaderPermission
-27 -1: java/nio/DirectShortBufferS
-95 -1: Ljava/lang/Object;Ljava/security/PrivilegedExceptionAction<Lsun/misc/Launcher$ExtClassLoader;>;
-27 -1: java/nio/DirectShortBufferU
-20 -1: ()[Ljava/lang/Class;
-56 -1: ()[Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-19 -1: sun/nio/cs/UTF_16BE
-24 -1: java/util/AbstractList$1
-10 -1: ([CIIIII)V
-60 -1: Ljava/lang/Object;Ljava/lang/Comparable<Ljava/lang/Object;>;
-37 -1: (Ljava/lang/invoke/LambdaForm$Name;)S
-9 -1: putDouble
-52 -1: ([Ljava/security/CodeSource;)Ljava/util/Enumeration;
-37 -1: (Ljava/lang/invoke/LambdaForm$Name;)Z
-22 -1: ()[Ljava/lang/Package;
-41 -1: java/lang/CharSequence$1CodePointIterator
-13 -1: auditSubclass
-24 -1: Ljava/util/jar/JarEntry;
-20 -1: findMethodHandleType
-15 -1: MAX_BUFFER_SIZE
-19 -1: FilePermission.java
-18 -1: WrappedPrintStream
-36 -1: (D)Ljava/lang/AbstractStringBuilder;
-11 -1: unfinalized
-10 -1: getFileURL
-37 -1: (Ljava/io/FileFilter;)[Ljava/io/File;
-54 -1: (Ljava/nio/ByteBuffer;I)Ljava/nio/charset/CoderResult;
-7 -1: ([ZI)[Z
-64 -1: (Ljava/security/CodeSource;)Ljava/security/PermissionCollection;
-6 -1: PUBLIC
-83 -1: (Ljava/util/jar/JarFile;Ljava/net/URL;Ljava/lang/String;)Ljava/security/CodeSource;
-17 -1: lockInterruptibly
-67 -1: ([Ljava/util/Hashtable$Entry;Ljava/lang/Object;Ljava/lang/Object;)V
-42 -1: java/util/ArraysParallelSortHelpers$FJChar
-21 -1: defaultCharBufferSize
-14 -1: unalignedKnown
-23 -1: ()Ljava/net/Proxy$Type;
-4 -1: TZDB
-14 -1: CharacterCache
-13 -1: lengthOfMonth
-13 -1: hasExtensions
-23 -1: Prefix string too short
-15 -1: Executable.java
-10 -1: forEachKey
-6 -1: getEra
-13 -1: appendEncoded
-21 -1: java/util/AbstractMap
-10 -1: access$100
-10 -1: access$102
-30 -1: javafx.application.Application
-46 -1: (Ljava/lang/Thread$UncaughtExceptionHandler;)V
-43 -1: Ljava/lang/invoke/LambdaForm$NamedFunction;
-101 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;IILjava/lang/String;[B)Ljava/lang/reflect/Field;
-9 -1: WILD_CHAR
-21 -1: SynchronizedSortedSet
-28 -1: (Ljava/util/Collection<*>;)Z
-29 -1: (I[C)Ljava/lang/StringBuffer;
-65 -1: (Ljava/lang/String;[Ljava/lang/Class;Z)Ljava/lang/reflect/Method;
-7 -1: putByte
-6 -1: H_MARK
-49 -1: (Ljava/lang/invoke/MemberName;)Ljava/lang/Object;
-98 -1: ([Ljava/lang/ClassValue$Entry<*>;ILjava/lang/ClassValue$Entry<*>;Z)Ljava/lang/ClassValue$Entry<*>;
-23 -1: array is not of length
-52 -1: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;TT;TT;)Z
-41 -1: Ljava/util/Collections$EmptyListIterator;
-8 -1:
-11 -1: updateCheck
-29 -1: getBootClassPathEntryForClass
-27 -1: sun/nio/cs/US_ASCII$Encoder
-10 -1: bindCaller
-18 -1: Ljava/util/BitSet;
-10 -1: checkRange
-77 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;Ljava/lang/Void;)V
-7 -1: Classes
-6 -1: store0
-23 -1: java/lang/Thread$Caches
-25 -1: Ljava/lang/CharacterData;
-7 -1: (JI[C)V
-49 -1: (Ljava/util/LinkedList;Ljava/util/LinkedList$1;)V
-16 -1: getGcInfoBuilder
-12 -1: counterCells
-14 -1: memoryLimitSet
-7 -1: , nojit
-9 -1: sharpsMap
-7 -1: october
-13 -1: isProxiedHost
-9 -1: rawOffset
-18 -1: toJavaFormatString
-19 -1: sun.boot.class.path
-60 -1: (ILjava/lang/CharSequence;)Ljava/lang/AbstractStringBuilder;
-11 -1: spliterator
-13 -1: contentLength
-18 -1: unixTimeToFileTime
-31 -1: Lsun/reflect/LangReflectAccess;
-16 -1: while Java has
-79 -1: (JLjava/util/function/ToIntBiFunction;ILjava/util/function/IntBinaryOperator;)I
-12 -1: timeEndOfDay
-17 -1: getCustomTimeZone
-25 -1: Ljava/lang/ref/Reference;
-20 -1: ()Ljava/util/Locale;
-64 -1: (Ljava/util/HashMap<TK;TV;>;[Ljava/util/HashMap$Node<TK;TV;>;Z)V
-13 -1: MAX_JVM_ARITY
-72 -1: (Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/invoke/MethodType;
-11 -1: AsLIFOQueue
-84 -1: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;Ljava/lang/Object;)Ljava/util/List<TT;>;
-12 -1: mappingCount
-29 -1: (Ljava/io/FileOutputStream;)V
-50 -1: <T:Ljava/lang/Object;>(Ljava/util/List<-TT;>;TT;)V
-23 -1: Category cannot be NULL
-10 -1: normalized
-5 -1: CLASS
-28 -1: (IZ)Ljava/lang/StringBuffer;
-18 -1: java/lang/System$1
-18 -1: java/lang/System$2
-9 -1: getResult
-44 -1: ()Ljava/util/Collection<Ljava/lang/Thread;>;
-8 -1: isNative
-59 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Short;>;
-24 -1: [Ljava/lang/ThreadGroup;
-24 -1: (B)Ljava/nio/ByteBuffer;
-4 -1: READ
-44 -1: (Ljava/io/FilePermission;)Ljava/lang/String;
-93 -1: <E:Ljava/lang/Object;>Ljava/util/Collections$SynchronizedCollection<TE;>;Ljava/util/Set<TE;>;
-12 -1: compileClass
-12 -1: isProxyClass
-20 -1: isSystemDomainLoader
-74 -1: <T:Ljava/lang/Object;>(Ljava/util/List<TT;>;Ljava/util/Comparator<-TT;>;)V
-7 -1: getMask
-72 -1: (Ljava/lang/ClassLoader;Ljava/lang/SecurityManager;Ljava/lang/String;I)V
-20 -1: removeLastOccurrence
-64 -1: (Ljava/lang/reflect/Field;)Ljava/lang/invoke/DirectMethodHandle;
-57 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/Class<*>;>;
-11 -1: parkBlocker
-40 -1: (Lsun/misc/JarIndex;Ljava/lang/String;)V
-33 -1: [Ljava/security/ProtectionDomain;
-14 -1: setContentType
-14 -1: getEnumeration
-18 -1: ProtectionDomain
-76 -1: (Lsun/util/calendar/BaseCalendar$Date;)Lsun/util/calendar/BaseCalendar$Date;
-16 -1: setRequestMethod
-52 -1: (Ljava/util/List;Ljava/lang/Object;)Ljava/util/List;
-32 -1: Lsun/util/calendar/BaseCalendar;
-52 -1: (Ljava/net/URL;Ljava/lang/String;)Ljava/lang/String;
-5 -1: .:@[]
-7 -1: addLast
-21 -1: AnnotatedElement.java
-10 -1: defaultVal
-16 -1: getCanonicalPath
-17 -1: protection_domain
-9 -1: strictfp
-19 -1: sun/nio/cs/UTF_16LE
-9 -1: readBytes
-18 -1: removeStaleEntries
-46 -1: java/util/Collections$UnmodifiableNavigableSet
-5 -1: cpath
-14 -1: COPY_THRESHOLD
-8 -1: permsMap
-8 -1: japanese
-33 -1: java/nio/charset/StandardCharsets
-47 -1: Lsun/reflect/DelegatingConstructorAccessorImpl;
-19 -1: NF_checkGenericType
-40 -1: java/util/Collections$UnmodifiableList$1
-4 -1: TERM
-48 -1: The following can be used with stack and domain:
-27 -1: ([BII)Ljava/nio/ByteBuffer;
-40 -1: Ljava/util/Vector<Ljava/lang/Class<*>;>;
-5 -1: digit
-7 -1: isFinal
-39 -1: (Ljava/lang/String;Ljava/lang/String;)I
-26 -1: memberDeclaringClassOrNull
-10 -1: ([CI[BII)I
-38 -1: (Ljava/lang/Class;I)Ljava/lang/Object;
-15 -1: isValidProtocol
-17 -1: (this Collection)
-11 -1: getTreeNode
-16 -1: ThreadLocal.java
-23 -1: java/nio/HeapLongBuffer
-39 -1: (Ljava/lang/String;Ljava/lang/String;)V
-12 -1: getNextEntry
-39 -1: (Ljava/lang/String;Ljava/lang/String;)Z
-28 -1: (C)Lsun/invoke/util/Wrapper;
-9 -1: readFloat
-21 -1: overrideFieldAccessor
-16 -1: fillInStackTrace
-16 -1: getDeclaredField
-5 -1: deflt
-8 -1: nextChar
-10 -1: primCounts
-22 -1: getAnnotatedInterfaces
-26 -1: ()Ljava/util/zip/Inflater;
-73 -1: <U:Ljava/lang/Object;>(JLjava/util/function/BiFunction<-TK;-TV;+TU;>;)TU;
-16 -1: traceMethodCalls
-10 -1: sun.nio.cs
-7 -1: marshal
-9 -1: ftypeKind
-77 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Class;)Ljava/lang/invoke/MemberName;
-11 -1: sun/misc/VM
-14 -1: GuardWithCatch
-40 -1: (Ljava/lang/Object;)Ljava/util/Iterator;
-13 -1: subtractExact
-42 -1: (Ljava/lang/Object;ILjava/lang/Object;II)V
-10 -1: isInfinite
-18 -1: sun.util.calendar.
-14 -1: java/lang/Math
-16 -1: java/lang/String
-10 -1: encodePath
-14 -1: compactAndTrim
-11 -1: getVariants
-4 -1: from
-47 -1: (Ljava/lang/ThreadLocal<*>;Ljava/lang/Object;)V
-35 -1: serializeAgentPropertiesToByteArray
-16 -1: computeIfPresent
-9 -1: EMPTY_MAP
-28 -1: java/lang/InstantiationError
-68 -1: (Ljava/util/Comparator;Ljava/util/Comparator;)Ljava/util/Comparator;
-14 -1: getDisplayName
-14 -1: limitedContext
-23 -1: usagetracker.properties
-52 -1: java/util/concurrent/locks/ReentrantLock$NonfairSync
-7 -1: public
-17 -1: srcBegin > srcEnd
-48 -1: (ILjava/util/List;)Ljava/lang/invoke/MethodType;
-21 -1: java/lang/ThreadDeath
-9 -1: gregorian
-111 -1: (Ljava/util/HashMap;[Ljava/util/HashMap$Node;ILjava/lang/Object;Ljava/lang/Object;)Ljava/util/HashMap$TreeNode;
-52 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;III)V
-12 -1: generateFile
-20 -1: appendParameterTypes
-22 -1: sun/misc/FileURLMapper
-13 -1: defaultDomain
-25 -1: (I)Ljava/time/ZoneOffset;
-21 -1: getBooleanAttributes0
-39 -1: (Ljava/lang/String;)Lsun/misc/Resource;
-43 -1: Ljava/lang/Thread$UncaughtExceptionHandler;
-23 -1: getTypeAnnotationBytes0
-8 -1: ELOT_928
-32 -1: sun/nio/cs/FastCharsetProvider$1
-34 -1: Ljava/nio/BufferOverflowException;
-14 -1: AppClassLoader
-10 -1: protected
-12 -1: isAnnotation
-16 -1: PerfCounter.java
-51 -1: Ljava/util/Map<Ljava/io/File;Lsun/misc/MetaIndex;>;
-160 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-11 -1: setLeapYear
-16 -1: parseContextSpec
-16 -1: setFieldAccessor
-8 -1: writeInt
-16 -1: java/lang/Number
-33 -1: java/util/AbstractMap$SimpleEntry
-9 -1: nextTable
-8 -1: getQuery
-14 -1: putOrderedLong
-93 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
-52 -1: (Ljava/lang/String;)Lsun/reflect/generics/tree/Tree;
-85 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/concurrent/ConcurrentHashMap$Node;)V
-9 -1: singleton
-9 -1: destroyed
-15 -1: iso_8859-2:1987
-12 -1: comparingInt
-29 -1: [Ljava/lang/OutOfMemoryError;
-39 -1: (Ljava/lang/String;Ljava/lang/Object;)V
-27 -1: ([Ljava/util/Enumeration;)V
-36 -1: Ljava/nio/charset/CodingErrorAction;
-16 -1: getCanonicalName
-41 -1: (Ljava/nio/LongBuffer;)Ljava/util/BitSet;
-15 -1: DISPLAY_COUNTRY
-32 -1: getFunctionalInterfaceMethodName
-66 -1: (Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V
-24 -1: getUnresolvedPermissions
-66 -1: ([Ljava/lang/ClassValue$Entry<*>;I)Ljava/lang/ClassValue$Entry<*>;
-41 -1: ()Lsun/reflect/annotation/AnnotationType;
-7 -1: afIndex
-7 -1: csascii
-20 -1: ()Ljava/util/Vector;
-16 -1: EntrySpliterator
-53 -1: (Ljava/lang/Throwable;I)Ljava/lang/StackTraceElement;
-81 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;)Ljava/lang/invoke/MethodHandle;
-20 -1: classAssertionStatus
-7 -1: EXECUTE
-21 -1: ()Ljava/lang/Runtime;
-6 -1: cesu-8
-7 -1: offset
-23 -1: Ljava/lang/SafeVarargs;
-34 -1: (Ljava/util/LinkedHashMap$Entry;)V
-8 -1: entryFor
-8 -1: getCache
-46 -1: (Ljava/lang/Object;I)Ljava/lang/reflect/Field;
-4 -1: skip
-8 -1: (II[CI)V
-4 -1: vart
-12 -1: InnerClasses
-68 -1: (Ljava/util/Map;Ljava/lang/Class;[Ljava/lang/String;)Ljava/util/Map;
-19 -1: currentClassLoader0
-34 -1: getDefaultUncaughtExceptionHandler
-11 -1: String.java
-117 -1: (Ljava/lang/ThreadLocal<*>;ILjava/lang/ThreadLocal$ThreadLocalMap$Entry;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-7 -1: january
-31 -1: (ILjava/lang/String;IIIIIIIII)V
-24 -1: Lsun/misc/JavaAWTAccess;
-5 -1: .path
-15 -1: [Ljava/io/File;
-11 -1: Writer.java
-8 -1: , Size:
-159 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/Function;Ljava/util/function/Consumer;)V
-32 -1: java/lang/invoke/LambdaForm$Name
-51 -1: (Ljava/util/ArrayList;Ljava/util/AbstractList;III)V
-7 -1: getZone
-14 -1: JIS_X0212-1990
-21 -1: (Ljava/util/Set<*>;)Z
-149 -1: (Lsun/util/locale/provider/LocaleServiceProviderPool$LocalizedObjectGetter;Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
-21 -1: Illegal Load factor:
-35 -1: ()Ljava/lang/invoke/MethodTypeForm;
-22 -1: ([Z)Ljava/lang/String;
-7 -1: setName
-48 -1: <T:Ljava/lang/Object;>(TT;Ljava/lang/String;)TT;
-9 -1: INTERFACE
-22 -1: ARRAY_CHAR_INDEX_SCALE
-19 -1: java/nio/ByteBuffer
-23 -1: Ljava/io/ExpiringCache;
-7 -1: streams
-44 -1: java/lang/invoke/DirectMethodHandle$Accessor
-36 -1: ([Ljava/security/ProtectionDomain;)V
-16 -1: afterNodeRemoval
-9 -1: prevIndex
-49 -1: java/util/concurrent/ConcurrentHashMap$KeySetView
-22 -1: getEnumConstantsShared
-17 -1: java/lang/Integer
-12 -1: getRawOffset
-36 -1: ()Ljava/nio/file/attribute/FileTime;
-7 -1: offsets
-10 -1: ] throw =>
-3 -1: [[B
-10 -1: hostsEqual
-18 -1: compareComparables
-35 -1: sun/reflect/ConstructorAccessorImpl
-8 -1: december
-36 -1: Invalid binary time-zone data: TZDB:
-24 -1: synchronizedNavigableMap
-72 -1: sun/util/locale/provider/LocaleServiceProviderPool$LocalizedObjectGetter
-19 -1: parseCustomTimeZone
-88 -1: (Ljava/lang/Class<*>;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;
-9 -1: findClass
-6 -1: OBJECT
-3 -1: GBK
-110 -1: (JLjava/util/function/ToLongFunction<Ljava/util/Map$Entry<TK;TV;>;>;JLjava/util/function/LongBinaryOperator;)J
-6 -1: UTF_16
-17 -1: <all permissions>
-13 -1: lookupCharset
-28 -1: ConstructorAccessorImpl.java
-62 -1: java/util/concurrent/ConcurrentHashMap$MapReduceKeysToLongTask
-30 -1: Ljava/lang/ClassCastException;
-56 -1: ()Ljava/util/Spliterator<Ljava/util/Map$Entry<TK;TV;>;>;
-11 -1: invokerType
-23 -1: java/lang/StringBuilder
-12 -1: deleteCharAt
-11 -1: CR_OVERFLOW
-14 -1: toExternalForm
-3 -1: out
-34 -1: Ljava/net/URLStreamHandlerFactory;
-15 -1: encodeArrayLoop
-30 -1: ()Ljava/util/Enumeration<TK;>;
-27 -1: java/io/SyncFailedException
-10 -1: checkedSet
-16 -1: checkedSortedSet
-22 -1: java/util/zip/ZipEntry
-43 -1: java/util/LinkedHashMap$LinkedValueIterator
-22 -1: UnmodifiableCollection
-32 -1: java/nio/ByteBufferAsCharBufferB
-11 -1: blockerLock
-27 -1: checkExtensionsDependencies
-11 -1: fromIndex:
-32 -1: java/nio/ByteBufferAsCharBufferL
-6 -1: UTF_32
-30 -1: java/util/Hashtable$Enumerator
-92 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<+TK;+TV;>;)Ljava/util/Map<TK;TV;>;
-4 -1: tail
-5 -1: (BB)C
-16 -1: isValidSignature
-9 -1: addMillis
-9 -1: peekFirst
-86 -1: <E:Ljava/lang/Object;>(Ljava/util/Set<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/Set<TE;>;
-5 -1: (BB)I
-15 -1: jvmMicroVersion
-28 -1: [Ljava/util/Hashtable$Entry;
-15 -1: iso_8859-5:1988
-14 -1: HOUR_IN_MILLIS
-67 -1: (Ljava/util/PrimitiveIterator$OfInt;I)Ljava/util/Spliterator$OfInt;
-5 -1: (BB)S
-21 -1: UnmodifiableSortedMap
-79 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/concurrent/ConcurrentHashMap;)V
-56 -1: Ljava/util/Stack<Ljava/lang/ClassLoader$NativeLibrary;>;
-5 -1: (BB)Z
-10 -1: treeifyBin
-8 -1: isOpaque
-27 -1: java.launcher.ergo.message1
-27 -1: java.launcher.ergo.message2
-101 -1: Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Cloneable;Ljava/lang/Comparable<Ljava/util/Date;>;
-31 -1: (Ljava/io/ObjectOutputStream;)V
-3 -1: GET
-13 -1: matchLocation
-13 -1: WrappedMember
-63 -1: NoSuchMethodException:\n could not find proper constructor for
-14 -1: gssloginconfig
-70 -1: (Ljava/util/LinkedList$Node<TE;>;TE;Ljava/util/LinkedList$Node<TE;>;)V
-57 -1: (Ljava/lang/Object;Ljava/lang/Object;Z)Ljava/lang/Object;
-11 -1: toByteArray
-49 -1: java/util/ArraysParallelSortHelpers$FJByte$Sorter
-13 -1: no protocol:
-940 -1: aaaarababkaeaveafafrakakaamamhanargararaasasmavavaayaymazazebabakbebelbgbulbhbihbibisbmbambnbenbobodbrbrebsboscacatcechechchacocoscrcrecscescuchucvchvcycymdadandedeudvdivdzdzoeeeweelellenengeoepoesspaetesteueusfafasfffulfifinfjfijfofaofrfrafyfrygaglegdglaglglggngrngugujgvglvhahauhehebhihinhohmohrhrvhthathuhunhyhyehzheriainaidindieileigiboiiiiiikipkinindioidoisislititaiuikuiwhebjajpnjiyidjvjavkakatkgkonkikikkjkuakkkazklkalkmkhmknkankokorkrkaukskaskukurkvkomkwcorkykirlalatlbltzlgluglilimlnlinlolaoltlitlulublvlavmgmlgmhmahmimrimkmkdmlmalmnmonmomolmrmarmsmsamtmltmymyananaunbnobndndenenepngndonlnldnnnnononornrnblnvnavnynyaocociojojiomormororiososspapanpipliplpolpspusptporququermrohrnrunroronrurusrwkinsasanscsrdsdsndsesmesgsagsisinskslkslslvsmsmosnsnasosomsqsqisrsrpsssswstsotsusunsvsweswswatatamteteltgtgkththatitirtktuktltgltntsntotontrturtstsotttattwtwitytahuguigukukrururduzuzbvevenvivievovolwawlnwowolxhxhoyiyidyoyorzazhazhzhozuzul
-42 -1: java/util/LinkedHashMap$LinkedHashIterator
-39 -1: java/util/ArrayDeque$DescendingIterator
-15 -1: MODIFIER_LETTER
-21 -1: (Lsun/misc/Cleaner;)Z
-12 -1: PACKAGE_NAME
-14 -1: getMappedValue
-10 -1: interrupt0
-8 -1: LF_LIMIT
-17 -1: getDeclaringClass
-42 -1: (ZILjava/lang/String;)Ljava/lang/Class<*>;
-57 -1: (Ljava/lang/management/ThreadInfo;[Ljava/lang/Object;[I)V
-15 -1: java/nio/Bits$1
-61 -1: (Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;
-28 -1: java/lang/ref/ReferenceQueue
-33 -1: [Ljava/security/cert/Certificate;
-44 -1: (Ljava/util/Hashtable;I)Ljava/util/Iterator;
-24 -1: java/security/CodeSigner
-19 -1: Non-positive length
-24 -1: [Ljava/util/Enumeration;
-38 -1: ()Ljava/security/PermissionCollection;
-16 -1: checkGenericType
-56 -1: java/util/concurrent/ConcurrentHashMap$ReduceEntriesTask
-7 -1: getYear
-5 -1: atime
-19 -1: Ljava/util/HashMap;
-125 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<Ljava/util/Map$Entry<TK;TV;>;+TU;>;Ljava/util/function/Consumer<-TU;>;)V
-22 -1: STOP_THREAD_PERMISSION
-46 -1: (Ljava/util/Enumeration;)Ljava/util/ArrayList;
-16 -1: getPathSeparator
-10 -1: getMembers
-8 -1: getIntAt
-26 -1: java/io/File$TempDirectory
-48 -1: java/lang/invoke/MethodHandleImpl$GuardWithCatch
-25 -1: CaseInsensitiveComparator
-8 -1: pollLast
-21 -1: GET_POLICY_PERMISSION
-23 -1: uninitialized call site
-75 -1: (Ljava/util/function/Function;Ljava/util/Comparator;)Ljava/util/Comparator;
-9 -1: directory
-51 -1: (JLjava/util/function/BiFunction<-TV;-TV;+TV;>;)TV;
-41 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;)V
-42 -1: (Ljava/lang/Throwable;Ljava/lang/String;)V
-26 -1: (FLjava/lang/Appendable;)V
-5 -1: stop0
-9 -1: substring
-64 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/HashMap$Node;)V
-5 -1: (JD)V
-9 -1: getShortB
-10 -1: nextOrSame
-24 -1: [ interpretWithArguments
-6 -1: GB2312
-32 -1: java/nio/BufferOverflowException
-23 -1: sun/nio/cs/ArrayEncoder
-4 -1: tanh
-9 -1: getShortL
-55 -1: (JLjava/util/function/BiFunction;)Ljava/util/Map$Entry;
-10 -1: getMessage
-12 -1: findTreeNode
-38 -1: DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
-23 -1: [Ljava/lang/Comparable;
-17 -1: getCallSiteTarget
-55 -1: (Ljava/nio/ByteBuffer;II)Ljava/nio/charset/CoderResult;
-19 -1: java/util/ArrayList
-17 -1: java/io/DataInput
-13 -1: getPrincipals
-52 -1: <E:Ljava/lang/Object;>(TE;)Ljava/util/Iterator<TE;>;
-44 -1: sun/reflect/generics/tree/ClassTypeSignature
-6 -1: loaded
-20 -1: ()Ljava/lang/Object;
-36 -1: Ljava/util/concurrent/ConcurrentMap;
-13 -1: classValueMap
-33 -1: java/lang/SystemClassLoaderAction
-6 -1: loader
-31 -1: java/lang/annotation/Annotation
-5 -1: colon
-11 -1: Vector.java
-24 -1: CharacterDataLatin1.java
-12 -1: setUseCaches
-22 -1: getTypeAnnotationBytes
-9 -1: readShort
-24 -1: longPrimitiveReturnCount
-5 -1: get16
-34 -1: setDefaultUncaughtExceptionHandler
-17 -1: cachedInputStream
-29 -1: java/util/LinkedHashMap$Entry
-17 -1: java/lang/Boolean
-50 -1: ()[Lsun/reflect/generics/tree/FormalTypeParameter;
-14 -1: AnnotationData
-21 -1: Ljava/net/Proxy$Type;
-13 -1: invokeVirtual
-14 -1: Parameter.java
-21 -1: getDayOfWeekDateAfter
-92 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-56 -1: (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-46 -1: sun/util/locale/provider/LocaleProviderAdapter
-29 -1: Ljava/lang/StackTraceElement;
-47 -1: (TK;Ljava/util/function/Function<-TK;+TV;>;)TV;
-32 -1: enableContextClassLoaderOverride
-68 -1: (Ljava/lang/AbstractStringBuilder;)Ljava/lang/AbstractStringBuilder;
-51 -1: Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
-9 -1: addAndGet
-5 -1: store
-7 -1: ([JII)V
-15 -1: signatureReturn
-18 -1: NF_reinvokerTarget
-22 -1: ()Ljava/nio/file/Path;
-25 -1: (C)Ljava/lang/Appendable;
-7 -1: expires
-18 -1: initializeInvokers
-19 -1: application/java-vm
-13 -1: stopOrSuspend
-13 -1: rawOffsetDiff
-6 -1: (JJZ)V
-9 -1: findValue
-5 -1: get32
-10 -1: asSubclass
-6 -1: forJRE
-3 -1: GMT
-7 -1: delete0
-69 -1: ([Ljava/security/cert/Certificate;[Ljava/security/cert/Certificate;)Z
-75 -1: (Ljava/util/LinkedList$Node;Ljava/lang/Object;Ljava/util/LinkedList$Node;)V
-6 -1: setEra
-24 -1: ()Ljava/util/Comparator;
-10 -1: access$200
-10 -1: access$202
-20 -1: retrieveDisplayNames
-3 -1: pae
-24 -1: java/lang/Byte$ByteCache
-7 -1: VM.java
-9 -1: TRANSIENT
-6 -1: setErr
-16 -1: jdkUpdateVersion
-10 -1: isResolved
-35 -1: sun/misc/JavaIOFileDescriptorAccess
-4 -1: char
-13 -1: Readable.java
-19 -1: UnixFileSystem.java
-43 -1: (Ljava/lang/ThreadLocal;)Ljava/lang/Object;
-40 -1: (Ljava/lang/String;[Ljava/lang/String;)V
-7 -1: profile
-11 -1: , version:
-25 -1: PermissionCollection.java
-13 -1: setNormalized
-10 -1: access$210
-24 -1: (Ljava/lang/String;IJZ)J
-19 -1: isAnnotationPresent
-85 -1: (Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)[Ljava/lang/annotation/Annotation;
-19 -1: DMH.invokeInterface
-157 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/concurrent/ConcurrentHashMap$CollectionView<TK;TV;TV;>;Ljava/util/Collection<TV;>;Ljava/io/Serializable;
-94 -1: <E:Ljava/lang/Object;>Ljava/util/Collections$UnmodifiableCollection<TE;>;Ljava/util/List<TE;>;
-41 -1: java/lang/StringIndexOutOfBoundsException
-29 -1: java/net/UnknownHostException
-11 -1: (BBBBBBBB)J
-4 -1: iioe
-12 -1: (TK;TV;Z)TV;
-5 -1: ERROR
-31 -1: (Ljava/io/File;Ljava/io/File;)I
-32 -1: [Ljava/lang/invoke/MethodHandle;
-27 -1: lambda$comparing$77a9974f$1
-13 -1: toLowerCaseEx
-61 -1: (Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MemberName;)V
-66 -1: (ILjava/lang/Object;Ljava/lang/Class;)Ljava/util/HashMap$TreeNode;
-43 -1: java/util/concurrent/ConcurrentHashMap$Node
-23 -1: latestUserDefinedLoader
-24 -1: buildAnnotatedSuperclass
-19 -1: compareToIgnoreCase
-31 -1: (Ljava/io/File;Ljava/io/File;)Z
-40 -1: (I[C)[Ljava/lang/invoke/LambdaForm$Name;
-16 -1: ROTATE_THRESHOLD
-18 -1: getClassAtIfLoaded
-37 -1: java/lang/IllegalThreadStateException
-5 -1: get64
-12 -1: writeReplace
-14 -1: DAYS_PER_CYCLE
-4 -1: _get
-6 -1: nChars
-26 -1: ()Ljava/net/SocketAddress;
-27 -1: setUncaughtExceptionHandler
-6 -1: jzfile
-42 -1: All subclasses should override this method
-3 2: Foo
-56 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-136 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedExceptionAction<TT;>;Ljava/security/AccessControlContext;[Ljava/security/Permission;)TT;
-3 -1: pdt
-44 -1: sun/util/locale/LocaleObjectCache$CacheEntry
-20 -1: java/util/Comparator
-9 -1: suspended
-11 -1: removeEntry
-10 -1: SPACE_FREE
-12 -1: processQueue
-9 -1: java.home
-5 -1: valid
-23 -1: printEnclosedStackTrace
-4 -1: push
-5 -1: guard
-23 -1: javaNetHttpCookieAccess
-36 -1: (Ljava/security/cert/Certificate;)[B
-9 -1: isWrapped
-12 -1: CharIterator
-26 -1: sun.io.useCanonPrefixCache
-42 -1: (Lsun/misc/Cleaner;Ljava/lang/Throwable;)V
-7 -1: prepare
-8 -1: parseInt
-13 -1: Invokers.java
-63 -1: (Ljava/net/URLClassLoader;)Ljava/security/AccessControlContext;
-18 -1: defaultWriteObject
-5 -1: class
-15 -1: EnclosingMethod
-23 -1: ([BI)Ljava/lang/String;
-16 -1: rangeCheckForAdd
-11 -1: getTimeImpl
-15 -1: arrayIndexScale
-5 -1: scalb
-5 -1: scale
-45 -1: (Ljava/lang/String;J)Ljava/util/zip/ZipEntry;
-8 -1: ([FIIF)I
-16 -1: runAllFinalizers
-27 -1: ()Lsun/net/ProgressMonitor;
-15 -1: MemberName.java
-27 -1: [Ljava/lang/reflect/Member;
-6 -1: length
-14 -1: genericInvoker
-8 -1: ([FIIF)V
-34 -1: Ljava/nio/file/attribute/FileTime;
-6 -1: number
-70 -1: (Ljava/lang/StringBuilder;Ljava/lang/String;)Ljava/lang/StringBuilder;
-12 -1: printLocales
-38 -1: java/lang/invoke/MethodHandleStatics$1
-8 -1: private
-20 -1: invalid actions mask
-10 -1: not found
-13 -1: parseClassSig
-22 -1: getAllAvailableLocales
-175 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/Function;Ljava/util/concurrent/atomic/AtomicReference;)V
-8 -1: ([BII)[B
-35 -1: (Ljava/util/HashMap$Node<TK;TV;>;)V
-132 -1: (Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;[Ljava/lang/Object;[I[Ljava/lang/Object;)V
-8 -1: ([BII)[C
-20 -1: DECIMAL_DIGIT_NUMBER
-40 -1: (Ljava/lang/String;[Ljava/lang/Object;)Z
-7 -1: ([CCI)I
-64 -1: (TV;)Ljava/util/concurrent/ConcurrentHashMap$KeySetView<TK;TV;>;
-8 -1: aliasMap
-8 -1: checkfpx
-44 -1: java/util/Comparators$NaturalOrderComparator
-48 -1: (Ljava/lang/ClassLoader;)Ljava/lang/ClassLoader;
-12 -1: Name is null
-10 -1: invoke_L_L
-8 -1: URL.java
-51 -1: (JILjava/time/ZoneOffset;)Ljava/time/LocalDateTime;
-25 -1: Lsun/invoke/util/Wrapper;
-19 -1: LauncherHelper.java
-10 -1: invoke_L_V
-5 -1: index
-30 -1: sun/security/x509/X509CertImpl
-8 -1: addClass
-46 -1: (I)Ljava/lang/invoke/LambdaForm$NamedFunction;
-20 -1: refKindIsConstructor
-10 -1: getFieldAt
-5 -1: log10
-13 -1: GetPerfAction
-15 -1: isLetterOrDigit
-27 -1: hasCheckedSpecialAttributes
-25 -1: MapReduceEntriesToIntTask
-17 -1: probeHomeLocation
-9 -1: image/png
-19 -1: checkSpreadArgument
-12 -1: LinkedKeySet
-13 -1: removeMapping
-39 -1: sun/security/util/SecurityConstants$AWT
-9 -1: MAX_RADIX
-28 -1: (F)Ljava/lang/StringBuilder;
-11 -1: ([C[B[I[I)Z
-36 -1: (Ljava/lang/Class;)Ljava/lang/Class;
-32 -1: java/lang/invoke/MagicLambdaImpl
-6 -1: monday
-16 -1: closeClassLoader
-41 -1: (Ljava/util/concurrent/locks/Condition;)I
-8 -1: reversed
-27 -1: sun/util/calendar/Gregorian
-49 -1: (Lsun/nio/cs/FastCharsetProvider;)Ljava/util/Map;
-42 -1: (Ljava/lang/String;Ljava/lang/Throwable;)V
-18 -1: java/util/Calendar
-8 -1: vmtarget
-17 -1: TREEIFY_THRESHOLD
-41 -1: (Ljava/util/concurrent/locks/Condition;)Z
-9 -1: deadChild
-8 -1: EntrySet
-5 -1: log1p
-58 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/util/HashMap;)V
-9 -1: pageCount
-14 -1: slotToArgTable
-24 -1: toMethodDescriptorString
-25 -1: ([B)Ljava/nio/ByteBuffer;
-21 -1: twoToTheDoubleScaleUp
-32 -1: sun/misc/URLClassPath$FileLoader
-40 -1: (Ljava/util/List<Ljava/lang/String;>;Z)V
-6 -1: cache1
-6 -1: cache2
-27 -1: Ljava/net/URLStreamHandler;
-20 -1: Detect premature EOF
-94 -1: (Ljava/io/OutputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)Lsun/nio/cs/StreamEncoder;
-12 -1: NF_checkBase
-20 -1: (Ljava/nio/Buffer;)V
-45 -1: <E:Ljava/lang/Object;>Ljava/util/Vector<TE;>;
-4 -1: Sync
-12 -1: H_UNRESERVED
-32 -1: (Ljava/util/Map;)Ljava/util/Set;
-32 -1: (Ljava/util/Map$Entry<TK;TV;>;)Z
-25 -1: java/util/Locale$Category
-8 -1: receiver
-9 -1: MAX_VALUE
-4 -1: .RSA
-25 -1: Ljava/net/URLClassLoader;
-15 -1: Terminator.java
-26 -1: (Ljava/lang/String;TV;)TV;
-4 -1: null
-76 -1: (Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
-9 -1: checkCast
-39 -1: ()Ljava/lang/AssertionStatusDirectives;
-15 -1: declaredMethods
-5 -1: clazz
-21 -1: Retention policy:
-20 -1: spreadArgElementType
-9 -1: WORD_MASK
-27 -1: ([IILjava/io/InputStream;)I
-11 -1: getMethodAt
-31 -1: (Ljava/net/URL;Ljava/net/URL;)Z
-13 -1: getLocaleName
-14 -1: isEnumConstant
-41 -1: (Ljava/lang/String;)Ljava/nio/CharBuffer;
-16 -1: newInvokeSpecial
-26 -1: (Ljava/nio/ByteBuffer;IS)V
-22 -1: sun/misc/JavaNioAccess
-184 -1: (Ljava/security/DomainCombiner;Ljava/lang/Class;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/security/AccessControlContext;
-96 -1: (Ljava/lang/invoke/MethodHandle;ILjava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-5 -1: ([S)I
-30 -1: java/security/AccessController
-37 -1: sun/misc/Launcher$SharedArchiveLoader
-4 -1: pack
-5 -1: ([S)V
-51 -1: failure before throwing exception, dump stack
-10 -1: dayOfMonth
-6 -1: CENSIG
-28 -1: java/util/function/Predicate
-26 -1: Malformed \\uxxxx encoding.
-9 -1: initIndex
-11 -1: invoke_LL_L
-23 -1: ConcurrentWeakInternSet
-14 -1: java/lang/Void
-42 -1: java/lang/String$CaseInsensitiveComparator
-38 -1: Ljava/lang/invoke/LambdaForm$Compiled;
-34 -1: java/util/Collections$SingletonSet
-142 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Class;)Ljava/lang/invoke/CallSite;
-35 -1: too many bootstrap method arguments
-17 -1: maxDelimCodePoint
-13 -1: previousIndex
-3 -1: pop
-6 -1: CENSIZ
-7 -1: ([Z[Z)Z
-11 -1: invoke_LL_V
-3 -1: pos
-33 -1: java/nio/file/WatchEvent$Modifier
-3 -1: pow
-12 -1: nextClearBit
-15 -1: Dictionary.java
-27 -1: sun/reflect/CallerSensitive
-13 -1: signatureType
-10 -1: dstSavings
-13 -1: UnicodeLittle
-16 -1: America/New_York
-82 -1: (Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;)Ljava/util/Locale;
-25 -1: referenceKindIsConsistent
-62 -1: Ljava/nio/Buffer;Ljava/lang/Comparable<Ljava/nio/LongBuffer;>;
-4 -1: INTS
-11 -1: LOAD_FACTOR
-40 -1: sun/reflect/DelegatingMethodAccessorImpl
-16 -1: accumulateAndGet
-21 -1: (B)Ljava/lang/String;
-6 -1: UNSAFE
-13 -1: resolveOrFail
-21 -1: MapReduceMappingsTask
-5 -1: arity
-77 -1: (Ljava/io/FileDescriptor;ZZLjava/lang/Object;)Ljava/nio/channels/FileChannel;
-5 -1: value
-61 -1: Ljava/util/concurrent/ConcurrentHashMap$EntrySetView<TK;TV;>;
-6 -1: forJar
-52 -1: <T:Ljava/lang/Object;>Ljava/lang/ref/Reference<TT;>;
-21 -1: CREATE_ACC_PERMISSION
-28 -1: sun/misc/NativeSignalHandler
-11 -1: defineClass
-5 -1: match
-93 -1: (Ljava/util/zip/ZipFile;Ljava/util/zip/ZipFile$ZipFileInputStream;Ljava/util/zip/Inflater;I)V
-11 -1: Double.java
-30 -1: America/Argentina/Buenos_Aires
-8 -1: previous
-37 -1: (Ljava/io/Writer;Ljava/lang/String;)V
-9 -1: Synthetic
-18 -1: isVMAnonymousClass
-62 -1: ([Ljava/lang/Object;Ljava/lang/Object;Ljava/util/Comparator;)I
-22 -1: (JI)Ljava/lang/String;
-49 -1: (Ljava/lang/CharSequence;II)Ljava/io/PrintStream;
-52 -1: ([Ljava/lang/Thread;)[[Ljava/lang/StackTraceElement;
-12 -1: setDayOfWeek
-11 -1: getManifest
-30 -1: java/util/Locale$FilteringMode
-54 -1: (Ljava/lang/String;)Lsun/util/calendar/CalendarSystem;
-12 -1: nextHashCode
-19 -1: ()Ljava/io/Console;
-42 -1: AccessControlContext invoking the Combiner
-19 -1: shouldBeInitialized
-17 -1: invocationCounter
-21 -1: IMPLEMENTATION_VENDOR
-7 -1: chararr
-60 -1: (Ljava/lang/String;)Ljava/util/Iterator<Ljava/lang/String;>;
-11 -1: asCollector
-52 -1: (ILjava/lang/CharSequence;)Ljava/lang/StringBuilder;
-9 -1: exception
-22 -1: newInstanceCallerCache
-20 -1: nativeLibraryContext
-24 -1: MODIFY_THREAD_PERMISSION
-4 -1: WRAP
-19 -1: Method name is null
-32 -1: sun/invoke/util/ValueConversions
-7 -1: APP_TAG
-24 -1: (Ljava/util/Hashtable;)I
-23 -1: METHOD_FORMAL_PARAMETER
-18 -1: inflationThreshold
-24 -1: java/io/DeleteOnExitHook
-3 -1: pst
-13 -1: BITS_PER_WORD
-25 -1: getConstructorAnnotations
-17 -1: CheckedCollection
-24 -1: (Ljava/util/Hashtable;)V
-7 -1: inClass
-5 -1: getFD
-8 -1: readLong
-19 -1: aliases_ISO_8859_13
-19 -1: invokeWithArguments
-19 -1: aliases_ISO_8859_15
-42 -1: ()Ljava/util/concurrent/ConcurrentHashMap;
-8 -1: expandTo
-23 -1: java/text/MessageFormat
-8 -1: classID0
-11 -1: replaceWith
-21 -1: Invalid port number :
-65 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)V
-19 -1: isGregorianLeapYear
-16 -1: asSpreaderChecks
-11 -1: withInitial
-10 -1: X-UTF-32BE
-57 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
-12 -1: wrong type:
-57 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
-17 -1: sun/misc/Resource
-14 -1: getReadTimeout
-8 -1: safeTrim
-38 -1: DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
-14 -1: isElementIndex
-23 -1: FilterOutputStream.java
-6 -1: (IJI)V
-3 -1: put
-57 -1: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
-43 -1: Expecting an absolute path of the library:
-8 -1: checkRef
-53 -1: (Ljava/lang/String;)Ljava/lang/AbstractStringBuilder;
-74 -1: (Ljava/lang/Class<*>;[Ljava/lang/reflect/Field;)[Ljava/lang/reflect/Field;
-11 -1: user.script
-10 -1: H_ALPHANUM
-17 -1: getCalendarSystem
-48 -1: Ljava/util/concurrent/ConcurrentHashMap<TK;TV;>;
-17 -1: EnsureInitialized
-82 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;Ljava/lang/ThreadLocal;Ljava/lang/Object;)V
-243 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceMappingsToIntTask;Ljava/util/function/ToIntBiFunction;ILjava/util/function/IntBinaryOperator;)V
-26 -1: getAnnotatedExceptionTypes
-10 -1: validIndex
-6 -1: ([CC)I
-8 -1: overflow
-5 -1: getID
-93 -1: (Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)Lsun/nio/cs/StreamDecoder;
-22 -1: java/util/StringJoiner
-9 -1: putFields
-18 -1: USE_SHARED_ARCHIVE
-8 -1: thursday
-8 -1: nanoTime
-59 -1: (Lsun/reflect/annotation/AnnotationType;Ljava/lang/Class;)V
-69 -1: (Ljava/nio/charset/CoderResult$Cache;I)Ljava/nio/charset/CoderResult;
-36 -1: (J)Ljava/lang/AbstractStringBuilder;
-16 -1: java/util/Arrays
-6 -1: ([CC)V
-25 -1: registerAsParallelCapable
-4 -1: slot
-24 -1: java/net/URLConnection$1
-6 -1: koi8-r
-19 -1: should be of type
-46 -1: java/util/concurrent/ConcurrentHashMap$TreeBin
-6 -1: koi8-u
-34 -1: data type scale not a power of two
-53 -1: Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;
-21 -1: AccessibleObject.java
-53 -1: <E:Ljava/lang/Object;>()Ljava/util/NavigableSet<TE;>;
-88 -1: (Ljava/util/List;Ljava/util/Collection;Ljava/util/Locale$FilteringMode;)Ljava/util/List;
-17 -1: getAnnotationType
-36 -1: Ljava/util/HashMap$TreeNode<TK;TV;>;
-14 -1: declaringClass
-10 -1: read,write
-5 -1: getId
-10 -1: BIG_ENDIAN
-20 -1: PolymorphicSignature
-16 -1: comparingByValue
-67 -1: (ILjava/lang/invoke/MethodType;)[Ljava/lang/invoke/LambdaForm$Name;
-19 -1: java/util/Hashtable
-20 -1: getUnicodeLocaleKeys
-27 -1: ()Ljava/util/LinkedHashMap;
-51 -1: (Ljava/lang/CharSequence;)Ljava/lang/StringBuilder;
-30 -1: java/util/HashMap$HashIterator
-22 -1: (IZ)Ljava/lang/String;
-5 -1: yield
-34 -1: java/lang/Throwable$SentinelHolder
-62 -1: (Ljava/lang/invoke/MethodType;ZI)Ljava/lang/invoke/LambdaForm;
-5 -1: (FD)F
-17 -1: java/util/SubList
-24 -1: (Ljava/io/PrintStream;)V
-7 -1: LF.zero
-25 -1: java/util/StringTokenizer
-15 -1: ISO8859_15_FDIS
-11 -1: powerOfTwoD
-11 -1: powerOfTwoF
-22 -1: WeakHashMapSpliterator
-15 -1: refKindIsGetter
-12 -1: setRawOffset
-11 -1: setProperty
-23 -1: (Ljava/lang/Object;IB)V
-45 -1: (ILjava/lang/Object;)Ljava/util/HashMap$Node;
-13 -1: applyAsDouble
-83 -1: (Lsun/misc/URLClassPath$FileLoader;Ljava/lang/String;Ljava/net/URL;Ljava/io/File;)V
-19 -1: MethodAccessor.java
-9 -1: WALL_TIME
-7 -1: INVOKES
-13 -1: java.ext.dirs
-9 -1: getStatic
-56 -1: (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
-42 -1: (Ljava/util/function/UnaryOperator<TE;>;)V
-27 -1: java/lang/Class$MethodArray
-10 -1: H_USERINFO
-19 -1: PostVMInitHook.java
-7 -1: running
-32 -1: Warning: passing argument as-is
-13 -1: EntryIterator
-22 -1: NF_checkSpreadArgument
-46 -1: ([DLjava/util/function/IntToDoubleFunction;I)V
-7 -1: .<init>
-13 -1: mappingLength
-20 -1: implOnMalformedInput
-53 -1: (Ljava/lang/String;ILjava/lang/reflect/Executable;I)V
-26 -1: cannot make variable arity
-18 -1: SharedSecrets.java
-27 -1: (Ljava/io/InputStream;IZ)[B
-9 -1: Asia/Gaza
-55 -1: Ljava/util/Map<Ljava/lang/String;Ljava/lang/Class<*>;>;
-5 -1: NTLM
-19 -1: defaultCenturyStart
-18 -1: addElapsedTimeFrom
-38 -1: (Lsun/misc/Cleaner;)Lsun/misc/Cleaner;
-44 -1: (Ljava/io/OutputStream;ZLjava/lang/String;)V
-22 -1: (Ljava/lang/Object;B)V
-6 1: [LBar;
-7 -1: classes
-23 -1: java/net/URLClassLoader
-17 -1: sun/misc/Launcher
-163 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)[Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-12 -1: updateAndGet
-90 -1: (Ljava/net/URL;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
-9 -1: increment
-27 -1: (Ljava/lang/CharSequence;)V
-16 -1: Ljava/io/Reader;
-27 -1: java/io/PushbackInputStream
-6 -1: (JFZ)V
-17 -1: getAppClassLoader
-35 -1: sun/reflect/generics/tree/Signature
-9 -1: elementAt
-27 -1: (Ljava/lang/CharSequence;)Z
-10 -1: readDouble
-37 -1: ([B)Ljava/nio/charset/CharsetEncoder;
-46 -1: (Ljava/lang/ThreadGroup;Ljava/lang/Runnable;)V
-4 -1: park
-36 -1: java/lang/NegativeArraySizeException
-49 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/Class;)Z
-121 -1: <T:Ljava/lang/Object;U::Ljava/lang/Comparable<-TU;>;>(Ljava/util/function/Function<-TT;+TU;>;)Ljava/util/Comparator<TT;>;
-101 -1: (Ljava/lang/annotation/Annotation;Ljava/lang/annotation/Annotation;)Ljava/lang/annotation/Annotation;
-12 -1: .$|()[{^?*+\\
-6 -1: manRef
-3 -1: 437
-15 -1: newStringUnsafe
-15 -1: constantPoolOop
-10 -1: getPackage
-24 -1: FastCharsetProvider.java
-18 -1: getAnnotationBytes
-187 -1: (Ljava/security/DomainCombiner;Ljava/lang/Class<*>;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;[Ljava/security/Permission;)Ljava/security/AccessControlContext;
-33 -1: Cannot suppress a null exception.
-27 -1: sun/nio/cs/StandardCharsets
-33 -1: (BB)Ljava/lang/invoke/MemberName;
-61 -1: ([Ljava/lang/ClassValue$Entry;ILjava/lang/ClassValue$Entry;)I
-10 -1: X-UTF-32LE
-5 -1: toMap
-89 -1: (Ljava/lang/Class<*>;Ljava/util/List<Ljava/lang/Class<*>;>;)Ljava/lang/invoke/MethodType;
-46 -1: ([Ljava/lang/Object;IILjava/util/Comparator;)V
-66 -1: ([Ljava/lang/reflect/Constructor;)[Ljava/lang/reflect/Constructor;
-22 -1: ()Ljava/nio/ByteOrder;
-20 -1: isMethodHandleInvoke
-25 -1: sun/net/www/URLConnection
-89 -1: Ljava/util/concurrent/ConcurrentHashMap<Ljava/lang/String;Ljava/lang/invoke/LambdaForm;>;
-49 -1: (Ljava/nio/charset/Charset;FFLjava/lang/String;)V
-17 -1: MIN_LOW_SURROGATE
-23 -1: AbstractCollection.java
-19 -1: (Ljava/util/Date;)I
-19 -1: (Ljava/util/Date;)J
-12 -1: cldrdata.jar
-4 -1: path
-77 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Class;IILjava/lang/String;[B)V
-6 -1: MS1250
-37 -1: setJavaSecurityProtectionDomainAccess
-11 -1: isDelimiter
-5 -1: char0
-6 -1: MS1251
-5 -1: char1
-16 -1: getJavaNetAccess
-6 -1: MS1252
-6 -1: MS1253
-6 -1: MS1254
-51 -1: (Ljava/lang/Class;)Ljava/security/ProtectionDomain;
-6 -1: MS1257
-93 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/ProtectionDomain;)Ljava/lang/Class<*>;
-10 -1: access$300
-5 -1: (JZ)C
-19 -1: (Ljava/util/Date;)Z
-5 -1: (JZ)D
-26 -1: java/lang/Character$Subset
-10 -1: access$302
-5 -1: (JZ)F
-9 -1: emptyList
-5 -1: (JZ)I
-5 -1: (JZ)J
-23 -1: (Ljava/lang/Runnable;)V
-27 -1: java/lang/invoke/MemberName
-29 -1: ()Ljava/util/Comparator<TT;>;
-18 -1: retrieveDirectives
-7 -1: ([F[F)Z
-40 -1: (Lsun/misc/URLClassPath;Ljava/net/URL;)V
-5 -1: (JZ)S
-40 -1: (Ljava/util/function/IntUnaryOperator;)I
-5 -1: (JZ)V
-16 -1: parseAnnotations
-21 -1: (C)Ljava/lang/String;
-73 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;)Ljava/util/Map<TK;TV;>;
-15 -1: charset encoder
-17 -1: getDomainCombiner
-9 -1: EmptyList
-15 -1: java.vm.version
-19 -1: getResourceAsStream
-94 -1: Ljava/lang/ThreadLocal<Ljava/lang/ref/SoftReference<Ljava/lang/StringCoding$StringEncoder;>;>;
-26 -1: java/util/HashMap$TreeNode
-22 -1: (Ljava/util/HashMap;)V
-23 -1: sun/misc/URLClassPath$1
-65 -1: ([Ljava/net/URL;Ljava/lang/ClassLoader;)Ljava/net/URLClassLoader;
-20 -1: Hashtable Enumerator
-23 -1: sun/misc/URLClassPath$2
-10 -1: Array.java
-8 -1: FT_LIMIT
-24 -1: ()[Ljava/lang/Throwable;
-23 -1: sun/misc/URLClassPath$3
-14 -1: java/io/Writer
-5 -1: chars
-76 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/NavigableMap<TK;TV;>;
-6 -1: final
-5 -1: error
-34 -1: java/lang/ApplicationShutdownHooks
-29 -1: Lsun/launcher/LauncherHelper;
-30 -1: ()Ljava/util/Enumeration<TE;>;
-47 -1: (Ljava/util/List;)Ljava/lang/invoke/MethodType;
-9 -1: scriptKey
-5 -1: BYTES
-12 -1: getException
-69 -1: (Ljava/lang/Class<*>;Ljava/lang/Object;)Ljava/lang/invoke/MethodType;
-14 -1: Illegal Load:
-189 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$ReduceValuesTask;Ljava/util/function/BiFunction;)V
-66 -1: java/util/concurrent/ConcurrentHashMap$MapReduceMappingsToLongTask
-29 -1: getJavaIOFileDescriptorAccess
-11 -1: toCodePoint
-15 -1: setCreationTime
-18 -1: NULL_CAUSE_MESSAGE
-8 -1: elements
-32 -1: ()Ljava/nio/charset/CoderResult;
-8 -1: utf-32be
-7 -1: addDate
-4 -1: Cast
-23 -1: sun/misc/JavaLangAccess
-8 -1: 0{1,12}$
-27 -1: (Ljava/util/ArrayList;III)V
-11 -1: lastIndexOf
-14 -1: getCodeSources
-53 -1: (Lsun/util/calendar/CalendarDate;Ljava/lang/String;)V
-17 -1: cachedConstructor
-7 -1: forName
-74 -1: (Ljava/util/function/ToLongFunction;Ljava/lang/Object;Ljava/lang/Object;)I
-47 -1: (Ljava/lang/Object;)Lsun/reflect/FieldAccessor;
-8 -1: getDebug
-18 -1: currentClassLoader
-49 -1: Illegal leading minus sign on unsigned string %s.
-20 -1: toLowerCaseCharArray
-38 -1: java/util/concurrent/ConcurrentHashMap
-8 -1: isHidden
-92 -1: (Ljava/lang/Thread;ILjava/lang/Object;Ljava/lang/Thread;JJJJ[Ljava/lang/StackTraceElement;)V
-29 -1: java/lang/ArithmeticException
-26 -1: (Ljava/io/OutputStream;Z)V
-66 -1: (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/RuntimeException;
-38 -1: Ljava/util/Map<Ljava/lang/String;TT;>;
-16 -1: getFindClassTime
-34 -1: ([J)Ljava/util/Spliterator$OfLong;
-24 -1: UnmodifiableNavigableSet
-32 -1: java/lang/ClassNotFoundException
-3 -1: \\n
-6 -1: SEALED
-14 -1: Flushable.java
-3 -1: HST
-24 -1: (Ljava/lang/Object;JII)Z
-13 -1: toSecondOfDay
-16 -1: thenComparingInt
-26 -1: java/lang/NoSuchFieldError
-18 -1: java/util/Locale$1
-25 -1: [Ljava/util/HashMap$Node;
-75 -1: ([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
-11 -1: x-mswin-936
-32 -1: java/lang/management/MemoryUsage
-25 -1: (JS)Ljava/nio/ByteBuffer;
-25 -1: java/lang/ref/Finalizer$1
-25 -1: java/lang/ref/Finalizer$2
-21 -1: (Ljava/util/BitSet;)V
-25 -1: java/lang/ref/Finalizer$3
-83 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<+TT;>;Ljava/util/Comparator<-TT;>;)TT;
-24 -1: sun/nio/ch/Interruptible
-21 -1: (Ljava/util/BitSet;)Z
-72 -1: ([Ljava/security/ProtectionDomain;Ljava/security/AccessControlContext;)V
-54 -1: Ljava/util/AbstractSet<Ljava/util/Map$Entry<TK;TV;>;>;
-34 -1: getConstructorParameterAnnotations
-4 -1: name
-92 -1: <E:Ljava/lang/Enum<TE;>;>Ljava/lang/Object;Ljava/lang/Comparable<TE;>;Ljava/io/Serializable;
-11 -1: FORM_OFFSET
-13 -1: getAliasTable
-5 -1: (DD)D
-23 -1: reflectionFactoryAccess
-221 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceValuesTask;Ljava/util/function/Function;Ljava/util/function/BiFunction;)V
-59 -1: (Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path;
-6 -1: DELETE
-10 -1: returnType
-5 -1: (DD)I
-51 -1: ()Lsun/reflect/generics/repository/FieldRepository;
-8 -1: delegate
-12 -1: OTHER_LETTER
-18 -1: getTransitionIndex
-3 -1: HUP
-10 -1: (IIII[CI)V
-10 -1: ISO_8859-1
-17 -1: ArrayEncoder.java
-10 -1: ISO_8859-2
-34 -1: java/lang/reflect/AnnotatedElement
-10 -1: ISO_8859-4
-27 -1: sun/nio/cs/UTF_16LE$Decoder
-10 -1: ISO_8859-5
-13 -1: prefetchWrite
-9 -1: getFloatB
-10 -1: ISO_8859-7
-37 -1: (I)Ljava/lang/invoke/LambdaForm$Name;
-10 -1: ISO_8859-9
-10 -1: getActions
-11 -1: negateExact
-10 -1: isAbstract
-9 -1: getFloatL
-29 -1: java/lang/ClassValue$Identity
-14 -1: java/io/Reader
-8 -1: getOwner
-24 -1: java/lang/AssertionError
-17 -1: MethodHandle.java
-19 -1: classRedefinedCount
-10 -1: cachedYear
-15 -1: getAndIncrement
-26 -1: java.protocol.handler.pkgs
-14 -1: cleanSomeSlots
-27 -1: java/util/Spliterator$OfInt
-31 -1: getRawExecutableTypeAnnotations
-20 -1: ensureInitialization
-7 -1: os.arch
-57 -1: (Ljava/security/cert/CertPath;Ljava/security/Timestamp;)V
-21 -1: UNSAFE_COPY_THRESHOLD
-20 -1: toUnsignedBigInteger
-82 -1: (Ljava/util/concurrent/locks/Condition;)Ljava/util/Collection<Ljava/lang/Thread;>;
-15 -1: Reflection.java
-12 -1: decryptBlock
-3 -1: \\r
-8 -1: newArray
-8 -1: Category
-36 -1: java/lang/reflect/GenericDeclaration
-22 -1: (Ljava/lang/String;Z)V
-8 -1: suspend0
-10 -1: getSigners
-22 -1: (Ljava/lang/String;Z)Z
-31 -1: Unable to create temporary file
-117 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue<TT;>;Ljava/lang/ClassValue$Entry<TT;>;)Ljava/lang/ClassValue$Entry<TT;>;
-17 -1: channelsAvailable
-9 -1: Date.java
-13 -1: toIndex < 0:
-18 -1: mark > position: (
-11 -1: loadConvert
-4 -1: july
-42 -1: (Ljava/math/BigInteger;)Ljava/lang/String;
-6 -1: enable
-47 -1: (Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;
-6 -1: unpack
-13 -1: setDayOfMonth
-19 -1: name can't be empty
-16 -1: getExtensionKeys
-15 -1: getAndDecrement
-36 -1: Ljava/lang/ClassValue$ClassValueMap;
-38 -1: (Ljava/lang/Class;Ljava/lang/String;)V
-11 -1: csISOlatin0
-9 -1: retention
-23 -1: system protocol handler
-9 -1: nullsLast
-15 -1: refKindIsStatic
-3 -1: (\n
-48 -1: sun/launcher/LauncherHelper$ResourceBundleHolder
-29 -1: ()Ljava/util/LinkedList<TE;>;
-11 -1: csISOlatin9
-31 -1: ([CII)Ljava/lang/StringBuilder;
-29 -1: (II)Ljava/lang/StringBuilder;
-7 -1: pdcache
-4 -1: june
-12 -1: ;/?:@&=+$,[]
-141 -1: ([Ljava/lang/invoke/LambdaForm$Name;[Ljava/lang/invoke/LambdaForm$Name;Ljava/lang/invoke/LambdaForm$Name;)[Ljava/lang/invoke/LambdaForm$Name;
-32 -1: ()[Ljava/util/WeakHashMap$Entry;
-110 -1: (Ljava/lang/Class<*>;ILjava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-81 -1: (Lsun/reflect/annotation/AnnotationType;Lsun/reflect/annotation/AnnotationType;)Z
-46 -1: String value %s exceeds range of unsigned int.
-6 -1: close0
-6 -1: (JDZ)V
-160 -1: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/reflect/GenericDeclaration;Ljava/lang/reflect/Type;Ljava/lang/reflect/AnnotatedElement;
-12 -1: LinkedValues
-24 -1: java/nio/HeapCharBufferR
-23 -1: jvmVersionInfoAvailable
-16 -1: classLoaderDepth
-33 -1: (Lsun/nio/ch/DirectBuffer;IIIII)V
-32 -1: java/nio/file/attribute/FileTime
-50 -1: java/util/concurrent/ConcurrentHashMap$CounterCell
-73 -1: (Lsun/misc/URLClassPath$JarLoader;Lsun/misc/JarIndex;)Lsun/misc/JarIndex;
-60 -1: (Ljava/net/URL;Ljava/lang/String;)Ljava/security/CodeSource;
-25 -1: Ljava/lang/ref/Finalizer;
-12 -1: utf-32be-bom
-40 -1: (Ljava/lang/String;ILjava/lang/Object;)V
-9 -1: THROW_UCS
-23 -1: java/util/AbstractMap$1
-23 -1: java/util/AbstractMap$2
-10 -1: x-utf-32be
-4 -1: (S)B
-60 -1: (Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/LambdaForm;
-20 -1: ResourceBundleHolder
-4 -1: (S)I
-13 -1: getSuppressed
-17 -1: jdk_micro_version
-4 -1: (S)J
-9 -1: isNumeric
-10 -1: variantKey
-8 -1: utf-32le
-47 -1: java/util/concurrent/ConcurrentHashMap$MapEntry
-25 -1: ()Ljava/lang/Class<-TT;>;
-6 -1: closed
-4 -1: (S)S
-15 -1: setStandardTime
-10 -1: ShortCache
-4 -1: (S)V
-40 -1: sun/net/www/MessageHeader$HeaderIterator
-17 -1: jdk_major_version
-8 -1: FXHelper
-6 -1: CENTIM
-19 -1: java/security/Guard
-46 -1: java.lang.invoke.MethodHandle.DUMP_CLASS_FILES
-4 -1: ENUM
-27 -1: Ljava/lang/SecurityManager;
-39 -1: ([Ljava/lang/Class;[Ljava/lang/Class;)Z
-11 -1: getFieldAt0
-12 -1: user.variant
-28 -1: (Ljava/io/DataInputStream;)V
-44 -1: ([JLjava/util/function/LongBinaryOperator;)V
-7 -1: getRoot
-3 -1: +
-16 -1: identityHashCode
-25 -1: java/security/Permissions
-16 -1: Ljava/net/Proxy;
-23 -1: java/io/ExpiringCache$1
-5 -1: more
-10 -1: formatList
-49 -1: (Ljava/lang/String;)Lsun/launcher/LauncherHelper;
-29 -1: Relative path in absolute URI
-11 -1: checkMapped
-8 -1: Checksum
-8 -1: " Radix:
-9 -1: getAndAdd
-9 -1: implReady
-16 -1: SynchronizedList
-30 -1: [Ljava/lang/StackTraceElement;
-5 -1: right
-13 -1: UTF_16BE.java
-4 -1: HEAD
-11 -1: isInvocable
-6 -1: ENDCOM
-15 -1: getPropertiesEx
-6 -1: Unsafe
-7 -1: IBM-819
-37 -1: : 0 <= i2 && i2 < names.length: 0 <=
-19 -1: filterAndAddHeaders
-22 -1: nativeParkEventPointer
-18 -1: checkPositionIndex
-13 -1: invalid url:
-25 -1: out of range from input
-9 -1: loadClass
-12 -1: encodingName
-9 -1: x-JIS0208
-38 -1: (Ljava/lang/Class;Ljava/lang/Object;)Z
-28 -1: (I)Ljava/lang/reflect/Field;
-17 -1: getJvmVersionInfo
-6 -1: LIJFDV
-21 -1: (D)Ljava/lang/String;
-7 -1: oomeMsg
-30 -1: java/io/InvalidObjectException
-25 -1: java/io/FilterInputStream
-32 -1: Ljava/net/ContentHandlerFactory;
-13 -1: toUnsignedInt
-17 -1: reconstitutionPut
-37 -1: (Ljava/lang/Object;)Ljava/lang/Class;
-14 -1: getContentType
-43 -1: java/util/Collections$SynchronizedSortedSet
-24 -1: (II)Ljava/nio/file/Path;
-25 -1: JAVAFX_APPLICATION_MARKER
-29 -1: (IC)Ljava/lang/StringBuilder;
-13 -1: java/util/Set
-10 -1: clearError
-64 -1: (Ljava/lang/invoke/MethodType;[I)Ljava/lang/invoke/MethodHandle;
-25 -1: java/io/FileInputStream$1
-8 -1: getFirst
-36 -1: (Lsun/reflect/ConstructorAccessor;)V
-84 -1: (Ljava/util/NavigableMap;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/NavigableMap;
-42 -1: (Ljava/lang/CharSequence;)Ljava/io/Writer;
-52 -1: ([Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-6 -1: (IFI)V
-62 -1: <E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Queue<TE;>;
-17 -1: getHeaderFieldInt
-16 -1: CheckedSortedMap
-39 -1: (ZILjava/lang/String;)Ljava/lang/Class;
-10 -1: getterName
-10 -1: Asia/Tokyo
-4 -1: Node
-7 -1: rotate1
-13 -1: Stream closed
-7 -1: rotate2
-9 -1: checkExec
-17 -1: NF_checkExactType
-18 -1: ReverseComparator2
-18 -1: arrayElementGetter
-97 -1: (Ljava/util/ArrayPrefixHelpers$DoubleCumulateTask;Ljava/util/function/DoubleBinaryOperator;[DII)V
-9 -1: iso8859-1
-9 -1: iso8859-2
-9 -1: iso8859-4
-9 -1: iso8859-5
-9 -1: iso8859-7
-16 -1: getPermissions
-9 -1: iso8859-9
-9 -1: fromClass
-17 -1: with modifiers "
-8 -1: isBooted
-24 -1: getCommonPoolParallelism
-10 -1: initialize
-47 -1: <T:Ljava/lang/Object;>(TT;)Ljava/util/Set<TT;>;
-17 -1: checkElementIndex
-14 -1: openConnection
-47 -1: (Ljava/lang/Thread;Lsun/nio/ch/Interruptible;)V
-12 -1: isAuthorized
-17 -1: ReduceEntriesTask
-7 -1: command
-24 -1: ArithmeticException.java
-24 -1: ensureOpenOrZipException
-67 -1: (Lsun/util/calendar/CalendarDate;I)Lsun/util/calendar/CalendarDate;
-39 -1: Ljava/lang/invoke/MethodHandles$Lookup;
-31 -1: Enclosing constructor not found
-34 -1: ()Lsun/util/calendar/BaseCalendar;
-25 -1: (JLjava/lang/Object;JJJ)V
-12 -1: > toIndex:
-22 -1: LocaleObjectCache.java
-19 -1: sun/misc/Launcher$1
-31 -1: java/util/HashMap$EntryIterator
-8 -1: contains
-60 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;
-53 -1: (I[Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-19 -1: java/io/PrintStream
-42 -1: java/lang/Math$RandomNumberGeneratorHolder
-100 -1: <K:Ljava/lang/Object;>(I)Ljava/util/concurrent/ConcurrentHashMap$KeySetView<TK;Ljava/lang/Boolean;>;
-14 -1: getCapturedArg
-14 -1: getCodeSigners
-20 -1: mark() not supported
-56 -1: (Lsun/misc/URLClassPath;I)Lsun/misc/URLClassPath$Loader;
-20 -1: java/lang/StrictMath
-14 -1: annotationType
-3 -1: IET
-4 -1: lang
-13 -1: JarEntry.java
-9 -1: ([CIIII)I
-9 -1: canEncode
-5 -1: extra
-30 -1: java/lang/ref/ReferenceQueue$1
-37 -1: java/nio/channels/ReadableByteChannel
-73 -1: (Ljava/util/Map$Entry<Ljava/lang/String;Ljava/io/ExpiringCache$Entry;>;)Z
-24 -1: java/io/BufferedReader$1
-10 -1: x-utf-32le
-16 -1: methodDescriptor
-25 -1: (IJ)Ljava/nio/ByteBuffer;
-18 -1: getSystemResources
-46 -1: (Ljava/lang/String;I)Ljava/util/regex/Pattern;
-46 -1: (Ljava/net/URL;)Lsun/misc/URLClassPath$Loader;
-20 -1: calendars.properties
-25 -1: implOnUnmappableCharacter
-12 -1: signers_name
-40 -1: (ZILjava/util/Locale;)Ljava/lang/String;
-8 -1: (TE;)TE;
-50 -1: ()Lsun/util/locale/provider/LocaleProviderAdapter;
-11 -1: key is null
-7 -1: encrypt
-21 -1: millisUntilExpiration
-55 -1: Unable to parse property sun.reflect.inflationThreshold
-9 -1: checkExit
-5 -1: SHORT
-43 -1: java/util/Collections$UnmodifiableSortedSet
-10 -1: ISO8859_15
-16 -1: verifyParameters
-24 -1: buildAnnotatedInterfaces
-15 -1: refKindIsSetter
-45 -1: (JLjava/util/function/BiConsumer<-TK;-TV;>;)V
-23 -1: (Ljava/lang/Object;IC)V
-90 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue$Entry<TT;>;)Ljava/lang/ClassValue$Entry<TT;>;
-30 -1: (Ljava/net/URL;)Ljava/net/URI;
-60 -1: (BLjava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Object;)V
-43 -1: (Ljava/util/Collection;Ljava/lang/Object;)I
-44 -1: (Ljava/net/URLConnection;)Ljava/lang/Object;
-17 -1: Stream not marked
-11 -1: targetCheck
-127 -1: (Ljava/lang/Class<*>;ILjava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
-11 -1: debugString
-112 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-43 -1: (Ljava/util/Collection;Ljava/lang/Object;)V
-15 -1: NF_staticOffset
-22 -1: CASE_INSENSITIVE_ORDER
-6 -1: unpark
-29 -1: (Ljava/lang/CharSequence;II)I
-59 -1: Ljava/util/concurrent/ConcurrentHashMap$KeySetView<TK;TV;>;
-19 -1: defaultFormatLocale
-7 -1: combine
-58 -1: (Ljava/util/Locale$LocaleKey;)Lsun/util/locale/BaseLocale;
-29 -1: (Ljava/lang/CharSequence;II)V
-35 -1: sun/util/calendar/BaseCalendar$Date
-57 -1: Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
-75 -1: ([Ljava/lang/reflect/Member;[Ljava/lang/String;)[Ljava/lang/reflect/Member;
-15 -1: MethodType_init
-5 -1: (JF)V
-20 -1: AUTOSELECT_FILTERING
-12 -1: invokeStatic
-18 -1: readFileDescriptor
-22 -1: java/lang/Terminator$1
-72 -1: (Ljava/lang/Object;Ljava/util/function/UnaryOperator;)Ljava/lang/Object;
-17 -1: EMPTY_STACK_TRACE
-13 -1: isSamePackage
-32 -1: ()Ljava/security/DomainCombiner;
-10 -1: decodeLoop
-30 -1: DIRECTIONALITY_EUROPEAN_NUMBER
-112 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/lang/String;>;)Ljava/lang/String;
-33 -1: (Ljava/util/function/Predicate;)Z
-35 -1: logincontext login context results
-17 -1: sun/nio/cs/UTF_16
-13 -1: SingletonList
-5 -1: end=
-7 -1: getURLs
-17 -1: traceInstructions
-22 -1: generateCustomizedCode
-9 -1: NO_CHANGE
-11 -1: Number.java
-49 -1: <T:Ljava/lang/Object;>(ITT;)Ljava/util/List<TT;>;
-19 -1: checkSpecifyHandler
-8 -1: setValue
-30 -1: (Ljava/net/URL;)Ljava/net/URL;
-22 -1: (Ljava/lang/Object;C)V
-19 -1: Negative capacity:
-24 -1: ArrayStoreException.java
-52 -1: (Ljava/lang/StringBuffer;II)Ljava/lang/StringBuffer;
-14 -1: linkMethodImpl
-42 -1: java/util/InvalidPropertiesFormatException
-4 -1: last
-19 -1: getLocalizedMessage
-65 -1: (Ljava/text/MessageFormat;[Ljava/lang/String;)[Ljava/lang/String;
-61 -1: Ljava/lang/Object;Ljava/util/Enumeration<Ljava/lang/Object;>;
-40 -1: (I[CII)Ljava/lang/AbstractStringBuilder;
-27 -1: java.launcher.opt.datamodel
-29 -1: (Ljava/lang/reflect/Method;)V
-19 -1: SPECIFICATION_TITLE
-123 -1: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Class;ILjava/lang/Class;)Lsun/reflect/SerializationConstructorAccessorImpl;
-32 -1: (I[CII)Ljava/lang/StringBuilder;
-29 -1: (Ljava/lang/reflect/Method;)Z
-23 -1: (Z[B)Ljava/lang/String;
-27 -1: sun/nio/cs/Surrogate$Parser
-32 -1: (Ljavax/security/auth/Subject;)Z
-29 -1: ()Ljava/lang/invoke/Invokers;
-7 -1: getPool
-7 -1: textOut
-12 -1: getEntryTime
-14 -1: classModifiers
-47 -1: (Ljava/util/Locale$Category;)Ljava/util/Locale;
-32 -1: getInheritedAccessControlContext
-4 -1: rcbt
-37 -1: (Ljava/lang/Class<*>;Ljava/io/File;)Z
-25 -1: AccessControlContext.java
-22 -1: FileURLConnection.java
-12 -1: NaturalOrder
-34 -1: sun/util/calendar/CalendarSystem$1
-94 -1: ([Ljava/lang/reflect/Method;Ljava/lang/String;[Ljava/lang/Class<*>;)Ljava/lang/reflect/Method;
-17 -1: No enum constant
-7 -1: ([DII)V
-8 -1: register
-23 -1: FINAL_QUOTE_PUNCTUATION
-27 -1: ACCESS_CLIPBOARD_PERMISSION
-15 -1: verifyConstants
-20 -1: (Ljava/io/Writer;I)V
-45 -1: (Ljava/lang/String;)Ljava/lang/reflect/Field;
-24 -1: linkMethodHandleConstant
-43 -1: (Ljava/io/OutputStream;Ljava/lang/String;)V
-125 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Comparator<-TV;>;)Ljava/util/Comparator<Ljava/util/Map$Entry<TK;TV;>;>;
-14 -1: ALL_PERMISSION
-12 -1: createObject
-10 -1: CRC32.java
-14 -1: reservedMemory
-22 -1: ensureCapacityInternal
-11 -1: FormatData_
-9 -1: maxMemory
-27 -1: (I)Ljava/util/ListIterator;
-8 -1: UTF-16BE
-27 -1: AbstractSequentialList.java
-10 -1: access$400
-16 -1: Locale settings:
-10 -1: access$402
-12 -1: HashSet.java
-24 -1: java/lang/Long$LongCache
-30 -1: [Ljava/lang/reflect/Parameter;
-11 -1: single_step
-45 -1: (Ljava/lang/String;)Lsun/security/util/Debug;
-97 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;)Ljava/lang/invoke/SimpleMethodHandle;
-16 -1: indexOfBangSlash
-7 -1: region=
-26 -1: ([BII)Ljava/lang/Class<*>;
-8 -1: bitCount
-3 -1: INT
-67 -1: <T:Ljava/lang/Object;>([TT;Ljava/util/function/IntFunction<+TT;>;)V
-35 -1: newGetFloatIllegalArgumentException
-11 -1: ([DII[DII)V
-22 -1: makePreparedLambdaForm
-3 -1: <
-35 -1: sun/management/GarbageCollectorImpl
-4 -1: (*)*
-7 -1: getPort
-18 -1: java/io/FileSystem
-7 -1: getNode
-38 -1: (Ljava/lang/Object;I)Ljava/lang/Class;
-36 -1: $SwitchMap$java$util$Locale$Category
-18 -1: securityCheckCache
-5 -1: cdate
-10 -1: childValue
-19 -1: getMainClassFromJar
-70 -1: <T:Ljava/lang/Enum<TT;>;>(Ljava/lang/Class<TT;>;Ljava/lang/String;)TT;
-20 -1: unsuspendSomeThreads
-29 -1: sun.classloader.findClassTime
-11 -1: plusSeconds
-3 -1: =
-4 -1: Lock
-7 -1: regions
-38 -1: ()Ljava/lang/reflect/Constructor<TT;>;
-25 -1: parseParameterAnnotations
-20 -1: getSystemGMTOffsetID
-33 -1: [Cc][Oo][Dd][Ee][Bb][Aa][Ss][Ee]=
-37 -1: (Ljava/lang/String;I)Ljava/lang/Byte;
-10 -1: permission
-78 -1: (Ljava/lang/reflect/Constructor;)Lsun/reflect/generics/scope/ConstructorScope;
-28 -1: (Lsun/misc/JavaLangAccess;)V
-26 -1: GET_CLASSLOADER_PERMISSION
-24 -1: (J)Ljava/nio/ByteBuffer;
-20 -1: getUnresolvedActions
-49 -1: (I[BIILsun/security/util/ManifestEntryVerifier;)V
-5 -1: (ZJ)V
-14 -1: isClassOnlyJar
-35 -1: ()[Ljava/util/HashMap$Node<TK;TV;>;
-23 -1: ()Ljava/util/SortedMap;
-29 -1: HistoricallyNamedCharset.java
-30 -1: no leading reference parameter
-8 -1: csCESU-8
-3 -1: >
-13 -1: invoke_LLLL_L
-109 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/NavigableMap<TK;+TV;>;)Ljava/util/NavigableMap<TK;TV;>;
-13 -1: invoke_LLLL_V
-46 -1: (Ljava/lang/Class;Z)[Ljava/lang/reflect/Field;
-5 -1: offer
-12 -1: isoLanguages
-61 -1: (Ljava/io/OutputStream;Ljava/lang/String;Ljava/lang/String;)V
-44 -1: sun/reflect/BootstrapConstructorAccessorImpl
-12 -1: BaseIterator
-58 -1: (IZ[Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/String;
-23 -1: initializeOSEnvironment
-62 -1: ([Ljava/security/cert/Certificate;)[Ljava/security/CodeSigner;
-3 -1: >>
-13 -1: searchEntries
-7 -1: setDate
-3 -1: red
-3 -1: ref
-10 -1: EMPTY_LIST
-3 -1: rem
-78 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractCollection<TE;>;Ljava/util/List<TE;>;
-9 -1: scanToken
-6 -1: greek8
-9 -1: basicType
-12 -1: getFromClass
-43 -1: averageCharsPerByte exceeds maxCharsPerByte
-8 -1: isDaemon
-7 -1: nonNull
-17 -1: Invalid default:
-45 -1: (Lsun/misc/URLClassPath;Ljava/lang/String;Z)V
-18 -1: java/lang/String$1
-11 -1: copyMethods
-15 -1: sun/misc/Signal
-5 -1: float
-18 -1: StreamDecoder.java
-19 -1: no such constructor
-14 -1: bad arity for
-14 -1: divideUnsigned
-10 -1: CODING_END
-3 -1: IST
-14 -1: HeaderIterator
-9 -1: september
-20 -1: makeVarargsCollector
-6 -1: L_PATH
-45 -1: (Ljava/lang/String;)Ljava/io/File$PathStatus;
-24 -1: URI scheme is not "file"
-85 -1: (Ljava/lang/Class<TT;>;Ljava/lang/Class<TV;>;Ljava/lang/String;Ljava/lang/Class<*>;)V
-27 -1: java/util/function/Supplier
-17 -1: checkedCollection
-8 -1: MapEntry
-81 -1: (Ljava/lang/invoke/MethodHandle;ILjava/util/List;)Ljava/lang/invoke/MethodHandle;
-34 -1: java/security/ProtectionDomain$Key
-14 -1: List length =
-39 -1: ([Ljava/lang/Object;)Ljava/lang/String;
-87 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
-7 -1: unparse
-28 -1: jarFileHasClassPathAttribute
-40 -1: (Lsun/misc/JavaIOFileDescriptorAccess;)V
-30 -1: (Ljava/lang/reflect/Field;ZZ)V
-22 -1: GetPropertyAction.java
-8 -1: RUNNABLE
-10 -1: exprString
-13 -1: getAnnotation
-19 -1: class can't be null
-22 -1: defaultAssertionStatus
-8 -1: getName0
-16 -1: quoteReplacement
-15 -1: getMemberVMInfo
-42 -1: (Ljava/lang/Class<*>;)Ljava/lang/Class<*>;
-16 -1: cachedLambdaForm
-16 -1: addFinalRefCount
-12 -1: getMethodAt0
-8 -1: ([ZII)[Z
-44 -1: (Ljava/lang/Object;TV;Ljava/lang/Object;)TV;
-4 -1: [TT;
-29 -1: Ljava/lang/invoke/LambdaForm;
-28 -1: java/util/DualPivotQuicksort
-61 -1: ()Ljava/util/concurrent/ConcurrentHashMap$KeySetView<TK;TV;>;
-17 -1: registerDirectory
-8 -1: jarFiles
-69 -1: (Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String;
-54 -1: [Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-15 -1: getDefaultValue
-39 -1: sun/util/calendar/ZoneInfoFile$Checksum
-20 -1: DISABLE_JAR_CHECKING
-12 -1: CONTENT_TYPE
-46 -1: array type not assignable to trailing argument
-60 -1: <T:Ljava/lang/Object;>([TT;II)Ljava/util/stream/Stream<TT;>;
-47 -1: java.lang.invoke.MethodHandle.COMPILE_THRESHOLD
-9 -1: toInstant
-152 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/NavigableMap<TK;TV;>;Ljava/lang/Class<TK;>;Ljava/lang/Class<TV;>;)Ljava/util/NavigableMap<TK;TV;>;
-7 -1: L_ALPHA
-29 -1: java/lang/AbstractMethodError
-29 -1: java/util/jar/Attributes$Name
-15 -1: LOCALE_SETTINGS
-19 -1: (J)Ljava/lang/Long;
-4 -1: jar:
-17 -1: ensureInitialized
-13 -1: LAST_MODIFIED
-40 -1: ([Ljava/lang/String;)[Ljava/lang/String;
-7 -1: shuffle
-70 -1: (Lsun/util/locale/LanguageTag;)Lsun/util/locale/InternalLocaleBuilder;
-19 -1: isPackageAccessible
-17 -1: compileToBytecode
-11 -1: getPackages
-237 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceKeysToIntTask;Ljava/util/function/ToIntFunction;ILjava/util/function/IntBinaryOperator;)V
-53 -1: java/util/concurrent/ConcurrentHashMap$KeySpliterator
-26 -1: setURLStreamHandlerFactory
-47 -1: access print all checkPermission results
-22 -1: sun/reflect/MethodInfo
-75 -1: (Ljava/lang/String;ZLjava/util/Set<Ljava/lang/String;>;)Lsun/misc/Resource;
-6 -1: KOI8-R
-14 -1: Character.java
-5 -1: (SS)I
-8 -1: unshared
-73 -1: (Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;
-19 -1: replacementTreeNode
-10 -1: BA_REGULAR
-8 -1: UTF-16LE
-44 -1: (Ljava/lang/Class<*>;[Ljava/lang/Class<*>;)V
-22 -1: InputStreamReader.java
-17 -1: getInvocationType
-23 -1: getDeclaredConstructors
-48 -1: [Lsun/reflect/generics/tree/FormalTypeParameter;
-67 -1: (Ljava/util/Comparator;Ljava/util/Map$Entry;Ljava/util/Map$Entry;)I
-6 -1: koi8_r
-14 -1: ofTotalSeconds
-16 -1: content-encoding
-6 -1: koi8_u
-10 -1: getEncoded
-6 -1: ()[TT;
-43 -1: ([ILjava/util/function/IntUnaryOperator;I)V
-18 -1: getSecurityContext
-13 -1: LF_GEN_LINKER
-78 -1: (BLjava/lang/invoke/MemberName;Ljava/lang/Class;)Ljava/lang/invoke/MemberName;
-49 -1: (Ljava/util/HashMap;[Ljava/util/HashMap$Node;II)V
-19 -1: LinkedEntryIterator
-23 -1: Warning: JIT compiler "
-7 -1: static
-100 -1: (Ljava/lang/Class;ZLjava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Class;)Ljava/util/List;
-79 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<+TT;>;)Ljava/util/Collection<TT;>;
-10 -1: iso-ir-100
-10 -1: iso-ir-101
-13 -1: toUpperString
-31 -1: ()Ljava/util/Spliterator$OfInt;
-43 -1: Ljava/lang/StringIndexOutOfBoundsException;
-19 -1: Lsun/misc/JarIndex;
-7 -1: Version
-90 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/ProtectionDomain;)Ljava/lang/Class;
-10 -1: getHandler
-45 -1: (ILjava/lang/Object;)Ljava/lang/StringBuffer;
-28 -1: getDeclaredAnnotationsByType
-46 -1: ([Ljava/lang/Class;Ljava/lang/StringBuilder;)V
-53 -1: ()Ljava/util/Enumeration<Ljava/security/Permission;>;
-15 -1: addAllNonStatic
-10 -1: iso-ir-110
-14 -1: Using VM:
-17 -1: casReflectionData
-26 -1: (Lsun/util/PreHashedMap;)I
-24 -1: removeByNameAndSignature
-4 -1: OS X
-85 -1: (Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/ClassLoader;Ljava/lang/String;)Z
-16 -1: JarEntryIterator
-38 -1: Ljava/lang/Class<Ljava/lang/Integer;>;
-37 -1: Ljava/lang/Class<Ljava/lang/Double;>;
-28 -1: ([Ljava/util/HashMap$Node;)V
-34 -1: java/lang/reflect/GenericArrayType
-14 -1: annotationData
-26 -1: (Lsun/util/PreHashedMap;)V
-22 -1: checkPackageDefinition
-30 -1: ACCUMULATED_DAYS_IN_MONTH_LEAP
-12 -1: lowestOneBit
-64 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;Ljava/lang/ThreadLocal;)V
-16 -1: asReadOnlyBuffer
-11 -1: getRealName
-17 -1: StringCoding.java
-10 -1: iso-ir-126
-11 -1: isSurrogate
-8 -1: setError
-138 -1: <T:Ljava/lang/Object;U:Ljava/lang/Object;>(Ljava/util/function/Function<-TT;+TU;>;Ljava/util/Comparator<-TU;>;)Ljava/util/Comparator<TT;>;
-8 -1: (TK;)TK;
-4 -1: java
-136 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)TT;
-36 -1: ()Lsun/util/locale/LocaleExtensions;
-12 -1: doubleStream
-28 -1: ()Ljava/util/SimpleTimeZone;
-7 -1: :@&=+$,
-94 -1: Ljava/lang/ThreadLocal<Ljava/lang/ref/SoftReference<Ljava/lang/StringCoding$StringDecoder;>;>;
-64 -1: (Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
-19 -1: getSystemTimeZoneID
-18 -1: ReentrantLock.java
-8 -1: emptyMap
-16 -1: getSavedProperty
-249 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceEntriesToDoubleTask;Ljava/util/function/ToDoubleFunction;DLjava/util/function/DoubleBinaryOperator;)V
-14 -1: KeySpliterator
-13 -1: findResources
-14 -1: forWrapperType
-8 -1: floorMod
-12 -1: isoCountries
-10 -1: CheckedSet
-21 -1: AbstractCalendar.java
-12 -1: IS_INVOCABLE
-45 -1: (Ljava/lang/Class;)Lsun/reflect/ConstantPool;
-19 -1: checkSecurityAccess
-13 -1: Invalid index
-28 -1: STACK_TRACE_ELEMENT_SENTINEL
-88 -1: (ILjava/lang/Object;Ljava/lang/Object;)Ljava/util/concurrent/ConcurrentHashMap$TreeNode;
-130 -1: (Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
-14 -1: aliases_IBM437
-10 -1: iso-ir-144
-10 -1: iso-ir-148
-35 -1: ()Ljava/nio/charset/CharsetDecoder;
-95 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-16 -1: UnmodifiableList
-40 -1: ()Ljava/util/concurrent/locks/Condition;
-9 -1: Path.java
-80 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/Class;[Ljava/lang/Class;)Ljava/util/Map;
-36 -1: Ljava/lang/Class<Ljava/lang/Float;>;
-124 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;)Ljava/lang/Object;
-20 -1: privateGetParameters
-24 -1: sun/nio/cs/StreamDecoder
-12 -1: getFreeSpace
-8 -1: US-ASCII
-22 -1: negativeZeroDoubleBits
-9 -1: putObject
-13 -1: linkToVirtual
-35 -1: Ljava/lang/Class<Ljava/lang/Long;>;
-15 -1: detectedCharset
-26 -1: java/lang/reflect/Modifier
-22 -1: JAVAFX_LAUNCH_MODE_JAR
-32 -1: java/net/URLStreamHandlerFactory
-7 -1: IBM-923
-80 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/String;
-13 -1: TRANSFERINDEX
-34 -1: (Lsun/nio/cs/StandardCharsets$1;)V
-23 -1: ()Ljava/io/InputStream;
-16 -1: ()Ljava/io/File;
-41 -1: (Ljava/lang/String;)Ljava/nio/ByteBuffer;
-22 -1: sun/reflect/Reflection
-23 -1: java/lang/AutoCloseable
-25 -1: BootstrapMethodError.java
-19 -1: EnclosingMethodInfo
-13 -1: transferIndex
-18 -1: java/lang/Compiler
-4 -1: zero
-29 -1: java/util/Arrays$NaturalOrder
-9 -1: language=
-37 -1: Ljava/util/ArrayList<Ljava/net/URL;>;
-73 -1: ()Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;
-16 -1: balanceInsertion
-82 -1: (Ljava/lang/StringBuffer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
-11 -1: asIntBuffer
-27 -1: (Ljava/util/LinkedList;II)V
-13 -1: ofEpochSecond
-19 -1: sunjce_provider.jar
-21 -1: (F)Ljava/lang/String;
-32 -1: >> does not contain binding <<
-21 -1: declaredPublicMethods
-5 -1: FIELD
-17 -1: getPrimitiveClass
-127 -1: (Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl;Ljava/lang/Class;Ljava/lang/String;)V
-21 -1: replaceParameterTypes
-73 -1: Ljava/util/Map<Ljava/lang/Class<*>;Ljava/security/PermissionCollection;>;
-21 -1: (Ljava/lang/Double;)I
-5 -1: floor
-4 -1: halt
-14 -1: newConstructor
-48 -1: (Ljava/util/function/BiFunction<-TK;-TV;+TV;>;)V
-17 -1: packageAccessLock
-15 -1: America/Phoenix
-19 -1: Incoming arguments:
-11 -1: V_Monotonic
-14 -1: decrementExact
-15 -1: updatePositions
-14 -1: toLocaleString
-12 -1: appendEscape
-7 -1: DISPLAY
-27 -1: sun/nio/cs/US_ASCII$Decoder
-13 -1: LITTLE_ENDIAN
-6 -1: isNull
-13 -1: TempDirectory
-6 -1: LM_JAR
-39 -1: JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
-10 -1: isCompiled
-36 -1: (Ljava/lang/AbstractStringBuilder;)Z
-3 -1: run
-17 -1: START_PUNCTUATION
-33 -1: Ljava/util/Stack<Ljava/net/URL;>;
-49 -1: (Ljava/lang/String;)Ljava/lang/invoke/LambdaForm;
-28 -1: java/security/DomainCombiner
-53 -1: (Ljava/lang/String;Ljava/util/Map;)Ljava/time/ZoneId;
-81 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/Class;)[Ljava/lang/reflect/AnnotatedType;
-43 -1: java/lang/management/GarbageCollectorMXBean
-11 -1: toTitleCase
-12 -1: getHoldCount
-4 -1: ()[B
-4 -1: ()[C
-4 -1: ()[J
-20 -1: (Ljava/io/File;IZZ)Z
-18 -1: fileTimeToUnixTime
-23 -1: java/nio/HeapCharBuffer
-30 -1: Ljava/lang/ref/ReferenceQueue;
-6 -1: rt.jar
-69 -1: (Ljava/util/function/ToIntFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-21 -1: java/lang/ThreadLocal
-25 -1: Ljava/lang/reflect/Field;
-44 -1: (Ljava/lang/String;Ljava/lang/Throwable;ZZ)V
-93 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/MethodHandle;
-22 -1: getDayOfWeekDateBefore
-37 -1: [Lsun/reflect/generics/tree/TypeTree;
-83 -1: <E:Ljava/lang/Object;>(Ljava/util/Map<TE;Ljava/lang/Boolean;>;)Ljava/util/Set<TE;>;
-10 -1: readFields
-42 -1: (Ljava/net/URL;)Ljava/security/CodeSource;
-44 -1: (Ljava/lang/String;IIJ)Ljava/nio/ByteBuffer;
-27 -1: Ljava/util/Collection<TE;>;
-13 -1: checkResource
-7 -1: rename0
-51 -1: (C)Ljava/lang/invoke/BoundMethodHandle$SpeciesData;
-47 -1: sun/reflect/generics/repository/FieldRepository
-11 -1: readBoolean
-134 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$TreeNode;)V
-13 -1: getZoneOffset
-17 -1: getJdkVersionInfo
-21 -1: sun/misc/MessageUtils
-23 -1: defaultAllowArraySyntax
-31 -1: java/util/concurrent/locks/Lock
-24 -1: java/lang/reflect/Method
-7 -1: toUpper
-17 -1: sun/misc/Signal$1
-51 -1: (JLjava/util/function/BiFunction<-TK;-TK;+TK;>;)TK;
-28 -1: (Ljava/lang/ref/Reference;)Z
-8 -1: nthreads
-26 -1: MapReduceEntriesToLongTask
-27 -1: (Ljava/util/NavigableSet;)V
-10 -1: savedProps
-25 -1: Lsun/security/util/Debug;
-12 -1: CR_MALFORMED
-13 -1: com.sun.proxy
-17 -1: CharSequence.java
-24 -1: (ILjava/lang/String;II)Z
-13 -1: findNextValue
-108 -1: <K::Ljava/lang/Comparable<-TK;>;V:Ljava/lang/Object;>()Ljava/util/Comparator<Ljava/util/Map$Entry<TK;TV;>;>;
-5 -1: (FF)F
-9 -1: typeClass
-5 -1: (FF)I
-11 -1: segmentMask
-7 -1: (JJJJ)V
-14 -1: aliases_CESU_8
-85 -1: (Ljava/lang/Class;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;
-15 -1: getCalendarDate
-21 -1: getDeclaredAnnotation
-8 -1: ([BIIB)I
-15 -1: stripExtensions
-14 -1: getISO3Country
-5 -1: short
-47 -1: String value %s exceeds range of unsigned long.
-34 -1: ()Ljava/security/ProtectionDomain;
-8 -1: ([BIIB)V
-23 -1: (Ljava/lang/Object;ID)V
-47 -1: (Ljava/lang/String;Ljava/nio/charset/Charset;)V
-29 -1: RuntimeVisibleTypeAnnotations
-24 -1: (Ljava/io/InputStream;)V
-39 -1: (Ljava/lang/Class;Ljava/lang/String;Z)V
-16 -1: convertPrimitive
-8 -1: (TK;)TV;
-24 -1: (Ljava/io/InputStream;)Z
-6 -1: start
-243 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceEntriesToLongTask;Ljava/util/function/ToLongFunction;JLjava/util/function/LongBinaryOperator;)V
-9 -1: asSpecial
-20 -1: java/text/Normalizer
-17 -1: DAYS_0000_TO_1970
-9 -1: toCharset
-20 -1: REPLACEALL_THRESHOLD
-20 -1: sun/net/util/URLUtil
-16 -1: findLoadedClass0
-14 -1: localedata.jar
-6 -1: Parser
-6 -1: start0
-4 -1: hash
-83 -1: (Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-29 -1: Ljava/lang/invoke/MemberName;
-8 -1: BOOT_TAG
-22 -1: MH_LINKER_ARG_APPENDED
-14 -1: comparingByKey
-47 -1: ([Ljava/lang/String;)Ljava/lang/ProcessBuilder;
-6 -1: start=
-18 -1: StringBuilder.java
-7 -1: getLong
-12 -1: copyElements
-16 -1: highResFrequency
-11 -1: toGMTString
-10 -1: ISO_8859_1
-10 -1: ISO_8859_2
-6 -1: result
-10 -1: ISO_8859_4
-10 -1: ISO_8859_5
-10 -1: ISO_8859_7
-15 -1: unmodifiableSet
-10 -1: ISO_8859_9
-25 -1: NoClassDefFoundError.java
-42 -1: (Ljava/lang/String;)Ljava/util/LinkedList;
-14 -1: parallelPrefix
-22 -1: ARRAY_LONG_INDEX_SCALE
-6 -1: resume
-36 -1: Ljava/lang/invoke/LambdaForm$Hidden;
-50 -1: java/util/Collections$UnmodifiableRandomAccessList
-130 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/Consumer;)V
-6 -1: getInt
-13 -1: getCachedYear
-21 -1: CONNECTOR_PUNCTUATION
-73 -1: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Object;ILjava/lang/Class;)V
-24 -1: [Lsun/util/calendar/Era;
-22 -1: (Ljava/lang/Object;D)V
-74 -1: (Ljava/security/AccessControlContext;)Ljava/security/AccessControlContext;
-109 -1: <T:Ljava/lang/Object;>(Ljava/lang/Class<*>;Ljava/lang/Class$AnnotationData;Ljava/lang/Class$AnnotationData;)Z
-6 -1: ([CZ)V
-74 -1: (Ljava/util/HashMap$Node;Ljava/util/HashMap$Node;)Ljava/util/HashMap$Node;
-19 -1: TRADITIONAL_CHINESE
-125 -1: (Ljava/lang/Throwable$PrintStreamOrWriter;[Ljava/lang/StackTraceElement;Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;)V
-18 -1: unknown protocol:
-57 -1: (Ljava/lang/reflect/Method;Lsun/reflect/MethodAccessor;)V
-13 -1: writeComments
-9 -1: Negotiate
-14 -1: Closeable.java
-10 -1: asSpreader
-122 -1: (Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind;[Ljava/nio/file/WatchEvent$Modifier;)Ljava/nio/file/WatchKey;
-17 -1: jvm_minor_version
-9 -1: getDouble
-25 -1: Ljava/io/File$PathStatus;
-19 -1: averageCharsPerByte
-22 -1: getConstructorAccessor
-61 -1: (Ljava/lang/String;)Ljava/lang/management/MemoryManagerMBean;
-45 -1: (Ljava/lang/String;)Ljava/util/regex/Pattern;
-25 -1: (JC)Ljava/nio/ByteBuffer;
-20 -1: exclusiveOwnerThread
-85 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue<TT;>;Ljava/lang/ClassValue$Entry<TT;>;)V
-17 -1: getExtensionValue
-14 -1: getLoadAverage
-17 -1: GET_PD_PERMISSION
-6 -1: METHOD
-23 -1: sun/nio/cs/ISO_8859_1$1
-23 -1: (I[Ljava/lang/Object;)I
-4 1: zzz1
-13 -1: createWrapper
-4 1: zzz2
-4 1: zzz3
-33 -1: greater than Character.MAX_RADIX
-37 -1: DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
-6 -1: BRIDGE
-20 -1: canonicalizeLanguage
-13 -1: setPermission
-46 -1: (Ljava/io/OutputStream;)Ljava/io/OutputStream;
-3 -1: 646
-14 -1: java/lang/Long
-55 -1: java/util/concurrent/ConcurrentHashMap$SearchValuesTask
-38 -1: (IC)Ljava/lang/invoke/LambdaForm$Name;
-37 -1: (Ljava/lang/Class;)Ljava/lang/String;
-17 -1: javaUtilJarAccess
-23 -1: registerMethodsToFilter
-34 -1: (Ljava/nio/charset/Charset;[CII)[B
-11 -1: % VERSION 2
-37 -1: ([DI)Ljava/util/Spliterator$OfDouble;
-16 -1: Stack Size:
-52 -1: (Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
-17 -1: putDoubleVolatile
-10 -1: access$500
-10 -1: access$502
-28 -1: malformed input around byte
-13 -1: LF_INVSPECIAL
-32 -1: Non-positive averageCharsPerByte
-14 -1: NF_fieldOffset
-10 -1: access$508
-48 -1: <T:Ljava/lang/Object;>(TT;)Ljava/util/List<TT;>;
-17 -1: defaultReadObject
-17 -1: java/util/TimSort
-13 -1: resolveClass0
-92 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;[Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-20 -1: setLangReflectAccess
-30 -1: java/lang/reflect/TypeVariable
-56 -1: <T:Ljava/lang/Object;>([TT;)Ljava/util/Spliterator<TT;>;
-8 -1: VOLATILE
-10 -1: Big5-HKSCS
-23 -1: (Ljava/util/Locale$1;)V
-15 -1: ISO_8859-1:1987
-14 -1: no such method
-10 -1: null value
-8 -1: checkURL
-22 -1: ARRAY_BYTE_INDEX_SCALE
-27 -1: (Ljava/lang/ClassLoader;Z)V
-22 -1: java/lang/reflect/Type
-25 -1: java/net/JarURLConnection
-36 -1: java/util/WeakHashMap$KeySpliterator
-26 -1: ()Lsun/misc/JavaAWTAccess;
-50 -1: (I[Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-9 -1: toDegrees
-12 -1: lowSurrogate
-19 -1: getEnclosingMethod0
-7 -1: bytearr
-35 -1: (Ljava/util/List;Ljava/util/List;)I
-25 -1: [Ljava/lang/reflect/Type;
-34 -1: javaSecurityProtectionDomainAccess
-21 -1: java.launcher.X.usage
-37 -1: sun/util/locale/InternalLocaleBuilder
-33 -1: ()Ljava/lang/invoke/MethodHandle;
-3 -1: scl
-19 -1: synthesizeAllParams
-68 -1: Ljava/util/Map<Ljava/lang/String;[Ljava/security/cert/Certificate;>;
-6 -1: vclass
-35 -1: (Ljava/util/List;Ljava/util/List;)V
-59 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Float;>;
-13 -1: CallSite.java
-10 1: Bar loaded
-21 -1: ARRAY_INT_BASE_OFFSET
-49 -1: Ljava/util/concurrent/ConcurrentHashMap$TreeNode;
-32 -1: [Ljava/lang/reflect/Constructor;
-4 -1: type
-34 -1: <T:Ljava/lang/Object;>([TT;II)[TT;
-25 -1: BufferedOutputStream.java
-23 -1: java/util/zip/ZipFile$1
-24 -1: ()Ljava/lang/ClassValue;
-50 -1: (Ljava/util/concurrent/CountedCompleter;[F[FIIII)V
-16 -1: getQueuedThreads
-26 -1: getJavaNetHttpCookieAccess
-8 -1: setExtra
-8 -1: implRead
-20 -1: linkMethod => throw
-76 -1: (Ljava/util/function/ToDoubleFunction;Ljava/lang/Object;Ljava/lang/Object;)I
-11 -1: KeyIterator
-39 -1: Ljava/util/List<Ljava/lang/Throwable;>;
-3 -1: " "
-36 -1: Ljava/lang/IllegalArgumentException;
-11 -1: checkBounds
-30 -1: sun/nio/cs/FastCharsetProvider
-11 -1: toLongArray
-107 -1: (Ljava/lang/Class<*>;Ljava/lang/String;Ljava/lang/Class<*>;IILjava/lang/String;[B)Ljava/lang/reflect/Field;
-8 -1: (build
-39 -1: (Ljava/nio/Buffer;ILjava/nio/Buffer;I)V
-31 -1: [Ljava/lang/reflect/Executable;
-3 -1: set
-21 -1: PhantomReference.java
-41 -1: java/util/Collections$CheckedNavigableMap
-53 -1: Can not make a java.lang.Class constructor accessible
-12 -1: ([CII[CIII)I
-55 -1: Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/Void;>;
-12 -1: MICROSECONDS
-11 -1: writeBuffer
-52 -1: and domain that didn't have permission
-37 -1: java/nio/channels/WritableByteChannel
-26 -1: getRawClassTypeAnnotations
-15 -1: putCharVolatile
-33 -1: java/security/InvalidKeyException
-19 -1: Ljava/io/Closeable;
-83 -1: Lsun/util/locale/LocaleObjectCache<Ljava/util/Locale$LocaleKey;Ljava/util/Locale;>;
-10 -1: SetFromMap
-24 -1: JavaFX-Application-Class
-13 -1: asShortBuffer
-10 -1: getReifier
-15 -1: isPositionIndex
-18 -1: SignalHandler.java
-3 -1: JST
-28 -1: (Ljava/io/FileDescriptor;I)I
-28 -1: getStackAccessControlContext
-16 -1: updateByteBuffer
-27 -1: ()Ljava/net/ContentHandler;
-25 -1: (JD)Ljava/nio/ByteBuffer;
-39 -1: ()Lsun/misc/JavaIOFileDescriptorAccess;
-107 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;Ljava/lang/ThreadLocal;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-42 -1: sun/misc/PerfCounter$WindowsClientCounters
-8 -1: addExact
-28 -1: (Ljava/io/FileDescriptor;I)V
-36 -1: ([Ljava/lang/String;)Ljava/util/Map;
-21 -1: ()Ljava/lang/Process;
-4 -1: UTF8
-5 -1: mkdir
-10 -1: transient
-3 -1: sgp
-15 -1: balanceDeletion
-161 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/net/URL;)Ljava/lang/Package;
-15 -1: SynchronizedMap
-40 -1: sun.misc.URLClassPath.disableJarChecking
-92 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractSet<TE;>;Ljava/util/Set<TE;>;Ljava/io/Serializable;
-17 -1: removeEldestEntry
-35 -1: (I)Ljava/lang/Class$AnnotationData;
-24 -1: Ljava/util/Locale$Cache;
-13 -1: STANDARD_TIME
-17 -1: sun/nio/cs/MS1252
-99 -1: <K:Ljava/lang/Object;>()Ljava/util/concurrent/ConcurrentHashMap$KeySetView<TK;Ljava/lang/Boolean;>;
-23 -1: java/util/LinkedHashSet
-9 -1: iso8859_1
-9 -1: iso8859_2
-9 -1: iso8859_4
-66 -1: <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)[TA;
-9 -1: iso8859_5
-9 -1: iso8859_7
-9 -1: iso8859_9
-21 -1: Ljava/util/Formatter;
-6 -1: isPath
-21 -1: makeReferenceIdentity
-24 -1: sun/net/ApplicationProxy
-23 -1: ClassCastException.java
-11 -1: MethodArray
-12 -1: SingletonMap
-41 -1: java/util/ArrayPrefixHelpers$CumulateTask
-7 -1: seconds
-20 -1: ClassRepository.java
-14 -1: allocateMemory
-24 -1: java.launcher.jar.error1
-24 -1: java.launcher.jar.error2
-24 -1: java.launcher.jar.error3
-45 -1: (Ljava/lang/String;Ljava/util/jar/Manifest;)Z
-3 -1: sin
-7 -1: (J[II)I
-3 -1: Itr
-18 -1: findBootstrapClass
-10 -1: getElement
-15 -1: ISO_8859-4:1988
-34 -1: newGetLongIllegalArgumentException
-7 -1: pending
-17 -1: isNotContinuation
-6 -1: EXTSIG
-13 -1: searchMethods
-32 -1: Lsun/misc/JavaUtilZipFileAccess;
-33 -1: ([Ljava/lang/reflect/Parameter;)V
-31 -1: defaultUncaughtExceptionHandler
-89 -1: (Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind<*>;)Ljava/nio/file/WatchKey;
-5 -1: ASCII
-28 -1: ()Lsun/reflect/ConstantPool;
-20 -1: isJavaIdentifierPart
-6 -1: EXTSIZ
-34 -1: Lsun/misc/JavaNetHttpCookieAccess;
-34 -1: ClassLoader object not initialized
-7 -1: CHECKED
-16 -1: encodeBufferLoop
-37 -1: (Ljava/time/Instant;)Ljava/util/Date;
-24 -1: (Ljava/util/Map$Entry;)Z
-50 -1: java/util/concurrent/ConcurrentHashMap$KeyIterator
-31 -1: ()[Ljava/lang/ClassValue$Entry;
-31 -1: java/lang/IllegalStateException
-43 -1: (Ljava/lang/Appendable;Ljava/util/Locale;)V
-6 -1: CENVEM
-53 -1: Ljava/util/ArrayList<Lsun/misc/URLClassPath$Loader;>;
-17 -1: getHeaderFieldKey
-71 -1: (Ljava/lang/CharSequence;Ljava/text/Normalizer$Form;)Ljava/lang/String;
-6 -1: CENVER
-17 -1: cleanStaleEntries
-9 -1: linkFirst
-57 -1: (Ljava/util/Comparator<-TT;>;)Ljava/util/Comparator<TT;>;
-8 -1: val$file
-27 -1: Invalid parameter modifiers
-6 -1: append
-57 -1: ()Lsun/reflect/generics/repository/ConstructorRepository;
-65 -1: java/util/concurrent/ConcurrentHashMap$MapReduceMappingsToIntTask
-39 -1: (Ljava/lang/String;)Ljava/lang/Integer;
-25 -1: lambda$parallelSetAll$191
-25 -1: lambda$parallelSetAll$192
-25 -1: lambda$parallelSetAll$193
-23 -1: INSERTIONSORT_THRESHOLD
-17 -1: java/time/Instant
-25 -1: lambda$parallelSetAll$194
-14 -1: dynamicInvoker
-9 -1: iso646-us
-8 -1: position
-29 -1: java/nio/channels/FileChannel
-27 -1: java/util/stream/Collectors
-64 -1: (Ljava/lang/CharSequence;Ljava/lang/Iterable;)Ljava/lang/String;
-10 -1: INDEX_NAME
-15 -1: getCommentBytes
-67 -1: (Ljava/io/FileOutputStream;Ljava/lang/String;)Ljava/io/PrintStream;
-22 -1: privateGetPublicFields
-32 -1: java/util/BitSet$1BitSetIterator
-12 -1: PERF_MODE_RO
-89 -1: ([Ljava/lang/ClassValue$Entry;ILjava/lang/ClassValue$Entry;Z)Ljava/lang/ClassValue$Entry;
-30 -1: java/security/PrivilegedAction
-18 -1: host can't be null
-26 -1: package name can't be null
-12 -1: PERF_MODE_RW
-10 -1: isEnqueued
-18 -1: argSlotToParameter
-37 -1: (II)Ljava/lang/AbstractStringBuilder;
-5 -1: tabAt
-53 -1: (Ljava/lang/Object;)Ljava/lang/AbstractStringBuilder;
-11 -1: PATH_OFFSET
-18 -1: unicodebigunmarked
-15 -1: ConditionObject
-6 -1: KOREAN
-13 -1: isNamePresent
-24 -1: ()Ljava/lang/Class<TE;>;
-14 -1: isStandardTime
-8 -1: ([IIII)I
-9 -1: WeakEntry
-12 -1: javaIOAccess
-17 -1: key can't be null
-129 -1: Ljava/lang/Object;Ljava/lang/Comparable<Ljava/nio/file/Path;>;Ljava/lang/Iterable<Ljava/nio/file/Path;>;Ljava/nio/file/Watchable;
-8 -1: handler
-8 -1: ([IIII)V
-10 -1: atBugLevel
-18 -1: makeGuardWithCatch
-18 -1: currentLoadedClass
-11 -1: getCodeBase
-67 -1: <T:Ljava/lang/Object;>(Ljava/util/List<+TT;>;)Ljava/util/List<TT;>;
-12 -1: JarFile.java
-19 -1: (C)Ljava/io/Writer;
-22 -1: createURLStreamHandler
-23 -1: sun/nio/cs/ArrayDecoder
-13 -1: setAccessible
-18 -1: stripOffParameters
-101 -1: ([Ljava/security/ProtectionDomain;[Ljava/security/ProtectionDomain;)[Ljava/security/ProtectionDomain;
-18 -1: Ljava/util/Random;
-16 -1: Pacific/Honolulu
-13 -1: useOldMapping
-65 -1: (Ljava/lang/invoke/LambdaForm$NamedFunction;[Ljava/lang/Object;)V
-14 -1: filterArgument
-12 -1: LF_MH_LINKER
-25 -1: isDirectMemoryPageAligned
-49 -1: (Ljava/util/BitSet;)Ljava/util/function/Supplier;
-54 -1: (Ljava/util/concurrent/ConcurrentHashMap<TK;TV;>;TV;)V
-16 -1: java/time/ZoneId
-4 -1: zfot
-18 -1: isSameClassPackage
-6 -1: julian
-8 -1: (TT;)TT;
-22 -1: java/util/jar/Manifest
-7 -1: charOut
-16 -1: getOffsetsByWall
-19 -1: Illegal replacement
-139 -1: <E:Ljava/lang/Object;>Ljava/util/AbstractList<TE;>;Ljava/util/List<TE;>;Ljava/util/RandomAccess;Ljava/lang/Cloneable;Ljava/io/Serializable;
-96 -1: <T:Ljava/lang/Object;>(Ljava/lang/reflect/Constructor<TT;>;)Ljava/lang/reflect/Constructor<TT;>;
-15 -1: Annotation.java
-24 -1: (Ljava/lang/Class<*>;)[B
-6 -1: CODING
-34 -1: ([Ljava/lang/ClassValue$Entry;II)V
-6 -1: IGNORE
-62 -1: (Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
-29 -1: specificToGenericStringHeader
-12 -1: helpTransfer
-8 -1: fastTime
-62 -1: (Ljava/net/URLConnection;[Ljava/lang/Class;)Ljava/lang/Object;
-18 -1: Unhandled signal:
-8 -1: isStrict
-15 -1: ISO_8859-7:1987
-13 -1: getWeekLength
-14 -1: jvmBuildNumber
-40 -1: (Ljava/lang/String;)Ljava/util/Iterator;
-6 -1: short0
-6 -1: short1
-73 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedExceptionAction<TT;>;)TT;
-10 -1: removeNode
-8 -1: setFloat
-18 -1: cspc862latinhebrew
-11 -1: setTimeZone
-34 -1: java/lang/reflect/AccessibleObject
-25 -1: MapReduceKeysToDoubleTask
-25 -1: java/lang/ref/Reference$1
-24 -1: java/nio/HeapByteBufferR
-15 -1: jdkMicroVersion
-117 -1: (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/Class;IILjava/lang/String;[B[B[B)V
-8 -1: (TT;)TV;
-16 -1: Permissions.java
-22 -1: Ljava/util/Comparator;
-17 -1: getDaylightSaving
-25 -1: ([BIILjava/lang/String;)V
-9 -1: stillborn
-11 -1: maxPosition
-28 -1: java/util/ArrayPrefixHelpers
-73 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/SortedMap<TK;TV;>;
-14 -1: useCanonCaches
-5 -1: clean
-16 -1: checkPermission2
-34 -1: sun.misc.launcher.useSharedArchive
-13 -1: shutdownHooks
-5 -1: clear
-240 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$MapReduceKeysToLongTask;Ljava/util/function/ToLongFunction;JLjava/util/function/LongBinaryOperator;)V
-67 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TV;+TU;>;)TU;
-6 -1: cp1250
-6 -1: cp1251
-6 -1: cp1252
-13 -1: getZipMessage
-6 -1: cp1253
-28 -1: (J)Ljava/lang/ref/Reference;
-6 -1: cp1254
-54 -1: (ILjava/lang/String;)Ljava/lang/AbstractStringBuilder;
-6 -1: cp1257
-10 -1: deepEquals
-17 -1: WRITE_BUFFER_SIZE
-13 -1: copyFromArray
-40 -1: java/util/Collections$ReverseComparator2
-36 -1: sun/reflect/generics/visitor/Reifier
-19 -1: averageBytesPerChar
-13 -1: javaAWTAccess
-6 -1: cp5346
-61 -1: Ljava/util/Map<Ljava/lang/String;Ljava/nio/charset/Charset;>;
-6 -1: cp5347
-6 -1: cp5348
-6 -1: cp5349
-5 -1: field
-23 -1: ()Ljava/nio/LongBuffer;
-103 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/WrongMethodTypeException;
-37 -1: (I)Ljava/lang/Character$UnicodeBlock;
-11 -1: offsetAfter
-79 -1: Ljava/util/HashMap<Ljava/security/CodeSource;Ljava/security/ProtectionDomain;>;
-27 -1: invocationHandlerReturnType
-17 -1: POSITIVE_INFINITY
-11 -1: maybeRebind
-3 -1: str
-18 -1: setSecurityManager
-9 -1: signature
-18 -1: corrupted jar file
-89 -1: <E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Collection<TE;>;Ljava/io/Serializable;
-87 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-6 -1: CENATT
-6 -1: cp5350
-12 -1: AF_GETSTATIC
-38 -1: (TE;Ljava/util/LinkedList$Node<TE;>;)V
-8 -1: isLoaded
-6 -1: CENATX
-6 -1: cp5353
-18 -1: Africa/Addis_Ababa
-35 -1: sun/usagetracker/UsageTrackerClient
-11 -1: toUpperCase
-22 -1: java/util/zip/Inflater
-10 -1: iso_8859-1
-10 -1: iso_8859-2
-3 -1: sum
-7 -1: x-Johab
-10 -1: iso_8859-4
-10 -1: iso_8859-5
-85 -1: (Ljava/security/DomainCombiner;Ljava/lang/Class;)Ljava/security/AccessControlContext;
-11 -1: activeCount
-49 -1: (Ljava/lang/ClassLoader;Ljava/lang/ClassLoader;)Z
-51 -1: (Ljava/util/List;Ljava/lang/Class;)Ljava/util/List;
-10 -1: iso_8859-7
-19 -1: appendVmErgoMessage
-10 -1: iso_8859-9
-14 -1: getClassLoader
-6 -1: (CJJ)Z
-15 -1: Lsun/misc/Perf;
-7 -1: getTree
-27 -1: Ljava/text/Normalizer$Form;
-11 -1: ISO-2022-JP
-69 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Object;)Ljava/lang/Object;
-50 -1: java/lang/invoke/DirectMethodHandle$StaticAccessor
-15 -1: fxLauncherClass
-35 -1: (Ljava/net/URL;Ljava/lang/String;)V
-16 -1: getAndAccumulate
-35 -1: (Ljava/net/URL;Ljava/lang/String;)Z
-32 -1: Non-positive averageBytesPerChar
-35 -1: Ljava/lang/Class<Ljava/lang/Void;>;
-15 -1: CLASS_MODIFIERS
-12 -1: checkedQueue
-13 -1: enumConstants
-10 -1: getFactory
-95 -1: Ljava/util/concurrent/ConcurrentMap<TK;Lsun/util/locale/LocaleObjectCache$CacheEntry<TK;TV;>;>;
-13 -1: Africa/Harare
-57 -1: (JLjava/util/TimeZone;)Lsun/util/calendar/Gregorian$Date;
-11 -1: ISO-2022-KR
-19 -1: $assertionsDisabled
-13 -1: PROXY_PACKAGE
-17 -1: copyFromLongArray
-81 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/LinkedHashMap$Entry<TK;TV;>;
-11 -1: checkDelete
-38 -1: sun/management/ManagementFactoryHelper
-7 -1: UTC1900
-20 -1: getBootstrapResource
-23 -1: ()Ljava/lang/Throwable;
-16 -1: CALLER_SENSITIVE
-26 -1: checkSystemClipboardAccess
-32 -1: Can't set default locale to NULL
-16 -1: fxLauncherMethod
-4 -1: >=
-8 -1: provider
-9 -1: Finalizer
-78 -1: (Ljava/io/FileDescriptor;ZZZLjava/lang/Object;)Ljava/nio/channels/FileChannel;
-13 -1: emptyIterator
-15 -1: getZipFileCount
-21 -1: isJavaIdentifierStart
-9 -1: connected
-11 -1: (ITK;TV;I)V
-16 -1: America/Honolulu
-22 -1: SynchronizedCollection
-28 -1: java/util/zip/ZipConstants64
-29 -1: inheritedAccessControlContext
-29 -1: ()[Ljava/security/CodeSigner;
-85 -1: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/sun/management/GcInfo;)V
-25 -1: (Ljava/nio/CharBuffer;Z)V
-15 -1: java/io/Console
-101 -1: (Ljava/lang/Class<*>;Lsun/reflect/annotation/AnnotationType;Lsun/reflect/annotation/AnnotationType;)Z
-9 -1: | resolve
-81 -1: (BLjava/lang/invoke/MemberName;Ljava/lang/Class<*>;)Ljava/lang/invoke/MemberName;
-33 -1: (Ljava/nio/charset/Charset;FF[B)V
-49 -1: (Ljava/lang/Class;Z)Ljava/lang/invoke/MethodType;
-66 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
-29 -1: ([Ljava/util/HashMap$Node;I)V
-13 -1: filterMethods
-4 -1: jcal
-61 -1: (Ljava/util/List<Ljava/lang/Class<*>;>;)[Ljava/lang/Class<*>;
-6 -1: which=
-46 -1: (Ljava/math/BigInteger;)Ljava/math/BigInteger;
-4 -1: date
-18 -1: internalMemberName
-6 -1: (JJI)Z
-30 -1: [Ljava/lang/invoke/LambdaForm;
-60 -1: <T:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;
-15 -1: ReservationNode
-42 -1: java/lang/ThreadLocal$ThreadLocalMap$Entry
-6 -1: setIn0
-4 -1: sort
-8 -1: ibm00858
-110 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;IILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;
-28 -1: Ljava/lang/ClassValue$Entry;
-22 -1: ensureExplicitCapacity
-6 -1: rotate
-14 -1: closeRequested
-30 -1: ([CII)Ljava/lang/StringBuffer;
-10 -1: LM_UNKNOWN
-15 -1: Comparable.java
-13 -1: getByteBuffer
-9 -1: getScheme
-15 -1: done with meta!
-17 -1: checkForTypeAlias
-7 -1: getKeys
-7 -1: SIG_DFL
-30 -1: Ljava/nio/charset/CoderResult;
-16 -1: returnTypesMatch
-19 -1: getClassAccessFlags
-18 -1: JavaNioAccess.java
-9 -1: setDouble
-23 -1: Ljava/util/zip/ZipFile;
-83 -1: (JLjava/util/function/ToIntFunction<-TK;>;ILjava/util/function/IntBinaryOperator;)I
-11 -1: ACCESS_READ
-15 -1: nativeByteOrder
-5 -1: hours
-7 -1: toArray
-7 -1: Encoder
-12 -1: resolveClass
-29 -1: (Ljava/io/FileDescriptor;JJ)V
-14 -1: redefinedCount
-8 -1: getTotal
-11 -1: iso_8859-13
-11 -1: iso_8859-15
-9 -1: expected
-18 -1: getDeclaredMethods
-11 -1: elementData
-6 -1: intern
-10 -1: countryKey
-6 -1: setInt
-39 -1: Could not create extension class loader
-24 -1: SELF_SUPPRESSION_MESSAGE
-14 -1: argToSlotTable
-42 -1: Ljava/util/HashMap<TE;Ljava/lang/Object;>;
-5 -1: \t\n\r\x0c
-4 -1: read
-12 -1: Objects.java
-7 -1: aliases
-29 -1: sun/reflect/LangReflectAccess
-6 -1: prefix
-15 -1: superInterfaces
-10 -1: getDoInput
-30 -1: java/nio/CharBufferSpliterator
-6 -1: KOI8_R
-12 -1: Asia/Kolkata
-6 -1: KOI8_U
-6 -1: LOCSIG
-15 -1: UA-Java-Version
-92 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/HashMap<TK;TV;>;Ljava/util/Map<TK;TV;>;
-14 -1: CertificateRep
-17 -1: getSystemResource
-85 -1: (JLjava/util/function/ToLongFunction<-TV;>;JLjava/util/function/LongBinaryOperator;)J
-27 -1: java/lang/reflect/Parameter
-5 -1: quote
-8 -1: not MH:
-46 -1: java/util/Collections$UnmodifiableCollection$1
-6 -1: putVal
-6 -1: LOCSIZ
-6 -1: Atomic
-3 -1: 737
-38 -1: java/lang/UnsupportedClassVersionError
-27 -1: ()Ljava/lang/StringBuilder;
-41 -1: sun/net/www/protocol/jar/JarURLConnection
-60 -1: (Ljava/lang/String;[Ljava/lang/Object;)Ljava/util/Formatter;
-59 -1: <T:Ljava/lang/Object;>(TT;TT;Ljava/util/Comparator<-TT;>;)I
-54 -1: java/util/concurrent/locks/AbstractOwnableSynchronizer
-7 -1: getHost
-36 -1: (F)Ljava/lang/AbstractStringBuilder;
-69 -1: <U:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;)Ljava/lang/Class<+TU;>;
-4 -1: Form
-103 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/SortedMap<TK;+TV;>;)Ljava/util/SortedMap<TK;TV;>;
-6 -1: spread
-8 -1: addHours
-13 -1: contentEquals
-47 -1: (Ljava/lang/String;Ljava/security/Permission;)V
-12 -1: newCondition
-23 -1: (Ljava/lang/Object;IZ)V
-26 -1: (Ljava/util/LinkedList;I)V
-13 -1: ConstantValue
-18 -1: URLConnection.java
-12 -1: Boolean.java
-75 -1: ([Ljava/net/URL;Ljava/lang/ClassLoader;Ljava/net/URLStreamHandlerFactory;)V
-21 -1: EMPTY_THROWABLE_ARRAY
-153 -1: (Ljava/util/Map<Ljava/lang/Class<*>;[Ljava/lang/String;>;Ljava/lang/Class<*>;[Ljava/lang/String;)Ljava/util/Map<Ljava/lang/Class<*>;[Ljava/lang/String;>;
-18 -1: getUnresolvedCerts
-13 -1: Negative time
-28 -1: java/util/WeakHashMap$KeySet
-8 -1: slashify
-16 -1: isOtherLowercase
-17 -1: putObjectVolatile
-5 -1: ERASE
-12 -1: filterFields
-40 -1: Ljava/lang/ReflectiveOperationException;
-12 -1: VM settings:
-57 -1: (ILjava/lang/Object;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-10 -1: access$600
-11 -1: ] return =>
-13 -1: user.timezone
-23 -1: USER_AGENT_JAVA_VERSION
-27 -1: (Ljava/util/HashMap$Node;)V
-19 -1: filterNTLMResponses
-28 -1: (Lsun/misc/VMNotification;)V
-37 -1: ()[[Ljava/lang/annotation/Annotation;
-45 -1: ()Lcom/sun/management/DiagnosticCommandMBean;
-3 -1: tan
-31 -1: getDirectlyAndIndirectlyPresent
-7 -1: prepend
-35 -1: (I)Lsun/util/calendar/CalendarDate;
-8 -1: val$dirs
-4 -1: test
-28 -1: Non-positive maxCharsPerByte
-83 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Map<TK;TV;>;
-12 -1: JAVA_VERSION
-24 -1: ([Ljava/lang/Thread;IZ)I
-70 -1: (Ljava/lang/invoke/LambdaForm$Name;)Ljava/lang/invoke/LambdaForm$Name;
-57 -1: <T:Ljava/lang/Object;>([TT;Ljava/util/Comparator<-TT;>;)V
-42 -1: (Ljava/lang/Class<*>;[I)Ljava/lang/Object;
-27 -1: java/lang/SecurityManager$1
-32 -1: java/security/SignatureException
-27 -1: java/lang/SecurityManager$2
-4 -1: .jar
-20 -1: parameterAnnotations
-31 -1: DIRECTIONALITY_BOUNDARY_NEUTRAL
-21 -1: hasClassPathAttribute
-17 -1: checkParentAccess
-35 -1: java/security/PermissionsEnumerator
-6 -1: FORMAT
-92 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<Ljava/util/Map$Entry<TK;TV;>;+TU;>;)TU;
-3 -1: 775
-11 -1: PROBE_LIMIT
-111 -1: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
-11 -1: AF_PUTFIELD
-22 -1: (Ljava/lang/Object;Z)V
-20 -1: getGenericReturnType
-9 -1: val$extcl
-13 -1: inClassLoader
-37 -1: sun.urlClassLoader.readClassBytesTime
-35 -1: (JLjava/util/function/BiConsumer;)V
-28 -1: getContentHandlerPkgPrefixes
-10 -1: getChannel
-78 -1: <T:Ljava/lang/Object;>(Ljava/util/List<+TT;>;TT;Ljava/util/Comparator<-TT;>;)I
-16 -1: parseMemberValue
-4 -1: regn
-47 -1: ([Ljava/lang/Object;III)Ljava/util/Spliterator;
-11 -1: but found
-6 -1: adjust
-11 -1: isLowerCase
-29 -1: sun/reflect/ReflectionFactory
-98 -1: <E:Ljava/lang/Object;>(Ljava/util/SortedSet<TE;>;Ljava/lang/Class<TE;>;)Ljava/util/SortedSet<TE;>;
-18 -1: [Ljava/lang/Error;
-5 -1: entry
-14 -1: refreshVersion
-8 -1: (IIIII)V
-22 -1: unmodifiableCollection
-6 -1: putAll
-22 -1: offsetByCodePointsImpl
-26 -1: (Ljava/lang/String;[BII)[C
-46 -1: (Ljava/net/URLClassLoader;Ljava/lang/String;)V
-4 -1: /LF=
-9 -1: Bits.java
-30 -1: [Ljava/util/WeakHashMap$Entry;
-19 -1: getLastModifiedTime
-44 -1: [Ljava/lang/Thread$UncaughtExceptionHandler;
-11 -1: getZoneInfo
-6 -1: lookup
-19 -1: MapReduceValuesTask
-18 -1: isVarargsCollector
-38 -1: java/util/jar/JarFile$JarEntryIterator
-11 -1: getJarIndex
-9 -1: getByName
-42 -1: (Ljava/lang/Object;JLjava/lang/Object;JJ)V
-71 -1: (Ljava/lang/invoke/LambdaForm$Name;I)Ljava/lang/invoke/LambdaForm$Name;
-30 -1: java/net/ContentHandlerFactory
-54 -1: (Ljava/lang/Class<*>;I)Ljava/lang/invoke/MethodHandle;
-12 -1: getSignature
-9 -1: parseLong
-25 -1: DEBUG_METHOD_HANDLE_NAMES
-15 -1: runFinalization
-13 -1: 0000000000000
-28 -1: ()[Ljava/lang/reflect/Field;
-37 -1: ([Ljava/lang/ClassValue$Entry<*>;II)V
-13 -1: gcInfoBuilder
-64 -1: (JLjava/util/function/BiFunction;Ljava/util/function/Consumer;)V
-5 -1: cnfe1
-8 -1: setShort
-28 -1: (C)Ljava/lang/StringBuilder;
-44 -1: (Ljava/nio/LongBuffer;)Ljava/nio/LongBuffer;
-70 -1: (Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class<*>;
-33 -1: java/lang/TypeNotPresentException
-5 -1: \n
-20 -1: acquireInterruptibly
-21 -1: (I)Ljava/lang/String;
-24 -1: (Ljava/io/PrintWriter;)V
-16 -1: convertArguments
-32 -1: Ljava/net/MalformedURLException;
-15 -1: linkToInterface
-39 -1: java/lang/Throwable$PrintStreamOrWriter
-10 -1: iso8859_13
-13 -1: hasPrimitives
-10 -1: iso8859_15
-145 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Class<*>;)Ljava/lang/invoke/CallSite;
-8 -1: equalPDs
-28 -1: (Ljava/io/FileDescriptor;J)V
-7 -1: newLine
-43 -1: (Ljava/lang/Class<*>;I)Ljava/lang/Class<*>;
-8 -1: addEntry
-30 -1: java/util/WeakHashMap$EntrySet
-14 -1: USE_OLDMAPPING
-39 -1: (Ljava/io/DataInput;)Ljava/lang/String;
-12 -1: LF_EX_LINKER
-27 -1: java/lang/invoke/MethodType
-23 -1: JavaSecurityAccess.java
-23 -1: isLocalOrAnonymousClass
-19 -1: Expanded arguments:
-18 -1: sun/nio/cs/Unicode
-40 -1: ()Ljava/nio/charset/spi/CharsetProvider;
-23 -1: ([BLjava/lang/String;)V
-7 -1: default
-13 -1: highestOneBit
-9 -1: isDefault
-28 -1: (IF)Ljava/lang/StringBuffer;
-31 -1: ()Ljava/util/ListIterator<TE;>;
-4 -1: base
-23 -1: newPermissionCollection
-7 -1: version
-15 -1: Permission.java
-41 -1: java/lang/invoke/LambdaForm$NamedFunction
-8 -1: isQueued
-24 -1: ([Ljava/lang/Class<*>;)I
-64 -1: java/util/concurrent/ConcurrentHashMap$MapReduceEntriesToIntTask
-16 -1: checkInitialized
-37 -1: java/lang/ClassLoader$ParallelLoaders
-5 -1: ([B)I
-23 -1: Lsun/misc/URLClassPath;
-9 -1: usr_paths
-10 -1: Queue.java
-43 -1: (Ljava/io/File;Ljava/nio/charset/Charset;)V
-64 -1: (Ljava/lang/invoke/MethodTypeForm;)Ljava/lang/invoke/MemberName;
-3 -1: tid
-23 -1: JarIndex-Version: 1.0\n\n
-33 -1: (I)Ljava/nio/charset/CoderResult;
-5 -1: ([B)V
-10 -1: isInstance
-25 -1: unmappableCharacterAction
-11 -1: queueLength
-5 -1: ([B)Z
-10 -1: freeMemory
-47 -1: java/util/ArrayPrefixHelpers$DoubleCumulateTask
-52 -1: (Ljava/util/Map;Ljava/lang/Class;Ljava/lang/Class;)V
-41 -1: Ljava/util/Collections$ReverseComparator;
-16 -1: copyToShortArray
-206 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>([Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;ILjava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)Z
-38 -1: sun/launcher/LauncherHelper$SizePrefix
-17 -1: ACCESS_PERMISSION
-17 -1: ReverseComparator
-30 -1: ()Ljava/lang/ClassValue$Entry;
-17 -1: AF_PUTSTATIC_INIT
-6 -1: (IIB)I
-19 -1: java/nio/file/Files
-35 -1: (Z)[Ljava/lang/reflect/Constructor;
-20 -1: INVALID_FIELD_OFFSET
-17 -1: initializeHeaders
-10 -1: management
-10 -1: targetType
-61 -1: (Ljava/util/SortedSet;Ljava/lang/Class;)Ljava/util/SortedSet;
-5 -1: ascii
-8 -1: validate
-78 -1: Ljava/util/concurrent/ConcurrentHashMap<Ljava/lang/String;Ljava/lang/Object;>;
-25 -1: sun/nio/cs/UTF_16$Decoder
-36 -1: sun/management/DiagnosticCommandImpl
-24 -1: unmodifiableNavigableMap
-18 -1: canonicalizeScript
-29 -1: Lsun/misc/JavaSecurityAccess;
-74 -1: ([JLjava/util/function/IntToLongFunction;)Ljava/util/function/IntConsumer;
-38 -1: DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
-11 -1: languageTag
-33 -1: java/lang/invoke/VolatileCallSite
-18 -1: setRequestProperty
-6 -1: 0x%02X
-20 -1: (Ljava/lang/Float;)I
-35 -1: (Ljava/nio/charset/CoderResult$1;)V
-24 -1: (Ljava/lang/Object;JJB)V
-21 -1: synchronizedSortedSet
-59 -1: (Ljava/util/function/ToLongFunction;)Ljava/util/Comparator;
-30 -1: av.length == arity: av.length=
-7 -1: $VALUES
-27 -1: RandomNumberGeneratorHolder
-3 -1: tlr
-43 -1: java/util/ArraysParallelSortHelpers$FJFloat
-28 -1: ()[Ljava/io/File$PathStatus;
-26 -1: invalid extra field length
-13 -1: getExtensions
-7 -1: PARAMS0
-7 -1: PARAMS1
-30 -1: [Ljava/lang/invoke/MemberName;
-7 -1: PARAMS2
-31 -1: java/lang/AbstractStringBuilder
-161 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/function/BiFunction;Ljava/util/function/Consumer;)V
-4 -1: repl
-19 -1: ()Ljava/lang/Class;
-24 -1: BufferedInputStream.java
-9 -1: sizeCache
-8 -1: READLINK
-9 -1: metaIndex
-18 -1: getLocalizedObject
-6 -1: filter
-58 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
-140 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
-24 -1: Ljava/util/HashMap$Node;
-35 -1: (Lsun/nio/cs/FastCharsetProvider;)V
-8 -1: dispatch
-19 -1: sun.stderr.encoding
-130 -1: (Ljava/util/List<Ljava/util/Locale$LanguageRange;>;Ljava/util/Collection<Ljava/lang/String;>;)Ljava/util/List<Ljava/lang/String;>;
-51 -1: Ljava/util/concurrent/ConcurrentHashMap$ValuesView;
-30 -1: sun.reflect.inflationThreshold
-20 -1: MutableCallSite.java
-26 -1: invokeWithArgumentsTracing
-7 -1: getters
-38 -1: ()[Ljava/lang/reflect/TypeVariable<*>;
-46 -1: ([DLjava/util/function/DoubleBinaryOperator;)V
-5 -1: klass
-13 -1: publicMethods
-37 -1: ()[Ljava/lang/reflect/Constructor<*>;
-126 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/MethodHandle;
-6 -1: FJLong
-20 -1: canBeStaticallyBound
-17 -1: getTimezoneOffset
-9 -1: ALL_TYPES
-3 -1: toV
-8 -1: packages
-15 -1: codePointBefore
-10 -1: getCountry
-13 -1: getDSTSavings
-100 -1: (Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/CharsetDecoder;)Lsun/nio/cs/StreamDecoder;
-50 -1: java/util/ArraysParallelSortHelpers$FJFloat$Sorter
-20 -1: hasNonVoidPrimitives
-7 -1: syncAll
-41 -1: domain dump all domains in context
-59 -1: Ljava/util/Hashtable<Ljava/lang/Integer;Lsun/misc/Signal;>;
-16 -1: ForEachEntryTask
-18 -1: vminfoIsConsistent
-26 -1: (ZLjava/util/Comparator;)V
-9 -1: Lock.java
-31 -1: Lsun/reflect/ReflectionFactory;
-8 -1: (I[BII)I
-23 -1: doesExtendFXApplication
-87 -1: java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
-11 -1: windows-31j
-28 -1: sun/misc/URLClassPath$Loader
-17 -1: getEntryAfterMiss
-47 -1: ([Ljava/lang/reflect/Field;Ljava/lang/String;)J
-44 -1: Ljava/util/List<Ljava/security/Permission;>;
-10 -1: openStream
-31 -1: Ljava/net/UnknownHostException;
-19 -1: bad reference kind
-29 -1: ()Ljava/nio/MappedByteBuffer;
-9 -1: H_UPALPHA
-37 -1: (Ljava/util/function/UnaryOperator;)V
-25 -1: FAKE_METHOD_HANDLE_INVOKE
-4 -1: peek
-25 -1: java/util/Hashtable$Entry
-18 -1: getMemberRefInfoAt
-37 -1: Ljava/util/WeakHashMap$Entry<TK;TV;>;
-14 -1: resolvedHandle
-27 -1: ()Ljava/util/Iterator<TV;>;
-61 -1: Ljava/util/Map<Ljava/lang/String;Ljava/lang/reflect/Method;>;
-6 -1: static
-50 -1: (Ljava/net/URLClassLoader;)Lsun/misc/URLClassPath;
-38 -1: (Ljava/lang/Class;)[Ljava/lang/Object;
-41 -1: (Ljava/util/SortedSet;Ljava/lang/Class;)V
-41 -1: java/lang/invoke/WrongMethodTypeException
-5 -1: group
-10 -1: readObject
-13 -1: getParentFile
-14 -1: daylightSaving
-15 -1: eagerValidation
-36 -1: (Ljava/io/File;)Lsun/misc/MetaIndex;
-18 -1: reduceEntriesToInt
-15 -1: INITIAL_ENTRIES
-18 -1: AtomicInteger.java
-7 -1: .length
-128 -1: Ljava/nio/Buffer;Ljava/lang/Comparable<Ljava/nio/CharBuffer;>;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/Readable;
-6 -1: asList
-21 -1: unmodifiableSortedSet
-22 -1: ([B)Ljava/util/BitSet;
-5 -1: check
-64 -1: (Ljava/util/jar/JarFile;Lsun/misc/MetaIndex;)Lsun/misc/JarIndex;
-35 -1: ()Ljava/nio/charset/CharsetEncoder;
-4 -1: oome
-25 -1: ()Lsun/misc/URLClassPath;
-27 -1: (Ljava/io/FilePermission;)V
-29 -1: IllegalArgumentException.java
-17 -1: jvmSpecialVersion
-21 -1: Ljava/util/ArrayList;
-13 -1: packagePrefix
-27 -1: (Ljava/io/FilePermission;)Z
-11 -1: canonicalID
-82 -1: Ljava/lang/Object;Ljava/util/Comparator<Ljava/lang/String;>;Ljava/io/Serializable;
-24 -1: java.launcher.opt.footer
-13 -1: NativeLibrary
-37 -1: (Ljava/lang/String;J)Ljava/lang/Long;
-16 -1: longBitsToDouble
-6 -1: getKey
-22 -1: (JLjava/lang/String;)V
-14 -1: ensureCapacity
-69 -1: (Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object;
-22 -1: java/lang/Thread$State
-50 -1: ()Ljava/util/Iterator<Ljava/nio/charset/Charset;>;
-4 -1: 7bit
-46 -1: (Ljava/lang/Class<+Ljava/lang/ClassLoader;>;)Z
-76 -1: (ILjava/util/List<Ljava/lang/Class<*>;>;)[Ljava/lang/invoke/LambdaForm$Name;
-3 -1: ttb
-12 -1: UTF_16LE_BOM
-9 -1: remainder
-40 -1: ()Lsun/reflect/generics/visitor/Reifier;
-22 -1: [Ljava/lang/Throwable;
-17 -1: EMPTY_ENUMERATION
-13 -1: erasedInvoker
-46 -1: Ljava/nio/charset/IllegalCharsetNameException;
-10 -1: UnicodeBig
-53 -1: ()Ljava/util/Map<Ljava/io/File;Lsun/misc/MetaIndex;>;
-12 -1: MAX_EXPONENT
-10 -1: Enumerator
-15 -1: charset decoder
-11 -1: AF_GETFIELD
-12 -1: | getInvoker
-74 -1: (Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;
-14 -1: toUnsignedLong
-46 -1: java/lang/invoke/MethodHandleNatives$Constants
-29 -1: java version "1.8.0-internal"
-21 -1: ([Ljava/lang/Class;)I
-16 -1: UPPERCASE_LETTER
-22 -1: newConstantPerfCounter
-6 -1: signum
-9 -1: getField0
-38 -1: java/nio/charset/CoderMalfunctionError
-21 -1: [Ljava/lang/Runnable;
-11 -1: putIfAbsent
-30 -1: java/util/Collections$EmptySet
-22 -1: (I)[Ljava/lang/String;
-34 -1: Ljava/security/SecurityPermission;
-49 -1: ([Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-190 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$ReduceEntriesTask;Ljava/util/function/BiFunction;)V
-22 -1: Not an annotation type
-34 -1: java/io/ObjectInputStream$GetField
-50 -1: (Lsun/reflect/FieldInfo;)Ljava/lang/reflect/Field;
-32 -1: Ljava/lang/NoSuchFieldException;
-70 -1: (Ljava/lang/invoke/MethodHandle;[Ljava/lang/Object;)Ljava/lang/Object;
-9 -1: mergeSort
-77 -1: (ITK;TV;Ljava/util/HashMap$Node<TK;TV;>;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-21 -1: sun/nio/cs/ISO_8859_1
-8 -1: DST_MASK
-21 -1: Ljava/lang/Throwable;
-108 -1: (Ljava/lang/ref/SoftReference<Ljava/lang/Class$ReflectionData<TT;>;>;I)Ljava/lang/Class$ReflectionData<TT;>;
-32 -1: java/util/Arrays$LegacyMergeSort
-59 -1: ()[Ljava/lang/reflect/TypeVariable<Ljava/lang/Class<TT;>;>;
-16 -1: parseUnsignedInt
-36 -1: ([D)Ljava/util/Spliterator$OfDouble;
-26 -1: SPECIFY_HANDLER_PERMISSION
-13 -1: primitiveType
-17 -1: threadStartFailed
-21 -1: (J)Ljava/lang/String;
-23 -1: setClassAssertionStatus
-28 -1: java/util/Hashtable$EntrySet
-28 -1: Non-positive maxBytesPerChar
-19 -1: getApplicationClass
-14 -1: SentinelHolder
-15 -1: staticFieldBase
-25 -1: setDefaultRequestProperty
-66 -1: java/util/concurrent/ConcurrentHashMap$ForEachTransformedValueTask
-8 -1: threadID
-9 -1: getFields
-15 -1: LineNumberTable
-38 -1: java/util/Collections$CheckedSortedSet
-14 -1: jdkBuildNumber
-6 -1: divide
-46 -1: (Ljava/io/BufferedWriter;Ljava/lang/String;Z)V
-20 -1: java/lang/Terminator
-92 -1: (Lsun/misc/URLClassPath$JarLoader;Ljava/lang/String;Ljava/net/URL;Ljava/util/jar/JarEntry;)V
-6 -1: force0
-10 -1: getThreads
-34 -1: java/util/IllformedLocaleException
-115 -1: (Ljava/lang/String;Lsun/reflect/generics/factory/GenericsFactory;)Lsun/reflect/generics/repository/FieldRepository;
-9 -1: testFlags
-11 -1: getLanguage
-36 -1: java/util/function/IntBinaryOperator
-12 -1: Suppressed:
-10 -1: isMandated
-23 -1: MethodAccessorImpl.java
-28 -1: (Ljava/util/zip/ZipEntry;)[B
-27 -1: Ljava/util/Hashtable$Entry;
-5 -1: table
-10 -1: Short.java
-19 -1: ReferenceQueue.java
-8 -1: setTabAt
-26 -1: ()Lsun/invoke/empty/Empty;
-53 -1: (Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
-74 -1: (ILjava/lang/Object;)Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-19 -1: changeParameterType
-61 -1: Ljava/util/Map<Ljava/lang/String;Ljava/security/Permission;>;
-23 -1: (Ljava/lang/Object;IF)V
-32 -1: (I)Ljava/util/ListIterator<TE;>;
-6 -1: unread
-12 -1: isSubclassOf
-6 -1: (JJJ)V
-3 -1: Key
-105 -1: (Ljava/util/HashMap<TK;TV;>;[Ljava/util/HashMap$Node<TK;TV;>;ITK;TV;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-14 -1: x-utf-16le-bom
-22 -1: ()Ljava/nio/IntBuffer;
-104 -1: (Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-21 -1: removeFirstOccurrence
-21 -1: sun/misc/DoubleConsts
-23 -1: ()Ljava/util/SortedSet;
-11 -1: getManEntry
-23 -1: URI is not hierarchical
-7 -1: replace
-16 -1: getDisplayScript
-11 -1: ISO_8859-15
-16 -1: permuteArguments
-5 -1: (JI)C
-41 -1: Error decoding percent encoded characters
-22 -1: ([I)Ljava/lang/String;
-31 -1: java/lang/management/ThreadInfo
-9 -1: useCaches
-22 -1: withInternalMemberName
-5 -1: (JI)I
-5 -1: (JI)J
-67 -1: <E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Collection<TE;>;
-95 -1: (Ljava/util/jar/JarFile;[Ljava/security/CodeSource;)Ljava/util/Enumeration<Ljava/lang/String;>;
-7 -1: release
-56 -1: (Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/String;
-5 -1: (JI)V
-46 -1: (Ljava/util/Iterator;I)Ljava/util/Spliterator;
-18 -1: verifyMemberAccess
-9 -1: warning:
-23 -1: java/lang/reflect/Field
-67 -1: (Ljava/lang/String;Lsun/reflect/generics/factory/GenericsFactory;)V
-10 -1: SizePrefix
-15 -1: setJavaIOAccess
-6 -1: (JI)[B
-10 -1: ST_FLUSHED
-10 -1: resolution
-9 -1: ST_CODING
-16 -1: sun/misc/Cleaner
-21 -1: (Ljava/lang/Class;)[B
-18 -1: WeakReference.java
-41 -1: (Ljava/util/List;Ljava/util/Comparator;)V
-18 -1: printPropertyValue
-3 -1: 813
-22 -1: setRunFinalizersOnExit
-4 -1: init
-44 -1: ()Ljava/util/Iterator<Ljava/nio/file/Path;>;
-3 -1: 819
-12 -1: listIterator
-8 -1: , arity=
-24 -1: (Ljava/util/ArrayList;)I
-49 -1: (IJLjava/io/FileDescriptor;Ljava/lang/Runnable;)V
-10 -1: principals
-17 -1: x-ISO-2022-CN-CNS
-22 -1: (Ljava/lang/Object;F)V
-14 -1: setReadTimeout
-19 -1: getProtectionDomain
-13 -1: pathSeparator
-12 -1: getAndSetInt
-58 -1: (Ljava/util/List;Ljava/util/Collection;)Ljava/util/Locale;
-11 -1: setWritable
-4 -1: perf
-50 -1: ()Ljava/util/concurrent/ConcurrentHashMap<TK;TV;>;
-6 -1: LOCTIM
-6 -1: status
-11 -1: replaceName
-52 -1: (Ljava/lang/CharSequence;II)Ljava/lang/StringBuffer;
-9 -1: nextToken
-13 -1: dropArguments
-20 -1: RECOGNIZED_MODIFIERS
-14 -1: getInputStream
-9 -1: readFully
-25 -1: (CLjava/nio/CharBuffer;)I
-24 -1: sun/misc/PathPermissions
-10 -1: malformedN
-9 -1: n is null
-19 -1: instanceof Double:
-13 -1: markSupported
-26 -1: fromMethodDescriptorString
-43 -1: [Ljava/util/concurrent/locks/ReentrantLock;
-17 -1: parseUnsignedLong
-33 -1: Lsun/misc/URLClassPath$JarLoader;
-26 -1: (Ljava/io/OutputStream;I)V
-6 -1: L_DASH
-17 -1: EmptyNavigableMap
-19 -1: CharsetDecoder.java
-18 -1: makeDynamicInvoker
-12 -1: URLUtil.java
-27 -1: ()Ljava/util/Iterator<TT;>;
-9 -1: initTable
-11 -1: getFragment
-7 -1: isLower
-20 -1: getMethodOrFieldType
-29 -1: java/util/function/BiFunction
-10 -1: access$700
-3 -1: 850
-7 -1: UTC2037
-43 -1: java/util/ArraysParallelSortHelpers$FJShort
-9 -1: toSTZTime
-10 -1: access$702
-3 -1: 852
-8 -1: hashCode
-3 -1: 855
-44 -1: (Ljava/lang/ThreadLocal;Ljava/lang/Object;)V
-3 -1: 857
-3 -1: 858
-5 -1: erase
-55 -1: ()Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;
-47 -1: (Ljava/util/Iterator;JI)Ljava/util/Spliterator;
-38 -1: Ljava/nio/charset/spi/CharsetProvider;
-22 -1: can't deserialize enum
-13 -1: LF_EX_INVOKER
-18 -1: java/text/Collator
-18 -1: Zero length string
-49 -1: <T:Ljava/lang/Object;>()Ljava/util/Iterator<TT;>;
-5 -1: amd64
-12 -1: getNameCount
-7 -1: inCheck
-52 -1: (Ljava/util/concurrent/ConcurrentHashMap$TreeNode;)V
-53 -1: (ILjava/lang/CharSequence;II)Ljava/lang/StringBuffer;
-21 -1: java/util/WeakHashMap
-8 -1: throws
-52 -1: (Ljava/util/concurrent/ConcurrentHashMap$TreeNode;)Z
-55 -1: Ljava/lang/ref/SoftReference<Ljava/util/jar/Manifest;>;
-16 -1: emptyEnumeration
-3 -1: 862
-89 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Object;ILjava/lang/Class;)Ljava/util/List;
-3 -1: 866
-55 -1: Lsun/reflect/generics/repository/ConstructorRepository;
-35 -1: (Ljava/lang/ref/ReferenceQueue$1;)V
-33 -1: java/util/Collections$CheckedList
-18 -1: prefetchReadStatic
-7 -1: (JI[I)I
-78 -1: (Ljava/lang/ThreadLocal$ThreadLocalMap;)Ljava/lang/ThreadLocal$ThreadLocalMap;
-7 -1: ordinal
-22 -1: FilterInputStream.java
-26 -1: java/util/zip/ZipConstants
-28 -1: JVM cannot find invoker for
-43 -1: sun/reflect/generics/parser/SignatureParser
-51 -1: (Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)V
-73 -1: (Ljava/util/function/ToIntFunction;Ljava/lang/Object;Ljava/lang/Object;)I
-17 -1: StringBuffer.java
-62 -1: ([Ljava/lang/Object;Ljava/lang/StringBuilder;Ljava/util/Set;)V
-6 -1: equals
-9 -1: formatter
-3 -1: 874
-35 -1: newGetShortIllegalArgumentException
-74 -1: (Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
-3 -1: ucp
-60 -1: ([Ljava/lang/ClassValue$Entry;I)Ljava/lang/ClassValue$Entry;
-6 -1: create
-17 -1: makeReinvokerForm
-18 -1: csisolatincyrillic
-15 -1: incrementAndGet
-24 -1: maybeInstantiateVerifier
-33 -1: ()Ljava/nio/channels/FileChannel;
-6 -1: class
-16 -1: getAnnotatedType
-43 -1: (Ljava/lang/reflect/Type;)Ljava/lang/Class;
-9 -1: HASH_BITS
-12 -1: placeInCache
-38 -1: java/util/Collections$SynchronizedList
-89 -1: (Ljava/net/URL;Ljava/util/jar/JarFile;Ljava/util/jar/JarEntry;)Ljava/security/CodeSource;
-22 -1: (Ljava/lang/String;I)B
-20 -1: Ljava/util/TimeZone;
-16 -1: sun.java.command
-28 -1: java/util/WeakHashMap$Values
-10 -1: X-UTF-16BE
-22 -1: (Ljava/lang/String;I)I
-26 -1: java/nio/DirectCharBufferS
-99 -1: (Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class<*>;
-22 -1: (Ljava/lang/String;I)J
-26 -1: java/nio/DirectCharBufferU
-54 -1: (Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal;
-21 -1: java/util/AbstractSet
-37 -1: (Ljava/lang/String;)Ljava/lang/Short;
-36 -1: Ljava/nio/charset/CoderResult$Cache;
-22 -1: (Ljava/lang/String;I)S
-15 -1: Ljava/util/Map;
-59 -1: (Ljava/lang/reflect/Type;)Ljava/lang/reflect/AnnotatedType;
-22 -1: (Ljava/lang/String;I)V
-10 -1: getAddress
-25 -1: java/nio/DirectIntBufferS
-11 -1: IMPL_LOOKUP
-3 -1: uee
-7 -1: addTime
-37 -1: sun/security/action/GetPropertyAction
-25 -1: java/nio/DirectIntBufferU
-21 -1: javaUtilZipFileAccess
-34 -1: java/util/Collections$CheckedQueue
-11 -1: readResolve
-22 -1: (Ljava/lang/String;I)Z
-11 -1: findVirtual
-63 -1: (Ljava/lang/String;Ljava/lang/String;)Lsun/security/util/Debug;
-22 -1: getDeclaredAnnotations
-16 -1: Collections.java
-18 -1: invalid entry size
-49 -1: java/util/concurrent/ConcurrentHashMap$TableStack
-32 -1: java/util/AbstractSequentialList
-4 -1: int0
-16 -1: MAXIMUM_CAPACITY
-53 -1: ()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
-4 -1: int1
-4 -1: int2
-4 -1: int3
-119 -1: (Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/Class;I)Lsun/reflect/MethodAccessor;
-7 -1: variant
-39 -1: Lsun/reflect/annotation/AnnotationType;
-11 -1: arrayOffset
-24 -1: ()Ljava/util/LinkedList;
-31 -1: java/lang/ClassCircularityError
-17 -1: java/lang/Package
-10 -1: ccsid00858
-27 -1: java/io/ExpiringCache$Entry
-16 -1: newFieldAccessor
-67 -1: (Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
-99 -1: Lsun/reflect/generics/repository/GenericDeclRepository<Lsun/reflect/generics/tree/ClassSignature;>;
-53 -1: (Ljava/lang/invoke/MethodHandle;[Ljava/lang/Object;)V
-53 -1: Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-58 -1: <T:Ljava/lang/Object;>([TT;)Ljava/util/stream/Stream<TT;>;
-54 -1: (Ljava/lang/CharSequence;Ljava/text/Normalizer$Form;)Z
-8 -1: Kerberos
-29 -1: ()Ljava/nio/channels/Channel;
-12 -1: java_version
-45 -1: (Lsun/reflect/DelegatingMethodAccessorImpl;)V
-10 -1: canConvert
-136 -1: (Ljava/lang/StringBuffer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
-26 -1: getDayOfWeekDateOnOrBefore
-7 -1: INVALID
-10 -1: TERMINATED
-41 -1: Ljava/security/cert/CertificateException;
-74 -1: (Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
-30 -1: [Ljava/lang/invoke/MethodType;
-13 -1: getMethodName
-7 -1: Factory
-34 -1: (Ljava/util/function/BiConsumer;)V
-11 -1: unlinkFirst
-37 -1: lambda$getDeclaredAnnotationsByType$0
-77 -1: (Ljava/nio/ByteBuffer;ILjava/nio/CharBuffer;II)Ljava/nio/charset/CoderResult;
-20 -1: java/util/ArrayDeque
-65 -1: (Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;J)V
-49 -1: (Ljava/util/ArrayDeque;Ljava/util/ArrayDeque$1;)V
-22 -1: (J)Ljava/time/Instant;
-17 -1: URLClassPath.java
-6 -1: 8859_1
-25 -1: stopRemoteManagementAgent
-6 -1: 8859_2
-17 -1: containsNullValue
-6 -1: 8859_4
-6 -1: 8859_5
-26 -1: (Ljava/nio/ByteBuffer;IC)V
-76 -1: (Ljava/lang/Runnable;Ljava/security/AccessControlContext;)Ljava/lang/Thread;
-6 -1: 8859_7
-6 -1: 8859_9
-8 -1: setHours
-9 -1: File.java
-21 -1: isIdentifierIgnorable
-5 -1: ([C)I
-4 -1: (B)I
-10 -1: codesource
-77 -1: ([Ljava/net/URL;Ljava/lang/ClassLoader;Ljava/security/AccessControlContext;)V
-4 -1: (B)J
-6 -1: isFair
-30 -1: java/lang/NullPointerException
-10 -1: IMPL_NAMES
-13 -1: Runnable.java
-26 -1: Ill-formed extension key:
-17 -1: ()[Ljava/io/File;
-18 -1: javaSecurityAccess
-16 -1: equalsIgnoreCase
-4 -1: (B)V
-5 -1: ([C)V
-25 -1: Ljava/io/FileInputStream;
-14 -1: trackJavaUsage
-20 -1: Ljava/io/FileSystem;
-10 -1: iso_8859_1
-4 -1: (B)Z
-30 -1: java/lang/NoClassDefFoundError
-152 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/HashMap$TreeNode<TK;TV;>;Ljava/util/HashMap$TreeNode<TK;TV;>;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-19 -1: java/lang/Cloneable
-55 -1: ([Ljava/lang/Object;Ljava/util/function/IntFunction;I)V
-27 -1: (Ljava/nio/ByteBuffer;IJZ)V
-21 -1: ()Lsun/misc/JarIndex;
-72 -1: ([Ljava/security/CodeSource;)Ljava/util/Enumeration<Ljava/lang/String;>;
-64 -1: (Ljava/util/Collection;Ljava/util/Comparator;)Ljava/lang/Object;
-20 -1: invalid entry crc-32
-9 -1: BASECOUNT
-29 -1: java/security/BasicPermission
-52 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;
-7 -1: ([B[B)Z
-17 -1: EMPTY_ELEMENTDATA
-61 -1: (Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;
-49 -1: (ILjava/lang/Class;)Ljava/lang/invoke/MethodType;
-29 -1: sun/reflect/MagicAccessorImpl
-121 -1: (Ljava/lang/String;Lsun/reflect/generics/factory/GenericsFactory;)Lsun/reflect/generics/repository/ConstructorRepository;
-6 -1: ([II)I
-40 -1: (Ljava/lang/String;I)Ljava/lang/Integer;
-25 -1: java.content.handler.pkgs
-63 -1: ()Ljava/util/Set<Ljava/util/Map$Entry<Ljava/lang/String;TV;>;>;
-13 -1: parameterList
-6 -1: rebind
-16 -1: isSuperInterface
-6 -1: ([II)V
-14 -1: currentRuntime
-9 -1: BA_EXISTS
-15 -1: END_PUNCTUATION
-15 -1: no such method
-19 -1: getAndVerifyPackage
-4 -1: wrap
-24 -1: checkAwtEventQueueAccess
-7 -1: ibm-437
-4 -1: open
-47 -1: (Ljava/nio/ByteBuffer;[BI)Ljava/nio/ByteBuffer;
-21 -1: ADDRESS_BITS_PER_WORD
-13 -1: isConstructor
-12 -1: getUseCaches
-27 -1: sun/util/locale/LocaleUtils
-4 -1: koi8
-23 -1: getParameterAnnotations
-9 -1: providers
-57 -1: ([Ljava/lang/Object;Ljava/util/function/BinaryOperator;)V
-24 -1: Lsun/misc/JavaNetAccess;
-22 -1: ([J)Ljava/lang/String;
-7 -1: p-1022$
-6 -1: isType
-63 -1: Ljava/util/Map<Ljava/lang/String;Lsun/util/calendar/ZoneInfo;>;
-21 -1: pageAlignDirectMemory
-18 -1: getManifestDigests
-37 -1: [Ljava/lang/reflect/AccessibleObject;
-7 -1: decrypt
-54 -1: (Lsun/misc/URLClassPath$JarLoader;)Ljava/util/HashMap;
-32 -1: lambda$comparingByKey$bbdbfea9$1
-21 -1: hasGenericInformation
-31 -1: java/nio/charset/CharsetEncoder
-15 -1: setTargetNormal
-3 -1: ulp
-18 -1: argumentTypesMatch
-12 -1: getDayOfYear
-8 -1: closeAll
-76 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/ref/SoftReference<TV;>;
-6 -1: concat
-9 -1: getLongAt
-16 -1: hasBeenFinalized
-32 -1: [Ljava/util/Hashtable$Entry<**>;
-23 -1: CheckedRandomAccessList
-106 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/net/URI;
-21 -1: defineClassInPackage.
-11 -1: ([III[III)V
-8 -1: toZoneId
-34 -1: SUBCLASS_IMPLEMENTATION_PERMISSION
-55 -1: java/util/concurrent/atomic/AtomicReferenceFieldUpdater
-8 -1: isDirect
-10 -1: ALL_ACCESS
-12 -1: isRegistered
-29 -1: ForEachTransformedMappingTask
-5 -1: LIJFD
-23 -1: (Ljava/util/TimeZone;)V
-23 -1: (Ljava/util/TimeZone;)Z
-20 -1: java/lang/Appendable
-29 -1: Lsun/util/calendar/Gregorian;
-9 -1: charValue
-8 -1: ONE_HOUR
-38 -1: (Ljava/util/Locale;)Ljava/lang/String;
-7 -1: script=
-10 -1: X-UTF-16LE
-7 -1: ENTRIES
-6 -1: detach
-38 -1: certpath PKIX CertPathBuilder and
-14 -1: setLanguageTag
-13 -1: isAlphaString
-13 -1: interpretName
-9 -1: dayOfWeek
-88 -1: (Ljava/lang/Class;ZLjava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)Ljava/util/List;
-91 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/LambdaForm;)Ljava/lang/invoke/MethodHandle;
-13 -1: addTypeString
-17 -1: VectorSpliterator
-12 -1: MILLISECONDS
-6 -1: CENCOM
-10 -1: KeySetView
-18 -1: getTargetException
-7 -1: H_ALPHA
-32 -1: sun/util/locale/BaseLocale$Cache
-25 -1: [Ljava/lang/CharSequence;
-7 -1: Builder
-4 -1: left
-19 -1: BootClassPathHolder
-12 -1: publicFields
-11 -1: windows-437
-9 -1: EMPTY_SET
-26 -1: GET_STACK_TRACE_PERMISSION
-6 -1: copyOf
-14 -1: aliases_IBM737
-9 -1: writeLong
-35 -1: (JLjava/util/concurrent/TimeUnit;)Z
-70 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Ljava/lang/String;>;
-22 -1: getAnnotatedReturnType
-41 -1: (Ljava/lang/String;[BII)Ljava/lang/Class;
-8 -1: ,maxpri=
-29 -1: handleParameterNumberMismatch
-26 -1: ts timestamping
-11 -1: checkListen
-10 -1: SourceFile
-44 -1: (Ljava/lang/String;)Ljava/util/jar/JarEntry;
-17 -1: weakCompareAndSet
-9 -1: timestamp
-21 -1: (Z)Ljava/lang/String;
-12 -1: doneWithMeta
-20 -1: makeCollectArguments
-52 -1: (JLjava/util/function/BiFunction;)Ljava/lang/Object;
-10 -1: searchKeys
-48 -1: sun/reflect/SerializationConstructorAccessorImpl
-69 -1: (Ljava/lang/reflect/Constructor<*>;)Lsun/reflect/ConstructorAccessor;
-19 -1: ()Lsun/misc/Unsafe;
-11 -1: deepEquals0
-7 -1: GB18030
-13 -1: ValueIterator
-75 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
-28 -1: java/util/PropertyPermission
-6 -1: CENCRC
-3 -1: url
-3 -1: L_L
-19 -1: Certificate too big
-33 -1: sun/reflect/DelegatingClassLoader
-16 -1: lambda$stream$57
-11 -1: BitSet.java
-13 -1: sun/misc/Perf
-26 -1: Ljava/util/SimpleTimeZone;
-7 -1: (BBBB)I
-24 -1: sun/misc/FloatingDecimal
-21 -1: sun/util/PreHashedMap
-8 -1: utf-16be
-11 -1: isInherited
-83 -1: (Ljava/util/Properties;Ljava/io/OutputStream;Ljava/lang/String;Ljava/lang/String;)V
-52 -1: (Ljava/lang/Class;Ljava/security/ProtectionDomain;)V
-11 -1: getDoOutput
-18 -1: asVarargsCollector
-22 -1: NoSuchMethodError.java
-18 -1: getStackTraceDepth
-30 -1: (Ljava/io/File;)Ljava/net/URL;
-15 -1: CURRENCY_SYMBOL
-24 -1: Lsun/misc/JavaNioAccess;
-6 -1: NATIVE
-22 -1: Lsun/misc/PerfCounter;
-63 -1: java/util/concurrent/ConcurrentHashMap$MapReduceValuesToIntTask
-30 -1: less than Character.MIN_RADIX
-17 -1: isCallerSensitive
-8 -1: shutdown
-11 -1: STATE_GREEN
-4 -1: next
-10 -1: tryPresize
-16 -1: CONSTRUCTOR_NAME
-3 -1: MAY
-21 -1: java.security.manager
-20 -1: Lsun/misc/Contended;
-16 -1: DISPLAY_LANGUAGE
-6 -1: KeySet
-9 -1: getScript
-3 -1: utc
-17 -1: TRACE_INTERPRETER
-39 -1: (Ljava/lang/Object;I)Ljava/lang/String;
-19 -1: getFieldAtIfLoaded0
-15 -1: methodFilterMap
-54 -1: Ljava/util/Map<Ljava/lang/String;Ljava/lang/Boolean;>;
-45 -1: java/security/cert/Certificate$CertificateRep
-43 -1: (Ljava/lang/String;)Lsun/util/calendar/Era;
-34 -1: java/security/cert/X509Certificate
-19 -1: versionsInitialized
-11 -1: isDirectory
-14 -1: aliases_IBM775
-38 -1: (Ljava/util/function/Consumer<-TE;>;)V
-38 -1: (Ljava/lang/String;)Ljava/util/Locale;
-40 -1: (Ljava/lang/String;Z)Lsun/misc/Resource;
-14 -1: setDefaultZone
-14 -1: highResCounter
-78 -1: (Ljava/lang/ClassValue$Version;Ljava/lang/Object;)Ljava/lang/ClassValue$Entry;
-16 -1: defaultUseCaches
-40 -1: (Ljava/util/zip/ZipFile;)Ljava/util/Map;
-24 -1: isSupplementaryCodePoint
-15 -1: ISO_8859_1.java
-13 -1: multiplyExact
-126 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lsun/util/locale/LocaleExtensions;)Ljava/util/Locale;
-8 -1: classMap
-8 -1: wildcard
-19 -1: getSimpleBinaryName
-17 -1: illegal signature
-14 -1: == basicType(
-17 -1: ZipConstants.java
-32 -1: [Ljava/lang/VirtualMachineError;
-27 -1: ()Ljava/util/stream/Stream;
-24 -1: (Ljava/lang/Exception;)V
-21 -1: java/util/Enumeration
-13 -1: newSetFromMap
-8 -1: getenv.*
-20 -1: sun/management/Agent
-21 -1: sun/nio/cs/US_ASCII$1
-7 -1: comment
-15 -1: appendAuthority
-11 -1: hasWrappers
-10 -1: dstOffset
-24 -1: sun/reflect/ConstantPool
-75 -1: (Ljava/util/jar/JarFile;[Ljava/security/CodeSource;)Ljava/util/Enumeration;
-52 -1: (Ljava/util/jar/JarFile;)Ljava/util/jar/JarVerifier;
-70 -1: Ljava/lang/Object;Ljava/security/PrivilegedAction<Ljava/lang/Object;>;
-14 -1: previousSetBit
-17 -1: AF_GETSTATIC_INIT
-15 -1: ArrayDeque.java
-7 -1: boolean
-25 -1: (I)Ljava/math/BigInteger;
-146 -1: (Ljava/lang/ref/ReferenceQueue<Ljava/lang/Class<*>;>;Ljava/util/concurrent/ConcurrentMap<+Ljava/lang/ref/WeakReference<Ljava/lang/Class<*>;>;*>;)V
-8 -1: getClass
-8 -1: user.dir
-6 -1: VALUES
-5 -1: raise
-39 -1: (JLjava/util/function/Consumer<-TV;>;)V
-107 -1: <T:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<TT;TV;>;
-5 -1: print
-8 -1: readChar
-55 -1: (JLjava/util/TimeZone;)Lsun/util/calendar/CalendarDate;
-56 -1: java/util/concurrent/ConcurrentHashMap$MapReduceKeysTask
-60 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Double;>;
-102 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/SortedMap<TK;TV;>;)Ljava/util/SortedMap<TK;TV;>;
-23 -1: printModifiersIfNonzero
-14 -1: getterFunction
-15 -1: ISO-10646-UCS-2
-14 -1: canonizeString
-13 -1: getTotalSpace
-24 -1: synchronizedNavigableSet
-100 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;Ljava/security/AccessControlContext;)TT;
-4 -1: ioex
-24 -1: ()Ljava/nio/FloatBuffer;
-14 -1: toBinaryString
-7 -1: Segment
-34 -1: ()Lsun/misc/JavaUtilZipFileAccess;
-17 -1: setTargetVolatile
-22 -1: (Ljava/util/List<*>;)V
-51 -1: (ILjava/lang/CharSequence;)Ljava/lang/StringBuffer;
-22 -1: (Ljava/util/List<*>;)Z
-5 -1: (FI)F
-11 -1: parseMethod
-8 -1: Compiled
-19 -1: java/util/SortedMap
-7 -1: setByte
-12 -1: getFieldType
-8 -1: pageSize
-14 -1: getCallerClass
-9 -1: ensureObj
-18 -1: refKindHasReceiver
-10 -1: getZoneIds
-24 -1: (Ljava/nio/CharBuffer;)I
-47 -1: ()Lsun/reflect/generics/parser/SignatureParser;
-8 -1: getIndex
-24 -1: (Ljava/lang/Thread;TT;)V
-18 -1: (Ljava/util/Map;)V
-18 -1: (Ljava/util/Map;)Z
-6 -1: random
-10 -1: putAddress
-64 -1: (Ljava/util/function/Consumer<-Ljava/util/Map$Entry<TK;TV;>;>;)V
-24 -1: (Ljava/nio/CharBuffer;)V
-8 -1: canCache
-24 -1: (Ljava/nio/CharBuffer;)Z
-9 -1: getIntAt0
-4 -1: sqrt
-8 -1: makeLong
-54 -1: ([Ljava/lang/Object;Ljava/util/function/IntFunction;)V
-5 -1: (JJ)I
-26 -1: javaIOFileDescriptorAccess
-5 -1: (JJ)J
-15 -1: != basicType:
-36 -1: Ljava/lang/ref/ReferenceQueue<-TT;>;
-5 -1: words
-16 -1: sun.jnu.encoding
-32 -1: (Ljava/lang/invoke/LambdaForm;)V
-22 -1: ensureClassInitialized
-16 -1: Ljava/util/List;
-14 -1: varargsInvoker
-5 -1: (JJ)V
-20 -1: java/util/Properties
-12 -1: getImplClass
-21 -1: argumentTypesToString
-5 -1: (JJ)Z
-50 -1: java/util/Collections$SynchronizedRandomAccessList
-17 -1: makeWrappedMember
-21 -1: UnmodifiableSortedSet
-22 -1: (ILjava/lang/Class;Z)V
-3 -1: MIT
-13 -1: bootClassPath
-50 -1: (JLjava/util/function/Function;)Ljava/lang/Object;
-74 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/HashMap$Node<TK;TV;>;
-45 -1: (Ljava/util/Map$Entry;Ljava/util/Map$Entry;)I
-12 -1: advanceProbe
-10 -1: encoderFor
-14 -1: DataInput.java
-16 -1: java/lang/Double
-3 -1: 912
-3 -1: 914
-3 -1: abs
-3 -1: 915
-13 -1: currentThread
-17 -1: ClassDefiner.java
-32 -1: sun/misc/Launcher$ExtClassLoader
-16 -1: Current state =
-12 -1: elementCount
-10 -1: unmaskNull
-8 -1: csibm857
-32 -1: java/net/UnknownServiceException
-10 -1: x-utf-16be
-3 -1: acc
-37 -1: Ljava/util/List<Ljava/io/Closeable;>;
-23 -1: ([Ljava/lang/Thread;Z)I
-17 -1: impliesIgnoreMask
-23 -1: getGenericComponentType
-51 -1: ()Lsun/reflect/generics/repository/ClassRepository;
-34 -1: " not found. Will use interpreter.
-38 -1: ()Ljava/security/AccessControlContext;
-6 -1: final
-8 -1: utf-16le
-3 -1: 920
-3 -1: 923
-5 -1: (I)[C
-43 -1: (Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
-8 -1: csibm862
-34 -1: (Ljava/lang/ref/Reference<+TT;>;)Z
-8 -1: csibm866
-20 -1: getParameterizedType
-7 -1: (II[C)V
-20 -1: [Ljava/lang/Package;
-84 -1: (Ljava/lang/String;Ljava/security/ProtectionDomain;)Ljava/security/ProtectionDomain;
-28 -1: SynchronizedRandomAccessList
-18 -1: sun/misc/VMSupport
-61 -1: java/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry
-3 -1: add
-16 -1: ZipEntryIterator
-11 -1: next_target
-87 -1: (Ljava/lang/String;Ljava/nio/ByteBuffer;Ljava/security/CodeSource;)Ljava/lang/Class<*>;
-4 -1: amod
-12 -1: markedSkipLF
-55 -1: java/util/concurrent/ConcurrentHashMap$EntrySpliterator
-5 -1: lim=
-29 -1: java/security/PermissionsHash
-50 -1: (Ljava/lang/CharSequence;II)Ljava/lang/Appendable;
-19 -1: makePairwiseConvert
-58 -1: <T:Ljava/lang/Object;>(Ljava/lang/ClassValue$Entry<TT;>;)V
-8 -1: contents
-11 -1: user.region
-17 -1: RandomAccess.java
-13 -1: singletonList
-13 -1: policy,access
-64 -1: Ljava/util/Map<Ljava/lang/String;Ljava/io/ExpiringCache$Entry;>;
-25 -1: (Ljava/lang/Appendable;)V
-19 -1: (Ljava/util/List;)V
-43 -1: (Ljava/lang/ClassLoader;Ljava/lang/Class;)V
-19 -1: (Ljava/util/List;)Z
-15 -1: America/Chicago
-25 -1: (II)Ljava/nio/CharBuffer;
-12 -1: getDayOfWeek
-8 -1: ([BIIZ)V
-28 -1: (Ljava/lang/reflect/Field;)I
-28 -1: (Ljava/lang/reflect/Field;)J
-18 -1: getDeclaringClass0
-11 -1: counterTime
-30 -1: (Ljava/util/Collection<TE;>;)V
-28 -1: (Ljava/lang/reflect/Field;)V
-31 -1: (IIIILjava/io/FileDescriptor;)V
-25 -1: java/net/SocketPermission
-20 -1: bad parameter count
-18 -1: getHeaderFieldLong
-26 -1: GetReflectionFactoryAction
-19 -1: MIN_TRANSFER_STRIDE
-17 -1: java/nio/Bits$1$1
-7 -1: getSize
-33 -1: java/util/function/ToLongFunction
-46 -1: (IILjava/lang/String;)Ljava/lang/StringBuffer;
-10 -1: access$800
-65 -1: sun/misc/JavaSecurityProtectionDomainAccess$ProtectionDomainCache
-26 -1: (Ljava/lang/ClassLoader;)V
-25 -1: java/util/IdentityHashMap
-26 -1: (Ljava/lang/ClassLoader;)Z
-91 -1: <T:Ljava/lang/Object;>(Ljava/util/function/ToIntFunction<-TT;>;)Ljava/util/Comparator<TT;>;
-26 -1: ([CIILjava/lang/String;I)I
-12 -1: canonicalize
-3 -1: val
-8 -1: putCharB
-12 -1: UTF_32LE_BOM
-60 -1: (Ljava/security/CodeSource;)Ljava/security/ProtectionDomain;
-44 -1: (Lsun/misc/SignalHandler;Lsun/misc/Signal;)V
-26 -1: (Ljava/util/Enumeration;)V
-11 -1: INVALIDATED
-8 -1: putCharL
-22 -1: (II)Ljava/lang/String;
-7 -1: hasNext
-5 -1: WRITE
-20 -1: MIN_INITIAL_CAPACITY
-13 -1: propertyNames
-9 -1: Gregorian
-13 -1: getExpiration
-7 -1: minutes
-7 -1: ostream
-9 -1: java.lang
-17 -1: forceStandardTime
-9 -1: initWords
-41 -1: java/lang/Thread$UncaughtExceptionHandler
-9 -1: theUnsafe
-27 -1: ForEachTransformedEntryTask
-10 -1: forEncoder
-31 -1: needsClassLoaderPermissionCheck
-5 -1: ctime
-25 -1: ()Ljava/nio/DoubleBuffer;
-8 -1: getValue
-66 -1: (Lsun/util/locale/BaseLocale$Key;)Lsun/util/locale/BaseLocale$Key;
-42 -1: (Ljava/io/InputStream;Ljava/lang/String;)V
-6 -1: august
-14 -1: compileClasses
-13 -1: javaNetAccess
-22 -1: interpretWithArguments
-4 -1: url:
-14 -1: EMPTY_ITERATOR
-60 -1: Ljava/util/WeakHashMap<Ljava/io/Closeable;Ljava/lang/Void;>;
-24 -1: java/util/jar/Attributes
-12 -1: getOrDefault
-19 -1: Pacific/Guadalcanal
-33 -1: ()Ljava/lang/reflect/Constructor;
-38 -1: java/util/Collections$UnmodifiableList
-13 -1: basicTypeChar
-22 -1: (Ljava/lang/String;J)J
-14 -1: memberDefaults
-42 -1: (Ljava/lang/Class<*>;[Ljava/lang/String;)V
-38 -1: (Ljava/util/function/Consumer<-TK;>;)V
-16 -1: LF_NEWINVSPECIAL
-10 -1: classDepth
-28 -1: [Ljava/io/ObjectStreamField;
-46 -1: (Ljava/util/Collection;)Ljava/util/Collection;
-91 -1: ([Ljava/lang/reflect/Method;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
-11 -1: getLocation
-39 -1: (Ljava/lang/Class;[Ljava/lang/Class;Z)V
-9 -1: loadTable
-55 -1: Directory separator should not appear in library name:
-7 -1: setTime
-14 -1: getConstructor
-4 -1: urls
-25 -1: dispatchUncaughtException
-77 -1: (ILjava/lang/Object;Ljava/lang/Class<*>;)Ljava/util/HashMap$TreeNode<TK;TV;>;
-8 -1: modCount
-8 -1: Opening
-6 -1: ENDHDR
-4 -1: cnfe
-34 -1: DIRECTIONALITY_PARAGRAPH_SEPARATOR
-10 -1: Asia/Amman
-3 -1: MST
-28 -1: DIRECTIONALITY_ARABIC_NUMBER
-3 -1: all
-4 -1: enum
-8 -1: copyWith
-12 -1: ([JI[IIJII)I
-29 -1: Ljava/lang/annotation/Target;
-7 -1: Thread-
-14 -1: x-utf-32le-bom
-38 -1: (ILjava/lang/management/MemoryUsage;)V
-33 -1: Signal already used by VM or OS:
-27 -1: (I)Ljava/lang/StringBuffer;
-25 -1: java/text/Normalizer$Form
-10 -1: x-utf-16le
-34 -1: can not access a member of class
-27 -1: (Ljava/nio/ByteBuffer;IFZ)V
-28 -1: (Ljava/lang/ClassValue<*>;)V
-16 -1: INITIAL_CAPACITY
-23 -1: DirectMethodHandle.java
-18 -1: reduceValuesToLong
-41 -1: (Ljava/lang/String;Ljava/lang/Class<*>;)V
-6 -1: unwrap
-12 -1: threadStatus
-5 -1: (DI)D
-11 -1: fieldOffset
-52 -1: java/util/concurrent/ConcurrentHashMap$EntryIterator
-14 -1: ACCESS_EXECUTE
-44 -1: (Ljava/nio/ByteBuffer;)Ljava/nio/CharBuffer;
-29 -1: ([Ljava/lang/ThreadGroup;IZ)I
-18 -1: LocalVariableTable
-17 -1: ConstantPool.java
-26 -1: (Ljava/nio/ByteBuffer;ID)V
-4 -1: (C)B
-3 -1: and
-4 -1: head
-126 -1: (Ljava/lang/reflect/GenericDeclaration;Lsun/reflect/generics/scope/Scope;)Lsun/reflect/generics/factory/CoreReflectionFactory;
-4 -1: (C)C
-16 -1: Pacific/Auckland
-7 -1: Thread[
-5 -1: ([D)I
-4 -1: (C)I
-98 -1: <U:Ljava/lang/Object;>([Ljava/lang/reflect/Constructor<TU;>;)[Ljava/lang/reflect/Constructor<TU;>;
-11 -1: fileHandler
-30 -1: DIRECTIONALITY_NONSPACING_MARK
-10 -1: (this Map)
-14 -1: malformedCache
-5 -1: ([D)V
-4 -1: (C)V
-26 -1: getUnicodeLocaleAttributes
-4 -1: (C)Z
-81 -1: (JLjava/util/function/ToLongBiFunction;JLjava/util/function/LongBinaryOperator;)J
-46 -1: [Ljava/util/concurrent/ConcurrentHashMap$Node;
-20 -1: Max. Heap Size:
-24 -1: Ljava/lang/reflect/Type;
-13 -1: EmptyIterator
-8 -1: allocate
-7 -1: FLUSHED
-8 -1: exitVM.*
-59 -1: (Ljava/lang/String;)Lsun/util/locale/InternalLocaleBuilder;
-19 -1: reduceEntriesToLong
-15 -1: getISOLanguages
-13 -1: CONSTANT_ZERO
-23 -1: (I)Ljava/util/Iterator;
-96 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/Map<TK;TV;>;
-11 -1: isSynthetic
-7 -1: lineBuf
-30 -1: java/lang/annotation/Inherited
-65 -1: <E:Ljava/lang/Object;>Ljava/lang/Object;Ljava/lang/Iterable<TE;>;
-35 -1: (Ljava/lang/String;)[Ljava/io/File;
-27 -1: java/security/cert/CertPath
-26 -1: startRemoteManagementAgent
-9 -1: shiftLeft
-5 -1: stack
-42 -1: (Ljava/lang/Class<*>;[Ljava/lang/Object;)V
-11 -1: CheckedList
-10 -1: replaceAll
-86 -1: (Ljava/util/HashMap$TreeNode;Ljava/util/HashMap$TreeNode;)Ljava/util/HashMap$TreeNode;
-24 -1: (I)Ljava/nio/CharBuffer;
-13 -1: image/vnd.fpx
-15 -1: iso_8859-1:1987
-19 -1: (Ljava/lang/Long;)I
-22 -1: sun/misc/SignalHandler
-15 -1: ifModifiedSince
-42 -1: (Ljava/lang/Class;)Ljava/lang/ClassLoader;
-105 -1: (Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Class;I[Ljava/lang/invoke/MemberName;)I
-22 -1: Negative timeout value
-38 -1: Ljava/io/UnsupportedEncodingException;
-11 -1: removeRange
-13 -1: Compiler.java
-6 -1: Sorter
-8 -1: aliasSet
-10 -1: UNASSIGNED
-34 -1: lambda$comparingByValue$1065357e$1
-34 -1: ()Ljava/lang/Class$AnnotationData;
-25 -1: sun/misc/Launcher$Factory
-15 -1: getLongVolatile
-8 -1: vmloader
-10 -1: unicodebig
-10 -1: closeables
-31 -1: JavaIOFileDescriptorAccess.java
-7 -1: static
-3 -1: arg
-21 -1: library can't be null
-42 -1: java/util/ArraysParallelSortHelpers$FJByte
-22 -1: getDeclaringExecutable
-19 -1: runFinalizersOnExit
-20 -1: simpleTimeZoneParams
-13 -1: Modifier.java
-14 -1: pkcs11keystore
-6 -1: shared
-30 -1: java/net/MalformedURLException
-26 -1: ()[Lsun/util/calendar/Era;
-13 -1: x-MS950-HKSCS
-10 -1: relativize
-40 -1: (Ljava/lang/String;JJ)Ljava/lang/String;
-31 -1: java/util/HashMap$ValueIterator
-29 -1: MODIFY_THREADGROUP_PERMISSION
-38 -1: (Ljava/lang/String;)Ljava/lang/Object;
-7 -1: destroy
-37 -1: (Ljava/util/List;)[Ljava/lang/String;
-18 -1: (Ljava/io/File;Z)V
-32 -1: Ljava/util/HashMap$Node<TK;TV;>;
-18 -1: interfaceModifiers
-34 -1: java/util/LinkedList$LLSpliterator
-7 -1: REF_???
-23 -1: java/net/ContentHandler
-20 -1: <compiledLambdaForm>
-17 -1: [Ljava/lang/Byte;
-6 -1: exitVM
-3 -1: att
-27 -1: sun/nio/cs/UTF_16BE$Encoder
-6 -1: exists
-28 -1: Ljava/util/Collection<+TE;>;
-48 -1: (Ljava/lang/CharSequence;)Ljava/lang/Appendable;
-6 -1: getMap
-52 -1: ([Ljava/lang/Class;I)Ljava/lang/reflect/Constructor;
-11 -1: stackTrace[
-21 -1: slowCheckMemberAccess
-33 -1: ReflectiveOperationException.java
-9 -1: versionId
-56 -1: Wrong number of parameters in MethodParameters attribute
-14 -1: isLowSurrogate
-8 -1: csPCp852
-16 -1: copyConstructors
-25 -1: ()Ljava/util/Spliterator;
-9 -1: closeLock
-17 -1: readUnsignedShort
-7 -1: 8859_13
-7 -1: 8859_15
-13 -1: TARGET_OFFSET
-26 -1: (Ljava/util/Hashtable;IZ)V
-44 -1: (Ljava/nio/CharBuffer;)Ljava/nio/CharBuffer;
-46 -1: (Ljava/lang/reflect/Type;)Ljava/lang/Class<*>;
-25 -1: DEFAULT_CONCURRENCY_LEVEL
-36 -1: Ljava/util/List<Ljava/lang/String;>;
-29 -1: sun.nio.PageAlignDirectMemory
-37 -1: (Ljava/lang/Class;I)Ljava/lang/Class;
-12 -1: encryptBlock
-8 -1: parentOf
-5 -1: H_HEX
-11 -1: getFloatAt0
-24 -1: VirtualMachineError.java
-18 -1: getDeclaredClasses
-59 -1: (Ljava/lang/AbstractStringBuilder;)Ljava/lang/StringBuffer;
-42 -1: (Ljava/util/List<Ljava/lang/Class<*>;>;)[C
-37 -1: (Ljava/lang/String;)Ljava/lang/Float;
-13 -1: Iterator.java
-25 -1: (Ljava/io/PrintStream;I)V
-9 -1: getObject
-19 -1: [Ljava/lang/String;
-7 -1: SIZECTL
-11 -1: isUnderflow
-27 -1: sun.nio.MaxDirectMemorySize
-21 -1: isNonPublicProxyClass
-13 -1: toCalendarDOW
-9 -1: Type.java
-14 -1: aliases_IBM850
-17 -1: emptyNavigableMap
-14 -1: aliases_IBM852
-14 -1: aliases_IBM855
-14 -1: aliases_IBM857
-14 -1: aliases_IBM858
-15 -1: iso_8859-4:1988
-13 -1: UnicodeScript
-8 -1: getCharB
-17 -1: constructorMethod
-27 -1: java/util/function/Function
-20 -1: getProtectionDomain0
-8 -1: getCharL
-32 -1: ([Ljava/io/File;)[Ljava/net/URL;
-51 -1: (Ljava/lang/Class;Z)Ljava/lang/invoke/MethodHandle;
-7 -1: getenv.
-5 -1: stale
-14 -1: aliases_IBM862
-32 -1: java/util/spi/LocaleNameProvider
-14 -1: aliases_IBM866
-51 -1: ([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
-6 -1: CENDSK
-36 -1: java/util/Comparators$NullComparator
-34 -1: UnsafeStaticFieldAccessorImpl.java
-17 -1: staticFieldOffset
-12 -1: prefetchRead
-4 -1: help
-34 -1: (Ljava/util/concurrent/TimeUnit;)J
-8 -1: getChars
-19 -1: java/lang/Throwable
-34 -1: Annotation Type:\n Member types:
-55 -1: (Ljava/lang/Class<*>;Ljava/security/ProtectionDomain;)V
-14 -1: aliases_IBM874
-17 -1: getDisplayVariant
-24 -1: Ljava/net/NetPermission;
-15 -1: jvmMinorVersion
-11 -1: subSequence
-3 -1: x86
-6 -1: double
-14 -1: checkSlotCount
-20 -1: java/net/InetAddress
-14 -1: Principal.java
-8 -1: $,;:@&=+
-17 -1: ByteBuffered.java
-21 -1: sun.misc.Perf.getPerf
-11 -1: finishEntry
-27 -1: sun.timezone.ids.oldmapping
-26 -1: (ZLjava/io/OutputStream;)V
-41 -1: (Ljava/lang/String;Z)Ljava/lang/Class<*>;
-32 -1: generateSerializationConstructor
-6 -1: Value
-40 -1: (Ljava/lang/String;Ljava/lang/String;Z)V
-16 -1: previousClearBit
-7 -1: theProp
-51 -1: (Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
-39 -1: com.sun.javafx.application.LauncherImpl
-21 -1: URLStreamHandler.java
-4 -1: in
-14 -1: BIT_INDEX_MASK
-125 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Comparator<-TK;>;)Ljava/util/Comparator<Ljava/util/Map$Entry<TK;TV;>;>;
-49 -1: (Ljava/util/Set;Ljava/lang/Class;)Ljava/util/Set;
-10 -1: scaleValue
-27 -1: (Ljava/nio/ByteBuffer;IDZ)V
-78 -1: (Ljava/util/Collection<Ljava/lang/reflect/Field;>;[Ljava/lang/reflect/Field;)V
-53 -1: <T:Ljava/lang/Object;>(I)Ljava/util/Enumeration<TT;>;
-38 -1: java/lang/IncompatibleClassChangeError
-60 -1: java/util/concurrent/ConcurrentHashMap$MapReduceMappingsTask
-23 -1: not a method or field:
-35 -1: Ljava/nio/BufferUnderflowException;
-4 -1: i386
-13 -1: US_ASCII.java
-80 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/Class;)Ljava/lang/reflect/AnnotatedType;
-21 -1: initializeSystemClass
-6 -1: ([CI)I
-18 -1: getBooleanProperty
-35 -1: java/util/function/ToDoubleFunction
-37 -1: (Ljava/lang/String;)Ljava/lang/Class;
-28 -1: MapReduceEntriesToDoubleTask
-38 -1: java/util/LinkedHashMap$LinkedEntrySet
-8 -1: copySign
-6 -1: ([CI)V
-55 -1: sun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule
-12 -1: parseBoolean
-3 -1: NET
-3 -1: NEW
-6 -1: Values
-17 -1: getJavaLangAccess
-9 -1: LocaleKey
-3 -1: :-1
-30 -1: (Ljava/io/ObjectInputStream;)V
-3 -1: NFC
-3 -1: NFD
-18 -1: SIMPLIFIED_CHINESE
-28 -1: ()Ljava/lang/reflect/Method;
-9 -1: localInit
-37 -1: sun/util/locale/LocaleSyntaxException
-15 -1: LambdaForm.java
-5 -1: rtype
-8 -1: field "
-50 -1: (Ljava/lang/Class;Ljava/lang/ref/ReferenceQueue;)V
-80 -1: (Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Class;IILjava/lang/String;[B[B)V
-36 -1: java/lang/invoke/MethodHandleNatives
-22 -1: (Ljava/util/Map<**>;)Z
-22 -1: Ljava/lang/Class<TV;>;
-7 -1: SubList
-14 -1: connect,accept
-19 -1: declaredAnnotations
-38 -1: Ljava/lang/ThreadLocal$ThreadLocalMap;
-11 -1: isSpaceChar
-10 -1: offerFirst
-20 -1: sun/nio/ByteBuffered
-17 -1: packageDefinition
-7 -1: trigger
-35 -1: [Ljava/lang/invoke/LambdaForm$Name;
-19 -1: sun.stdout.encoding
-5 -1: start
-26 -1: (Ljava/util/HashMap;IIII)V
-65 -1: (JLjava/util/function/Consumer<-Ljava/util/Map$Entry<TK;TV;>;>;)V
-6 -1: LOCVER
-3 -1: ://
-42 -1: (CLjava/lang/Class<*>;Ljava/lang/Object;)Z
-6 -1: friday
-45 -1: sun/reflect/DelegatingConstructorAccessorImpl
-15 -1: iso_8859-7:1987
-15 -1: newCalendarDate
-24 -1: getAnnotatedReceiverType
-32 -1: java/util/NoSuchElementException
-50 -1: (Ljava/util/NavigableSet;)Ljava/util/NavigableSet;
-26 -1: java/text/SimpleDateFormat
-16 -1: threadInitNumber
-55 -1: <T:Ljava/lang/Object;>(TT;)Ljava/util/Spliterator<TT;>;
-23 -1: (Ljava/lang/Object;)TT;
-3 1: bar
-37 -1: getFunctionalInterfaceMethodSignature
-5 -1: state
-39 -1: [Ljava/lang/reflect/GenericDeclaration;
-22 -1: sun/net/ProgressSource
-13 -1: LLSpliterator
-93 -1: <T:Ljava/lang/Object;>Ljava/lang/Object;Ljava/util/Enumeration<TT;>;Ljava/util/Iterator<TT;>;
-5 -1: JAPAN
-11 -1: SPACE_TOTAL
-20 -1: CharsetProvider.java
-12 -1: CR_UNDERFLOW
-7 -1: ITALIAN
-11 -1: getCallerPD
-13 -1: isMemberClass
-38 -1: (Ljava/util/function/Consumer<-TT;>;)V
-18 -1: malformedForLength
-14 -1: ReflectionData
-34 -1: (BZI)Ljava/lang/invoke/LambdaForm;
-16 -1: forPrimitiveType
-31 -1: field found in java.lang.Class
-60 -1: (Ljava/lang/Void;Ljava/lang/ThreadGroup;Ljava/lang/String;)V
-18 -1: DescendingIterator
-25 -1: (IZLjava/lang/Runnable;)V
-35 -1: ()[Ljava/lang/reflect/TypeVariable;
-3 -1: bcp
-23 -1: (Ljava/lang/Object;)TV;
-25 -1: setDefaultAssertionStatus
-10 -1: ([BIIIII)V
-150 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;)Ljava/util/concurrent/ConcurrentHashMap$Node<TK;TV;>;
-14 -1: Inherited:
-17 -1: fileTimeToWinTime
-7 -1: ([BI)[B
-26 -1: java/io/OutputStreamWriter
-58 -1: <T:Ljava/lang/Object;>(Ljava/util/ListIterator<+TT;>;I)TT;
-39 -1: sun/reflect/annotation/AnnotationParser
-71 -1: (Ljava/nio/file/Path;Ljava/lang/String;)Ljava/nio/file/DirectoryStream;
-47 -1: Ljava/util/concurrent/locks/ReentrantLock$Sync;
-44 -1: (Ljava/util/Collection;[Ljava/lang/Object;)Z
-43 -1: ([ILjava/util/function/IntBinaryOperator;)V
-29 -1: reverseAllValidSurrogatePairs
-20 -1: Ljava/nio/file/Path;
-20 -1: getGenericSignature0
-42 -1: (Ljava/lang/String;Ljava/lang/Class<*>;Z)V
-8 -1: manEntry
-64 -1: (Ljava/lang/String;)Ljava/util/Enumeration<Lsun/misc/Resource;>;
-36 -1: newGetDoubleIllegalArgumentException
-63 -1: (Ljava/util/Collection;Ljava/lang/Class;)Ljava/util/Collection;
-30 -1: Ergonomics Machine Class:
-40 -1: ()Ljava/util/Map<Ljava/lang/String;TT;>;
-50 -1: (Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
-30 -1: CHECK_MEMBER_ACCESS_PERMISSION
-22 -1: (Ljava/lang/Boolean;)I
-10 -1: V_Variable
-68 -1: java/util/concurrent/ConcurrentHashMap$ForEachTransformedMappingTask
-61 -1: (Ljava/lang/String;IILjava/lang/String;)Ljava/nio/ByteBuffer;
-21 -1: accessClassInPackage.
-44 -1: java/util/WeakHashMap$WeakHashMapSpliterator
-11 -1: nextElement
-9 -1: separator
-48 -1: java/util/zip/ZipFile$ZipFileInflaterInputStream
-44 -1: java/security/UnresolvedPermissionCollection
-10 -1: access$900
-44 -1: java/util/ArraysParallelSortHelpers$FJDouble
-84 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodHandle;
-52 -1: (Ljava/lang/ref/Finalizer;)Ljava/lang/ref/Finalizer;
-19 -1: getDeclaredMethods0
-29 -1: (IJ)Ljava/lang/StringBuilder;
-11 -1: Member.java
-61 -1: (Ljava/lang/String;ZJJ)Ljava/lang/management/MemoryPoolMBean;
-35 -1: java/lang/AssertionStatusDirectives
-23 -1: Declaring class is null
-56 -1: (Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/Object;)I
-12 -1: java/io/File
-41 -1: java/util/ConcurrentModificationException
-47 -1: (Ljava/lang/CharSequence;)Ljava/nio/CharBuffer;
-19 -1: parameterClassCache
-8 -1: US_ASCII
-15 -1: tryMonitorEnter
-22 -1: Ljava/util/Collection;
-67 -1: (Lsun/misc/Signal;Lsun/misc/SignalHandler;)Lsun/misc/SignalHandler;
-27 -1: (Lsun/misc/JavaNioAccess;)V
-9 -1: DigitOnes
-5 -1: write
-31 -1: NF_internalMemberNameEnsureInit
-18 -1: comparableClassFor
-20 -1: defineAnonymousClass
-49 -1: (Ljava/io/InputStream;Lsun/net/ProgressSource;J)V
-31 -1: java/lang/NumberFormatException
-17 -1: remainderUnsigned
-62 -1: <T::Ljava/lang/Comparable<-TT;>;>()Ljava/util/Comparator<TT;>;
-4 -1: Kind
-20 -1: (Ljava/lang/Short;)I
-8 -1: OfDouble
-51 -1: ([Ljava/lang/Object;Ljava/lang/invoke/MethodType;)Z
-22 -1: [Ljava/util/Map$Entry;
-13 -1: instanceClass
-29 -1: ()Ljava/lang/SecurityManager;
-12 -1: isUnmappable
-17 -1: getAllStackTraces
-19 -1: LinkedValueIterator
-7 -1: isDigit
-10 -1: rangeCheck
-89 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;)Ljava/util/List<Ljava/lang/invoke/MemberName;>;
-13 -1: getMethodType
-21 -1: FileOutputStream.java
-22 -1: ()Ljava/text/Collator;
-64 -1: <T:Ljava/lang/Object;>(Ljava/security/PrivilegedAction<TT;>;)TT;
-15 -1: defaultTimeZone
-14 -1: emptySortedMap
-35 -1: (Ljava/util/function/IntConsumer;)V
-45 -1: java/util/Collections$CheckedRandomAccessList
-11 -1: getPriority
-7 -1: signals
-6 -1: Subset
-15 -1: invokeInterface
-16 -1: nameRefsAreLegal
-38 -1: (Ljava/lang/Object;)Ljava/lang/Object;
-37 -1: Ljava/util/Collections$EmptyIterator;
-9 -1: Perf.java
-20 -1: java/math/BigInteger
-38 -1: java/util/WeakHashMap$ValueSpliterator
-71 -1: (Ljava/nio/charset/CodingErrorAction;)Ljava/nio/charset/CharsetEncoder;
-50 -1: (Ljava/lang/invoke/MemberName;Ljava/lang/Object;)V
-21 -1: [Ljava/lang/Class<*>;
-13 -1: getProperties
-63 -1: (Ljava/lang/Class<*>;[B[Ljava/lang/Object;)Ljava/lang/Class<*>;
-65 -1: (Ljava/util/Set<Ljava/lang/Class<*>;>;)[Ljava/lang/reflect/Field;
-21 -1: sun/util/calendar/Era
-21 -1: Ljava/nio/CharBuffer;
-23 -1: (Ljava/lang/Object;JS)V
-24 -1: oracle/jrockit/jfr/VMJFR
-15 -1: access allowed
-34 -1: ()Lsun/util/calendar/CalendarDate;
-97 -1: (Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
-44 -1: ([Ljava/lang/Object;[Ljava/lang/Object;III)V
-48 -1: (Ljava/util/Collection;I)Ljava/util/Spliterator;
-11 -1: SimpleEntry
-63 -1: (Ljava/net/URL;Ljava/net/URLStreamHandler;Ljava/util/HashMap;)V
-8 -1: putFloat
-20 -1: linkToCallSiteMethod
-8 -1: invokers
-35 -1: (J)Lsun/util/calendar/BaseCalendar;
-6 -1: FRENCH
-26 -1: getRawParameterAnnotations
-9 -1: wordIndex
-29 -1: JNI_COPY_FROM_ARRAY_THRESHOLD
-20 -1: sun/nio/cs/Surrogate
-48 -1: (Lsun/misc/JavaSecurityProtectionDomainAccess;)V
-45 -1: (Ljava/lang/ThreadLocal;Ljava/lang/Object;I)V
-3 -1: NST
-14 -1: getHeaderField
-27 -1: (Ljava/util/jar/JarFile;Z)V
-10 -1: findNative
-38 -1: The following can be used with access:
-29 -1: convertCertArrayToSignerArray
-4 -1: .DSA
-12 -1: dependencies
-12 -1: SYNCHRONIZED
-14 -1: x-euc-jp-linux
-28 -1: URLStreamHandlerFactory.java
-11 -1: checkPtypes
-68 -1: (Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)V
-13 -1: addDayOfMonth
-10 -1: isAncestor
-16 -1: entryDislocation
-12 -1: tableSizeFor
-29 -1: (ID)Ljava/lang/StringBuilder;
-19 -1: getLastRuleInstance
-24 -1: getGenericParameterTypes
-8 -1: ,offset=
-37 -1: (Ljava/net/URL;Ljava/lang/String;II)V
-13 -1: UTF_16LE.java
-12 -1: setTimestamp
-31 -1: AtomicReferenceFieldUpdaterImpl
-6 -1: L_URIC
-4 -1: (D)D
-14 -1: DeqSpliterator
-13 -1: LF_INVVIRTUAL
-171 -1: <U:Ljava/lang/Object;W:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;Ljava/lang/Class<TW;>;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater<TU;TW;>;
-4 -1: (D)I
-22 -1: Ljava/lang/Class<TT;>;
-4 -1: (D)J
-196 -1: (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
-13 -1: ,transitions=
-30 -1: (Lsun/net/www/MessageHeader;)I
-4 -1: (D)V
-12 -1: segmentShift
-4 -1: (D)Z
-14 -1: Reference.java
-26 -1: [Ljava/lang/reflect/Field;
-26 -1: java/nio/DirectByteBufferR
-31 -1: lambda$thenComparing$36697e65$1
-30 -1: (Lsun/net/www/MessageHeader;)V
-55 -1: No java.nio.charset.StandardCharsets instances for you!
-59 -1: (Ljava/lang/Class<*>;Ljava/lang/Object;Ljava/lang/Object;)I
-19 -1: thenComparingDouble
-31 -1: ()Ljava/lang/invoke/LambdaForm;
-9 -1: getMillis
-21 -1: StandardCharsets.java
-15 -1: postDefineClass
-8 -1: getExtra
-3 -1: box
-10 -1: nextSetBit
-27 -1: java/util/ArrayList$SubList
-43 -1: (Ljava/util/concurrent/ConcurrentHashMap;)V
-52 -1: (Lsun/misc/URLClassPath;)Ljava/net/URLStreamHandler;
-7 -1: putLong
-40 -1: <T::Ljava/lang/Comparable<-TT;>;>([TT;)V
-8 -1: ([DII)[D
-8 -1: ([SIIS)I
-8 -1: argument
-12 -1: linkCallSite
-56 -1: <T:Ljava/lang/Object;>Ljava/lang/ref/WeakReference<TT;>;
-15 -1: returnSlotCount
-68 -1: (Ljava/lang/String;[Ljava/lang/Class<*>;Z)Ljava/lang/reflect/Method;
-20 -1: defaultDisplayLocale
-21 -1: (Ljava/util/Vector;)V
-49 -1: (Lsun/reflect/generics/visitor/TypeTreeVisitor;)V
-12 -1: isAlphabetic
-5 -1: perms
-13 -1: dosToJavaTime
-8 -1: ([SIIS)V
-7 -1: valueOf
-27 -1: Ljava/util/LinkedList$Node;
-41 -1: (Ljava/lang/String;I)Ljava/lang/Class<*>;
-38 -1: ()Ljava/nio/charset/CodingErrorAction;
-4 -1: MASK
-5 -1: Field
-101 -1: (Ljava/lang/Class;Ljava/nio/ByteBuffer;Lsun/reflect/ConstantPool;Ljava/lang/Class;)Ljava/lang/Object;
-56 -1: (Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;
-9 -1: SURROGATE
-72 -1: (Ljava/lang/invoke/DirectMethodHandle$StaticAccessor;)Ljava/lang/Object;
-19 -1: PARAMETER_MODIFIERS
-48 -1: ([Ljava/lang/Object;II)Ljava/util/stream/Stream;
-56 -1: (TK;TV;Ljava/util/function/BiFunction<-TV;-TV;+TV;>;)TV;
-118 -1: <U:Ljava/lang/Object;>(JLjava/util/function/BiFunction<-TK;-TV;+TU;>;Ljava/util/function/BiFunction<-TU;-TU;+TU;>;)TU;
-29 -1: (Lsun/nio/ch/Interruptible;)V
-45 -1: Ljava/lang/ref/Reference<Ljava/lang/Object;>;
-17 -1: isHeldExclusively
-3 -1: NYI
-15 -1: getByteVolatile
-20 -1: compareAndSwapObject
-29 -1: (Z)[Ljava/lang/reflect/Field;
-7 -1: ([SII)V
-13 -1: toLanguageTag
-18 -1: StreamEncoder.java
-25 -1: (IF)Ljava/nio/ByteBuffer;
-18 -1: afterNodeInsertion
-11 -1: accessOrder
-60 -1: Lsun/reflect/annotation/TypeAnnotation$TypeAnnotationTarget;
-20 -1: META-INF/MANIFEST.MF
-18 -1: getSuperInterfaces
-26 -1: (Ljava/nio/ByteBuffer;IZ)C
-26 -1: (Ljava/nio/ByteBuffer;IZ)D
-9 -1: PROTECTED
-18 -1: not visible from
-26 -1: java/lang/RuntimeException
-26 -1: (Ljava/nio/ByteBuffer;IZ)F
-20 -1: java/net/FileNameMap
-15 -1: insertArguments
-8 -1: diagprop
-26 -1: (Ljava/nio/ByteBuffer;IZ)I
-26 -1: (Ljava/nio/ByteBuffer;IZ)J
-20 -1: createContentHandler
-11 -1: getProtocol
-26 -1: (Ljava/nio/ByteBuffer;IZ)S
-33 -1: Ljava/lang/NoSuchMethodException;
-19 -1: entry name too long
-40 -1: java/util/jar/JarVerifier$VerifierStream
-6 -1: server
-7 -1: OCTOBER
-26 -1: sun/invoke/util/VerifyType
-6 -1: domain
-9 -1: getUnsafe
-5 -1: ([Z)I
-4 -1: cons
-42 -1: ()Ljava/lang/ReflectiveOperationException;
-4 -1: byte
-29 -1: java/util/function/BiConsumer
-24 -1: getJavaUtilZipFileAccess
-37 -1: ([Ljava/lang/Object;)Ljava/util/List;
-27 -1: timeout can not be negative
-62 -1: Ljava/util/Map<Ljava/io/InputStream;Ljava/util/zip/Inflater;>;
-16 -1: getOurStackTrace
-34 -1: (J)Ljava/lang/ref/Reference<+TT;>;
-50 -1: Lsun/reflect/generics/repository/MethodRepository;
-20 -1: MIN_BYTE_BUFFER_SIZE
-3 -1: buf
-13 -1: getAttributes
-6 -1: GERMAN
-38 -1: java/security/NoSuchAlgorithmException
-20 -1: Direct buffer memory
-6 -1: (IIZ)V
-27 -1: JVMTI_THREAD_STATE_RUNNABLE
-26 -1: [Ljava/io/File$PathStatus;
-36 -1: (Ljava/util/List;Ljava/lang/Class;)V
-13 -1: JarIndex.java
-34 -1: java/lang/Character$CharacterCache
-8 -1: csIBM857
-10 -1: LineReader
-28 -1: Ljava/lang/RuntimeException;
-30 -1: ()Ljava/util/Enumeration<TV;>;
-12 -1: getSeparator
-124 -1: (Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;
-97 -1: Ljava/util/Map<Ljava/lang/Integer;Ljava/lang/ref/WeakReference<Ljava/nio/charset/CoderResult;>;>;
-21 -1: ConstantCallSite.java
-40 -1: sun/util/locale/provider/LocaleResources
-101 -1: <U::Ljava/lang/Comparable<-TU;>;>(Ljava/util/function/Function<-TT;+TU;>;)Ljava/util/Comparator<TT;>;
-4 -1: copy
-23 -1: sun/security/util/Debug
-10 -1: isAbsolute
-34 -1: (Ljava/lang/invoke/MethodHandle;)V
-34 -1: (Ljava/lang/invoke/MethodHandle;)Z
-48 -1: ()[Ljava/util/concurrent/ConcurrentHashMap$Node;
-34 -1: (Lsun/reflect/LangReflectAccess;)V
-8 -1: csIBM862
-8 -1: csIBM866
-64 -1: java/util/concurrent/ConcurrentHashMap$MapReduceKeysToDoubleTask
-39 -1: No java.util.Objects instances for you!
-68 -1: (Ljava/util/PrimitiveIterator$OfInt;JI)Ljava/util/Spliterator$OfInt;
-19 -1: Illegal class name
-24 -1: uncaughtExceptionHandler
-12 -1: runFinalizer
-23 -1: java/io/FileInputStream
-41 -1: (Ljava/lang/Class<*>;Ljava/lang/String;)V
-98 -1: (Ljava/util/HashMap$Node<TK;TV;>;Ljava/util/HashMap$Node<TK;TV;>;)Ljava/util/HashMap$Node<TK;TV;>;
-30 -1: java/nio/charset/CoderResult$1
-20 -1: SourceDebugExtension
-30 -1: java/nio/charset/CoderResult$2
-69 -1: ([Ljava/security/ProtectionDomain;[Ljava/security/ProtectionDomain;)Z
-14 -1: 1.8.0-internal
-16 -1: ReduceValuesTask
-13 -1: toLowerString
-14 -1: newPrintStream
-13 -1: unicodelittle
-19 -1: getClassLoadingLock
-9 -1: DigitTens
-80 -1: (Ljava/lang/Class<*>;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodType;
-12 -1: sun_eu_greek
-21 -1: getBootstrapClassPath
-9 -1: volatile
-15 -1: UnmodifiableMap
-21 -1: enumConstantDirectory
-10 -1: getContent
-4 -1: cosh
-74 -1: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
-11 -1: ([JII[JII)V
-28 -1: java/lang/reflect/Executable
-17 -1: MapReduceKeysTask
-6 -1: isOpen
-17 -1: AnnotationDefault
-17 -1: Already connected
-27 -1: (Lsun/misc/JavaNetAccess;)V
-34 -1: ([BILjava/nio/charset/Charset;Z)[B
-55 -1: Ljava/lang/invoke/DirectMethodHandle$EnsureInitialized;
-8 -1: Set.java
-10 -1: DEAD_ENTRY
-7 -1: nextInt
-3 -1: wtb
-23 -1: java/util/Collections$1
-86 -1: (Lsun/reflect/generics/factory/GenericsFactory;)Lsun/reflect/generics/visitor/Reifier;
-23 -1: java/util/Collections$2
-23 -1: java/util/Collections$3
-18 -1: DoubleCumulateTask
-22 -1: skip value is negative
-85 -1: (Ljava/io/InputStream;Ljava/lang/Object;Ljava/lang/String;)Lsun/nio/cs/StreamDecoder;
-5 -1: \\[\\]$
-34 -1: Ljava/util/NoSuchElementException;
-3 -1: NaN
-30 -1: sun/util/calendar/CalendarDate
-10 -1: V_Constant
-20 -1: java/lang/Comparable
-9 -1: text/html
-20 -1: -9223372036854775808
-20 -1: DataInputStream.java
-20 -1: Member defaults:
-35 -1: Ljava/lang/ref/ReferenceQueue$Lock;
-8 -1: getBytes
-17 -1: CodePointIterator
-11 -1: Signal.java
-19 -1: javaHomePrefixCache
-12 -1: replaceFirst
-37 -1: Ljava/lang/IndexOutOfBoundsException;
-39 -1: (Ljava/lang/String;ZI)Ljava/lang/Class;
-21 -1: initSystemClassLoader
-28 -1: America/Indiana/Indianapolis
-47 -1: (Ljava/security/Permission;Ljava/lang/Object;)V
-27 -1: java/net/URISyntaxException
-21 -1: createSecurityManager
-7 -1: suspend
-12 -1: L_UNRESERVED
-17 -1: checkMemberAccess
-12 -1: CoreCounters
-19 -1: java/net/HttpCookie
-8 -1: isGetter
-17 -1: setDaylightSaving
-27 -1: java.launcher.javafx.error1
-53 -1: java/util/concurrent/ConcurrentHashMap$CollectionView
-16 -1: readUnsignedByte
-47 -1: (Ljava/lang/String;)Ljava/net/URLStreamHandler;
-40 -1: (Z)[Ljava/lang/reflect/Constructor<TT;>;
-14 -1: javaLangAccess
-5 -1: apply
-8 -1: getFloat
-15 -1: getD3DAvailable
-25 -1: startLocalManagementAgent
-7 -1: RUNTIME
-22 -1: LocalVariableTypeTable
-8 -1: doOutput
-16 -1: CheckedSortedSet
-10 -1: zoneOffset
-64 -1: (Ljava/security/Permission;)Ljava/security/PermissionCollection;
-13 -1: hasUnresolved
-13 -1: user.language
-11 -1: getDoubleAt
-14 -1: getQueueLength
-37 -1: java/nio/DirectByteBuffer$Deallocator
-6 -1: ASHIFT
-9 -1: checkPath
-80 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;Ljava/lang/Class;)V
-6 -1: CENEXT
-16 -1: doubleToLongBits
-11 -1: copyToArray
-9 -1: copyField
-36 -1: ()Lsun/util/calendar/Gregorian$Date;
-53 -1: (ILjava/lang/Object;)Ljava/util/HashMap$Node<TK;TV;>;
-44 -1: (TK;TV;Ljava/lang/ref/ReferenceQueue<TV;>;)V
-35 -1: java/util/Collections$EmptyIterator
-38 -1: sealing violation: can't seal package
-37 -1: (Ljava/util/Queue;Ljava/lang/Class;)V
-129 -1: (Ljava/lang/Class<*>;Ljava/lang/String;[Ljava/lang/Class<*>;Ljava/lang/Class<*>;[Ljava/lang/Class<*>;IILjava/lang/String;[B[B[B)V
-18 -1: HashMapSpliterator
-8 -1: putShort
-23 -1: (Ljava/lang/Object;II)V
-7 -1: GERMANY
-13 -1: toTitleString
-102 -1: (Ljava/util/ArrayPrefixHelpers$CumulateTask;Ljava/util/function/BinaryOperator;[Ljava/lang/Object;II)V
-44 -1: ([Ljava/lang/Object;)Ljava/util/Spliterator;
-6 -1: unused
-25 -1: java/net/URLClassLoader$1
-25 -1: java/net/URLClassLoader$2
-25 -1: java/net/URLClassLoader$3
-25 -1: java/net/URLClassLoader$4
-12 -1: getFixedDate
-25 -1: java/net/URLClassLoader$5
-4 -1: time
-25 -1: java/net/URLClassLoader$6
-25 -1: java/net/URLClassLoader$7
-14 -1: historicalName
-12 -1: normalizeKey
-13 -1: MIN_SURROGATE
-41 -1: java/nio/charset/CharacterCodingException
-18 -1: java/lang/Iterable
-8 -1: ([JII)[J
-103 -1: Ljava/util/Map<Ljava/lang/Class<+Ljava/lang/annotation/Annotation;>;Ljava/lang/annotation/Annotation;>;
-18 -1: putBooleanVolatile
-5 -1: Entry
-11 -1: CounterCell
-12 -1: monitorEnter
-10 -1: skipBuffer
-15 -1: hasMoreElements
-24 -1: newIllegalStateException
-24 -1: Ljava/lang/LinkageError;
-12 -1: getEntryFlag
-44 -1: (Ljava/lang/Throwable$PrintStreamOrWriter;)V
-18 -1: java/nio/IntBuffer
-17 -1: jdk_minor_version
-28 -1: DIRECTIONALITY_RIGHT_TO_LEFT
-15 -1: getAndSetObject
-7 -1: sizeCtl
-15 -1: Ljava/util/Set;
-32 -1: (I)Ljava/lang/invoke/LambdaForm;
-16 -1: runFinalization0
-30 -1: Ljava/lang/reflect/Executable;
-15 -1: compareUnsigned
-5 -1: nkeys
-31 -1: Ljava/nio/channels/FileChannel;
-40 -1: sun/reflect/generics/tree/ClassSignature
-22 -1: (Ljava/lang/Object;I)B
-22 -1: (Ljava/lang/Object;I)C
-22 -1: (Ljava/lang/Object;I)D
-7 -1: JANUARY
-30 -1: newGetIllegalArgumentException
-22 -1: (Ljava/lang/Object;I)F
-22 -1: (Ljava/lang/Object;I)I
-22 -1: (Ljava/lang/Object;I)J
-28 -1: generateNamedFunctionInvoker
-38 -1: (Ljava/lang/String;)Ljava/time/ZoneId;
-19 -1: lambda$codePoints$2
-4 -1: Null
-7 -1: setEras
-15 -1: lambda$chars$15
-14 -1: CollectionView
-24 -1: (C)Ljava/io/PrintStream;
-22 -1: (Ljava/lang/Object;I)S
-96 -1: (Ljava/security/AccessControlContext;Lsun/security/util/Debug;Ljava/security/ProtectionDomain;)V
-17 -1: getJulianCalendar
-22 -1: (Ljava/lang/Object;I)V
-17 -1: getMethodAccessor
-9 -1: not owner
-35 -1: java/lang/reflect/ParameterizedType
-15 -1: ValueCollection
-22 -1: (Ljava/lang/Object;I)Z
-4 -1: utf8
-5 -1: CHINA
-9 -1: sprintf0d
-18 -1: java/nio/file/Path
-35 -1: DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
-30 -1: URI has an authority component
-43 -1: (Ljava/lang/Object;)Ljava/util/Spliterator;
-15 -1: <no principals>
-62 -1: (Lsun/util/locale/BaseLocale$Key;)Lsun/util/locale/BaseLocale;
-6 -1: ([ZZ)V
-10 -1: getContext
-12 -1: content-type
-99 -1: (Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;ILjava/util/WeakHashMap$Entry;)V
-51 -1: (Ljava/util/concurrent/ConcurrentHashMap<TK;TV;>;)V
-27 -1: Invalid constant pool index
-20 -1: getUnicodeLocaleType
-43 -1: Ljava/nio/charset/CharacterCodingException;
-113 -1: (Ljava/net/URL;Ljava/net/URLStreamHandler;Ljava/util/HashMap<Ljava/lang/String;Lsun/misc/URLClassPath$Loader;>;)V
-56 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/Locale;
-24 -1: Lsun/misc/SignalHandler;
-8 -1: readlink
-125 -1: (Ljava/nio/file/WatchService;[Ljava/nio/file/WatchEvent$Kind<*>;[Ljava/nio/file/WatchEvent$Modifier;)Ljava/nio/file/WatchKey;
-11 -1: initStatics
-15 -1: unmappableCache
-13 -1: fixMethodType
-25 -1: sun/net/www/MessageHeader
-3 -1: cdt
-27 -1: Ljava/util/Locale$Category;
-59 -1: (ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object;
-8 -1: Accessor
-14 -1: mapLibraryName
-54 -1: (Lsun/misc/URLClassPath$JarLoader;)Lsun/misc/JarIndex;
-24 -1: ZoneOffsetTransitionRule
-7 -1: getChar
-3 -1: cee
-25 -1: MapReduceValuesToLongTask
-20 -1: declaredPublicFields
-44 -1: (Ljava/lang/ClassLoader;Ljava/lang/String;)J
-13 -1: removeElement
-20 -1: Ljava/nio/ByteOrder;
-8 -1: parallel
-67 -1: (Ljava/lang/reflect/Constructor;Lsun/reflect/ConstructorAccessor;)V
-22 -1: java/util/zip/ZipCoder
-8 -1: ([ZIIZ)V
-45 -1: (Ljava/lang/String;Ljava/lang/CharSequence;)Z
-8 -1: february
-40 -1: java/util/zip/ZipFile$ZipFileInputStream
-47 -1: java/nio/charset/Charset$ExtendedProviderHolder
-13 -1: IEEEremainder
-15 -1: sun/misc/Perf$1
-9 -1: abstract
-20 -1: ()Ljava/time/ZoneId;
-7 -1: ONE_DAY
-92 -1: (Ljava/util/concurrent/ConcurrentHashMap$Node;)Ljava/util/concurrent/ConcurrentHashMap$Node;
-45 -1: (Ljava/util/ListIterator;I)Ljava/lang/Object;
-16 -1: Buffer size <= 0
-9 -1: checkName
-11 -1: getJarEntry
-20 -1: Replacement too long
-53 -1: (Ljava/lang/String;)Ljava/nio/charset/CharsetDecoder;
-12 -1: isWhitespace
-15 -1: csISOLatinGreek
-70 -1: (Ljava/lang/reflect/Constructor<*>;Lsun/reflect/ConstructorAccessor;)V
-20 -1: TypeAnnotationTarget
-3 -1: No
-27 -1: Lsun/reflect/FieldAccessor;
-12 -1: doPrivileged
-83 -1: (JLjava/util/function/ToIntFunction<-TV;>;ILjava/util/function/IntBinaryOperator;)I
-60 -1: (Ljava/nio/file/attribute/FileTime;)Ljava/util/zip/ZipEntry;
-11 -1: changeEntry
-18 -1: MessageHeader.java
-51 -1: ([Ljava/lang/String;Ljava/util/Map;)Ljava/util/Map;
-9 -1: castEntry
-16 -1: ACCESS_MODIFIERS
-11 -1: newInstance
-24 -1: lastIndexOfSupplementary
-13 -1: JZENTRY_EXTRA
-5 -1: LONGS
-7 -1: domain
-16 -1: protocolPathProp
-21 -1: java/util/Hashtable$1
-10 -1: isSameDate
-23 -1: (I)Ljava/nio/file/Path;
-33 -1: java/util/PrimitiveIterator$OfInt
-7 -1: ([II)[I
-8 -1: variant=
-29 -1: (Ljava/util/Collection<*>;Z)Z
-38 -1: already loaded in another classloader
-10 -1: setSeconds
-9 -1: makeShort
-59 -1: ClassLoader.findLibrary failed to return an absolute path:
-26 -1: java/util/jar/JarException
-9 -1: setCharAt
-13 -1: initCauseFrom
-13 -1: val$fieldName
-18 -1: MIN_HIGH_SURROGATE
-60 -1: (Lsun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule;)B
-25 -1: getDayOfWeekFromFixedDate
-10 -1: maybeReBox
-9 -1: getHandle
-60 -1: (Lsun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule;)I
-59 -1: ([Ljava/lang/Class<*>;)Ljava/lang/reflect/Constructor<TT;>;
-3 -1: cis
-11 -1: getIssuerDN
-9 -1: codebase=
-80 -1: (ILjava/lang/invoke/BoundMethodHandle$SpeciesData;)Ljava/lang/invoke/LambdaForm;
-29 -1: addThreadDumpForSynchronizers
-6 -1: FRANCE
-77 -1: <T:Ljava/lang/Object;U:Ljava/lang/Object;>([TU;ILjava/lang/Class<+[TT;>;)[TT;
-45 -1: <T:Ljava/lang/Object;>()Ljava/util/List<TT;>;
-16 -1: putFloatVolatile
-34 -1: (Ljava/lang/Class;)Ljava/util/Map;
-28 -1: ()Ljava/security/Permission;
-28 -1: (Ljava/lang/CharSequence;I)I
-51 -1: ()Ljava/util/Enumeration<Ljava/util/jar/JarEntry;>;
-25 -1: (II)Ljava/nio/ByteBuffer;
-20 -1: BasicPermission.java
-5 -1: isNaN
-48 -1: (Ljava/lang/Throwable;)Ljava/lang/InternalError;
-10 -1: ONE_MINUTE
-55 -1: (Ljava/lang/invoke/DirectMethodHandle$StaticAccessor;)J
-13 -1: DAYS_IN_MONTH
-7 -1: domains
-10 -1: isUnshared
-58 -1: Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Long;>;
-47 -1: (Ljava/util/List;)Ljava/security/cert/CertPath;
-28 -1: ()Ljava/util/Enumeration<*>;
-34 -1: sun/misc/Launcher$ExtClassLoader$1
-22 -1: (CLjava/lang/Object;)Z
-64 -1: Ljava/lang/ref/WeakReference<Ljava/nio/charset/CharsetDecoder;>;
-7 -1: ENGLISH
-27 -1: (Ljava/util/zip/Inflater;)V
-24 -1: makeArrayElementAccessor
-72 -1: (Ljava/lang/Class<*>;[Ljava/lang/Class<*>;)Ljava/lang/invoke/MethodType;
-48 -1: (Ljava/util/jar/JarFile;)Ljava/util/Enumeration;
-48 -1: (Ljava/lang/Class;)Ljava/lang/invoke/MethodType;
-15 -1: getNthDayOfWeek
-16 -1: printHelpMessage
-15 -1: getAbsoluteFile
-9 -1: OPEN_READ
-19 -1: willGMTOffsetChange
-28 -1: (Ljava/util/LinkedHashMap;)V
-37 -1: java/security/AllPermissionCollection
-5 -1: [id="
-34 -1: java/lang/invoke/BoundMethodHandle
-31 -1: ()Ljava/security/cert/CertPath;
-50 -1: java/util/ArraysParallelSortHelpers$FJShort$Sorter
-14 -1: StaticAccessor
-22 -1: synchronizedCollection
-53 -1: ([Ljava/io/File;)Ljava/security/AccessControlContext;
-37 -1: (Ljava/lang/Class;Ljava/lang/Class;)Z
-14 -1: codePointCount
-13 -1: is param at
-37 -1: Ljava/lang/invoke/MemberName$Factory;
-20 -1: annotationDataOffset
-31 -1: protocol doesn't support output
-11 -1: hostAddress
-12 -1: ,dstSavings=
-35 -1: java.lang.Integer.IntegerCache.high
-15 -1: ParallelLoaders
-48 -1: (Ljava/util/Locale;)Lsun/util/locale/BaseLocale;
-8 -1: getSize0
-22 -1: checkCreateClassLoader
-8 -1: transfer
-32 -1: (Lsun/misc/JavaSecurityAccess;)V
-26 -1: ()Ljava/net/URLConnection;
-3 -1: cmp
-9 -1: setMillis
-34 -1: sun/util/calendar/AbstractCalendar
-19 -1: getDirectBufferPool
-7 -1: ([FII)V
-28 -1: ([C)Ljava/lang/StringBuffer;
-54 -1: (Ljava/lang/Class<*>;)Ljava/security/ProtectionDomain;
-26 -1: (Ljava/nio/ByteBuffer;IF)V
-11 -1: discardMark
-71 -1: (Ljava/lang/Class;)Lsun/util/locale/provider/LocaleServiceProviderPool;
-30 -1: java/io/UTFDataFormatException
-53 -1: (Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;
-48 -1: java/util/concurrent/ConcurrentHashMap$Traverser
-5 -1: ([F)I
-37 -1: (IC)Ljava/lang/AbstractStringBuilder;
-27 -1: Ljava/util/jar/JarVerifier;
-22 -1: java/util/Spliterators
-32 -1: java/lang/invoke/MutableCallSite
-20 -1: java/io/Serializable
-5 -1: ([F)V
-35 -1: (Ljava/security/ProtectionDomain;)V
-33 -1: ()Ljava/lang/ref/Reference<+TT;>;
-10 -1: unlinkLast
-6 -1: (JSZ)V
-8 -1: isStatic
-14 -1: subclassAudits
-23 -1: (Ljava/lang/String;)TT;
-17 -1: java.awt.headless
-9 -1: <Unknown>
-39 -1: Lsun/util/locale/LocaleSyntaxException;
-8 -1: location
-3 -1: cos
-27 -1: createGarbageCollectorMBean
-20 -1: MAX_MH_INVOKER_ARITY
-75 -1: (Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult;
-14 -1: Cloneable.java
-50 -1: (Lsun/reflect/DelegatingConstructorAccessorImpl;)V
-26 -1: sun/nio/ch/FileChannelImpl
-51 -1: (Ljava/lang/Class;Ljava/lang/reflect/Constructor;)V
-18 -1: Unknown byte order
-28 -1: ()[Lsun/invoke/util/Wrapper;
-21 -1: getReadClassBytesTime
-64 -1: (Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodTypeForm;
-11 -1: setDelegate
-20 -1: (Ljava/util/List;)[C
-7 -1: usemmap
-22 -1: (CC)Ljava/lang/String;
-34 -1: sun/invoke/util/BytecodeDescriptor
-21 -1: getJavaSecurityAccess
-53 -1: (Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult;
-7 -1: ibm-737
-19 -1: (Ljava/lang/Enum;)I
-4 -1: rint
-11 -1: Constructor
-9 -1: arraycopy
-35 -1: ([D)Ljava/util/stream/DoubleStream;
-13 -1: comparingLong
-40 -1: <T:Ljava/lang/Object;>Ljava/lang/Object;
-23 -1: OutputStreamWriter.java
-8 -1: getShort
-17 -1: CLASSPATH_LASTOCC
-13 -1: createNewFile
-14 -1: internalValues
-34 -1: Ljava/lang/IllegalAccessException;
-23 -1: (JILjava/lang/Object;)V
-27 -1: sun.misc.URLClassPath.debug
-45 -1: [Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
-35 -1: ()Lsun/reflect/ConstructorAccessor;
-12 -1: classEnabled
-23 -1: cachedFixedDateNextJan1
-48 -1: (Ljava/util/Locale$LocaleKey;)Ljava/util/Locale;
-26 -1: (Ljava/lang/ThreadGroup;)V
-7 -1: setErr0
-6 -1: CENFLG
-26 -1: (Ljava/lang/ThreadGroup;)Z
-18 -1: sun/misc/MetaIndex
-3 -1: crc
-34 -1: (Z)Ljava/lang/invoke/MethodHandle;
-12 -1: replaceNames
-15 -1: java/util/Stack
-57 -1: Ljava/util/Vector<Ljava/lang/ClassLoader$NativeLibrary;>;
-89 -1: (JLjava/util/function/ToDoubleFunction<-TV;>;DLjava/util/function/DoubleBinaryOperator;)D
-24 -1: permission can't be null
-22 -1: Unable to connect to:
-44 -1: (Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
-14 -1: floatToIntBits
-11 -1: getLastRule
-6 -1: EXTCRC
-26 -1: java/net/InetSocketAddress
-36 -1: (Lsun/misc/URLClassPath$JarLoader;)V
-27 3: sun/launcher/LauncherHelper
-8 -1: ecma-118
-49 -1: (Ljava/net/URL;Ljava/lang/String;)[Ljava/net/URL;
-13 -1: hashCodeValue
-5 -1: CESU8
-21 -1: appendVmSelectMessage
-13 -1: bindImmediate
-12 -1: closeLoaders
-16 -1: emptySpliterator
-28 -1: (J)Ljava/time/LocalDateTime;
-22 -1: [Ljava/lang/Character;
-5 -1: certs
-6 -1: (null)
-25 -1: java/io/ObjectInputStream
-27 -1: ([Ljava/lang/ThreadGroup;)I
-3 -1: cst
-3 -1: csu
-20 -1: java/nio/ShortBuffer
-53 -1: (Ljava/lang/ClassValue;Ljava/lang/ClassValue$Entry;)V
-4 -1: (Z)I
-24 -1: Ljava/io/FileDescriptor;
-6 -1: cclass
-10 -1: , profile
-39 -1: (Ljava/lang/String;)Ljava/lang/Process;
-4 -1: (Z)V
-5 -1: toURI
-24 -1: ConstructorAccessor.java
-5 -1: toURL
-18 -1: addAllIfNotPresent
-4 -1: (Z)Z
-5 -1: parse
-11 -1: isPrimitive
-42 -1: (Ljava/io/File;)Ljava/lang/ProcessBuilder;
-36 -1: (Ljava/util/Date;)Ljava/lang/String;
-23 -1: getFormalTypeParameters
-13 -1: Resource.java
-7 -1: ibm-775
-6 -1: isEnum
-24 -1: setJavaUtilZipFileAccess
-21 -1: \t[CIRCULAR REFERENCE:
-51 -1: (Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
-24 -1: (I)Ljava/nio/ByteBuffer;
-53 -1: sun/reflect/generics/repository/GenericDeclRepository
-3 -1: xor
-17 -1: invokeBasicMethod
-27 -1: java/lang/invoke/LambdaForm
-99 -1: (Ljava/util/jar/Manifest;Ljava/util/jar/JarEntry;Ljava/io/InputStream;Ljava/util/jar/JarVerifier;)V
-46 -1: Lsun/reflect/generics/factory/GenericsFactory;
-37 -1: sun/misc/Launcher$BootClassPathHolder
-10 -1: BindCaller
-24 -1: java/lang/reflect/Member
-32 -1: java/lang/management/ThreadState
-5 -1: (IB)V
-21 -1: RuntimeException.java
-5 -1: ended
-17 -1: java/util/TreeSet
-7 -1: : no !/
-16 -1: java/util/Vector
-9 -1: nextAfter
-22 -1: Ljava/lang/Deprecated;
-20 -1: requestedCharsetName
-37 -1: ([JIII)Ljava/util/Spliterator$OfLong;
-14 -1: internArgument
-11 -1: getTimeZone
-10 -1: isValidKey
-11 -1: LAST_RESULT
-43 -1: sun/reflect/annotation/TypeAnnotationParser
-13 -1: encodedInPath
-52 -1: (Ljava/security/PrivilegedAction;)Ljava/lang/Object;
-4 -1: LL_L
-34 -1: java/nio/charset/CodingErrorAction
-10 -1: copyFields
-11 -1: getConstant
-9 -1: threshold
-13 -1: aliases_UTF_8
-27 -1: (Ljava/util/ArrayDeque;II)V
-29 -1: Ljava/lang/ref/SoftReference;
-19 -1: indexedBinarySearch
-11 -1: containsKey
-81 -1: ([Ljava/lang/ClassValue$Entry;Ljava/lang/ClassValue;)Ljava/lang/ClassValue$Entry;
-86 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/Class<*>;II)Ljava/lang/invoke/MethodHandle;
-15 -1: cannot convert
-25 -1: getSystemResourceAsStream
-46 -1: (Ljava/util/Properties;)Ljava/util/Properties;
-12 -1: reverseOrder
-16 -1: getSystemPackage
-8 -1: ([SII)[S
-19 -1: makeAccessException
-100 -1: <U:Ljava/lang/Object;>(JLjava/util/function/Function<-TK;+TU;>;Ljava/util/function/Consumer<-TU;>;)V
-39 -1: ([Ljava/lang/Class;I)[Ljava/lang/Class;
-19 -1: Ljava/lang/Boolean;
-6 -1: Hidden
-47 -1: java/lang/invoke/MethodHandleImpl$ArrayAccessor
-5 -1: APRIL
-8 -1: emptySet
-11 -1: getCombiner
-58 -1: (Ljava/lang/String;I[Ljava/lang/invoke/LambdaForm$Name;I)V
-24 -1: java.system.class.loader
-14 -1: Can't handle:
-16 -1: isNullConversion
-38 -1: ()Ljava/util/HashMap$TreeNode<TK;TV;>;
-29 -1: referenceKindIsConsistentWith
-11 -1: flushBuffer
-8 -1: putField
-27 -1: ()Ljava/security/PublicKey;
-53 -1: ()Ljava/util/stream/Stream<Ljava/util/jar/JarEntry;>;
-10 -1: pathToURLs
-26 -1: throwIllegalStateException
-10 -1: markedChar
-14 -1: isNativeMethod
-36 -1: (I)Ljava/lang/AbstractStringBuilder;
-54 -1: java/util/concurrent/ConcurrentHashMap$ReservationNode
-45 -1: Lsun/misc/JavaSecurityProtectionDomainAccess;
-62 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;Ljava/lang/Object;I)V
-7 -1: subList
-8 -1: UTF_32BE
-6 -1: U_None
-50 -1: sun/reflect/generics/repository/AbstractRepository
-62 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;Ljava/lang/Object;I)Z
-43 -1: sun/net/www/protocol/file/FileURLConnection
-13 -1: setZoneOffset
-43 -1: Underlying input stream returned zero bytes
-54 -1: [a-zA-Z_$][a-zA-Z0-9_$]*([.][a-zA-Z_$][a-zA-Z0-9_$]*)*
-13 -1: containsValue
-44 -1: (Ljava/nio/CharBuffer;)Ljava/nio/ByteBuffer;
-25 -1: isNullReferenceConversion
-38 -1: Ljava/util/Vector<Ljava/lang/String;>;
-6 -1: toFile
-7 -1: getSlot
-17 -1: (Ljava/net/URI;)V
-32 -1: java.security.cert.Certificate:
-24 -1: ()Lsun/misc/PerfCounter;
-11 -1: Asia/Hebron
-16 -1: createMemoryPool
-10 -1: addToCache
-29 -1: Ljava/lang/invoke/DontInline;
-39 -1: java/lang/ref/Finalizer$FinalizerThread
-58 -1: (Ljava/lang/Class;)Lsun/reflect/generics/scope/ClassScope;
-20 -1: getBooleanAttributes
-15 -1: parallelLockMap
-34 -1: java/util/Vector$VectorSpliterator
-21 -1: createMemoryPoolMBean
-15 -1: no content-type
-41 -1: Couldn't find 3-letter language code for
-5 -1: slash
-34 -1: Ljava/lang/annotation/ElementType;
-8 -1: isSetter
-26 -1: (ZLjava/lang/String;JJJZ)V
-6 -1: GMT_ID
-73 -1: ()[Ljava/lang/reflect/TypeVariable<Ljava/lang/reflect/Constructor<TT;>;>;
-56 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
-32 -1: (Ljava/util/Set;)Ljava/util/Set;
-4 -1: stop
-62 -1: (Ljava/lang/String;IILjava/lang/String;I)Ljava/nio/ByteBuffer;
-11 -1: genericInfo
-11 -1: listToArray
-26 -1: ()Ljava/util/jar/Manifest;
-13 -1: putOrderedInt
-5 -1: flush
-13 -1: ArrayAccessor
-4 -1: Name
-95 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;[Ljava/util/concurrent/ConcurrentHashMap$Node;)V
-68 -1: (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-23 -1: java/lang/ref/Reference
-37 -1: (Ljava/nio/file/attribute/FileTime;)J
-14 -1: MIN_CODE_POINT
-9 -1: ISO8859-1
-9 -1: ISO8859-2
-9 -1: ISO8859-5
-34 -1: ([CILjava/nio/charset/Charset;Z)[C
-9 -1: ISO8859-9
-9 -1: getUTF8At
-12 -1: java/net/URI
-67 -1: (Ljava/io/DataInput;Ljava/lang/String;)Lsun/util/calendar/ZoneInfo;
-22 -1: ListCompositionPattern
-67 -1: (Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;
-3 1: xxx
-12 -1: java/net/URL
-27 -1: Can't overwrite cause with
-30 -1: sun/util/locale/BaseLocale$Key
-22 -1: forkSecondaryFinalizer
-23 -1: java/security/Principal
-8 -1: makeSite
-17 -1: NEGATIVE_INFINITY
-12 -1: addUnstarted
-12 -1: internalForm
-9 -1: cellsBusy
-23 -1: (Ljava/lang/Object;IJ)V
-13 -1: getParameters
-6 -1: H_PATH
-10 -1: L_REG_NAME
-139 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/AbstractMap<TK;TV;>;Ljava/util/Map<TK;TV;>;Ljava/lang/Cloneable;Ljava/io/Serializable;
-6 -1: latin0
-10 -1: addSeconds
-6 -1: latin1
-6 -1: latin2
-6 -1: latin4
-6 -1: latin5
-17 -1: getWaitingThreads
-6 -1: latin9
-21 -1: java/util/Comparators
-10 -1: trimToSize
-96 -1: <T:Ljava/lang/Object;>(Ljava/util/Collection<TT;>;Ljava/lang/Object;)Ljava/util/Collection<TT;>;
-43 -1: ([JLjava/util/function/IntToLongFunction;)V
-23 -1: GET_COMBINER_PERMISSION
-20 -1: lambda$replaceAll$14
-5 -1: KOREA
-20 -1: getJvmSpecialVersion
-9 -1: dumpStack
-16 -1: CACHE_LOAD_LIMIT
-43 -1: GSS LoginConfigImpl debugging
-26 -1: (DLjava/lang/Appendable;)V
-8 -1: forName0
-35 -1: java/lang/ClassLoader$NativeLibrary
-46 -1: java/util/concurrent/ConcurrentHashMap$Segment
-24 -1: getDeclaredAnnotationMap
-89 -1: java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1
-20 -1: java_runtime_version
-26 -1: java/util/stream/IntStream
-16 -1: Ljava/io/Writer;
-69 -1: ()Ljava/util/SortedMap<Ljava/lang/String;Ljava/nio/charset/Charset;>;
-15 -1: getClassLoader0
-6 -1: x86_64
-11 -1: isInterface
-15 -1: MODIFIER_SYMBOL
-44 -1: Note: Separate multiple options with a comma
-9 -1: recursive
-19 -1: java/nio/CharBuffer
-8 -1: capacity
-17 -1: validateMainClass
-50 -1: (Ljava/util/Set;Ljava/lang/Object;)Ljava/util/Set;
-22 -1: (Ljava/lang/Object;J)B
-22 -1: (Ljava/lang/Object;J)C
-22 -1: (Ljava/lang/Object;J)D
-17 -1: not a method type
-22 -1: (Ljava/lang/Object;J)F
-5 -1: count
-32 -1: AtomicReferenceFieldUpdater.java
-22 -1: (Ljava/lang/Object;J)I
-14 -1: methodAccessor
-22 -1: (Ljava/lang/Object;J)J
-7 -1: isError
-51 -1: (Ljava/nio/Buffer;II)Ljava/nio/charset/CoderResult;
-53 -1: (BZLjava/lang/Class<*>;)Ljava/lang/invoke/LambdaForm;
-25 -1: <no signer certificates>
-5 -1: [pos=
-14 -1: lambda$chars$1
-9 -1: CELLVALUE
-16 -1: haveLeftoverChar
-22 -1: ([Ljava/lang/String;)V
-32 -1: java/lang/InstantiationException
-7 -1: SIG_IGN
-13 -1: ZipUtils.java
-50 -1: Ljava/lang/ref/ReferenceQueue<Ljava/lang/Object;>;
-22 -1: (Ljava/lang/Object;J)S
-69 -1: Ljava/util/HashMap<Ljava/lang/String;Lsun/misc/URLClassPath$Loader;>;
-16 -1: newInternalError
-22 -1: (Ljava/lang/Object;J)V
-9 -1: ABBR_MASK
-5 -1: array
-22 -1: (Ljava/lang/Object;J)Z
-13 -1: FilteringMode
-30 -1: java/util/stream/StreamSupport
-19 -1: retrieveDisplayName
-56 -1: (Ljava/util/TimeZone;)Lsun/util/calendar/Gregorian$Date;
-10 -1: val$values
-9 -1: normalize
-28 -1: (II)Ljava/lang/CharSequence;
-16 -1: serialVersionUID
-7 -1: getPath
-25 -1: (ILjava/lang/Class<*>;Z)V
-13 -1: thenComparing
-51 -1: (Ljava/lang/Object;)Ljava/lang/invoke/MethodHandle;
-36 -1: ()[Ljava/lang/annotation/Annotation;
-14 -1: MetaIndex.java
-8 -1: identity
-15 -1: findSystemClass
-24 -1: privateGetDeclaredFields
-27 -1: java/lang/ref/SoftReference
-19 -1: useCanonPrefixCache
-3 -1: dec
-3 -1: PLT
-8 -1: UTF_32LE
-17 -1: java/util/HashMap
-12 -1: toEpochMilli
-9 -1: intStream
-11 -1: Caused by:
-31 -1: java/nio/charset/CharsetDecoder
-30 -1: is being checked
-11 -1: parseHeader
-25 -1: ACCUMULATED_DAYS_IN_MONTH
-34 -1: newGetByteIllegalArgumentException
-21 -1: checkPropertiesAccess
-13 -1: StackMapTable
-8 -1: addCount
-51 -1: (Ljava/lang/invoke/MethodHandle;)Ljava/lang/String;
-9 -1: authority
-15 -1: iso-10646-ucs-2
-6 -1: SUNDAY
-22 -1: LocalGregorianCalendar
-9 -1: listRoots
-32 -1: Lsun/reflect/generics/tree/Tree;
-38 -1: [Ljava/util/WeakHashMap$Entry<TK;TV;>;
-11 -1: nativeOrder
-5 -1: long0
-5 -1: long1
-5 -1: long2
-5 -1: long3
-17 -1: capacityIncrement
-5 -1: long4
-97 -1: (Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;
-31 -1: Ljava/lang/CharacterDataLatin1;
-5 -1: long5
-5 -1: long6
-5 -1: long7
-17 -1: reduceValuesToInt
-13 -1: package2certs
-13 -1: isTypeVisible
-30 -1: java/lang/ref/PhantomReference
-47 -1: ()Ljava/util/stream/Stream<Ljava/lang/String;>;
-9 -1: longValue
-3 -1: PNT
-10 -1: storeToXML
-10 -1: getMethod0
-12 -1: constantZero
-7 -1: promise
-116 -1: (Ljava/lang/String;Lsun/reflect/generics/factory/GenericsFactory;)Lsun/reflect/generics/repository/MethodRepository;
-32 -1: DIRECTIONALITY_SEGMENT_SEPARATOR
-9 -1: byteOrder
-9 -1: isPromise
-4 -1: isOn
-6 -1: LOCCRC
-10 -1: setDefault
-9 -1: setHandle
-15 -1: java/nio/Buffer
-37 -1: (Ljava/lang/String;I)Ljava/lang/Long;
-10 -1: Float.java
-12 -1: showSettings
-27 -1: (Ljava/io/FileDescriptor;)I
-27 -1: (Ljava/io/FileDescriptor;)J
-21 -1: java/util/Spliterator
-22 -1: CodingErrorAction.java
-11 -1: isMalformed
-27 -1: java/util/PrimitiveIterator
-15 -1: THROW_EXCEPTION
-15 -1: copyToCharArray
-26 -1: ()Ljava/util/jar/JarEntry;
-27 -1: (Ljava/io/FileDescriptor;)V
-11 -1: getEncoding
-48 -1: (Ljava/lang/ThreadLocal<*>;Ljava/lang/Object;I)V
-17 -1: java.runtime.name
-28 -1: (Lsun/invoke/util/Wrapper;)Z
-20 -1: annotationTypeOffset
-27 -1: (J)Ljava/lang/StringBuffer;
-15 -1: METHOD_RECEIVER
-10 -1: startEntry
-29 -1: (I)Ljava/lang/reflect/Member;
-7 -1: setOut0
-10 -1: getMethods
-26 -1: ()Lsun/misc/JavaNioAccess;
-18 -1: linkToTargetMethod
-8 -1: INSTANCE
-3 -1: dir
-41 -1: ([Ljava/net/URL;Ljava/lang/ClassLoader;)V
-9 -1: unboxCast
-58 -1: <T:Ljava/lang/Throwable;>(TT;)Lsun/invoke/empty/Empty;^TT;
-12 -1: java.version
-50 -1: (Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
-32 2: sun/net/www/protocol/jar/Handler
-20 -1: java/lang/Compiler$1
-9 -1: LongCache
-14 -1: FILL_THRESHOLD
-22 -1: getRawClassAnnotations
-9 -1: (JI[CII)I
-13 -1: hasMoreTokens
-13 -1: getSuperclass
-3 -1: PRC
-12 -1: MAX_PRIORITY
-14 -1: checkCacheLoad
-7 -1: lowMask
-8 -1: LM_CLASS
-7 -1: initIDs
-27 -1: Ljava/util/Collection<TV;>;
-3 -1: yes
-3 -1: PRT
-91 -1: (Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/LambdaForm;
-27 -1: ()Lsun/security/util/Debug;
-8 -1: VM start
-9 -1: setMemory
-7 -1: getName
-10 -1: findSignal
-19 -1: startsWithLocHeader
-37 -1: java/util/Collections$SynchronizedMap
-51 -1: (ICLjava/lang/Object;)Ljava/lang/invoke/LambdaForm;
-62 -1: (Ljava/util/Locale;)Lsun/util/locale/provider/LocaleResources;
-17 -1: lastParameterType
-9 -1: NO_PTYPES
-116 -1: <T:Ljava/lang/Object;>([Ljava/lang/ClassValue$Entry<*>;Ljava/lang/ClassValue<TT;>;)Ljava/lang/ClassValue$Entry<TT;>;
-18 -1: DisplayNamePattern
-8 -1: getField
-5 -1: flags
-3 -1: PST
-17 -1: annotationDefault
-18 -1: java/nio/ByteOrder
-8 -1: highMask
-6 -1: ascii7
-29 -1: getGregorianYearFromFixedDate
-125 -1: (Ljava/lang/String;[Ljava/lang/invoke/LambdaForm$Name;[Ljava/lang/invoke/LambdaForm$Name;Ljava/lang/invoke/LambdaForm$Name;)V
-8 -1: =Lambda(
-29 -1: Ljava/util/WeakHashMap$Entry;
-18 -1: multiValueIterator
-74 -1: Ljava/util/LinkedHashMap<Ljava/lang/String;Ljava/io/ExpiringCache$Entry;>;
-13 -1: CONV_OP_LIMIT
-6 -1: sclSet
-81 -1: (Lsun/misc/URLClassPath$JarLoader;Ljava/util/jar/JarFile;)Ljava/util/jar/JarFile;
-14 -1: appendFragment
-46 -1: java/util/Collections$SynchronizedNavigableMap
-36 -1: application/x-java-serialized-object
-13 -1: setNativeName
-53 -1: java/util/concurrent/ConcurrentHashMap$ForwardingNode
-16 -1: setJavaAWTAccess
-30 -1: methodHandleInvokeLinkerMethod
-15 -1: reduceKeysToInt
-20 -1: ensureCapacityHelper
-23 -1: createFileURLConnection
-12 -1: d3dAvailable
-69 -1: (Ljava/lang/Object;Ljava/lang/invoke/MethodHandle;)Ljava/lang/String;
-49 -1: java/util/ArraysParallelSortHelpers$FJLong$Sorter
-21 -1: explicitCastArguments
-24 -1: JAVAFX_LAUNCH_MODE_CLASS
-9 -1: invoke_MT
-18 -1: ensureMemberAccess
-74 -1: (Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)I
-36 -1: java/nio/charset/spi/CharsetProvider
-23 -1: (Ljava/lang/String;II)V
-14 -1: initProperties
-4 -1: (F)F
-35 -1: [[Ljava/lang/annotation/Annotation;
-4 -1: (F)I
-106 -1: Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/String;>;Ljava/lang/CharSequence;
-46 -1: java/lang/invoke/BoundMethodHandle$SpeciesData
-74 -1: (Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)Z
-24 -1: java.launcher.opt.header
-37 -1: ([Ljava/security/ProtectionDomain;Z)V
-10 -1: lineBuffer
-7 -1: ibm-813
-9 -1: isBuiltin
-4 -1: (F)V
-7 -1: ibm-819
-9 -1: H_ESCAPED
-4 -1: (F)Z
-20 -1: suppressedExceptions
-12 -1: UTF-32LE-BOM
-19 -1: CalendarSystem.java
-8 -1: readOnly
-81 -1: (JLjava/util/function/Function;Ljava/util/function/BiFunction;)Ljava/lang/Object;
-32 -1: sun/misc/Launcher$AppClassLoader
-78 -1: Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/io/File;>;
-17 -1: [Ljava/lang/Enum;
-41 -1: java/util/Collections$CheckedNavigableSet
-8 -1: asSetter
-3 -1: dom
-41 -1: (I)[Ljava/util/WeakHashMap$Entry<TK;TV;>;
-16 -1: localeExtensions
-21 -1: sun/net/www/ParseUtil
-21 -1: Ljava/nio/ByteBuffer;
-29 -1: java/util/concurrent/TimeUnit
-25 -1: java/lang/CharacterData00
-15 -1: sun/misc/Unsafe
-28 -1: java/io/ByteArrayInputStream
-3 -1: dow
-25 -1: java/lang/CharacterData01
-25 -1: java/lang/CharacterData02
-6 -1: STORED
-11 -1: isTransient
-8 -1: function
-16 -1: getCanonicalFile
-13 -1: ,useDaylight=
-24 -1: domain (context is null)
-12 -1: Cleaner.java
-17 -1: CalendarDate.java
-49 -1: Lsun/reflect/generics/repository/FieldRepository;
-14 -1: forInputString
-25 -1: java/lang/CharacterData0E
-67 -1: (Ljava/lang/Object;Ljava/util/function/Supplier;)Ljava/lang/Object;
-19 -1: codePointBeforeImpl
-6 -1: script
-21 -1: systemNativeLibraries
-38 -1: ([Ljava/lang/Class;)Ljava/lang/String;
-14 -1: CONTENT_LENGTH
-19 -1: HeapCharBuffer.java
-22 -1: ExtendedProviderHolder
-41 -1: java/lang/invoke/InvokerBytecodeGenerator
-12 -1: basicInvoker
-26 -1: ([Ljava/lang/Comparable;)V
-10 -1: val$tclass
-47 -1: (Ljava/lang/Throwable;)Lsun/invoke/empty/Empty;
-18 -1: isLegalReplacement
-22 -1: spliteratorUnknownSize
-15 -1: SynchronizedSet
-16 -1: MethodParameters
-22 -1: desiredAssertionStatus
-29 -1: ()Ljava/util/ArrayDeque<TE;>;
-36 -1: ()Ljava/lang/reflect/Constructor<*>;
-66 -1: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/invoke/LambdaForm;>;
-58 -1: (Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V
-50 -1: (Ljava/util/concurrent/CountedCompleter;[J[JIIII)V
-14 -1: requireNonNull
-21 -1: java/lang/ThreadGroup
-95 -1: ([Ljava/util/concurrent/ConcurrentHashMap$Node;ILjava/util/concurrent/ConcurrentHashMap$Node;)V
-76 -1: (Ljava/nio/channels/WritableByteChannel;Ljava/nio/charset/CharsetEncoder;I)V
-14 -1: reflectionData
-33 -1: Ljava/lang/invoke/MethodTypeForm;
-7 -1: tuesday
-31 -1: ()Lsun/misc/JavaSecurityAccess;
-14 -1: fieldFilterMap
-28 -1: ([Ljava/lang/ThreadGroup;Z)I
-7 -1: ibm-850
-83 -1: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/management/GarbageCollectorMXBean;
-7 -1: ibm-852
-5 -1: cesu8
-14 -1: ForwardingNode
-29 -1: (Ljava/nio/ByteBuffer;IIIII)V
-7 -1: ibm-855
-12 -1: SingletonSet
-16 -1: isOtherUppercase
-15 -1: FIELD_UNDEFINED
-9 -1: makeEntry
-7 -1: ibm-857
-10 -1: extensions
-10 -1: longStream
-19 -1: getGenericSignature
-7 -1: newNode
-8 -1: jarNames
-25 -1: java/util/jar/JarVerifier
-49 -1: ()[Lsun/reflect/generics/tree/ClassTypeSignature;
-4 -1: wait
-115 -1: (Ljava/lang/String;Lsun/reflect/generics/factory/GenericsFactory;)Lsun/reflect/generics/repository/ClassRepository;
-56 -1: (Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
-65 -1: (Lsun/util/locale/BaseLocale;Lsun/util/locale/LocaleExtensions;)V
-7 -1: ibm-862
-9 -1: ISO646-US
-7 -1: ibm-866
-16 -1: extendedProvider
-7 -1: ([C[C)Z
-93 -1: (Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MethodHandle;
-8 -1: getHours
-21 -1: ()[Ljava/lang/String;
-187 -1: (Ljava/util/concurrent/ConcurrentHashMap$BulkTask;III[Ljava/util/concurrent/ConcurrentHashMap$Node;Ljava/util/concurrent/ConcurrentHashMap$ReduceKeysTask;Ljava/util/function/BiFunction;)V
-106 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/concurrent/locks/ReentrantLock;Ljava/io/Serializable;
-24 -1: java/nio/file/FileSystem
-14 -1: ForEachKeyTask
-13 -1: defaultLocale
-20 -1: constructorModifiers
-13 -1: asWrapperType
-42 -1: (Ljava/lang/String;ZI)Ljava/lang/Class<*>;
-17 -1: BaseCalendar.java
-76 -1: (Ljava/util/jar/JarFile;Ljava/util/jar/JarEntry;)[Ljava/security/CodeSigner;
-14 -1: isSynchronized
-27 -1: java/nio/DirectByteBuffer$1
-3 -1: ()B
-7 -1: ibm-874
-12 -1: exactInvoker
-3 -1: ()C
-39 -1: (Ljava/lang/Thread;Ljava/lang/Object;)V
-3 -1: ()D
-3 -1: ()F
-27 -1: [Ljava/lang/reflect/Method;
-10 -1: floatValue
-3 -1: ()I
-3 -1: ()J
-18 -1: getLocaleResources
-59 -1: java/util/concurrent/ConcurrentHashMap$MapReduceEntriesTask
-67 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/Hashtable$Entry;)V
-11 -1: maxPriority
-11 -1: getStringAt
-60 -1: (Ljava/lang/ClassValue$Version;)Ljava/lang/ClassValue$Entry;
-3 -1: ()S
-49 -1: (Ljava/lang/String;)Ljava/io/ExpiringCache$Entry;
-42 -1: (III)Lsun/util/calendar/BaseCalendar$Date;
-82 -1: <T:Ljava/lang/Object;>(Ljava/util/Set<TT;>;Ljava/lang/Object;)Ljava/util/Set<TT;>;
-62 -1: ([BLsun/reflect/ConstantPool;Ljava/lang/Class;)Ljava/util/Map;
-3 -1: ()V
-24 -1: ()Ljava/nio/ShortBuffer;
-29 -1: file descriptor can't be null
-3 -1: ()Z
-7 -1: matcher
-66 -1: (Ljava/lang/reflect/Constructor;)Lsun/reflect/ConstructorAccessor;
-7 -1: matches
-12 -1: getAuthority
-16 -1: java/lang/Object
-5 -1: (IC)V
-17 -1: EmptyListIterator
-8 -1: charsets
-8 -1: sameFile
-47 -1: (TT;Ljava/util/function/UnaryOperator<TV;>;)TV;
-16 -1: overwrittenEntry
-15 -1: reinvokerTarget
-11 -1: isUpperCase
-5 -1: toUri
-9 -1: GMT+00:00
-33 -1: java/util/concurrent/ForkJoinPool
-10 -1: parseFloat
-53 -1: java/util/concurrent/ConcurrentHashMap$SearchKeysTask
-48 -1: (Ljava/lang/Object;Ljava/util/LinkedList$Node;)V
-82 -1: (Ljava/lang/Class<*>;Ljava/lang/Class<*>;Ljava/lang/Object;ILjava/lang/Class<*>;)V
-15 -1: reduceCacheLoad
-76 -1: (Ljava/lang/Class<*>;[Ljava/lang/reflect/Method;)[Ljava/lang/reflect/Method;
-20 -1: singletonSpliterator
-24 -1: getTransitionEpochSecond
-24 -1: MapReduceValuesToIntTask
-13 -1: ALLOWED_FLAGS
-55 -1: (Ljava/lang/reflect/Field;Z)Lsun/reflect/FieldAccessor;
-34 -1: [Ljava/lang/annotation/Annotation;
-10 -1: readBuffer
-21 -1: Illegal month value:
-31 -1: java/security/SecureClassLoader
-12 -1: reinitialize
-5 -1: limit
-4 -1: grow
-15 -1: getCreationTime
-7 -1: , from
-25 -1: (Ljava/lang/ClassValue;)V
-13 -1: java.compiler
-37 -1: ()Ljava/util/Set<Ljava/lang/String;>;
-6 -1: FJChar
-16 -1: getFieldAccessor
-4 -1: eras
-11 -1: isSupported
-24 -1: ()Ljava/text/DateFormat;
-32 -1: java/util/Collections$CopiesList
-32 -1: java/io/NotSerializableException
-15 -1: typeAnnotations
-27 -1: defaultAllowUserInteraction
-57 -1: (Ljava/lang/String;I[Ljava/lang/invoke/LambdaForm$Name;)V
-18 -1: checkArgumentTypes
-71 -1: (Lsun/util/calendar/BaseCalendar$Date;)Lsun/util/calendar/BaseCalendar;
-10 -1: isMirrored
-27 -1: (I)Ljava/lang/Thread$State;
-26 -1: (Ljava/util/Collection;Z)Z
-6 -1: ibm367
-16 -1: isAssignableFrom
-7 -1: readUTF
-35 -1: Ljava/lang/ref/ReferenceQueue<TV;>;
-56 -1: ([Ljava/util/HashMap$Node;Ljava/util/HashMap$TreeNode;)V
-8 -1: MANDATED
-18 -1: canonicalizeRegion
-11 -1: checkAccept
-44 -1: (Ljava/net/Proxy;)Lsun/net/ApplicationProxy;
-8 -1: ECMA-118
-22 -1: ReflectPermission.java
-4 -1: _put
-41 -1: java.lang.invoke.MethodHandle.DEBUG_NAMES
-47 -1: java/util/concurrent/ConcurrentHashMap$TreeNode
-44 -1: (Ljava/net/URL;[Ljava/security/CodeSigner;)V
-5 -1: april
-44 -1: ([Ljava/lang/Class<*>;Ljava/lang/Class<*>;)V
-150 -1: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/util/concurrent/ConcurrentHashMap$CollectionView<TK;TV;TK;>;Ljava/util/Set<TK;>;Ljava/io/Serializable;
-91 -1: (ILjava/lang/Object;Ljava/lang/Object;Ljava/util/HashMap$Node;)Ljava/util/HashMap$TreeNode;
-26 -1: sun/net/util/IPAddressUtil
-8 -1: Modifier
-9 -1: isVarargs
-24 -1: -- listing properties --
-16 -1: hasAllPermission
-27 -1: MapReduceMappingsToLongTask
-29 -1: sharedGetParameterAnnotations
-9 -1: argCounts
-11 -1: toLocalTime
-89 -1: (Ljava/lang/invoke/LambdaForm;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/MemberName;
-4 -1: ROOT
-20 -1: sun.reflect.noCaches
-18 -1: UnicodeBigUnmarked
-4 -1: Lazy
-35 -1: java/lang/invoke/SimpleMethodHandle
-20 -1: (I)Ljava/nio/Buffer;
-48 -1: ()Lsun/reflect/generics/tree/ClassTypeSignature;
-31 -1: (I[CII)Ljava/lang/StringBuffer;
-17 -1: America/Anchorage
-7 -1: markpos
-9 -1: enumerate
-11 -1: parseLocale
-24 -1: java.launcher.cls.error1
-46 -1: (ILjava/lang/Object;)Ljava/lang/StringBuilder;
-24 -1: java.launcher.cls.error2
-24 -1: java.launcher.cls.error3
-24 -1: java.launcher.cls.error4
-21 -1: java/util/ArrayList$1
-17 -1: getExceptionTypes
-24 -1: java.launcher.cls.error5
-30 -1: java/util/Spliterator$OfDouble
-10 -1: forDecoder
-8 -1: getEntry
-10 -1: checkGuard
-12 -1: checkInitted
-34 -1: Lsun/util/locale/LocaleExtensions;
-41 -1: java/util/ArraysParallelSortHelpers$FJInt
-10 -1: findStatic
-22 -1: setConstructorAccessor
-34 -1: Lsun/misc/URLClassPath$FileLoader;
-20 -1: not a reinvoker MH:
-16 -1: LongCumulateTask
-11 -1: checkAccess
-14 -1: SearchKeysTask
-36 -1: ()[Ljava/lang/reflect/AnnotatedType;
-11 -1: initDefault
--- a/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/FlagCombo.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/runtime/cds/appcds/sharedStrings/FlagCombo.java Thu Nov 07 18:44:09 2019 +0000
@@ -38,6 +38,7 @@
* @comment A special test excluding the case that requires JFR
* @requires vm.cds.archived.java.heap & !vm.hasJFR
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
+ * @modules jdk.jartool/sun.tools.jar
* @build HelloString
* @run driver FlagCombo noJfr
*/
--- a/test/hotspot/jtreg/serviceability/dcmd/vm/FlagsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/hotspot/jtreg/serviceability/dcmd/vm/FlagsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,7 +34,7 @@
* java.compiler
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
- * @run testng/othervm -Xmx129m -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right -XX:-TieredCompilation FlagsTest
+ * @run testng/othervm -Xmx129m -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right FlagsTest
*/
public class FlagsTest {
public void run(CommandExecutor executor) {
@@ -43,7 +43,6 @@
/* The following are interpreted by the JVM as actual "flags" */
output.shouldContain("-XX:+UnlockDiagnosticVMOptions");
output.shouldContain("-XX:+IgnoreUnrecognizedVMOptions");
- output.shouldContain("-XX:-TieredCompilation");
/* The following are not */
output.shouldNotContain("-Xmx129m");
--- a/test/hotspot/jtreg/serviceability/jvmti/ClassStatus/ClassStatus.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 8212117
- * @summary Verify JVMTI GetClassStatus returns CLASS_PREPARE after call to Class.forName()
- * @run main/othervm/native -agentlib:ClassStatus ClassStatus
- */
-
-
-public class ClassStatus {
- static {
- try {
- System.out.println("ClassStatus static block");
- System.loadLibrary("ClassStatus");
- } catch (UnsatisfiedLinkError ule) {
- System.err.println("Could not load ClassStatus library");
- System.err.println("java.library.path: "
- + System.getProperty("java.library.path"));
- throw ule;
- }
- }
-
- static native int check(Class klass);
-
- public static void main(String[] args) throws ClassNotFoundException {
- ClassLoader loader = ClassStatus.class.getClassLoader();
- Module module = loader.getUnnamedModule();
-
- // Load class, but don't initialize it
- Class foo2 = Class.forName(module, "Foo2");
- Class foo3 = Class.forName("Foo3", false, loader);
-
- System.out.println("Loaded: " + foo2);
- System.out.println("Loaded: " + foo3);
-
- int status2 = check(foo2);
- int status3 = check(foo3);
-
- new Foo2().bar();
- new Foo3().bar();
-
- if (status2 != 0) {
- System.out.println("The agent returned non-zero exit status for Foo2: " + status2);
- }
- if (status3 != 0) {
- System.out.println("The agent returned non-zero exit status for Foo3: " + status3);
- }
- if (status2 != 0 || status3 != 0) {
- throw new RuntimeException("Non-zero status returned from the agent");
- }
- }
-}
-
-class Foo2 {
- static {
- System.out.println("Foo2 is initialized");
- }
- void bar() {
- System.out.println("Foo2.bar() is called");
- }
-}
-
-class Foo3 {
- static {
- System.out.println("Foo3 is initialized");
- }
- void bar() {
- System.out.println("Foo3.bar() is called");
- }
-}
--- a/test/hotspot/jtreg/serviceability/jvmti/ClassStatus/libClassStatus.c Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * 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 <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "jvmti.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef JNI_ENV_ARG
-
-#ifdef __cplusplus
-#define JNI_ENV_ARG(x, y) y
-#define JNI_ENV_PTR(x) x
-#else
-#define JNI_ENV_ARG(x,y) x, y
-#define JNI_ENV_PTR(x) (*x)
-#endif
-
-#endif
-
-#define PASSED 0
-#define FAILED 2
-
-static jvmtiEnv* jvmti = NULL;
-
-static jint Agent_Initialize(JavaVM *jvm, char *options, void *reserved);
-
-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 jint JNICALL
-JNI_OnLoad(JavaVM *jvm, void *reserved) {
- return JNI_VERSION_9;
-}
-
-static void
-check_jvmti_error(jvmtiEnv *jvmti, char* fname, jvmtiError err) {
- if (err != JVMTI_ERROR_NONE) {
- printf(" ## %s error: %d\n", fname, err);
- fflush(0);
- exit(err);
- }
-}
-
-static char*
-get_class_signature(jvmtiEnv *jvmti, jclass klass) {
- char* sign = NULL;
- jvmtiError err = (*jvmti)->GetClassSignature(jvmti, klass, &sign, NULL);
-
- check_jvmti_error(jvmti, "GetClassSignature", err);
- return sign;
-}
-
-static jboolean
-is_class_status_prepared(jvmtiEnv *jvmti, jclass klass) {
- char* sign = get_class_signature(jvmti, klass);
- jint status = 0;
- jvmtiError err = (*jvmti)->GetClassStatus(jvmti, klass, &status);
-
- check_jvmti_error(jvmti, "GetClassStatus", err);
- printf(" Class %s status: 0x%08x\n", sign, status);
- printf(" Class %s is prepared: %d\n", sign, (status & JVMTI_CLASS_STATUS_PREPARED) != 0);
- fflush(0);
-
- return (status & JVMTI_CLASS_STATUS_PREPARED) != 0;
-}
-
-static jboolean
-is_class_in_loaded_classes(JNIEnv *env, jclass klass) {
- char* sign = get_class_signature(jvmti, klass);
- jint class_count = 0;
- jclass* classes = NULL;
- jvmtiError err = (*jvmti)->GetLoadedClasses(jvmti, &class_count, &classes);
-
- check_jvmti_error(jvmti, "GetLoadedClasses", err);
-
- for (int i = 0; i < class_count; i++) {
- jclass cls = classes[i];
- jboolean same = (*env)->IsSameObject(env, cls, klass);
- if (same) {
- printf("Found class %s in the list of loaded classes\n", sign);
- fflush(0);
- return JNI_TRUE;
- }
- }
- printf("Error: Have not found class %s in the list of loaded classes\n", sign);
- fflush(0);
- return JNI_FALSE;
-}
-
-static void JNICALL
-ClassPrepare(jvmtiEnv *jvmti, JNIEnv *env, jthread thread, jclass klass) {
- char* sign = get_class_signature(jvmti, klass);
-
- sign = (sign == NULL) ? "NULL" : sign;
-
- if (strcmp(sign, "LFoo2;") == 0 || strcmp(sign, "LFoo3;") == 0) {
- printf("ClassPrepare event for class: %s\n", sign);
- fflush(0);
- }
-}
-
-static jint
-Agent_Initialize(JavaVM *jvm, char *options, void *reserved) {
- jvmtiError err;
- jint size;
- jint res;
- jvmtiEventCallbacks callbacks;
-
- printf("Agent_Initialize started\n");
- fflush(0);
- res = JNI_ENV_PTR(jvm)->GetEnv(JNI_ENV_ARG(jvm, (void **) &jvmti), JVMTI_VERSION_9);
- if (res != JNI_OK || jvmti == NULL) {
- printf("## Agent_Initialize: Error in GetEnv: res: %d, jvmti env: %p\n", res, jvmti);
- return JNI_ERR;
- }
-
- size = (jint)sizeof(callbacks);
- memset(&callbacks, 0, size);
- callbacks.ClassPrepare = ClassPrepare;
-
- err = (*jvmti)->SetEventCallbacks(jvmti, &callbacks, size);
- check_jvmti_error(jvmti, "## Agent_Initialize: SetEventCallbacks", err);
-
- err = (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_CLASS_PREPARE, NULL);
- check_jvmti_error(jvmti, "## Agent_Initialize: SetEventNotificationMode CLASS_PREPARE", err);
- return JNI_OK;
-}
-
-JNIEXPORT jint JNICALL
-Java_ClassStatus_check(JNIEnv *env, jclass cls, jclass klass) {
- if (is_class_in_loaded_classes(env, klass) != JNI_TRUE ||
- is_class_status_prepared(jvmti, klass) != JNI_TRUE) {
- return FAILED;
- }
- return PASSED;
-}
-
-#ifdef __cplusplus
-}
-#endif
--- a/test/jdk/ProblemList.txt Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/ProblemList.txt Thu Nov 07 18:44:09 2019 +0000
@@ -608,6 +608,8 @@
java/nio/channels/DatagramChannel/ChangingAddress.java 7141822 macosx-all
+java/nio/channels/DatagramChannel/Unref.java 8233519 generic-all
+
java/nio/channels/AsynchronousSocketChannel/StressLoopback.java 8211851 aix-ppc64
java/nio/channels/Selector/Wakeup.java 6963118 windows-all
@@ -773,6 +775,7 @@
javax/swing/MultiUIDefaults/4300666/bug4300666.java 7105119 macosx-all
javax/swing/UITest/UITest.java 8198392 generic-all
javax/swing/plaf/basic/BasicComboBoxEditor/Test8015336.java 8198394 generic-all
+javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java linux-all
javax/swing/plaf/metal/MetalLookAndFeel/Test8039750.java 8198395 generic-all
javax/swing/text/DevanagariEditor.java 8198397 generic-all
javax/swing/SpringLayout/4726194/bug4726194.java 8198399 generic-all
--- a/test/jdk/com/sun/jdi/JdwpAttachTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/com/sun/jdi/JdwpAttachTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -32,6 +32,7 @@
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
+import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Iterator;
@@ -41,7 +42,6 @@
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
/*
* @test
@@ -54,24 +54,36 @@
*/
public class JdwpAttachTest {
+ private static final boolean IsWindows = System.getProperty("os.name").toLowerCase().contains("windows");
+
+ // Set to true to perform testing of attach from wrong address (expected to fail).
+ // It's off by default as it caused significant test time increase\
+ // (tests <number_of_addresses> * <number_of_addresses> cases, each case fails by timeout).
+ private static boolean testFailedAttach = false;
+
public static void main(String[] args) throws Exception {
List<InetAddress> addresses = getAddresses();
boolean ipv4EnclosedTested = false;
boolean ipv6EnclosedTested = false;
for (InetAddress addr: addresses) {
- // also test that addresses enclosed in square brackets are supported
- attachTest(addr.getHostAddress(), addr.getHostAddress());
+ if (testFailedAttach) {
+ for (InetAddress connectAddr : addresses) {
+ attachTest(addr.getHostAddress(), connectAddr.getHostAddress(), addr.equals(connectAddr));
+ }
+ } else {
+ attachTest(addr.getHostAddress(), addr.getHostAddress(), true);
+ }
// listening on "*" should accept connections from all addresses
- attachTest("*", addr.getHostAddress());
+ attachTest("*", addr.getHostAddress(), true);
- // test that addresses enclosed in square brackets are supported.
+ // also test that addresses enclosed in square brackets are supported.
if (addr instanceof Inet4Address && !ipv4EnclosedTested) {
- attachTest("[" + addr.getHostAddress() + "]", "[" + addr.getHostAddress() + "]");
+ attachTest("[" + addr.getHostAddress() + "]", "[" + addr.getHostAddress() + "]", true);
ipv4EnclosedTested = true;
}
if (addr instanceof Inet6Address && !ipv6EnclosedTested) {
- attachTest("[" + addr.getHostAddress() + "]", "[" + addr.getHostAddress() + "]");
+ attachTest("[" + addr.getHostAddress() + "]", "[" + addr.getHostAddress() + "]", true);
ipv6EnclosedTested = true;
}
}
@@ -80,13 +92,14 @@
// we should be able to attach to both IPv4 and IPv6 addresses (127.0.0.1 & ::1)
InetAddress localAddresses[] = InetAddress.getAllByName("localhost");
for (int i = 0; i < localAddresses.length; i++) {
- attachTest(localAddresses[i].getHostAddress(), "");
+ attachTest(localAddresses[i].getHostAddress(), "", true);
}
}
- private static void attachTest(String listenAddress, String connectAddresses)
+ private static void attachTest(String listenAddress, String connectAddress, boolean expectedResult)
throws Exception {
- log("Starting listening at " + listenAddress);
+ log("\nTest: listen on '" + listenAddress + "', attach to '" + connectAddress + "'");
+ log(" Starting listening at " + listenAddress);
ListeningConnector connector = getListenConnector();
Map<String, Connector.Argument> args = connector.defaultArguments();
setConnectorArg(args, "localAddress", listenAddress);
@@ -100,31 +113,48 @@
throw new RuntimeException("values from connector.startListening (" + actualPort
+ " is not equal to values from arguments (" + port + ")");
}
- log("Listening port: " + port);
+ log(" Listening port: " + port);
- log("Attaching from " + connectAddresses);
+ log(" Attaching from " + connectAddress);
try {
ExecutorService executor = Executors.newSingleThreadExecutor();
executor.submit((Callable<Exception>)() -> {
VirtualMachine vm = connector.accept(args);
- log("ACCEPTED.");
vm.dispose();
return null;
});
executor.shutdown();
- LingeredApp debuggee = LingeredApp.startApp(
- Arrays.asList("-agentlib:jdwp=transport=dt_socket"
- +",address=" + connectAddresses + ":" + port
- + ",server=n,suspend=n"));
- debuggee.stopApp();
-
- executor.awaitTermination(20, TimeUnit.SECONDS);
+ try {
+ LingeredApp debuggee = LingeredApp.startApp(
+ Arrays.asList("-agentlib:jdwp=transport=dt_socket"
+ + ",address=" + connectAddress + ":" + port
+ + ",server=n,suspend=n"
+ // if failure is expected set small timeout (default is 20 sec)
+ + (!expectedResult ? ",timeout=1000" : "")));
+ debuggee.stopApp();
+ if (expectedResult) {
+ log("OK: attached as expected");
+ } else {
+ throw new RuntimeException("ERROR: LingeredApp.startApp was able to attach");
+ }
+ } catch (Exception ex) {
+ if (expectedResult) {
+ throw new RuntimeException("ERROR: LingeredApp.startApp was able to attach");
+ } else {
+ log("OK: failed to attach as expected");
+ }
+ }
} finally {
connector.stopListening(args);
}
}
+ private static void addAddr(List<InetAddress> list, InetAddress addr) {
+ log(" - (" + addr.getClass().getSimpleName() + ") " + addr.getHostAddress());
+ list.add(addr);
+ }
+
private static List<InetAddress> getAddresses() {
List<InetAddress> result = new LinkedList<>();
try {
@@ -136,17 +166,37 @@
Enumeration<InetAddress> addresses = iface.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress addr = addresses.nextElement();
- // Java reports link local addresses with named scope,
- // but Windows sockets routines support only numeric scope id.
- // skip such addresses.
+ // Java reports link local addresses with symbolic scope,
+ // but on Windows java.net.NetworkInterface generates its own scope names
+ // which are incompatible with native Windows routines.
+ // So on Windows test only addresses with numeric scope.
+ // On other platforms test both symbolic and numeric scopes.
if (addr instanceof Inet6Address) {
Inet6Address addr6 = (Inet6Address)addr;
- if (addr6.getScopedInterface() != null) {
- continue;
+ NetworkInterface scopeIface = addr6.getScopedInterface();
+ if (scopeIface != null && scopeIface.getName() != null) {
+ // On some test machines VPN creates link local addresses
+ // which we cannot connect to.
+ // Skip them.
+ if (scopeIface.isPointToPoint()) {
+ continue;
+ }
+
+ try {
+ // the same address with numeric scope
+ addAddr(result, Inet6Address.getByAddress(null, addr6.getAddress(), addr6.getScopeId()));
+ } catch (UnknownHostException e) {
+ // cannot happen!
+ throw new RuntimeException("Unexpected", e);
+ }
+
+ if (IsWindows) {
+ // don't add addresses with symbolic scope
+ continue;
+ }
}
}
- log(" - (" + addr.getClass().getSimpleName() + ") " + addr.getHostAddress());
- result.add(addr);
+ addAddr(result, addr);
}
}
} catch (SocketException e) {
@@ -184,8 +234,11 @@
arg.setValue(value);
}
+ private static long startTime = System.currentTimeMillis();
+
private static void log(Object o) {
- System.out.println(String.valueOf(o));
+ long time = System.currentTimeMillis() - startTime;
+ System.out.println(String.format("[%7.3f] %s", (time / 1000f), String.valueOf(o)));
}
}
--- a/test/jdk/com/sun/jdi/JdwpListenTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/com/sun/jdi/JdwpListenTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -34,6 +34,7 @@
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
+import java.net.UnknownHostException;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
@@ -51,6 +52,8 @@
*/
public class JdwpListenTest {
+ private static final boolean IsWindows = System.getProperty("os.name").toLowerCase().contains("windows");
+
public static void main(String[] args) throws Exception {
List<InetAddress> addresses = getAddresses();
@@ -60,6 +63,8 @@
for (InetAddress attach: addresses) {
// can connect only from the same address
// IPv6 cannot connect to IPv4 (::1 to 127.0.0.1) and vice versa.
+ // Note: for IPv6 addresses equals() does not compare scopes
+ // (so addresses with symbolic and numeric scopes are equals).
listenTest(listen.getHostAddress(), attach.getHostAddress(), attach.equals(listen));
}
// test that addresses enclosed in square brackets are supported.
@@ -80,6 +85,8 @@
private static void listenTest(String listenAddress, String connectAddress, boolean expectedResult)
throws IOException {
+ log("\nTest: listen at " + listenAddress + ", attaching from " + connectAddress
+ + ", expected: " + (expectedResult ? "SUCCESS" : "FAILURE"));
log("Starting listening debuggee at " + listenAddress);
try (Debuggee debuggee = Debuggee.launcher("HelloWorld").setAddress(listenAddress + ":0").launch()) {
log("Debuggee is listening on " + listenAddress + ":" + debuggee.getAddress());
@@ -98,6 +105,11 @@
}
}
+ private static void addAddr(List<InetAddress> list, InetAddress addr) {
+ log(" - (" + addr.getClass().getSimpleName() + ") " + addr.getHostAddress());
+ list.add(addr);
+ }
+
private static List<InetAddress> getAddresses() {
List<InetAddress> result = new LinkedList<>();
try {
@@ -109,17 +121,37 @@
Enumeration<InetAddress> addresses = iface.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress addr = addresses.nextElement();
- // Java reports link local addresses with named scope,
- // but Windows sockets routines support only numeric scope id.
- // skip such addresses.
+ // Java reports link local addresses with symbolic scope,
+ // but on Windows java.net.NetworkInterface generates its own scope names
+ // which are incompatible with native Windows routines.
+ // So on Windows test only addresses with numeric scope.
+ // On other platforms test both symbolic and numeric scopes.
if (addr instanceof Inet6Address) {
Inet6Address addr6 = (Inet6Address)addr;
- if (addr6.getScopedInterface() != null) {
- continue;
+ NetworkInterface scopeIface = addr6.getScopedInterface();
+ if (scopeIface != null && scopeIface.getName() != null) {
+ // On some test machines VPN creates link local addresses
+ // which we cannot connect to.
+ // Skip them.
+ if (scopeIface.isPointToPoint()) {
+ continue;
+ }
+
+ try {
+ // the same address with numeric scope
+ addAddr(result, Inet6Address.getByAddress(null, addr6.getAddress(), addr6.getScopeId()));
+ } catch (UnknownHostException e) {
+ // cannot happen!
+ throw new RuntimeException("Unexpected", e);
+ }
+
+ if (IsWindows) {
+ // don't add addresses with symbolic scope
+ continue;
+ }
}
}
- log(" - (" + addr.getClass().getSimpleName() + ") " + addr.getHostAddress());
- result.add(addr);
+ addAddr(result, addr);
}
}
} catch (SocketException e) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/lang/Thread/CountStackFrames.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8205132
+ * @summary Test Thread.countStackFrames()
+ * @run testng CountStackFrames
+ */
+
+import org.testng.annotations.Test;
+
+public class CountStackFrames {
+
+ // current thread
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testCurrentThread() {
+ Thread.currentThread().countStackFrames();
+ }
+
+ // unstarted thread
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testUnstartedThread() {
+ Thread thread = new Thread(() -> { });
+ thread.countStackFrames();
+ }
+
+ // terminated thread
+ @Test(expectedExceptions = UnsupportedOperationException.class)
+ public void testTerminatedThread() throws Exception {
+ Thread thread = new Thread(() -> { });
+ thread.start();
+ thread.join();
+ thread.countStackFrames();
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/net/HttpURLConnection/HttpURLConnUsingProxy.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,335 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8231632
+ * @summary HttpURLConnection::usingProxy could specify that it lazily evaluates the fact
+ * @modules java.base/sun.net.www
+ * @library /test/lib
+ * @run main/othervm HttpURLConnUsingProxy
+ */
+
+import java.io.*;
+import java.net.*;
+import java.nio.charset.StandardCharsets;
+
+import com.sun.net.httpserver.HttpExchange;
+import com.sun.net.httpserver.HttpHandler;
+import com.sun.net.httpserver.HttpServer;
+import jdk.test.lib.net.URIBuilder;
+
+public class HttpURLConnUsingProxy {
+ static HttpServer server;
+ static Proxy proxy;
+ static InetSocketAddress isa;
+
+ static class Handler implements HttpHandler {
+
+ @Override
+ public void handle(HttpExchange exchange) throws IOException {
+ byte[] response = "Hello World!".getBytes(StandardCharsets.UTF_8);
+ try (InputStream req = exchange.getRequestBody()) {
+ req.readAllBytes();
+ }
+ exchange.sendResponseHeaders(200, response.length);
+ try (OutputStream resp = exchange.getResponseBody()) {
+ resp.write(response);
+ }
+ }
+ }
+
+ public static void main(String[] args) {
+ try {
+ InetAddress loopbackAddress = InetAddress.getLoopbackAddress();
+ InetSocketAddress addr = new InetSocketAddress(loopbackAddress, 0);
+ server = HttpServer.create(addr, 0);
+ server.createContext("/HttpURLConnUsingProxy/http1/", new Handler());
+ server.start();
+
+ ProxyServer pserver = new ProxyServer(loopbackAddress,
+ server.getAddress().getPort());
+ // Start proxy server
+ new Thread(pserver).start();
+
+ URL url = URIBuilder.newBuilder()
+ .scheme("http")
+ .loopback()
+ .port(server.getAddress().getPort())
+ .path("/HttpURLConnUsingProxy/http1/x.html")
+ .toURLUnchecked();
+
+ // NO_PROXY
+ try {
+ HttpURLConnection urlc =
+ (HttpURLConnection) url.openConnection(Proxy.NO_PROXY);
+ assertEqual(urlc.usingProxy(), false);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), false);
+ urlc.disconnect();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Direct connection should succeed: "
+ + ioe.getMessage());
+ }
+
+ // Non-existing proxy
+ try {
+ isa = InetSocketAddress.createUnresolved("inexistent", 8080);
+ proxy = new Proxy(Proxy.Type.HTTP, isa);
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection(proxy);
+ assertEqual(urlc.usingProxy(), true);
+ InputStream is = urlc.getInputStream();
+ is.close();
+ throw new RuntimeException("Non-existing proxy should cause IOException");
+ } catch (IOException ioe) {
+ // expected
+ }
+
+ // Normal proxy settings
+ try {
+ isa = InetSocketAddress.createUnresolved(loopbackAddress.getHostAddress(),
+ pserver.getPort());
+ proxy = new Proxy(Proxy.Type.HTTP, isa);
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection(proxy);
+ assertEqual(urlc.usingProxy(), true);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), true);
+ urlc.disconnect();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Connection through local proxy should succeed: "
+ + ioe.getMessage());
+ }
+
+ // Reuse proxy with new HttpURLConnection
+ try {
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection(proxy);
+ assertEqual(urlc.usingProxy(), true);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), true);
+ read(urlc.getInputStream());
+ assertEqual(urlc.usingProxy(), true);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Connection through local proxy should succeed: "
+ + ioe.getMessage());
+ }
+
+ // Reuse proxy with existing HttpURLConnection
+ try {
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection(proxy);
+ assertEqual(urlc.usingProxy(), true);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), true);
+ read(urlc.getInputStream());
+ assertEqual(urlc.usingProxy(), true);
+ urlc.disconnect();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Connection through local proxy should succeed: "
+ + ioe.getMessage());
+ }
+
+ // ProxySelector with normal proxy settings
+ try {
+ ProxySelector.setDefault(ProxySelector.of(isa));
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection();
+ assertEqual(urlc.usingProxy(), false);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), true);
+ read(urlc.getInputStream());
+ assertEqual(urlc.usingProxy(), true);
+ urlc.disconnect();
+ assertEqual(urlc.usingProxy(), true);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Connection through local proxy should succeed: "
+ + ioe.getMessage());
+ }
+
+ // ProxySelector with proxying disabled
+ try {
+ ProxySelector.setDefault(ProxySelector.of(null));
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection();
+ assertEqual(urlc.usingProxy(), false);
+ urlc.getResponseCode();
+ assertEqual(urlc.usingProxy(), false);
+ read(urlc.getInputStream());
+ assertEqual(urlc.usingProxy(), false);
+ } catch (IOException ioe) {
+ throw new RuntimeException("Direct connection should succeed: "
+ + ioe.getMessage());
+ }
+
+ // ProxySelector overwritten
+ try {
+ ProxySelector.setDefault(ProxySelector.of(isa));
+ HttpURLConnection urlc = (HttpURLConnection) url.openConnection(Proxy.NO_PROXY);
+ assertEqual(urlc.usingProxy(), false);
+ urlc.disconnect();
+ } catch (IOException ioe) {
+ throw new RuntimeException("Direct connection should succeed: "
+ + ioe.getMessage());
+ }
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ } finally {
+ if (server != null) {
+ server.stop(0);
+ }
+ }
+ }
+
+ static class ProxyServer extends Thread {
+ private static ServerSocket ss = null;
+
+ // Client requesting a tunnel
+ private Socket clientSocket = null;
+
+ /*
+ * Origin server's address and port that the client
+ * wants to establish the tunnel for communication.
+ */
+ private InetAddress serverInetAddr;
+ private int serverPort;
+
+ public ProxyServer(InetAddress server, int port) throws IOException {
+ serverInetAddr = server;
+ serverPort = port;
+ ss = new ServerSocket(0, 0, InetAddress.getLoopbackAddress());
+ }
+
+ public void run() {
+ while (true) {
+ try {
+ clientSocket = ss.accept();
+ processRequests();
+ } catch (Exception e) {
+ System.out.println("Proxy failed: " + e);
+ e.printStackTrace();
+ try {
+ ss.close();
+ } catch (IOException ioe) {
+ System.out.println("ProxyServer close error: " + ioe);
+ ioe.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private void processRequests() throws Exception {
+ // Connection set to tunneling mode
+
+ Socket serverSocket = new Socket(serverInetAddr, serverPort);
+ ProxyTunnel clientToServer = new ProxyTunnel(
+ clientSocket, serverSocket);
+ ProxyTunnel serverToClient = new ProxyTunnel(
+ serverSocket, clientSocket);
+ clientToServer.start();
+ serverToClient.start();
+ System.out.println("Proxy: Started tunneling...");
+
+ clientToServer.join();
+ serverToClient.join();
+ System.out.println("Proxy: Finished tunneling...");
+
+ clientToServer.close();
+ serverToClient.close();
+ }
+
+ /**
+ * **************************************************************
+ * Helper methods follow
+ * **************************************************************
+ */
+ public int getPort() {
+ return ss.getLocalPort();
+ }
+
+ /*
+ * This inner class provides unidirectional data flow through the sockets
+ * by continuously copying bytes from input socket to output socket
+ * while both sockets are open and EOF has not been received.
+ */
+ static class ProxyTunnel extends Thread {
+ Socket sockIn;
+ Socket sockOut;
+ InputStream input;
+ OutputStream output;
+
+ public ProxyTunnel(Socket sockIn, Socket sockOut) throws Exception {
+ this.sockIn = sockIn;
+ this.sockOut = sockOut;
+ input = sockIn.getInputStream();
+ output = sockOut.getOutputStream();
+ }
+
+ public void run() {
+ int BUFFER_SIZE = 400;
+ byte[] buf = new byte[BUFFER_SIZE];
+ int bytesRead = 0;
+ int count = 0; // Keep track of amount of data transferred
+
+ try {
+ while ((bytesRead = input.read(buf)) >= 0) {
+ output.write(buf, 0, bytesRead);
+ output.flush();
+ count += bytesRead;
+ }
+ } catch (IOException e) {
+ /*
+ * Peer end has closed connection
+ * so we close tunnel
+ */
+ close();
+ }
+ }
+
+ public void close() {
+ try {
+ if (!sockIn.isClosed())
+ sockIn.close();
+ if (!sockOut.isClosed())
+ sockOut.close();
+ } catch (IOException ignored) {
+ }
+ }
+ }
+ }
+
+ private static void assertEqual(boolean usingProxy, boolean expected) {
+ if (usingProxy != expected) {
+ throw new RuntimeException("Expected: " + expected
+ + " but usingProxy returned: " + usingProxy);
+ }
+ }
+
+ private static String read(InputStream inputStream) throws IOException {
+ StringBuilder sb = new StringBuilder();
+ BufferedReader bufferedReader = new BufferedReader(
+ new InputStreamReader(inputStream, StandardCharsets.UTF_8));
+ int i = bufferedReader.read();
+ while (i != -1) {
+ sb.append((char) i);
+ i = bufferedReader.read();
+ }
+ bufferedReader.close();
+ return sb.toString();
+ }
+}
--- a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,10 @@
import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer;
import jdk.test.lib.net.SimpleSSLContext;
+import org.testng.ITestContext;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -132,6 +134,17 @@
}
}
+ protected boolean stopAfterFirstFailure() {
+ return Boolean.getBoolean("jdk.internal.httpclient.debug");
+ }
+
+ @BeforeMethod
+ void beforeMethod(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ throw new RuntimeException("some tests failed");
+ }
+ }
+
@AfterClass
static final void printFailedTests() {
out.println("\n=========================");
@@ -217,7 +230,10 @@
}
@DataProvider(name = "subscribeProvider")
- public Object[][] subscribeProvider() {
+ public Object[][] subscribeProvider(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower(),
new UncheckedIOExceptionThrower()),
@@ -225,7 +241,10 @@
}
@DataProvider(name = "requestProvider")
- public Object[][] requestProvider() {
+ public Object[][] requestProvider(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower(),
new UncheckedIOExceptionThrower()),
@@ -233,7 +252,10 @@
}
@DataProvider(name = "nextRequestProvider")
- public Object[][] nextRequestProvider() {
+ public Object[][] nextRequestProvider(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower(),
new UncheckedIOExceptionThrower()),
@@ -241,28 +263,40 @@
}
@DataProvider(name = "beforeCancelProviderIO")
- public Object[][] beforeCancelProviderIO() {
+ public Object[][] beforeCancelProviderIO(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedIOExceptionThrower()),
EnumSet.of(Where.BEFORE_CANCEL));
}
@DataProvider(name = "afterCancelProviderIO")
- public Object[][] afterCancelProviderIO() {
+ public Object[][] afterCancelProviderIO(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedIOExceptionThrower()),
EnumSet.of(Where.AFTER_CANCEL));
}
@DataProvider(name = "beforeCancelProviderCustom")
- public Object[][] beforeCancelProviderCustom() {
+ public Object[][] beforeCancelProviderCustom(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower()),
EnumSet.of(Where.BEFORE_CANCEL));
}
@DataProvider(name = "afterCancelProviderCustom")
- public Object[][] afterCancelProvider() {
+ public Object[][] afterCancelProvider(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower()),
EnumSet.of(Where.AFTER_CANCEL));
--- a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java Thu Nov 07 18:44:09 2019 +0000
@@ -42,11 +42,12 @@
*/
import jdk.test.lib.net.SimpleSSLContext;
+import org.testng.ITestContext;
import org.testng.annotations.AfterTest;
import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
-import org.testng.annotations.Test;
import javax.net.ssl.SSLContext;
import java.io.BufferedReader;
@@ -146,6 +147,17 @@
}
}
+ protected boolean stopAfterFirstFailure() {
+ return Boolean.getBoolean("jdk.internal.httpclient.debug");
+ }
+
+ @BeforeMethod
+ void beforeMethod(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ throw new RuntimeException("some tests failed");
+ }
+ }
+
@AfterClass
static final void printFailedTests() {
out.println("\n=========================");
@@ -208,27 +220,38 @@
private Object[][] variants(List<Thrower> throwers) {
String[] uris = uris();
- Object[][] result = new Object[uris.length * 2 * throwers.size()][];
+ // reduce traces by always using the same client if
+ // stopAfterFirstFailure is requested.
+ List<Boolean> sameClients = stopAfterFirstFailure()
+ ? List.of(true)
+ : List.of(false, true);
+ Object[][] result = new Object[uris.length * sameClients.size() * throwers.size()][];
int i = 0;
for (Thrower thrower : throwers) {
- for (boolean sameClient : List.of(false, true)) {
+ for (boolean sameClient : sameClients) {
for (String uri : uris()) {
result[i++] = new Object[]{uri, sameClient, thrower};
}
}
}
- assert i == uris.length * 2 * throwers.size();
+ assert i == uris.length * sameClients.size() * throwers.size();
return result;
}
@DataProvider(name = "ioVariants")
- public Object[][] ioVariants() {
+ public Object[][] ioVariants(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedIOExceptionThrower()));
}
@DataProvider(name = "customVariants")
- public Object[][] customVariants() {
+ public Object[][] customVariants(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
return variants(List.of(
new UncheckedCustomExceptionThrower()));
}
--- a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,10 @@
import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer;
import jdk.test.lib.net.SimpleSSLContext;
+import org.testng.ITestContext;
import org.testng.annotations.AfterTest;
import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
@@ -131,6 +133,17 @@
}
}
+ protected boolean stopAfterFirstFailure() {
+ return Boolean.getBoolean("jdk.internal.httpclient.debug");
+ }
+
+ @BeforeMethod
+ void beforeMethod(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ throw new RuntimeException("some tests failed");
+ }
+ }
+
@AfterClass
static final void printFailedTests() {
out.println("\n=========================");
@@ -182,7 +195,10 @@
}
@DataProvider(name = "variants")
- public Object[][] variants() {
+ public Object[][] variants(ITestContext context) {
+ if (stopAfterFirstFailure() && context.getFailedTests().size() > 0) {
+ return new Object[0][];
+ }
String[] uris = uris();
Object[][] result = new Object[uris.length * 2 * 2][];
int i = 0;
--- a/test/jdk/java/net/httpclient/ShortRequestBody.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/ShortRequestBody.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
+import java.net.SocketException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
@@ -76,6 +77,7 @@
BYTE_ARRAY_BODY.length,
fileSize(FILE_BODY) };
static final int[] BODY_OFFSETS = new int[] { 0, +1, -1, +2, -2, +3, -3 };
+ static final String MARKER = "ShortRequestBody";
// A delegating Body Publisher. Subtypes will have a concrete body type.
static abstract class AbstractDelegateRequestBody
@@ -134,7 +136,7 @@
try (Server server = new Server()) {
for (Supplier<HttpClient> cs : clientSuppliers) {
err.println("\n---- next supplier ----\n");
- URI uri = new URI("http://localhost:" + server.getPort() + "/");
+ URI uri = new URI("http://localhost:" + server.getPort() + "/" + MARKER);
// sanity ( 6 requests to keep client and server offsets easy to workout )
success(cs, uri, new StringRequestBody(STRING_BODY, 0));
@@ -248,44 +250,56 @@
int offset = 0;
while (!closed) {
+ err.println("Server: waiting for connection");
try (Socket s = ss.accept()) {
err.println("Server: got connection");
InputStream is = s.getInputStream();
- readRequestHeaders(is);
+ try {
+ String headers = readRequestHeaders(is);
+ if (headers == null) continue;
+ } catch (SocketException ex) {
+ err.println("Ignoring unexpected exception while reading headers: " + ex);
+ ex.printStackTrace(err);
+ // proceed in order to update count etc..., even though
+ // we know that read() will fail;
+ }
byte[] ba = new byte[1024];
int length = BODY_LENGTHS[count % 3];
length += BODY_OFFSETS[offset];
err.println("Server: count=" + count + ", offset=" + offset);
err.println("Server: expecting " +length+ " bytes");
- int read = is.readNBytes(ba, 0, length);
- err.println("Server: actually read " + read + " bytes");
-
- // Update the counts before replying, to prevent the
- // client-side racing reset with this thread.
- count++;
- if (count % 6 == 0) // 6 is the number of failure requests per offset
- offset++;
- if (count % 42 == 0) {
- count = 0; // reset, for second iteration
- offset = 0;
+ int read = 0;
+ try {
+ read = is.readNBytes(ba, 0, length);
+ err.println("Server: actually read " + read + " bytes");
+ } finally {
+ // Update the counts before replying, to prevent the
+ // client-side racing reset with this thread.
+ count++;
+ if (count % 6 == 0) // 6 is the number of failure requests per offset
+ offset++;
+ if (count % 42 == 0) {
+ count = 0; // reset, for second iteration
+ offset = 0;
+ }
}
-
if (read < length) {
// no need to reply, client has already closed
// ensure closed
if (is.read() != -1)
- new AssertionError("Unexpected read");
+ new AssertionError("Unexpected read: " + read);
} else {
OutputStream os = s.getOutputStream();
err.println("Server: writing "
+ RESPONSE.getBytes(US_ASCII).length + " bytes");
os.write(RESPONSE.getBytes(US_ASCII));
}
-
- } catch (IOException e) {
- if (!closed)
- System.out.println("Unexpected" + e);
+ } catch (Throwable e) {
+ if (!closed) {
+ err.println("Unexpected: " + e);
+ e.printStackTrace();
+ }
}
}
}
@@ -306,9 +320,14 @@
static final byte[] requestEnd = new byte[] {'\r', '\n', '\r', '\n' };
// Read until the end of a HTTP request headers
- static void readRequestHeaders(InputStream is) throws IOException {
- int requestEndCount = 0, r;
+ static String readRequestHeaders(InputStream is) throws IOException {
+ int requestEndCount = 0, r, eol = -1;
+ StringBuilder headers = new StringBuilder();
while ((r = is.read()) != -1) {
+ if (r == '\r' && eol < 0) {
+ eol = headers.length();
+ }
+ headers.append((char) r);
if (r == requestEnd[requestEndCount]) {
requestEndCount++;
if (requestEndCount == 4) {
@@ -318,6 +337,11 @@
requestEndCount = 0;
}
}
+
+ if (eol <= 0) return null;
+ String requestLine = headers.toString().substring(0, eol);
+ if (!requestLine.contains(MARKER)) return null;
+ return headers.toString();
}
static int fileSize(Path p) {
--- a/test/jdk/java/net/httpclient/ShortResponseBody.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/ShortResponseBody.java Thu Nov 07 18:44:09 2019 +0000
@@ -57,6 +57,8 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Stream;
import jdk.test.lib.net.SimpleSSLContext;
+import org.testng.ITestContext;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider;
@@ -106,6 +108,13 @@
};
final ExecutorService service = Executors.newCachedThreadPool(factory);
+ @BeforeMethod
+ void beforeMethod(ITestContext context) {
+ if (context.getFailedTests().size() > 0) {
+ throw new RuntimeException("some tests failed");
+ }
+ }
+
@DataProvider(name = "sanity")
public Object[][] sanity() {
return new Object[][]{
@@ -129,7 +138,7 @@
}
@DataProvider(name = "uris")
- public Object[][] variants() {
+ public Object[][] variants(ITestContext context) {
String[][] cases = new String[][] {
// The length query string is the total number of bytes in the reply,
// including headers, before the server closes the connection. The
@@ -188,6 +197,13 @@
{ httpsURIClsImed, "no bytes"},
};
+ if (context.getFailedTests().size() > 0) {
+ // Shorten the log output by preventing useless
+ // skip traces to be printed for subsequent methods
+ // if one of the previous @Test method has failed.
+ return new Object[0][];
+ }
+
List<Object[]> list = new ArrayList<>();
Arrays.asList(cases).stream()
.map(e -> new Object[] {e[0], e[1], true}) // reuse client
@@ -469,7 +485,9 @@
try {
ss.close();
} catch (IOException e) {
- throw new UncheckedIOException("Unexpected", e);
+ out.println("Unexpected exception while closing server: " + e);
+ e.printStackTrace(out);
+ throw new UncheckedIOException("Unexpected: ", e);
}
}
}
@@ -494,9 +512,12 @@
((SSLSocket)s).startHandshake();
}
out.println("Server: got connection, closing immediately ");
- } catch (IOException e) {
- if (!closed)
- throw new UncheckedIOException("Unexpected", e);
+ } catch (Throwable e) {
+ if (!closed) {
+ out.println("Unexpected exception in server: " + e);
+ e.printStackTrace(out);
+ throw new RuntimeException("Unexpected: ", e);
+ }
}
}
}
@@ -565,9 +586,12 @@
os.write(responseBytes[i]);
os.flush();
}
- } catch (IOException e) {
- if (!closed)
- throw new UncheckedIOException("Unexpected", e);
+ } catch (Throwable e) {
+ if (!closed) {
+ out.println("Unexpected exception in server: " + e);
+ e.printStackTrace(out);
+ throw new RuntimeException("Unexpected: " + e, e);
+ }
}
}
}
--- a/test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/SubscriberWhiteboxVerification.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/net/httpclient/reactivestreams-tck/org/reactivestreams/tck/SubscriberWhiteboxVerification.java Thu Nov 07 18:44:09 2019 +0000
@@ -278,8 +278,9 @@
@Override
public void run(WhiteboxTestStage stage) throws InterruptedException {
stage.puppet().triggerRequest(1);
+ stage.expectRequest();
stage.puppet().signalCancel();
- stage.expectRequest();
+ stage.expectCancelling();
stage.signalNext();
stage.puppet().triggerRequest(1);
@@ -824,11 +825,17 @@
* Before sending any element to the subscriber, the TCK must wait for the subscriber to request that element, and
* must be prepared for the subscriber to only request one element at a time, it is not enough for the TCK to
* simply invoke this method before sending elements.
+ * <p>
+ * An invocation of {@link #signalCancel()} may be coalesced into any elements that have not yet been requested,
+ * such that only a cancel signal is emitted.
*/
void triggerRequest(long elements);
/**
- * Trigger {@code cancel()} on your {@link Subscriber}
+ * Trigger {@code cancel()} on your {@link Subscriber}.
+ * <p>
+ * An invocation of this method may be coalesced into any outstanding requests, as requested by
+ *{@link #triggerRequest(long)}, such that only a cancel signal is emitted.
*/
void signalCancel();
}
--- a/test/jdk/java/nio/channels/DatagramChannel/AdaptDatagramSocket.java Thu Oct 31 16:16:21 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
- * 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.
- *
- * 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 4313882 4981129 8143610
- * @summary Unit test for datagram-socket-channel adaptors
- * @library .. /test/lib
- * @build jdk.test.lib.Utils TestServers
- * @run main AdaptDatagramSocket
- * @key randomness
- */
-
-import java.net.*;
-import java.nio.channels.*;
-import java.util.*;
-
-
-public class AdaptDatagramSocket {
-
- static java.io.PrintStream out = System.out;
- static Random rand = new Random();
-
- static String toString(DatagramPacket dp) {
- return ("DatagramPacket[off=" + dp.getOffset()
- + ", len=" + dp.getLength()
- + "]");
- }
-
- static void test(DatagramSocket ds, InetSocketAddress dst,
- boolean shouldTimeout)
- throws Exception
- {
- DatagramPacket op = new DatagramPacket(new byte[100], 13, 42, dst);
- rand.nextBytes(op.getData());
- DatagramPacket ip = new DatagramPacket(new byte[100], 19, 100 - 19);
- out.println("pre op: " + toString(op) + " ip: " + toString(ip));
-
- long start = System.currentTimeMillis();
- ds.send(op);
-
- for (;;) {
- try {
- ds.receive(ip);
- if (ip.getLength() == 0) { // ## Not sure why this happens
- ip.setLength(100 - 19);
- continue;
- }
- } catch (SocketTimeoutException x) {
- if (shouldTimeout) {
- out.println("Receive timed out, as expected");
- return;
- }
- throw x;
- }
- break;
- }
-
- out.println("rtt: " + (System.currentTimeMillis() - start));
- out.println("post op: " + toString(op) + " ip: " + toString(ip));
-
- for (int i = 0; i < ip.getLength(); i++) {
- if (ip.getData()[ip.getOffset() + i]
- != op.getData()[op.getOffset() + i])
- throw new Exception("Incorrect data received");
- }
-
- if (!(ip.getSocketAddress().equals(dst))) {
- throw new Exception("Incorrect sender address, expected: " + dst
- + " actual: " + ip.getSocketAddress());
- }
- }
-
- static void test(InetSocketAddress dst,
- int timeout, boolean shouldTimeout,
- boolean connect)
- throws Exception
- {
- out.println();
- out.println("dst: " + dst);
-
- DatagramSocket ds;
- if (false) {
- // Original
- ds = new DatagramSocket();
- } else {
- DatagramChannel dc = DatagramChannel.open();
- ds = dc.socket();
- ds.bind(new InetSocketAddress(0));
- }
-
- out.println("socket: " + ds);
- if (connect) {
- ds.connect(dst);
- out.println("connect: " + ds);
- }
- InetSocketAddress src = new InetSocketAddress(ds.getLocalAddress(),
- ds.getLocalPort());
- out.println("src: " + src);
-
- if (timeout > 0)
- ds.setSoTimeout(timeout);
- out.println("timeout: " + ds.getSoTimeout());
-
- for (int i = 0; i < 5; i++) {
- test(ds, dst, shouldTimeout);
- }
-
- // Leave the socket open so that we don't reuse the old src address
- //ds.close();
-
- }
-
- public static void main(String[] args) throws Exception {
- // need an UDP echo server
- try (TestServers.UdpEchoServer echoServer
- = TestServers.UdpEchoServer.startNewServer(100)) {
- final InetSocketAddress address
- = new InetSocketAddress(echoServer.getAddress(),
- echoServer.getPort());
- test(address, 0, false, false);
- test(address, 0, false, true);
- test(address, Integer.MAX_VALUE, false, false);
- }
- try (TestServers.UdpDiscardServer discardServer
- = TestServers.UdpDiscardServer.startNewServer()) {
- final InetSocketAddress address
- = new InetSocketAddress(discardServer.getAddress(),
- discardServer.getPort());
- test(address, 10, true, false);
- }
- }
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/DatagramChannel/AdaptorBasic.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 4313882 4981129 8143610 8232673
+ * @summary Unit test for datagram-socket-channel adaptors
+ * @modules java.base/java.net:+open
+ * @library .. /test/lib
+ * @build jdk.test.lib.Utils TestServers
+ * @run main AdaptorBasic
+ * @key randomness
+ */
+
+import java.net.*;
+import java.nio.channels.*;
+import java.util.*;
+import java.lang.reflect.Field;
+
+
+public class AdaptorBasic {
+
+ static java.io.PrintStream out = System.out;
+ static Random rand = new Random();
+
+ static String toString(DatagramPacket dp) {
+ return ("DatagramPacket[off=" + dp.getOffset()
+ + ", len=" + dp.getLength()
+ + "]");
+ }
+
+ static int getBufLength(DatagramPacket p) throws Exception {
+ Field f = DatagramPacket.class.getDeclaredField("bufLength");
+ f.setAccessible(true);
+ return (int) f.get(p);
+ }
+
+ static void test(DatagramSocket ds, InetSocketAddress dst, boolean shouldTimeout)
+ throws Exception
+ {
+ DatagramPacket op = new DatagramPacket(new byte[100], 13, 42, dst);
+ rand.nextBytes(op.getData());
+ int bufLength = 100 - 19;
+ DatagramPacket ip = new DatagramPacket(new byte[100], 19, bufLength);
+ out.println("pre op: " + toString(op) + " ip: " + toString(ip));
+
+ long start = System.currentTimeMillis();
+ ds.send(op);
+
+ for (;;) {
+ try {
+ ds.receive(ip);
+ } catch (SocketTimeoutException x) {
+ if (shouldTimeout) {
+ out.println("Receive timed out, as expected");
+ return;
+ }
+ throw x;
+ }
+ break;
+ }
+
+ out.println("rtt: " + (System.currentTimeMillis() - start));
+ out.println("post op: " + toString(op) + " ip: " + toString(ip));
+
+ for (int i = 0; i < ip.getLength(); i++) {
+ if (ip.getData()[ip.getOffset() + i]
+ != op.getData()[op.getOffset() + i])
+ throw new Exception("Incorrect data received");
+ }
+
+ if (!(ip.getSocketAddress().equals(dst))) {
+ throw new Exception("Incorrect sender address, expected: " + dst
+ + " actual: " + ip.getSocketAddress());
+ }
+
+ if (getBufLength(ip) != bufLength) {
+ throw new Exception("DatagramPacket bufLength changed by receive!!!");
+ }
+ }
+
+ static void test(InetSocketAddress dst,
+ int timeout, boolean shouldTimeout,
+ boolean connect)
+ throws Exception
+ {
+ out.println();
+ out.println("dst: " + dst);
+
+ DatagramSocket ds;
+ if (false) {
+ // Original
+ ds = new DatagramSocket();
+ } else {
+ DatagramChannel dc = DatagramChannel.open();
+ ds = dc.socket();
+ ds.bind(new InetSocketAddress(0));
+ }
+
+ out.println("socket: " + ds);
+ if (connect) {
+ ds.connect(dst);
+ out.println("connect: " + ds);
+ }
+ InetSocketAddress src = new InetSocketAddress(ds.getLocalAddress(),
+ ds.getLocalPort());
+ out.println("src: " + src);
+
+ if (timeout > 0)
+ ds.setSoTimeout(timeout);
+ out.println("timeout: " + ds.getSoTimeout());
+
+ for (int i = 0; i < 5; i++) {
+ test(ds, dst, shouldTimeout);
+ }
+
+ // Leave the socket open so that we don't reuse the old src address
+ //ds.close();
+
+ }
+
+ public static void main(String[] args) throws Exception {
+ // need an UDP echo server
+ try (TestServers.UdpEchoServer echoServer
+ = TestServers.UdpEchoServer.startNewServer(100)) {
+ final InetSocketAddress address
+ = new InetSocketAddress(echoServer.getAddress(),
+ echoServer.getPort());
+ test(address, 0, false, false);
+ test(address, 0, false, true);
+ test(address, Integer.MAX_VALUE, false, false);
+ }
+ try (TestServers.UdpDiscardServer discardServer
+ = TestServers.UdpDiscardServer.startNewServer()) {
+ final InetSocketAddress address
+ = new InetSocketAddress(discardServer.getAddress(),
+ discardServer.getPort());
+ test(address, 10, true, false);
+ }
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/DatagramChannel/AdaptorConcurrentIO.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8232673
+ * @summary Test DatagramChannel socket adaptor with concurrent send/receive
+ */
+
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.nio.channels.DatagramChannel;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+public class AdaptorConcurrentIO {
+
+ public static void main(String[] args) throws Exception {
+ testConcurrentSendReceive(0);
+ testConcurrentSendReceive(60_000);
+ }
+
+ /**
+ * Starts a task that blocks in the adaptor's receive method, then invokes
+ * the adaptor's send method to send a datagram. If the adaptor were using
+ * the channel's blockingLock then send without be blocked waiting for
+ * the receive to complete.
+ */
+ static void testConcurrentSendReceive(int timeout) throws Exception {
+ try (DatagramChannel dc = DatagramChannel.open()) {
+ InetAddress lb = InetAddress.getLoopbackAddress();
+ dc.bind(new InetSocketAddress(lb, 0));
+ DatagramSocket s = dc.socket();
+ s.setSoTimeout(timeout);
+
+ ExecutorService pool = Executors.newSingleThreadExecutor();
+ try {
+ Future<String> result = pool.submit(() -> {
+ byte[] data = new byte[100];
+ DatagramPacket p = new DatagramPacket(data, 0, data.length);
+ s.receive(p);
+ return new String(p.getData(), p.getOffset(), p.getLength(), "UTF-8");
+ });
+
+ Thread.sleep(200); // give chance for thread to block
+
+ byte[] data = "hello".getBytes("UTF-8");
+ DatagramPacket p = new DatagramPacket(data, 0, data.length);
+ p.setSocketAddress(s.getLocalSocketAddress());
+ s.send(p);
+
+ String msg = result.get();
+ if (!msg.equals("hello"))
+ throw new RuntimeException("Unexpected message: " + msg);
+ } finally {
+ pool.shutdown();
+ }
+ }
+ }
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/DatagramChannel/AdaptorConnect.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8232673
+ * @summary Test DatagramChannel socket adaptor connect method with illegal args
+ * @run testng AdaptorConnect
+ */
+
+import java.net.DatagramSocket;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.SocketException;
+import java.nio.channels.DatagramChannel;
+import static java.net.InetAddress.getLoopbackAddress;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class AdaptorConnect {
+
+ /**
+ * Invoke the given socket's connect method with illegal arguments.
+ */
+ private void testConnectWithIllegalArguments(DatagramSocket s) {
+ assertThrows(IllegalArgumentException.class, () -> s.connect(null));
+ assertThrows(IllegalArgumentException.class, () -> s.connect(null, 7000));
+ assertThrows(IllegalArgumentException.class, () -> s.connect(getLoopbackAddress(), -1));
+ assertThrows(IllegalArgumentException.class, () -> s.connect(getLoopbackAddress(), 100_000));
+
+ SocketAddress sillyAddress = new SocketAddress() { };
+ assertThrows(IllegalArgumentException.class, () -> s.connect(sillyAddress));
+
+ SocketAddress unresolved = InetSocketAddress.createUnresolved("foo", 7777);
+ assertThrows(SocketException.class, () -> s.connect(unresolved));
+ }
+
+ /**
+ * Test connect method with an open socket.
+ */
+ public void testOpenSocket() throws Exception {
+ try (DatagramChannel dc = DatagramChannel.open()) {
+ DatagramSocket s = dc.socket();
+
+ testConnectWithIllegalArguments(s);
+
+ // should not be bound or connected
+ assertTrue(s.getLocalSocketAddress() == null);
+ assertTrue(s.getRemoteSocketAddress() == null);
+
+ // connect(SocketAddress)
+ var remote1 = new InetSocketAddress(getLoopbackAddress(), 7001);
+ s.connect(remote1);
+ assertEquals(s.getRemoteSocketAddress(), remote1);
+ testConnectWithIllegalArguments(s);
+ assertEquals(s.getRemoteSocketAddress(), remote1);
+
+ // connect(SocketAddress)
+ var remote2 = new InetSocketAddress(getLoopbackAddress(), 7002);
+ s.connect(remote2);
+ assertEquals(s.getRemoteSocketAddress(), remote2);
+ testConnectWithIllegalArguments(s);
+ assertEquals(s.getRemoteSocketAddress(), remote2);
+
+ // connect(InetAddress, int)
+ var remote3 = new InetSocketAddress(getLoopbackAddress(), 7003);
+ s.connect(remote3.getAddress(), remote3.getPort());
+ assertEquals(s.getRemoteSocketAddress(), remote3);
+ testConnectWithIllegalArguments(s);
+ assertEquals(s.getRemoteSocketAddress(), remote3);
+
+ // connect(InetAddress, int)
+ var remote4 = new InetSocketAddress(getLoopbackAddress(), 7004);
+ s.connect(remote4.getAddress(), remote4.getPort());
+ assertEquals(s.getRemoteSocketAddress(), remote4);
+ testConnectWithIllegalArguments(s);
+ assertEquals(s.getRemoteSocketAddress(), remote4);
+ }
+ }
+
+ /**
+ * Test connect method with a closed socket.
+ */
+ public void testClosedSocket() throws Exception {
+ DatagramChannel dc = DatagramChannel.open();
+ DatagramSocket s = dc.socket();
+ dc.close();
+
+ testConnectWithIllegalArguments(s);
+
+ // connect does not throw an exception when closed
+ var remote = new InetSocketAddress(getLoopbackAddress(), 7001);
+ s.connect(remote);
+ s.connect(remote.getAddress(), remote.getPort());
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/DatagramChannel/AdaptorGetters.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8232673
+ * @summary Test the DatagramChannel socket adaptor getter methods
+ * @run testng AdaptorGetters
+ */
+
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.nio.channels.DatagramChannel;
+
+import org.testng.annotations.Test;
+import static org.testng.Assert.*;
+
+@Test
+public class AdaptorGetters {
+
+ /**
+ * Test getters on unbound socket, before and after it is closed.
+ */
+ public void testUnboundSocket() throws Exception {
+ DatagramChannel dc = DatagramChannel.open();
+ DatagramSocket s = dc.socket();
+ try {
+
+ // state
+ assertFalse(s.isBound());
+ assertFalse(s.isConnected());
+ assertFalse(s.isClosed());
+
+ // local address
+ assertTrue(s.getLocalAddress().isAnyLocalAddress());
+ assertTrue(s.getLocalPort() == 0);
+ assertTrue(s.getLocalSocketAddress() == null);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+
+ } finally {
+ dc.close();
+ }
+
+ // state
+ assertFalse(s.isBound());
+ assertFalse(s.isConnected());
+ assertTrue(s.isClosed());
+
+ // local address
+ assertTrue(s.getLocalAddress() == null);
+ assertTrue(s.getLocalPort() == -1);
+ assertTrue(s.getLocalSocketAddress() == null);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+ assertTrue((s.getRemoteSocketAddress() == null));
+ }
+
+ /**
+ * Test getters on bound socket, before and after it is closed.
+ */
+ public void testBoundSocket() throws Exception {
+ DatagramChannel dc = DatagramChannel.open();
+ DatagramSocket s = dc.socket();
+ try {
+ dc.bind(new InetSocketAddress(0));
+ var localAddress = (InetSocketAddress) dc.getLocalAddress();
+
+ // state
+ assertTrue(s.isBound());
+ assertFalse(s.isConnected());
+ assertFalse(s.isClosed());
+
+ // local address
+ assertEquals(s.getLocalAddress(), localAddress.getAddress());
+ assertTrue(s.getLocalPort() == localAddress.getPort());
+ assertEquals(s.getLocalSocketAddress(), localAddress);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+ assertTrue((s.getRemoteSocketAddress() == null));
+
+ } finally {
+ dc.close();
+ }
+
+ // state
+ assertTrue(s.isBound());
+ assertFalse(s.isConnected());
+ assertTrue(s.isClosed());
+
+ // local address
+ assertTrue(s.getLocalAddress() == null);
+ assertTrue(s.getLocalPort() == -1);
+ assertTrue(s.getLocalSocketAddress() == null);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+ assertTrue((s.getRemoteSocketAddress() == null));
+ }
+
+ /**
+ * Test getters on connected socket, before and after it is closed.
+ */
+ public void testConnectedSocket() throws Exception {
+ var loopback = InetAddress.getLoopbackAddress();
+ var remoteAddress = new InetSocketAddress(loopback, 7777);
+ DatagramChannel dc = DatagramChannel.open();
+ DatagramSocket s = dc.socket();
+ try {
+ dc.connect(remoteAddress);
+ var localAddress = (InetSocketAddress) dc.getLocalAddress();
+
+ // state
+ assertTrue(s.isBound());
+ assertTrue(s.isConnected());
+ assertFalse(s.isClosed());
+
+ // local address
+ assertEquals(s.getLocalAddress(), localAddress.getAddress());
+ assertTrue(s.getLocalPort() == localAddress.getPort());
+ assertEquals(s.getLocalSocketAddress(), localAddress);
+
+ // remote address
+ assertEquals(s.getInetAddress(), remoteAddress.getAddress());
+ assertTrue(s.getPort() == remoteAddress.getPort());
+ assertEquals(s.getRemoteSocketAddress(), remoteAddress);
+
+ } finally {
+ dc.close();
+ }
+
+ // state
+ assertTrue(s.isBound());
+ assertTrue(s.isConnected());
+ assertTrue(s.isClosed());
+
+ // local address
+ assertTrue(s.getLocalAddress() == null);
+ assertTrue(s.getLocalPort() == -1);
+ assertTrue(s.getLocalSocketAddress() == null);
+
+ // remote address
+ assertEquals(s.getInetAddress(), remoteAddress.getAddress());
+ assertTrue(s.getPort() == remoteAddress.getPort());
+ assertEquals(s.getRemoteSocketAddress(), remoteAddress);
+ }
+
+ /**
+ * Test getters on disconnected socket, before and after it is closed.
+ */
+ public void testDisconnectedSocket() throws Exception {
+ DatagramChannel dc = DatagramChannel.open();
+ DatagramSocket s = dc.socket();
+ try {
+ var loopback = InetAddress.getLoopbackAddress();
+ dc.connect(new InetSocketAddress(loopback, 7777));
+ dc.disconnect();
+
+ var localAddress = (InetSocketAddress) dc.getLocalAddress();
+
+ // state
+ assertTrue(s.isBound());
+ assertFalse(s.isConnected());
+ assertFalse(s.isClosed());
+
+ // local address
+ assertEquals(s.getLocalAddress(), localAddress.getAddress());
+ assertTrue(s.getLocalPort() == localAddress.getPort());
+ assertEquals(s.getLocalSocketAddress(), localAddress);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+ assertTrue((s.getRemoteSocketAddress() == null));
+
+
+ } finally {
+ dc.close();
+ }
+
+ // state
+ assertTrue(s.isBound());
+ assertFalse(s.isConnected());
+ assertTrue(s.isClosed());
+
+ // local address
+ assertTrue(s.getLocalAddress() == null);
+ assertTrue(s.getLocalPort() == -1);
+ assertTrue(s.getLocalSocketAddress() == null);
+
+ // remote address
+ assertTrue(s.getInetAddress() == null);
+ assertTrue(s.getPort() == -1);
+ assertTrue((s.getRemoteSocketAddress() == null));
+ }
+}
--- a/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/nio/channels/etc/AdaptorCloseAndInterrupt.java Thu Nov 07 18:44:09 2019 +0000
@@ -22,7 +22,7 @@
*/
/* @test
- * @bug 7184932
+ * @bug 7184932 8232673
* @summary Test asynchronous close and interrupt of timed socket adapter methods
* @key randomness intermittent
*/
@@ -78,8 +78,10 @@
try (DatagramChannel peer = DatagramChannel.open()) {
peer.socket().bind(null);
- new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncClose();
- new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncInterrupt();
+ new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncClose(0);
+ new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncClose(30_000);
+ new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncInterrupt(0);
+ new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncInterrupt(30_000);
}
new AdaptorCloseAndInterrupt().ssAcceptAsyncClose();
@@ -138,11 +140,10 @@
}
}
- void dcReceiveAsyncClose() throws IOException {
+ void dcReceiveAsyncClose(int timeout) throws IOException {
DatagramChannel dc = DatagramChannel.open();
- dc.connect(new InetSocketAddress(
- InetAddress.getLoopbackAddress(), port));
- dc.socket().setSoTimeout(30*1000);
+ dc.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), port));
+ dc.socket().setSoTimeout(timeout);
doAsyncClose(dc);
@@ -150,24 +151,23 @@
dc.socket().receive(new DatagramPacket(new byte[100], 100));
System.err.format("close() was invoked: %s%n", isClosed.get());
throw new RuntimeException("receive should not have completed");
- } catch (ClosedChannelException expected) {}
+ } catch (SocketException expected) { }
if (!dc.socket().isClosed())
throw new RuntimeException("socket is not closed");
}
- void dcReceiveAsyncInterrupt() throws IOException {
+ void dcReceiveAsyncInterrupt(int timeout) throws IOException {
DatagramChannel dc = DatagramChannel.open();
- dc.connect(new InetSocketAddress(
- InetAddress.getLoopbackAddress(), port));
- dc.socket().setSoTimeout(30*1000);
+ dc.connect(new InetSocketAddress(InetAddress.getLoopbackAddress(), port));
+ dc.socket().setSoTimeout(timeout);
doAsyncInterrupt();
try {
dc.socket().receive(new DatagramPacket(new byte[100], 100));
throw new RuntimeException("receive should not have completed");
- } catch (ClosedByInterruptException expected) {
+ } catch (SocketException expected) {
System.out.format("interrupt() was invoked: %s%n",
isInterrupted.get());
System.out.format("dcReceiveAsyncInterrupt was interrupted: %s%n",
--- a/test/jdk/java/util/concurrent/tck/ConcurrentHashMapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentHashMapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -55,8 +55,6 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return ConcurrentHashMap.class; }
public Map emptyMap() { return new ConcurrentHashMap(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return true; }
public boolean permitsNullKeys() { return false; }
public boolean permitsNullValues() { return false; }
--- a/test/jdk/java/util/concurrent/tck/ConcurrentSkipListMapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/ConcurrentSkipListMapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -54,9 +54,8 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return ConcurrentSkipListMap.class; }
public Map emptyMap() { return new ConcurrentSkipListMap(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return true; }
+ public boolean remappingFunctionCalledAtMostOnce() { return false; };
public boolean permitsNullKeys() { return false; }
public boolean permitsNullValues() { return false; }
public boolean supportsSetValue() { return false; }
--- a/test/jdk/java/util/concurrent/tck/HashMapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/HashMapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -46,8 +46,6 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return HashMap.class; }
public Map emptyMap() { return new HashMap(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return false; }
public boolean permitsNullKeys() { return true; }
public boolean permitsNullValues() { return true; }
--- a/test/jdk/java/util/concurrent/tck/HashtableTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/HashtableTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -44,8 +44,6 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return Hashtable.class; }
public Map emptyMap() { return new Hashtable(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return true; }
public boolean permitsNullKeys() { return false; }
public boolean permitsNullValues() { return false; }
--- a/test/jdk/java/util/concurrent/tck/JSR166TestCase.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/JSR166TestCase.java Thu Nov 07 18:44:09 2019 +0000
@@ -731,6 +731,13 @@
/**
* Returns a random element from given choices.
*/
+ <T> T chooseRandomly(List<T> choices) {
+ return choices.get(ThreadLocalRandom.current().nextInt(choices.size()));
+ }
+
+ /**
+ * Returns a random element from given choices.
+ */
<T> T chooseRandomly(T... choices) {
return choices[ThreadLocalRandom.current().nextInt(choices.length)];
}
@@ -1799,7 +1806,7 @@
public int await() {
try {
- return super.await(2 * LONG_DELAY_MS, MILLISECONDS);
+ return super.await(LONGER_DELAY_MS, MILLISECONDS);
} catch (TimeoutException timedOut) {
throw new AssertionError("timed out");
} catch (Exception fail) {
--- a/test/jdk/java/util/concurrent/tck/LinkedHashMapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/LinkedHashMapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -46,8 +46,6 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return LinkedHashMap.class; }
public Map emptyMap() { return new LinkedHashMap(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return false; }
public boolean permitsNullKeys() { return true; }
public boolean permitsNullValues() { return true; }
--- a/test/jdk/java/util/concurrent/tck/MapImplementation.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/MapImplementation.java Thu Nov 07 18:44:09 2019 +0000
@@ -40,9 +40,15 @@
public Class<?> klazz();
/** Returns an empty map. */
public Map emptyMap();
- public Object makeKey(int i);
- public Object makeValue(int i);
+
+ // General purpose implementations can use Integers for key and value
+ default Object makeKey(int i) { return i; }
+ default Object makeValue(int i) { return i; }
+ default int keyToInt(Object key) { return (Integer) key; }
+ default int valueToInt(Object value) { return (Integer) value; }
+
public boolean isConcurrent();
+ default boolean remappingFunctionCalledAtMostOnce() { return true; };
public boolean permitsNullKeys();
public boolean permitsNullValues();
public boolean supportsSetValue();
--- a/test/jdk/java/util/concurrent/tck/MapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/MapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -32,13 +32,17 @@
* http://creativecommons.org/publicdomain/zero/1.0/
*/
-import junit.framework.Test;
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadLocalRandom;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.function.BiFunction;
+
+import junit.framework.Test;
/**
* Contains tests applicable to all Map implementations.
@@ -227,6 +231,71 @@
assertTrue(clone.isEmpty());
}
+ /**
+ * Concurrent access by compute methods behaves as expected
+ */
+ public void testConcurrentAccess() throws Throwable {
+ final Map map = impl.emptyMap();
+ final long testDurationMillis = expensiveTests ? 1000 : 2;
+ final int nTasks = impl.isConcurrent()
+ ? ThreadLocalRandom.current().nextInt(1, 10)
+ : 1;
+ final AtomicBoolean done = new AtomicBoolean(false);
+ final boolean remappingFunctionCalledAtMostOnce
+ = impl.remappingFunctionCalledAtMostOnce();
+ final List<CompletableFuture> futures = new ArrayList<>();
+ final AtomicLong expectedSum = new AtomicLong(0);
+ final Action[] tasks = {
+ // repeatedly increment values using compute()
+ () -> {
+ long[] invocations = new long[2];
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+ BiFunction<Object, Object, Object> incValue = (k, v) -> {
+ invocations[1]++;
+ int vi = (v == null) ? 1 : impl.valueToInt(v) + 1;
+ return impl.makeValue(vi);
+ };
+ while (!done.getAcquire()) {
+ invocations[0]++;
+ Object key = impl.makeKey(3 * rnd.nextInt(10));
+ map.compute(key, incValue);
+ }
+ if (remappingFunctionCalledAtMostOnce)
+ assertEquals(invocations[0], invocations[1]);
+ expectedSum.getAndAdd(invocations[0]);
+ },
+ // repeatedly increment values using computeIfPresent()
+ () -> {
+ long[] invocations = new long[2];
+ ThreadLocalRandom rnd = ThreadLocalRandom.current();
+ BiFunction<Object, Object, Object> incValue = (k, v) -> {
+ invocations[1]++;
+ int vi = impl.valueToInt(v) + 1;
+ return impl.makeValue(vi);
+ };
+ while (!done.getAcquire()) {
+ Object key = impl.makeKey(3 * rnd.nextInt(10));
+ if (map.computeIfPresent(key, incValue) != null)
+ invocations[0]++;
+ }
+ if (remappingFunctionCalledAtMostOnce)
+ assertEquals(invocations[0], invocations[1]);
+ expectedSum.getAndAdd(invocations[0]);
+ },
+ };
+ for (int i = nTasks; i--> 0; ) {
+ Action task = chooseRandomly(tasks);
+ futures.add(CompletableFuture.runAsync(checkedRunnable(task)));
+ }
+ Thread.sleep(testDurationMillis);
+ done.setRelease(true);
+ for (var future : futures)
+ checkTimedGet(future, null);
+
+ long sum = map.values().stream().mapToLong(x -> (int) x).sum();
+ assertEquals(expectedSum.get(), sum);
+ }
+
// public void testFailsIntentionallyForDebugging() {
// fail(impl.klazz().getSimpleName());
// }
--- a/test/jdk/java/util/concurrent/tck/StampedLockTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/StampedLockTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -42,12 +42,17 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
+import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.StampedLock;
import java.util.function.BiConsumer;
+import java.util.function.Consumer;
import java.util.function.Function;
import junit.framework.Test;
@@ -102,56 +107,51 @@
}
List<Action> lockLockers(Lock lock) {
- List<Action> lockers = new ArrayList<>();
- lockers.add(() -> lock.lock());
- lockers.add(() -> lock.lockInterruptibly());
- lockers.add(() -> lock.tryLock());
- lockers.add(() -> lock.tryLock(Long.MIN_VALUE, DAYS));
- lockers.add(() -> lock.tryLock(0L, DAYS));
- lockers.add(() -> lock.tryLock(Long.MAX_VALUE, DAYS));
- return lockers;
+ return List.of(
+ () -> lock.lock(),
+ () -> lock.lockInterruptibly(),
+ () -> lock.tryLock(),
+ () -> lock.tryLock(Long.MIN_VALUE, DAYS),
+ () -> lock.tryLock(0L, DAYS),
+ () -> lock.tryLock(Long.MAX_VALUE, DAYS));
}
List<Function<StampedLock, Long>> readLockers() {
- List<Function<StampedLock, Long>> readLockers = new ArrayList<>();
- readLockers.add(sl -> sl.readLock());
- readLockers.add(sl -> sl.tryReadLock());
- readLockers.add(sl -> readLockInterruptiblyUninterrupted(sl));
- readLockers.add(sl -> tryReadLockUninterrupted(sl, Long.MIN_VALUE, DAYS));
- readLockers.add(sl -> tryReadLockUninterrupted(sl, 0L, DAYS));
- readLockers.add(sl -> sl.tryConvertToReadLock(sl.tryOptimisticRead()));
- return readLockers;
+ return List.of(
+ sl -> sl.readLock(),
+ sl -> sl.tryReadLock(),
+ sl -> readLockInterruptiblyUninterrupted(sl),
+ sl -> tryReadLockUninterrupted(sl, Long.MIN_VALUE, DAYS),
+ sl -> tryReadLockUninterrupted(sl, 0L, DAYS),
+ sl -> sl.tryConvertToReadLock(sl.tryOptimisticRead()));
}
List<BiConsumer<StampedLock, Long>> readUnlockers() {
- List<BiConsumer<StampedLock, Long>> readUnlockers = new ArrayList<>();
- readUnlockers.add((sl, stamp) -> sl.unlockRead(stamp));
- readUnlockers.add((sl, stamp) -> assertTrue(sl.tryUnlockRead()));
- readUnlockers.add((sl, stamp) -> sl.asReadLock().unlock());
- readUnlockers.add((sl, stamp) -> sl.unlock(stamp));
- readUnlockers.add((sl, stamp) -> assertValid(sl, sl.tryConvertToOptimisticRead(stamp)));
- return readUnlockers;
+ return List.of(
+ (sl, stamp) -> sl.unlockRead(stamp),
+ (sl, stamp) -> assertTrue(sl.tryUnlockRead()),
+ (sl, stamp) -> sl.asReadLock().unlock(),
+ (sl, stamp) -> sl.unlock(stamp),
+ (sl, stamp) -> assertValid(sl, sl.tryConvertToOptimisticRead(stamp)));
}
List<Function<StampedLock, Long>> writeLockers() {
- List<Function<StampedLock, Long>> writeLockers = new ArrayList<>();
- writeLockers.add(sl -> sl.writeLock());
- writeLockers.add(sl -> sl.tryWriteLock());
- writeLockers.add(sl -> writeLockInterruptiblyUninterrupted(sl));
- writeLockers.add(sl -> tryWriteLockUninterrupted(sl, Long.MIN_VALUE, DAYS));
- writeLockers.add(sl -> tryWriteLockUninterrupted(sl, 0L, DAYS));
- writeLockers.add(sl -> sl.tryConvertToWriteLock(sl.tryOptimisticRead()));
- return writeLockers;
+ return List.of(
+ sl -> sl.writeLock(),
+ sl -> sl.tryWriteLock(),
+ sl -> writeLockInterruptiblyUninterrupted(sl),
+ sl -> tryWriteLockUninterrupted(sl, Long.MIN_VALUE, DAYS),
+ sl -> tryWriteLockUninterrupted(sl, 0L, DAYS),
+ sl -> sl.tryConvertToWriteLock(sl.tryOptimisticRead()));
}
List<BiConsumer<StampedLock, Long>> writeUnlockers() {
- List<BiConsumer<StampedLock, Long>> writeUnlockers = new ArrayList<>();
- writeUnlockers.add((sl, stamp) -> sl.unlockWrite(stamp));
- writeUnlockers.add((sl, stamp) -> assertTrue(sl.tryUnlockWrite()));
- writeUnlockers.add((sl, stamp) -> sl.asWriteLock().unlock());
- writeUnlockers.add((sl, stamp) -> sl.unlock(stamp));
- writeUnlockers.add((sl, stamp) -> assertValid(sl, sl.tryConvertToOptimisticRead(stamp)));
- return writeUnlockers;
+ return List.of(
+ (sl, stamp) -> sl.unlockWrite(stamp),
+ (sl, stamp) -> assertTrue(sl.tryUnlockWrite()),
+ (sl, stamp) -> sl.asWriteLock().unlock(),
+ (sl, stamp) -> sl.unlock(stamp),
+ (sl, stamp) -> assertValid(sl, sl.tryConvertToOptimisticRead(stamp)));
}
/**
@@ -1413,4 +1413,113 @@
}
}
+ /**
+ * Multiple threads repeatedly contend for the same lock.
+ */
+ public void testConcurrentAccess() throws Exception {
+ final StampedLock sl = new StampedLock();
+ final Lock wl = sl.asWriteLock();
+ final Lock rl = sl.asReadLock();
+ final long testDurationMillis = expensiveTests ? 1000 : 2;
+ final int nTasks = ThreadLocalRandom.current().nextInt(1, 10);
+ final AtomicBoolean done = new AtomicBoolean(false);
+ final List<CompletableFuture> futures = new ArrayList<>();
+ final List<Callable<Long>> stampedWriteLockers = List.of(
+ () -> sl.writeLock(),
+ () -> writeLockInterruptiblyUninterrupted(sl),
+ () -> tryWriteLockUninterrupted(sl, LONG_DELAY_MS, MILLISECONDS),
+ () -> {
+ long stamp;
+ do { stamp = sl.tryConvertToWriteLock(sl.tryOptimisticRead()); }
+ while (stamp == 0L);
+ return stamp;
+ },
+ () -> {
+ long stamp;
+ do { stamp = sl.tryWriteLock(); } while (stamp == 0L);
+ return stamp;
+ },
+ () -> {
+ long stamp;
+ do { stamp = sl.tryWriteLock(0L, DAYS); } while (stamp == 0L);
+ return stamp;
+ });
+ final List<Callable<Long>> stampedReadLockers = List.of(
+ () -> sl.readLock(),
+ () -> readLockInterruptiblyUninterrupted(sl),
+ () -> tryReadLockUninterrupted(sl, LONG_DELAY_MS, MILLISECONDS),
+ () -> {
+ long stamp;
+ do { stamp = sl.tryConvertToReadLock(sl.tryOptimisticRead()); }
+ while (stamp == 0L);
+ return stamp;
+ },
+ () -> {
+ long stamp;
+ do { stamp = sl.tryReadLock(); } while (stamp == 0L);
+ return stamp;
+ },
+ () -> {
+ long stamp;
+ do { stamp = sl.tryReadLock(0L, DAYS); } while (stamp == 0L);
+ return stamp;
+ });
+ final List<Consumer<Long>> stampedWriteUnlockers = List.of(
+ stamp -> sl.unlockWrite(stamp),
+ stamp -> sl.unlock(stamp),
+ stamp -> assertTrue(sl.tryUnlockWrite()),
+ stamp -> wl.unlock(),
+ stamp -> sl.tryConvertToOptimisticRead(stamp));
+ final List<Consumer<Long>> stampedReadUnlockers = List.of(
+ stamp -> sl.unlockRead(stamp),
+ stamp -> sl.unlock(stamp),
+ stamp -> assertTrue(sl.tryUnlockRead()),
+ stamp -> rl.unlock(),
+ stamp -> sl.tryConvertToOptimisticRead(stamp));
+ final Action writer = () -> {
+ // repeatedly acquires write lock
+ var locker = chooseRandomly(stampedWriteLockers);
+ var unlocker = chooseRandomly(stampedWriteUnlockers);
+ while (!done.getAcquire()) {
+ long stamp = locker.call();
+ try {
+ assertTrue(isWriteLockStamp(stamp));
+ assertTrue(sl.isWriteLocked());
+ assertFalse(isReadLockStamp(stamp));
+ assertFalse(sl.isReadLocked());
+ assertEquals(0, sl.getReadLockCount());
+ assertTrue(sl.validate(stamp));
+ } finally {
+ unlocker.accept(stamp);
+ }
+ }
+ };
+ final Action reader = () -> {
+ // repeatedly acquires read lock
+ var locker = chooseRandomly(stampedReadLockers);
+ var unlocker = chooseRandomly(stampedReadUnlockers);
+ while (!done.getAcquire()) {
+ long stamp = locker.call();
+ try {
+ assertFalse(isWriteLockStamp(stamp));
+ assertFalse(sl.isWriteLocked());
+ assertTrue(isReadLockStamp(stamp));
+ assertTrue(sl.isReadLocked());
+ assertTrue(sl.getReadLockCount() > 0);
+ assertTrue(sl.validate(stamp));
+ } finally {
+ unlocker.accept(stamp);
+ }
+ }
+ };
+ for (int i = nTasks; i--> 0; ) {
+ Action task = chooseRandomly(writer, reader);
+ futures.add(CompletableFuture.runAsync(checkedRunnable(task)));
+ }
+ Thread.sleep(testDurationMillis);
+ done.setRelease(true);
+ for (var future : futures)
+ checkTimedGet(future, null);
+ }
+
}
--- a/test/jdk/java/util/concurrent/tck/TreeMapTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/java/util/concurrent/tck/TreeMapTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -53,8 +53,6 @@
class Implementation implements MapImplementation {
public Class<?> klazz() { return TreeMap.class; }
public Map emptyMap() { return new TreeMap(); }
- public Object makeKey(int i) { return i; }
- public Object makeValue(int i) { return i; }
public boolean isConcurrent() { return false; }
public boolean permitsNullKeys() { return false; }
public boolean permitsNullValues() { return true; }
--- a/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java Thu Nov 07 18:44:09 2019 +0000
@@ -59,7 +59,8 @@
* @library /test/lib /test/jdk
* @build sun.hotspot.WhiteBox
* @run main ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:MaxTenuringThreshold=1 -Xms20M -Xmx20M
+ * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+AlwaysTenure
+ * -Xms20M -Xmx20M -Xlog:gc=debug,gc+heap*=debug,gc+ergo*=debug,gc+start=debug
* -XX:G1MixedGCLiveThresholdPercent=100 -XX:G1HeapWastePercent=0 -XX:G1HeapRegionSize=1m
* -XX:+UseG1GC -XX:+UseStringDeduplication
* -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
@@ -75,7 +76,7 @@
recording.start();
// create more weak garbage than can fit in this heap (-Xmx20m), will force collection of weak references
- weakRefs = range(1, 100)
+ weakRefs = range(1, 30)
.mapToObj(n -> new WeakReference<>(new byte[1_000_000]))
.collect(toList()); // force evaluation of lazy stream (all weak refs must be created)
@@ -150,8 +151,7 @@
toUnreachable.add(new byte[arraySize]);
});
- // Do two young collections, MaxTenuringThreshold=1 will force promotion.
- getWhiteBox().youngGC();
+ // Do one young collection, AlwaysTenure will force promotion.
getWhiteBox().youngGC();
// Check it is promoted & keep alive
@@ -167,11 +167,10 @@
/**
* The necessary condition for guaranteed mixed GC is running in VM with the following flags:
- * -XX:+UnlockExperimentalVMOptions -XX:MaxTenuringThreshold=1 -Xms{HEAP_SIZE}M
+ * -XX:+UnlockExperimentalVMOptions -XX:+AlwaysTenure -Xms{HEAP_SIZE}M
* -Xmx{HEAP_SIZE}M -XX:G1MixedGCLiveThresholdPercent=100 -XX:G1HeapWastePercent=0
* -XX:G1HeapRegionSize={REGION_SIZE}m
*
- * @param provokeSize The size to allocate to provoke the start of a mixed gc (half heap size?)
* @param g1HeapRegionSize The size of your regions in bytes
*/
public static void provokeMixedGC(int g1HeapRegionSize) {
--- a/test/jdk/jdk/nio/zipfs/CopyMoveTests.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/jdk/nio/zipfs/CopyMoveTests.java Thu Nov 07 18:44:09 2019 +0000
@@ -41,7 +41,7 @@
/**
* @test
- * @bug 8223771
+ * @bug 8231766
* @summary Test Files::copy and Files::move with Zip FS
* @modules jdk.zipfs
* @run testng/othervm CopyMoveTests
--- a/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/sun/net/www/ftptest/FtpCommandHandler.java Thu Nov 07 18:44:09 2019 +0000
@@ -466,6 +466,10 @@
try {
str = in.readLine();
System.out.println("line: " + str);
+ if (str == null) {
+ System.out.println("EOF read from input");
+ break;
+ }
buf = new StringBuffer(str);
res = parseCmd(buf);
switch (res) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/tools/keytool/ExtOptionCamelCase.java Thu Nov 07 18:44:09 2019 +0000
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * 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 8231950
+ * @modules java.base/sun.security.tools.keytool
+ * java.base/sun.security.util
+ * java.base/sun.security.x509
+ * @compile -XDignore.symbol.file ExtOptionCamelCase.java
+ * @summary keytool -ext camel-case shorthand not working
+ */
+
+import sun.security.tools.keytool.Main;
+import sun.security.util.DerValue;
+import sun.security.x509.BasicConstraintsExtension;
+import sun.security.x509.CertificateExtensions;
+import sun.security.x509.Extension;
+import sun.security.x509.KeyUsageExtension;
+
+import java.io.ByteArrayOutputStream;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.KeyPairGenerator;
+import java.security.PublicKey;
+import java.util.List;
+
+public class ExtOptionCamelCase {
+ static Method createV3Extensions;
+ static Constructor<Main> ctor;
+ static PublicKey pk;
+ static Method oneOf;
+
+ public static void main(String[] args) throws Exception {
+
+ prepare();
+
+ // Unseen ext name
+ testCreateFail("abc");
+
+ // camelCase match, both cases work
+ testCreate("bc", BasicConstraintsExtension.class);
+ testCreate("BC", BasicConstraintsExtension.class);
+
+ // Prefix match
+ testCreate("BasicC", BasicConstraintsExtension.class);
+
+ // Ambiguous, digitalSignature or dataEncipherment?
+ testCreateFail("ku=d");
+
+ // prefix match
+ testCreate("ku:c=dig", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.DIGITAL_SIGNATURE));
+
+ // camelCase match
+ testCreate("ku=kE", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.KEY_ENCIPHERMENT));
+
+ // camelCase match must be only 1st+CAPITALs
+ testCreateFail("ku=KeUs");
+
+ // camelCase match, must be only 1st + all CAPITALs
+ testCreate("ku=kCS", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.KEY_CERTSIGN));
+
+ // ... not all CAPITALs
+ testCreateFail("ku=kC");
+
+ // ... has lowercase letters
+ testCreateFail("ku=keCeSi");
+
+ // Ambiguous, keyAgreement or keyCertSign
+ testCreateFail("ku:c=ke");
+
+ // camelCase natch
+ testCreate("ku:c=dE", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.DATA_ENCIPHERMENT));
+ // prefix match
+ testCreate("ku:c=de", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.DECIPHER_ONLY));
+
+ // camelCase match
+ testCreate("ku:c=kA", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.KEY_AGREEMENT));
+
+ // camelCase match, fallback
+ testCreate("ku:c=ka", KeyUsageExtension.class,
+ x -> x.get(KeyUsageExtension.KEY_AGREEMENT));
+
+ // Testing oneOf() directly
+ testOneOf("a", -1, "b", "c"); // -1 means not found
+ testOneOf("a", -2, "ab", "ac"); // -2 means ambiguous
+
+ testOneOf("a", 0, "a", "ac"); //exact match
+ testOneOf("a", 0, "a", "b");
+ testOneOf("ac", 1, "a", "ac");
+
+ testOneOf("a", 0, "abc", "bcd");
+ testOneOf("ab", 0, "abc", "ABC");
+ testOneOf("ab", 0, "abc", "aBC");
+ testOneOf("ab", 0, "abc", "Abc");
+ testOneOf("AB", 1, "abc", "ABC");
+ testOneOf("aB", 0, "abcBcd", "abcDef");
+ testOneOf("ab", -2, "abcBcd", "abcDef");
+ testOneOf("aB", -2, "abcBcdEfg", "abcDef");
+
+ testOneOf("ab", 0, "abcDef", "axyBuv");
+ testOneOf("aB", 1, "abcDef", "axyBuv");
+ testOneOf("a", -2, "abcDef", "axyBuv");
+
+ testOneOf("aBC", -1, "a12BxyCuvDmn"); // 12 is not removed
+ testOneOf("a12BCD", 0, "a12BxyCuvDmn");
+ testOneOf("a12BC", -1, "a12BxyCuvDmn"); // must be full
+
+ // Fallback
+ testOneOf("bc", 0, "BasicConstraints");
+ testOneOf("BC", 0, "BasicConstraints");
+ testOneOf("BasicConstraints", 0, "BasicConstraints");
+ testOneOf("basicconstraints", 0, "BasicConstraints");
+ testOneOf("Basic", 0, "BasicConstraints");
+ testOneOf("basic", 0, "BasicConstraints");
+
+ testOneOf("BaCo", -1, "BasicConstraints");
+ }
+
+ // Expose some private methods
+ static void prepare() throws Exception {
+ createV3Extensions = Main.class.getDeclaredMethod(
+ "createV3Extensions",
+ CertificateExtensions.class,
+ CertificateExtensions.class,
+ List.class,
+ PublicKey.class,
+ PublicKey.class);
+ createV3Extensions.setAccessible(true);
+ ctor = Main.class.getDeclaredConstructor();
+ ctor.setAccessible(true);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance("EC");
+ pk = kpg.generateKeyPair().getPublic();
+
+ oneOf = Main.class.getDeclaredMethod(
+ "oneOf", String.class, String[].class);
+ oneOf.setAccessible(true);
+ }
+
+ /**
+ * Ensures the given type of extension is created with the option
+ */
+ static <T extends Extension> void testCreate(String option, Class<T> clazz)
+ throws Exception {
+ testCreate(option, clazz, null);
+ }
+
+ /**
+ * Ensures an option is invalid and will be rejected
+ */
+ static <T extends Extension> void testCreateFail(String option)
+ throws Exception {
+ testCreate(option, null, null);
+ }
+
+ /**
+ * Ensures the given type of extension is created and match the rule
+ * with the option.
+ *
+ * @param option the -ext option provided to keytool
+ * @param clazz the expected extension to create, null means none
+ * @param rule a predicate to check if the extension created is acceptable
+ * @param <T> the extected extension type
+ * @throws Exception if test result is unexpected
+ */
+ static <T extends Extension> void testCreate(String option, Class<T> clazz,
+ PredicateWithException<T> rule) throws Exception {
+ try {
+ CertificateExtensions exts = (CertificateExtensions)
+ createV3Extensions.invoke(ctor.newInstance(),
+ null, null, List.of(option), pk, null);
+
+ // ATTENTION: the extensions created above might contain raw
+ // extensions (not of a subtype) and we need to store and reload
+ // it to resolve them to subtypes.
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ exts.encode(bout);
+ exts = new CertificateExtensions(new DerValue(bout.toByteArray()).data);
+
+ if (clazz == null) {
+ throw new Exception("Should fail");
+ } else {
+ for (Extension e : exts.getAllExtensions()) {
+ if (e.getClass() == clazz) {
+ if (rule == null || rule.test((T) e)) {
+ return;
+ }
+ }
+ }
+ throw new Exception("Unexpected result: " + exts);
+ }
+ } catch (InvocationTargetException e) {
+ if (clazz == null) {
+ return;
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ @FunctionalInterface
+ interface PredicateWithException<T> {
+ boolean test(T t) throws Exception;
+ }
+
+ /**
+ * Ensures oneOf returns the expected result.
+ *
+ * @param s input
+ * @param expected expected value, -2 if ambiguous, -1 if no match
+ * @param items existing strings to match
+ * @throws Exception if test result is unexpected
+ */
+ static void testOneOf(String s, int expected, String... items)
+ throws Exception {
+ try {
+ int res = (int)oneOf.invoke(null, s, items);
+ if (expected == -2) {
+ throw new Exception("Should fail");
+ } else {
+ if (expected != res) {
+ throw new Exception(
+ "Expected " + expected + ", actually " + res);
+ }
+ }
+ } catch (InvocationTargetException e) {
+ if (expected == -2) {
+ return;
+ } else {
+ throw e;
+ }
+ }
+ }
+}
--- a/test/jdk/sun/security/tools/keytool/KeyToolTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/sun/security/tools/keytool/KeyToolTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @author weijun.wang
+ * @bug 6251120 8231950
* @summary Testing keytool
*
* Run through autotest.sh and manualtest.sh
@@ -1319,11 +1319,13 @@
// cRLSign cannot be cs
testFail("", pre + "ku6 -ext KU=cs");
testOK("", pre + "ku11 -ext KU=nr");
- // ke also means keyAgreement
+ // ke means keyAgreement and keyCertSign...
testFail("", pre + "ku12 -ext KU=ke");
testOK("", pre + "ku12 -ext KU=keyE");
+ testOK("", pre + "ku12a -ext KU=kE"); // kE is only keyEncipherment
// de also means decipherOnly
- testFail("", pre + "ku13 -ext KU=de");
+ testOK("", pre + "ku13a -ext KU=de"); // de is decipherOnly
+ testOK("", pre + "ku13b -ext KU=dE"); // dE is dataEncipherment
testOK("", pre + "ku13 -ext KU=dataE");
testOK("", pre + "ku14 -ext KU=ka");
testOK("", pre + "ku15 -ext KU=kcs");
--- a/test/jdk/sun/text/resources/LocaleData.cldr Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/sun/text/resources/LocaleData.cldr Thu Nov 07 18:44:09 2019 +0000
@@ -8382,3 +8382,9 @@
CalendarData/zh_SG/firstDayOfWeek=1: AG AS AU BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW;2: 001 AD AI AL AM AN AR AT AX AZ BA BE BG BM BN BY CH CL CM CR CY CZ DE DK EC EE ES FI FJ FO FR GB GE GF GP GR HR HU IE IS IT KG KZ LB LI LK LT LU LV MC MD ME MK MN MQ MY NL NO NZ PL RE RO RS RU SE SI SK SM TJ TM TR UA UY UZ VA VN XK;6: MV;7: AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY
CalendarData/zh_TW/firstDayOfWeek=1: AG AS AU BD BR BS BT BW BZ CA CN CO DM DO ET GT GU HK HN ID IL IN JM JP KE KH KR LA MH MM MO MT MX MZ NI NP PA PE PH PK PR PT PY SA SG SV TH TT TW UM US VE VI WS YE ZA ZW;2: 001 AD AI AL AM AN AR AT AX AZ BA BE BG BM BN BY CH CL CM CR CY CZ DE DK EC EE ES FI FJ FO FR GB GE GF GP GR HR HU IE IS IT KG KZ LB LI LK LT LU LV MC MD ME MK MN MQ MY NL NO NZ PL RE RO RS RU SE SI SK SM TJ TM TR UA UY UZ VA VN XK;6: MV;7: AE AF BH DJ DZ EG IQ IR JO KW LY OM QA SD SY
CalendarData/zh_TW/minimalDaysInFirstWeek=1: 001 GU UM US VI;4: AD AN AT AX BE BG CH CZ DE DK EE ES FI FJ FO FR GB GF GG GI GP GR HU IE IM IS IT JE LI LT LU MC MQ NL NO PL PT RE RU SE SJ SK SM VA
+
+# bug 8233579
+FormatData/es_CL/MonthAbbreviations/8=sep.
+FormatData/es_CL/standalone.MonthAbbreviations/8=sept.
+FormatData/es_CO/MonthAbbreviations/8=sep.
+FormatData/es_CO/standalone.MonthAbbreviations/8=sept.
--- a/test/jdk/sun/text/resources/LocaleDataTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/sun/text/resources/LocaleDataTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -39,7 +39,7 @@
* 8017142 8037343 8055222 8042126 8074791 8075173 8080774 8129361 8134916
* 8145136 8145952 8164784 8037111 8081643 7037368 8178872 8185841 8190918
* 8187946 8195478 8181157 8179071 8193552 8202026 8204269 8202537 8208746
- * 8209775 8221432 8227127 8230284 8231273
+ * 8209775 8221432 8227127 8230284 8231273 8233579
* @summary Verify locale data
* @modules java.base/sun.util.resources
* @modules jdk.localedata
--- a/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/jdk/tools/jlink/plugins/VendorInfoPluginsTest.java Thu Nov 07 18:44:09 2019 +0000
@@ -87,8 +87,8 @@
"--version");
oa.stderrShouldMatch("^ +java.vendor.url.bug = " + BUG_URL + "$");
oa.stderrShouldMatch("^ +java.vendor.version = " + VERSION + "$");
- oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(build.*$");
- oa.stdoutShouldMatch("^.*Server VM " + VERSION + " \\(build.*$");
+ oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*build.*$");
+ oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*build.*$");
// VM error log
oa = ProcessTools.executeProcess(launcher,
@@ -97,7 +97,7 @@
"VendorInfoPluginsTest$Crasher");
oa.stdoutShouldMatch("^# +" + VM_BUG_URL + "$");
oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*$");
- oa.stdoutShouldMatch("^.*Server VM " + VERSION + " \\(.*$");
+ oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*$");
}
--- a/test/langtools/tools/javac/api/TestGetScopeResult.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/langtools/tools/javac/api/TestGetScopeResult.java Thu Nov 07 18:44:09 2019 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8205418 8207229 8207230
+ * @bug 8205418 8207229 8207230 8230847
* @summary Test the outcomes from Trees.getScope
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.comp
@@ -42,11 +42,19 @@
import javax.tools.StandardJavaFileManager;
import javax.tools.ToolProvider;
+import com.sun.source.tree.BlockTree;
import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.ConditionalExpressionTree;
+import com.sun.source.tree.IdentifierTree;
import com.sun.source.tree.LambdaExpressionTree;
+import com.sun.source.tree.MethodInvocationTree;
+import com.sun.source.tree.MethodTree;
import com.sun.source.tree.Scope;
+import com.sun.source.tree.Tree;
import com.sun.source.tree.VariableTree;
import com.sun.source.util.JavacTask;
+import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskListener;
import com.sun.source.util.TreePath;
import com.sun.source.util.TreePathScanner;
import com.sun.source.util.Trees;
@@ -65,6 +73,11 @@
public static void main(String... args) throws IOException {
new TestGetScopeResult().run();
new TestGetScopeResult().testAnalyzerDisabled();
+ new TestGetScopeResult().testVariablesInSwitch();
+ new TestGetScopeResult().testMemberRefs();
+ new TestGetScopeResult().testAnnotations();
+ new TestGetScopeResult().testAnnotationsLazy();
+ new TestGetScopeResult().testCircular();
}
public void run() throws IOException {
@@ -259,5 +272,225 @@
super.analyze(statement, env);
}
}
+
+ void testVariablesInSwitch() throws IOException {
+ JavacTool c = JavacTool.create();
+ try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+ class MyFileObject extends SimpleJavaFileObject {
+ MyFileObject() {
+ super(URI.create("myfo:///Test.java"), SOURCE);
+ }
+ @Override
+ public String getCharContent(boolean ignoreEncodingErrors) {
+ return "class Test {" +
+ " void test() {\n" +
+ " E e = E.A;\n" +
+ " Object o = E.A;\n" +
+ " switch (e) {\n" +
+ " case A:\n" +
+ " return;\n" +
+ " case B:\n" +
+ " test();\n" +
+ " E ee = null;\n" +
+ " break;\n" +
+ " }\n" +
+ " }\n" +
+ " enum E {A, B}\n" +
+ "}";
+ }
+ }
+ Context ctx = new Context();
+ TestAnalyzer.preRegister(ctx);
+ JavacTask t = (JavacTask) c.getTask(null, fm, null, null, null,
+ List.of(new MyFileObject()), ctx);
+ CompilationUnitTree cut = t.parse().iterator().next();
+ t.analyze();
+
+ new TreePathScanner<Void, Void>() {
+ @Override
+ public Void visitMethodInvocation(MethodInvocationTree node, Void p) {
+ Trees.instance(t).getScope(getCurrentPath());
+ return super.visitMethodInvocation(node, p);
+ }
+ }.scan(cut, null);
+ }
+ }
+
+ void testMemberRefs() throws IOException {
+ JavacTool c = JavacTool.create();
+ try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+ class MyFileObject extends SimpleJavaFileObject {
+ MyFileObject() {
+ super(URI.create("myfo:///Test.java"), SOURCE);
+ }
+ @Override
+ public String getCharContent(boolean ignoreEncodingErrors) {
+ return "class Test {" +
+ " void test() {\n" +
+ " Test t = this;\n" +
+ " Runnable r1 = t::test;\n" +
+ " Runnable r2 = true ? t::test : t::test;\n" +
+ " c(t::test);\n" +
+ " c(true ? t::test : t::test);\n" +
+ " }\n" +
+ " void c(Runnable r) {}\n" +
+ "}";
+ }
+ }
+ Context ctx = new Context();
+ TestAnalyzer.preRegister(ctx);
+ JavacTask t = (JavacTask) c.getTask(null, fm, null, null, null,
+ List.of(new MyFileObject()), ctx);
+ CompilationUnitTree cut = t.parse().iterator().next();
+ t.analyze();
+
+ new TreePathScanner<Void, Void>() {
+ @Override
+ public Void visitConditionalExpression(ConditionalExpressionTree node, Void p) {
+ Trees.instance(t).getScope(new TreePath(getCurrentPath(), node.getCondition()));
+ return super.visitConditionalExpression(node, p);
+ }
+
+ @Override
+ public Void visitBlock(BlockTree node, Void p) {
+ Trees.instance(t).getScope(getCurrentPath());
+ return super.visitBlock(node, p);
+ }
+ }.scan(cut, null);
+ }
+ }
+
+ void testAnnotations() throws IOException {
+ JavacTool c = JavacTool.create();
+ try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+ class MyFileObject extends SimpleJavaFileObject {
+ MyFileObject() {
+ super(URI.create("myfo:///Test.java"), SOURCE);
+ }
+ @Override
+ public String getCharContent(boolean ignoreEncodingErrors) {
+ return "class Test {" +
+ " void test() {\n" +
+ " new Object() {\n" +
+ " @A\n" +
+ " public String t() { return null; }\n" +
+ " };\n" +
+ " }\n" +
+ " @interface A {}\n" +
+ "}";
+ }
+ }
+ Context ctx = new Context();
+ TestAnalyzer.preRegister(ctx);
+ JavacTask t = (JavacTask) c.getTask(null, fm, null, null, null,
+ List.of(new MyFileObject()), ctx);
+ CompilationUnitTree cut = t.parse().iterator().next();
+ t.analyze();
+
+ new TreePathScanner<Void, Void>() {
+ @Override
+ public Void visitIdentifier(IdentifierTree node, Void p) {
+ if (node.getName().contentEquals("A")) {
+ Trees.instance(t).getScope(getCurrentPath());
+ }
+ return super.visitIdentifier(node, p);
+ }
+
+ @Override
+ public Void visitMethod(MethodTree node, Void p) {
+ super.visitMethod(node, p);
+ if (node.getReturnType() != null) {
+ Trees.instance(t).getScope(new TreePath(getCurrentPath(), node.getReturnType()));
+ }
+ return null;
+ }
+ }.scan(cut, null);
+ }
+ }
+
+ void testAnnotationsLazy() throws IOException {
+ JavacTool c = JavacTool.create();
+ try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+ class MyFileObject extends SimpleJavaFileObject {
+ MyFileObject() {
+ super(URI.create("myfo:///Test.java"), SOURCE);
+ }
+ @Override
+ public String getCharContent(boolean ignoreEncodingErrors) {
+ return "import java.lang.annotation.*;\n" +
+ "\n" +
+ "class ClassA {\n" +
+ " Object o = ClassB.lcv;\n" +
+ "}\n" +
+ "\n" +
+ "class ClassB {\n" +
+ " static final String[] lcv = new @TA String[0];\n" +
+ "}\n" +
+ "\n" +
+ "class ClassC {\n" +
+ " static final Object o = (@TA Object) null;\n" +
+ "}\n" +
+ "\n" +
+ "@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})\n" +
+ "@interface TA {}\n";
+ }
+ }
+ Context ctx = new Context();
+ TestAnalyzer.preRegister(ctx);
+ JavacTask t = (JavacTask) c.getTask(null, fm, null, null, null,
+ List.of(new MyFileObject()), ctx);
+ t.addTaskListener(new TaskListener() {
+ @Override
+ public void finished(TaskEvent e) {
+ if (e.getKind() == TaskEvent.Kind.ANALYZE) {
+ new TreePathScanner<Void, Void>() {
+ @Override
+ public Void scan(Tree tree, Void p) {
+ if (tree != null) {
+ Trees.instance(t).getScope(new TreePath(getCurrentPath(), tree));
+ }
+ return super.scan(tree, p);
+ }
+ }.scan(Trees.instance(t).getPath(e.getTypeElement()), null);
+ }
+ }
+ });
+
+ t.call();
+ }
+ }
+
+ void testCircular() throws IOException {
+ JavacTool c = JavacTool.create();
+ try (StandardJavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+ class MyFileObject extends SimpleJavaFileObject {
+ MyFileObject() {
+ super(URI.create("myfo:///Test.java"), SOURCE);
+ }
+ @Override
+ public String getCharContent(boolean ignoreEncodingErrors) {
+ return "class Test extends Test {" +
+ " {\n" +
+ " int i;\n" +
+ " }\n" +
+ "}";
+ }
+ }
+ Context ctx = new Context();
+ TestAnalyzer.preRegister(ctx);
+ JavacTask t = (JavacTask) c.getTask(null, fm, null, null, null,
+ List.of(new MyFileObject()), ctx);
+ CompilationUnitTree cut = t.parse().iterator().next();
+ t.analyze();
+
+ new TreePathScanner<Void, Void>() {
+ @Override
+ public Void visitBlock(BlockTree node, Void p) {
+ Trees.instance(t).getScope(getCurrentPath());
+ return super.visitBlock(node, p);
+ }
+ }.scan(cut, null);
+ }
+ }
+
}
-
--- a/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/langtools/tools/javac/lambda/lambdaExpression/LambdaTest6.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,8 +26,11 @@
* @bug 8003280
* @summary Add lambda tests
* Test bridge methods for certain SAM conversions
+ * Tests that jdk.internal.lambda.disableEagerInitialization=true creates a
+ * get$Lambda method for non-capturing lambdas
* @compile LambdaTest6.java
* @run main LambdaTest6
+ * @run main/othervm -Djdk.internal.lambda.disableEagerInitialization=true LambdaTest6
*/
import java.lang.reflect.Method;
@@ -60,18 +63,37 @@
return s;
}
+ private static Set<String> allowedMethods() {
+ Set<String> s = new HashSet<>();
+ s.add("m");
+ if (Boolean.getBoolean("jdk.internal.lambda.disableEagerInitialization")) {
+ s.add("get$Lambda");
+ }
+ return s;
+ }
+
+ private static boolean matchingMethodNames(Method[] methods) {
+ Set<String> methodNames = new HashSet<>();
+ for (Method m : methods) {
+ methodNames.add(m.getName());
+ }
+ return methodNames.equals(allowedMethods());
+ }
+
private void test1()
{
L la = s -> { };
la.m("hi");
Class<? extends L> c1 = la.getClass();
Method[] methods = c1.getDeclaredMethods();
+ assertTrue(matchingMethodNames(methods));
Set<String> types = setOfStringObject();
for(Method m : methods) {
- assertTrue(m.getName().equals("m"));
- Class[] parameterTypes = m.getParameterTypes();
- assertTrue(parameterTypes.length == 1);
- assertTrue(types.remove(parameterTypes[0].getName()));
+ if ("m".equals(m.getName())) {
+ Class[] parameterTypes = m.getParameterTypes();
+ assertTrue(parameterTypes.length == 1);
+ assertTrue(types.remove(parameterTypes[0].getName()));
+ }
}
assertTrue(types.isEmpty() || (types.size() == 1 && types.contains("java.lang.String")));
}
@@ -82,12 +104,14 @@
//km.m("hi");
Class<? extends KM> c2 = km.getClass();
Method[] methods = c2.getDeclaredMethods();
+ assertTrue(matchingMethodNames(methods));
Set<String> types = setOfStringObject();
for(Method m : methods) {
- assertTrue(m.getName().equals("m"));
- Class[] parameterTypes = m.getParameterTypes();
- assertTrue(parameterTypes.length == 1);
- assertTrue(types.remove(parameterTypes[0].getName()));
+ if ("m".equals(m.getName())) {
+ Class[] parameterTypes = m.getParameterTypes();
+ assertTrue(parameterTypes.length == 1);
+ assertTrue(types.remove(parameterTypes[0].getName()));
+ }
}
assertTrue(types.isEmpty());
}
@@ -99,11 +123,13 @@
assertTrue( ((H)na).m().equals("hi") );
Class<? extends N> c3 = na.getClass();
Method[] methods = c3.getDeclaredMethods();
+ assertTrue(matchingMethodNames(methods));
Set<String> types = setOfStringObject();
for(Method m : methods) {
- assertTrue(m.getName().equals("m"));
- Class returnType = m.getReturnType();
- assertTrue(types.remove(returnType.getName()));
+ if ("m".equals(m.getName())) {
+ Class returnType = m.getReturnType();
+ assertTrue(types.remove(returnType.getName()));
+ }
}
assertTrue(types.size() == 1); //there's a bridge
}
--- a/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/langtools/tools/javac/lambda/methodReference/BridgeMethod.java Thu Nov 07 18:44:09 2019 +0000
@@ -26,11 +26,15 @@
* @bug 8003280
* @summary Add lambda tests
* Test bridge methods in certain SAM conversion
+ * Tests that jdk.internal.lambda.disableEagerInitialization=true creates a
+ * get$Lambda method for non-capturing lambdas
* @compile BridgeMethod.java
* @run main BridgeMethod
+ * @run main/othervm -Djdk.internal.lambda.disableEagerInitialization=true BridgeMethod
*/
import java.lang.reflect.Method;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -68,19 +72,38 @@
return s;
}
+ private static Set<String> allowedMethods() {
+ Set<String> s = new HashSet<>();
+ s.add("m");
+ if (Boolean.getBoolean("jdk.internal.lambda.disableEagerInitialization")) {
+ s.add("get$Lambda");
+ }
+ return s;
+ }
+
+ private static boolean matchingMethodNames(Method[] methods) {
+ Set<String> methodNames = new HashSet<>();
+ for (Method m : methods) {
+ methodNames.add(m.getName());
+ }
+ return methodNames.equals(allowedMethods());
+ }
+
public static void main(String[] args) {
L la = BridgeMethod::bar; //static reference
la.m("hi");
Class<? extends L> c1 = la.getClass();
Method[] methods = c1.getDeclaredMethods();
+ assertTrue(matchingMethodNames(methods));
Set<String> types = setOfStringObject();
System.out.println("methods in SAM conversion of L:");
for(Method m : methods) {
- System.out.println(m.toGenericString());
- assertTrue(m.getName().equals("m"));
- Class[] parameterTypes = m.getParameterTypes();
- assertTrue(parameterTypes.length == 1);
- assertTrue(types.remove(parameterTypes[0].getName()));
+ if (m.getName().equals("m")) {
+ System.out.println(m.toGenericString());
+ Class[] parameterTypes = m.getParameterTypes();
+ assertTrue(parameterTypes.length == 1);
+ assertTrue(types.remove(parameterTypes[0].getName()));
+ }
}
assertTrue(types.isEmpty() || (types.size() == 1 && types.contains("java.lang.String")));
@@ -88,14 +111,16 @@
//km.m("hi"); //will be uncommented when CR7028808 fixed
Class<? extends KM> c2 = km.getClass();
methods = c2.getDeclaredMethods();
+ assertTrue(matchingMethodNames(methods));
types = setOfStringObject();
System.out.println("methods in SAM conversion of KM:");
for(Method m : methods) {
- System.out.println(m.toGenericString());
- assertTrue(m.getName().equals("m"));
- Class<?>[] parameterTypes = m.getParameterTypes();
- assertTrue(parameterTypes.length == 1);
- assertTrue(types.remove(parameterTypes[0].getName()));
+ if (m.getName().equals("m")) {
+ System.out.println(m.toGenericString());
+ Class<?>[] parameterTypes = m.getParameterTypes();
+ assertTrue(parameterTypes.length == 1);
+ assertTrue(types.remove(parameterTypes[0].getName()));
+ }
}
assertTrue(types.isEmpty());
--- a/test/lib/jdk/test/lib/cds/CDSTestUtils.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/lib/jdk/test/lib/cds/CDSTestUtils.java Thu Nov 07 18:44:09 2019 +0000
@@ -601,4 +601,64 @@
ps.close();
fos.close();
}
+
+ // Format a line that defines an extra symbol in the file specify by -XX:SharedArchiveConfigFile=<file>
+ public static String formatArchiveConfigSymbol(String symbol) {
+ int refCount = -1; // This is always -1 in the current HotSpot implementation.
+ if (isAsciiPrintable(symbol)) {
+ return symbol.length() + " " + refCount + ": " + symbol;
+ } else {
+ StringBuilder sb = new StringBuilder();
+ int utf8_length = escapeArchiveConfigString(sb, symbol);
+ return utf8_length + " " + refCount + ": " + sb.toString();
+ }
+ }
+
+ // This method generates the same format as HashtableTextDump::put_utf8() in HotSpot,
+ // to be used by -XX:SharedArchiveConfigFile=<file>.
+ private static int escapeArchiveConfigString(StringBuilder sb, String s) {
+ byte arr[];
+ try {
+ arr = s.getBytes("UTF8");
+ } catch (java.io.UnsupportedEncodingException e) {
+ throw new RuntimeException("Unexpected", e);
+ }
+ for (int i = 0; i < arr.length; i++) {
+ char ch = (char)(arr[i] & 0xff);
+ if (isAsciiPrintable(ch)) {
+ sb.append(ch);
+ } else if (ch == '\t') {
+ sb.append("\\t");
+ } else if (ch == '\r') {
+ sb.append("\\r");
+ } else if (ch == '\n') {
+ sb.append("\\n");
+ } else if (ch == '\\') {
+ sb.append("\\\\");
+ } else {
+ String hex = Integer.toHexString(ch);
+ if (ch < 16) {
+ sb.append("\\x0");
+ } else {
+ sb.append("\\x");
+ }
+ sb.append(hex);
+ }
+ }
+
+ return arr.length;
+ }
+
+ private static boolean isAsciiPrintable(String s) {
+ for (int i = 0; i < s.length(); i++) {
+ if (!isAsciiPrintable(s.charAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean isAsciiPrintable(char ch) {
+ return ch >= 32 && ch < 127;
+ }
}
--- a/test/micro/org/openjdk/bench/java/lang/Clone.java Thu Oct 31 16:16:21 2019 +0000
+++ b/test/micro/org/openjdk/bench/java/lang/Clone.java Thu Nov 07 18:44:09 2019 +0000
@@ -43,12 +43,17 @@
private BitSet testObj1;
private Date testObj2;
private char[] testObj3;
+ private char[] testObj4;
+ private String[] testObj5;
@Setup
public void setup() {
testObj1 = new BitSet(10);
testObj2 = new Date();
testObj3 = new char[5];
+ testObj4 = new char[311];
+ String str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut";
+ testObj5 = str.split(" ", -1);
}
/** Calls clone on three different types. The types are java.util.BitSet, java.util.Date and char[]. */
@@ -59,5 +64,11 @@
bh.consume(testObj3.clone());
}
+ @Benchmark
+ public void cloneLarge(Blackhole bh) {
+ bh.consume(testObj4.clone());
+ bh.consume(testObj5.clone());
+ }
+
}