changeset 54095:991ba5f6900b lworld

Merge
author dsimms
date Thu, 31 Jan 2019 13:43:11 +0100
parents 5ce4b99e7bf1 dfacdb971494
children 91a3ebd000a3
files .hgtags make/conf/jib-profiles.js src/hotspot/cpu/x86/frame_x86.inline.hpp src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp src/hotspot/cpu/x86/stubGenerator_x86_64.cpp src/hotspot/cpu/x86/x86_64.ad src/hotspot/share/ci/ciArray.hpp src/hotspot/share/ci/ciEnv.cpp src/hotspot/share/ci/ciEnv.hpp src/hotspot/share/ci/ciObject.hpp src/hotspot/share/ci/ciStreams.cpp src/hotspot/share/ci/ciStreams.hpp src/hotspot/share/ci/ciTypeFlow.cpp src/hotspot/share/ci/ciTypeFlow.hpp src/hotspot/share/classfile/classLoader.cpp src/hotspot/share/code/nmethod.cpp src/hotspot/share/gc/parallel/psParallelCompact.cpp src/hotspot/share/gc/shared/c1/barrierSetC1.hpp src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp src/hotspot/share/interpreter/bytecodeTracer.cpp src/hotspot/share/interpreter/bytecodes.hpp src/hotspot/share/interpreter/interpreterRuntime.cpp src/hotspot/share/interpreter/interpreterRuntime.hpp src/hotspot/share/memory/universe.cpp src/hotspot/share/memory/universe.hpp src/hotspot/share/oops/constantPool.cpp src/hotspot/share/opto/callGenerator.cpp src/hotspot/share/opto/callGenerator.hpp src/hotspot/share/opto/callnode.cpp src/hotspot/share/opto/callnode.hpp src/hotspot/share/opto/chaitin.cpp src/hotspot/share/opto/doCall.cpp src/hotspot/share/opto/library_call.cpp src/hotspot/share/opto/matcher.cpp src/hotspot/share/opto/memnode.cpp src/hotspot/share/opto/parse1.cpp src/hotspot/share/prims/jni.cpp src/hotspot/share/prims/jvmtiExport.cpp src/hotspot/share/prims/methodHandles.cpp src/hotspot/share/prims/whitebox.cpp src/hotspot/share/runtime/arguments.cpp src/hotspot/share/runtime/deoptimization.cpp src/hotspot/share/runtime/deoptimization.hpp src/hotspot/share/runtime/frame.cpp src/hotspot/share/runtime/frame.hpp src/hotspot/share/runtime/globals.hpp src/hotspot/share/runtime/mutexLocker.cpp src/hotspot/share/runtime/stubRoutines.cpp src/hotspot/share/runtime/stubRoutines.hpp src/hotspot/share/runtime/synchronizer.cpp src/hotspot/share/runtime/synchronizer.hpp src/hotspot/share/runtime/thread.cpp src/hotspot/share/runtime/thread.hpp src/hotspot/share/runtime/vmOperations.cpp src/hotspot/share/runtime/vmOperations.hpp src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java src/java.base/share/classes/java/lang/invoke/VarHandle.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java test/Makefile test/TestCommon.gmk test/hotspot/jtreg/Makefile test/hotspot/jtreg/ProblemList.txt test/hotspot/jtreg/TEST.groups test/hotspot/jtreg/gc/g1/TestStringTableStats.java test/jaxp/Makefile test/jdk/Makefile test/jdk/ProblemList.txt test/jtreg-ext/requires/VMProps.java test/langtools/Makefile test/langtools/jdk/javadoc/doclet/testHtmlWarning/TestHtmlWarning.java test/lib/sun/hotspot/WhiteBox.java test/nashorn/Makefile
diffstat 728 files changed, 10143 insertions(+), 12852 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Jan 30 12:16:50 2019 +0530
+++ b/.hgtags	Thu Jan 31 13:43:11 2019 +0100
@@ -538,5 +538,6 @@
 f15d443f97318e9b40e6f451e327ff69ed4ec361 jdk-12+27
 a47b8125b7cc9ef59619745c163975fe935b57ed jdk-13+4
 659b004b6a1bd8c31e766cbdf328d8f8473fd4d7 jdk-12+28
-
 e3ed960609927b5fdfd0a797159835cd83a81a31 jdk-13+5
+44f41693631f9b5ac78ff4d2bfabd6734fe46df2 jdk-12+29
+b5f05fe4a6f8b3996a000c20078b356d991ca8ec jdk-13+6
--- a/doc/testing.html	Wed Jan 30 12:16:50 2019 +0530
+++ b/doc/testing.html	Thu Jan 31 13:43:11 2019 +0100
@@ -34,6 +34,7 @@
 </ul></li>
 <li><a href="#test-results-and-summary">Test results and summary</a></li>
 <li><a href="#test-suite-control">Test suite control</a><ul>
+<li><a href="#general-keywords-test_opts">General keywords (TEST_OPTS)</a></li>
 <li><a href="#jtreg-keywords">JTReg keywords</a></li>
 <li><a href="#gtest-keywords">Gtest keywords</a></li>
 <li><a href="#microbenchmark-keywords">Microbenchmark keywords</a></li>
@@ -102,11 +103,29 @@
 <p>To separate multiple keyword=value pairs, use <code>;</code> (semicolon). Since the shell normally eats <code>;</code>, the recommended usage is to write the assignment inside qoutes, e.g. <code>JTREG=&quot;...;...&quot;</code>. This will also make sure spaces are preserved, as in <code>JTREG=&quot;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug&quot;</code>.</p>
 <p>(Other ways are possible, e.g. using backslash: <code>JTREG=JOBS=1\;TIMEOUT=8</code>. Also, as a special technique, the string <code>%20</code> will be replaced with space for certain options, e.g. <code>JTREG=VM_OPTIONS=-XshowSettings%20-Xlog:gc+ref=debug</code>. This can be useful if you have layers of scripts and have trouble getting proper quoting of command line arguments through.)</p>
 <p>As far as possible, the names of the keywords have been standardized between test suites.</p>
+<h3 id="general-keywords-test_opts">General keywords (TEST_OPTS)</h3>
+<p>Some keywords are valid across different test suites. If you want to run tests from multiple test suites, or just don't want to care which test suite specific control variable to use, then you can use the general TEST_OPTS control variable.</p>
+<p>There are also some keywords that applies globally to the test runner system, not to any specific test suites. These are also available as TEST_OPTS keywords.</p>
+<h4 id="jobs">JOBS</h4>
+<p>Currently only applies to JTReg.</p>
+<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
+<p>Currently only applies to JTReg.</p>
+<h4 id="vm_options">VM_OPTIONS</h4>
+<p>Applies to JTReg, GTest and Micro.</p>
+<h4 id="java_options">JAVA_OPTIONS</h4>
+<p>Applies to JTReg, GTest and Micro.</p>
+<h4 id="aot_modules">AOT_MODULES</h4>
+<p>Applies to JTReg and GTest.</p>
+<h4 id="jcov">JCOV</h4>
+<p>This keywords applies globally to the test runner system. If set to <code>true</code>, it enables JCov coverage reporting for all tests run. To be useful, the JDK under test must be run with a JDK built with JCov instrumentation (<code>configure --with-jcov=&lt;path to directory containing lib/jcov.jar&gt;</code>, <code>make jcov-image</code>).</p>
+<p>The simplest way to run tests with JCov coverage report is to use the special target <code>jcov-test</code> instead of <code>test</code>, e.g. <code>make jcov-test TEST=jdk_lang</code>. This will make sure the JCov image is built, and that JCov reporting is enabled.</p>
+<p>The JCov report is stored in <code>build/$BUILD/test-results/jcov-output</code>.</p>
+<p>Please note that running with JCov reporting can be very memory intensive.</p>
 <h3 id="jtreg-keywords">JTReg keywords</h3>
-<h4 id="jobs">JOBS</h4>
+<h4 id="jobs-1">JOBS</h4>
 <p>The test concurrency (<code>-concurrency</code>).</p>
 <p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than 12.</p>
-<h4 id="timeout">TIMEOUT</h4>
+<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
 <p>The timeout factor (<code>-timeoutFactor</code>).</p>
 <p>Defaults to 4.</p>
 <h4 id="test_mode">TEST_MODE</h4>
@@ -125,13 +144,21 @@
 <p>Limit memory consumption (<code>-Xmx</code> and <code>-vmoption:-Xmx</code>, or none).</p>
 <p>Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.</p>
 <p>Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).</p>
+<h4 id="keywords">KEYWORDS</h4>
+<p>JTReg kewords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
+<h4 id="extra_problem_lists">EXTRA_PROBLEM_LISTS</h4>
+<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
+<p>If multiple file names are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
+<p>The file names should be either absolute, or relative to the JTReg test root of the tests to be run.</p>
 <h4 id="options">OPTIONS</h4>
 <p>Additional options to the JTReg test framework.</p>
 <p>Use <code>JTREG=&quot;OPTIONS=--help all&quot;</code> to see all available JTReg options.</p>
-<h4 id="java_options">JAVA_OPTIONS</h4>
+<h4 id="java_options-1">JAVA_OPTIONS</h4>
 <p>Additional Java options to JTReg (<code>-javaoption</code>).</p>
-<h4 id="vm_options">VM_OPTIONS</h4>
+<h4 id="vm_options-1">VM_OPTIONS</h4>
 <p>Additional VM options to JTReg (<code>-vmoption</code>).</p>
+<h4 id="aot_modules-1">AOT_MODULES</h4>
+<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
 <h3 id="gtest-keywords">Gtest keywords</h3>
 <h4 id="repeat">REPEAT</h4>
 <p>The number of times to repeat the tests (<code>--gtest_repeat</code>).</p>
@@ -139,6 +166,8 @@
 <h4 id="options-1">OPTIONS</h4>
 <p>Additional options to the Gtest test framework.</p>
 <p>Use <code>GTEST=&quot;OPTIONS=--help&quot;</code> to see all available Gtest options.</p>
+<h4 id="aot_modules-2">AOT_MODULES</h4>
+<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
 <h3 id="microbenchmark-keywords">Microbenchmark keywords</h3>
 <h4 id="fork">FORK</h4>
 <p>Override the number of benchmark forks to spawn. Same as specifying <code>-f &lt;num&gt;</code>.</p>
@@ -152,7 +181,7 @@
 <p>Amount of time to spend in each warmup iteration. Same as specifying <code>-w &lt;num&gt;</code>.</p>
 <h4 id="results_format">RESULTS_FORMAT</h4>
 <p>Specify to have the test run save a log of the values. Accepts the same values as <code>-rff</code>, i.e., <code>text</code>, <code>csv</code>, <code>scsv</code>, <code>json</code>, or <code>latex</code>.</p>
-<h4 id="vm_options-1">VM_OPTIONS</h4>
+<h4 id="vm_options-2">VM_OPTIONS</h4>
 <p>Additional VM arguments to provide to forked off VMs. Same as <code>-jvmArgs &lt;args&gt;</code></p>
 <h4 id="options-2">OPTIONS</h4>
 <p>Additional arguments to send to JMH.</p>
--- a/doc/testing.md	Wed Jan 30 12:16:50 2019 +0530
+++ b/doc/testing.md	Thu Jan 31 13:43:11 2019 +0100
@@ -40,8 +40,8 @@
 
 To be able to run microbenchmarks, `configure` needs to know where to find
 the JMH dependency. Use `--with-jmh=<path to JMH jars>` to point to a directory
-containing the core JMH and transitive dependencies. The recommended dependencies 
-can be retrieved by running `sh make/devkit/createJMHBundle.sh`, after which 
+containing the core JMH and transitive dependencies. The recommended dependencies
+can be retrieved by running `sh make/devkit/createJMHBundle.sh`, after which
 `--with-jmh=build/jmh/jars` should work.
 
 ## Test selection
@@ -202,6 +202,50 @@
 As far as possible, the names of the keywords have been standardized between
 test suites.
 
+### General keywords (TEST_OPTS)
+
+Some keywords are valid across different test suites. If you want to run
+tests from multiple test suites, or just don't want to care which test suite specific
+control variable to use, then you can use the general TEST_OPTS control variable.
+
+There are also some keywords that applies globally to the test runner system,
+not to any specific test suites. These are also available as TEST_OPTS keywords.
+
+#### JOBS
+
+Currently only applies to JTReg.
+
+#### TIMEOUT_FACTOR
+
+Currently only applies to JTReg.
+
+#### VM_OPTIONS
+
+Applies to JTReg, GTest and Micro.
+
+#### JAVA_OPTIONS
+
+Applies to JTReg, GTest and Micro.
+
+#### AOT_MODULES
+
+Applies to JTReg and GTest.
+
+#### JCOV
+
+This keywords applies globally to the test runner system. If set to `true`, it
+enables JCov coverage reporting for all tests run. To be useful, the JDK under
+test must be run with a JDK built with JCov instrumentation (`configure
+--with-jcov=<path to directory containing lib/jcov.jar>`, `make jcov-image`).
+
+The simplest way to run tests with JCov coverage report is to use the special
+target `jcov-test` instead of `test`, e.g. `make jcov-test TEST=jdk_lang`. This
+will make sure the JCov image is built, and that JCov reporting is enabled.
+
+The JCov report is stored in `build/$BUILD/test-results/jcov-output`.
+
+Please note that running with JCov reporting can be very memory intensive.
+
 ### JTReg keywords
 
 #### JOBS
@@ -211,7 +255,7 @@
 JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but
 never more than 12.
 
-#### TIMEOUT
+#### TIMEOUT_FACTOR
 The timeout factor (`-timeoutFactor`).
 
 Defaults to 4.
@@ -245,6 +289,24 @@
 
 Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).
 
+#### KEYWORDS
+
+JTReg kewords sent to JTReg using `-k`. Please be careful in making sure that
+spaces and special characters (like `!`) are properly quoted. To avoid some
+issues, the special value `%20` can be used instead of space.
+
+#### EXTRA_PROBLEM_LISTS
+
+Use additional problem lists file or files, in addition to the default
+ProblemList.txt located at the JTReg test roots.
+
+If multiple file names are specified, they should be separated by space (or, to
+help avoid quoting issues, the special value `%20`).
+
+The file names should be either absolute, or relative to the JTReg test root of
+the tests to be run.
+
+
 #### OPTIONS
 Additional options to the JTReg test framework.
 
@@ -256,6 +318,12 @@
 #### VM_OPTIONS
 Additional VM options to JTReg (`-vmoption`).
 
+#### AOT_MODULES
+
+Generate AOT modules before testing for the specified module, or set of
+modules. If multiple modules are specified, they should be separated by space
+(or, to help avoid quoting issues, the special value `%20`).
+
 ### Gtest keywords
 
 #### REPEAT
@@ -270,6 +338,12 @@
 
 Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
 
+#### AOT_MODULES
+
+Generate AOT modules before testing for the specified module, or set of
+modules. If multiple modules are specified, they should be separated by space
+(or, to help avoid quoting issues, the special value `%20`).
+
 ### Microbenchmark keywords
 
 #### FORK
--- a/make/Main.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/Main.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -479,10 +479,11 @@
 
 define DeclareRunTestRecipe
   test-$1:
-	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
+	    TEST="$1")
 
   exploded-test-$1:
-	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
 	    TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 endef
 
@@ -490,21 +491,11 @@
 $(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
 ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
 
-define DeclareRunJCovTestRecipe
-  jcov-test-$1:
-	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
-	    TEST="$1" TEST_OPTS_JCOV=true)
-endef
-
-# jcov-test only makes sense for some of the tests
-$(foreach t, $(JCOV_NAMED_TESTS), $(eval $(call DeclareRunJCovTestRecipe,$t)))
-ALL_JCOV_TEST_TARGETS := $(addprefix jcov-test-, $(JCOV_NAMED_TESTS))
-
 # We only support the "exploded-test-gtest" shortcut
 ALL_EXPLODED_TESTS := gtest
 ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
 
-ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS) $(ALL_JCOV_TEST_TARGETS)
+ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
 
 ################################################################################
 # Build tests and microbenchmarks
@@ -571,10 +562,11 @@
 # Run tests
 
 test:
-	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
+	    TEST="$(TEST)")
 
 exploded-test:
-	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk \
 	    TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 
 jcov-test:
@@ -891,7 +883,6 @@
   # Declare dependency for all generated test targets
   $(foreach t, $(filter-out test-make%, $(ALL_TEST_TARGETS)), $(eval $t: jdk-image test-image))
   $(foreach t, $(ALL_EXPLODED_TEST_TARGETS), $(eval $t: exploded-image test-image))
-  $(ALL_JCOV_TEST_TARGETS): jcov-image test-image
 
   create-buildjdk-copy: jdk.jlink-java java.base-gendata \
       $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
--- a/make/RunTests.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/RunTests.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -45,8 +45,8 @@
 endif
 
 $(eval $(call ParseKeywordVariable, TEST_OPTS, \
-    SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR AOT_MODULES JCOV, \
-    STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
+    SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV, \
+    STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
 ))
 
 # Helper function to propagate TEST_OPTS values.
@@ -72,7 +72,7 @@
             ) \
         ))
     export _NT_SYMBOL_PATH
-    $(info _NT_SYMBOL_PATH=$(_NT_SYMBOL_PATH))
+    $(call LogDebug, Rewriting _NT_SYMBOL_PATH to $(_NT_SYMBOL_PATH))
   endif
 endif
 
@@ -81,6 +81,9 @@
 $(eval $(call IncludeCustomExtension, RunTests.gmk))
 ################################################################################
 
+# This is the JDK that we will test
+JDK_UNDER_TEST := $(JDK_IMAGE_DIR)
+
 TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results
 TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support
 TEST_SUMMARY := $(TEST_RESULTS_DIR)/test-summary.txt
@@ -104,8 +107,26 @@
       -timeoutHandlerTimeout:0
 endif
 
-GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
-GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, $(GTEST_LAUNCHER_DIRS)))
+GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \
+    $(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher))
+GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \
+    $(GTEST_LAUNCHER_DIRS)))
+
+ifeq ($(TEST_OPTS_JCOV), true)
+  JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output
+  JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log
+  JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml
+  JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
+  JCOV_MEM_OPTIONS := -Xms64m -Xmx4g
+
+  # Replace our normal test JDK with the JCov image.
+  JDK_UNDER_TEST := $(JCOV_IMAGE_DIR)
+
+  JCOV_ENVIRONMENT := JAVA_TOOL_OPTIONS="$(JCOV_MEM_OPTIONS)" \
+      _JAVA_OPTIONS="$(JCOV_MEM_OPTIONS)"
+  JTREG_JCOV_OPTIONS := -e:JAVA_TOOL_OPTIONS='$(JCOV_MEM_OPTIONS)' \
+      -e:_JAVA_OPTIONS='$(JCOV_MEM_OPTIONS)'
+endif
 
 ################################################################################
 # Optionally create AOT libraries for specified modules before running tests.
@@ -130,7 +151,8 @@
   $1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt)
 
   # Create jaotc flags.
-  # VM flags which don't affect AOT code generation are filtered out: -Xcomp, -XX:+-TieredCompilation
+  # VM flags which don't affect AOT code generation are filtered out:
+  # -Xcomp, -XX:+-TieredCompilation
   $1_JAOTC_OPTS := \
       -J-Xmx4g --info \
       $$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \
@@ -142,17 +164,17 @@
     $1_JAOTC_OPTS += --compile-with-assertions
   endif
 
-  $$($1_AOT_LIB): $$(JDK_IMAGE_DIR)/release \
+  $$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \
       $$(call DependOnVariable, $1_JAOTC_OPTS) \
-      $$(call DependOnVariable, JDK_IMAGE_DIR)
+      $$(call DependOnVariable, JDK_UNDER_TEST)
 	$$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
 	$$(call MakeTargetDir)
 	$$(call ExecuteWithLog, $$@, \
-	    $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/jaotc \
+	    $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \
 	        $$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
 	)
 	$$(call ExecuteWithLog, $$@.check, \
-	    $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java \
+	    $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \
 	        $$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions \
 	        -XX:+PrintAOT -XX:+UseAOTStrictLoading \
 	        -XX:AOTLibrary=$$@ -version \
@@ -245,9 +267,10 @@
 $(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
 
 $(eval $(call ParseKeywordVariable, JTREG, \
-    SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM \
-        EXTRA_PROBLEM_LISTS KEYWORDS AOT_MODULES, \
-    STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \
+    SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \
+        MAX_MEM, \
+    STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
+        EXTRA_PROBLEM_LISTS AOT_MODULES, \
 ))
 
 ifneq ($(JTREG), )
@@ -262,8 +285,8 @@
 $(eval $(call SetTestOpt,AOT_MODULES,GTEST))
 
 $(eval $(call ParseKeywordVariable, GTEST, \
-    SINGLE_KEYWORDS := REPEAT AOT_MODULES, \
-    STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS, \
+    SINGLE_KEYWORDS := REPEAT, \
+    STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
 ))
 
 ifneq ($(GTEST), )
@@ -278,7 +301,8 @@
 
 $(eval $(call ParseKeywordVariable, MICRO, \
     SINGLE_KEYWORDS := ITER FORK TIME WARMUP_ITER WARMUP_TIME, \
-    STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS RESULTS_FORMAT TEST_JDK BENCHMARKS_JAR, \
+    STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS RESULTS_FORMAT TEST_JDK \
+        BENCHMARKS_JAR, \
 ))
 
 ifneq ($(MICRO), )
@@ -344,8 +368,8 @@
 
 # Helper function to determine if a test specification is a microbenchmark test
 #
-# It is a microbenchmark test if it is either "micro", or "micro:" followed by an optional
-# test filter string.
+# It is a microbenchmark test if it is either "micro", or "micro:" followed by
+# an optional test filter string.
 define ParseMicroTestSelection
   $(if $(filter micro%, $1), \
     $(if $(filter micro, $1), \
@@ -435,8 +459,8 @@
 # Helper function to determine if a test specification is a special test
 #
 # It is a special test if it is "special:" followed by a test name,
-# if it is "make:" or "make-" followed by a make test, or any of the special test names
-# as a single word.
+# if it is "make:" or "make-" followed by a make test, or any of the special
+# test names as a single word.
 define ParseSpecialTestSelection
   $(if $(filter special:%, $1), \
     $1 \
@@ -551,13 +575,13 @@
     ))
   endif
 
-  run-test-$1: $$($1_AOT_TARGETS)
+  run-test-$1: pre-run-test $$($1_AOT_TARGETS)
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
 	$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
 	$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \
 	    $$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
-	        -jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \
+	        -jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \
 	        --gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
 	        $$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
 	        $$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \
@@ -591,7 +615,11 @@
 	  $$(eval $1_TOTAL := 1) \
 	)
 
-  TARGETS += run-test-$1 parse-test-$1
+  $1: run-test-$1 parse-test-$1
+
+  TARGETS += $1 run-test-$1 parse-test-$1
+  TEST_TARGETS += parse-test-$1
+
 endef
 
 ################################################################################
@@ -625,7 +653,7 @@
   $1_TEST_NAME := $$(strip $$(patsubst micro:%, %, $$($1_TEST)))
 
   $$(eval $$(call SetMicroValue,$1,MICRO_BENCHMARKS_JAR,$$(TEST_IMAGE_DIR)/micro/benchmarks.jar))
-  $$(eval $$(call SetMicroValue,$1,MICRO_TEST_JDK,$$(JDK_IMAGE_DIR)))
+  $$(eval $$(call SetMicroValue,$1,MICRO_TEST_JDK,$$(JDK_UNDER_TEST)))
   $$(eval $$(call SetMicroValue,$1,MICRO_JAVA_OPTIONS))
 
   # Current tests needs to open java.io
@@ -633,7 +661,8 @@
 
   # Save output as JSON or CSV file
   ifneq ($$(MICRO_RESULTS_FORMAT), )
-    $1_MICRO_BASIC_OPTIONS += -rf $$(MICRO_RESULTS_FORMAT) -rff $$($1_TEST_RESULTS_DIR)/jmh-result.$(MICRO_RESULTS_FORMAT)
+    $1_MICRO_BASIC_OPTIONS += -rf $$(MICRO_RESULTS_FORMAT)
+    $1_MICRO_BASIC_OPTIONS += -rff $$($1_TEST_RESULTS_DIR)/jmh-result.$(MICRO_RESULTS_FORMAT)
   endif
 
   ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
@@ -656,7 +685,7 @@
     $1_MICRO_WARMUP_TIME := -w $$(MICRO_WARMUP_TIME)
   endif
 
-  run-test-$1:
+  run-test-$1: pre-run-test
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
 	$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -664,7 +693,7 @@
 	    $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) -jar $$($1_MICRO_BENCHMARKS_JAR) \
 	        $$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \
 	        $$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \
-	        $$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS)  \
+	        $$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \
 	        $$($1_TEST_NAME) \
 	        > >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \
 	    && $$(ECHO) $$$$? > $$($1_EXITCODE) \
@@ -696,7 +725,11 @@
 	  $$(eval $1_TOTAL := 1) \
 	)
 
-  TARGETS += run-test-$1 parse-test-$1
+  $1: run-test-$1 parse-test-$1
+
+  TARGETS += $1 run-test-$1 parse-test-$1
+  TEST_TARGETS += parse-test-$1
+
 endef
 
 ################################################################################
@@ -866,7 +899,7 @@
   clean-workdir-$1:
 	$$(RM) -r $$($1_TEST_SUPPORT_DIR)
 
-  run-test-$1: clean-workdir-$1 $$($1_AOT_TARGETS)
+  run-test-$1: pre-run-test clean-workdir-$1 $$($1_AOT_TARGETS)
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
 	$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -875,7 +908,7 @@
 	    $$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \
 	        -Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \
 	        $$($1_JTREG_BASIC_OPTIONS) \
-	        -testjdk:$$(JDK_IMAGE_DIR) \
+	        -testjdk:$$(JDK_UNDER_TEST) \
 	        -dir:$$(JTREG_TOPDIR) \
 	        -reportDir:$$($1_TEST_RESULTS_DIR) \
 	        -workDir:$$($1_TEST_SUPPORT_DIR) \
@@ -915,7 +948,11 @@
 	  $$(eval $1_TOTAL := 1) \
 	)
 
-  TARGETS += run-test-$1 parse-test-$1
+  $1: run-test-$1 parse-test-$1 clean-workdir-$1
+
+  TARGETS += $1 run-test-$1 parse-test-$1 clean-workdir-$1
+  TEST_TARGETS += parse-test-$1
+
 endef
 
 ################################################################################
@@ -953,7 +990,7 @@
     $$(error Invalid special test specification: $$($1_TEST_NAME))
   endif
 
-  run-test-$1: $(TEST_PREREQS)
+  run-test-$1: pre-run-test
 	$$(call LogWarn)
 	$$(call LogWarn, Running test '$$($1_TEST)')
 	$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -977,7 +1014,11 @@
 	$$(eval $1_ERROR := 0)
 	$$(eval $1_TOTAL := 0)
 
-  TARGETS += run-test-$1 parse-test-$1
+  $1: run-test-$1 parse-test-$1
+
+  TARGETS += $1 run-test-$1 parse-test-$1
+  TEST_TARGETS += parse-test-$1
+
 endef
 
 ################################################################################
@@ -1039,12 +1080,36 @@
 # The main target for RunTests.gmk
 ################################################################################
 
-# The SetupRun*Test functions have populated TARGETS.
+#
+# Provide hooks for adding functionality before and after all tests are run.
+#
 
+$(call LogInfo, RunTest setup starting)
+
+# This target depends on all actual test having been run (TEST_TARGETS has beeen
+# populated by the SetupRun*Test functions). If you need to provide a teardown
+# hook, you must let it depend on this target.
+run-all-tests: $(TEST_TARGETS)
+	$(call LogInfo, RunTest teardown starting)
+
+# This is an abstract target that will be run before any actual tests. Add your
+# target as a dependency to thisif you need "setup" type functionality executed
+# before all tests.
+pre-run-test:
+	$(call LogInfo, RunTest setup done)
+
+# This is an abstract target that will be run after all actual tests, but before
+# the test summary. If you need "teardown" type functionality, add your target
+# as a dependency on this, and let the teardown target depend on run-all-tests.
+post-run-test: run-all-tests
+	$(call LogInfo, RunTest teardown done)
+
+#
+# Create and print a table of the result of all tests run
+#
 TEST_FAILURE := false
 
-run-test: $(TARGETS)
-        # Create and print a table of the result of all tests run
+run-test-report: post-run-test
 	$(RM) $(TEST_SUMMARY).old 2> /dev/null
 	$(MV) $(TEST_SUMMARY) $(TEST_SUMMARY).old 2> /dev/null || true
 	$(RM) $(TEST_LAST_IDS).old 2> /dev/null
@@ -1088,27 +1153,17 @@
 	$(CAT) $(TEST_SUMMARY)
 	$(ECHO)
 
+# The main run-test target
+run-test: run-test-report
+
+TARGETS += run-all-tests pre-run-test post-run-test run-test-report run-test
+
 ################################################################################
 # Setup JCov
 ################################################################################
 
 ifeq ($(TEST_OPTS_JCOV), true)
 
-  JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output
-  JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log
-  JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml
-  JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report
-  JCOV_MEM_OPTIONS := -Xms64m -Xmx4g
-
-  ifneq ($(JCOV_IMAGE_DIR), )
-    JDK_IMAGE_DIR := $(JCOV_IMAGE_DIR)
-  endif
-
-  JCOV_ENVIRONMENT := JAVA_TOOL_OPTIONS="$(JCOV_MEM_OPTIONS)" \
-      _JAVA_OPTIONS="$(JCOV_MEM_OPTIONS)"
-  JTREG_JCOV_OPTIONS := -e:JAVA_TOOL_OPTIONS='$(JCOV_MEM_OPTIONS)' \
-      -e:_JAVA_OPTIONS='$(JCOV_MEM_OPTIONS)'
-
   jcov-do-start-grabber:
 	$(call MakeDir, $(JCOV_OUTPUT_DIR))
 	if $(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -status 1>/dev/null 2>&1 ; then \
@@ -1126,14 +1181,21 @@
 	$(call LogWarn, Stopping JCov Grabber...)
 	$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600
 
-  jcov-gen-report: run-test jcov-stop-grabber
+  jcov-gen-report: jcov-stop-grabber
 	$(call LogWarn, Generating JCov report ...)
 	$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \
 	    `$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \
 	    -o $(JCOV_REPORT) $(JCOV_RESULT_FILE)
 
-  $(TARGETS): jcov-start-grabber
-  all: jcov-gen-report
+  TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \
+      jcov-gen-report
+
+  # Hook this into the framework at appropriate places
+  pre-run-test: jcov-start-grabber
+
+  post-run-test: jcov-gen-report
+
+  jcov-gen-report: run-all-tests
 
 endif
 
@@ -1141,4 +1203,4 @@
 
 all: run-test
 
-.PHONY: default all run-test $(TARGETS)
+.PHONY: default all $(TARGETS)
--- a/make/RunTestsPrebuilt.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/RunTestsPrebuilt.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -95,12 +95,12 @@
 # $1: The output file name
 # $2..$N: The lines to output to the file
 define CreateNewSpec
-  $(if $(strip $(31)), \
+  $(if $(strip $(33)), \
     $(error Internal makefile error: \
       Too many arguments to macro, please update CreateNewSpec in RunTestsPrebuilt.gmk) \
   ) \
   $(shell $(RM) $1) \
-  $(foreach i, $(call sequence, 2, 30), \
+  $(foreach i, $(call sequence, 2, 32), \
     $(if $(strip $($i)), \
       $(call AppendFile, $(strip $($i)), $1) \
     ) \
@@ -275,6 +275,14 @@
   LD := ld
 endif
 
+ifneq ($(wildcard $(JDK_IMAGE_DIR)/template.xml), )
+  TEST_OPTS_JCOV := true
+  JCOV_IMAGE_DIR := $(JDK_IMAGE_DIR)
+else
+  TEST_OPTS_JCOV := false
+  JCOV_IMAGE_DIR :=
+endif
+
 ################################################################################
 # Generate the ephemeral spec file
 ################################################################################
@@ -295,6 +303,7 @@
     BOOT_JDK := $(BOOT_JDK), \
     JT_HOME := $(JT_HOME), \
     JDK_IMAGE_DIR := $(JDK_IMAGE_DIR), \
+    JCOV_IMAGE_DIR := $(JCOV_IMAGE_DIR), \
     TEST_IMAGE_DIR := $(TEST_IMAGE_DIR), \
     SYMBOLS_IMAGE_DIR := $(SYMBOLS_IMAGE_DIR), \
     MAKE := $(MAKE), \
@@ -315,6 +324,7 @@
     LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
     SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
     include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
+    TEST_OPTS_JCOV := $(TEST_OPTS_JCOV), \
     $(CUSTOM_NEW_SPEC_LINE), \
 )
 
--- a/make/autoconf/compare.sh.in	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/autoconf/compare.sh.in	Thu Jan 31 13:43:11 2019 +0100
@@ -76,12 +76,15 @@
 if [ "@COMPILE_TYPE@" != "cross" ]; then
   export JAVAP="@FIXPATH@ $OUTPUTDIR/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
   export JIMAGE="@FIXPATH@ $OUTPUTDIR/jdk/bin/jimage"
+  export JMOD="@FIXPATH@ $OUTPUTDIR/jdk/bin/jmod"
 elif [ "@CREATE_BUILDJDK@" = "true" ]; then
   export JAVAP="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
   export JIMAGE="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jimage"
+  export JMOD="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jmod"
 else
   export JAVAP="@FIXPATH@ @BUILD_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
   export JIMAGE="@FIXPATH@ @BUILD_JDK@/bin/jimage"
+  export JMOD="@FIXPATH@ @BUILD_JDK@/bin/jmod"
 fi
 
 if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
--- a/make/autoconf/lib-freetype.m4	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/autoconf/lib-freetype.m4	Thu Jan 31 13:43:11 2019 +0100
@@ -102,7 +102,7 @@
 
   if (test "x$with_freetype_include" = "x"  && test "x$with_freetype_lib" != "x") || \
      (test "x$with_freetype_include" != "x"  && test "x$with_freetype_lib" = "x"); then
-       AC_MSG_ERROR(['must specify both or neither of --with_freetype_include and --with_freetype_lib])
+       AC_MSG_ERROR(['must specify both or neither of --with-freetype-include and --with-freetype-lib])
   fi
 
   FREETYPE_TO_USE=bundled
@@ -115,7 +115,7 @@
     elif (test "x$with_freetype" = "xbundled"); then
       FREETYPE_TO_USE=bundled
       if (test "x$with_freetype_include" != "x"  || test "x$with_freetype_lib" != "x"); then
-        AC_MSG_ERROR(['bundled' cannot be specified with --with_freetype_include and --with_freetype_lib])
+        AC_MSG_ERROR(['bundled' cannot be specified with --with-freetype-include and --with-freetype-lib])
       fi
     else
        AC_MSG_ERROR(['valid values for --with-freetype are 'system' and 'bundled'])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/CopyFiles.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -0,0 +1,112 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software 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.
+#
+
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including CopyFiles.gmk)
+endif
+
+################################################################################
+#
+# Code for handling the SetupCopyFiles macro.
+#
+################################################################################
+
+define AddFileToCopy
+  # Helper macro for SetupCopyFiles
+  # 1 : Source file
+  # 2 : Dest file
+  # 3 : Variable to add targets to
+  # 4 : Macro to call for copy operation
+  # 5 : Action text to log
+  $2: $1
+	$$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
+	$$($$(strip $4))
+
+  $3 += $2
+  $3_SOURCES += $1
+endef
+
+# Returns the value of the first argument
+identity = \
+    $(strip $1)
+
+# Setup make rules for copying files, with an option to do more complex
+# processing instead of copying.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# The list of all source files is returned in $1_SOURCES.
+#
+# Remaining parameters are named arguments. These include:
+#   SRC     : Source root dir (defaults to dir of first file)
+#   DEST    : Dest root dir
+#   FILES   : List of files to copy with absolute paths, or path relative to SRC.
+#             Must be in SRC.
+#   FLATTEN : Set to flatten the directory structure in the DEST dir.
+#   MACRO   : Optionally override the default macro used for making the copy.
+#             Default is 'install-file'
+#   NAME_MACRO : Optionally supply a macro that rewrites the target file name
+#                based on the source file name
+#   LOG_ACTION : Optionally specify a different action text for log messages
+SetupCopyFiles = $(NamedParamsMacroTemplate)
+define SetupCopyFilesBody
+
+  ifeq ($$($1_MACRO), )
+    $1_MACRO := install-file
+  endif
+
+  # Default SRC to the dir of the first file.
+  ifeq ($$($1_SRC), )
+    $1_SRC := $$(dir $$(firstword $$($1_FILES)))
+  endif
+
+  ifeq ($$($1_NAME_MACRO), )
+    $1_NAME_MACRO := identity
+  endif
+
+  ifeq ($$($1_LOG_ACTION), )
+    $1_LOG_ACTION := Copying
+  endif
+
+  # Remove any trailing slash from SRC and DEST
+  $1_SRC := $$(patsubst %/,%,$$($1_SRC))
+  $1_DEST := $$(patsubst %/,%,$$($1_DEST))
+
+  # Need to wrap arguments in DoubleDollar because of the eval nested inside an
+  # eval macro body.
+  $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
+    $$(eval $$(call AddFileToCopy, \
+        $$(call DoubleDollar, $$($1_SRC)/$$f), \
+        $$(call DoubleDollar, \
+            $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
+        ), \
+        $1, \
+        $$($1_MACRO), \
+        $$($1_LOG_ACTION) \
+    )) \
+  )
+
+endef
--- a/make/common/FindTests.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/common/FindTests.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -68,7 +68,6 @@
 # Add Jtreg test groups to list of named tests (test groups, test list, etc)
 # ALL_NAMED_TESTS might have been set by a custom extension
 ALL_NAMED_TESTS += $(JTREG_TEST_GROUPS)
-JCOV_NAMED_TESTS += $(JTREG_TEST_GROUPS)
 
 # Add Gtest
 ALL_NAMED_TESTS += gtest
--- a/make/common/MakeBase.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/common/MakeBase.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -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
@@ -70,17 +70,17 @@
   CORRECT_FUNCTION_IN_RECIPE_EVALUATION := true
 endif
 
-##############################
-# Functions
-##############################
 
-### Debug functions
+# For convenience, MakeBase.gmk continues to include these separate files, at
+# least for now.
 
-# Prints the name and value of a variable
-PrintVar = \
-    $(info $(strip $1) >$($(strip $1))<)
+include $(TOPDIR)/make/common/Utils.gmk
+include $(TOPDIR)/make/common/MakeIO.gmk
+include $(TOPDIR)/make/common/CopyFiles.gmk
 
-### Functions for timers
+################################################################################
+# Functions for timers
+################################################################################
 
 # Store the build times in this directory.
 BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times
@@ -117,227 +117,6 @@
 endef
 
 ################################################################################
-# This macro translates $ into \$ to protect the $ from expansion in the shell.
-# To make this macro resilient against already escaped strings, first remove
-# any present escapes before escaping so that no double escapes are added.
-EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
-
-################################################################################
-# This macro works just like EscapeDollar above, but for #.
-EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
-
-################################################################################
-# This macro translates $ into $$ to protect the string from make itself.
-DoubleDollar = $(subst $$,$$$$,$(strip $1))
-
-################################################################################
-# ListPathsSafely can be used to print command parameters to a file. This is
-# typically done if the command line lenght risk being too long for the
-# OS/shell. In later make versions, the file function can be used for this
-# purpose. For earlier versions, a more complex implementation is provided.
-#
-# The function ListPathsSafely can be called either directly or, more commonly
-# from a recipe line. If called from a recipe, it will be executed in the
-# evaluation phase of that recipe, which means that it will write to the file
-# before any other line in the recipe has been run.
-ifeq ($(HAS_FILE_FUNCTION), true)
-  # Param 1 - Name of variable containing paths/arguments to output
-  # Param 2 - File to print to
-  # Param 3 - Set to true to append to file instead of overwriting
-  define ListPathsSafely
-    $$(call MakeDir, $$(dir $$(strip $2)))
-    $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
-        $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
-  endef
-
-else # HAS_FILE_FUNCTION = false
-
-  $(eval compress_paths = \
-      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
-  compress_paths += \
-      $(subst $(TOPDIR),X97, \
-      $(subst $(OUTPUTDIR),X98, \
-      $(subst X,X00, \
-      $(subst $(SPACE),\n,$(strip $1)))))
-  $(eval compress_paths += \
-      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
-
-  decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
-      -e 's|X99|\\n|g' \
-      -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
-      -e 's|X00|X|g'
-
-  ListPathsSafely_IfPrintf = \
-      $(if $(word $3,$($(strip $1))), \
-          $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
-              $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
-              | $(decompress_paths) >> $2))
-
-  # Param 1 - Name of variable containing paths/arguments to output
-  # Param 2 - File to print to
-  # Param 3 - Set to true to append to file instead of overwriting
-  define ListPathsSafely
-    ifneq (,$$(word 30001,$$($$(strip $1))))
-      $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
-    endif
-    $$(call MakeDir, $$(dir $2))
-    ifneq ($$(strip $3), true)
-      $$(shell $(RM) $$(strip $2))
-    endif
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
-
-    $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
-    $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
-  endef
-endif # HAS_FILE_FUNCTION
-
-################################################################################
 
 # A file containing a way to uniquely identify the source code revision that
 # the build was created from
@@ -409,21 +188,6 @@
 $(eval $(call SetupLogging))
 
 ################################################################################
-# Creates a sequence of increasing numbers (inclusive).
-# Param 1 - starting number
-# Param 2 - ending number
-sequence = \
-    $(wordlist $1, $2, $(strip \
-        $(eval SEQUENCE_COUNT :=) \
-        $(call _sequence-do,$(strip $2))))
-
-_sequence-do = \
-    $(if $(word $1, $(SEQUENCE_COUNT)),, \
-      $(eval SEQUENCE_COUNT += .) \
-      $(words $(SEQUENCE_COUNT)) \
-      $(call _sequence-do,$1))
-
-################################################################################
 
 MAX_PARAMS := 36
 PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
@@ -465,16 +229,6 @@
 endef
 
 ################################################################################
-# Replace question marks with space in string. This macro needs to be called on
-# files from CacheFind in case any of them contains space in their file name,
-# since CacheFind replaces space with ?.
-# Param 1 - String to replace in
-DecodeSpace = \
-    $(subst ?,$(SPACE),$(strip $1))
-EncodeSpace = \
-    $(subst $(SPACE),?,$(strip $1))
-
-################################################################################
 # Make directory without forking mkdir if not needed.
 #
 # If a directory with an encoded space is provided, the wildcard function
@@ -502,13 +256,6 @@
     $(call MakeDir, $(dir $(call EncodeSpace, $@)))
 
 ################################################################################
-# Assign a variable only if it is empty
-# Param 1 - Variable to assign
-# Param 2 - Value to assign
-SetIfEmpty = \
-    $(if $($(strip $1)),,$(eval $(strip $1) := $2))
-
-################################################################################
 # All install-file and related macros automatically call DecodeSpace when needed.
 
 ifeq ($(OPENJDK_TARGET_OS),solaris)
@@ -576,46 +323,6 @@
 endef
 
 ################################################################################
-# Take two paths and return the path of the last common directory.
-# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
-#     foo/bar/baz, /foo/bar -> <empty>
-#
-# The x prefix is used to preserve the presence of the initial slash
-#
-# $1 - Path to compare
-# $2 - Other path to compare
-FindCommonPathPrefix = \
-    $(patsubst x%,%,$(subst $(SPACE),/,$(strip \
-        $(call FindCommonPathPrefixHelper, \
-            $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
-    )))
-
-FindCommonPathPrefixHelper = \
-    $(if $(call equals, $(firstword $1), $(firstword $2)), \
-      $(firstword $1) \
-      $(call FindCommonPathPrefixHelper, \
-          $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
-      ) \
-    )
-
-# Convert a partial path into as many directory levels of ../, removing
-# leading and following /.
-# Ex: foo/bar/baz/ -> ../../..
-#     foo/bar -> ../..
-#     /foo -> ..
-DirToDotDot = \
-    $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
-
-# Computes the relative path from a directory to a file
-# $1 - File to compute the relative path to
-# $2 - Directory to compute the relative path from
-RelativePath = \
-    $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
-    $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)/%, %, $2))) \
-    $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
-    $($(strip $1)_dotdots)/$($(strip $1)_suffix)
-
-################################################################################
 # link-file-* works similarly to install-file but creates a symlink instead.
 # There are two versions, either creating a relative or an absolute link. Be
 # careful when using this on Windows since the symlink created is only valid in
@@ -633,60 +340,6 @@
 endef
 
 ################################################################################
-# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
-uniq = \
-    $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
-
-# Returns all whitespace-separated words in $2 where at least one of the
-# whitespace-separated words in $1 is a substring.
-containing = \
-    $(strip \
-        $(foreach v,$(strip $2),\
-          $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
-
-# Returns all whitespace-separated words in $2 where none of the
-# whitespace-separated words in $1 is a substring.
-not-containing = \
-    $(strip $(filter-out $(call containing,$1,$2),$2))
-
-# Return a list of all string elements that are duplicated in $1.
-dups = \
-    $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
-        $(words $(filter $v, $1))), $v)))
-
-# String equals
-equals = \
-    $(if $(strip $1)$(strip $2),$(strip \
-      $(and $(findstring $(strip $1),$(strip $2)),\
-        $(findstring $(strip $2),$(strip $1)))), \
-      true \
-    )
-
-# Remove a whole list of prefixes
-# $1 - List of prefixes
-# $2 - List of elements to process
-remove-prefixes = \
-    $(strip $(if $1,$(patsubst $(firstword $1)%,%,\
-      $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
-
-# Convert the string given to upper case, without any $(shell)
-# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
-uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
-    p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
-
-uppercase_internal = \
-  $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
-      $(wordlist 2, $(words $1), $1), $2)), $2)
-
-# Convert a string to upper case. Works only on a-z.
-# $1 - The string to convert
-uppercase = \
-  $(strip \
-    $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
-    $(uppercase_result) \
-  )
-
-################################################################################
 
 ifneq ($(DISABLE_CACHE_FIND), true)
   # In Cygwin, finds are very costly, both because of expensive forks and because
@@ -758,144 +411,6 @@
 endif
 
 ################################################################################
-
-define AddFileToCopy
-  # Helper macro for SetupCopyFiles
-  # 1 : Source file
-  # 2 : Dest file
-  # 3 : Variable to add targets to
-  # 4 : Macro to call for copy operation
-  # 5 : Action text to log
-  $2: $1
-	$$(call LogInfo, $(strip $5) $$(patsubst $(OUTPUTDIR)/%,%,$$(call DecodeSpace, $$@)))
-	$$($$(strip $4))
-
-  $3 += $2
-  $3_SOURCES += $1
-endef
-
-# Returns the value of the first argument
-identity = \
-    $(strip $1)
-
-# Setup make rules for copying files, with an option to do more complex
-# processing instead of copying.
-#
-# Parameter 1 is the name of the rule. This name is used as variable prefix,
-# and the targets generated are listed in a variable by that name.
-#
-# The list of all source files is returned in $1_SOURCES.
-#
-# Remaining parameters are named arguments. These include:
-#   SRC     : Source root dir (defaults to dir of first file)
-#   DEST    : Dest root dir
-#   FILES   : List of files to copy with absolute paths, or path relative to SRC.
-#             Must be in SRC.
-#   FLATTEN : Set to flatten the directory structure in the DEST dir.
-#   MACRO   : Optionally override the default macro used for making the copy.
-#             Default is 'install-file'
-#   NAME_MACRO : Optionally supply a macro that rewrites the target file name
-#                based on the source file name
-#   LOG_ACTION : Optionally specify a different action text for log messages
-SetupCopyFiles = $(NamedParamsMacroTemplate)
-define SetupCopyFilesBody
-
-  ifeq ($$($1_MACRO), )
-    $1_MACRO := install-file
-  endif
-
-  # Default SRC to the dir of the first file.
-  ifeq ($$($1_SRC), )
-    $1_SRC := $$(dir $$(firstword $$($1_FILES)))
-  endif
-
-  ifeq ($$($1_NAME_MACRO), )
-    $1_NAME_MACRO := identity
-  endif
-
-  ifeq ($$($1_LOG_ACTION), )
-    $1_LOG_ACTION := Copying
-  endif
-
-  # Remove any trailing slash from SRC and DEST
-  $1_SRC := $$(patsubst %/,%,$$($1_SRC))
-  $1_DEST := $$(patsubst %/,%,$$($1_DEST))
-
-  # Need to wrap arguments in DoubleDollar because of the eval nested inside an
-  # eval macro body.
-  $$(foreach f, $$(patsubst $$($1_SRC)/%,%,$$($1_FILES)), \
-    $$(eval $$(call AddFileToCopy, \
-        $$(call DoubleDollar, $$($1_SRC)/$$f), \
-        $$(call DoubleDollar, \
-            $$($1_DEST)/$$(call $$(strip $$($1_NAME_MACRO)),$$(if $$($1_FLATTEN),$$(notdir $$f),$$f)) \
-        ), \
-        $1, \
-        $$($1_MACRO), \
-        $$($1_LOG_ACTION) \
-    )) \
-  )
-
-endef
-
-################################################################################
-# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
-# These will be converted into a series of variables like FOO_KEYWORD1=val1,
-# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
-#
-# Parameter 1 is the name of the rule, and is also the name of the variable.
-#
-# Remaining parameters are named arguments. These include:
-#   SINGLE_KEYWORDS   A list of valid keywords with single string values
-#   STRING_KEYWORDS   A list of valid keywords, processed as string. This means
-#       that '%20' will be replaced by ' ' to allow for multi-word strings.
-#
-ParseKeywordVariable = $(NamedParamsMacroTemplate)
-define ParseKeywordVariableBody
-  ifneq ($$($1), )
-    # To preserve spaces, substitute them with a hopefully unique pattern
-    # before splitting and then re-substitute spaces back.
-    $1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
-    $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
-      $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
-      $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
-      $$(eval $1_NO_MATCH := true) \
-      $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
-        $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
-        $$(if $$(filter $$(keyword)=%, $$(part)), \
-          $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
-          $$(eval $1_NO_MATCH := ) \
-        ) \
-      ) \
-      $$(foreach keyword, $$($1_STRING_KEYWORDS), \
-        $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
-        $$(if $$(filter $$(keyword)=%, $$(part)), \
-          $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
-          $$(eval $1_NO_MATCH := ) \
-        ) \
-      ) \
-      $$(if $$($1_NO_MATCH), \
-        $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
-          $$(info Keyword $$(part) for $1 needs to be assigned a value.) \
-        , \
-          $$(info $$(part) is not a valid keyword for $1.) \
-          $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
-        ) \
-        $$(error Cannot continue) \
-      ) \
-    )
-  endif
-endef
-
-################################################################################
-# ShellQuote
-#
-# Quotes a string with single quotes and replaces single quotes with '\'' so
-# that the contents survives being given to the shell.
-
-ShellQuote = \
-    $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
-
-################################################################################
 # FixPath
 #
 # On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
@@ -912,35 +427,6 @@
 endif
 
 ################################################################################
-# Write to and read from file
-
-# Param 1 - File to read
-ReadFile = \
-    $(shell $(CAT) $1)
-
-# Param 1 - Text to write
-# Param 2 - File to write to
-ifeq ($(HAS_FILE_FUNCTION), true)
-  WriteFile = \
-      $(file >$2,$(strip $1))
-else
-  # Use printf to get consistent behavior on all platforms.
-  WriteFile = \
-      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
-endif
-
-# Param 1 - Text to write
-# Param 2 - File to write to
-ifeq ($(HAS_FILE_FUNCTION), true)
-  AppendFile = \
-      $(file >>$2,$(strip $1))
-else
-  # Use printf to get consistent behavior on all platforms.
-  AppendFile = \
-      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
-endif
-
-################################################################################
 # DependOnVariable
 #
 # This macro takes a variable name and puts the value in a file only if the
@@ -1026,75 +512,6 @@
       exit $(DOLLAR)exitcode ) )
 
 ################################################################################
-# Find lib dir for module
-# Param 1 - module name
-FindLibDirForModule = \
-    $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
-
-################################################################################
-# Find executable dir for module
-# Param 1 - module name
-FindExecutableDirForModule = \
-    $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
-
-################################################################################
-# Return a string suitable for use after a -classpath or --module-path option. It
-# will be correct and safe to use on all platforms. Arguments are given as space
-# separate classpath entries. Safe for multiple nested calls.
-# param 1 : A space separated list of classpath entries
-# The surrounding strip is needed to keep additional whitespace out
-PathList = \
-  "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
-
-################################################################################
-# Check if a specified hotspot variant is being built, or at least one of a
-# list of variants. Will return 'true' or 'false'.
-# $1 - the variant to test for
-check-jvm-variant = \
-  $(strip \
-    $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
-      $(error Internal error: Invalid variant tested: $1)) \
-    $(if $(filter $1, $(JVM_VARIANTS)), true, false))
-
-################################################################################
-# Converts a space separated list to a comma separated list.
-#
-# Replacing double-comma with a single comma is to workaround the issue with
-# some version of make on windows that doesn't substitute spaces with one comma
-# properly.
-CommaList = \
-  $(strip \
-      $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
-  )
-
-################################################################################
-# Converts a space separated list to a colon separated list.
-#
-# Replacing double-colon with a single colon is to workaround the issue with
-# some version of make on windows that doesn't substitute spaces with one colon
-# properly.
-ColonList = \
-  $(strip \
-      $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
-  )
-
-################################################################################
-# Given a list of files, filters out locale specific files for translations
-# that should be excluded from this build.
-# $1 - The list of files to filter
-# $2 - The suffix of the files that should be considered (.java or .properties)
-FilterExcludedTranslations = \
-  $(strip $(if $(EXCLUDE_TRANSLATIONS), \
-    $(filter-out \
-        $(foreach suffix, $2, \
-          $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
-        ), \
-        $1 \
-    ), \
-    $1 \
-  ))
-
-################################################################################
 
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, common/MakeBase.gmk))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/MakeIO.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -0,0 +1,272 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software 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.
+#
+
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including MakeIO.gmk)
+endif
+
+################################################################################
+#
+# Functions for dealing with reading and writing from makefiles. Prior to GNU
+# Make 4.0, this was tricky business.
+#
+################################################################################
+
+
+################################################################################
+# ListPathsSafely can be used to print command parameters to a file. This is
+# typically done if the command line lenght risk being too long for the
+# OS/shell. In later make versions, the file function can be used for this
+# purpose. For earlier versions, a more complex implementation is provided.
+#
+# The function ListPathsSafely can be called either directly or, more commonly
+# from a recipe line. If called from a recipe, it will be executed in the
+# evaluation phase of that recipe, which means that it will write to the file
+# before any other line in the recipe has been run.
+ifeq ($(HAS_FILE_FUNCTION), true)
+  # Param 1 - Name of variable containing paths/arguments to output
+  # Param 2 - File to print to
+  # Param 3 - Set to true to append to file instead of overwriting
+  define ListPathsSafely
+    $$(call MakeDir, $$(dir $$(strip $2)))
+    $$(file $$(if $$(filter true, $$(strip $3)),>>,>) \
+        $$(strip $2),$$(subst $$(SPACE),$$(NEWLINE),$$(strip $$($$(strip $1)))))
+  endef
+
+else # HAS_FILE_FUNCTION = false
+
+  $(eval compress_paths = \
+      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-pre-compress.incl)))
+  compress_paths += \
+      $(subst $(TOPDIR),X97, \
+      $(subst $(OUTPUTDIR),X98, \
+      $(subst X,X00, \
+      $(subst $(SPACE),\n,$(strip $1)))))
+  $(eval compress_paths += \
+      $(strip $(shell $(CAT) $(TOPDIR)/make/common/support/ListPathsSafely-post-compress.incl)))
+
+  decompress_paths=$(SED) -f $(TOPDIR)/make/common/support/ListPathsSafely-uncompress.sed \
+      -e 's|X99|\\n|g' \
+      -e 's|X98|$(OUTPUTDIR)|g' -e 's|X97|$(TOPDIR)|g' \
+      -e 's|X00|X|g'
+
+  ListPathsSafely_IfPrintf = \
+      $(if $(word $3,$($(strip $1))), \
+          $(shell $(PRINTF) -- "$(strip $(call EscapeDollar, \
+              $(call compress_paths, $(wordlist $3,$4,$($(strip $1))))))\n" \
+              | $(decompress_paths) >> $2))
+
+  # Param 1 - Name of variable containing paths/arguments to output
+  # Param 2 - File to print to
+  # Param 3 - Set to true to append to file instead of overwriting
+  define ListPathsSafely
+    ifneq (,$$(word 30001,$$($$(strip $1))))
+      $$(error Cannot list safely more than 30000 paths. $1 has $$(words $$($$(strip $1))) paths!)
+    endif
+    $$(call MakeDir, $$(dir $2))
+    ifneq ($$(strip $3), true)
+      $$(shell $(RM) $$(strip $2))
+    endif
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1,250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,251,500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,501,750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,751,1000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1001,1250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1251,1500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1501,1750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,1751,2000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2001,2250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2251,2500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2501,2750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,2751,3000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3001,3250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3251,3500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3501,3750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,3751,4000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4001,4250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4251,4500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4501,4750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,4751,5000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5001,5250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5251,5500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5501,5750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,5751,6000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6001,6250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6251,6500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6501,6750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,6751,7000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7001,7250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7251,7500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7501,7750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,7751,8000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8001,8250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8251,8500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8501,8750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,8751,9000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9001,9250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9251,9500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9501,9750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,9751,10000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,10001,10250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,10251,10500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,10501,10750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,10751,11000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,11001,11250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,11251,11500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,11501,11750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,11751,12000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,12001,12250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,12251,12500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,12501,12750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,12751,13000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,13001,13250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,13251,13500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,13501,13750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,13751,14000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,14001,14250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,14251,14500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,14501,14750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,14751,15000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,15001,15250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,15251,15500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,15501,15750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,15751,16000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,16001,16250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,16251,16500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,16501,16750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,16751,17000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,17001,17250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,17251,17500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,17501,17750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,17751,18000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,18001,18250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,18251,18500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,18501,18750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,18751,19000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,19001,19250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,19251,19500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,19501,19750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,19751,20000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,20001,20250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,20251,20500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,20501,20750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,20751,21000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,21001,21250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,21251,21500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,21501,21750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,21751,22000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,22001,22250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,22251,22500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,22501,22750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,22751,23000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,23001,23250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,23251,23500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,23501,23750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,23751,24000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,24001,24250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,24251,24500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,24501,24750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,24751,25000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,25001,25250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,25251,25500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,25501,25750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,25751,26000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,26001,26250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,26251,26500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,26501,26750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,26751,27000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,27001,27250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,27251,27500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,27501,27750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,27751,28000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,28001,28250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,28251,28500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,28501,28750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,28751,29000)
+
+    $$(call ListPathsSafely_IfPrintf,$1,$2,29001,29250)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,29251,29500)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,29501,29750)
+    $$(call ListPathsSafely_IfPrintf,$1,$2,29751,30000)
+  endef
+endif # HAS_FILE_FUNCTION
+
+################################################################################
+# Write to and read from file
+
+# Param 1 - File to read
+ReadFile = \
+    $(shell $(CAT) $1)
+
+# Param 1 - Text to write
+# Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+  WriteFile = \
+      $(file >$2,$(strip $1))
+else
+  # Use printf to get consistent behavior on all platforms.
+  WriteFile = \
+      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) > $2)
+endif
+
+# Param 1 - Text to write
+# Param 2 - File to write to
+ifeq ($(HAS_FILE_FUNCTION), true)
+  AppendFile = \
+      $(file >>$2,$(strip $1))
+else
+  # Use printf to get consistent behavior on all platforms.
+  AppendFile = \
+      $(shell $(PRINTF) "%s" $(call ShellQuote, $1) >> $2)
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Utils.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -0,0 +1,307 @@
+#
+# 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
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software 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.
+#
+
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including Utils.gmk)
+endif
+
+################################################################################
+#
+# Common utility functions
+#
+################################################################################
+
+### Debug functions
+
+# Prints the name and value of a variable
+PrintVar = \
+    $(info $(strip $1) >$($(strip $1))<)
+
+################################################################################
+# This macro translates $ into \$ to protect the $ from expansion in the shell.
+# To make this macro resilient against already escaped strings, first remove
+# any present escapes before escaping so that no double escapes are added.
+EscapeDollar = $(subst $$,\$$,$(subst \$$,$$,$(strip $1)))
+
+################################################################################
+# This macro works just like EscapeDollar above, but for #.
+EscapeHash = $(subst \#,\\\#,$(subst \\\#,\#,$(strip $1)))
+
+################################################################################
+# This macro translates $ into $$ to protect the string from make itself.
+DoubleDollar = $(subst $$,$$$$,$(strip $1))
+
+################################################################################
+# Creates a sequence of increasing numbers (inclusive).
+# Param 1 - starting number
+# Param 2 - ending number
+sequence = \
+    $(wordlist $1, $2, $(strip \
+        $(eval SEQUENCE_COUNT :=) \
+        $(call _sequence-do,$(strip $2))))
+
+_sequence-do = \
+    $(if $(word $1, $(SEQUENCE_COUNT)),, \
+      $(eval SEQUENCE_COUNT += .) \
+      $(words $(SEQUENCE_COUNT)) \
+      $(call _sequence-do,$1))
+
+################################################################################
+# Replace question marks with space in string. This macro needs to be called on
+# files from CacheFind in case any of them contains space in their file name,
+# since CacheFind replaces space with ?.
+# Param 1 - String to replace in
+DecodeSpace = \
+    $(subst ?,$(SPACE),$(strip $1))
+
+EncodeSpace = \
+    $(subst $(SPACE),?,$(strip $1))
+
+################################################################################
+# Assign a variable only if it is empty
+# Param 1 - Variable to assign
+# Param 2 - Value to assign
+SetIfEmpty = \
+    $(if $($(strip $1)),,$(eval $(strip $1) := $2))
+
+################################################################################
+# Take two paths and return the path of the last common directory.
+# Ex: /foo/bar/baz, /foo/bar/banan -> /foo/bar
+#     foo/bar/baz, /foo/bar -> <empty>
+#
+# The x prefix is used to preserve the presence of the initial slash
+#
+# $1 - Path to compare
+# $2 - Other path to compare
+FindCommonPathPrefix = \
+    $(patsubst x%,%,$(subst $(SPACE),/,$(strip \
+        $(call FindCommonPathPrefixHelper, \
+            $(subst /,$(SPACE),x$(strip $1)), $(subst /,$(SPACE),x$(strip $2))) \
+    )))
+
+FindCommonPathPrefixHelper = \
+    $(if $(call equals, $(firstword $1), $(firstword $2)), \
+      $(firstword $1) \
+      $(call FindCommonPathPrefixHelper, \
+          $(wordlist 2, $(words $1), $1), $(wordlist 2, $(words $2), $2) \
+      ) \
+    )
+
+# Convert a partial path into as many directory levels of ../, removing
+# leading and following /.
+# Ex: foo/bar/baz/ -> ../../..
+#     foo/bar -> ../..
+#     /foo -> ..
+DirToDotDot = \
+    $(subst $(SPACE),/,$(foreach d, $(subst /,$(SPACE),$1),..))
+
+# Computes the relative path from a directory to a file
+# $1 - File to compute the relative path to
+# $2 - Directory to compute the relative path from
+RelativePath = \
+    $(eval $1_prefix := $(call FindCommonPathPrefix, $1, $2)) \
+    $(eval $1_dotdots := $(call DirToDotDot, $(patsubst $($(strip $1)_prefix)/%, %, $2))) \
+    $(eval $1_suffix := $(patsubst $($(strip $1)_prefix)/%, %, $1)) \
+    $($(strip $1)_dotdots)/$($(strip $1)_suffix)
+
+################################################################################
+# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
+uniq = \
+    $(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
+
+# Returns all whitespace-separated words in $2 where at least one of the
+# whitespace-separated words in $1 is a substring.
+containing = \
+    $(strip \
+        $(foreach v,$(strip $2),\
+          $(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
+
+# Returns all whitespace-separated words in $2 where none of the
+# whitespace-separated words in $1 is a substring.
+not-containing = \
+    $(strip $(filter-out $(call containing,$1,$2),$2))
+
+# Return a list of all string elements that are duplicated in $1.
+dups = \
+    $(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
+        $(words $(filter $v, $1))), $v)))
+
+# String equals
+equals = \
+    $(if $(strip $1)$(strip $2),$(strip \
+      $(and $(findstring $(strip $1),$(strip $2)),\
+        $(findstring $(strip $2),$(strip $1)))), \
+      true \
+    )
+
+# Remove a whole list of prefixes
+# $1 - List of prefixes
+# $2 - List of elements to process
+remove-prefixes = \
+    $(strip $(if $1,$(patsubst $(firstword $1)%,%,\
+      $(call remove-prefixes,$(filter-out $(firstword $1),$1),$2)),$2))
+
+# Convert the string given to upper case, without any $(shell)
+# Inspired by http://lists.gnu.org/archive/html/help-make/2013-09/msg00009.html
+uppercase_table := a,A b,B c,C d,D e,E f,F g,G h,H i,I j,J k,K l,L m,M n,N o,O \
+    p,P q,Q r,R s,S t,T u,U v,V w,W x,X y,Y z,Z
+
+uppercase_internal = \
+  $(if $(strip $1), $$(subst $(firstword $1), $(call uppercase_internal, \
+      $(wordlist 2, $(words $1), $1), $2)), $2)
+
+# Convert a string to upper case. Works only on a-z.
+# $1 - The string to convert
+uppercase = \
+  $(strip \
+    $(eval uppercase_result := $(call uppercase_internal, $(uppercase_table), $1)) \
+    $(uppercase_result) \
+  )
+
+################################################################################
+# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
+# These will be converted into a series of variables like FOO_KEYWORD1=val1,
+# FOO_KEYWORD2=val2, etc. Unknown keywords will cause an error.
+#
+# Parameter 1 is the name of the rule, and is also the name of the variable.
+#
+# Remaining parameters are named arguments. These include:
+#   SINGLE_KEYWORDS   A list of valid keywords with single string values
+#   STRING_KEYWORDS   A list of valid keywords, processed as string. This means
+#       that '%20' will be replaced by ' ' to allow for multi-word strings.
+#
+ParseKeywordVariable = $(NamedParamsMacroTemplate)
+define ParseKeywordVariableBody
+  ifneq ($$($1), )
+    # To preserve spaces, substitute them with a hopefully unique pattern
+    # before splitting and then re-substitute spaces back.
+    $1_MANGLED := $$(subst $$(SPACE),||||,$$($1))
+    $$(foreach mangled_part, $$(subst ;, , $$($1_MANGLED)), \
+      $$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
+      $$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
+      $$(eval $1_NO_MATCH := true) \
+      $$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
+        $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
+        $$(if $$(filter $$(keyword)=%, $$(part)), \
+          $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part)))) \
+          $$(eval $1_NO_MATCH := ) \
+        ) \
+      ) \
+      $$(foreach keyword, $$($1_STRING_KEYWORDS), \
+        $$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
+        $$(if $$(filter $$(keyword)=%, $$(part)), \
+          $$(eval $(strip $1)_$$$$(keyword_eval) := $$$$(strip $$$$(subst %20, , $$$$(patsubst $$$$(keyword_eval)=%, %, $$$$(part))))) \
+          $$(eval $1_NO_MATCH := ) \
+        ) \
+      ) \
+      $$(if $$($1_NO_MATCH), \
+        $$(if $$(filter $$(part), $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS)), \
+          $$(info Keyword $$(part) for $1 needs to be assigned a value.) \
+        , \
+          $$(info $$(part) is not a valid keyword for $1.) \
+          $$(info Valid keywords: $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
+        ) \
+        $$(error Cannot continue) \
+      ) \
+    )
+  endif
+endef
+
+################################################################################
+# ShellQuote
+#
+# Quotes a string with single quotes and replaces single quotes with '\'' so
+# that the contents survives being given to the shell.
+ShellQuote = \
+    $(SQUOTE)$(subst $(SQUOTE),$(SQUOTE)\$(SQUOTE)$(SQUOTE),$(strip $1))$(SQUOTE)
+
+################################################################################
+# Find lib dir for module
+# Param 1 - module name
+FindLibDirForModule = \
+    $(SUPPORT_OUTPUTDIR)/modules_libs/$(strip $1)
+
+################################################################################
+# Find executable dir for module
+# Param 1 - module name
+FindExecutableDirForModule = \
+    $(SUPPORT_OUTPUTDIR)/modules_cmds/$(strip $1)
+
+################################################################################
+# Return a string suitable for use after a -classpath or --module-path option. It
+# will be correct and safe to use on all platforms. Arguments are given as space
+# separate classpath entries. Safe for multiple nested calls.
+# param 1 : A space separated list of classpath entries
+# The surrounding strip is needed to keep additional whitespace out
+PathList = \
+  "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
+
+################################################################################
+# Check if a specified hotspot variant is being built, or at least one of a
+# list of variants. Will return 'true' or 'false'.
+# $1 - the variant to test for
+check-jvm-variant = \
+  $(strip \
+    $(if $(filter-out $(VALID_JVM_VARIANTS), $1), \
+      $(error Internal error: Invalid variant tested: $1)) \
+    $(if $(filter $1, $(JVM_VARIANTS)), true, false))
+
+################################################################################
+# Converts a space separated list to a comma separated list.
+#
+# Replacing double-comma with a single comma is to workaround the issue with
+# some version of make on windows that doesn't substitute spaces with one comma
+# properly.
+CommaList = \
+  $(strip \
+      $(subst $(COMMA)$(COMMA),$(COMMA),$(subst $(SPACE),$(COMMA),$(strip $1))) \
+  )
+
+################################################################################
+# Converts a space separated list to a colon separated list.
+#
+# Replacing double-colon with a single colon is to workaround the issue with
+# some version of make on windows that doesn't substitute spaces with one colon
+# properly.
+ColonList = \
+  $(strip \
+      $(subst ::,:,$(subst $(SPACE),:,$(strip $1))) \
+  )
+
+################################################################################
+# Given a list of files, filters out locale specific files for translations
+# that should be excluded from this build.
+# $1 - The list of files to filter
+# $2 - The suffix of the files that should be considered (.java or .properties)
+FilterExcludedTranslations = \
+  $(strip $(if $(EXCLUDE_TRANSLATIONS), \
+    $(filter-out \
+        $(foreach suffix, $2, \
+          $(addprefix %_, $(addsuffix $(suffix), $(EXCLUDE_TRANSLATIONS))) \
+        ), \
+        $1 \
+    ), \
+    $1 \
+  ))
--- a/make/conf/jib-profiles.js	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/conf/jib-profiles.js	Thu Jan 31 13:43:11 2019 +0100
@@ -760,20 +760,27 @@
     if (testedProfile == null) {
         testedProfile = input.build_os + "-" + input.build_cpu;
     }
+    var testedProfileJDK = testedProfile + ".jdk";
+    var testedProfileTest = ""
+    if (testedProfile.endsWith("-jcov")) {
+        testedProfileTest = testedProfile.substring(0, testedProfile.length - "-jcov".length) + ".test";
+    } else {
+        testedProfileTest = testedProfile + ".test";
+    }
     var testOnlyProfilesPrebuilt = {
         "run-test-prebuilt": {
             target_os: input.build_os,
             target_cpu: input.build_cpu,
             dependencies: [
-                "jtreg", "gnumake", "boot_jdk", "devkit", "jib", testedProfile + ".jdk",
-                testedProfile + ".test"
+                "jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJDK,
+                testedProfileTest
             ],
             src: "src.conf",
             make_args: [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ],
             environment: {
                 "BOOT_JDK": common.boot_jdk_home,
-                "JDK_IMAGE_DIR": input.get(testedProfile + ".jdk", "home_path"),
-                "TEST_IMAGE_DIR": input.get(testedProfile + ".test", "home_path")
+                "JDK_IMAGE_DIR": input.get(testedProfileJDK, "home_path"),
+                "TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
             },
             labels: "test"
         }
@@ -854,13 +861,13 @@
 var getJibProfilesDependencies = function (input, common) {
 
     var devkit_platform_revisions = {
-        linux_x64: "gcc7.3.0-OEL6.4+1.1",
+        linux_x64: "gcc7.3.0-OEL6.4+1.2",
         macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
         solaris_x64: "SS12u4-Solaris11u1+1.0",
         solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
         windows_x64: "VS2017-15.5.5+1.0",
-        linux_aarch64: "gcc7.3.0-Fedora27+1.1",
-        linux_arm: "gcc7.3.0-Fedora27+1.1"
+        linux_aarch64: "gcc7.3.0-Fedora27+1.2",
+        linux_arm: "gcc7.3.0-Fedora27+1.2"
     };
 
     var devkit_platform = (input.target_cpu == "x86"
@@ -939,6 +946,7 @@
             version: "3.0",
             build_number: "b07",
             file: "bundles/jcov-3_0.zip",
+            environment_name: "JCOV_HOME",
         },
 
         gnumake: {
--- a/make/data/charsetmapping/charsets	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/data/charsetmapping/charsets	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 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
@@ -1561,6 +1561,15 @@
     alias   ibm-euctw
     alias   964
 
+charset x-IBM29626C IBM29626C
+    package sun.nio.cs.ext
+    type    template
+    alias   cp29626c            # JDK historical
+    alias   ibm29626c
+    alias   ibm-29626c
+    alias   29626c
+    alias   ibm-eucjp
+
 charset x-IBM33722 IBM33722
     package sun.nio.cs.ext
     type    source
--- a/make/data/charsetmapping/stdcs-aix	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/data/charsetmapping/stdcs-aix	Thu Jan 31 13:43:11 2019 +0100
@@ -22,8 +22,12 @@
 IBM1124
 IBM1129
 IBM1383
+IBM29626C
 ISO_8859_6
 ISO_8859_8
+JIS_X_0201
+JIS_X_0208
+JIS_X_0212
 MS1252
 TIS_620
 SimpleEUCEncoder
--- a/make/devkit/Tools.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/devkit/Tools.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -103,7 +103,7 @@
 GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
 BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.xz
 CCACHE := https://samba.org/ftp/ccache/$(ccache_ver).tar.xz
-MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
+MPFR := https://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
 GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
 MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
 GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
@@ -355,6 +355,7 @@
 $(BUILDDIR)/$(binutils_ver)/Makefile : CONFIG += --enable-64-bit-bfd --libdir=$(PREFIX)/$(word 1,$(LIBDIRS))
 
 # Makefile creation. Simply run configure in build dir.
+# Setting CFLAGS to -O2 generates a much faster ld.
 $(bfdmakes) \
 $(BUILDDIR)/$(binutils_ver)/Makefile \
     : $(BINUTILS_CFG)
@@ -362,7 +363,7 @@
 	@mkdir -p $(@D)
 	( \
 	  cd $(@D) ; \
-	  $(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" \
+	  $(PATHPRE) $(ENVS) CFLAGS="-O2 $(CFLAGS)" \
 	      $(BINUTILS_CFG) \
 	      $(CONFIG) \
 	      --with-sysroot=$(SYSROOT) \
@@ -370,6 +371,7 @@
 	      --program-prefix=$(TARGET)- \
 	      --enable-multilib \
 	      --enable-gold \
+	      --enable-threads \
 	      --enable-plugins \
 	) > $(@D)/log.config 2>&1
 	@echo 'done'
--- a/make/hotspot/gensrc/GensrcAdlc.gmk	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk	Thu Jan 31 13:43:11 2019 +0100
@@ -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
@@ -142,6 +142,12 @@
       )))
   endif
 
+  ifeq ($(call check-jvm-feature, zgc), true)
+    AD_SRC_FILES += $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
+        $d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/gc/z/z_$(HOTSPOT_TARGET_CPU).ad \
+      )))
+  endif
+
   SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
 
   INSERT_FILENAME_AWK_SCRIPT := \
--- a/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CalendarType.java	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, 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
@@ -40,7 +40,7 @@
         {0,   2},   // generic
         {0,   2},   // gregorian
         {0,   1},   // buddhist
-        {232, 4},   // japanese (eras from Meiji)
+        {232, 5},   // japanese (eras from Meiji)
         {0,   2},   // roc (Minguo)
         {0,   1},   // islamic (Hijrah)
         {0,   1},   // islamic-civil (same as islamic)
--- a/make/scripts/compare.sh	Wed Jan 30 12:16:50 2019 +0530
+++ b/make/scripts/compare.sh	Thu Jan 31 13:43:11 2019 +0100
@@ -340,7 +340,9 @@
 
     echo -n File types...
     found=""
-    for f in `cd $OTHER_DIR && $FIND . ! -type d`
+    # The file command does not know about jmod files and this sometimes results
+    # in different types being detected more or less randomly.
+    for f in $(cd $OTHER_DIR && $FIND . ! -type d -a ! -name "*.jmod")
     do
         if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
         if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
@@ -494,7 +496,7 @@
     $RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
     $MKDIR -p $THIS_UNZIPDIR
     $MKDIR -p $OTHER_UNZIPDIR
-    if [ "$TYPE" = "jar" -o "$TYPE" = "war" -o "$TYPE" = "zip" -o "$TYPE" = "jmod" ]
+    if [ "$TYPE" = "jar" -o "$TYPE" = "war" -o "$TYPE" = "zip" ]
     then
         (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
         (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
@@ -502,6 +504,10 @@
     then
         (cd $THIS_UNZIPDIR && $GUNZIP -c $THIS_ZIP | $TAR xf -)
         (cd $OTHER_UNZIPDIR && $GUNZIP -c $OTHER_ZIP | $TAR xf -)
+    elif [ "$TYPE" = "jmod" ]
+    then
+        (cd $THIS_UNZIPDIR && $JMOD extract $THIS_ZIP)
+        (cd $OTHER_UNZIPDIR && $JMOD extract $OTHER_ZIP)
     else
         (cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP)
         (cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP)
@@ -559,16 +565,16 @@
         return_value=1
     fi
 
-    if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
-        DIFFING_FILES=$($GREP -e 'differ$' -e '^diff ' $CONTENTS_DIFF_FILE \
-            | $SED -e 's/^Files //g' -e 's/diff -r //g' | $CUT -f 1 -d ' ' \
-            | $SED "s|$OTHER_UNZIPDIR/||g")
-    else
-        DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \
-            | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
-    fi
+    if [ "$CMP_ZIPS_CONTENTS" = "true" ]; then
+        if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
+            DIFFING_FILES=$($GREP -e 'differ$' -e '^diff ' $CONTENTS_DIFF_FILE \
+                | $SED -e 's/^Files //g' -e 's/diff -r //g' | $CUT -f 1 -d ' ' \
+                | $SED "s|$OTHER_UNZIPDIR/||g")
+        else
+            DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \
+                | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
+        fi
 
-    if [ "$CMP_ZIPS_CONTENTS" = "true" ]; then
         $RM -f $WORK_DIR/$ZIP_FILE.diffs
         for file in $DIFFING_FILES; do
             if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
@@ -600,6 +606,48 @@
     return $return_value
 }
 
+################################################################################
+# Compare jmod file
+
+compare_jmod_file() {
+    THIS_DIR=$1
+    OTHER_DIR=$2
+    WORK_DIR=$3
+    JMOD_FILE=$4
+
+    THIS_JMOD=$THIS_DIR/$JMOD_FILE
+    OTHER_JMOD=$OTHER_DIR/$JMOD_FILE
+
+    if $CMP $OTHER_JMOD $THIS_JMOD > /dev/null; then
+        return 0
+    fi
+
+    THIS_JMOD_LIST=$WORK_DIR/$JMOD_FILE.list.this
+    OTHER_JMOD_LIST=$WORK_DIR/$JMOD_FILE.list.other
+    mkdir -p $(dirname $THIS_JMOD_LIST) $(dirname $OTHER_JMOD_LIST)
+
+    $JMOD list $THIS_JMOD | sort > $THIS_JMOD_LIST
+    $JMOD list $OTHER_JMOD | sort > $OTHER_JMOD_LIST
+    JMOD_LIST_DIFF_FILE=$WORK_DIR/$JMOD_FILE.list.diff
+    LC_ALL=C $DIFF $THIS_JMOD_LIST $OTHER_JMOD_LIST > $JMOD_LIST_DIFF_FILE
+
+    ONLY_THIS=$($GREP "^<" $JMOD_LIST_DIFF_FILE)
+    ONLY_OTHER=$($GREP "^>" $JMOD_LIST_DIFF_FILE)
+
+    if [ -n "$ONLY_OTHER" ]; then
+        echo "        Only OTHER $JMOD_FILE contains:"
+        echo "$ONLY_OTHER" | sed "s|^>|            |"g | sed 's|: |/|g'
+        return_value=1
+    fi
+
+    if [ -n "$ONLY_THIS" ]; then
+        echo "        Only THIS $JMOD_FILE contains:"
+        echo "$ONLY_THIS" | sed "s|^<|            |"g | sed 's|: |/|g'
+        return_value=1
+    fi
+
+    return $return_value
+}
 
 ################################################################################
 # Compare all zip files
@@ -631,6 +679,34 @@
 }
 
 ################################################################################
+# Compare all jmod files
+
+compare_all_jmod_files() {
+    THIS_DIR=$1
+    OTHER_DIR=$2
+    WORK_DIR=$3
+
+    JMODS=$(cd $THIS_DIR && $FIND . -type f -name "*.jmod" | $SORT | $FILTER )
+
+    if [ -n "$JMODS" ]; then
+        echo Jmod files...
+
+        return_value=0
+        for f in $JMODS; do
+            if [ -f "$OTHER_DIR/$f" ]; then
+                compare_jmod_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
+                if [ "$?" != "0" ]; then
+                    return_value=1
+                    REGRESSIONS=true
+                fi
+            fi
+        done
+    fi
+
+    return $return_value
+}
+
+################################################################################
 # Compare all jar files
 
 compare_all_jar_files() {
@@ -1141,6 +1217,7 @@
     echo "-zips               Compare the contents of all zip files and files in them"
     echo "-zips-names         Compare the file names inside all zip files"
     echo "-jars               Compare the contents of all jar files"
+    echo "-jmods              Compare the listings of all jmod files"
     echo "-libs               Compare all native libraries"
     echo "-execs              Compare all executables"
     echo "-v                  Verbose output, does not hide known differences"
@@ -1169,6 +1246,7 @@
 CMP_ZIPS=false
 CMP_ZIPS_CONTENTS=true
 CMP_JARS=false
+CMP_JMODS=false
 CMP_LIBS=false
 CMP_EXECS=false
 
@@ -1194,6 +1272,7 @@
             CMP_GENERAL=true
             CMP_ZIPS=true
             CMP_JARS=true
+            CMP_JMODS=true
             CMP_LIBS=true
             CMP_EXECS=true
             ;;
@@ -1220,6 +1299,9 @@
         -jars)
             CMP_JARS=true
             ;;
+        -jmods)
+            CMP_JMODS=true
+            ;;
         -libs)
             CMP_LIBS=true
             ;;
@@ -1264,6 +1346,7 @@
             CMP_TYPES=false
             CMP_ZIPS=true
             CMP_JARS=true
+            CMP_JMODS=true
             CMP_LIBS=true
             CMP_EXECS=true
 
@@ -1317,13 +1400,22 @@
     exit
 fi
 
-if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
+if [ "$CMP_NAMES" = "false" ] \
+       && [ "$CMP_TYPES" = "false" ] \
+       && [ "$CMP_PERMS" = "false" ] \
+       && [ "$CMP_GENERAL" = "false" ] \
+       && [ "$CMP_ZIPS" = "false" ] \
+       && [ "$CMP_JARS" = "false" ] \
+       && [ "$CMP_JMODS" = "false" ] \
+       && [ "$CMP_LIBS" = "false" ] \
+       && [ "$CMP_EXECS" = "false" ]; then
     CMP_NAMES=true
     CMP_PERMS=true
     CMP_TYPES=true
     CMP_GENERAL=true
     CMP_ZIPS=true
     CMP_JARS=true
+    CMP_JMODS=true
     CMP_LIBS=true
     CMP_EXECS=true
 fi
@@ -1373,6 +1465,7 @@
         OTHER_JDK="$OTHER/images/jdk"
         # Rewrite the path to tools that are used from the build
         JIMAGE="$(echo "$JIMAGE" | $SED "s|$OLD_THIS|$THIS|g")"
+        JMOD="$(echo "$JMOD" | $SED "s|$OLD_THIS|$THIS|g")"
         JAVAP="$(echo "$JAVAP" | $SED "s|$OLD_THIS|$THIS|g")"
     else
         echo "No common images found."
@@ -1613,6 +1706,15 @@
     fi
 fi
 
+if [ "$CMP_JMODS" = "true" ]; then
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        compare_all_jmod_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+    fi
+    if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
+        compare_all_jmod_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
+    fi
+fi
+
 if [ "$CMP_PERMS" = "true" ]; then
     if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
         echo -n "JDK "
--- a/src/hotspot/cpu/aarch64/aarch64.ad	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/aarch64.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -3417,37 +3417,21 @@
       __ biased_locking_enter(box, oop, disp_hdr, tmp, true, cont);
     }
 
-    // Handle existing monitor
+    // Check for existing monitor
     __ tbnz(disp_hdr, exact_log2(markOopDesc::monitor_value), object_has_monitor);
 
-    // Set displaced_header to be (markOop of object | UNLOCK_VALUE).
-    __ orr(disp_hdr, disp_hdr, markOopDesc::unlocked_value);
-
-    // Load Compare Value application register.
+    // Set tmp to be (markOop of object | UNLOCK_VALUE).
+    __ orr(tmp, disp_hdr, markOopDesc::unlocked_value);
 
     // Initialize the box. (Must happen before we update the object mark!)
-    __ str(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes()));
-
-    // Compare object markOop with mark and if equal exchange scratch1
-    // with object markOop.
-    if (UseLSE) {
-      __ mov(tmp, disp_hdr);
-      __ casal(Assembler::xword, tmp, box, oop);
-      __ cmp(tmp, disp_hdr);
-      __ br(Assembler::EQ, cont);
-    } else {
-      Label retry_load;
-      if ((VM_Version::features() & VM_Version::CPU_STXR_PREFETCH))
-        __ prfm(Address(oop), PSTL1STRM);
-      __ bind(retry_load);
-      __ ldaxr(tmp, oop);
-      __ cmp(tmp, disp_hdr);
-      __ br(Assembler::NE, cas_failed);
-      // use stlxr to ensure update is immediately visible
-      __ stlxr(tmp, box, oop);
-      __ cbzw(tmp, cont);
-      __ b(retry_load);
-    }
+    __ str(tmp, Address(box, BasicLock::displaced_header_offset_in_bytes()));
+
+    // Compare object markOop with an unlocked value (tmp) and if
+    // equal exchange the stack address of our box with object markOop.
+    // On failure disp_hdr contains the possibly locked markOop.
+    __ cmpxchg(oop, tmp, box, Assembler::xword, /*acquire*/ true,
+               /*release*/ true, /*weak*/ false, disp_hdr);
+    __ br(Assembler::EQ, cont);
 
     assert(oopDesc::mark_offset_in_bytes() == 0, "offset of _mark is not 0");
 
@@ -3464,38 +3448,21 @@
     __ mov(tmp, (address) (~(os::vm_page_size()-1) | markOopDesc::lock_mask_in_place));
     // If condition is true we are cont and hence we can store 0 as the
     // displaced header in the box, which indicates that it is a recursive lock.
-    __ ands(tmp/*==0?*/, disp_hdr, tmp);
+    __ ands(tmp/*==0?*/, disp_hdr, tmp);   // Sets flags for result
     __ str(tmp/*==0, perhaps*/, Address(box, BasicLock::displaced_header_offset_in_bytes()));
 
+    __ b(cont);
+
     // Handle existing monitor.
-    __ b(cont);
-
     __ bind(object_has_monitor);
+
     // The object's monitor m is unlocked iff m->owner == NULL,
     // otherwise m->owner may contain a thread or a stack address.
     //
     // Try to CAS m->owner from NULL to current thread.
     __ add(tmp, disp_hdr, (ObjectMonitor::owner_offset_in_bytes()-markOopDesc::monitor_value));
-    __ mov(disp_hdr, zr);
-
-    if (UseLSE) {
-      __ mov(rscratch1, disp_hdr);
-      __ casal(Assembler::xword, rscratch1, rthread, tmp);
-      __ cmp(rscratch1, disp_hdr);
-    } else {
-      Label retry_load, fail;
-      if ((VM_Version::features() & VM_Version::CPU_STXR_PREFETCH)) {
-        __ prfm(Address(tmp), PSTL1STRM);
-      }
-      __ bind(retry_load);
-      __ ldaxr(rscratch1, tmp);
-      __ cmp(disp_hdr, rscratch1);
-      __ br(Assembler::NE, fail);
-      // use stlxr to ensure update is immediately visible
-      __ stlxr(rscratch1, rthread, tmp);
-      __ cbnzw(rscratch1, retry_load);
-      __ bind(fail);
-    }
+    __ cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
+               /*release*/ true, /*weak*/ false, noreg); // Sets flags for result
 
     // Store a non-null value into the box to avoid looking like a re-entrant
     // lock. The fast-path monitor unlock code checks for
@@ -3539,24 +3506,9 @@
     // see the stack address of the basicLock in the markOop of the
     // object.
 
-    if (UseLSE) {
-      __ mov(tmp, box);
-      __ casl(Assembler::xword, tmp, disp_hdr, oop);
-      __ cmp(tmp, box);
-      __ b(cont);
-    } else {
-      Label retry_load;
-      if ((VM_Version::features() & VM_Version::CPU_STXR_PREFETCH))
-        __ prfm(Address(oop), PSTL1STRM);
-      __ bind(retry_load);
-      __ ldxr(tmp, oop);
-      __ cmp(box, tmp);
-      __ br(Assembler::NE, cont);
-      // use stlxr to ensure update is immediately visible
-      __ stlxr(tmp, disp_hdr, oop);
-      __ cbzw(tmp, cont);
-      __ b(retry_load);
-    }
+    __ cmpxchg(oop, box, disp_hdr, Assembler::xword, /*acquire*/ false,
+               /*release*/ true, /*weak*/ false, tmp);
+    __ b(cont);
 
     assert(oopDesc::mark_offset_in_bytes() == 0, "offset of _mark is not 0");
 
@@ -3567,13 +3519,13 @@
     __ ldr(disp_hdr, Address(tmp, ObjectMonitor::recursions_offset_in_bytes()));
     __ eor(rscratch1, rscratch1, rthread); // Will be 0 if we are the owner.
     __ orr(rscratch1, rscratch1, disp_hdr); // Will be 0 if there are 0 recursions
-    __ cmp(rscratch1, zr);
+    __ cmp(rscratch1, zr); // Sets flags for result
     __ br(Assembler::NE, cont);
 
     __ ldr(rscratch1, Address(tmp, ObjectMonitor::EntryList_offset_in_bytes()));
     __ ldr(disp_hdr, Address(tmp, ObjectMonitor::cxq_offset_in_bytes()));
     __ orr(rscratch1, rscratch1, disp_hdr); // Will be 0 if both are 0.
-    __ cmp(rscratch1, zr);
+    __ cmp(rscratch1, zr); // Sets flags for result
     __ cbnz(rscratch1, cont);
     // need a release store here
     __ lea(tmp, Address(tmp, ObjectMonitor::owner_offset_in_bytes()));
--- a/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -137,11 +137,6 @@
 // frame.
 inline intptr_t* frame::id(void) const { return unextended_sp(); }
 
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
-                                                    return this->id() < id ; }
-
 // Return true if the frame is older (less recent activation) than the frame represented by id
 inline bool frame::is_older(intptr_t* id) const   { assert(this->id() != NULL && id != NULL, "NULL frame id");
                                                     return this->id() > id ; }
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -423,45 +423,14 @@
 }
 
 void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
-                                                bool acquire, bool release, bool weak, bool encode,
-                                                Register tmp1, Register tmp2, Register tmp3,
+                                                bool acquire, bool release, bool weak, bool is_cae,
                                                 Register result) {
 
-  if (!ShenandoahCASBarrier) {
-    if (UseCompressedOops) {
-      if (encode) {
-        __ encode_heap_oop(tmp1, expected);
-        expected = tmp1;
-        __ encode_heap_oop(tmp3, new_val);
-        new_val = tmp3;
-      }
-      __ cmpxchg(addr, expected, new_val, Assembler::word, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
-      __ membar(__ AnyAny);
-    } else {
-      __ cmpxchg(addr, expected, new_val, Assembler::xword, /* acquire*/ true, /* release*/ true, /* weak*/ false, rscratch1);
-      __ membar(__ AnyAny);
-    }
-    return;
-  }
-
-  if (encode) {
-    storeval_barrier(masm, new_val, tmp3);
-  }
-
-  if (UseCompressedOops) {
-    if (encode) {
-      __ encode_heap_oop(tmp1, expected);
-      expected = tmp1;
-      __ encode_heap_oop(tmp2, new_val);
-      new_val = tmp2;
-    }
-  }
-  bool is_cae = (result != noreg);
+  Register tmp = rscratch2;
   bool is_narrow = UseCompressedOops;
   Assembler::operand_size size = is_narrow ? Assembler::word : Assembler::xword;
-  if (! is_cae) result = rscratch1;
 
-  assert_different_registers(addr, expected, new_val, result, tmp3);
+  assert_different_registers(addr, expected, new_val, result, tmp);
 
   Label retry, done, fail;
 
@@ -474,35 +443,38 @@
     __ cmp(result, expected);
   }
   __ br(Assembler::NE, fail);
-  __ store_exclusive(tmp3, new_val, addr, size, release);
+  __ store_exclusive(tmp, new_val, addr, size, release);
   if (weak) {
-    __ cmpw(tmp3, 0u); // If the store fails, return NE to our caller
+    __ cmpw(tmp, 0u); // If the store fails, return NE to our caller
   } else {
-    __ cbnzw(tmp3, retry);
+    __ cbnzw(tmp, retry);
   }
   __ b(done);
 
  __  bind(fail);
   // Check if rb(expected)==rb(result)
   // Shuffle registers so that we have memory value ready for next expected.
-  __ mov(tmp3, expected);
+  __ mov(tmp, expected);
   __ mov(expected, result);
   if (is_narrow) {
     __ decode_heap_oop(result, result);
-    __ decode_heap_oop(tmp3, tmp3);
+    __ decode_heap_oop(tmp, tmp);
   }
   read_barrier_impl(masm, result);
-  read_barrier_impl(masm, tmp3);
-  __ cmp(result, tmp3);
+  read_barrier_impl(masm, tmp);
+  __ cmp(result, tmp);
   // Retry with expected now being the value we just loaded from addr.
   __ br(Assembler::EQ, retry);
-  if (is_narrow && is_cae) {
+  if (is_cae && is_narrow) {
     // For cmp-and-exchange and narrow oops, we need to restore
     // the compressed old-value. We moved it to 'expected' a few lines up.
     __ mov(result, expected);
   }
   __ bind(done);
 
+  if (!is_cae) {
+    __ cset(result, Assembler::EQ);
+  }
 }
 
 #ifdef COMPILER1
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -60,7 +60,6 @@
   void read_barrier_not_null_impl(MacroAssembler* masm, Register dst);
   void write_barrier(MacroAssembler* masm, Register dst);
   void write_barrier_impl(MacroAssembler* masm, Register dst);
-  void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
   void asm_acmp_barrier(MacroAssembler* masm, Register op1, Register op2);
 
   address generate_shenandoah_wb(StubCodeGenerator* cgen);
@@ -68,6 +67,8 @@
 public:
   static address shenandoah_wb();
 
+  void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
+
 #ifdef COMPILER1
   void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
   void gen_write_barrier_stub(LIR_Assembler* ce, ShenandoahWriteBarrierStub* stub);
@@ -92,9 +93,7 @@
                              Label& slow_case);
 
   void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
-                   bool acquire, bool release, bool weak, bool encode,
-                   Register tmp1, Register tmp2, Register tmp3 = rscratch2,
-                   Register result = noreg);
+                   bool acquire, bool release, bool weak, bool is_cae, Register result);
 
   virtual void barrier_stubs_init();
 };
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetC1_aarch64.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetC1_aarch64.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -28,15 +28,30 @@
 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
 #include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
 
+#define __ masm->masm()->
+
 void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
   Register addr = _addr->as_register_lo();
   Register newval = _new_value->as_register();
   Register cmpval = _cmp_value->as_register();
   Register tmp1 = _tmp1->as_register();
   Register tmp2 = _tmp2->as_register();
-  ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*weak*/ false, true, tmp1, tmp2);
+  Register result = result_opr()->as_register();
+
+  ShenandoahBarrierSet::assembler()->storeval_barrier(masm->masm(), newval, rscratch2);
+
+  if (UseCompressedOops) {
+    __ encode_heap_oop(tmp1, cmpval);
+    cmpval = tmp1;
+    __ encode_heap_oop(tmp2, newval);
+    newval = tmp2;
+  }
+
+  ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, result);
 }
 
+#undef __
+
 #ifdef ASSERT
 #define __ gen->lir(__FILE__, __LINE__)->
 #else
@@ -58,13 +73,9 @@
       LIR_Opr t1 = gen->new_register(T_OBJECT);
       LIR_Opr t2 = gen->new_register(T_OBJECT);
       LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
+      LIR_Opr result = gen->new_register(T_INT);
 
-      __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2,
-                                                   LIR_OprFact::illegalOpr));
-
-      LIR_Opr result = gen->new_register(T_INT);
-      __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0),
-               result, T_INT);
+      __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
       return result;
     }
   }
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoah_aarch64.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -26,22 +26,22 @@
 %}
 
 encode %{
-  enc_class aarch64_enc_cmpxchg_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
+  enc_class aarch64_enc_cmpxchg_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp, iRegINoSp res) %{
     MacroAssembler _masm(&cbuf);
     guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
+                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
   %}
 
-  enc_class aarch64_enc_cmpxchg_acq_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp) %{
+  enc_class aarch64_enc_cmpxchg_acq_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp, iRegINoSp res) %{
     MacroAssembler _masm(&cbuf);
     guarantee($mem$$index == -1 && $mem$$disp == 0, "impossible encoding");
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
+                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
   %}
 %}
 
@@ -66,11 +66,9 @@
 
   format %{
     "cmpxchg_shenandoah $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
-    "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
   %}
 
-  ins_encode(aarch64_enc_cmpxchg_oop_shenandoah(mem, oldval, newval, tmp),
-             aarch64_enc_cset_eq(res));
+  ins_encode(aarch64_enc_cmpxchg_oop_shenandoah(mem, oldval, newval, tmp, res));
 
   ins_pipe(pipe_slow);
 %}
@@ -84,14 +82,12 @@
 
   format %{
     "cmpxchgw_shenandoah $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
-    "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
   %}
 
   ins_encode %{
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
-    ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
-    __ cset($res$$Register, Assembler::EQ);
+    ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
   %}
 
   ins_pipe(pipe_slow);
@@ -107,11 +103,9 @@
 
   format %{
     "cmpxchg_acq_shenandoah_oop $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
-    "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
   %}
 
-  ins_encode(aarch64_enc_cmpxchg_acq_oop_shenandoah(mem, oldval, newval, tmp),
-             aarch64_enc_cset_eq(res));
+  ins_encode(aarch64_enc_cmpxchg_acq_oop_shenandoah(mem, oldval, newval, tmp, res));
 
   ins_pipe(pipe_slow);
 %}
@@ -126,14 +120,12 @@
 
  format %{
     "cmpxchgw_acq_shenandoah_narrow_oop $mem, $oldval, $newval\t# (ptr) if $mem == $oldval then $mem <-- $newval with temp $tmp"
-    "cset $res, EQ\t# $res <-- (EQ ? 1 : 0)"
  %}
 
   ins_encode %{
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
-    ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg);
-    __ cset($res$$Register, Assembler::EQ);
+    ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
   %}
 
   ins_pipe(pipe_slow);
@@ -150,7 +142,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /* encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -166,7 +158,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+                                                   /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -183,7 +175,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /* encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -200,7 +192,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /*encode*/ false, noreg, noreg, rscratch2, $res$$Register);
+                                                   /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -217,8 +209,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ false, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
-    __ csetw($res$$Register, Assembler::EQ);
+                                                   /*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -229,14 +220,12 @@
   effect(TEMP tmp, KILL cr);
   format %{
     "cmpxchg_shenandoah $res = $mem, $oldval, $newval\t# (ptr, weak) if $mem == $oldval then $mem <-- $newval"
-    "csetw $res, EQ\t# $res <-- (EQ ? 1 : 0)"
   %}
   ins_encode %{
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ false, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
-    __ csetw($res$$Register, Assembler::EQ);
+                                                   /*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -254,8 +243,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ true, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
-    __ csetw($res$$Register, Assembler::EQ);
+                                                   /*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
@@ -273,9 +261,7 @@
     Register tmp = $tmp$$Register;
     __ mov(tmp, $oldval$$Register); // Must not clobber oldval.
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
-                                                   /*acquire*/ true, /*release*/ true, /*weak*/ true, /*encode*/ false, noreg, noreg);
-    __ csetw($res$$Register, Assembler::EQ);
+                                                   /*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
   %}
   ins_pipe(pipe_slow);
 %}
-
--- a/src/hotspot/cpu/arm/frame_arm.inline.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/arm/frame_arm.inline.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -120,17 +120,11 @@
 // frame.
 inline intptr_t* frame::id(void) const { return unextended_sp(); }
 
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
-                                                    return this->id() < id ; }
-
 // Return true if the frame is older (less recent activation) than the frame represented by id
 inline bool frame::is_older(intptr_t* id) const   { assert(this->id() != NULL && id != NULL, "NULL frame id");
                                                     return this->id() > id ; }
 
 
-
 inline intptr_t* frame::link() const              { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
 
 inline intptr_t* frame::unextended_sp() const     { return _unextended_sp; }
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -3859,31 +3859,20 @@
 // Due to register shortage, setting tc3 may overwrite table. With the return offset
 // at hand, the original table address can be easily reconstructed.
 int MacroAssembler::crc32_table_columns(Register table, Register tc0, Register tc1, Register tc2, Register tc3) {
-
+  assert(!VM_Version::has_vpmsumb(), "Vector version should be used instead!");
+
+  // Point to 4 byte folding tables (byte-reversed version for Big Endian)
+  // Layout: See StubRoutines::generate_crc_constants.
 #ifdef VM_LITTLE_ENDIAN
-  // This is what we implement (the DOLIT4 part):
-  // ========================================================================= */
-  // #define DOLIT4 c ^= *buf4++; \
-  //         c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
-  //             crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-  // #define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-  // ========================================================================= */
-  const int ix0 = 3*(4*CRC32_COLUMN_SIZE);
-  const int ix1 = 2*(4*CRC32_COLUMN_SIZE);
-  const int ix2 = 1*(4*CRC32_COLUMN_SIZE);
-  const int ix3 = 0*(4*CRC32_COLUMN_SIZE);
+  const int ix0 = 3 * CRC32_TABLE_SIZE;
+  const int ix1 = 2 * CRC32_TABLE_SIZE;
+  const int ix2 = 1 * CRC32_TABLE_SIZE;
+  const int ix3 = 0 * CRC32_TABLE_SIZE;
 #else
-  // This is what we implement (the DOBIG4 part):
-  // =========================================================================
-  // #define DOBIG4 c ^= *++buf4; \
-  //         c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
-  //             crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-  // #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-  // =========================================================================
-  const int ix0 = 4*(4*CRC32_COLUMN_SIZE);
-  const int ix1 = 5*(4*CRC32_COLUMN_SIZE);
-  const int ix2 = 6*(4*CRC32_COLUMN_SIZE);
-  const int ix3 = 7*(4*CRC32_COLUMN_SIZE);
+  const int ix0 = 1 * CRC32_TABLE_SIZE;
+  const int ix1 = 2 * CRC32_TABLE_SIZE;
+  const int ix2 = 3 * CRC32_TABLE_SIZE;
+  const int ix3 = 4 * CRC32_TABLE_SIZE;
 #endif
   assert_different_registers(table, tc0, tc1, tc2);
   assert(table == tc3, "must be!");
@@ -3898,7 +3887,7 @@
 
 /**
  * uint32_t crc;
- * timesXtoThe32[crc & 0xFF] ^ (crc >> 8);
+ * table[crc & 0xFF] ^ (crc >> 8);
  */
 void MacroAssembler::fold_byte_crc32(Register crc, Register val, Register table, Register tmp) {
   assert_different_registers(crc, table, tmp);
@@ -3917,14 +3906,6 @@
 }
 
 /**
- * uint32_t crc;
- * timesXtoThe32[crc & 0xFF] ^ (crc >> 8);
- */
-void MacroAssembler::fold_8bit_crc32(Register crc, Register table, Register tmp) {
-  fold_byte_crc32(crc, crc, table, tmp);
-}
-
-/**
  * Emits code to update CRC-32 with a byte value according to constants in table.
  *
  * @param [in,out]crc   Register containing the crc.
@@ -3975,9 +3956,7 @@
  * Implementation according to jdk/src/share/native/java/util/zip/zlib-1.2.8/crc32.c
  */
 // A note on the lookup table address(es):
-// The lookup table consists of two sets of four columns each.
-// The columns {0..3} are used for little-endian machines.
-// The columns {4..7} are used for big-endian machines.
+// The implementation uses 4 table columns (byte-reversed versions for Big Endian).
 // To save the effort of adding the column offset to the table address each time
 // a table element is looked up, it is possible to pass the pre-calculated
 // column addresses.
@@ -4112,47 +4091,16 @@
 }
 
 /**
- * @param crc   register containing existing CRC (32-bit)
- * @param buf   register pointing to input byte buffer (byte*)
- * @param len   register containing number of bytes
- * @param table register pointing to CRC table
- *
- * Uses R7_ARG5, R8_ARG6 as work registers.
- */
-void MacroAssembler::kernel_crc32_1byte(Register crc, Register buf, Register len, Register table,
-                                        Register t0,  Register t1,  Register t2,  Register t3,
-                                        bool invertCRC) {
-  assert_different_registers(crc, buf, len, table);
-
-  Register  data = t0;                   // Holds the current byte to be folded into crc.
-
-  BLOCK_COMMENT("kernel_crc32_1byte {");
-
-  if (invertCRC) {
-    nand(crc, crc, crc);                      // 1s complement of crc
-  }
-
-  // Process all bytes in a single-byte loop.
-  update_byteLoop_crc32(crc, buf, len, table, data, true);
-
-  if (invertCRC) {
-    nand(crc, crc, crc);                      // 1s complement of crc
-  }
-  BLOCK_COMMENT("} kernel_crc32_1byte");
-}
-
-/**
  * @param crc             register containing existing CRC (32-bit)
  * @param buf             register pointing to input byte buffer (byte*)
  * @param len             register containing number of bytes
- * @param table           register pointing to CRC table
- * @param constants       register pointing to CRC table for 128-bit aligned memory
- * @param t0-t5           temp registers
+ * @param constants       register pointing to precomputed constants
+ * @param t0-t6           temp registers
  */
-void MacroAssembler::kernel_crc32_vpmsum(Register crc, Register buf, Register len, Register table,
-                                         Register constants, Register t0, Register t1, Register t2,
-                                         Register t3, Register t4, Register t5, bool invertCRC) {
-  assert_different_registers(crc, buf, len, table);
+void MacroAssembler::kernel_crc32_vpmsum(Register crc, Register buf, Register len, Register constants,
+                                         Register t0, Register t1, Register t2, Register t3,
+                                         Register t4, Register t5, Register t6, bool invertCRC) {
+  assert_different_registers(crc, buf, len, constants);
 
   Label L_tail;
 
@@ -4177,14 +4125,16 @@
   blt(CCR0, L_tail); // len - prealign < threshold?
 
   subf(len, prealign, len);
-  update_byteLoop_crc32(crc, buf, prealign, table, t2, false);
+  update_byteLoop_crc32(crc, buf, prealign, constants, t2, false);
 
   // Calculate from first aligned address as far as possible.
-  kernel_crc32_vpmsum_aligned(crc, buf, len, constants, t0, t1, t2, t3, t4, t5);
+  addi(constants, constants, CRC32_TABLE_SIZE); // Point to vector constants.
+  kernel_crc32_vpmsum_aligned(crc, buf, len, constants, t0, t1, t2, t3, t4, t5, t6);
+  addi(constants, constants, -CRC32_TABLE_SIZE); // Point to table again.
 
   // Remaining bytes.
   BIND(L_tail);
-  update_byteLoop_crc32(crc, buf, len, table, t2, false);
+  update_byteLoop_crc32(crc, buf, len, constants, t2, false);
 
   if (invertCRC) {
     nand(crc, crc, crc);                      // 1s complement of crc
@@ -4198,10 +4148,10 @@
  * @param buf             register pointing to input byte buffer (byte*)
  * @param len             register containing number of bytes (will get updated to remaining bytes)
  * @param constants       register pointing to CRC table for 128-bit aligned memory
- * @param t0-t5           temp registers
+ * @param t0-t6           temp registers
  */
-void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Register len,
-    Register constants, Register t0, Register t1, Register t2, Register t3, Register t4, Register t5) {
+void MacroAssembler::kernel_crc32_vpmsum_aligned(Register crc, Register buf, Register len, Register constants,
+    Register t0, Register t1, Register t2, Register t3, Register t4, Register t5, Register t6) {
 
   // Save non-volatile vector registers (frameless).
   Register offset = t1;
@@ -4217,7 +4167,6 @@
 #endif
   offsetInt -= 8; std(R14, offsetInt, R1_SP);
   offsetInt -= 8; std(R15, offsetInt, R1_SP);
-  offsetInt -= 8; std(R16, offsetInt, R1_SP);
 
   // Implementation uses an inner loop which uses between 256 and 16 * unroll_factor
   // bytes per iteration. The basic scheme is:
@@ -4235,10 +4184,10 @@
             inner_consts_size = (unroll_factor / unroll_factor2) * 16;
 
   // Support registers.
-  Register offs[] = { noreg, t0, t1, t2, t3, t4, t5, crc /* will live in VCRC */ };
+  Register offs[] = { noreg, t0, t1, t2, t3, t4, t5, t6 };
   Register num_bytes = R14,
            loop_count = R15,
-           cur_const = R16;
+           cur_const = crc; // will live in VCRC
   // Constant array for outer loop: unroll_factor2 - 1 registers,
   // Constant array for inner loop: unroll_factor / unroll_factor2 registers.
   VectorRegister consts0[] = { VR16, VR17, VR18, VR19, VR20, VR21, VR22 },
@@ -4470,7 +4419,6 @@
 #endif
   offsetInt -= 8;  ld(R14, offsetInt, R1_SP);
   offsetInt -= 8;  ld(R15, offsetInt, R1_SP);
-  offsetInt -= 8;  ld(R16, offsetInt, R1_SP);
 }
 
 void MacroAssembler::crc32(Register crc, Register buf, Register len, Register t0, Register t1, Register t2,
@@ -4479,30 +4427,12 @@
                                      : StubRoutines::crc_table_addr()   , R0);
 
   if (VM_Version::has_vpmsumb()) {
-    load_const_optimized(t1, is_crc32c ? StubRoutines::ppc64::crc32c_constants()
-                                       : StubRoutines::ppc64::crc_constants()   , R0);
     kernel_crc32_vpmsum(crc, buf, len, t0, t1, t2, t3, t4, t5, t6, t7, !is_crc32c);
   } else {
     kernel_crc32_1word(crc, buf, len, t0, t1, t2, t3, t4, t5, t6, t7, t0, !is_crc32c);
   }
 }
 
-void MacroAssembler::kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp, bool invertCRC) {
-  assert_different_registers(crc, buf, /* len,  not used!! */ table, tmp);
-
-  BLOCK_COMMENT("kernel_crc32_singleByte:");
-  if (invertCRC) {
-    nand(crc, crc, crc);                // 1s complement of crc
-  }
-
-  lbz(tmp, 0, buf);                     // Byte from buffer, zero-extended.
-  update_byte_crc32(crc, tmp, table);
-
-  if (invertCRC) {
-    nand(crc, crc, crc);                // 1s complement of crc
-  }
-}
-
 void MacroAssembler::kernel_crc32_singleByteReg(Register crc, Register val, Register table, bool invertCRC) {
   assert_different_registers(crc, val, table);
 
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -828,7 +828,6 @@
   void load_reverse_32(Register dst, Register src);
   int  crc32_table_columns(Register table, Register tc0, Register tc1, Register tc2, Register tc3);
   void fold_byte_crc32(Register crc, Register val, Register table, Register tmp);
-  void fold_8bit_crc32(Register crc, Register table, Register tmp);
   void update_byte_crc32(Register crc, Register val, Register table);
   void update_byteLoop_crc32(Register crc, Register buf, Register len, Register table,
                              Register data, bool loopAlignment);
@@ -839,20 +838,16 @@
                           Register t0,  Register t1,  Register t2,  Register t3,
                           Register tc0, Register tc1, Register tc2, Register tc3,
                           bool invertCRC);
-  void kernel_crc32_1byte(Register crc, Register buf, Register len, Register table,
-                          Register t0,  Register t1,  Register t2,  Register t3,
-                          bool invertCRC);
-  void kernel_crc32_vpmsum(Register crc, Register buf, Register len, Register table, Register constants,
-                          Register t0, Register t1, Register t2, Register t3, Register t4, Register t5,
-                          bool invertCRC);
+  void kernel_crc32_vpmsum(Register crc, Register buf, Register len, Register constants,
+                           Register t0, Register t1, Register t2, Register t3, Register t4,
+                           Register t5, Register t6, bool invertCRC);
   void kernel_crc32_vpmsum_aligned(Register crc, Register buf, Register len, Register constants,
-                                   Register t0, Register t1, Register t2, Register t3, Register t4, Register t5);
+                                   Register t0, Register t1, Register t2, Register t3, Register t4,
+                                   Register t5, Register t6);
   // Version which internally decides what to use.
   void crc32(Register crc, Register buf, Register len, Register t0, Register t1, Register t2,
              Register t3, Register t4, Register t5, Register t6, Register t7, bool is_crc32c);
 
-  void kernel_crc32_singleByte(Register crc, Register buf, Register len, Register table, Register tmp,
-                               bool invertCRC);
   void kernel_crc32_singleByteReg(Register crc, Register val, Register table,
                                   bool invertCRC);
 
--- a/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/stubGenerator_ppc.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -3496,19 +3496,13 @@
 
     // CRC32 Intrinsics.
     if (UseCRC32Intrinsics) {
-      StubRoutines::_crc_table_adr = (address)StubRoutines::ppc64::_crc_table;
-      if (VM_Version::has_vpmsumb()) {
-        StubRoutines::ppc64::_crc_constants = StubRoutines::ppc64::generate_crc_constants(REVERSE_CRC32_POLY);
-      }
+      StubRoutines::_crc_table_adr = StubRoutines::generate_crc_constants(REVERSE_CRC32_POLY);
       StubRoutines::_updateBytesCRC32 = generate_CRC32_updateBytes(false);
     }
 
     // CRC32C Intrinsics.
     if (UseCRC32CIntrinsics) {
-      StubRoutines::_crc32c_table_addr = (address)StubRoutines::ppc64::_crc32c_table;
-      if (VM_Version::has_vpmsumb()) {
-        StubRoutines::ppc64::_crc32c_constants = StubRoutines::ppc64::generate_crc_constants(REVERSE_CRC32C_POLY);
-      }
+      StubRoutines::_crc32c_table_addr = StubRoutines::generate_crc_constants(REVERSE_CRC32C_POLY);
       StubRoutines::_updateBytesCRC32C = generate_CRC32_updateBytes(true);
     }
   }
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -38,14 +38,7 @@
 };
 
 // CRC32 Intrinsics.
-#define CRC32_COLUMN_SIZE 256
-#define CRC32_BYFOUR
-#ifdef  CRC32_BYFOUR
-  #define CRC32_TABLES 8
-#else
-  #define CRC32_TABLES 1
-#endif
-
+#define CRC32_TABLE_SIZE (4 * 256)
 #define REVERSE_CRC32_POLY  0xEDB88320
 #define REVERSE_CRC32C_POLY 0x82F63B78
 #define INVERSE_REVERSE_CRC32_POLY  0x1aab14226ull
@@ -53,24 +46,6 @@
 #define CRC32_UNROLL_FACTOR 2048
 #define CRC32_UNROLL_FACTOR2 8
 
-
-class ppc64 {
- friend class StubGenerator;
-
- private:
-
-  // CRC32 Intrinsics.
-  static juint _crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
-  static juint _crc32c_table[CRC32_TABLES][CRC32_COLUMN_SIZE];
-  static juint *_crc_constants;
-  static juint *_crc32c_constants;
-
- public:
-
-  // CRC32 Intrinsics.
-  static address crc_constants() { return (address)_crc_constants; }
-  static address crc32c_constants() { return (address)_crc32c_constants; }
-  static juint* generate_crc_constants(juint reverse_poly);
-};
+static address generate_crc_constants(juint reverse_poly);
 
 #endif // CPU_PPC_STUBROUTINES_PPC_HPP
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc_64.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -26,6 +26,7 @@
 #include "precompiled.hpp"
 #include "asm/macroAssembler.inline.hpp"
 #include "runtime/stubRoutines.hpp"
+#include "runtime/vm_version.hpp"
 
 // Implementation of the platform-specific part of StubRoutines - for
 // a description of how to extend it, see the stubRoutines.hpp file.
@@ -34,6 +35,14 @@
 #define __ masm->
 
 // CRC constant compute functions
+static juint fold_byte(juint w, juint reverse_poly) {
+  for (int i = 0; i < 8; i++) {
+    int poly_if_odd = (-(w & 1)) & reverse_poly;
+    w = (w >> 1) ^ poly_if_odd;
+  }
+  return w;
+}
+
 static juint fold_word(juint w, juint reverse_poly) {
   for (int i = 0; i < 32; i++) {
     int poly_if_odd = (-(w & 1)) & reverse_poly;
@@ -64,11 +73,71 @@
   return div;
 }
 
+#ifndef VM_LITTLE_ENDIAN
+static void reverse_bytes(juint &w) {
+  w = ((w >> 24) & 0xFF) | (((w >> 16) & 0xFF) << 8) | (((w >> 8) & 0xFF) << 16) | ((w & 0xFF) << 24);
+}
+#endif
+
 // Constants to fold n words as needed by macroAssembler.
-juint* StubRoutines::ppc64::generate_crc_constants(juint reverse_poly) {
-  juint* ptr = (juint*) malloc(sizeof(juint) * 4 * (CRC32_UNROLL_FACTOR2 + CRC32_UNROLL_FACTOR / CRC32_UNROLL_FACTOR2));
-  guarantee(((intptr_t)ptr & 0xF) == 0, "16-byte alignment needed");
-  guarantee(ptr != NULL, "allocation error of a crc table");
+address StubRoutines::generate_crc_constants(juint reverse_poly) {
+  // Layout of constant table:
+  // <= Power7 Little Endian: 4 tables for byte folding
+  // <= Power7 Big Endian: 1 table for single byte folding + 4 tables for multi-byte folding
+  // >= Power8: 1 table for single byte folding + constants for fast vector implementation
+  const bool use_vector = VM_Version::has_vpmsumb();
+  const int vector_size = 16 * (CRC32_UNROLL_FACTOR2 + CRC32_UNROLL_FACTOR / CRC32_UNROLL_FACTOR2);
+
+  const int size = use_vector ? CRC32_TABLE_SIZE + vector_size : (4 BIG_ENDIAN_ONLY(+1)) * CRC32_TABLE_SIZE;
+  const address consts = (address)malloc(size);
+  if (consts == NULL) {
+    vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CRC constants: no enough space");
+  }
+  juint* ptr = (juint*)consts;
+
+  // Simple table used for single byte folding
+  LITTLE_ENDIAN_ONLY(if (use_vector)) {
+    for (int i = 0; i < 256; ++i) {
+      ptr[i] = fold_byte(i, reverse_poly);
+    }
+  }
+
+  if (!use_vector) {
+    BIG_ENDIAN_ONLY(ptr = (juint*)(consts + CRC32_TABLE_SIZE);)
+    // <= Power7: 4 tables
+    for (int i = 0; i < 256; ++i) {
+      juint a = fold_byte(i, reverse_poly),
+            b = fold_byte(a, reverse_poly),
+            c = fold_byte(b, reverse_poly),
+            d = fold_byte(c, reverse_poly);
+#ifndef VM_LITTLE_ENDIAN
+      reverse_bytes(a);
+      reverse_bytes(b);
+      reverse_bytes(c);
+      reverse_bytes(d);
+#endif
+      ptr[i         ] = a;
+      ptr[i +    256] = b;
+      ptr[i + 2* 256] = c;
+      ptr[i + 3* 256] = d;
+    }
+#if 0
+    for (int i = 0; i < 4; ++i) {
+      tty->print_cr("table %d:", i);
+      for (int j = 0; j < 32; ++j) {
+        for (int k = 0; k < 8; ++k) {
+          tty->print("%08x ", ptr[i*256 + j*8 + k]);
+        }
+        tty->cr();
+      }
+    }
+#endif
+    return consts;
+  }
+
+  // >= Power8: vector constants
+  juint* ptr1 = (juint*)(consts + CRC32_TABLE_SIZE);
+  guarantee(((intptr_t)ptr1 & 0xF) == 0, "16-byte alignment needed");
 
   // Generate constants for outer loop
   juint v0, v1, v2, v3 = 1;
@@ -78,20 +147,20 @@
     v2 = fold_word(v1, reverse_poly);
     v3 = fold_word(v2, reverse_poly);
 #ifdef VM_LITTLE_ENDIAN
-    ptr[4*i  ] = v3;
-    ptr[4*i+1] = v2;
-    ptr[4*i+2] = v3;
-    ptr[4*i+3] = v2;
+    ptr1[4*i  ] = v3;
+    ptr1[4*i+1] = v2;
+    ptr1[4*i+2] = v3;
+    ptr1[4*i+3] = v2;
 #else
-    ptr[4*i  ] = v2;
-    ptr[4*i+1] = v3;
-    ptr[4*i+2] = v2;
-    ptr[4*i+3] = v3;
+    ptr1[4*i  ] = v2;
+    ptr1[4*i+1] = v3;
+    ptr1[4*i+2] = v2;
+    ptr1[4*i+3] = v3;
 #endif
   }
 
   // Generate constants for inner loop
-  juint* ptr2 = ptr + 4 * (CRC32_UNROLL_FACTOR2 - 1);
+  juint* ptr2 = ptr1 + 4 * (CRC32_UNROLL_FACTOR2 - 1);
   v3 = 1; // Restart from scratch.
   for (int i = 0; i < CRC32_UNROLL_FACTOR; ++i) {
     v0 = fold_word(v3, reverse_poly);
@@ -139,600 +208,5 @@
 
   //printf("inv poly: 0x%016llx\n", (long long unsigned int)inverse_long_poly);
 
-  return ptr;
+  return consts;
 }
-
-// CRC32 Intrinsics.
-/**
- *  crc_table[] from jdk/src/share/native/java/util/zip/zlib-1.2.8/crc32.h
- */
-juint StubRoutines::ppc64::_crc_table[CRC32_TABLES][CRC32_COLUMN_SIZE] = {
-    /* polyBits = 7976584769 0x00000001db710641L, shifted = 0xedb88320 */
-    /* CRC32 table for single bytes, auto-generated.  DO NOT MODIFY!  */
-    /* CRC32 table 0 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x77073096U, 0xee0e612cU, 0x990951baU, 0x076dc419U, 0x706af48fU, 0xe963a535U, 0x9e6495a3U
-      /* 8 */  , 0x0edb8832U, 0x79dcb8a4U, 0xe0d5e91eU, 0x97d2d988U, 0x09b64c2bU, 0x7eb17cbdU, 0xe7b82d07U, 0x90bf1d91U
-      /* 16 */  , 0x1db71064U, 0x6ab020f2U, 0xf3b97148U, 0x84be41deU, 0x1adad47dU, 0x6ddde4ebU, 0xf4d4b551U, 0x83d385c7U
-      /* 24 */  , 0x136c9856U, 0x646ba8c0U, 0xfd62f97aU, 0x8a65c9ecU, 0x14015c4fU, 0x63066cd9U, 0xfa0f3d63U, 0x8d080df5U
-      /* 32 */  , 0x3b6e20c8U, 0x4c69105eU, 0xd56041e4U, 0xa2677172U, 0x3c03e4d1U, 0x4b04d447U, 0xd20d85fdU, 0xa50ab56bU
-      /* 40 */  , 0x35b5a8faU, 0x42b2986cU, 0xdbbbc9d6U, 0xacbcf940U, 0x32d86ce3U, 0x45df5c75U, 0xdcd60dcfU, 0xabd13d59U
-      /* 48 */  , 0x26d930acU, 0x51de003aU, 0xc8d75180U, 0xbfd06116U, 0x21b4f4b5U, 0x56b3c423U, 0xcfba9599U, 0xb8bda50fU
-      /* 56 */  , 0x2802b89eU, 0x5f058808U, 0xc60cd9b2U, 0xb10be924U, 0x2f6f7c87U, 0x58684c11U, 0xc1611dabU, 0xb6662d3dU
-      /* 64 */  , 0x76dc4190U, 0x01db7106U, 0x98d220bcU, 0xefd5102aU, 0x71b18589U, 0x06b6b51fU, 0x9fbfe4a5U, 0xe8b8d433U
-      /* 72 */  , 0x7807c9a2U, 0x0f00f934U, 0x9609a88eU, 0xe10e9818U, 0x7f6a0dbbU, 0x086d3d2dU, 0x91646c97U, 0xe6635c01U
-      /* 80 */  , 0x6b6b51f4U, 0x1c6c6162U, 0x856530d8U, 0xf262004eU, 0x6c0695edU, 0x1b01a57bU, 0x8208f4c1U, 0xf50fc457U
-      /* 88 */  , 0x65b0d9c6U, 0x12b7e950U, 0x8bbeb8eaU, 0xfcb9887cU, 0x62dd1ddfU, 0x15da2d49U, 0x8cd37cf3U, 0xfbd44c65U
-      /* 96 */  , 0x4db26158U, 0x3ab551ceU, 0xa3bc0074U, 0xd4bb30e2U, 0x4adfa541U, 0x3dd895d7U, 0xa4d1c46dU, 0xd3d6f4fbU
-      /* 104 */  , 0x4369e96aU, 0x346ed9fcU, 0xad678846U, 0xda60b8d0U, 0x44042d73U, 0x33031de5U, 0xaa0a4c5fU, 0xdd0d7cc9U
-      /* 112 */  , 0x5005713cU, 0x270241aaU, 0xbe0b1010U, 0xc90c2086U, 0x5768b525U, 0x206f85b3U, 0xb966d409U, 0xce61e49fU
-      /* 120 */  , 0x5edef90eU, 0x29d9c998U, 0xb0d09822U, 0xc7d7a8b4U, 0x59b33d17U, 0x2eb40d81U, 0xb7bd5c3bU, 0xc0ba6cadU
-      /* 128 */  , 0xedb88320U, 0x9abfb3b6U, 0x03b6e20cU, 0x74b1d29aU, 0xead54739U, 0x9dd277afU, 0x04db2615U, 0x73dc1683U
-      /* 136 */  , 0xe3630b12U, 0x94643b84U, 0x0d6d6a3eU, 0x7a6a5aa8U, 0xe40ecf0bU, 0x9309ff9dU, 0x0a00ae27U, 0x7d079eb1U
-      /* 144 */  , 0xf00f9344U, 0x8708a3d2U, 0x1e01f268U, 0x6906c2feU, 0xf762575dU, 0x806567cbU, 0x196c3671U, 0x6e6b06e7U
-      /* 152 */  , 0xfed41b76U, 0x89d32be0U, 0x10da7a5aU, 0x67dd4accU, 0xf9b9df6fU, 0x8ebeeff9U, 0x17b7be43U, 0x60b08ed5U
-      /* 160 */  , 0xd6d6a3e8U, 0xa1d1937eU, 0x38d8c2c4U, 0x4fdff252U, 0xd1bb67f1U, 0xa6bc5767U, 0x3fb506ddU, 0x48b2364bU
-      /* 168 */  , 0xd80d2bdaU, 0xaf0a1b4cU, 0x36034af6U, 0x41047a60U, 0xdf60efc3U, 0xa867df55U, 0x316e8eefU, 0x4669be79U
-      /* 176 */  , 0xcb61b38cU, 0xbc66831aU, 0x256fd2a0U, 0x5268e236U, 0xcc0c7795U, 0xbb0b4703U, 0x220216b9U, 0x5505262fU
-      /* 184 */  , 0xc5ba3bbeU, 0xb2bd0b28U, 0x2bb45a92U, 0x5cb36a04U, 0xc2d7ffa7U, 0xb5d0cf31U, 0x2cd99e8bU, 0x5bdeae1dU
-      /* 192 */  , 0x9b64c2b0U, 0xec63f226U, 0x756aa39cU, 0x026d930aU, 0x9c0906a9U, 0xeb0e363fU, 0x72076785U, 0x05005713U
-      /* 200 */  , 0x95bf4a82U, 0xe2b87a14U, 0x7bb12baeU, 0x0cb61b38U, 0x92d28e9bU, 0xe5d5be0dU, 0x7cdcefb7U, 0x0bdbdf21U
-      /* 208 */  , 0x86d3d2d4U, 0xf1d4e242U, 0x68ddb3f8U, 0x1fda836eU, 0x81be16cdU, 0xf6b9265bU, 0x6fb077e1U, 0x18b74777U
-      /* 216 */  , 0x88085ae6U, 0xff0f6a70U, 0x66063bcaU, 0x11010b5cU, 0x8f659effU, 0xf862ae69U, 0x616bffd3U, 0x166ccf45U
-      /* 224 */  , 0xa00ae278U, 0xd70dd2eeU, 0x4e048354U, 0x3903b3c2U, 0xa7672661U, 0xd06016f7U, 0x4969474dU, 0x3e6e77dbU
-      /* 232 */  , 0xaed16a4aU, 0xd9d65adcU, 0x40df0b66U, 0x37d83bf0U, 0xa9bcae53U, 0xdebb9ec5U, 0x47b2cf7fU, 0x30b5ffe9U
-      /* 240 */  , 0xbdbdf21cU, 0xcabac28aU, 0x53b39330U, 0x24b4a3a6U, 0xbad03605U, 0xcdd70693U, 0x54de5729U, 0x23d967bfU
-      /* 248 */  , 0xb3667a2eU, 0xc4614ab8U, 0x5d681b02U, 0x2a6f2b94U, 0xb40bbe37U, 0xc30c8ea1U, 0x5a05df1bU, 0x2d02ef8dU
-    }
-  #ifdef  CRC32_BYFOUR
-    ,
-    /* CRC32 table 1 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x191b3141U, 0x32366282U, 0x2b2d53c3U, 0x646cc504U, 0x7d77f445U, 0x565aa786U, 0x4f4196c7U
-      /* 8 */  , 0xc8d98a08U, 0xd1c2bb49U, 0xfaefe88aU, 0xe3f4d9cbU, 0xacb54f0cU, 0xb5ae7e4dU, 0x9e832d8eU, 0x87981ccfU
-      /* 16 */  , 0x4ac21251U, 0x53d92310U, 0x78f470d3U, 0x61ef4192U, 0x2eaed755U, 0x37b5e614U, 0x1c98b5d7U, 0x05838496U
-      /* 24 */  , 0x821b9859U, 0x9b00a918U, 0xb02dfadbU, 0xa936cb9aU, 0xe6775d5dU, 0xff6c6c1cU, 0xd4413fdfU, 0xcd5a0e9eU
-      /* 32 */  , 0x958424a2U, 0x8c9f15e3U, 0xa7b24620U, 0xbea97761U, 0xf1e8e1a6U, 0xe8f3d0e7U, 0xc3de8324U, 0xdac5b265U
-      /* 40 */  , 0x5d5daeaaU, 0x44469febU, 0x6f6bcc28U, 0x7670fd69U, 0x39316baeU, 0x202a5aefU, 0x0b07092cU, 0x121c386dU
-      /* 48 */  , 0xdf4636f3U, 0xc65d07b2U, 0xed705471U, 0xf46b6530U, 0xbb2af3f7U, 0xa231c2b6U, 0x891c9175U, 0x9007a034U
-      /* 56 */  , 0x179fbcfbU, 0x0e848dbaU, 0x25a9de79U, 0x3cb2ef38U, 0x73f379ffU, 0x6ae848beU, 0x41c51b7dU, 0x58de2a3cU
-      /* 64 */  , 0xf0794f05U, 0xe9627e44U, 0xc24f2d87U, 0xdb541cc6U, 0x94158a01U, 0x8d0ebb40U, 0xa623e883U, 0xbf38d9c2U
-      /* 72 */  , 0x38a0c50dU, 0x21bbf44cU, 0x0a96a78fU, 0x138d96ceU, 0x5ccc0009U, 0x45d73148U, 0x6efa628bU, 0x77e153caU
-      /* 80 */  , 0xbabb5d54U, 0xa3a06c15U, 0x888d3fd6U, 0x91960e97U, 0xded79850U, 0xc7cca911U, 0xece1fad2U, 0xf5facb93U
-      /* 88 */  , 0x7262d75cU, 0x6b79e61dU, 0x4054b5deU, 0x594f849fU, 0x160e1258U, 0x0f152319U, 0x243870daU, 0x3d23419bU
-      /* 96 */  , 0x65fd6ba7U, 0x7ce65ae6U, 0x57cb0925U, 0x4ed03864U, 0x0191aea3U, 0x188a9fe2U, 0x33a7cc21U, 0x2abcfd60U
-      /* 104 */  , 0xad24e1afU, 0xb43fd0eeU, 0x9f12832dU, 0x8609b26cU, 0xc94824abU, 0xd05315eaU, 0xfb7e4629U, 0xe2657768U
-      /* 112 */  , 0x2f3f79f6U, 0x362448b7U, 0x1d091b74U, 0x04122a35U, 0x4b53bcf2U, 0x52488db3U, 0x7965de70U, 0x607eef31U
-      /* 120 */  , 0xe7e6f3feU, 0xfefdc2bfU, 0xd5d0917cU, 0xcccba03dU, 0x838a36faU, 0x9a9107bbU, 0xb1bc5478U, 0xa8a76539U
-      /* 128 */  , 0x3b83984bU, 0x2298a90aU, 0x09b5fac9U, 0x10aecb88U, 0x5fef5d4fU, 0x46f46c0eU, 0x6dd93fcdU, 0x74c20e8cU
-      /* 136 */  , 0xf35a1243U, 0xea412302U, 0xc16c70c1U, 0xd8774180U, 0x9736d747U, 0x8e2de606U, 0xa500b5c5U, 0xbc1b8484U
-      /* 144 */  , 0x71418a1aU, 0x685abb5bU, 0x4377e898U, 0x5a6cd9d9U, 0x152d4f1eU, 0x0c367e5fU, 0x271b2d9cU, 0x3e001cddU
-      /* 152 */  , 0xb9980012U, 0xa0833153U, 0x8bae6290U, 0x92b553d1U, 0xddf4c516U, 0xc4eff457U, 0xefc2a794U, 0xf6d996d5U
-      /* 160 */  , 0xae07bce9U, 0xb71c8da8U, 0x9c31de6bU, 0x852aef2aU, 0xca6b79edU, 0xd37048acU, 0xf85d1b6fU, 0xe1462a2eU
-      /* 168 */  , 0x66de36e1U, 0x7fc507a0U, 0x54e85463U, 0x4df36522U, 0x02b2f3e5U, 0x1ba9c2a4U, 0x30849167U, 0x299fa026U
-      /* 176 */  , 0xe4c5aeb8U, 0xfdde9ff9U, 0xd6f3cc3aU, 0xcfe8fd7bU, 0x80a96bbcU, 0x99b25afdU, 0xb29f093eU, 0xab84387fU
-      /* 184 */  , 0x2c1c24b0U, 0x350715f1U, 0x1e2a4632U, 0x07317773U, 0x4870e1b4U, 0x516bd0f5U, 0x7a468336U, 0x635db277U
-      /* 192 */  , 0xcbfad74eU, 0xd2e1e60fU, 0xf9ccb5ccU, 0xe0d7848dU, 0xaf96124aU, 0xb68d230bU, 0x9da070c8U, 0x84bb4189U
-      /* 200 */  , 0x03235d46U, 0x1a386c07U, 0x31153fc4U, 0x280e0e85U, 0x674f9842U, 0x7e54a903U, 0x5579fac0U, 0x4c62cb81U
-      /* 208 */  , 0x8138c51fU, 0x9823f45eU, 0xb30ea79dU, 0xaa1596dcU, 0xe554001bU, 0xfc4f315aU, 0xd7626299U, 0xce7953d8U
-      /* 216 */  , 0x49e14f17U, 0x50fa7e56U, 0x7bd72d95U, 0x62cc1cd4U, 0x2d8d8a13U, 0x3496bb52U, 0x1fbbe891U, 0x06a0d9d0U
-      /* 224 */  , 0x5e7ef3ecU, 0x4765c2adU, 0x6c48916eU, 0x7553a02fU, 0x3a1236e8U, 0x230907a9U, 0x0824546aU, 0x113f652bU
-      /* 232 */  , 0x96a779e4U, 0x8fbc48a5U, 0xa4911b66U, 0xbd8a2a27U, 0xf2cbbce0U, 0xebd08da1U, 0xc0fdde62U, 0xd9e6ef23U
-      /* 240 */  , 0x14bce1bdU, 0x0da7d0fcU, 0x268a833fU, 0x3f91b27eU, 0x70d024b9U, 0x69cb15f8U, 0x42e6463bU, 0x5bfd777aU
-      /* 248 */  , 0xdc656bb5U, 0xc57e5af4U, 0xee530937U, 0xf7483876U, 0xb809aeb1U, 0xa1129ff0U, 0x8a3fcc33U, 0x9324fd72U
-    }
-    ,
-    /* CRC32 table 2 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x01c26a37U, 0x0384d46eU, 0x0246be59U, 0x0709a8dcU, 0x06cbc2ebU, 0x048d7cb2U, 0x054f1685U
-      /* 8 */  , 0x0e1351b8U, 0x0fd13b8fU, 0x0d9785d6U, 0x0c55efe1U, 0x091af964U, 0x08d89353U, 0x0a9e2d0aU, 0x0b5c473dU
-      /* 16 */  , 0x1c26a370U, 0x1de4c947U, 0x1fa2771eU, 0x1e601d29U, 0x1b2f0bacU, 0x1aed619bU, 0x18abdfc2U, 0x1969b5f5U
-      /* 24 */  , 0x1235f2c8U, 0x13f798ffU, 0x11b126a6U, 0x10734c91U, 0x153c5a14U, 0x14fe3023U, 0x16b88e7aU, 0x177ae44dU
-      /* 32 */  , 0x384d46e0U, 0x398f2cd7U, 0x3bc9928eU, 0x3a0bf8b9U, 0x3f44ee3cU, 0x3e86840bU, 0x3cc03a52U, 0x3d025065U
-      /* 40 */  , 0x365e1758U, 0x379c7d6fU, 0x35dac336U, 0x3418a901U, 0x3157bf84U, 0x3095d5b3U, 0x32d36beaU, 0x331101ddU
-      /* 48 */  , 0x246be590U, 0x25a98fa7U, 0x27ef31feU, 0x262d5bc9U, 0x23624d4cU, 0x22a0277bU, 0x20e69922U, 0x2124f315U
-      /* 56 */  , 0x2a78b428U, 0x2bbade1fU, 0x29fc6046U, 0x283e0a71U, 0x2d711cf4U, 0x2cb376c3U, 0x2ef5c89aU, 0x2f37a2adU
-      /* 64 */  , 0x709a8dc0U, 0x7158e7f7U, 0x731e59aeU, 0x72dc3399U, 0x7793251cU, 0x76514f2bU, 0x7417f172U, 0x75d59b45U
-      /* 72 */  , 0x7e89dc78U, 0x7f4bb64fU, 0x7d0d0816U, 0x7ccf6221U, 0x798074a4U, 0x78421e93U, 0x7a04a0caU, 0x7bc6cafdU
-      /* 80 */  , 0x6cbc2eb0U, 0x6d7e4487U, 0x6f38fadeU, 0x6efa90e9U, 0x6bb5866cU, 0x6a77ec5bU, 0x68315202U, 0x69f33835U
-      /* 88 */  , 0x62af7f08U, 0x636d153fU, 0x612bab66U, 0x60e9c151U, 0x65a6d7d4U, 0x6464bde3U, 0x662203baU, 0x67e0698dU
-      /* 96 */  , 0x48d7cb20U, 0x4915a117U, 0x4b531f4eU, 0x4a917579U, 0x4fde63fcU, 0x4e1c09cbU, 0x4c5ab792U, 0x4d98dda5U
-      /* 104 */  , 0x46c49a98U, 0x4706f0afU, 0x45404ef6U, 0x448224c1U, 0x41cd3244U, 0x400f5873U, 0x4249e62aU, 0x438b8c1dU
-      /* 112 */  , 0x54f16850U, 0x55330267U, 0x5775bc3eU, 0x56b7d609U, 0x53f8c08cU, 0x523aaabbU, 0x507c14e2U, 0x51be7ed5U
-      /* 120 */  , 0x5ae239e8U, 0x5b2053dfU, 0x5966ed86U, 0x58a487b1U, 0x5deb9134U, 0x5c29fb03U, 0x5e6f455aU, 0x5fad2f6dU
-      /* 128 */  , 0xe1351b80U, 0xe0f771b7U, 0xe2b1cfeeU, 0xe373a5d9U, 0xe63cb35cU, 0xe7fed96bU, 0xe5b86732U, 0xe47a0d05U
-      /* 136 */  , 0xef264a38U, 0xeee4200fU, 0xeca29e56U, 0xed60f461U, 0xe82fe2e4U, 0xe9ed88d3U, 0xebab368aU, 0xea695cbdU
-      /* 144 */  , 0xfd13b8f0U, 0xfcd1d2c7U, 0xfe976c9eU, 0xff5506a9U, 0xfa1a102cU, 0xfbd87a1bU, 0xf99ec442U, 0xf85cae75U
-      /* 152 */  , 0xf300e948U, 0xf2c2837fU, 0xf0843d26U, 0xf1465711U, 0xf4094194U, 0xf5cb2ba3U, 0xf78d95faU, 0xf64fffcdU
-      /* 160 */  , 0xd9785d60U, 0xd8ba3757U, 0xdafc890eU, 0xdb3ee339U, 0xde71f5bcU, 0xdfb39f8bU, 0xddf521d2U, 0xdc374be5U
-      /* 168 */  , 0xd76b0cd8U, 0xd6a966efU, 0xd4efd8b6U, 0xd52db281U, 0xd062a404U, 0xd1a0ce33U, 0xd3e6706aU, 0xd2241a5dU
-      /* 176 */  , 0xc55efe10U, 0xc49c9427U, 0xc6da2a7eU, 0xc7184049U, 0xc25756ccU, 0xc3953cfbU, 0xc1d382a2U, 0xc011e895U
-      /* 184 */  , 0xcb4dafa8U, 0xca8fc59fU, 0xc8c97bc6U, 0xc90b11f1U, 0xcc440774U, 0xcd866d43U, 0xcfc0d31aU, 0xce02b92dU
-      /* 192 */  , 0x91af9640U, 0x906dfc77U, 0x922b422eU, 0x93e92819U, 0x96a63e9cU, 0x976454abU, 0x9522eaf2U, 0x94e080c5U
-      /* 200 */  , 0x9fbcc7f8U, 0x9e7eadcfU, 0x9c381396U, 0x9dfa79a1U, 0x98b56f24U, 0x99770513U, 0x9b31bb4aU, 0x9af3d17dU
-      /* 208 */  , 0x8d893530U, 0x8c4b5f07U, 0x8e0de15eU, 0x8fcf8b69U, 0x8a809decU, 0x8b42f7dbU, 0x89044982U, 0x88c623b5U
-      /* 216 */  , 0x839a6488U, 0x82580ebfU, 0x801eb0e6U, 0x81dcdad1U, 0x8493cc54U, 0x8551a663U, 0x8717183aU, 0x86d5720dU
-      /* 224 */  , 0xa9e2d0a0U, 0xa820ba97U, 0xaa6604ceU, 0xaba46ef9U, 0xaeeb787cU, 0xaf29124bU, 0xad6fac12U, 0xacadc625U
-      /* 232 */  , 0xa7f18118U, 0xa633eb2fU, 0xa4755576U, 0xa5b73f41U, 0xa0f829c4U, 0xa13a43f3U, 0xa37cfdaaU, 0xa2be979dU
-      /* 240 */  , 0xb5c473d0U, 0xb40619e7U, 0xb640a7beU, 0xb782cd89U, 0xb2cddb0cU, 0xb30fb13bU, 0xb1490f62U, 0xb08b6555U
-      /* 248 */  , 0xbbd72268U, 0xba15485fU, 0xb853f606U, 0xb9919c31U, 0xbcde8ab4U, 0xbd1ce083U, 0xbf5a5edaU, 0xbe9834edU
-    }
-    ,
-    /* CRC32 table 3 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0xb8bc6765U, 0xaa09c88bU, 0x12b5afeeU, 0x8f629757U, 0x37def032U, 0x256b5fdcU, 0x9dd738b9U
-      /* 8 */  , 0xc5b428efU, 0x7d084f8aU, 0x6fbde064U, 0xd7018701U, 0x4ad6bfb8U, 0xf26ad8ddU, 0xe0df7733U, 0x58631056U
-      /* 16 */  , 0x5019579fU, 0xe8a530faU, 0xfa109f14U, 0x42acf871U, 0xdf7bc0c8U, 0x67c7a7adU, 0x75720843U, 0xcdce6f26U
-      /* 24 */  , 0x95ad7f70U, 0x2d111815U, 0x3fa4b7fbU, 0x8718d09eU, 0x1acfe827U, 0xa2738f42U, 0xb0c620acU, 0x087a47c9U
-      /* 32 */  , 0xa032af3eU, 0x188ec85bU, 0x0a3b67b5U, 0xb28700d0U, 0x2f503869U, 0x97ec5f0cU, 0x8559f0e2U, 0x3de59787U
-      /* 40 */  , 0x658687d1U, 0xdd3ae0b4U, 0xcf8f4f5aU, 0x7733283fU, 0xeae41086U, 0x525877e3U, 0x40edd80dU, 0xf851bf68U
-      /* 48 */  , 0xf02bf8a1U, 0x48979fc4U, 0x5a22302aU, 0xe29e574fU, 0x7f496ff6U, 0xc7f50893U, 0xd540a77dU, 0x6dfcc018U
-      /* 56 */  , 0x359fd04eU, 0x8d23b72bU, 0x9f9618c5U, 0x272a7fa0U, 0xbafd4719U, 0x0241207cU, 0x10f48f92U, 0xa848e8f7U
-      /* 64 */  , 0x9b14583dU, 0x23a83f58U, 0x311d90b6U, 0x89a1f7d3U, 0x1476cf6aU, 0xaccaa80fU, 0xbe7f07e1U, 0x06c36084U
-      /* 72 */  , 0x5ea070d2U, 0xe61c17b7U, 0xf4a9b859U, 0x4c15df3cU, 0xd1c2e785U, 0x697e80e0U, 0x7bcb2f0eU, 0xc377486bU
-      /* 80 */  , 0xcb0d0fa2U, 0x73b168c7U, 0x6104c729U, 0xd9b8a04cU, 0x446f98f5U, 0xfcd3ff90U, 0xee66507eU, 0x56da371bU
-      /* 88 */  , 0x0eb9274dU, 0xb6054028U, 0xa4b0efc6U, 0x1c0c88a3U, 0x81dbb01aU, 0x3967d77fU, 0x2bd27891U, 0x936e1ff4U
-      /* 96 */  , 0x3b26f703U, 0x839a9066U, 0x912f3f88U, 0x299358edU, 0xb4446054U, 0x0cf80731U, 0x1e4da8dfU, 0xa6f1cfbaU
-      /* 104 */  , 0xfe92dfecU, 0x462eb889U, 0x549b1767U, 0xec277002U, 0x71f048bbU, 0xc94c2fdeU, 0xdbf98030U, 0x6345e755U
-      /* 112 */  , 0x6b3fa09cU, 0xd383c7f9U, 0xc1366817U, 0x798a0f72U, 0xe45d37cbU, 0x5ce150aeU, 0x4e54ff40U, 0xf6e89825U
-      /* 120 */  , 0xae8b8873U, 0x1637ef16U, 0x048240f8U, 0xbc3e279dU, 0x21e91f24U, 0x99557841U, 0x8be0d7afU, 0x335cb0caU
-      /* 128 */  , 0xed59b63bU, 0x55e5d15eU, 0x47507eb0U, 0xffec19d5U, 0x623b216cU, 0xda874609U, 0xc832e9e7U, 0x708e8e82U
-      /* 136 */  , 0x28ed9ed4U, 0x9051f9b1U, 0x82e4565fU, 0x3a58313aU, 0xa78f0983U, 0x1f336ee6U, 0x0d86c108U, 0xb53aa66dU
-      /* 144 */  , 0xbd40e1a4U, 0x05fc86c1U, 0x1749292fU, 0xaff54e4aU, 0x322276f3U, 0x8a9e1196U, 0x982bbe78U, 0x2097d91dU
-      /* 152 */  , 0x78f4c94bU, 0xc048ae2eU, 0xd2fd01c0U, 0x6a4166a5U, 0xf7965e1cU, 0x4f2a3979U, 0x5d9f9697U, 0xe523f1f2U
-      /* 160 */  , 0x4d6b1905U, 0xf5d77e60U, 0xe762d18eU, 0x5fdeb6ebU, 0xc2098e52U, 0x7ab5e937U, 0x680046d9U, 0xd0bc21bcU
-      /* 168 */  , 0x88df31eaU, 0x3063568fU, 0x22d6f961U, 0x9a6a9e04U, 0x07bda6bdU, 0xbf01c1d8U, 0xadb46e36U, 0x15080953U
-      /* 176 */  , 0x1d724e9aU, 0xa5ce29ffU, 0xb77b8611U, 0x0fc7e174U, 0x9210d9cdU, 0x2aacbea8U, 0x38191146U, 0x80a57623U
-      /* 184 */  , 0xd8c66675U, 0x607a0110U, 0x72cfaefeU, 0xca73c99bU, 0x57a4f122U, 0xef189647U, 0xfdad39a9U, 0x45115eccU
-      /* 192 */  , 0x764dee06U, 0xcef18963U, 0xdc44268dU, 0x64f841e8U, 0xf92f7951U, 0x41931e34U, 0x5326b1daU, 0xeb9ad6bfU
-      /* 200 */  , 0xb3f9c6e9U, 0x0b45a18cU, 0x19f00e62U, 0xa14c6907U, 0x3c9b51beU, 0x842736dbU, 0x96929935U, 0x2e2efe50U
-      /* 208 */  , 0x2654b999U, 0x9ee8defcU, 0x8c5d7112U, 0x34e11677U, 0xa9362eceU, 0x118a49abU, 0x033fe645U, 0xbb838120U
-      /* 216 */  , 0xe3e09176U, 0x5b5cf613U, 0x49e959fdU, 0xf1553e98U, 0x6c820621U, 0xd43e6144U, 0xc68bceaaU, 0x7e37a9cfU
-      /* 224 */  , 0xd67f4138U, 0x6ec3265dU, 0x7c7689b3U, 0xc4caeed6U, 0x591dd66fU, 0xe1a1b10aU, 0xf3141ee4U, 0x4ba87981U
-      /* 232 */  , 0x13cb69d7U, 0xab770eb2U, 0xb9c2a15cU, 0x017ec639U, 0x9ca9fe80U, 0x241599e5U, 0x36a0360bU, 0x8e1c516eU
-      /* 240 */  , 0x866616a7U, 0x3eda71c2U, 0x2c6fde2cU, 0x94d3b949U, 0x090481f0U, 0xb1b8e695U, 0xa30d497bU, 0x1bb12e1eU
-      /* 248 */  , 0x43d23e48U, 0xfb6e592dU, 0xe9dbf6c3U, 0x516791a6U, 0xccb0a91fU, 0x740cce7aU, 0x66b96194U, 0xde0506f1U
-    }
-    ,
-    /* CRC32 table 4 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x96300777U, 0x2c610eeeU, 0xba510999U, 0x19c46d07U, 0x8ff46a70U, 0x35a563e9U, 0xa395649eU
-      /* 8 */  , 0x3288db0eU, 0xa4b8dc79U, 0x1ee9d5e0U, 0x88d9d297U, 0x2b4cb609U, 0xbd7cb17eU, 0x072db8e7U, 0x911dbf90U
-      /* 16 */  , 0x6410b71dU, 0xf220b06aU, 0x4871b9f3U, 0xde41be84U, 0x7dd4da1aU, 0xebe4dd6dU, 0x51b5d4f4U, 0xc785d383U
-      /* 24 */  , 0x56986c13U, 0xc0a86b64U, 0x7af962fdU, 0xecc9658aU, 0x4f5c0114U, 0xd96c0663U, 0x633d0ffaU, 0xf50d088dU
-      /* 32 */  , 0xc8206e3bU, 0x5e10694cU, 0xe44160d5U, 0x727167a2U, 0xd1e4033cU, 0x47d4044bU, 0xfd850dd2U, 0x6bb50aa5U
-      /* 40 */  , 0xfaa8b535U, 0x6c98b242U, 0xd6c9bbdbU, 0x40f9bcacU, 0xe36cd832U, 0x755cdf45U, 0xcf0dd6dcU, 0x593dd1abU
-      /* 48 */  , 0xac30d926U, 0x3a00de51U, 0x8051d7c8U, 0x1661d0bfU, 0xb5f4b421U, 0x23c4b356U, 0x9995bacfU, 0x0fa5bdb8U
-      /* 56 */  , 0x9eb80228U, 0x0888055fU, 0xb2d90cc6U, 0x24e90bb1U, 0x877c6f2fU, 0x114c6858U, 0xab1d61c1U, 0x3d2d66b6U
-      /* 64 */  , 0x9041dc76U, 0x0671db01U, 0xbc20d298U, 0x2a10d5efU, 0x8985b171U, 0x1fb5b606U, 0xa5e4bf9fU, 0x33d4b8e8U
-      /* 72 */  , 0xa2c90778U, 0x34f9000fU, 0x8ea80996U, 0x18980ee1U, 0xbb0d6a7fU, 0x2d3d6d08U, 0x976c6491U, 0x015c63e6U
-      /* 80 */  , 0xf4516b6bU, 0x62616c1cU, 0xd8306585U, 0x4e0062f2U, 0xed95066cU, 0x7ba5011bU, 0xc1f40882U, 0x57c40ff5U
-      /* 88 */  , 0xc6d9b065U, 0x50e9b712U, 0xeab8be8bU, 0x7c88b9fcU, 0xdf1ddd62U, 0x492dda15U, 0xf37cd38cU, 0x654cd4fbU
-      /* 96 */  , 0x5861b24dU, 0xce51b53aU, 0x7400bca3U, 0xe230bbd4U, 0x41a5df4aU, 0xd795d83dU, 0x6dc4d1a4U, 0xfbf4d6d3U
-      /* 104 */  , 0x6ae96943U, 0xfcd96e34U, 0x468867adU, 0xd0b860daU, 0x732d0444U, 0xe51d0333U, 0x5f4c0aaaU, 0xc97c0dddU
-      /* 112 */  , 0x3c710550U, 0xaa410227U, 0x10100bbeU, 0x86200cc9U, 0x25b56857U, 0xb3856f20U, 0x09d466b9U, 0x9fe461ceU
-      /* 120 */  , 0x0ef9de5eU, 0x98c9d929U, 0x2298d0b0U, 0xb4a8d7c7U, 0x173db359U, 0x810db42eU, 0x3b5cbdb7U, 0xad6cbac0U
-      /* 128 */  , 0x2083b8edU, 0xb6b3bf9aU, 0x0ce2b603U, 0x9ad2b174U, 0x3947d5eaU, 0xaf77d29dU, 0x1526db04U, 0x8316dc73U
-      /* 136 */  , 0x120b63e3U, 0x843b6494U, 0x3e6a6d0dU, 0xa85a6a7aU, 0x0bcf0ee4U, 0x9dff0993U, 0x27ae000aU, 0xb19e077dU
-      /* 144 */  , 0x44930ff0U, 0xd2a30887U, 0x68f2011eU, 0xfec20669U, 0x5d5762f7U, 0xcb676580U, 0x71366c19U, 0xe7066b6eU
-      /* 152 */  , 0x761bd4feU, 0xe02bd389U, 0x5a7ada10U, 0xcc4add67U, 0x6fdfb9f9U, 0xf9efbe8eU, 0x43beb717U, 0xd58eb060U
-      /* 160 */  , 0xe8a3d6d6U, 0x7e93d1a1U, 0xc4c2d838U, 0x52f2df4fU, 0xf167bbd1U, 0x6757bca6U, 0xdd06b53fU, 0x4b36b248U
-      /* 168 */  , 0xda2b0dd8U, 0x4c1b0aafU, 0xf64a0336U, 0x607a0441U, 0xc3ef60dfU, 0x55df67a8U, 0xef8e6e31U, 0x79be6946U
-      /* 176 */  , 0x8cb361cbU, 0x1a8366bcU, 0xa0d26f25U, 0x36e26852U, 0x95770cccU, 0x03470bbbU, 0xb9160222U, 0x2f260555U
-      /* 184 */  , 0xbe3bbac5U, 0x280bbdb2U, 0x925ab42bU, 0x046ab35cU, 0xa7ffd7c2U, 0x31cfd0b5U, 0x8b9ed92cU, 0x1daede5bU
-      /* 192 */  , 0xb0c2649bU, 0x26f263ecU, 0x9ca36a75U, 0x0a936d02U, 0xa906099cU, 0x3f360eebU, 0x85670772U, 0x13570005U
-      /* 200 */  , 0x824abf95U, 0x147ab8e2U, 0xae2bb17bU, 0x381bb60cU, 0x9b8ed292U, 0x0dbed5e5U, 0xb7efdc7cU, 0x21dfdb0bU
-      /* 208 */  , 0xd4d2d386U, 0x42e2d4f1U, 0xf8b3dd68U, 0x6e83da1fU, 0xcd16be81U, 0x5b26b9f6U, 0xe177b06fU, 0x7747b718U
-      /* 216 */  , 0xe65a0888U, 0x706a0fffU, 0xca3b0666U, 0x5c0b0111U, 0xff9e658fU, 0x69ae62f8U, 0xd3ff6b61U, 0x45cf6c16U
-      /* 224 */  , 0x78e20aa0U, 0xeed20dd7U, 0x5483044eU, 0xc2b30339U, 0x612667a7U, 0xf71660d0U, 0x4d476949U, 0xdb776e3eU
-      /* 232 */  , 0x4a6ad1aeU, 0xdc5ad6d9U, 0x660bdf40U, 0xf03bd837U, 0x53aebca9U, 0xc59ebbdeU, 0x7fcfb247U, 0xe9ffb530U
-      /* 240 */  , 0x1cf2bdbdU, 0x8ac2bacaU, 0x3093b353U, 0xa6a3b424U, 0x0536d0baU, 0x9306d7cdU, 0x2957de54U, 0xbf67d923U
-      /* 248 */  , 0x2e7a66b3U, 0xb84a61c4U, 0x021b685dU, 0x942b6f2aU, 0x37be0bb4U, 0xa18e0cc3U, 0x1bdf055aU, 0x8def022dU
-    }
-    ,
-    /* CRC32 table 5 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x41311b19U, 0x82623632U, 0xc3532d2bU, 0x04c56c64U, 0x45f4777dU, 0x86a75a56U, 0xc796414fU
-      /* 8 */  , 0x088ad9c8U, 0x49bbc2d1U, 0x8ae8effaU, 0xcbd9f4e3U, 0x0c4fb5acU, 0x4d7eaeb5U, 0x8e2d839eU, 0xcf1c9887U
-      /* 16 */  , 0x5112c24aU, 0x1023d953U, 0xd370f478U, 0x9241ef61U, 0x55d7ae2eU, 0x14e6b537U, 0xd7b5981cU, 0x96848305U
-      /* 24 */  , 0x59981b82U, 0x18a9009bU, 0xdbfa2db0U, 0x9acb36a9U, 0x5d5d77e6U, 0x1c6c6cffU, 0xdf3f41d4U, 0x9e0e5acdU
-      /* 32 */  , 0xa2248495U, 0xe3159f8cU, 0x2046b2a7U, 0x6177a9beU, 0xa6e1e8f1U, 0xe7d0f3e8U, 0x2483dec3U, 0x65b2c5daU
-      /* 40 */  , 0xaaae5d5dU, 0xeb9f4644U, 0x28cc6b6fU, 0x69fd7076U, 0xae6b3139U, 0xef5a2a20U, 0x2c09070bU, 0x6d381c12U
-      /* 48 */  , 0xf33646dfU, 0xb2075dc6U, 0x715470edU, 0x30656bf4U, 0xf7f32abbU, 0xb6c231a2U, 0x75911c89U, 0x34a00790U
-      /* 56 */  , 0xfbbc9f17U, 0xba8d840eU, 0x79dea925U, 0x38efb23cU, 0xff79f373U, 0xbe48e86aU, 0x7d1bc541U, 0x3c2ade58U
-      /* 64 */  , 0x054f79f0U, 0x447e62e9U, 0x872d4fc2U, 0xc61c54dbU, 0x018a1594U, 0x40bb0e8dU, 0x83e823a6U, 0xc2d938bfU
-      /* 72 */  , 0x0dc5a038U, 0x4cf4bb21U, 0x8fa7960aU, 0xce968d13U, 0x0900cc5cU, 0x4831d745U, 0x8b62fa6eU, 0xca53e177U
-      /* 80 */  , 0x545dbbbaU, 0x156ca0a3U, 0xd63f8d88U, 0x970e9691U, 0x5098d7deU, 0x11a9ccc7U, 0xd2fae1ecU, 0x93cbfaf5U
-      /* 88 */  , 0x5cd76272U, 0x1de6796bU, 0xdeb55440U, 0x9f844f59U, 0x58120e16U, 0x1923150fU, 0xda703824U, 0x9b41233dU
-      /* 96 */  , 0xa76bfd65U, 0xe65ae67cU, 0x2509cb57U, 0x6438d04eU, 0xa3ae9101U, 0xe29f8a18U, 0x21cca733U, 0x60fdbc2aU
-      /* 104 */  , 0xafe124adU, 0xeed03fb4U, 0x2d83129fU, 0x6cb20986U, 0xab2448c9U, 0xea1553d0U, 0x29467efbU, 0x687765e2U
-      /* 112 */  , 0xf6793f2fU, 0xb7482436U, 0x741b091dU, 0x352a1204U, 0xf2bc534bU, 0xb38d4852U, 0x70de6579U, 0x31ef7e60U
-      /* 120 */  , 0xfef3e6e7U, 0xbfc2fdfeU, 0x7c91d0d5U, 0x3da0cbccU, 0xfa368a83U, 0xbb07919aU, 0x7854bcb1U, 0x3965a7a8U
-      /* 128 */  , 0x4b98833bU, 0x0aa99822U, 0xc9fab509U, 0x88cbae10U, 0x4f5def5fU, 0x0e6cf446U, 0xcd3fd96dU, 0x8c0ec274U
-      /* 136 */  , 0x43125af3U, 0x022341eaU, 0xc1706cc1U, 0x804177d8U, 0x47d73697U, 0x06e62d8eU, 0xc5b500a5U, 0x84841bbcU
-      /* 144 */  , 0x1a8a4171U, 0x5bbb5a68U, 0x98e87743U, 0xd9d96c5aU, 0x1e4f2d15U, 0x5f7e360cU, 0x9c2d1b27U, 0xdd1c003eU
-      /* 152 */  , 0x120098b9U, 0x533183a0U, 0x9062ae8bU, 0xd153b592U, 0x16c5f4ddU, 0x57f4efc4U, 0x94a7c2efU, 0xd596d9f6U
-      /* 160 */  , 0xe9bc07aeU, 0xa88d1cb7U, 0x6bde319cU, 0x2aef2a85U, 0xed796bcaU, 0xac4870d3U, 0x6f1b5df8U, 0x2e2a46e1U
-      /* 168 */  , 0xe136de66U, 0xa007c57fU, 0x6354e854U, 0x2265f34dU, 0xe5f3b202U, 0xa4c2a91bU, 0x67918430U, 0x26a09f29U
-      /* 176 */  , 0xb8aec5e4U, 0xf99fdefdU, 0x3accf3d6U, 0x7bfde8cfU, 0xbc6ba980U, 0xfd5ab299U, 0x3e099fb2U, 0x7f3884abU
-      /* 184 */  , 0xb0241c2cU, 0xf1150735U, 0x32462a1eU, 0x73773107U, 0xb4e17048U, 0xf5d06b51U, 0x3683467aU, 0x77b25d63U
-      /* 192 */  , 0x4ed7facbU, 0x0fe6e1d2U, 0xccb5ccf9U, 0x8d84d7e0U, 0x4a1296afU, 0x0b238db6U, 0xc870a09dU, 0x8941bb84U
-      /* 200 */  , 0x465d2303U, 0x076c381aU, 0xc43f1531U, 0x850e0e28U, 0x42984f67U, 0x03a9547eU, 0xc0fa7955U, 0x81cb624cU
-      /* 208 */  , 0x1fc53881U, 0x5ef42398U, 0x9da70eb3U, 0xdc9615aaU, 0x1b0054e5U, 0x5a314ffcU, 0x996262d7U, 0xd85379ceU
-      /* 216 */  , 0x174fe149U, 0x567efa50U, 0x952dd77bU, 0xd41ccc62U, 0x138a8d2dU, 0x52bb9634U, 0x91e8bb1fU, 0xd0d9a006U
-      /* 224 */  , 0xecf37e5eU, 0xadc26547U, 0x6e91486cU, 0x2fa05375U, 0xe836123aU, 0xa9070923U, 0x6a542408U, 0x2b653f11U
-      /* 232 */  , 0xe479a796U, 0xa548bc8fU, 0x661b91a4U, 0x272a8abdU, 0xe0bccbf2U, 0xa18dd0ebU, 0x62defdc0U, 0x23efe6d9U
-      /* 240 */  , 0xbde1bc14U, 0xfcd0a70dU, 0x3f838a26U, 0x7eb2913fU, 0xb924d070U, 0xf815cb69U, 0x3b46e642U, 0x7a77fd5bU
-      /* 248 */  , 0xb56b65dcU, 0xf45a7ec5U, 0x370953eeU, 0x763848f7U, 0xb1ae09b8U, 0xf09f12a1U, 0x33cc3f8aU, 0x72fd2493U
-    }
-    ,
-    /* CRC32 table 6 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x376ac201U, 0x6ed48403U, 0x59be4602U, 0xdca80907U, 0xebc2cb06U, 0xb27c8d04U, 0x85164f05U
-      /* 8 */  , 0xb851130eU, 0x8f3bd10fU, 0xd685970dU, 0xe1ef550cU, 0x64f91a09U, 0x5393d808U, 0x0a2d9e0aU, 0x3d475c0bU
-      /* 16 */  , 0x70a3261cU, 0x47c9e41dU, 0x1e77a21fU, 0x291d601eU, 0xac0b2f1bU, 0x9b61ed1aU, 0xc2dfab18U, 0xf5b56919U
-      /* 24 */  , 0xc8f23512U, 0xff98f713U, 0xa626b111U, 0x914c7310U, 0x145a3c15U, 0x2330fe14U, 0x7a8eb816U, 0x4de47a17U
-      /* 32 */  , 0xe0464d38U, 0xd72c8f39U, 0x8e92c93bU, 0xb9f80b3aU, 0x3cee443fU, 0x0b84863eU, 0x523ac03cU, 0x6550023dU
-      /* 40 */  , 0x58175e36U, 0x6f7d9c37U, 0x36c3da35U, 0x01a91834U, 0x84bf5731U, 0xb3d59530U, 0xea6bd332U, 0xdd011133U
-      /* 48 */  , 0x90e56b24U, 0xa78fa925U, 0xfe31ef27U, 0xc95b2d26U, 0x4c4d6223U, 0x7b27a022U, 0x2299e620U, 0x15f32421U
-      /* 56 */  , 0x28b4782aU, 0x1fdeba2bU, 0x4660fc29U, 0x710a3e28U, 0xf41c712dU, 0xc376b32cU, 0x9ac8f52eU, 0xada2372fU
-      /* 64 */  , 0xc08d9a70U, 0xf7e75871U, 0xae591e73U, 0x9933dc72U, 0x1c259377U, 0x2b4f5176U, 0x72f11774U, 0x459bd575U
-      /* 72 */  , 0x78dc897eU, 0x4fb64b7fU, 0x16080d7dU, 0x2162cf7cU, 0xa4748079U, 0x931e4278U, 0xcaa0047aU, 0xfdcac67bU
-      /* 80 */  , 0xb02ebc6cU, 0x87447e6dU, 0xdefa386fU, 0xe990fa6eU, 0x6c86b56bU, 0x5bec776aU, 0x02523168U, 0x3538f369U
-      /* 88 */  , 0x087faf62U, 0x3f156d63U, 0x66ab2b61U, 0x51c1e960U, 0xd4d7a665U, 0xe3bd6464U, 0xba032266U, 0x8d69e067U
-      /* 96 */  , 0x20cbd748U, 0x17a11549U, 0x4e1f534bU, 0x7975914aU, 0xfc63de4fU, 0xcb091c4eU, 0x92b75a4cU, 0xa5dd984dU
-      /* 104 */  , 0x989ac446U, 0xaff00647U, 0xf64e4045U, 0xc1248244U, 0x4432cd41U, 0x73580f40U, 0x2ae64942U, 0x1d8c8b43U
-      /* 112 */  , 0x5068f154U, 0x67023355U, 0x3ebc7557U, 0x09d6b756U, 0x8cc0f853U, 0xbbaa3a52U, 0xe2147c50U, 0xd57ebe51U
-      /* 120 */  , 0xe839e25aU, 0xdf53205bU, 0x86ed6659U, 0xb187a458U, 0x3491eb5dU, 0x03fb295cU, 0x5a456f5eU, 0x6d2fad5fU
-      /* 128 */  , 0x801b35e1U, 0xb771f7e0U, 0xeecfb1e2U, 0xd9a573e3U, 0x5cb33ce6U, 0x6bd9fee7U, 0x3267b8e5U, 0x050d7ae4U
-      /* 136 */  , 0x384a26efU, 0x0f20e4eeU, 0x569ea2ecU, 0x61f460edU, 0xe4e22fe8U, 0xd388ede9U, 0x8a36abebU, 0xbd5c69eaU
-      /* 144 */  , 0xf0b813fdU, 0xc7d2d1fcU, 0x9e6c97feU, 0xa90655ffU, 0x2c101afaU, 0x1b7ad8fbU, 0x42c49ef9U, 0x75ae5cf8U
-      /* 152 */  , 0x48e900f3U, 0x7f83c2f2U, 0x263d84f0U, 0x115746f1U, 0x944109f4U, 0xa32bcbf5U, 0xfa958df7U, 0xcdff4ff6U
-      /* 160 */  , 0x605d78d9U, 0x5737bad8U, 0x0e89fcdaU, 0x39e33edbU, 0xbcf571deU, 0x8b9fb3dfU, 0xd221f5ddU, 0xe54b37dcU
-      /* 168 */  , 0xd80c6bd7U, 0xef66a9d6U, 0xb6d8efd4U, 0x81b22dd5U, 0x04a462d0U, 0x33cea0d1U, 0x6a70e6d3U, 0x5d1a24d2U
-      /* 176 */  , 0x10fe5ec5U, 0x27949cc4U, 0x7e2adac6U, 0x494018c7U, 0xcc5657c2U, 0xfb3c95c3U, 0xa282d3c1U, 0x95e811c0U
-      /* 184 */  , 0xa8af4dcbU, 0x9fc58fcaU, 0xc67bc9c8U, 0xf1110bc9U, 0x740744ccU, 0x436d86cdU, 0x1ad3c0cfU, 0x2db902ceU
-      /* 192 */  , 0x4096af91U, 0x77fc6d90U, 0x2e422b92U, 0x1928e993U, 0x9c3ea696U, 0xab546497U, 0xf2ea2295U, 0xc580e094U
-      /* 200 */  , 0xf8c7bc9fU, 0xcfad7e9eU, 0x9613389cU, 0xa179fa9dU, 0x246fb598U, 0x13057799U, 0x4abb319bU, 0x7dd1f39aU
-      /* 208 */  , 0x3035898dU, 0x075f4b8cU, 0x5ee10d8eU, 0x698bcf8fU, 0xec9d808aU, 0xdbf7428bU, 0x82490489U, 0xb523c688U
-      /* 216 */  , 0x88649a83U, 0xbf0e5882U, 0xe6b01e80U, 0xd1dadc81U, 0x54cc9384U, 0x63a65185U, 0x3a181787U, 0x0d72d586U
-      /* 224 */  , 0xa0d0e2a9U, 0x97ba20a8U, 0xce0466aaU, 0xf96ea4abU, 0x7c78ebaeU, 0x4b1229afU, 0x12ac6fadU, 0x25c6adacU
-      /* 232 */  , 0x1881f1a7U, 0x2feb33a6U, 0x765575a4U, 0x413fb7a5U, 0xc429f8a0U, 0xf3433aa1U, 0xaafd7ca3U, 0x9d97bea2U
-      /* 240 */  , 0xd073c4b5U, 0xe71906b4U, 0xbea740b6U, 0x89cd82b7U, 0x0cdbcdb2U, 0x3bb10fb3U, 0x620f49b1U, 0x55658bb0U
-      /* 248 */  , 0x6822d7bbU, 0x5f4815baU, 0x06f653b8U, 0x319c91b9U, 0xb48adebcU, 0x83e01cbdU, 0xda5e5abfU, 0xed3498beU
-    }
-    ,
-    /* CRC32 table 7 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x6567bcb8U, 0x8bc809aaU, 0xeeafb512U, 0x5797628fU, 0x32f0de37U, 0xdc5f6b25U, 0xb938d79dU
-      /* 8 */  , 0xef28b4c5U, 0x8a4f087dU, 0x64e0bd6fU, 0x018701d7U, 0xb8bfd64aU, 0xddd86af2U, 0x3377dfe0U, 0x56106358U
-      /* 16 */  , 0x9f571950U, 0xfa30a5e8U, 0x149f10faU, 0x71f8ac42U, 0xc8c07bdfU, 0xada7c767U, 0x43087275U, 0x266fcecdU
-      /* 24 */  , 0x707fad95U, 0x1518112dU, 0xfbb7a43fU, 0x9ed01887U, 0x27e8cf1aU, 0x428f73a2U, 0xac20c6b0U, 0xc9477a08U
-      /* 32 */  , 0x3eaf32a0U, 0x5bc88e18U, 0xb5673b0aU, 0xd00087b2U, 0x6938502fU, 0x0c5fec97U, 0xe2f05985U, 0x8797e53dU
-      /* 40 */  , 0xd1878665U, 0xb4e03addU, 0x5a4f8fcfU, 0x3f283377U, 0x8610e4eaU, 0xe3775852U, 0x0dd8ed40U, 0x68bf51f8U
-      /* 48 */  , 0xa1f82bf0U, 0xc49f9748U, 0x2a30225aU, 0x4f579ee2U, 0xf66f497fU, 0x9308f5c7U, 0x7da740d5U, 0x18c0fc6dU
-      /* 56 */  , 0x4ed09f35U, 0x2bb7238dU, 0xc518969fU, 0xa07f2a27U, 0x1947fdbaU, 0x7c204102U, 0x928ff410U, 0xf7e848a8U
-      /* 64 */  , 0x3d58149bU, 0x583fa823U, 0xb6901d31U, 0xd3f7a189U, 0x6acf7614U, 0x0fa8caacU, 0xe1077fbeU, 0x8460c306U
-      /* 72 */  , 0xd270a05eU, 0xb7171ce6U, 0x59b8a9f4U, 0x3cdf154cU, 0x85e7c2d1U, 0xe0807e69U, 0x0e2fcb7bU, 0x6b4877c3U
-      /* 80 */  , 0xa20f0dcbU, 0xc768b173U, 0x29c70461U, 0x4ca0b8d9U, 0xf5986f44U, 0x90ffd3fcU, 0x7e5066eeU, 0x1b37da56U
-      /* 88 */  , 0x4d27b90eU, 0x284005b6U, 0xc6efb0a4U, 0xa3880c1cU, 0x1ab0db81U, 0x7fd76739U, 0x9178d22bU, 0xf41f6e93U
-      /* 96 */  , 0x03f7263bU, 0x66909a83U, 0x883f2f91U, 0xed589329U, 0x546044b4U, 0x3107f80cU, 0xdfa84d1eU, 0xbacff1a6U
-      /* 104 */  , 0xecdf92feU, 0x89b82e46U, 0x67179b54U, 0x027027ecU, 0xbb48f071U, 0xde2f4cc9U, 0x3080f9dbU, 0x55e74563U
-      /* 112 */  , 0x9ca03f6bU, 0xf9c783d3U, 0x176836c1U, 0x720f8a79U, 0xcb375de4U, 0xae50e15cU, 0x40ff544eU, 0x2598e8f6U
-      /* 120 */  , 0x73888baeU, 0x16ef3716U, 0xf8408204U, 0x9d273ebcU, 0x241fe921U, 0x41785599U, 0xafd7e08bU, 0xcab05c33U
-      /* 128 */  , 0x3bb659edU, 0x5ed1e555U, 0xb07e5047U, 0xd519ecffU, 0x6c213b62U, 0x094687daU, 0xe7e932c8U, 0x828e8e70U
-      /* 136 */  , 0xd49eed28U, 0xb1f95190U, 0x5f56e482U, 0x3a31583aU, 0x83098fa7U, 0xe66e331fU, 0x08c1860dU, 0x6da63ab5U
-      /* 144 */  , 0xa4e140bdU, 0xc186fc05U, 0x2f294917U, 0x4a4ef5afU, 0xf3762232U, 0x96119e8aU, 0x78be2b98U, 0x1dd99720U
-      /* 152 */  , 0x4bc9f478U, 0x2eae48c0U, 0xc001fdd2U, 0xa566416aU, 0x1c5e96f7U, 0x79392a4fU, 0x97969f5dU, 0xf2f123e5U
-      /* 160 */  , 0x05196b4dU, 0x607ed7f5U, 0x8ed162e7U, 0xebb6de5fU, 0x528e09c2U, 0x37e9b57aU, 0xd9460068U, 0xbc21bcd0U
-      /* 168 */  , 0xea31df88U, 0x8f566330U, 0x61f9d622U, 0x049e6a9aU, 0xbda6bd07U, 0xd8c101bfU, 0x366eb4adU, 0x53090815U
-      /* 176 */  , 0x9a4e721dU, 0xff29cea5U, 0x11867bb7U, 0x74e1c70fU, 0xcdd91092U, 0xa8beac2aU, 0x46111938U, 0x2376a580U
-      /* 184 */  , 0x7566c6d8U, 0x10017a60U, 0xfeaecf72U, 0x9bc973caU, 0x22f1a457U, 0x479618efU, 0xa939adfdU, 0xcc5e1145U
-      /* 192 */  , 0x06ee4d76U, 0x6389f1ceU, 0x8d2644dcU, 0xe841f864U, 0x51792ff9U, 0x341e9341U, 0xdab12653U, 0xbfd69aebU
-      /* 200 */  , 0xe9c6f9b3U, 0x8ca1450bU, 0x620ef019U, 0x07694ca1U, 0xbe519b3cU, 0xdb362784U, 0x35999296U, 0x50fe2e2eU
-      /* 208 */  , 0x99b95426U, 0xfcdee89eU, 0x12715d8cU, 0x7716e134U, 0xce2e36a9U, 0xab498a11U, 0x45e63f03U, 0x208183bbU
-      /* 216 */  , 0x7691e0e3U, 0x13f65c5bU, 0xfd59e949U, 0x983e55f1U, 0x2106826cU, 0x44613ed4U, 0xaace8bc6U, 0xcfa9377eU
-      /* 224 */  , 0x38417fd6U, 0x5d26c36eU, 0xb389767cU, 0xd6eecac4U, 0x6fd61d59U, 0x0ab1a1e1U, 0xe41e14f3U, 0x8179a84bU
-      /* 232 */  , 0xd769cb13U, 0xb20e77abU, 0x5ca1c2b9U, 0x39c67e01U, 0x80fea99cU, 0xe5991524U, 0x0b36a036U, 0x6e511c8eU
-      /* 240 */  , 0xa7166686U, 0xc271da3eU, 0x2cde6f2cU, 0x49b9d394U, 0xf0810409U, 0x95e6b8b1U, 0x7b490da3U, 0x1e2eb11bU
-      /* 248 */  , 0x483ed243U, 0x2d596efbU, 0xc3f6dbe9U, 0xa6916751U, 0x1fa9b0ccU, 0x7ace0c74U, 0x9461b966U, 0xf10605deU
-    }
-  #endif
-  };
-
-juint StubRoutines::ppc64::_crc32c_table[CRC32_TABLES][CRC32_COLUMN_SIZE] = {
-    /* polyBits = 4394350321 0x0000000105ec76f1L, shifted = 0x82f63b78 */
-    /* CRC32C table for single bytes, auto-generated.  DO NOT MODIFY!  */
-    /* CRC32C table 0 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0xf26b8303U, 0xe13b70f7U, 0x1350f3f4U, 0xc79a971fU, 0x35f1141cU, 0x26a1e7e8U, 0xd4ca64ebU
-      /* 8 */  , 0x8ad958cfU, 0x78b2dbccU, 0x6be22838U, 0x9989ab3bU, 0x4d43cfd0U, 0xbf284cd3U, 0xac78bf27U, 0x5e133c24U
-      /* 16 */  , 0x105ec76fU, 0xe235446cU, 0xf165b798U, 0x030e349bU, 0xd7c45070U, 0x25afd373U, 0x36ff2087U, 0xc494a384U
-      /* 24 */  , 0x9a879fa0U, 0x68ec1ca3U, 0x7bbcef57U, 0x89d76c54U, 0x5d1d08bfU, 0xaf768bbcU, 0xbc267848U, 0x4e4dfb4bU
-      /* 32 */  , 0x20bd8edeU, 0xd2d60dddU, 0xc186fe29U, 0x33ed7d2aU, 0xe72719c1U, 0x154c9ac2U, 0x061c6936U, 0xf477ea35U
-      /* 40 */  , 0xaa64d611U, 0x580f5512U, 0x4b5fa6e6U, 0xb93425e5U, 0x6dfe410eU, 0x9f95c20dU, 0x8cc531f9U, 0x7eaeb2faU
-      /* 48 */  , 0x30e349b1U, 0xc288cab2U, 0xd1d83946U, 0x23b3ba45U, 0xf779deaeU, 0x05125dadU, 0x1642ae59U, 0xe4292d5aU
-      /* 56 */  , 0xba3a117eU, 0x4851927dU, 0x5b016189U, 0xa96ae28aU, 0x7da08661U, 0x8fcb0562U, 0x9c9bf696U, 0x6ef07595U
-      /* 64 */  , 0x417b1dbcU, 0xb3109ebfU, 0xa0406d4bU, 0x522bee48U, 0x86e18aa3U, 0x748a09a0U, 0x67dafa54U, 0x95b17957U
-      /* 72 */  , 0xcba24573U, 0x39c9c670U, 0x2a993584U, 0xd8f2b687U, 0x0c38d26cU, 0xfe53516fU, 0xed03a29bU, 0x1f682198U
-      /* 80 */  , 0x5125dad3U, 0xa34e59d0U, 0xb01eaa24U, 0x42752927U, 0x96bf4dccU, 0x64d4cecfU, 0x77843d3bU, 0x85efbe38U
-      /* 88 */  , 0xdbfc821cU, 0x2997011fU, 0x3ac7f2ebU, 0xc8ac71e8U, 0x1c661503U, 0xee0d9600U, 0xfd5d65f4U, 0x0f36e6f7U
-      /* 96 */  , 0x61c69362U, 0x93ad1061U, 0x80fde395U, 0x72966096U, 0xa65c047dU, 0x5437877eU, 0x4767748aU, 0xb50cf789U
-      /* 104 */  , 0xeb1fcbadU, 0x197448aeU, 0x0a24bb5aU, 0xf84f3859U, 0x2c855cb2U, 0xdeeedfb1U, 0xcdbe2c45U, 0x3fd5af46U
-      /* 112 */  , 0x7198540dU, 0x83f3d70eU, 0x90a324faU, 0x62c8a7f9U, 0xb602c312U, 0x44694011U, 0x5739b3e5U, 0xa55230e6U
-      /* 120 */  , 0xfb410cc2U, 0x092a8fc1U, 0x1a7a7c35U, 0xe811ff36U, 0x3cdb9bddU, 0xceb018deU, 0xdde0eb2aU, 0x2f8b6829U
-      /* 128 */  , 0x82f63b78U, 0x709db87bU, 0x63cd4b8fU, 0x91a6c88cU, 0x456cac67U, 0xb7072f64U, 0xa457dc90U, 0x563c5f93U
-      /* 136 */  , 0x082f63b7U, 0xfa44e0b4U, 0xe9141340U, 0x1b7f9043U, 0xcfb5f4a8U, 0x3dde77abU, 0x2e8e845fU, 0xdce5075cU
-      /* 144 */  , 0x92a8fc17U, 0x60c37f14U, 0x73938ce0U, 0x81f80fe3U, 0x55326b08U, 0xa759e80bU, 0xb4091bffU, 0x466298fcU
-      /* 152 */  , 0x1871a4d8U, 0xea1a27dbU, 0xf94ad42fU, 0x0b21572cU, 0xdfeb33c7U, 0x2d80b0c4U, 0x3ed04330U, 0xccbbc033U
-      /* 160 */  , 0xa24bb5a6U, 0x502036a5U, 0x4370c551U, 0xb11b4652U, 0x65d122b9U, 0x97baa1baU, 0x84ea524eU, 0x7681d14dU
-      /* 168 */  , 0x2892ed69U, 0xdaf96e6aU, 0xc9a99d9eU, 0x3bc21e9dU, 0xef087a76U, 0x1d63f975U, 0x0e330a81U, 0xfc588982U
-      /* 176 */  , 0xb21572c9U, 0x407ef1caU, 0x532e023eU, 0xa145813dU, 0x758fe5d6U, 0x87e466d5U, 0x94b49521U, 0x66df1622U
-      /* 184 */  , 0x38cc2a06U, 0xcaa7a905U, 0xd9f75af1U, 0x2b9cd9f2U, 0xff56bd19U, 0x0d3d3e1aU, 0x1e6dcdeeU, 0xec064eedU
-      /* 192 */  , 0xc38d26c4U, 0x31e6a5c7U, 0x22b65633U, 0xd0ddd530U, 0x0417b1dbU, 0xf67c32d8U, 0xe52cc12cU, 0x1747422fU
-      /* 200 */  , 0x49547e0bU, 0xbb3ffd08U, 0xa86f0efcU, 0x5a048dffU, 0x8ecee914U, 0x7ca56a17U, 0x6ff599e3U, 0x9d9e1ae0U
-      /* 208 */  , 0xd3d3e1abU, 0x21b862a8U, 0x32e8915cU, 0xc083125fU, 0x144976b4U, 0xe622f5b7U, 0xf5720643U, 0x07198540U
-      /* 216 */  , 0x590ab964U, 0xab613a67U, 0xb831c993U, 0x4a5a4a90U, 0x9e902e7bU, 0x6cfbad78U, 0x7fab5e8cU, 0x8dc0dd8fU
-      /* 224 */  , 0xe330a81aU, 0x115b2b19U, 0x020bd8edU, 0xf0605beeU, 0x24aa3f05U, 0xd6c1bc06U, 0xc5914ff2U, 0x37faccf1U
-      /* 232 */  , 0x69e9f0d5U, 0x9b8273d6U, 0x88d28022U, 0x7ab90321U, 0xae7367caU, 0x5c18e4c9U, 0x4f48173dU, 0xbd23943eU
-      /* 240 */  , 0xf36e6f75U, 0x0105ec76U, 0x12551f82U, 0xe03e9c81U, 0x34f4f86aU, 0xc69f7b69U, 0xd5cf889dU, 0x27a40b9eU
-      /* 248 */  , 0x79b737baU, 0x8bdcb4b9U, 0x988c474dU, 0x6ae7c44eU, 0xbe2da0a5U, 0x4c4623a6U, 0x5f16d052U, 0xad7d5351U
-    }
-  #ifdef  CRC32_BYFOUR
-    ,
-    /* CRC32C table 1 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x13a29877U, 0x274530eeU, 0x34e7a899U, 0x4e8a61dcU, 0x5d28f9abU, 0x69cf5132U, 0x7a6dc945U
-      /* 8 */  , 0x9d14c3b8U, 0x8eb65bcfU, 0xba51f356U, 0xa9f36b21U, 0xd39ea264U, 0xc03c3a13U, 0xf4db928aU, 0xe7790afdU
-      /* 16 */  , 0x3fc5f181U, 0x2c6769f6U, 0x1880c16fU, 0x0b225918U, 0x714f905dU, 0x62ed082aU, 0x560aa0b3U, 0x45a838c4U
-      /* 24 */  , 0xa2d13239U, 0xb173aa4eU, 0x859402d7U, 0x96369aa0U, 0xec5b53e5U, 0xfff9cb92U, 0xcb1e630bU, 0xd8bcfb7cU
-      /* 32 */  , 0x7f8be302U, 0x6c297b75U, 0x58ced3ecU, 0x4b6c4b9bU, 0x310182deU, 0x22a31aa9U, 0x1644b230U, 0x05e62a47U
-      /* 40 */  , 0xe29f20baU, 0xf13db8cdU, 0xc5da1054U, 0xd6788823U, 0xac154166U, 0xbfb7d911U, 0x8b507188U, 0x98f2e9ffU
-      /* 48 */  , 0x404e1283U, 0x53ec8af4U, 0x670b226dU, 0x74a9ba1aU, 0x0ec4735fU, 0x1d66eb28U, 0x298143b1U, 0x3a23dbc6U
-      /* 56 */  , 0xdd5ad13bU, 0xcef8494cU, 0xfa1fe1d5U, 0xe9bd79a2U, 0x93d0b0e7U, 0x80722890U, 0xb4958009U, 0xa737187eU
-      /* 64 */  , 0xff17c604U, 0xecb55e73U, 0xd852f6eaU, 0xcbf06e9dU, 0xb19da7d8U, 0xa23f3fafU, 0x96d89736U, 0x857a0f41U
-      /* 72 */  , 0x620305bcU, 0x71a19dcbU, 0x45463552U, 0x56e4ad25U, 0x2c896460U, 0x3f2bfc17U, 0x0bcc548eU, 0x186eccf9U
-      /* 80 */  , 0xc0d23785U, 0xd370aff2U, 0xe797076bU, 0xf4359f1cU, 0x8e585659U, 0x9dface2eU, 0xa91d66b7U, 0xbabffec0U
-      /* 88 */  , 0x5dc6f43dU, 0x4e646c4aU, 0x7a83c4d3U, 0x69215ca4U, 0x134c95e1U, 0x00ee0d96U, 0x3409a50fU, 0x27ab3d78U
-      /* 96 */  , 0x809c2506U, 0x933ebd71U, 0xa7d915e8U, 0xb47b8d9fU, 0xce1644daU, 0xddb4dcadU, 0xe9537434U, 0xfaf1ec43U
-      /* 104 */  , 0x1d88e6beU, 0x0e2a7ec9U, 0x3acdd650U, 0x296f4e27U, 0x53028762U, 0x40a01f15U, 0x7447b78cU, 0x67e52ffbU
-      /* 112 */  , 0xbf59d487U, 0xacfb4cf0U, 0x981ce469U, 0x8bbe7c1eU, 0xf1d3b55bU, 0xe2712d2cU, 0xd69685b5U, 0xc5341dc2U
-      /* 120 */  , 0x224d173fU, 0x31ef8f48U, 0x050827d1U, 0x16aabfa6U, 0x6cc776e3U, 0x7f65ee94U, 0x4b82460dU, 0x5820de7aU
-      /* 128 */  , 0xfbc3faf9U, 0xe861628eU, 0xdc86ca17U, 0xcf245260U, 0xb5499b25U, 0xa6eb0352U, 0x920cabcbU, 0x81ae33bcU
-      /* 136 */  , 0x66d73941U, 0x7575a136U, 0x419209afU, 0x523091d8U, 0x285d589dU, 0x3bffc0eaU, 0x0f186873U, 0x1cbaf004U
-      /* 144 */  , 0xc4060b78U, 0xd7a4930fU, 0xe3433b96U, 0xf0e1a3e1U, 0x8a8c6aa4U, 0x992ef2d3U, 0xadc95a4aU, 0xbe6bc23dU
-      /* 152 */  , 0x5912c8c0U, 0x4ab050b7U, 0x7e57f82eU, 0x6df56059U, 0x1798a91cU, 0x043a316bU, 0x30dd99f2U, 0x237f0185U
-      /* 160 */  , 0x844819fbU, 0x97ea818cU, 0xa30d2915U, 0xb0afb162U, 0xcac27827U, 0xd960e050U, 0xed8748c9U, 0xfe25d0beU
-      /* 168 */  , 0x195cda43U, 0x0afe4234U, 0x3e19eaadU, 0x2dbb72daU, 0x57d6bb9fU, 0x447423e8U, 0x70938b71U, 0x63311306U
-      /* 176 */  , 0xbb8de87aU, 0xa82f700dU, 0x9cc8d894U, 0x8f6a40e3U, 0xf50789a6U, 0xe6a511d1U, 0xd242b948U, 0xc1e0213fU
-      /* 184 */  , 0x26992bc2U, 0x353bb3b5U, 0x01dc1b2cU, 0x127e835bU, 0x68134a1eU, 0x7bb1d269U, 0x4f567af0U, 0x5cf4e287U
-      /* 192 */  , 0x04d43cfdU, 0x1776a48aU, 0x23910c13U, 0x30339464U, 0x4a5e5d21U, 0x59fcc556U, 0x6d1b6dcfU, 0x7eb9f5b8U
-      /* 200 */  , 0x99c0ff45U, 0x8a626732U, 0xbe85cfabU, 0xad2757dcU, 0xd74a9e99U, 0xc4e806eeU, 0xf00fae77U, 0xe3ad3600U
-      /* 208 */  , 0x3b11cd7cU, 0x28b3550bU, 0x1c54fd92U, 0x0ff665e5U, 0x759baca0U, 0x663934d7U, 0x52de9c4eU, 0x417c0439U
-      /* 216 */  , 0xa6050ec4U, 0xb5a796b3U, 0x81403e2aU, 0x92e2a65dU, 0xe88f6f18U, 0xfb2df76fU, 0xcfca5ff6U, 0xdc68c781U
-      /* 224 */  , 0x7b5fdfffU, 0x68fd4788U, 0x5c1aef11U, 0x4fb87766U, 0x35d5be23U, 0x26772654U, 0x12908ecdU, 0x013216baU
-      /* 232 */  , 0xe64b1c47U, 0xf5e98430U, 0xc10e2ca9U, 0xd2acb4deU, 0xa8c17d9bU, 0xbb63e5ecU, 0x8f844d75U, 0x9c26d502U
-      /* 240 */  , 0x449a2e7eU, 0x5738b609U, 0x63df1e90U, 0x707d86e7U, 0x0a104fa2U, 0x19b2d7d5U, 0x2d557f4cU, 0x3ef7e73bU
-      /* 248 */  , 0xd98eedc6U, 0xca2c75b1U, 0xfecbdd28U, 0xed69455fU, 0x97048c1aU, 0x84a6146dU, 0xb041bcf4U, 0xa3e32483U
-    }
-    ,
-    /* CRC32C table 2 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0xa541927eU, 0x4f6f520dU, 0xea2ec073U, 0x9edea41aU, 0x3b9f3664U, 0xd1b1f617U, 0x74f06469U
-      /* 8 */  , 0x38513ec5U, 0x9d10acbbU, 0x773e6cc8U, 0xd27ffeb6U, 0xa68f9adfU, 0x03ce08a1U, 0xe9e0c8d2U, 0x4ca15aacU
-      /* 16 */  , 0x70a27d8aU, 0xd5e3eff4U, 0x3fcd2f87U, 0x9a8cbdf9U, 0xee7cd990U, 0x4b3d4beeU, 0xa1138b9dU, 0x045219e3U
-      /* 24 */  , 0x48f3434fU, 0xedb2d131U, 0x079c1142U, 0xa2dd833cU, 0xd62de755U, 0x736c752bU, 0x9942b558U, 0x3c032726U
-      /* 32 */  , 0xe144fb14U, 0x4405696aU, 0xae2ba919U, 0x0b6a3b67U, 0x7f9a5f0eU, 0xdadbcd70U, 0x30f50d03U, 0x95b49f7dU
-      /* 40 */  , 0xd915c5d1U, 0x7c5457afU, 0x967a97dcU, 0x333b05a2U, 0x47cb61cbU, 0xe28af3b5U, 0x08a433c6U, 0xade5a1b8U
-      /* 48 */  , 0x91e6869eU, 0x34a714e0U, 0xde89d493U, 0x7bc846edU, 0x0f382284U, 0xaa79b0faU, 0x40577089U, 0xe516e2f7U
-      /* 56 */  , 0xa9b7b85bU, 0x0cf62a25U, 0xe6d8ea56U, 0x43997828U, 0x37691c41U, 0x92288e3fU, 0x78064e4cU, 0xdd47dc32U
-      /* 64 */  , 0xc76580d9U, 0x622412a7U, 0x880ad2d4U, 0x2d4b40aaU, 0x59bb24c3U, 0xfcfab6bdU, 0x16d476ceU, 0xb395e4b0U
-      /* 72 */  , 0xff34be1cU, 0x5a752c62U, 0xb05bec11U, 0x151a7e6fU, 0x61ea1a06U, 0xc4ab8878U, 0x2e85480bU, 0x8bc4da75U
-      /* 80 */  , 0xb7c7fd53U, 0x12866f2dU, 0xf8a8af5eU, 0x5de93d20U, 0x29195949U, 0x8c58cb37U, 0x66760b44U, 0xc337993aU
-      /* 88 */  , 0x8f96c396U, 0x2ad751e8U, 0xc0f9919bU, 0x65b803e5U, 0x1148678cU, 0xb409f5f2U, 0x5e273581U, 0xfb66a7ffU
-      /* 96 */  , 0x26217bcdU, 0x8360e9b3U, 0x694e29c0U, 0xcc0fbbbeU, 0xb8ffdfd7U, 0x1dbe4da9U, 0xf7908ddaU, 0x52d11fa4U
-      /* 104 */  , 0x1e704508U, 0xbb31d776U, 0x511f1705U, 0xf45e857bU, 0x80aee112U, 0x25ef736cU, 0xcfc1b31fU, 0x6a802161U
-      /* 112 */  , 0x56830647U, 0xf3c29439U, 0x19ec544aU, 0xbcadc634U, 0xc85da25dU, 0x6d1c3023U, 0x8732f050U, 0x2273622eU
-      /* 120 */  , 0x6ed23882U, 0xcb93aafcU, 0x21bd6a8fU, 0x84fcf8f1U, 0xf00c9c98U, 0x554d0ee6U, 0xbf63ce95U, 0x1a225cebU
-      /* 128 */  , 0x8b277743U, 0x2e66e53dU, 0xc448254eU, 0x6109b730U, 0x15f9d359U, 0xb0b84127U, 0x5a968154U, 0xffd7132aU
-      /* 136 */  , 0xb3764986U, 0x1637dbf8U, 0xfc191b8bU, 0x595889f5U, 0x2da8ed9cU, 0x88e97fe2U, 0x62c7bf91U, 0xc7862defU
-      /* 144 */  , 0xfb850ac9U, 0x5ec498b7U, 0xb4ea58c4U, 0x11abcabaU, 0x655baed3U, 0xc01a3cadU, 0x2a34fcdeU, 0x8f756ea0U
-      /* 152 */  , 0xc3d4340cU, 0x6695a672U, 0x8cbb6601U, 0x29faf47fU, 0x5d0a9016U, 0xf84b0268U, 0x1265c21bU, 0xb7245065U
-      /* 160 */  , 0x6a638c57U, 0xcf221e29U, 0x250cde5aU, 0x804d4c24U, 0xf4bd284dU, 0x51fcba33U, 0xbbd27a40U, 0x1e93e83eU
-      /* 168 */  , 0x5232b292U, 0xf77320ecU, 0x1d5de09fU, 0xb81c72e1U, 0xccec1688U, 0x69ad84f6U, 0x83834485U, 0x26c2d6fbU
-      /* 176 */  , 0x1ac1f1ddU, 0xbf8063a3U, 0x55aea3d0U, 0xf0ef31aeU, 0x841f55c7U, 0x215ec7b9U, 0xcb7007caU, 0x6e3195b4U
-      /* 184 */  , 0x2290cf18U, 0x87d15d66U, 0x6dff9d15U, 0xc8be0f6bU, 0xbc4e6b02U, 0x190ff97cU, 0xf321390fU, 0x5660ab71U
-      /* 192 */  , 0x4c42f79aU, 0xe90365e4U, 0x032da597U, 0xa66c37e9U, 0xd29c5380U, 0x77ddc1feU, 0x9df3018dU, 0x38b293f3U
-      /* 200 */  , 0x7413c95fU, 0xd1525b21U, 0x3b7c9b52U, 0x9e3d092cU, 0xeacd6d45U, 0x4f8cff3bU, 0xa5a23f48U, 0x00e3ad36U
-      /* 208 */  , 0x3ce08a10U, 0x99a1186eU, 0x738fd81dU, 0xd6ce4a63U, 0xa23e2e0aU, 0x077fbc74U, 0xed517c07U, 0x4810ee79U
-      /* 216 */  , 0x04b1b4d5U, 0xa1f026abU, 0x4bdee6d8U, 0xee9f74a6U, 0x9a6f10cfU, 0x3f2e82b1U, 0xd50042c2U, 0x7041d0bcU
-      /* 224 */  , 0xad060c8eU, 0x08479ef0U, 0xe2695e83U, 0x4728ccfdU, 0x33d8a894U, 0x96993aeaU, 0x7cb7fa99U, 0xd9f668e7U
-      /* 232 */  , 0x9557324bU, 0x3016a035U, 0xda386046U, 0x7f79f238U, 0x0b899651U, 0xaec8042fU, 0x44e6c45cU, 0xe1a75622U
-      /* 240 */  , 0xdda47104U, 0x78e5e37aU, 0x92cb2309U, 0x378ab177U, 0x437ad51eU, 0xe63b4760U, 0x0c158713U, 0xa954156dU
-      /* 248 */  , 0xe5f54fc1U, 0x40b4ddbfU, 0xaa9a1dccU, 0x0fdb8fb2U, 0x7b2bebdbU, 0xde6a79a5U, 0x3444b9d6U, 0x91052ba8U
-    }
-    ,
-    /* CRC32C table 3 for quad-bytes (little-endian), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0xdd45aab8U, 0xbf672381U, 0x62228939U, 0x7b2231f3U, 0xa6679b4bU, 0xc4451272U, 0x1900b8caU
-      /* 8 */  , 0xf64463e6U, 0x2b01c95eU, 0x49234067U, 0x9466eadfU, 0x8d665215U, 0x5023f8adU, 0x32017194U, 0xef44db2cU
-      /* 16 */  , 0xe964b13dU, 0x34211b85U, 0x560392bcU, 0x8b463804U, 0x924680ceU, 0x4f032a76U, 0x2d21a34fU, 0xf06409f7U
-      /* 24 */  , 0x1f20d2dbU, 0xc2657863U, 0xa047f15aU, 0x7d025be2U, 0x6402e328U, 0xb9474990U, 0xdb65c0a9U, 0x06206a11U
-      /* 32 */  , 0xd725148bU, 0x0a60be33U, 0x6842370aU, 0xb5079db2U, 0xac072578U, 0x71428fc0U, 0x136006f9U, 0xce25ac41U
-      /* 40 */  , 0x2161776dU, 0xfc24ddd5U, 0x9e0654ecU, 0x4343fe54U, 0x5a43469eU, 0x8706ec26U, 0xe524651fU, 0x3861cfa7U
-      /* 48 */  , 0x3e41a5b6U, 0xe3040f0eU, 0x81268637U, 0x5c632c8fU, 0x45639445U, 0x98263efdU, 0xfa04b7c4U, 0x27411d7cU
-      /* 56 */  , 0xc805c650U, 0x15406ce8U, 0x7762e5d1U, 0xaa274f69U, 0xb327f7a3U, 0x6e625d1bU, 0x0c40d422U, 0xd1057e9aU
-      /* 64 */  , 0xaba65fe7U, 0x76e3f55fU, 0x14c17c66U, 0xc984d6deU, 0xd0846e14U, 0x0dc1c4acU, 0x6fe34d95U, 0xb2a6e72dU
-      /* 72 */  , 0x5de23c01U, 0x80a796b9U, 0xe2851f80U, 0x3fc0b538U, 0x26c00df2U, 0xfb85a74aU, 0x99a72e73U, 0x44e284cbU
-      /* 80 */  , 0x42c2eedaU, 0x9f874462U, 0xfda5cd5bU, 0x20e067e3U, 0x39e0df29U, 0xe4a57591U, 0x8687fca8U, 0x5bc25610U
-      /* 88 */  , 0xb4868d3cU, 0x69c32784U, 0x0be1aebdU, 0xd6a40405U, 0xcfa4bccfU, 0x12e11677U, 0x70c39f4eU, 0xad8635f6U
-      /* 96 */  , 0x7c834b6cU, 0xa1c6e1d4U, 0xc3e468edU, 0x1ea1c255U, 0x07a17a9fU, 0xdae4d027U, 0xb8c6591eU, 0x6583f3a6U
-      /* 104 */  , 0x8ac7288aU, 0x57828232U, 0x35a00b0bU, 0xe8e5a1b3U, 0xf1e51979U, 0x2ca0b3c1U, 0x4e823af8U, 0x93c79040U
-      /* 112 */  , 0x95e7fa51U, 0x48a250e9U, 0x2a80d9d0U, 0xf7c57368U, 0xeec5cba2U, 0x3380611aU, 0x51a2e823U, 0x8ce7429bU
-      /* 120 */  , 0x63a399b7U, 0xbee6330fU, 0xdcc4ba36U, 0x0181108eU, 0x1881a844U, 0xc5c402fcU, 0xa7e68bc5U, 0x7aa3217dU
-      /* 128 */  , 0x52a0c93fU, 0x8fe56387U, 0xedc7eabeU, 0x30824006U, 0x2982f8ccU, 0xf4c75274U, 0x96e5db4dU, 0x4ba071f5U
-      /* 136 */  , 0xa4e4aad9U, 0x79a10061U, 0x1b838958U, 0xc6c623e0U, 0xdfc69b2aU, 0x02833192U, 0x60a1b8abU, 0xbde41213U
-      /* 144 */  , 0xbbc47802U, 0x6681d2baU, 0x04a35b83U, 0xd9e6f13bU, 0xc0e649f1U, 0x1da3e349U, 0x7f816a70U, 0xa2c4c0c8U
-      /* 152 */  , 0x4d801be4U, 0x90c5b15cU, 0xf2e73865U, 0x2fa292ddU, 0x36a22a17U, 0xebe780afU, 0x89c50996U, 0x5480a32eU
-      /* 160 */  , 0x8585ddb4U, 0x58c0770cU, 0x3ae2fe35U, 0xe7a7548dU, 0xfea7ec47U, 0x23e246ffU, 0x41c0cfc6U, 0x9c85657eU
-      /* 168 */  , 0x73c1be52U, 0xae8414eaU, 0xcca69dd3U, 0x11e3376bU, 0x08e38fa1U, 0xd5a62519U, 0xb784ac20U, 0x6ac10698U
-      /* 176 */  , 0x6ce16c89U, 0xb1a4c631U, 0xd3864f08U, 0x0ec3e5b0U, 0x17c35d7aU, 0xca86f7c2U, 0xa8a47efbU, 0x75e1d443U
-      /* 184 */  , 0x9aa50f6fU, 0x47e0a5d7U, 0x25c22ceeU, 0xf8878656U, 0xe1873e9cU, 0x3cc29424U, 0x5ee01d1dU, 0x83a5b7a5U
-      /* 192 */  , 0xf90696d8U, 0x24433c60U, 0x4661b559U, 0x9b241fe1U, 0x8224a72bU, 0x5f610d93U, 0x3d4384aaU, 0xe0062e12U
-      /* 200 */  , 0x0f42f53eU, 0xd2075f86U, 0xb025d6bfU, 0x6d607c07U, 0x7460c4cdU, 0xa9256e75U, 0xcb07e74cU, 0x16424df4U
-      /* 208 */  , 0x106227e5U, 0xcd278d5dU, 0xaf050464U, 0x7240aedcU, 0x6b401616U, 0xb605bcaeU, 0xd4273597U, 0x09629f2fU
-      /* 216 */  , 0xe6264403U, 0x3b63eebbU, 0x59416782U, 0x8404cd3aU, 0x9d0475f0U, 0x4041df48U, 0x22635671U, 0xff26fcc9U
-      /* 224 */  , 0x2e238253U, 0xf36628ebU, 0x9144a1d2U, 0x4c010b6aU, 0x5501b3a0U, 0x88441918U, 0xea669021U, 0x37233a99U
-      /* 232 */  , 0xd867e1b5U, 0x05224b0dU, 0x6700c234U, 0xba45688cU, 0xa345d046U, 0x7e007afeU, 0x1c22f3c7U, 0xc167597fU
-      /* 240 */  , 0xc747336eU, 0x1a0299d6U, 0x782010efU, 0xa565ba57U, 0xbc65029dU, 0x6120a825U, 0x0302211cU, 0xde478ba4U
-      /* 248 */  , 0x31035088U, 0xec46fa30U, 0x8e647309U, 0x5321d9b1U, 0x4a21617bU, 0x9764cbc3U, 0xf54642faU, 0x2803e842U
-    }
-    ,
-    /* CRC32C table 4 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x03836bf2U, 0xf7703be1U, 0xf4f35013U, 0x1f979ac7U, 0x1c14f135U, 0xe8e7a126U, 0xeb64cad4U
-      /* 8 */  , 0xcf58d98aU, 0xccdbb278U, 0x3828e26bU, 0x3bab8999U, 0xd0cf434dU, 0xd34c28bfU, 0x27bf78acU, 0x243c135eU
-      /* 16 */  , 0x6fc75e10U, 0x6c4435e2U, 0x98b765f1U, 0x9b340e03U, 0x7050c4d7U, 0x73d3af25U, 0x8720ff36U, 0x84a394c4U
-      /* 24 */  , 0xa09f879aU, 0xa31cec68U, 0x57efbc7bU, 0x546cd789U, 0xbf081d5dU, 0xbc8b76afU, 0x487826bcU, 0x4bfb4d4eU
-      /* 32 */  , 0xde8ebd20U, 0xdd0dd6d2U, 0x29fe86c1U, 0x2a7ded33U, 0xc11927e7U, 0xc29a4c15U, 0x36691c06U, 0x35ea77f4U
-      /* 40 */  , 0x11d664aaU, 0x12550f58U, 0xe6a65f4bU, 0xe52534b9U, 0x0e41fe6dU, 0x0dc2959fU, 0xf931c58cU, 0xfab2ae7eU
-      /* 48 */  , 0xb149e330U, 0xb2ca88c2U, 0x4639d8d1U, 0x45bab323U, 0xaede79f7U, 0xad5d1205U, 0x59ae4216U, 0x5a2d29e4U
-      /* 56 */  , 0x7e113abaU, 0x7d925148U, 0x8961015bU, 0x8ae26aa9U, 0x6186a07dU, 0x6205cb8fU, 0x96f69b9cU, 0x9575f06eU
-      /* 64 */  , 0xbc1d7b41U, 0xbf9e10b3U, 0x4b6d40a0U, 0x48ee2b52U, 0xa38ae186U, 0xa0098a74U, 0x54fada67U, 0x5779b195U
-      /* 72 */  , 0x7345a2cbU, 0x70c6c939U, 0x8435992aU, 0x87b6f2d8U, 0x6cd2380cU, 0x6f5153feU, 0x9ba203edU, 0x9821681fU
-      /* 80 */  , 0xd3da2551U, 0xd0594ea3U, 0x24aa1eb0U, 0x27297542U, 0xcc4dbf96U, 0xcfced464U, 0x3b3d8477U, 0x38beef85U
-      /* 88 */  , 0x1c82fcdbU, 0x1f019729U, 0xebf2c73aU, 0xe871acc8U, 0x0315661cU, 0x00960deeU, 0xf4655dfdU, 0xf7e6360fU
-      /* 96 */  , 0x6293c661U, 0x6110ad93U, 0x95e3fd80U, 0x96609672U, 0x7d045ca6U, 0x7e873754U, 0x8a746747U, 0x89f70cb5U
-      /* 104 */  , 0xadcb1febU, 0xae487419U, 0x5abb240aU, 0x59384ff8U, 0xb25c852cU, 0xb1dfeedeU, 0x452cbecdU, 0x46afd53fU
-      /* 112 */  , 0x0d549871U, 0x0ed7f383U, 0xfa24a390U, 0xf9a7c862U, 0x12c302b6U, 0x11406944U, 0xe5b33957U, 0xe63052a5U
-      /* 120 */  , 0xc20c41fbU, 0xc18f2a09U, 0x357c7a1aU, 0x36ff11e8U, 0xdd9bdb3cU, 0xde18b0ceU, 0x2aebe0ddU, 0x29688b2fU
-      /* 128 */  , 0x783bf682U, 0x7bb89d70U, 0x8f4bcd63U, 0x8cc8a691U, 0x67ac6c45U, 0x642f07b7U, 0x90dc57a4U, 0x935f3c56U
-      /* 136 */  , 0xb7632f08U, 0xb4e044faU, 0x401314e9U, 0x43907f1bU, 0xa8f4b5cfU, 0xab77de3dU, 0x5f848e2eU, 0x5c07e5dcU
-      /* 144 */  , 0x17fca892U, 0x147fc360U, 0xe08c9373U, 0xe30ff881U, 0x086b3255U, 0x0be859a7U, 0xff1b09b4U, 0xfc986246U
-      /* 152 */  , 0xd8a47118U, 0xdb271aeaU, 0x2fd44af9U, 0x2c57210bU, 0xc733ebdfU, 0xc4b0802dU, 0x3043d03eU, 0x33c0bbccU
-      /* 160 */  , 0xa6b54ba2U, 0xa5362050U, 0x51c57043U, 0x52461bb1U, 0xb922d165U, 0xbaa1ba97U, 0x4e52ea84U, 0x4dd18176U
-      /* 168 */  , 0x69ed9228U, 0x6a6ef9daU, 0x9e9da9c9U, 0x9d1ec23bU, 0x767a08efU, 0x75f9631dU, 0x810a330eU, 0x828958fcU
-      /* 176 */  , 0xc97215b2U, 0xcaf17e40U, 0x3e022e53U, 0x3d8145a1U, 0xd6e58f75U, 0xd566e487U, 0x2195b494U, 0x2216df66U
-      /* 184 */  , 0x062acc38U, 0x05a9a7caU, 0xf15af7d9U, 0xf2d99c2bU, 0x19bd56ffU, 0x1a3e3d0dU, 0xeecd6d1eU, 0xed4e06ecU
-      /* 192 */  , 0xc4268dc3U, 0xc7a5e631U, 0x3356b622U, 0x30d5ddd0U, 0xdbb11704U, 0xd8327cf6U, 0x2cc12ce5U, 0x2f424717U
-      /* 200 */  , 0x0b7e5449U, 0x08fd3fbbU, 0xfc0e6fa8U, 0xff8d045aU, 0x14e9ce8eU, 0x176aa57cU, 0xe399f56fU, 0xe01a9e9dU
-      /* 208 */  , 0xabe1d3d3U, 0xa862b821U, 0x5c91e832U, 0x5f1283c0U, 0xb4764914U, 0xb7f522e6U, 0x430672f5U, 0x40851907U
-      /* 216 */  , 0x64b90a59U, 0x673a61abU, 0x93c931b8U, 0x904a5a4aU, 0x7b2e909eU, 0x78adfb6cU, 0x8c5eab7fU, 0x8fddc08dU
-      /* 224 */  , 0x1aa830e3U, 0x192b5b11U, 0xedd80b02U, 0xee5b60f0U, 0x053faa24U, 0x06bcc1d6U, 0xf24f91c5U, 0xf1ccfa37U
-      /* 232 */  , 0xd5f0e969U, 0xd673829bU, 0x2280d288U, 0x2103b97aU, 0xca6773aeU, 0xc9e4185cU, 0x3d17484fU, 0x3e9423bdU
-      /* 240 */  , 0x756f6ef3U, 0x76ec0501U, 0x821f5512U, 0x819c3ee0U, 0x6af8f434U, 0x697b9fc6U, 0x9d88cfd5U, 0x9e0ba427U
-      /* 248 */  , 0xba37b779U, 0xb9b4dc8bU, 0x4d478c98U, 0x4ec4e76aU, 0xa5a02dbeU, 0xa623464cU, 0x52d0165fU, 0x51537dadU
-    }
-    ,
-    /* CRC32C table 5 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x7798a213U, 0xee304527U, 0x99a8e734U, 0xdc618a4eU, 0xabf9285dU, 0x3251cf69U, 0x45c96d7aU
-      /* 8 */  , 0xb8c3149dU, 0xcf5bb68eU, 0x56f351baU, 0x216bf3a9U, 0x64a29ed3U, 0x133a3cc0U, 0x8a92dbf4U, 0xfd0a79e7U
-      /* 16 */  , 0x81f1c53fU, 0xf669672cU, 0x6fc18018U, 0x1859220bU, 0x5d904f71U, 0x2a08ed62U, 0xb3a00a56U, 0xc438a845U
-      /* 24 */  , 0x3932d1a2U, 0x4eaa73b1U, 0xd7029485U, 0xa09a3696U, 0xe5535becU, 0x92cbf9ffU, 0x0b631ecbU, 0x7cfbbcd8U
-      /* 32 */  , 0x02e38b7fU, 0x757b296cU, 0xecd3ce58U, 0x9b4b6c4bU, 0xde820131U, 0xa91aa322U, 0x30b24416U, 0x472ae605U
-      /* 40 */  , 0xba209fe2U, 0xcdb83df1U, 0x5410dac5U, 0x238878d6U, 0x664115acU, 0x11d9b7bfU, 0x8871508bU, 0xffe9f298U
-      /* 48 */  , 0x83124e40U, 0xf48aec53U, 0x6d220b67U, 0x1abaa974U, 0x5f73c40eU, 0x28eb661dU, 0xb1438129U, 0xc6db233aU
-      /* 56 */  , 0x3bd15addU, 0x4c49f8ceU, 0xd5e11ffaU, 0xa279bde9U, 0xe7b0d093U, 0x90287280U, 0x098095b4U, 0x7e1837a7U
-      /* 64 */  , 0x04c617ffU, 0x735eb5ecU, 0xeaf652d8U, 0x9d6ef0cbU, 0xd8a79db1U, 0xaf3f3fa2U, 0x3697d896U, 0x410f7a85U
-      /* 72 */  , 0xbc050362U, 0xcb9da171U, 0x52354645U, 0x25ade456U, 0x6064892cU, 0x17fc2b3fU, 0x8e54cc0bU, 0xf9cc6e18U
-      /* 80 */  , 0x8537d2c0U, 0xf2af70d3U, 0x6b0797e7U, 0x1c9f35f4U, 0x5956588eU, 0x2ecefa9dU, 0xb7661da9U, 0xc0febfbaU
-      /* 88 */  , 0x3df4c65dU, 0x4a6c644eU, 0xd3c4837aU, 0xa45c2169U, 0xe1954c13U, 0x960dee00U, 0x0fa50934U, 0x783dab27U
-      /* 96 */  , 0x06259c80U, 0x71bd3e93U, 0xe815d9a7U, 0x9f8d7bb4U, 0xda4416ceU, 0xaddcb4ddU, 0x347453e9U, 0x43ecf1faU
-      /* 104 */  , 0xbee6881dU, 0xc97e2a0eU, 0x50d6cd3aU, 0x274e6f29U, 0x62870253U, 0x151fa040U, 0x8cb74774U, 0xfb2fe567U
-      /* 112 */  , 0x87d459bfU, 0xf04cfbacU, 0x69e41c98U, 0x1e7cbe8bU, 0x5bb5d3f1U, 0x2c2d71e2U, 0xb58596d6U, 0xc21d34c5U
-      /* 120 */  , 0x3f174d22U, 0x488fef31U, 0xd1270805U, 0xa6bfaa16U, 0xe376c76cU, 0x94ee657fU, 0x0d46824bU, 0x7ade2058U
-      /* 128 */  , 0xf9fac3fbU, 0x8e6261e8U, 0x17ca86dcU, 0x605224cfU, 0x259b49b5U, 0x5203eba6U, 0xcbab0c92U, 0xbc33ae81U
-      /* 136 */  , 0x4139d766U, 0x36a17575U, 0xaf099241U, 0xd8913052U, 0x9d585d28U, 0xeac0ff3bU, 0x7368180fU, 0x04f0ba1cU
-      /* 144 */  , 0x780b06c4U, 0x0f93a4d7U, 0x963b43e3U, 0xe1a3e1f0U, 0xa46a8c8aU, 0xd3f22e99U, 0x4a5ac9adU, 0x3dc26bbeU
-      /* 152 */  , 0xc0c81259U, 0xb750b04aU, 0x2ef8577eU, 0x5960f56dU, 0x1ca99817U, 0x6b313a04U, 0xf299dd30U, 0x85017f23U
-      /* 160 */  , 0xfb194884U, 0x8c81ea97U, 0x15290da3U, 0x62b1afb0U, 0x2778c2caU, 0x50e060d9U, 0xc94887edU, 0xbed025feU
-      /* 168 */  , 0x43da5c19U, 0x3442fe0aU, 0xadea193eU, 0xda72bb2dU, 0x9fbbd657U, 0xe8237444U, 0x718b9370U, 0x06133163U
-      /* 176 */  , 0x7ae88dbbU, 0x0d702fa8U, 0x94d8c89cU, 0xe3406a8fU, 0xa68907f5U, 0xd111a5e6U, 0x48b942d2U, 0x3f21e0c1U
-      /* 184 */  , 0xc22b9926U, 0xb5b33b35U, 0x2c1bdc01U, 0x5b837e12U, 0x1e4a1368U, 0x69d2b17bU, 0xf07a564fU, 0x87e2f45cU
-      /* 192 */  , 0xfd3cd404U, 0x8aa47617U, 0x130c9123U, 0x64943330U, 0x215d5e4aU, 0x56c5fc59U, 0xcf6d1b6dU, 0xb8f5b97eU
-      /* 200 */  , 0x45ffc099U, 0x3267628aU, 0xabcf85beU, 0xdc5727adU, 0x999e4ad7U, 0xee06e8c4U, 0x77ae0ff0U, 0x0036ade3U
-      /* 208 */  , 0x7ccd113bU, 0x0b55b328U, 0x92fd541cU, 0xe565f60fU, 0xa0ac9b75U, 0xd7343966U, 0x4e9cde52U, 0x39047c41U
-      /* 216 */  , 0xc40e05a6U, 0xb396a7b5U, 0x2a3e4081U, 0x5da6e292U, 0x186f8fe8U, 0x6ff72dfbU, 0xf65fcacfU, 0x81c768dcU
-      /* 224 */  , 0xffdf5f7bU, 0x8847fd68U, 0x11ef1a5cU, 0x6677b84fU, 0x23bed535U, 0x54267726U, 0xcd8e9012U, 0xba163201U
-      /* 232 */  , 0x471c4be6U, 0x3084e9f5U, 0xa92c0ec1U, 0xdeb4acd2U, 0x9b7dc1a8U, 0xece563bbU, 0x754d848fU, 0x02d5269cU
-      /* 240 */  , 0x7e2e9a44U, 0x09b63857U, 0x901edf63U, 0xe7867d70U, 0xa24f100aU, 0xd5d7b219U, 0x4c7f552dU, 0x3be7f73eU
-      /* 248 */  , 0xc6ed8ed9U, 0xb1752ccaU, 0x28ddcbfeU, 0x5f4569edU, 0x1a8c0497U, 0x6d14a684U, 0xf4bc41b0U, 0x8324e3a3U
-    }
-    ,
-    /* CRC32C table 6 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0x7e9241a5U, 0x0d526f4fU, 0x73c02eeaU, 0x1aa4de9eU, 0x64369f3bU, 0x17f6b1d1U, 0x6964f074U
-      /* 8 */  , 0xc53e5138U, 0xbbac109dU, 0xc86c3e77U, 0xb6fe7fd2U, 0xdf9a8fa6U, 0xa108ce03U, 0xd2c8e0e9U, 0xac5aa14cU
-      /* 16 */  , 0x8a7da270U, 0xf4efe3d5U, 0x872fcd3fU, 0xf9bd8c9aU, 0x90d97ceeU, 0xee4b3d4bU, 0x9d8b13a1U, 0xe3195204U
-      /* 24 */  , 0x4f43f348U, 0x31d1b2edU, 0x42119c07U, 0x3c83dda2U, 0x55e72dd6U, 0x2b756c73U, 0x58b54299U, 0x2627033cU
-      /* 32 */  , 0x14fb44e1U, 0x6a690544U, 0x19a92baeU, 0x673b6a0bU, 0x0e5f9a7fU, 0x70cddbdaU, 0x030df530U, 0x7d9fb495U
-      /* 40 */  , 0xd1c515d9U, 0xaf57547cU, 0xdc977a96U, 0xa2053b33U, 0xcb61cb47U, 0xb5f38ae2U, 0xc633a408U, 0xb8a1e5adU
-      /* 48 */  , 0x9e86e691U, 0xe014a734U, 0x93d489deU, 0xed46c87bU, 0x8422380fU, 0xfab079aaU, 0x89705740U, 0xf7e216e5U
-      /* 56 */  , 0x5bb8b7a9U, 0x252af60cU, 0x56ead8e6U, 0x28789943U, 0x411c6937U, 0x3f8e2892U, 0x4c4e0678U, 0x32dc47ddU
-      /* 64 */  , 0xd98065c7U, 0xa7122462U, 0xd4d20a88U, 0xaa404b2dU, 0xc324bb59U, 0xbdb6fafcU, 0xce76d416U, 0xb0e495b3U
-      /* 72 */  , 0x1cbe34ffU, 0x622c755aU, 0x11ec5bb0U, 0x6f7e1a15U, 0x061aea61U, 0x7888abc4U, 0x0b48852eU, 0x75dac48bU
-      /* 80 */  , 0x53fdc7b7U, 0x2d6f8612U, 0x5eafa8f8U, 0x203de95dU, 0x49591929U, 0x37cb588cU, 0x440b7666U, 0x3a9937c3U
-      /* 88 */  , 0x96c3968fU, 0xe851d72aU, 0x9b91f9c0U, 0xe503b865U, 0x8c674811U, 0xf2f509b4U, 0x8135275eU, 0xffa766fbU
-      /* 96 */  , 0xcd7b2126U, 0xb3e96083U, 0xc0294e69U, 0xbebb0fccU, 0xd7dfffb8U, 0xa94dbe1dU, 0xda8d90f7U, 0xa41fd152U
-      /* 104 */  , 0x0845701eU, 0x76d731bbU, 0x05171f51U, 0x7b855ef4U, 0x12e1ae80U, 0x6c73ef25U, 0x1fb3c1cfU, 0x6121806aU
-      /* 112 */  , 0x47068356U, 0x3994c2f3U, 0x4a54ec19U, 0x34c6adbcU, 0x5da25dc8U, 0x23301c6dU, 0x50f03287U, 0x2e627322U
-      /* 120 */  , 0x8238d26eU, 0xfcaa93cbU, 0x8f6abd21U, 0xf1f8fc84U, 0x989c0cf0U, 0xe60e4d55U, 0x95ce63bfU, 0xeb5c221aU
-      /* 128 */  , 0x4377278bU, 0x3de5662eU, 0x4e2548c4U, 0x30b70961U, 0x59d3f915U, 0x2741b8b0U, 0x5481965aU, 0x2a13d7ffU
-      /* 136 */  , 0x864976b3U, 0xf8db3716U, 0x8b1b19fcU, 0xf5895859U, 0x9ceda82dU, 0xe27fe988U, 0x91bfc762U, 0xef2d86c7U
-      /* 144 */  , 0xc90a85fbU, 0xb798c45eU, 0xc458eab4U, 0xbacaab11U, 0xd3ae5b65U, 0xad3c1ac0U, 0xdefc342aU, 0xa06e758fU
-      /* 152 */  , 0x0c34d4c3U, 0x72a69566U, 0x0166bb8cU, 0x7ff4fa29U, 0x16900a5dU, 0x68024bf8U, 0x1bc26512U, 0x655024b7U
-      /* 160 */  , 0x578c636aU, 0x291e22cfU, 0x5ade0c25U, 0x244c4d80U, 0x4d28bdf4U, 0x33bafc51U, 0x407ad2bbU, 0x3ee8931eU
-      /* 168 */  , 0x92b23252U, 0xec2073f7U, 0x9fe05d1dU, 0xe1721cb8U, 0x8816ecccU, 0xf684ad69U, 0x85448383U, 0xfbd6c226U
-      /* 176 */  , 0xddf1c11aU, 0xa36380bfU, 0xd0a3ae55U, 0xae31eff0U, 0xc7551f84U, 0xb9c75e21U, 0xca0770cbU, 0xb495316eU
-      /* 184 */  , 0x18cf9022U, 0x665dd187U, 0x159dff6dU, 0x6b0fbec8U, 0x026b4ebcU, 0x7cf90f19U, 0x0f3921f3U, 0x71ab6056U
-      /* 192 */  , 0x9af7424cU, 0xe46503e9U, 0x97a52d03U, 0xe9376ca6U, 0x80539cd2U, 0xfec1dd77U, 0x8d01f39dU, 0xf393b238U
-      /* 200 */  , 0x5fc91374U, 0x215b52d1U, 0x529b7c3bU, 0x2c093d9eU, 0x456dcdeaU, 0x3bff8c4fU, 0x483fa2a5U, 0x36ade300U
-      /* 208 */  , 0x108ae03cU, 0x6e18a199U, 0x1dd88f73U, 0x634aced6U, 0x0a2e3ea2U, 0x74bc7f07U, 0x077c51edU, 0x79ee1048U
-      /* 216 */  , 0xd5b4b104U, 0xab26f0a1U, 0xd8e6de4bU, 0xa6749feeU, 0xcf106f9aU, 0xb1822e3fU, 0xc24200d5U, 0xbcd04170U
-      /* 224 */  , 0x8e0c06adU, 0xf09e4708U, 0x835e69e2U, 0xfdcc2847U, 0x94a8d833U, 0xea3a9996U, 0x99fab77cU, 0xe768f6d9U
-      /* 232 */  , 0x4b325795U, 0x35a01630U, 0x466038daU, 0x38f2797fU, 0x5196890bU, 0x2f04c8aeU, 0x5cc4e644U, 0x2256a7e1U
-      /* 240 */  , 0x0471a4ddU, 0x7ae3e578U, 0x0923cb92U, 0x77b18a37U, 0x1ed57a43U, 0x60473be6U, 0x1387150cU, 0x6d1554a9U
-      /* 248 */  , 0xc14ff5e5U, 0xbfddb440U, 0xcc1d9aaaU, 0xb28fdb0fU, 0xdbeb2b7bU, 0xa5796adeU, 0xd6b94434U, 0xa82b0591U
-    }
-    ,
-    /* CRC32C table 7 for quad-bytes (  big-endian ), auto-generated. DO NOT MODIFY! */
-    {
-      /* 0 */    0x00000000U, 0xb8aa45ddU, 0x812367bfU, 0x39892262U, 0xf331227bU, 0x4b9b67a6U, 0x721245c4U, 0xcab80019U
-      /* 8 */  , 0xe66344f6U, 0x5ec9012bU, 0x67402349U, 0xdfea6694U, 0x1552668dU, 0xadf82350U, 0x94710132U, 0x2cdb44efU
-      /* 16 */  , 0x3db164e9U, 0x851b2134U, 0xbc920356U, 0x0438468bU, 0xce804692U, 0x762a034fU, 0x4fa3212dU, 0xf70964f0U
-      /* 24 */  , 0xdbd2201fU, 0x637865c2U, 0x5af147a0U, 0xe25b027dU, 0x28e30264U, 0x904947b9U, 0xa9c065dbU, 0x116a2006U
-      /* 32 */  , 0x8b1425d7U, 0x33be600aU, 0x0a374268U, 0xb29d07b5U, 0x782507acU, 0xc08f4271U, 0xf9066013U, 0x41ac25ceU
-      /* 40 */  , 0x6d776121U, 0xd5dd24fcU, 0xec54069eU, 0x54fe4343U, 0x9e46435aU, 0x26ec0687U, 0x1f6524e5U, 0xa7cf6138U
-      /* 48 */  , 0xb6a5413eU, 0x0e0f04e3U, 0x37862681U, 0x8f2c635cU, 0x45946345U, 0xfd3e2698U, 0xc4b704faU, 0x7c1d4127U
-      /* 56 */  , 0x50c605c8U, 0xe86c4015U, 0xd1e56277U, 0x694f27aaU, 0xa3f727b3U, 0x1b5d626eU, 0x22d4400cU, 0x9a7e05d1U
-      /* 64 */  , 0xe75fa6abU, 0x5ff5e376U, 0x667cc114U, 0xded684c9U, 0x146e84d0U, 0xacc4c10dU, 0x954de36fU, 0x2de7a6b2U
-      /* 72 */  , 0x013ce25dU, 0xb996a780U, 0x801f85e2U, 0x38b5c03fU, 0xf20dc026U, 0x4aa785fbU, 0x732ea799U, 0xcb84e244U
-      /* 80 */  , 0xdaeec242U, 0x6244879fU, 0x5bcda5fdU, 0xe367e020U, 0x29dfe039U, 0x9175a5e4U, 0xa8fc8786U, 0x1056c25bU
-      /* 88 */  , 0x3c8d86b4U, 0x8427c369U, 0xbdaee10bU, 0x0504a4d6U, 0xcfbca4cfU, 0x7716e112U, 0x4e9fc370U, 0xf63586adU
-      /* 96 */  , 0x6c4b837cU, 0xd4e1c6a1U, 0xed68e4c3U, 0x55c2a11eU, 0x9f7aa107U, 0x27d0e4daU, 0x1e59c6b8U, 0xa6f38365U
-      /* 104 */  , 0x8a28c78aU, 0x32828257U, 0x0b0ba035U, 0xb3a1e5e8U, 0x7919e5f1U, 0xc1b3a02cU, 0xf83a824eU, 0x4090c793U
-      /* 112 */  , 0x51fae795U, 0xe950a248U, 0xd0d9802aU, 0x6873c5f7U, 0xa2cbc5eeU, 0x1a618033U, 0x23e8a251U, 0x9b42e78cU
-      /* 120 */  , 0xb799a363U, 0x0f33e6beU, 0x36bac4dcU, 0x8e108101U, 0x44a88118U, 0xfc02c4c5U, 0xc58be6a7U, 0x7d21a37aU
-      /* 128 */  , 0x3fc9a052U, 0x8763e58fU, 0xbeeac7edU, 0x06408230U, 0xccf88229U, 0x7452c7f4U, 0x4ddbe596U, 0xf571a04bU
-      /* 136 */  , 0xd9aae4a4U, 0x6100a179U, 0x5889831bU, 0xe023c6c6U, 0x2a9bc6dfU, 0x92318302U, 0xabb8a160U, 0x1312e4bdU
-      /* 144 */  , 0x0278c4bbU, 0xbad28166U, 0x835ba304U, 0x3bf1e6d9U, 0xf149e6c0U, 0x49e3a31dU, 0x706a817fU, 0xc8c0c4a2U
-      /* 152 */  , 0xe41b804dU, 0x5cb1c590U, 0x6538e7f2U, 0xdd92a22fU, 0x172aa236U, 0xaf80e7ebU, 0x9609c589U, 0x2ea38054U
-      /* 160 */  , 0xb4dd8585U, 0x0c77c058U, 0x35fee23aU, 0x8d54a7e7U, 0x47eca7feU, 0xff46e223U, 0xc6cfc041U, 0x7e65859cU
-      /* 168 */  , 0x52bec173U, 0xea1484aeU, 0xd39da6ccU, 0x6b37e311U, 0xa18fe308U, 0x1925a6d5U, 0x20ac84b7U, 0x9806c16aU
-      /* 176 */  , 0x896ce16cU, 0x31c6a4b1U, 0x084f86d3U, 0xb0e5c30eU, 0x7a5dc317U, 0xc2f786caU, 0xfb7ea4a8U, 0x43d4e175U
-      /* 184 */  , 0x6f0fa59aU, 0xd7a5e047U, 0xee2cc225U, 0x568687f8U, 0x9c3e87e1U, 0x2494c23cU, 0x1d1de05eU, 0xa5b7a583U
-      /* 192 */  , 0xd89606f9U, 0x603c4324U, 0x59b56146U, 0xe11f249bU, 0x2ba72482U, 0x930d615fU, 0xaa84433dU, 0x122e06e0U
-      /* 200 */  , 0x3ef5420fU, 0x865f07d2U, 0xbfd625b0U, 0x077c606dU, 0xcdc46074U, 0x756e25a9U, 0x4ce707cbU, 0xf44d4216U
-      /* 208 */  , 0xe5276210U, 0x5d8d27cdU, 0x640405afU, 0xdcae4072U, 0x1616406bU, 0xaebc05b6U, 0x973527d4U, 0x2f9f6209U
-      /* 216 */  , 0x034426e6U, 0xbbee633bU, 0x82674159U, 0x3acd0484U, 0xf075049dU, 0x48df4140U, 0x71566322U, 0xc9fc26ffU
-      /* 224 */  , 0x5382232eU, 0xeb2866f3U, 0xd2a14491U, 0x6a0b014cU, 0xa0b30155U, 0x18194488U, 0x219066eaU, 0x993a2337U
-      /* 232 */  , 0xb5e167d8U, 0x0d4b2205U, 0x34c20067U, 0x8c6845baU, 0x46d045a3U, 0xfe7a007eU, 0xc7f3221cU, 0x7f5967c1U
-      /* 240 */  , 0x6e3347c7U, 0xd699021aU, 0xef102078U, 0x57ba65a5U, 0x9d0265bcU, 0x25a82061U, 0x1c210203U, 0xa48b47deU
-      /* 248 */  , 0x88500331U, 0x30fa46ecU, 0x0973648eU, 0xb1d92153U, 0x7b61214aU, 0xc3cb6497U, 0xfa4246f5U, 0x42e80328U
-    }
-  #endif
-  };
-
-juint* StubRoutines::ppc64::_crc_constants = NULL;
-juint* StubRoutines::ppc64::_crc32c_constants = NULL;
--- a/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/ppc/templateInterpreterGenerator_ppc.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1815,25 +1815,23 @@
     // R15_esp is callers operand stack pointer, i.e. it points to the parameters.
     const Register argP    = R15_esp;
     const Register crc     = R3_ARG1;  // crc value
-    const Register data    = R4_ARG2;  // address of java byte value (kernel_crc32 needs address)
-    const Register dataLen = R5_ARG3;  // source data len (1 byte). Not used because calling the single-byte emitter.
-    const Register table   = R6_ARG4;  // address of crc32 table
-    const Register tmp     = dataLen;  // Reuse unused len register to show we don't actually need a separate tmp here.
+    const Register data    = R4_ARG2;
+    const Register table   = R5_ARG3;  // address of crc32 table
 
     BLOCK_COMMENT("CRC32_update {");
 
     // Arguments are reversed on java expression stack
 #ifdef VM_LITTLE_ENDIAN
-    __ addi(data, argP, 0+1*wordSize); // (stack) address of byte value. Emitter expects address, not value.
+    int data_offs = 0+1*wordSize;      // (stack) address of byte value. Emitter expects address, not value.
                                        // Being passed as an int, the single byte is at offset +0.
 #else
-    __ addi(data, argP, 3+1*wordSize); // (stack) address of byte value. Emitter expects address, not value.
+    int data_offs = 3+1*wordSize;      // (stack) address of byte value. Emitter expects address, not value.
                                        // Being passed from java as an int, the single byte is at offset +3.
 #endif
-    __ lwz(crc,  2*wordSize, argP);    // Current crc state, zero extend to 64 bit to have a clean register.
-
+    __ lwz(crc, 2*wordSize, argP);     // Current crc state, zero extend to 64 bit to have a clean register.
+    __ lbz(data, data_offs, argP);     // Byte from buffer, zero-extended.
     __ load_const_optimized(table, StubRoutines::crc_table_addr(), R0);
-    __ kernel_crc32_singleByte(crc, data, dataLen, table, tmp, true);
+    __ kernel_crc32_singleByteReg(crc, data, table, true);
 
     // Restore caller sp for c2i case (from compiled) and for resized sender frame (from interpreted).
     __ resize_frame_absolute(R21_sender_SP, R11_scratch1, R0);
--- a/src/hotspot/cpu/s390/frame_s390.inline.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/s390/frame_s390.inline.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -111,14 +111,6 @@
   return _fp;
 }
 
-// Return true if this frame is younger (more recent activation) than
-// the frame represented by id.
-inline bool frame::is_younger(intptr_t* id) const {
-  assert(this->id() != NULL && id != NULL, "NULL frame id");
-  // Stack grows towards smaller addresses on z/Architecture.
-  return this->id() < id;
-}
-
 // Return true if this frame is older (less recent activation) than
 // the frame represented by id.
 inline bool frame::is_older(intptr_t* id) const {
--- a/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/sparc/frame_sparc.inline.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -57,11 +57,6 @@
 // frame.
 inline intptr_t* frame::id(void) const { return unextended_sp(); }
 
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
-                                                    return this->id() < id ; }
-
 // Return true if the frame is older (less recent activation) than the frame represented by id
 inline bool frame::is_older(intptr_t* id) const   { assert(this->id() != NULL && id != NULL, "NULL frame id");
                                                     return this->id() > id ; }
--- a/src/hotspot/cpu/x86/frame_x86.inline.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/frame_x86.inline.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -133,11 +133,6 @@
 // frame.
 inline intptr_t* frame::id(void) const { return unextended_sp(); }
 
-// Relationals on frames based
-// Return true if the frame is younger (more recent activation) than the frame represented by id
-inline bool frame::is_younger(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
-                                                    return this->id() < id ; }
-
 // Return true if the frame is older (less recent activation) than the frame represented by id
 inline bool frame::is_older(intptr_t* id) const   { assert(this->id() != NULL && id != NULL, "NULL frame id");
                                                     return this->id() > id ; }
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -592,64 +592,19 @@
 #ifndef _LP64
 void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
                                                 Register res, Address addr, Register oldval, Register newval,
-                                                bool exchange, bool encode, Register tmp1, Register tmp2) {
+                                                bool exchange, Register tmp1, Register tmp2) {
   // Shenandoah has no 32-bit version for this.
   Unimplemented();
 }
 #else
 void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
                                                 Register res, Address addr, Register oldval, Register newval,
-                                                bool exchange, bool encode, Register tmp1, Register tmp2) {
-  if (!ShenandoahCASBarrier) {
-#ifdef _LP64
-    if (UseCompressedOops) {
-      if (encode) {
-        __ encode_heap_oop(oldval);
-        __ mov(rscratch1, newval);
-        __ encode_heap_oop(rscratch1);
-        newval = rscratch1;
-      }
-      if (os::is_MP()) {
-        __ lock();
-      }
-      // oldval (rax) is implicitly used by this instruction
-      __ cmpxchgl(newval, addr);
-    } else
-#endif
-      {
-        if (os::is_MP()) {
-          __ lock();
-        }
-        __ cmpxchgptr(newval, addr);
-      }
-
-    if (!exchange) {
-      assert(res != NULL, "need result register");
-      __ setb(Assembler::equal, res);
-      __ movzbl(res, res);
-    }
-    return;
-  }
-
+                                                bool exchange, Register tmp1, Register tmp2) {
   assert(ShenandoahCASBarrier, "Should only be used when CAS barrier is enabled");
   assert(oldval == rax, "must be in rax for implicit use in cmpxchg");
 
   Label retry, done;
 
-  // Apply storeval barrier to newval.
-  if (encode) {
-    storeval_barrier(masm, newval, tmp1);
-  }
-
-  if (UseCompressedOops) {
-    if (encode) {
-      __ encode_heap_oop(oldval);
-      __ mov(rscratch1, newval);
-      __ encode_heap_oop(rscratch1);
-      newval = rscratch1;
-    }
-  }
-
   // Remember oldval for retry logic below
   if (UseCompressedOops) {
     __ movl(tmp1, oldval);
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -64,7 +64,6 @@
   void write_barrier(MacroAssembler* masm, Register dst);
   void write_barrier_impl(MacroAssembler* masm, Register dst);
 
-  void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
   void storeval_barrier_impl(MacroAssembler* masm, Register dst, Register tmp);
 
   address generate_shenandoah_wb(StubCodeGenerator* cgen);
@@ -75,6 +74,7 @@
 public:
   static address shenandoah_wb();
 
+  void storeval_barrier(MacroAssembler* masm, Register dst, Register tmp);
 #ifdef COMPILER1
   void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
   void gen_write_barrier_stub(LIR_Assembler* ce, ShenandoahWriteBarrierStub* stub);
@@ -83,7 +83,7 @@
 
   void cmpxchg_oop(MacroAssembler* masm,
                    Register res, Address addr, Register oldval, Register newval,
-                   bool exchange, bool encode, Register tmp1, Register tmp2);
+                   bool exchange, Register tmp1, Register tmp2);
   virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
                                   Register src, Register dst, Register count);
   virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetC1_x86.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetC1_x86.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -28,20 +28,36 @@
 #include "gc/shenandoah/shenandoahBarrierSetAssembler.hpp"
 #include "gc/shenandoah/c1/shenandoahBarrierSetC1.hpp"
 
+#define __ masm->masm()->
+
 void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
   Register addr = _addr->as_register_lo();
   Register newval = _new_value->as_register();
   Register cmpval = _cmp_value->as_register();
   Register tmp1 = _tmp1->as_register();
   Register tmp2 = _tmp2->as_register();
+  Register result = result_opr()->as_register();
   assert(cmpval == rax, "wrong register");
   assert(newval != NULL, "new val must be register");
   assert(cmpval != newval, "cmp and new values must be in different registers");
   assert(cmpval != addr, "cmp and addr must be in different registers");
   assert(newval != addr, "new value and addr must be in different registers");
-  ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), NULL, Address(addr, 0), cmpval, newval, true, true, tmp1, tmp2);
+
+  // Apply storeval barrier to newval.
+  ShenandoahBarrierSet::assembler()->storeval_barrier(masm->masm(), newval, tmp1);
+
+  if (UseCompressedOops) {
+    __ encode_heap_oop(cmpval);
+    __ mov(rscratch1, newval);
+    __ encode_heap_oop(rscratch1);
+    newval = rscratch1;
+  }
+
+  ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), result, Address(addr, 0), cmpval, newval, false, tmp1, tmp2);
 }
 
+#undef __
+
 #ifdef ASSERT
 #define __ gen->lir(__FILE__, __LINE__)->
 #else
@@ -63,12 +79,9 @@
       LIR_Opr t1 = gen->new_register(T_OBJECT);
       LIR_Opr t2 = gen->new_register(T_OBJECT);
       LIR_Opr addr = access.resolved_addr()->as_address_ptr()->base();
+      LIR_Opr result = gen->new_register(T_INT);
 
-      __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, LIR_OprFact::illegalOpr));
-
-      LIR_Opr result = gen->new_register(T_INT);
-      __ cmove(lir_cond_equal, LIR_OprFact::intConst(1), LIR_OprFact::intConst(0),
-               result, T_INT);
+      __ append(new LIR_OpShenandoahCompareAndSwap(addr, cmp_value.result(), new_value.result(), t1, t2, result));
       return result;
     }
   }
--- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoah_x86_64.ad	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoah_x86_64.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -83,7 +83,7 @@
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
                                                    $res$$Register, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
                                                    false, // swap
-                                                   false, $tmp1$$Register, $tmp2$$Register
+                                                   $tmp1$$Register, $tmp2$$Register
                                                    );
   %}
   ins_pipe( pipe_cmpxchg );
@@ -104,7 +104,7 @@
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
                                                    $res$$Register, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
                                                    false, // swap
-                                                   false, $tmp1$$Register, $tmp2$$Register
+                                                   $tmp1$$Register, $tmp2$$Register
                                                    );
   %}
   ins_pipe( pipe_cmpxchg );
@@ -123,7 +123,7 @@
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
                                                    NULL, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
                                                    true, // exchange
-                                                   false, $tmp1$$Register, $tmp2$$Register
+                                                   $tmp1$$Register, $tmp2$$Register
                                                    );
   %}
   ins_pipe( pipe_cmpxchg );
@@ -145,7 +145,7 @@
     ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm,
                                                    NULL, $mem_ptr$$Address, $oldval$$Register, $newval$$Register,
                                                    true,  // exchange
-                                                   false, $tmp1$$Register, $tmp2$$Register
+                                                   $tmp1$$Register, $tmp2$$Register
                                                    );
   %}
   ins_pipe( pipe_cmpxchg );
--- a/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -279,20 +279,21 @@
 
   Register ref = stub->ref()->as_register();
   Register ref_addr = noreg;
+  Register tmp = noreg;
 
-  if (stub->ref_addr()->is_register()) {
+  if (stub->tmp()->is_valid()) {
+    // Load address into tmp register
+    ce->leal(stub->ref_addr(), stub->tmp());
+    ref_addr = tmp = stub->tmp()->as_pointer_register();
+  } else {
     // Address already in register
-    ref_addr = stub->ref_addr()->as_pointer_register();
-  } else {
-    // Load address into tmp register
-    ce->leal(stub->ref_addr(), stub->tmp(), stub->patch_code(), stub->patch_info());
-    ref_addr = stub->tmp()->as_pointer_register();
+    ref_addr = stub->ref_addr()->as_address_ptr()->base()->as_pointer_register();
   }
 
   assert_different_registers(ref, ref_addr, noreg);
 
-  // Save rax unless it is the result register
-  if (ref != rax) {
+  // Save rax unless it is the result or tmp register
+  if (ref != rax && tmp != rax) {
     __ push(rax);
   }
 
@@ -306,9 +307,13 @@
   // Verify result
   __ verify_oop(rax, "Bad oop");
 
-  // Restore rax unless it is the result register
+  // Move result into place
   if (ref != rax) {
     __ movptr(ref, rax);
+  }
+
+  // Restore rax unless it is the result or tmp register
+  if (ref != rax && tmp != rax) {
     __ pop(rax);
   }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/cpu/x86/gc/z/z_x86_64.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -0,0 +1,155 @@
+//
+// 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.
+//
+
+source %{
+
+#include "gc/z/zBarrierSetAssembler.hpp"
+
+static void z_load_barrier_slow_reg(MacroAssembler& _masm, Register dst, Address src, bool weak) {
+  assert(dst != r12, "Invalid register");
+  assert(dst != r15, "Invalid register");
+  assert(dst != rsp, "Invalid register");
+
+  const address stub = weak ? ZBarrierSet::assembler()->load_barrier_weak_slow_stub(dst)
+                            : ZBarrierSet::assembler()->load_barrier_slow_stub(dst);
+  __ lea(dst, src);
+  __ call(RuntimeAddress(stub));
+}
+
+%}
+
+// For XMM and YMM enabled processors
+instruct zLoadBarrierSlowRegXmmAndYmm(rRegP dst, memory src, rFlagsReg cr,
+                                      rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+                                      rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+                                      rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+                                      rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
+
+  match(Set dst (LoadBarrierSlowReg src));
+  predicate(UseAVX <= 2);
+
+  effect(DEF dst, KILL cr,
+         KILL x0, KILL x1, KILL x2, KILL x3,
+         KILL x4, KILL x5, KILL x6, KILL x7,
+         KILL x8, KILL x9, KILL x10, KILL x11,
+         KILL x12, KILL x13, KILL x14, KILL x15);
+
+  format %{ "zLoadBarrierSlowRegXmmAndYmm $dst, $src" %}
+
+  ins_encode %{
+    z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, false /* weak */);
+  %}
+
+  ins_pipe(pipe_slow);
+%}
+
+// For ZMM enabled processors
+instruct zLoadBarrierSlowRegZmm(rRegP dst, memory src, rFlagsReg cr,
+                                rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+                                rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+                                rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+                                rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
+                                rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
+                                rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
+                                rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
+                                rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
+
+  match(Set dst (LoadBarrierSlowReg src));
+  predicate(UseAVX == 3);
+
+  effect(DEF dst, KILL cr,
+         KILL x0, KILL x1, KILL x2, KILL x3,
+         KILL x4, KILL x5, KILL x6, KILL x7,
+         KILL x8, KILL x9, KILL x10, KILL x11,
+         KILL x12, KILL x13, KILL x14, KILL x15,
+         KILL x16, KILL x17, KILL x18, KILL x19,
+         KILL x20, KILL x21, KILL x22, KILL x23,
+         KILL x24, KILL x25, KILL x26, KILL x27,
+         KILL x28, KILL x29, KILL x30, KILL x31);
+
+  format %{ "zLoadBarrierSlowRegZmm $dst, $src" %}
+
+  ins_encode %{
+    z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, false /* weak */);
+  %}
+
+  ins_pipe(pipe_slow);
+%}
+
+// For XMM and YMM enabled processors
+instruct zLoadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory src, rFlagsReg cr,
+                                          rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+                                          rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+                                          rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+                                          rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
+
+  match(Set dst (LoadBarrierWeakSlowReg src));
+  predicate(UseAVX <= 2);
+
+  effect(DEF dst, KILL cr,
+         KILL x0, KILL x1, KILL x2, KILL x3,
+         KILL x4, KILL x5, KILL x6, KILL x7,
+         KILL x8, KILL x9, KILL x10, KILL x11,
+         KILL x12, KILL x13, KILL x14, KILL x15);
+
+  format %{ "zLoadBarrierWeakSlowRegXmmAndYmm $dst, $src" %}
+
+  ins_encode %{
+    z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, true /* weak */);
+  %}
+
+  ins_pipe(pipe_slow);
+%}
+
+// For ZMM enabled processors
+instruct zLoadBarrierWeakSlowRegZmm(rRegP dst, memory src, rFlagsReg cr,
+                                    rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
+                                    rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
+                                    rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
+                                    rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
+                                    rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
+                                    rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
+                                    rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
+                                    rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
+
+  match(Set dst (LoadBarrierWeakSlowReg src));
+  predicate(UseAVX == 3);
+
+  effect(DEF dst, KILL cr,
+         KILL x0, KILL x1, KILL x2, KILL x3,
+         KILL x4, KILL x5, KILL x6, KILL x7,
+         KILL x8, KILL x9, KILL x10, KILL x11,
+         KILL x12, KILL x13, KILL x14, KILL x15,
+         KILL x16, KILL x17, KILL x18, KILL x19,
+         KILL x20, KILL x21, KILL x22, KILL x23,
+         KILL x24, KILL x25, KILL x26, KILL x27,
+         KILL x28, KILL x29, KILL x30, KILL x31);
+
+  format %{ "zLoadBarrierWeakSlowRegZmm $dst, $src" %}
+
+  ins_encode %{
+    z_load_barrier_slow_reg(_masm, $dst$$Register, $src$$Address, true /* weak */);
+  %}
+
+  ins_pipe(pipe_slow);
+%}
--- a/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_32.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -3709,8 +3709,6 @@
     // Round to nearest, 24-bit mode, exceptions masked
     StubRoutines::_fpu_cntrl_wrd_24    = 0x007F;
     // Round to nearest, 64-bit mode, exceptions masked
-    StubRoutines::_fpu_cntrl_wrd_64    = 0x037F;
-    // Round to nearest, 64-bit mode, exceptions masked
     StubRoutines::_mxcsr_std           = 0x1F80;
     // Note: the following two constants are 80-bit values
     //       layout is critical for correct loading by FPU.
--- a/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, 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
@@ -5730,8 +5730,6 @@
     // Round to nearest, 24-bit mode, exceptions masked
     StubRoutines::_fpu_cntrl_wrd_24    = 0x007F;
     // Round to nearest, 64-bit mode, exceptions masked
-    StubRoutines::_fpu_cntrl_wrd_64    = 0x037F;
-    // Round to nearest, 64-bit mode, exceptions masked
     StubRoutines::_mxcsr_std           = 0x1F80;
     // Note: the following two constants are 80-bit values
     //       layout is critical for correct loading by FPU.
--- a/src/hotspot/cpu/x86/x86.ad	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/x86.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -1685,26 +1685,24 @@
     case Op_VecS: // copy whole register
     case Op_VecD:
     case Op_VecX:
-#ifndef LP64
+#ifndef _LP64
       __ movdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
 #else
       if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
         __ movdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
       } else {
-        __ vpxor(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[dst_lo]), 2);
-        __ vinserti32x4(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 0x0);
+        __ vextractf32x4(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 0x0);
      }
 #endif
       break;
     case Op_VecY:
-#ifndef LP64
+#ifndef _LP64
       __ vmovdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
 #else
       if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
         __ vmovdqu(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]));
       } else {
-        __ vpxor(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[dst_lo]), 2);
-        __ vinserti64x4(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 0x0);
+        __ vextractf64x4(as_XMMRegister(Matcher::_regEncode[dst_lo]), as_XMMRegister(Matcher::_regEncode[src_lo]), 0x0);
      }
 #endif
       break;
@@ -1758,26 +1756,26 @@
         __ movq(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
         break;
       case Op_VecX:
-#ifndef LP64
+#ifndef _LP64
         __ movdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
 #else
         if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
           __ movdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
         } else {
-          __ vpxor(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 2);
-          __ vinserti32x4(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset),0x0);
+          __ vpxor(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 2);
+          __ vinsertf32x4(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset),0x0);
         }
 #endif
         break;
       case Op_VecY:
-#ifndef LP64
+#ifndef _LP64
         __ vmovdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
 #else
         if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
           __ vmovdqu(as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset));
         } else {
-          __ vpxor(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 2);
-          __ vinserti64x4(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset),0x0);
+          __ vpxor(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 2);
+          __ vinsertf64x4(as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), Address(rsp, stack_offset),0x0);
         }
 #endif
         break;
@@ -1796,26 +1794,26 @@
         __ movq(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
         break;
       case Op_VecX:
-#ifndef LP64
+#ifndef _LP64
         __ movdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
 #else
         if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
           __ movdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
         }
         else {
-          __ vextracti32x4(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 0x0);
+          __ vextractf32x4(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), 0x0);
         }
 #endif
         break;
       case Op_VecY:
-#ifndef LP64
+#ifndef _LP64
         __ vmovdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
 #else
         if ((UseAVX < 3) || VM_Version::supports_avx512vl()) {
           __ vmovdqu(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]));
         }
         else {
-          __ vextracti64x4(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), as_XMMRegister(Matcher::_regEncode[reg]), 0x0);
+          __ vextractf64x4(Address(rsp, stack_offset), as_XMMRegister(Matcher::_regEncode[reg]), 0x0);
         }
 #endif
         break;
--- a/src/hotspot/cpu/x86/x86_64.ad	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/cpu/x86/x86_64.ad	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003, 2018, 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
@@ -526,12 +526,6 @@
 
 %}
 
-source_hpp %{
-#if INCLUDE_ZGC
-#include "gc/z/zBarrierSetAssembler.hpp"
-#endif
-%}
-
 //----------SOURCE BLOCK-------------------------------------------------------
 // This is a block of C++ code which provides values, functions, and
 // definitions necessary in the rest of the architecture description
@@ -12840,170 +12834,6 @@
   ins_pipe(pipe_jmp);
 %}
 
-//
-// Execute ZGC load barrier (strong) slow path
-//
-
-// For XMM and YMM enabled processors
-instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
-                                     rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
-                                     rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
-                                     rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
-                                     rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
-
-  match(Set dst (LoadBarrierSlowReg mem));
-  predicate(UseAVX <= 2);
-
-  effect(DEF dst, KILL cr,
-         KILL x0, KILL x1, KILL x2, KILL x3,
-         KILL x4, KILL x5, KILL x6, KILL x7,
-         KILL x8, KILL x9, KILL x10, KILL x11,
-         KILL x12, KILL x13, KILL x14, KILL x15);
-
-  format %{"LoadBarrierSlowRegXmmAndYmm $dst, $mem" %}
-  ins_encode %{
-#if INCLUDE_ZGC
-    Register d = $dst$$Register;
-    ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
-    assert(d != r12, "Can't be R12!");
-    assert(d != r15, "Can't be R15!");
-    assert(d != rsp, "Can't be RSP!");
-
-    __ lea(d, $mem$$Address);
-    __ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
-#else
-    ShouldNotReachHere();
-#endif
-  %}
-  ins_pipe(pipe_slow);
-%}
-
-// For ZMM enabled processors
-instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
-                               rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
-                               rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
-                               rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
-                               rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
-                               rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
-                               rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
-                               rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
-                               rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
-
-  match(Set dst (LoadBarrierSlowReg mem));
-  predicate(UseAVX == 3);
-
-  effect(DEF dst, KILL cr,
-         KILL x0, KILL x1, KILL x2, KILL x3,
-         KILL x4, KILL x5, KILL x6, KILL x7,
-         KILL x8, KILL x9, KILL x10, KILL x11,
-         KILL x12, KILL x13, KILL x14, KILL x15,
-         KILL x16, KILL x17, KILL x18, KILL x19,
-         KILL x20, KILL x21, KILL x22, KILL x23,
-         KILL x24, KILL x25, KILL x26, KILL x27,
-         KILL x28, KILL x29, KILL x30, KILL x31);
-
-  format %{"LoadBarrierSlowRegZmm $dst, $mem" %}
-  ins_encode %{
-#if INCLUDE_ZGC
-    Register d = $dst$$Register;
-    ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
-    assert(d != r12, "Can't be R12!");
-    assert(d != r15, "Can't be R15!");
-    assert(d != rsp, "Can't be RSP!");
-
-    __ lea(d, $mem$$Address);
-    __ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
-#else
-    ShouldNotReachHere();
-#endif
-  %}
-  ins_pipe(pipe_slow);
-%}
-
-//
-// Execute ZGC load barrier (weak) slow path
-//
-
-// For XMM and YMM enabled processors
-instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
-                                         rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
-                                         rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
-                                         rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
-                                         rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
-
-  match(Set dst (LoadBarrierWeakSlowReg mem));
-  predicate(UseAVX <= 2);
-
-  effect(DEF dst, KILL cr,
-         KILL x0, KILL x1, KILL x2, KILL x3,
-         KILL x4, KILL x5, KILL x6, KILL x7,
-         KILL x8, KILL x9, KILL x10, KILL x11,
-         KILL x12, KILL x13, KILL x14, KILL x15);
-
-  format %{"LoadBarrierWeakSlowRegXmmAndYmm $dst, $mem" %}
-  ins_encode %{
-#if INCLUDE_ZGC
-    Register d = $dst$$Register;
-    ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
-    assert(d != r12, "Can't be R12!");
-    assert(d != r15, "Can't be R15!");
-    assert(d != rsp, "Can't be RSP!");
-
-    __ lea(d,$mem$$Address);
-    __ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
-#else
-    ShouldNotReachHere();
-#endif
-  %}
-  ins_pipe(pipe_slow);
-%}
-
-// For ZMM enabled processors
-instruct loadBarrierWeakSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
-                                   rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
-                                   rxmm4 x4, rxmm5 x5, rxmm6 x6, rxmm7 x7,
-                                   rxmm8 x8, rxmm9 x9, rxmm10 x10, rxmm11 x11,
-                                   rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15,
-                                   rxmm16 x16, rxmm17 x17, rxmm18 x18, rxmm19 x19,
-                                   rxmm20 x20, rxmm21 x21, rxmm22 x22, rxmm23 x23,
-                                   rxmm24 x24, rxmm25 x25, rxmm26 x26, rxmm27 x27,
-                                   rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
-
-  match(Set dst (LoadBarrierWeakSlowReg mem));
-  predicate(UseAVX == 3);
-
-  effect(DEF dst, KILL cr,
-         KILL x0, KILL x1, KILL x2, KILL x3,
-         KILL x4, KILL x5, KILL x6, KILL x7,
-         KILL x8, KILL x9, KILL x10, KILL x11,
-         KILL x12, KILL x13, KILL x14, KILL x15,
-         KILL x16, KILL x17, KILL x18, KILL x19,
-         KILL x20, KILL x21, KILL x22, KILL x23,
-         KILL x24, KILL x25, KILL x26, KILL x27,
-         KILL x28, KILL x29, KILL x30, KILL x31);
-
-  format %{"LoadBarrierWeakSlowRegZmm $dst, $mem" %}
-  ins_encode %{
-#if INCLUDE_ZGC
-    Register d = $dst$$Register;
-    ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
-
-    assert(d != r12, "Can't be R12!");
-    assert(d != r15, "Can't be R15!");
-    assert(d != rsp, "Can't be RSP!");
-
-    __ lea(d,$mem$$Address);
-    __ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
-#else
-    ShouldNotReachHere();
-#endif
-  %}
-  ins_pipe(pipe_slow);
-%}
-
 // ============================================================================
 // This name is KNOWN by the ADLC and cannot be changed.
 // The ADLC forces a 'TypeRawPtr::BOTTOM' output type
--- a/src/hotspot/os/linux/os_linux.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/os/linux/os_linux.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1856,6 +1856,36 @@
   return true;
 }
 
+#if defined(S390)
+// keywords_to_match - NULL terminated array of keywords
+static bool print_matching_lines_from_sysinfo_file(outputStream* st, const char* keywords_to_match[]) {
+  const char* filename = "/proc/sysinfo";
+  char* line = NULL;
+  size_t length = 0;
+  FILE* fp = fopen(filename, "r");
+  if (fp == NULL) {
+    return false;
+  }
+
+  st->print_cr("Virtualization information:");
+  while (getline(&line, &length, fp) != -1) {
+    int i = 0;
+    while (keywords_to_match[i] != NULL) {
+      if (strncmp(line, keywords_to_match[i], strlen(keywords_to_match[i])) == 0) {
+        st->print("%s", line);
+        break;
+      }
+      i++;
+    }
+  }
+
+  free(line);
+  fclose(fp);
+
+  return true;
+}
+#endif
+
 void os::print_dll_info(outputStream *st) {
   st->print_cr("Dynamic libraries:");
 
@@ -1939,6 +1969,8 @@
   os::Linux::print_ld_preload_file(st);
 
   os::Linux::print_container_info(st);
+
+  os::Linux::print_virtualization_info(st);
 }
 
 // Try to identify popular distros.
@@ -2152,6 +2184,20 @@
   st->cr();
 }
 
+void os::Linux::print_virtualization_info(outputStream* st) {
+#if defined(S390)
+  // /proc/sysinfo contains interesting information about
+  // - LPAR
+  // - whole "Box" (CPUs )
+  // - z/VM / KVM (VM<nn>); this is not available in an LPAR-only setup
+  const char* kw[] = { "LPAR", "CPUs", "VM", NULL };
+
+  if (! print_matching_lines_from_sysinfo_file(st, kw)) {
+    st->print_cr("  </proc/sysinfo Not Available>");
+  }
+#endif
+}
+
 void os::print_memory_info(outputStream* st) {
 
   st->print("Memory:");
--- a/src/hotspot/os/linux/os_linux.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/os/linux/os_linux.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -110,6 +110,7 @@
 
   static void print_full_memory_info(outputStream* st);
   static void print_container_info(outputStream* st);
+  static void print_virtualization_info(outputStream* st);
   static void print_distro_info(outputStream* st);
   static void print_libversion_info(outputStream* st);
   static void print_proc_sys_info(outputStream* st);
--- a/src/hotspot/share/c1/c1_LIRAssembler.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/c1/c1_LIRAssembler.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -240,7 +240,7 @@
   void align_call(LIR_Code code);
 
   void negate(LIR_Opr left, LIR_Opr dest, LIR_Opr tmp = LIR_OprFact::illegalOpr);
-  void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code, CodeEmitInfo* info);
+  void leal(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_code = lir_patch_none, CodeEmitInfo* info = NULL);
 
   void rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info);
 
--- a/src/hotspot/share/ci/ciArray.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciArray.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -75,7 +75,6 @@
 
   // What kind of ciObject is this?
   bool is_array()        { return true; }
-  bool is_java_object()  { return true; }
 };
 
 #endif // SHARE_CI_CIARRAY_HPP
--- a/src/hotspot/share/ci/ciCallProfile.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciCallProfile.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -79,17 +79,6 @@
     assert(i < _limit, "out of Call Profile MorphismLimit");
     return _receiver[i];
   }
-
-  // Rescale the current profile based on the incoming scale
-  ciCallProfile rescale(double scale) {
-    assert(scale >= 0 && scale <= 1.0, "out of range");
-    ciCallProfile call = *this;
-    call._count = (int)(call._count * scale);
-    for (int i = 0; i < _morphism; i++) {
-      call._receiver_count[i] = (int)(call._receiver_count[i] * scale);
-    }
-    return call;
-  }
 };
 
 #endif // SHARE_CI_CICALLPROFILE_HPP
--- a/src/hotspot/share/ci/ciCallSite.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciCallSite.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, 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
@@ -32,12 +32,6 @@
 bool ciCallSite::is_constant_call_site() {
   return klass()->is_subclass_of(CURRENT_ENV->ConstantCallSite_klass());
 }
-bool ciCallSite::is_mutable_call_site() {
-  return klass()->is_subclass_of(CURRENT_ENV->MutableCallSite_klass());
-}
-bool ciCallSite::is_volatile_call_site() {
-  return klass()->is_subclass_of(CURRENT_ENV->VolatileCallSite_klass());
-}
 
 // ------------------------------------------------------------------
 // ciCallSite::get_target
--- a/src/hotspot/share/ci/ciCallSite.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciCallSite.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -38,8 +38,6 @@
   bool is_call_site() const { return true; }
 
   bool is_constant_call_site();
-  bool is_mutable_call_site();
-  bool is_volatile_call_site();
 
   // Return the target MethodHandle of this CallSite.
   ciMethodHandle* get_target() const;
--- a/src/hotspot/share/ci/ciEnv.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciEnv.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -961,8 +961,15 @@
   return JavaThread::current()->thread_state() == _thread_in_vm;
 }
 
+bool ciEnv::system_dictionary_modification_counter_changed_locked() {
+  assert_locked_or_safepoint(Compile_lock);
+  return _system_dictionary_modification_counter != SystemDictionary::number_of_modifications();
+}
+
 bool ciEnv::system_dictionary_modification_counter_changed() {
-  return _system_dictionary_modification_counter != SystemDictionary::number_of_modifications();
+  VM_ENTRY_MARK;
+  MutexLocker ml(Compile_lock, THREAD); // lock with safepoint check
+  return system_dictionary_modification_counter_changed_locked();
 }
 
 // ------------------------------------------------------------------
@@ -973,7 +980,7 @@
 void ciEnv::validate_compile_task_dependencies(ciMethod* target) {
   if (failing())  return;  // no need for further checks
 
-  bool counter_changed = system_dictionary_modification_counter_changed();
+  bool counter_changed = system_dictionary_modification_counter_changed_locked();
   Dependencies::DepType result = dependencies()->validate_dependencies(_task, counter_changed);
   if (result != Dependencies::end_marker) {
     if (result == Dependencies::call_site_target_value) {
--- a/src/hotspot/share/ci/ciEnv.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciEnv.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -301,6 +301,8 @@
   // respect to method dependencies (e.g. concurrent class loading).
   void validate_compile_task_dependencies(ciMethod* target);
 
+  // Call internally when Compile_lock is already held.
+  bool system_dictionary_modification_counter_changed_locked();
 public:
   enum {
     MethodCompilable,
--- a/src/hotspot/share/ci/ciMethodData.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciMethodData.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -208,15 +208,17 @@
   // Snapshot the data -- actually, take an approximate snapshot of
   // the data.  Any concurrently executing threads may be changing the
   // data as we copy it.
-  Copy::disjoint_words((HeapWord*) mdo,
-                       (HeapWord*) &_orig,
-                       sizeof(_orig) / HeapWordSize);
+  Copy::disjoint_words_atomic((HeapWord*) mdo,
+                              (HeapWord*) &_orig,
+                              sizeof(_orig) / HeapWordSize);
   Arena* arena = CURRENT_ENV->arena();
   _data_size = mdo->data_size();
   _extra_data_size = mdo->extra_data_size();
   int total_size = _data_size + _extra_data_size;
   _data = (intptr_t *) arena->Amalloc(total_size);
-  Copy::disjoint_words((HeapWord*) mdo->data_base(), (HeapWord*) _data, total_size / HeapWordSize);
+  Copy::disjoint_words_atomic((HeapWord*) mdo->data_base(),
+                              (HeapWord*) _data,
+                              total_size / HeapWordSize);
 
   // Traverse the profile data, translating any oops into their
   // ci equivalents.
@@ -535,10 +537,6 @@
   set_bits(_eflags, f);
 }
 
-void ciMethodData::clear_eflag(MethodData::EscapeFlag f) {
-  clear_bits(_eflags, f);
-}
-
 bool ciMethodData::eflag_set(MethodData::EscapeFlag f) const {
   return mask_bits(_eflags, f) != 0;
 }
--- a/src/hotspot/share/ci/ciMethodData.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciMethodData.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -271,11 +271,6 @@
     }
   }
 
-  intptr_t argument_type(int i) const {
-    assert(has_arguments(), "no arg type profiling data");
-    return args()->type(i);
-  }
-
   ciKlass* valid_argument_type(int i) const {
     assert(has_arguments(), "no arg type profiling data");
     return args()->valid_type(i);
@@ -315,11 +310,6 @@
   ciBranchData(DataLayout* layout) : BranchData(layout) {};
 };
 
-class ciArrayData : public ArrayData {
-public:
-  ciArrayData(DataLayout* layout) : ArrayData(layout) {};
-};
-
 class ciMultiBranchData : public MultiBranchData {
 public:
   ciMultiBranchData(DataLayout* layout) : MultiBranchData(layout) {};
@@ -471,10 +461,6 @@
 
   ciArgInfoData *arg_info() const;
 
-  address data_base() const {
-    return (address) _data;
-  }
-
   void prepare_metadata();
   void load_extra_data();
   ciProfileData* bci_to_extra_data(int bci, ciMethod* m, bool& two_free_slots);
@@ -574,7 +560,6 @@
   void update_escape_info();
 
   void set_eflag(MethodData::EscapeFlag f);
-  void clear_eflag(MethodData::EscapeFlag f);
   bool eflag_set(MethodData::EscapeFlag f) const;
 
   void set_arg_local(int i);
--- a/src/hotspot/share/ci/ciNullObject.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciNullObject.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -42,9 +42,6 @@
   void print_impl(outputStream* st);
 
 public:
-  // Is this ciObject a Java Language Object?  That is,
-  // is the ciObject an instance or an array
-  bool is_java_object() { return true; }
 
   // What kind of ciObject is this?
   bool is_null_object() const { return true; }
--- a/src/hotspot/share/ci/ciObject.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciObject.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -115,7 +115,6 @@
   // What kind of ciObject is this?
   virtual bool is_null_object()       const { return false; }
   virtual bool is_call_site()         const { return false; }
-  virtual bool is_cpcache()           const { return false; }
   virtual bool is_instance()                { return false; }
   virtual bool is_member_name()       const { return false; }
   virtual bool is_method_handle()     const { return false; }
--- a/src/hotspot/share/ci/ciStreams.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciStreams.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -235,14 +235,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_constant_cache_index
-// Return the CP cache index, or -1 if there isn't any.
-int ciBytecodeStream::get_constant_cache_index() const {
-  // work-alike for Bytecode_loadconstant::cache_index()
-  return has_cache_index() ? get_constant_raw_index() : -1;
-}
-
-// ------------------------------------------------------------------
 // ciBytecodeStream::get_constant
 //
 // If this bytecode is one of the ldc variants, get the referenced
@@ -330,19 +322,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciBytecodeStream::get_field_signature_index
-//
-// Get the constant pool index of the signature of the field
-// referenced by the current bytecode.  Used for generating
-// deoptimization information.
-int ciBytecodeStream::get_field_signature_index() {
-  VM_ENTRY_MARK;
-  ConstantPool* cpool = _holder->get_instanceKlass()->constants();
-  int nt_index = cpool->name_and_type_ref_index_at(get_field_index());
-  return cpool->signature_ref_index_at(nt_index);
-}
-
-// ------------------------------------------------------------------
 // ciBytecodeStream::get_method_index
 //
 // If this is a method invocation bytecode, get the constant pool
@@ -486,13 +465,3 @@
   )
 }
 
-// ------------------------------------------------------------------
-// ciBytecodeStream::get_resolved_references
-ciObjArray* ciBytecodeStream::get_resolved_references() {
-    VM_ENTRY_MARK;
-    // Get the constant pool.
-  ConstantPool*        cpool   = _holder->get_instanceKlass()->constants();
-
-  // Create a resolved references array and return it.
-  return CURRENT_ENV->get_object(cpool->resolved_references())->as_obj_array();
-  }
--- a/src/hotspot/share/ci/ciStreams.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciStreams.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -70,12 +70,6 @@
     _start = _pc = base; _end = base + size;
   }
 
-  void assert_wide(bool require_wide) const {
-    if (require_wide)
-         { assert(is_wide(),  "must be a wide instruction"); }
-    else { assert(!is_wide(), "must not be a wide instruction"); }
-  }
-
   Bytecode bytecode() const { return Bytecode(this, _bc_start); }
   Bytecode next_bytecode() const { return Bytecode(this, _pc); }
 
@@ -155,10 +149,6 @@
     return bytecode().get_index_u1(cur_bc_raw());
   }
 
-  int get_index_u1_cpcache() const {
-    return bytecode().get_index_u1_cpcache(cur_bc_raw());
-  }
-
   // Get a byte index following this bytecode.
   // If prefixed with a wide bytecode, get a wide index.
   int get_index() const {
@@ -218,16 +208,12 @@
   int get_int_table( int index ) const {
     return Bytes::get_Java_u4((address)&_table_base[index]); }
 
-  // For tableswitch - get length of offset part
-  int get_tableswitch_length()  { return get_int_table(2)-get_int_table(1)+1; }
-
   int get_dest_table( int index ) const {
     return cur_bci() + get_int_table(index); }
 
   // --- Constant pool access ---
   int get_constant_raw_index() const;
   int get_constant_pool_index() const;
-  int get_constant_cache_index() const;
   int get_field_index();
   int get_method_index();
 
@@ -256,7 +242,6 @@
 
   ciInstanceKlass* get_declared_field_holder();
   int      get_field_holder_index();
-  int      get_field_signature_index();
 
   ciMethod*     get_method(bool& will_link, ciSignature* *declared_signature_result);
   bool          has_appendix();
@@ -267,8 +252,6 @@
   int           get_method_holder_index();
   int           get_method_signature_index(const constantPoolHandle& cpool);
 
-  // Get the resolved references arrays from the constant pool
-  ciObjArray* get_resolved_references();
 };
 
 
--- a/src/hotspot/share/ci/ciTypeFlow.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciTypeFlow.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 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
@@ -2519,22 +2519,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciTypeFlow::PostOrderLoops::next
-//
-// Advance to next loop tree using a postorder, left-to-right traversal.
-void ciTypeFlow::PostorderLoops::next() {
-  assert(!done(), "must not be done.");
-  if (_current->sibling() != NULL) {
-    _current = _current->sibling();
-    while (_current->child() != NULL) {
-      _current = _current->child();
-    }
-  } else {
-    _current = _current->parent();
-  }
-}
-
-// ------------------------------------------------------------------
 // ciTypeFlow::PreOrderLoops::next
 //
 // Advance to next loop tree using a preorder, left-to-right traversal.
--- a/src/hotspot/share/ci/ciTypeFlow.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciTypeFlow.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -769,22 +769,6 @@
     void print(outputStream* st = tty, int indent = 0) const PRODUCT_RETURN;
   };
 
-  // Postorder iteration over the loop tree.
-  class PostorderLoops : public StackObj {
-  private:
-    Loop* _root;
-    Loop* _current;
-  public:
-    PostorderLoops(Loop* root) : _root(root), _current(root) {
-      while (_current->child() != NULL) {
-        _current = _current->child();
-      }
-    }
-    bool done() { return _current == NULL; }  // Finished iterating?
-    void next();                            // Advance to next loop
-    Loop* current() { return _current; }      // Return current loop.
-  };
-
   // Preorder iteration over the loop tree.
   class PreorderLoops : public StackObj {
   private:
@@ -861,7 +845,6 @@
   int start_block_num() const       { return 0; }
   Block* rpo_at(int rpo) const      { assert(0 <= rpo && rpo < block_count(), "out of bounds");
                                       return _block_map[rpo]; }
-  int next_pre_order()              { return _next_pre_order; }
   int inc_next_pre_order()          { return _next_pre_order++; }
 
   ciType* mark_as_never_null(ciType* type);
--- a/src/hotspot/share/ci/ciUtilities.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciUtilities.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -42,13 +42,6 @@
 }
 
 // ------------------------------------------------------------------
-// basictype_to_char
-const char basictype_to_char(BasicType t) {
-  char c = type2char(t);
-  return c ? c : 'X';
-}
-
-// ------------------------------------------------------------------
 // card_table_base
 jbyte *ci_card_table_address() {
   BarrierSet* bs = BarrierSet::barrier_set();
--- a/src/hotspot/share/ci/ciUtilities.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/ci/ciUtilities.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -49,7 +49,6 @@
 }
 
 const char* basictype_to_str(BasicType t);
-const char  basictype_to_char(BasicType t);
 
 jbyte *ci_card_table_address();
 template <typename T> T ci_card_table_address_as() {
--- a/src/hotspot/share/classfile/classLoader.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/classLoader.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, 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
@@ -1724,7 +1724,7 @@
 
   {
     MutexLocker ml(Module_lock, THREAD);
-    ModuleEntry* jb_module = null_cld_modules->locked_create_entry_or_null(Handle(),
+    ModuleEntry* jb_module = null_cld_modules->locked_create_entry(Handle(),
                                false, vmSymbols::java_base(), NULL, NULL, null_cld);
     if (jb_module == NULL) {
       vm_exit_during_initialization("Unable to create ModuleEntry for " JAVA_BASE_NAME);
--- a/src/hotspot/share/classfile/moduleEntry.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/moduleEntry.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -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
@@ -398,23 +398,22 @@
   Hashtable<Symbol*, mtModule>::add_entry(index, (HashtableEntry<Symbol*, mtModule>*)new_entry);
 }
 
-ModuleEntry* ModuleEntryTable::locked_create_entry_or_null(Handle module_handle,
-                                                           bool is_open,
-                                                           Symbol* module_name,
-                                                           Symbol* module_version,
-                                                           Symbol* module_location,
-                                                           ClassLoaderData* loader_data) {
-  assert(module_name != NULL, "ModuleEntryTable locked_create_entry_or_null should never be called for unnamed module.");
+// Create an entry in the class loader's module_entry_table.  It is the
+// caller's responsibility to ensure that the entry has not already been
+// created.
+ModuleEntry* ModuleEntryTable::locked_create_entry(Handle module_handle,
+                                                   bool is_open,
+                                                   Symbol* module_name,
+                                                   Symbol* module_version,
+                                                   Symbol* module_location,
+                                                   ClassLoaderData* loader_data) {
+  assert(module_name != NULL, "ModuleEntryTable locked_create_entry should never be called for unnamed module.");
   assert(Module_lock->owned_by_self(), "should have the Module_lock");
-  // Check if module already exists.
-  if (lookup_only(module_name) != NULL) {
-    return NULL;
-  } else {
-    ModuleEntry* entry = new_entry(compute_hash(module_name), module_handle, is_open, module_name,
-                                   module_version, module_location, loader_data);
-    add_entry(index_for(module_name), entry);
-    return entry;
-  }
+  assert(lookup_only(module_name) == NULL, "Module already exists");
+  ModuleEntry* entry = new_entry(compute_hash(module_name), module_handle, is_open, module_name,
+                                 module_version, module_location, loader_data);
+  add_entry(index_for(module_name), entry);
+  return entry;
 }
 
 // lookup_only by Symbol* to find a ModuleEntry.
--- a/src/hotspot/share/classfile/moduleEntry.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/moduleEntry.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -236,14 +236,14 @@
     return (ModuleEntry*)Hashtable<Symbol*, mtModule>::bucket(i);
   }
 
-  // Create module in loader's module entry table, if already exists then
-  // return null.  Assume Module_lock has been locked by caller.
-  ModuleEntry* locked_create_entry_or_null(Handle module_handle,
-                                           bool is_open,
-                                           Symbol* module_name,
-                                           Symbol* module_version,
-                                           Symbol* module_location,
-                                           ClassLoaderData* loader_data);
+  // Create module in loader's module entry table.  Assume Module_lock
+  // has been locked by caller.
+  ModuleEntry* locked_create_entry(Handle module_handle,
+                                   bool is_open,
+                                   Symbol* module_name,
+                                   Symbol* module_version,
+                                   Symbol* module_location,
+                                   ClassLoaderData* loader_data);
 
   // Only lookup module within loader's module entry table.  The table read is lock-free.
   ModuleEntry* lookup_only(Symbol* name);
@@ -253,7 +253,10 @@
 
   // Special handling for java.base
   static ModuleEntry* javabase_moduleEntry()                   { return _javabase_module; }
-  static void set_javabase_moduleEntry(ModuleEntry* java_base) { _javabase_module = java_base; }
+  static void set_javabase_moduleEntry(ModuleEntry* java_base) {
+    assert(_javabase_module == NULL, "_javabase_module is already defined");
+    _javabase_module = java_base;
+  }
 
   static bool javabase_defined() { return ((_javabase_module != NULL) &&
                                            (_javabase_module->module() != NULL)); }
--- a/src/hotspot/share/classfile/modules.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/modules.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -208,10 +208,9 @@
       // loop through and add any new packages for java.base
       for (int x = 0; x < pkg_list->length(); x++) {
         // Some of java.base's packages were added early in bootstrapping, ignore duplicates.
-        PackageEntry* pkg =
-          package_table->locked_create_entry_or_null(pkg_list->at(x),
-                                                     ModuleEntryTable::javabase_moduleEntry());
-        assert(pkg != NULL || package_table->locked_lookup_only(pkg_list->at(x)) != NULL,
+        package_table->locked_create_entry_if_not_exist(pkg_list->at(x),
+                                                        ModuleEntryTable::javabase_moduleEntry());
+        assert(package_table->locked_lookup_only(pkg_list->at(x)) != NULL,
                "Unable to create a " JAVA_BASE_NAME " package entry");
         // Unable to have a GrowableArray of TempNewSymbol.  Must decrement the refcount of
         // the Symbol* that was created above for each package. The refcount was incremented
@@ -402,20 +401,17 @@
 
     // Add the module and its packages.
     if (!dupl_modules && existing_pkg == NULL) {
-      // Create the entry for this module in the class loader's module entry table.
-      ModuleEntry* module_entry = module_table->locked_create_entry_or_null(module_handle,
+      if (module_table->lookup_only(module_symbol) == NULL) {
+        // Create the entry for this module in the class loader's module entry table.
+        ModuleEntry* module_entry = module_table->locked_create_entry(module_handle,
                                     (is_open == JNI_TRUE), module_symbol,
                                     version_symbol, location_symbol, loader_data);
+        assert(module_entry != NULL, "module_entry creation failed");
 
-      if (module_entry == NULL) {
-        dupl_modules = true;
-      } else {
         // Add the packages.
         assert(pkg_list->length() == 0 || package_table != NULL, "Bad package table");
-        PackageEntry* pkg;
         for (int y = 0; y < pkg_list->length(); y++) {
-          pkg = package_table->locked_create_entry_or_null(pkg_list->at(y), module_entry);
-          assert(pkg != NULL, "Unable to create a module's package entry");
+          package_table->locked_create_entry(pkg_list->at(y), module_entry);
 
           // Unable to have a GrowableArray of TempNewSymbol.  Must decrement the refcount of
           // the Symbol* that was created above for each package. The refcount was incremented
@@ -425,6 +421,8 @@
 
         // Store pointer to ModuleEntry record in java.lang.Module object.
         java_lang_Module::set_module_entry(module_handle(), module_entry);
+      } else {
+         dupl_modules = true;
       }
     }
   }  // Release the lock
--- a/src/hotspot/share/classfile/packageEntry.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/packageEntry.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -211,17 +211,22 @@
   Hashtable<Symbol*, mtModule>::add_entry(index, (HashtableEntry<Symbol*, mtModule>*)new_entry);
 }
 
-// Create package in loader's package entry table and return the entry.
-// If entry already exists, return null.  Assume Module lock was taken by caller.
-PackageEntry* PackageEntryTable::locked_create_entry_or_null(Symbol* name, ModuleEntry* module) {
+// Create package entry in loader's package entry table.  Assume Module lock
+// was taken by caller.
+void PackageEntryTable::locked_create_entry(Symbol* name, ModuleEntry* module) {
   assert(Module_lock->owned_by_self(), "should have the Module_lock");
-  // Check if package already exists.  Return NULL if it does.
-  if (locked_lookup_only(name) != NULL) {
-    return NULL;
-  } else {
-    PackageEntry* entry = new_entry(compute_hash(name), name, module);
-    add_entry(index_for(name), entry);
-    return entry;
+  assert(locked_lookup_only(name) == NULL, "Package entry already exists");
+  PackageEntry* entry = new_entry(compute_hash(name), name, module);
+  add_entry(index_for(name), entry);
+}
+
+// Create package entry in loader's package entry table if it does not already
+// exist.  Assume Module lock was taken by caller.
+void PackageEntryTable::locked_create_entry_if_not_exist(Symbol* name, ModuleEntry* module) {
+  assert(Module_lock->owned_by_self(), "should have the Module_lock");
+  // Check if package entry already exists.  If not, create it.
+  if (locked_lookup_only(name) == NULL) {
+    locked_create_entry(name, module);
   }
 }
 
--- a/src/hotspot/share/classfile/packageEntry.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/packageEntry.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -246,9 +246,13 @@
     return (PackageEntry*)Hashtable<Symbol*, mtModule>::bucket(i);
   }
 
-  // Create package in loader's package entry table and return the entry.
-  // If entry already exists, return null.  Assume Module lock was taken by caller.
-  PackageEntry* locked_create_entry_or_null(Symbol* name, ModuleEntry* module);
+  // Create package entry in loader's package entry table.  Assume Module
+  // lock was taken by caller.
+  void locked_create_entry(Symbol* name, ModuleEntry* module);
+
+  // Create package entry in loader's package entry table if it does not
+  // already exist.  Assume Module lock was taken by caller.
+  void locked_create_entry_if_not_exist(Symbol* name, ModuleEntry* module);
 
   // Lookup Package with loader's package entry table, add it if not found.
   // This will acquire the Module lock.
--- a/src/hotspot/share/classfile/stringTable.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/stringTable.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, 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
@@ -376,68 +376,11 @@
   } while(true);
 }
 
-// GC support
-class StringTableIsAliveCounter : public BoolObjectClosure {
-  BoolObjectClosure* _real_boc;
- public:
-  size_t _count;
-  size_t _count_total;
-  StringTableIsAliveCounter(BoolObjectClosure* boc) : _real_boc(boc), _count(0),
-                                                      _count_total(0) {}
-  bool do_object_b(oop obj) {
-    bool ret = _real_boc->do_object_b(obj);
-    if (!ret) {
-      ++_count;
-    }
-    ++_count_total;
-    return ret;
-  }
-};
-
-void StringTable::unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f,
-                                    size_t* processed, size_t* removed) {
-  DoNothingClosure dnc;
-  assert(is_alive != NULL, "No closure");
-  StringTableIsAliveCounter stiac(is_alive);
-  OopClosure* tmp = f != NULL ? f : &dnc;
-
-  StringTable::the_table()->_weak_handles->weak_oops_do(&stiac, tmp);
-
-  // This is the serial case without ParState.
-  // Just set the correct number and check for a cleaning phase.
-  the_table()->_uncleaned_items_count = stiac._count;
-  StringTable::the_table()->check_concurrent_work();
-
-  if (processed != NULL) {
-    *processed = stiac._count_total;
-  }
-  if (removed != NULL) {
-    *removed = stiac._count;
-  }
-}
-
 void StringTable::oops_do(OopClosure* f) {
   assert(f != NULL, "No closure");
   StringTable::the_table()->_weak_handles->oops_do(f);
 }
 
-void StringTable::possibly_parallel_unlink(
-   OopStorage::ParState<false, false>* _par_state_string, BoolObjectClosure* cl,
-   size_t* processed, size_t* removed)
-{
-  DoNothingClosure dnc;
-  assert(cl != NULL, "No closure");
-  StringTableIsAliveCounter stiac(cl);
-
-  _par_state_string->weak_oops_do(&stiac, &dnc);
-
-  // Accumulate the dead strings.
-  the_table()->add_items_to_clean(stiac._count);
-
-  *processed = stiac._count_total;
-  *removed = stiac._count;
-}
-
 void StringTable::possibly_parallel_oops_do(
    OopStorage::ParState<false /* concurrent */, false /* const */>*
    _par_state_string, OopClosure* f)
--- a/src/hotspot/share/classfile/stringTable.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/classfile/stringTable.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -128,20 +128,10 @@
     the_table()->add_items_to_clean(ndead);
   }
 
-  //   Delete pointers to otherwise-unreachable objects.
-  static void unlink(BoolObjectClosure* cl) {
-    unlink_or_oops_do(cl);
-  }
-  static void unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f = NULL,
-                                size_t* processed = NULL, size_t* removed = NULL);
-
   // Serially invoke "f->do_oop" on the locations of all oops in the table.
   static void oops_do(OopClosure* f);
 
   // Possibly parallel versions of the above
-  static void possibly_parallel_unlink(
-     OopStorage::ParState<false /* concurrent */, false /* const*/>* par_state_string,
-     BoolObjectClosure* cl, size_t* processed, size_t* removed);
   static void possibly_parallel_oops_do(
      OopStorage::ParState<false /* concurrent */, false /* const*/>* par_state_string,
      OopClosure* f);
--- a/src/hotspot/share/code/codeHeapState.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/code/codeHeapState.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -78,43 +78,134 @@
 //  - direct output into an argument-passed outputStream and
 //  - buffered output into a bufferedStream with subsequent flush
 //    of the filled buffer to the outputStream.
-#define USE_STRINGSTREAM
-#define HEX32_FORMAT  "0x%x"  // just a helper format string used below multiple times
+#define USE_BUFFEREDSTREAM
+
+// There are instances when composing an output line or a small set of
+// output lines out of many tty->print() calls creates significant overhead.
+// Writing to a bufferedStream buffer first has a significant advantage:
+// It uses noticeably less cpu cycles and reduces (when writing to a
+// network file) the required bandwidth by at least a factor of ten. Observed on MacOS.
+// That clearly makes up for the increased code complexity.
 //
-// Writing to a bufferedStream buffer first has a significant advantage:
-// It uses noticeably less cpu cycles and reduces (when wirting to a
-// network file) the required bandwidth by at least a factor of ten.
-// That clearly makes up for the increased code complexity.
-#if defined(USE_STRINGSTREAM)
-#define STRINGSTREAM_DECL(_anyst, _outst)                 \
-    /* _anyst  name of the stream as used in the code */  \
-    /* _outst  stream where final output will go to   */  \
-    ResourceMark rm;                                      \
-    bufferedStream   _sstobj = bufferedStream(4*K);       \
-    bufferedStream*  _sstbuf = &_sstobj;                  \
-    outputStream*    _outbuf = _outst;                    \
-    bufferedStream*  _anyst  = &_sstobj; /* any stream. Use this to just print - no buffer flush.  */
+// Conversion of existing code is easy and straightforward, if the code already
+// uses a parameterized output destination, e.g. "outputStream st".
+//  - rename the formal parameter to any other name, e.g. out_st.
+//  - at a suitable place in your code, insert
+//      BUFFEREDSTEAM_DECL(buf_st, out_st)
+// This will provide all the declarations necessary. After that, all
+// buf_st->print() (and the like) calls will be directed to a bufferedStream object.
+// Once a block of output (a line or a small set of lines) is composed, insert
+//      BUFFEREDSTREAM_FLUSH(termstring)
+// to flush the bufferedStream to the final destination out_st. termstring is just
+// an arbitrary string (e.g. "\n") which is appended to the bufferedStream before
+// being written to out_st. Be aware that the last character written MUST be a '\n'.
+// Otherwise, buf_st->position() does not correspond to out_st->position() any longer.
+//      BUFFEREDSTREAM_FLUSH_LOCKED(termstring)
+// does the same thing, protected by the ttyLocker lock.
+//      BUFFEREDSTREAM_FLUSH_IF(termstring, remSize)
+// does a flush only if the remaining buffer space is less than remSize.
+//
+// To activate, #define USE_BUFFERED_STREAM before including this header.
+// If not activated, output will directly go to the originally used outputStream
+// with no additional overhead.
+//
+#if defined(USE_BUFFEREDSTREAM)
+// All necessary declarations to print via a bufferedStream
+// This macro must be placed before any other BUFFEREDSTREAM*
+// macro in the function.
+#define BUFFEREDSTREAM_DECL_SIZE(_anyst, _outst, _capa)       \
+    ResourceMark         _rm;                                 \
+    /* _anyst  name of the stream as used in the code */      \
+    /* _outst  stream where final output will go to   */      \
+    /* _capa   allocated capacity of stream buffer    */      \
+    size_t           _nflush = 0;                             \
+    size_t     _nforcedflush = 0;                             \
+    size_t      _nsavedflush = 0;                             \
+    size_t     _nlockedflush = 0;                             \
+    size_t     _nflush_bytes = 0;                             \
+    size_t         _capacity = _capa;                         \
+    bufferedStream   _sstobj = bufferedStream(_capa);         \
+    bufferedStream*  _sstbuf = &_sstobj;                      \
+    outputStream*    _outbuf = _outst;                        \
+    bufferedStream*   _anyst = &_sstobj; /* any stream. Use this to just print - no buffer flush.  */
 
-#define STRINGSTREAM_FLUSH(termString)                    \
-    _sstbuf->print("%s", termString);                     \
-    _outbuf->print("%s", _sstbuf->as_string());           \
-    _sstbuf->reset();
+// Same as above, but with fixed buffer size.
+#define BUFFEREDSTREAM_DECL(_anyst, _outst)                   \
+    BUFFEREDSTREAM_DECL_SIZE(_anyst, _outst, 4*K);
 
-#define STRINGSTREAM_FLUSH_LOCKED(termString)             \
-    { ttyLocker ttyl;/* keep this output block together */\
-      STRINGSTREAM_FLUSH(termString)                      \
+// Flush the buffer contents unconditionally.
+// No action if the buffer is empty.
+#define BUFFEREDSTREAM_FLUSH(_termString)                     \
+    if (((_termString) != NULL) && (strlen(_termString) > 0)){\
+      _sstbuf->print("%s", _termString);                      \
+    }                                                         \
+    if (_sstbuf != _outbuf) {                                 \
+      if (_sstbuf->size() != 0) {                             \
+        _nforcedflush++; _nflush_bytes += _sstbuf->size();    \
+        _outbuf->print("%s", _sstbuf->as_string());           \
+        _sstbuf->reset();                                     \
+      }                                                       \
     }
+
+// Flush the buffer contents if the remaining capacity is
+// less than the given threshold.
+#define BUFFEREDSTREAM_FLUSH_IF(_termString, _remSize)        \
+    if (((_termString) != NULL) && (strlen(_termString) > 0)){\
+      _sstbuf->print("%s", _termString);                      \
+    }                                                         \
+    if (_sstbuf != _outbuf) {                                 \
+      if ((_capacity - _sstbuf->size()) < (size_t)(_remSize)){\
+        _nflush++; _nforcedflush--;                           \
+        BUFFEREDSTREAM_FLUSH("")                              \
+      } else {                                                \
+        _nsavedflush++;                                       \
+      }                                                       \
+    }
+
+// Flush the buffer contents if the remaining capacity is less
+// than the calculated threshold (256 bytes + capacity/16)
+// That should suffice for all reasonably sized output lines.
+#define BUFFEREDSTREAM_FLUSH_AUTO(_termString)                \
+    BUFFEREDSTREAM_FLUSH_IF(_termString, 256+(_capacity>>4))
+
+#define BUFFEREDSTREAM_FLUSH_LOCKED(_termString)              \
+    { ttyLocker ttyl;/* keep this output block together */    \
+      _nlockedflush++;                                        \
+      BUFFEREDSTREAM_FLUSH(_termString)                       \
+    }
+
+// #define BUFFEREDSTREAM_FLUSH_STAT()                           \
+//     if (_sstbuf != _outbuf) {                                 \
+//       _outbuf->print_cr("%ld flushes (buffer full), %ld forced, %ld locked, %ld bytes total, %ld flushes saved", _nflush, _nforcedflush, _nlockedflush, _nflush_bytes, _nsavedflush); \
+//    }
+
+#define BUFFEREDSTREAM_FLUSH_STAT()
 #else
-#define STRINGSTREAM_DECL(_anyst, _outst)                 \
-    outputStream*  _outbuf = _outst;                      \
+#define BUFFEREDSTREAM_DECL_SIZE(_anyst, _outst, _capa)       \
+    size_t       _capacity = _capa;                           \
+    outputStream*  _outbuf = _outst;                          \
     outputStream*  _anyst  = _outst;   /* any stream. Use this to just print - no buffer flush.  */
 
-#define STRINGSTREAM_FLUSH(termString)                    \
-    _outbuf->print("%s", termString);
+#define BUFFEREDSTREAM_DECL(_anyst, _outst)                   \
+    BUFFEREDSTREAM_DECL_SIZE(_anyst, _outst, 4*K)
 
-#define STRINGSTREAM_FLUSH_LOCKED(termString)             \
-    _outbuf->print("%s", termString);
+#define BUFFEREDSTREAM_FLUSH(_termString)                     \
+    if (((_termString) != NULL) && (strlen(_termString) > 0)){\
+      _outbuf->print("%s", _termString);                      \
+    }
+
+#define BUFFEREDSTREAM_FLUSH_IF(_termString, _remSize)        \
+    BUFFEREDSTREAM_FLUSH(_termString)
+
+#define BUFFEREDSTREAM_FLUSH_AUTO(_termString)                \
+    BUFFEREDSTREAM_FLUSH(_termString)
+
+#define BUFFEREDSTREAM_FLUSH_LOCKED(_termString)              \
+    BUFFEREDSTREAM_FLUSH(_termString)
+
+#define BUFFEREDSTREAM_FLUSH_STAT()
 #endif
+#define HEX32_FORMAT  "0x%x"  // just a helper format string used below multiple times
 
 const char  blobTypeChar[] = {' ', 'C', 'N', 'I', 'X', 'Z', 'U', 'R', '?', 'D', 'T', 'E', 'S', 'A', 'M', 'B', 'L' };
 const char* blobTypeName[] = {"noType"
@@ -461,7 +552,7 @@
                                   // results in StatArray size of 24M (= max_granules * 48 Bytes per element)
                                   // For a 1GB CodeHeap, the granule size must be at least 2kB to not violate the max_granles limit.
   const char* heapName   = get_heapName(heap);
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   if (!initialization_complete) {
     memset(CodeHeapStatArray, 0, sizeof(CodeHeapStatArray));
@@ -477,7 +568,7 @@
                   "   to help them understand and solve issues in customer systems.\n"
                   "   It is not intended for use and interpretation by other persons.\n"
                   "   \n");
-    STRINGSTREAM_FLUSH("")
+    BUFFEREDSTREAM_FLUSH("")
   }
   get_HeapStatGlobals(out, heapName);
 
@@ -493,13 +584,13 @@
 
   if (seg_size == 0) {
     printBox(ast, '-', "Heap not fully initialized yet, segment size is zero for segment ", heapName);
-    STRINGSTREAM_FLUSH("")
+    BUFFEREDSTREAM_FLUSH("")
     return;
   }
 
   if (!CodeCache_lock->owned_by_self()) {
     printBox(ast, '-', "aggregate function called without holding the CodeCache_lock for ", heapName);
-    STRINGSTREAM_FLUSH("")
+    BUFFEREDSTREAM_FLUSH("")
     return;
   }
 
@@ -555,7 +646,7 @@
   ast->print_cr("   CodeHeap (committed part) is mapped to " SIZE_FORMAT " granules of size " SIZE_FORMAT " bytes.", granules, granularity);
   ast->print_cr("   Each granule takes " SIZE_FORMAT " bytes of C heap, that is " SIZE_FORMAT "K in total for statistics data.", sizeof(StatElement), (sizeof(StatElement)*granules)/(size_t)K);
   ast->print_cr("   The number of granules is limited to %dk, requiring a granules size of at least %d bytes for a 1GB heap.", (unsigned int)(max_granules/K), (unsigned int)(G/max_granules));
-  STRINGSTREAM_FLUSH("\n")
+  BUFFEREDSTREAM_FLUSH("\n")
 
 
   while (!done) {
@@ -644,7 +735,7 @@
         insane = true; ast->print_cr("Sanity check: end index (%d) lower than begin index (%d)", ix_end, ix_beg);
       }
       if (insane) {
-        STRINGSTREAM_FLUSH("")
+        BUFFEREDSTREAM_FLUSH("")
         continue;
       }
 
@@ -1033,7 +1124,7 @@
         avgTemp = 0;
         ast->print_cr("No hotness data available");
       }
-      STRINGSTREAM_FLUSH("\n")
+      BUFFEREDSTREAM_FLUSH("\n")
 
       // This loop is intentionally printing directly to "out".
       // It should not print anything, anyway.
@@ -1115,7 +1206,7 @@
                   "   Subsequent print functions create their output based on this snapshot.\n");
     ast->print_cr("   Free space in %s is distributed over %d free blocks.", heapName, nBlocks_free);
     ast->print_cr("   Each free block takes " SIZE_FORMAT " bytes of C heap for statistics data, that is " SIZE_FORMAT "K in total.", sizeof(FreeBlk), (sizeof(FreeBlk)*nBlocks_free)/K);
-    STRINGSTREAM_FLUSH("\n")
+    BUFFEREDSTREAM_FLUSH("\n")
 
     //----------------------------------------
     //--  Prepare the FreeArray of FreeBlks --
@@ -1151,7 +1242,7 @@
     if (ix != alloc_freeBlocks) {
       ast->print_cr("Free block count mismatch. Expected %d free blocks, but found %d.", alloc_freeBlocks, ix);
       ast->print_cr("I will update the counter and retry data collection");
-      STRINGSTREAM_FLUSH("\n")
+      BUFFEREDSTREAM_FLUSH("\n")
       nBlocks_free = ix;
       continue;
     }
@@ -1165,7 +1256,7 @@
       ast->print_cr("Free block count mismatch could not be resolved.");
       ast->print_cr("Try to run \"aggregate\" function to update counters");
     }
-    STRINGSTREAM_FLUSH("")
+    BUFFEREDSTREAM_FLUSH("")
 
     //---< discard old array and update global values  >---
     discard_FreeArray(out);
@@ -1199,7 +1290,7 @@
   set_HeapStatGlobals(out, heapName);
 
   printBox(ast, '=', "C O D E   H E A P   A N A L Y S I S   C O M P L E T E   for segment ", heapName);
-  STRINGSTREAM_FLUSH("\n")
+  BUFFEREDSTREAM_FLUSH("\n")
 }
 
 
@@ -1214,7 +1305,7 @@
   if ((StatArray == NULL) || (TopSizeArray == NULL) || (used_topSizeBlocks == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   {
     printBox(ast, '=', "U S E D   S P A C E   S T A T I S T I C S   for ", heapName);
@@ -1226,7 +1317,7 @@
                   "      is not continuously held, the displayed name might be wrong or no name\n"
                   "      might be found at all. The likelihood for that to happen increases\n"
                   "      over time passed between analysis and print step.\n", used_topSizeBlocks);
-    STRINGSTREAM_FLUSH_LOCKED("\n")
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n")
   }
 
   //----------------------------
@@ -1246,7 +1337,7 @@
     ast->fill_to(66);
     ast->print_cr("%6s", "method");
     ast->print_cr("%18s %13s %17s %4s %9s  %5s %s",      "Addr(module)      ", "offset", "size", "type", " type lvl", " temp", "Name");
-    STRINGSTREAM_FLUSH_LOCKED("")
+    BUFFEREDSTREAM_FLUSH_LOCKED("")
 
     //---<  print Top Ten Used Blocks  >---
     if (used_topSizeBlocks > 0) {
@@ -1324,17 +1415,17 @@
           ast->fill_to(67+6);
           ast->print("%s", blob_name);
         }
-        STRINGSTREAM_FLUSH_LOCKED("\n")
+        ast->cr();
+        BUFFEREDSTREAM_FLUSH_AUTO("")
       }
       if (used_topSizeBlocks != printed_topSizeBlocks) {
         ast->print_cr("used blocks: %d, printed blocks: %d", used_topSizeBlocks, printed_topSizeBlocks);
-        STRINGSTREAM_FLUSH("")
         for (unsigned int i = 0; i < alloc_topSizeBlocks; i++) {
           ast->print_cr("  TopSizeArray[%d].index = %d, len = %d", i, TopSizeArray[i].index, TopSizeArray[i].len);
-          STRINGSTREAM_FLUSH("")
+          BUFFEREDSTREAM_FLUSH_AUTO("")
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("\n\n")
+      BUFFEREDSTREAM_FLUSH("\n\n")
     }
   }
 
@@ -1359,7 +1450,7 @@
                     "      %ld characters are printed per percentage point.\n", pctFactor/100);
       ast->print_cr("total size   of all blocks: %7ldM", (total_size<<log2_seg_size)/M);
       ast->print_cr("total number of all blocks: %7ld\n", total_count);
-      STRINGSTREAM_FLUSH_LOCKED("")
+      BUFFEREDSTREAM_FLUSH_LOCKED("")
 
       ast->print_cr("[Size Range)------avg.-size-+----count-+");
       for (unsigned int i = 0; i < nSizeDistElements; i++) {
@@ -1388,9 +1479,10 @@
           ast->print("%c", (j%((pctFactor/100)*10) == 0) ? ('0'+j/(((unsigned int)pctFactor/100)*10)) : '*');
         }
         ast->cr();
+        BUFFEREDSTREAM_FLUSH_AUTO("")
       }
-      ast->print_cr("----------------------------+----------+\n\n");
-      STRINGSTREAM_FLUSH_LOCKED("\n")
+      ast->print_cr("----------------------------+----------+");
+      BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
 
       printBox(ast, '-', "Contribution per size range to total size for ", heapName);
       ast->print_cr("Note: The histogram indicates how much space (as a percentage of all\n"
@@ -1398,7 +1490,7 @@
                     "      %ld characters are printed per percentage point.\n", pctFactor/100);
       ast->print_cr("total size   of all blocks: %7ldM", (total_size<<log2_seg_size)/M);
       ast->print_cr("total number of all blocks: %7ld\n", total_count);
-      STRINGSTREAM_FLUSH_LOCKED("")
+      BUFFEREDSTREAM_FLUSH_LOCKED("")
 
       ast->print_cr("[Size Range)------avg.-size-+----count-+");
       for (unsigned int i = 0; i < nSizeDistElements; i++) {
@@ -1427,9 +1519,10 @@
           ast->print("%c", (j%((pctFactor/100)*10) == 0) ? ('0'+j/(((unsigned int)pctFactor/100)*10)) : '*');
         }
         ast->cr();
+        BUFFEREDSTREAM_FLUSH_AUTO("")
       }
       ast->print_cr("----------------------------+----------+");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
+      BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
     }
   }
 }
@@ -1446,7 +1539,7 @@
   if ((StatArray == NULL) || (FreeArray == NULL) || (alloc_granules == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   {
     printBox(ast, '=', "F R E E   S P A C E   S T A T I S T I C S   for ", heapName);
@@ -1455,12 +1548,11 @@
                   "      unoccupied, e.g. by class unloading. Then, the two adjacent free\n"
                   "      blocks, together with the now unoccupied space, form a new, large\n"
                   "      free block.");
-    STRINGSTREAM_FLUSH_LOCKED("\n")
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n")
   }
 
   {
     printBox(ast, '-', "List of all Free Blocks in ", heapName);
-    STRINGSTREAM_FLUSH_LOCKED("")
 
     unsigned int ix = 0;
     for (ix = 0; ix < alloc_freeBlocks-1; ix++) {
@@ -1472,10 +1564,11 @@
       if (FreeArray[ix].stubs_in_gap) {
         ast->print(" !! permanent gap, contains stubs and/or blobs !!");
       }
-      STRINGSTREAM_FLUSH_LOCKED("\n")
+      ast->cr();
+      BUFFEREDSTREAM_FLUSH_AUTO("")
     }
     ast->print_cr(INTPTR_FORMAT ": Len[%4d] = " HEX32_FORMAT, p2i(FreeArray[ix].start), ix, FreeArray[ix].len);
-    STRINGSTREAM_FLUSH_LOCKED("\n\n")
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n")
   }
 
 
@@ -1519,7 +1612,7 @@
       }
     }
   }
-  STRINGSTREAM_FLUSH_LOCKED("")
+  BUFFEREDSTREAM_FLUSH_AUTO("")
 
   {
     printBox(ast, '-', "Top Ten Free Blocks in ", heapName);
@@ -1536,9 +1629,10 @@
         ast->print("#blocks (in gap) %d", FreeTopTen[iy]->n_gapBlocks);
       }
       ast->cr();
+      BUFFEREDSTREAM_FLUSH_AUTO("")
     }
-    STRINGSTREAM_FLUSH_LOCKED("\n\n")
   }
+  BUFFEREDSTREAM_FLUSH_LOCKED("\n\n")
 
 
   //--------------------------------------------------------
@@ -1583,7 +1677,7 @@
       }
     }
   }
-  STRINGSTREAM_FLUSH_LOCKED("")
+  BUFFEREDSTREAM_FLUSH_AUTO("")
 
   {
     printBox(ast, '-', "Top Ten Free-Occupied-Free Triples in ", heapName);
@@ -1601,9 +1695,10 @@
       ast->fill_to(63);
       ast->print("#blocks (in gap) %d", FreeTopTenTriple[iy]->n_gapBlocks);
       ast->cr();
+      BUFFEREDSTREAM_FLUSH_AUTO("")
     }
-    STRINGSTREAM_FLUSH_LOCKED("\n\n")
   }
+  BUFFEREDSTREAM_FLUSH_LOCKED("\n\n")
 }
 
 
@@ -1618,7 +1713,7 @@
   if ((StatArray == NULL) || (alloc_granules == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   unsigned int granules_per_line = 32;
   char*        low_bound         = heap->low_boundary();
@@ -1634,13 +1729,12 @@
                     "  Occupied granules show their BlobType character, see legend.\n");
       print_blobType_legend(ast);
     }
-    STRINGSTREAM_FLUSH_LOCKED("")
+    BUFFEREDSTREAM_FLUSH_LOCKED("")
   }
 
   {
     if (segment_granules) {
       printBox(ast, '-', "Total (all types) count for granule size == segment size", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1649,7 +1743,6 @@
       }
     } else {
       printBox(ast, '-', "Total (all tiers) count, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1659,13 +1752,12 @@
         print_count_single(ast, count);
       }
     }
-    STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+    BUFFEREDSTREAM_FLUSH_LOCKED("|\n\n\n")
   }
 
   {
     if (nBlocks_t1 > 0) {
       printBox(ast, '-', "Tier1 nMethod count only, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1676,17 +1768,16 @@
           print_count_single(ast, StatArray[ix].t1_count);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier1 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_t2 > 0) {
       printBox(ast, '-', "Tier2 nMethod count only, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1697,17 +1788,16 @@
           print_count_single(ast, StatArray[ix].t2_count);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier2 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_alive > 0) {
       printBox(ast, '-', "not_used/not_entrant/not_installed nMethod count only, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1718,17 +1808,16 @@
           print_count_single(ast, StatArray[ix].tx_count);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No not_used/not_entrant nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_stub > 0) {
       printBox(ast, '-', "Stub & Blob count only, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1739,17 +1828,16 @@
           print_count_single(ast, StatArray[ix].stub_count);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Stubs and Blobs found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_dead > 0) {
       printBox(ast, '-', "Dead nMethod count only, 0x1..0xf. '*' indicates >= 16 blocks, ' ' indicates empty", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1760,17 +1848,16 @@
           print_count_single(ast, StatArray[ix].dead_count);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No dead nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (!segment_granules) { // Prevent totally redundant printouts
       printBox(ast, '-', "Count by tier (combined, no dead blocks): <#t1>:<#t2>:<#s>, 0x0..0xf. '*' indicates >= 16 blocks", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 24;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1787,7 +1874,7 @@
         }
         ast->print(" ");
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      BUFFEREDSTREAM_FLUSH_LOCKED("|\n\n\n")
     }
   }
 }
@@ -1804,7 +1891,7 @@
   if ((StatArray == NULL) || (alloc_granules == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   unsigned int granules_per_line = 32;
   char*        low_bound         = heap->low_boundary();
@@ -1823,13 +1910,12 @@
       ast->print_cr("  These digits represent a fill percentage range (see legend).\n");
       print_space_legend(ast);
     }
-    STRINGSTREAM_FLUSH_LOCKED("")
+    BUFFEREDSTREAM_FLUSH_LOCKED("")
   }
 
   {
     if (segment_granules) {
       printBox(ast, '-', "Total (all types) space consumption for granule size == segment size", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1838,7 +1924,6 @@
       }
     } else {
       printBox(ast, '-', "Total (all types) space consumption. ' ' indicates empty, '*' indicates full.", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1848,13 +1933,12 @@
         print_space_single(ast, space);
       }
     }
-    STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+    BUFFEREDSTREAM_FLUSH_LOCKED("|\n\n\n")
   }
 
   {
     if (nBlocks_t1 > 0) {
       printBox(ast, '-', "Tier1 space consumption. ' ' indicates empty, '*' indicates full", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1865,17 +1949,16 @@
           print_space_single(ast, StatArray[ix].t1_space);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier1 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_t2 > 0) {
       printBox(ast, '-', "Tier2 space consumption. ' ' indicates empty, '*' indicates full", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1886,11 +1969,11 @@
           print_space_single(ast, StatArray[ix].t2_space);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier2 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
@@ -1906,17 +1989,16 @@
           print_space_single(ast, StatArray[ix].tx_space);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier2 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_stub > 0) {
       printBox(ast, '-', "Stub and Blob space consumption. ' ' indicates empty, '*' indicates full", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1927,34 +2009,32 @@
           print_space_single(ast, StatArray[ix].stub_space);
         }
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Stubs and Blobs found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_dead > 0) {
       printBox(ast, '-', "Dead space consumption. ' ' indicates empty, '*' indicates full", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
         print_line_delim(out, ast, low_bound, ix, granules_per_line);
         print_space_single(ast, StatArray[ix].dead_space);
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No dead nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (!segment_granules) { // Prevent totally redundant printouts
       printBox(ast, '-', "Space consumption by tier (combined): <t1%>:<t2%>:<s%>. ' ' indicates empty, '*' indicates full", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 24;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -1979,7 +2059,8 @@
         }
         ast->print(" ");
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
+      BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
     }
   }
 }
@@ -1995,7 +2076,7 @@
   if ((StatArray == NULL) || (alloc_granules == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   unsigned int granules_per_line = 32;
   char*        low_bound         = heap->low_boundary();
@@ -2009,12 +2090,11 @@
                   "  Information for the youngest method (highest ID) in the granule is printed.\n"
                   "  Refer to the legend to learn how method age is mapped to the displayed digit.");
     print_age_legend(ast);
-    STRINGSTREAM_FLUSH_LOCKED("")
+    BUFFEREDSTREAM_FLUSH_LOCKED("")
   }
 
   {
     printBox(ast, '-', "Age distribution. '0' indicates youngest 1/256, '8': oldest half, ' ': no age information", NULL);
-    STRINGSTREAM_FLUSH_LOCKED("")
 
     granules_per_line = 128;
     for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -2026,64 +2106,61 @@
       age       = age > agex ? age : agex;
       print_age_single(ast, age);
     }
-    STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+    ast->print("|");
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_t1 > 0) {
       printBox(ast, '-', "Tier1 age distribution. '0' indicates youngest 1/256, '8': oldest half, ' ': no age information", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
         print_line_delim(out, ast, low_bound, ix, granules_per_line);
         print_age_single(ast, StatArray[ix].t1_age);
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier1 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_t2 > 0) {
       printBox(ast, '-', "Tier2 age distribution. '0' indicates youngest 1/256, '8': oldest half, ' ': no age information", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
         print_line_delim(out, ast, low_bound, ix, granules_per_line);
         print_age_single(ast, StatArray[ix].t2_age);
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier2 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (nBlocks_alive > 0) {
       printBox(ast, '-', "not_used/not_entrant/not_installed age distribution. '0' indicates youngest 1/256, '8': oldest half, ' ': no age information", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 128;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
         print_line_delim(out, ast, low_bound, ix, granules_per_line);
         print_age_single(ast, StatArray[ix].tx_age);
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
     } else {
       ast->print("No Tier2 nMethods found in CodeHeap.");
-      STRINGSTREAM_FLUSH_LOCKED("\n\n\n")
     }
+    BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
   }
 
   {
     if (!segment_granules) { // Prevent totally redundant printouts
       printBox(ast, '-', "age distribution by tier <a1>:<a2>. '0' indicates youngest 1/256, '8': oldest half, ' ': no age information", NULL);
-      STRINGSTREAM_FLUSH_LOCKED("")
 
       granules_per_line = 32;
       for (unsigned int ix = 0; ix < alloc_granules; ix++) {
@@ -2093,7 +2170,8 @@
         print_age_single(ast, StatArray[ix].t2_age);
         ast->print(" ");
       }
-      STRINGSTREAM_FLUSH_LOCKED("|\n\n\n")
+      ast->print("|");
+      BUFFEREDSTREAM_FLUSH_LOCKED("\n\n\n")
     }
   }
 }
@@ -2110,7 +2188,7 @@
   if ((StatArray == NULL) || (alloc_granules == 0)) {
     return;
   }
-  STRINGSTREAM_DECL(ast, out)
+  BUFFEREDSTREAM_DECL(ast, out)
 
   unsigned int granules_per_line   = 128;
   char*        low_bound           = heap->low_boundary();
@@ -2129,7 +2207,7 @@
                 "  is not continuously held, the displayed name might be wrong or no name\n"
                 "  might be found at all. The likelihood for that to happen increases\n"
                 "  over time passed between aggregtion and print steps.\n");
-  STRINGSTREAM_FLUSH_LOCKED("")
+  BUFFEREDSTREAM_FLUSH_LOCKED("")
 
   for (unsigned int ix = 0; ix < alloc_granules; ix++) {
     //---<  print a new blob on a new line  >---
@@ -2144,7 +2222,7 @@
       ast->print_cr("--------------------------------------------------------------------");
       ast->print_cr("Address range [" INTPTR_FORMAT "," INTPTR_FORMAT "), " SIZE_FORMAT "k", p2i(low_bound+ix*granule_size), p2i(low_bound + end_ix*granule_size), (end_ix - ix)*granule_size/(size_t)K);
       ast->print_cr("--------------------------------------------------------------------");
-      STRINGSTREAM_FLUSH_LOCKED("")
+      BUFFEREDSTREAM_FLUSH_AUTO("")
     }
     // Only check granule if it contains at least one blob.
     unsigned int nBlobs  = StatArray[ix].t1_count   + StatArray[ix].t2_count + StatArray[ix].tx_count +
@@ -2192,7 +2270,7 @@
           ast->fill_to(61);
           ast->print_cr("%6s", "method");
           ast->print_cr("%18s %13s %17s %9s  %5s %18s  %s", "Addr(module)      ", "offset", "size", " type lvl", " temp", "blobType          ", "Name");
-          STRINGSTREAM_FLUSH_LOCKED("")
+          BUFFEREDSTREAM_FLUSH_AUTO("")
         }
 
         //---<  print line prefix (address and offset from CodeHeap start)  >---
@@ -2248,15 +2326,15 @@
           ast->fill_to(62+6);
           ast->print("<stale blob>");
         }
-        STRINGSTREAM_FLUSH_LOCKED("\n")
+        ast->cr();
+        BUFFEREDSTREAM_FLUSH_AUTO("")
       } else if (!blob_is_safe && (this_blob != last_blob) && (this_blob != NULL)) {
         last_blob          = this_blob;
-        STRINGSTREAM_FLUSH_LOCKED("\n")
       }
     }
     } // nBlobs > 0
   }
-  STRINGSTREAM_FLUSH_LOCKED("\n\n")
+  BUFFEREDSTREAM_FLUSH_LOCKED("\n\n")
 }
 
 
@@ -2393,7 +2471,11 @@
     }
     ast->cr();
 
-    { // can't use STRINGSTREAM_FLUSH_LOCKED("") here.
+    // can't use BUFFEREDSTREAM_FLUSH_IF("", 512) here.
+    // can't use this expression. bufferedStream::capacity() does not exist.
+    // if ((ast->capacity() - ast->size()) < 512) {
+    // Assume instead that default bufferedStream capacity (4K) was used.
+    if (ast->size() > 3*K) {
       ttyLocker ttyl;
       out->print("%s", ast->as_string());
       ast->reset();
--- a/src/hotspot/share/code/nmethod.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/code/nmethod.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1102,7 +1102,11 @@
          "must be at safepoint");
 
   // Unregister must be done before the state change
-  Universe::heap()->unregister_nmethod(this);
+  {
+    MutexLockerEx ml(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock,
+                     Mutex::_no_safepoint_check_flag);
+    Universe::heap()->unregister_nmethod(this);
+  }
 
   // Log the unloading.
   log_state_change();
--- a/src/hotspot/share/gc/cms/cmsHeap.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/cms/cmsHeap.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -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
@@ -225,15 +225,11 @@
                                 ScanningOption so,
                                 bool only_strong_roots,
                                 OopsInGenClosure* root_closure,
-                                CLDClosure* cld_closure,
-                                OopStorage::ParState<false, false>* par_state_string) {
+                                CLDClosure* cld_closure) {
   MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 
   process_roots(scope, so, root_closure, cld_closure, weak_cld_closure, &mark_code_closure);
-  if (!only_strong_roots) {
-    process_string_table_roots(scope, root_closure, par_state_string);
-  }
 
   if (young_gen_as_roots &&
       _process_strong_tasks->try_claim_task(GCH_PS_younger_gens)) {
--- a/src/hotspot/share/gc/cms/cmsHeap.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/cms/cmsHeap.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -91,8 +91,7 @@
                          ScanningOption so,
                          bool only_strong_roots,
                          OopsInGenClosure* root_closure,
-                         CLDClosure* cld_closure,
-                         OopStorage::ParState<false, false>* par_state_string = NULL);
+                         CLDClosure* cld_closure);
 
   GCMemoryManager* old_manager() const { return _old_manager; }
 
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -4333,8 +4333,7 @@
                           GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
                           _collector->should_unload_classes(),
                           &par_mri_cl,
-                          &cld_closure,
-                          &_par_state_string);
+                          &cld_closure);
 
   assert(_collector->should_unload_classes()
          || (_collector->CMSCollector::roots_scanning_options() & GenCollectedHeap::SO_AllCodeCache),
@@ -4464,8 +4463,7 @@
                           GenCollectedHeap::ScanningOption(_collector->CMSCollector::roots_scanning_options()),
                           _collector->should_unload_classes(),
                           &par_mrias_cl,
-                          NULL,     // The dirty klasses will be handled below
-                          &_par_state_string);
+                          NULL);     // The dirty klasses will be handled below
 
   assert(_collector->should_unload_classes()
          || (_collector->CMSCollector::roots_scanning_options() & GenCollectedHeap::SO_AllCodeCache),
@@ -5277,12 +5275,6 @@
       // Clean up unreferenced symbols in symbol table.
       SymbolTable::unlink();
     }
-
-    {
-      GCTraceTime(Debug, gc, phases) t("Scrub String Table", _gc_timer_cm);
-      // Delete entries for dead interned strings.
-      StringTable::unlink(&_is_alive_closure);
-    }
   }
 
   // Restore any preserved marks as a result of mark stack or
--- a/src/hotspot/share/gc/cms/parNewGeneration.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/cms/parNewGeneration.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -606,8 +606,7 @@
   heap->young_process_roots(_strong_roots_scope,
                            &par_scan_state.to_space_root_closure(),
                            &par_scan_state.older_gen_closure(),
-                           &cld_scan_closure,
-                           &_par_state_string);
+                           &cld_scan_closure);
 
   par_scan_state.end_strong_roots();
 
--- a/src/hotspot/share/gc/g1/dirtyCardQueue.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/g1/dirtyCardQueue.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -25,6 +25,7 @@
 #include "precompiled.hpp"
 #include "gc/g1/dirtyCardQueue.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
+#include "gc/g1/g1FreeIdSet.hpp"
 #include "gc/g1/g1RemSet.hpp"
 #include "gc/g1/g1ThreadLocalData.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
@@ -55,72 +56,6 @@
   }
 };
 
-// Represents a set of free small integer ids.
-class FreeIdSet : public CHeapObj<mtGC> {
-  enum {
-    end_of_list = UINT_MAX,
-    claimed = UINT_MAX - 1
-  };
-
-  uint _size;
-  Monitor* _mon;
-
-  uint* _ids;
-  uint _hd;
-  uint _waiters;
-  uint _claimed;
-
-public:
-  FreeIdSet(uint size, Monitor* mon);
-  ~FreeIdSet();
-
-  // Returns an unclaimed parallel id (waiting for one to be released if
-  // necessary).
-  uint claim_par_id();
-
-  void release_par_id(uint id);
-};
-
-FreeIdSet::FreeIdSet(uint size, Monitor* mon) :
-  _size(size), _mon(mon), _hd(0), _waiters(0), _claimed(0)
-{
-  guarantee(size != 0, "must be");
-  _ids = NEW_C_HEAP_ARRAY(uint, size, mtGC);
-  for (uint i = 0; i < size - 1; i++) {
-    _ids[i] = i+1;
-  }
-  _ids[size-1] = end_of_list; // end of list.
-}
-
-FreeIdSet::~FreeIdSet() {
-  FREE_C_HEAP_ARRAY(uint, _ids);
-}
-
-uint FreeIdSet::claim_par_id() {
-  MutexLockerEx x(_mon, Mutex::_no_safepoint_check_flag);
-  while (_hd == end_of_list) {
-    _waiters++;
-    _mon->wait(Mutex::_no_safepoint_check_flag);
-    _waiters--;
-  }
-  uint res = _hd;
-  _hd = _ids[res];
-  _ids[res] = claimed;  // For debugging.
-  _claimed++;
-  return res;
-}
-
-void FreeIdSet::release_par_id(uint id) {
-  MutexLockerEx x(_mon, Mutex::_no_safepoint_check_flag);
-  assert(_ids[id] == claimed, "Precondition.");
-  _ids[id] = _hd;
-  _hd = id;
-  _claimed--;
-  if (_waiters > 0) {
-    _mon->notify_all();
-  }
-}
-
 DirtyCardQueue::DirtyCardQueue(DirtyCardQueueSet* qset, bool permanent) :
   // Dirty card queues are always active, so we create them with their
   // active field set to true.
@@ -144,6 +79,10 @@
   _all_active = true;
 }
 
+DirtyCardQueueSet::~DirtyCardQueueSet() {
+  delete _free_ids;
+}
+
 // Determines how many mutator threads can process the buffers in parallel.
 uint DirtyCardQueueSet::num_par_ids() {
   return (uint)os::initial_active_processor_count();
@@ -156,7 +95,7 @@
   PtrQueueSet::initialize(cbl_mon, allocator);
   _shared_dirty_card_queue.set_lock(lock);
   if (init_free_ids) {
-    _free_ids = new FreeIdSet(num_par_ids(), cbl_mon);
+    _free_ids = new G1FreeIdSet(0, num_par_ids());
   }
 }
 
--- a/src/hotspot/share/gc/g1/dirtyCardQueue.hpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/g1/dirtyCardQueue.hpp	Thu Jan 31 13:43:11 2019 +0100
@@ -28,8 +28,8 @@
 #include "gc/shared/ptrQueue.hpp"
 #include "memory/allocation.hpp"
 
-class FreeIdSet;
 class DirtyCardQueueSet;
+class G1FreeIdSet;
 class JavaThread;
 class Monitor;
 
@@ -103,8 +103,7 @@
 
   bool mut_process_buffer(BufferNode* node);
 
-  // Protected by the _cbl_mon.
-  FreeIdSet* _free_ids;
+  G1FreeIdSet* _free_ids;
 
   // The number of completed buffers processed by mutator and rs thread,
   // respectively.
@@ -118,6 +117,7 @@
 
 public:
   DirtyCardQueueSet(bool notify_when_complete = true);
+  ~DirtyCardQueueSet();
 
   void initialize(Monitor* cbl_mon,
                   BufferNode::Allocator* allocator,
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Wed Jan 30 12:16:50 2019 +0530
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Thu Jan 31 13:43:11 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -3362,24 +3362,54 @@
 
 void G1CollectedHeap::complete_cleaning(BoolObjectClosure* is_alive,
                                         bool class_unloading_occurred) {
-  uint n_workers = workers()->active_workers();
-
-  G1StringDedupUnlinkOrOopsDoClosure dedup_closure(is_alive, NULL, false);
-  ParallelCleaningTask g1_unlink_task(is_alive, &dedup_closure, n_workers, class_unloading_occurred);
-  workers()->run_task(&g1_unlink_task);
+  uint num_workers = workers()->active_workers();
+  ParallelCleaningTask unlink_task(is_alive, num_workers, class_unloading_occurred, false);
+  workers()->run_task(&unlink_task);
 }
 
-void G1CollectedHeap::partial_cleaning(BoolObjectClosure* is_alive,
-                                       bool process_strings,
-                                       bool process_string_dedup) {
-  if (!process_strings && !process_string_dedup) {
-    // Nothing to clean.
-    return;
+// Clean string dedup data structures.
+// Ideally we would prefer to use a StringDedupCleaningTask here, but we want to
+// record the durations of the phases. Hence the almost-copy.
+class G1StringDedupCleaningTask : public AbstractGangTask {
+  BoolObjectClosure* _is_alive;
+  OopClosure* _keep_alive;
+  G1GCPhaseTimes* _phase_times;