Merge
authorpsadhukhan
Tue, 04 Dec 2018 13:35:04 +0530
changeset 52844 de8be034dbd4
parent 52843 2ff843783d95 (current diff)
parent 52811 ff04b71bf6f1 (diff)
child 52845 6419f8d3cc3e
child 52962 9c0231a493d6
Merge
make/nashorn/package-list
--- a/bin/idea.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/bin/idea.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/BuildStatic.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/BuildStatic.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/Bundles.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/Bundles.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -262,6 +262,21 @@
 
 ################################################################################
 
+ifneq ($(filter jcov-bundles, $(MAKECMDGOALS)), )
+  JCOV_BUNDLE_FILES := $(call CacheFind, $(JCOV_IMAGE_DIR))
+
+  $(eval $(call SetupBundleFile, BUILD_JCOV_BUNDLE, \
+      BUNDLE_NAME := $(JCOV_BUNDLE_NAME), \
+      FILES := $(JCOV_BUNDLE_FILES), \
+      BASE_DIRS := $(JCOV_IMAGE_DIR), \
+      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
+  ))
+
+  JCOV_TARGETS += $(BUILD_JCOV_BUNDLE)
+endif
+
+################################################################################
+
 # Hook to include the corresponding custom file, if present.
 $(eval $(call IncludeCustomExtension, Bundles.gmk))
 
@@ -270,5 +285,6 @@
 product-bundles: $(PRODUCT_TARGETS)
 test-bundles: $(TEST_TARGETS)
 docs-bundles: $(DOCS_TARGETS)
+jcov-bundles: $(JCOV_TARGETS)
 
-.PHONY: all default product-bundles test-bundles docs-bundles
+.PHONY: all default product-bundles test-bundles docs-bundles jcov-bundles
--- a/make/CompileDemos.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/CompileDemos.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/CompileToolsHotspot.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/CompileToolsHotspot.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/CopyInterimCLDRConverter.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/CopyInterimCLDRConverter.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/Coverage.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+
+include $(SPEC)
+include MakeBase.gmk
+
+################################################################################
+
+JCOV_INPUT_IMAGE_DIR :=
+
+ifneq ($(JCOV_INPUT_JDK), )
+  JCOV_INPUT_IMAGE_DIR := $(JCOV_INPUT_JDK)
+else
+  JCOV_INPUT_IMAGE_DIR := $(JDK_IMAGE_DIR)
+endif
+
+#moving instrumented jdk image in and out of jcov_temp because of CODETOOLS-7902299
+JCOV_TEMP := $(SUPPORT_OUTPUTDIR)/jcov_temp
+
+$(JCOV_IMAGE_DIR)/release: $(JCOV_INPUT_IMAGE_DIR)/release
+	$(call LogWarn, Creating instrumented jdk image with JCov)
+	$(call MakeDir, $(JCOV_TEMP) $(IMAGES_OUTPUTDIR))
+	$(RM) -r $(JCOV_IMAGE_DIR) $(JCOV_TEMP)/*
+	$(CP) -r $(JCOV_INPUT_IMAGE_DIR) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
+	$(JAVA) -Xmx3g -jar $(JCOV_HOME)/lib/jcov.jar JREInstr \
+	    -t $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)/template.xml \
+	    -rt $(JCOV_HOME)/lib/jcov_network_saver.jar \
+	    -exclude 'java.lang.Object' \
+	    -exclude 'jdk.internal.org.objectweb.**' \
+	    -exclude jdk.test.Main -exclude '**\$Proxy*' \
+	    $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR)
+	$(MV) $(JCOV_TEMP)/$(JCOV_IMAGE_SUBDIR) $(JCOV_IMAGE_DIR)
+	$(RMDIR) $(JCOV_TEMP)
+
+jcov-image: $(JCOV_IMAGE_DIR)/release
--- a/make/CreateBuildJdkCopy.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/CreateBuildJdkCopy.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/CreateJmods.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/CreateJmods.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/GenerateModuleSummary.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/GenerateModuleSummary.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/GensrcModuleInfo.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/GensrcModuleInfo.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/InterimImage.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/InterimImage.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/Main.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/Main.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -371,10 +371,15 @@
 exploded-image-optimize:
 	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
 
+ifeq ($(JCOV_ENABLED), true)
+  jcov-image:
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Coverage.gmk jcov-image)
+endif
+
 ALL_TARGETS += store-source-revision create-source-revision-tracker bootcycle-images zip-security \
     zip-source jrtfs-jar jdk-image legacy-jre-image \
     symbols-image mac-jdk-bundle mac-legacy-jre-bundle \
-    release-file exploded-image-optimize
+    release-file exploded-image-optimize jcov-image
 
 ################################################################################
 # Docs targets
@@ -577,7 +582,12 @@
 docs-bundles:
 	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk docs-bundles)
 
-ALL_TARGETS += product-bundles test-bundles docs-bundles
+ifeq ($(JCOV_ENABLED), true)
+  jcov-bundles:
+	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk jcov-bundles)
+endif
+
+ALL_TARGETS += product-bundles test-bundles docs-bundles jcov-bundles
 
 ################################################################################
 # Install targets
@@ -633,6 +643,7 @@
   # Declare dependencies between hotspot-<variant>* targets
   $(foreach v, $(JVM_VARIANTS), \
       $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \
+      $(eval hotspot-$v-gensrc: java.base-copy) \
       $(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
   )
 
@@ -820,6 +831,10 @@
   mac-jdk-bundle: jdk-image
   mac-legacy-jre-bundle: legacy-jre-image
 
+  ifeq ($(JCOV_INPUT_JDK), )
+    jcov-image: jdk-image
+  endif
+
   # The optimize target can run as soon as the modules dir has been completely
   # populated (java, copy and gendata targets) and the basic libs and launchers
   # have been built.
@@ -900,6 +915,8 @@
 
   docs-bundles: docs-image
 
+  jcov-bundles: jcov-image
+
   generate-summary: jmods buildtools-modules
 
   update-x11wrappers: java.base-copy buildtools-jdk
--- a/make/RunTests.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/RunTests.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -135,9 +135,11 @@
     $1_LD := $$(LD)
   endif
 
+  # Create jaotc flags.
+  # VM flags which don't affect AOT code generation are filtered out: -Xcomp, -XX:+-TieredCompilation
   $1_JAOTC_OPTS := \
       -J-Xmx4g --info \
-      $$(addprefix -J, $$($1_VM_OPTIONS)) \
+      $$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \
       $$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \
       --linker-path $$($1_LD) \
       #
--- a/make/ZipSource.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/ZipSource.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/boot-jdk.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/boot-jdk.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/build-aux/config.guess	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/build-aux/config.guess	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/hotspot.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/hotspot.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -325,17 +325,13 @@
     fi
   fi
 
-  # Only enable ZGC on Linux x86_64
-  AC_MSG_CHECKING([if zgc should be built])
-  if HOTSPOT_CHECK_JVM_FEATURE(zgc); then
-    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
-      AC_MSG_RESULT([yes])
-    else
-      DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
-      AC_MSG_RESULT([no, platform not supported])
-    fi
+  # Only enable ZGC on supported platforms
+  AC_MSG_CHECKING([if zgc can be built])
+  if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
+    AC_MSG_RESULT([yes])
   else
-    AC_MSG_RESULT([no])
+    DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
+    AC_MSG_RESULT([no, platform not supported])
   fi
 
   # Disable unsupported GCs for Zero
@@ -474,7 +470,7 @@
   fi
 
   # All variants but minimal (and custom) get these features
-  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs"
+  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cmsgc g1gc parallelgc serialgc epsilongc jni-check jvmti management nmt services vm-structs zgc"
 
   # Disable CDS on AIX.
   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
--- a/make/autoconf/jdk-options.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/jdk-options.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -395,8 +395,37 @@
   elif test "x$enable_native_coverage" != "x"; then
     AC_MSG_ERROR([--enable-native-coverage can only be assigned "yes" or "no"])
   fi
+  AC_SUBST(GCOV_ENABLED)
 
-  AC_SUBST(GCOV_ENABLED)
+  AC_ARG_WITH(jcov, [AS_HELP_STRING([--with-jcov],
+      [jcov library location])])
+  AC_ARG_WITH(jcov-input-jdk, [AS_HELP_STRING([--with-jcov-input-jdk],
+      [jdk image to instrument])])
+  JCOV_HOME=
+  JCOV_INPUT_JDK=
+  JCOV_ENABLED=
+  if test "x$with_jcov" = "x" ; then
+    JCOV_ENABLED="false"
+  else
+    JCOV_HOME="$with_jcov"
+    if test ! -f "$JCOV_HOME/lib/jcov.jar"; then
+      AC_MSG_RESULT([fail])
+      AC_MSG_ERROR([Invalid JCov bundle: "$JCOV_HOME/lib/jcov.jar" does not exist])
+    fi
+    JCOV_ENABLED="true"
+    BASIC_FIXUP_PATH(JCOV_HOME)
+    if test "x$with_jcov_input_jdk" != "x" ; then
+      JCOV_INPUT_JDK="$with_jcov_input_jdk"
+      if test ! -f "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX"; then
+        AC_MSG_RESULT([fail])
+        AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX" does not exist])
+      fi
+      BASIC_FIXUP_PATH(JCOV_INPUT_JDK)
+    fi
+  fi
+  AC_SUBST(JCOV_ENABLED)
+  AC_SUBST(JCOV_HOME)
+  AC_SUBST(JCOV_INPUT_JDK)
 ])
 
 ###############################################################################
--- a/make/autoconf/jdk-version.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/jdk-version.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/lib-bundled.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/lib-bundled.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/autoconf/spec.gmk.in	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/spec.gmk.in	Tue Dec 04 13:35:04 2018 +0530
@@ -372,6 +372,9 @@
 UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
 
 GCOV_ENABLED=@GCOV_ENABLED@
+JCOV_ENABLED=@JCOV_ENABLED@
+JCOV_HOME=@JCOV_HOME@
+JCOV_INPUT_JDK=@JCOV_INPUT_JDK@
 
 # AddressSanitizer
 export ASAN_ENABLED:=@ASAN_ENABLED@
@@ -839,10 +842,12 @@
 # Images directory definitions
 JDK_IMAGE_SUBDIR:=jdk
 JRE_IMAGE_SUBDIR:=jre
+JCOV_IMAGE_SUBDIR := jdk-jcov
 
 # Colon left out to be able to override output dir for bootcycle-images
 JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
 JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
+JCOV_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(JCOV_IMAGE_SUBDIR)
 
 # Test image, as above
 TEST_IMAGE_SUBDIR:=test
@@ -889,12 +894,14 @@
 TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
 TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
 DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
+JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
 
 JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_BUNDLE_NAME)
 JDK_SYMBOLS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
 TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
 TEST_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
 DOCS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
+JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)
 
 # This macro is called to allow inclusion of closed source counterparts.
 # Unless overridden in closed sources, it expands to nothing.
--- a/make/autoconf/toolchain_windows.m4	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/autoconf/toolchain_windows.m4	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/JarArchive.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/common/JarArchive.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/JavaCompilation.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/common/JavaCompilation.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/TextFileProcessing.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/common/TextFileProcessing.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/common/ZipArchive.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/common/ZipArchive.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/conf/jib-profiles.js	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/conf/jib-profiles.js	Tue Dec 04 13:35:04 2018 +0530
@@ -243,7 +243,7 @@
 
     // These are the base setttings for all the main build profiles.
     common.main_profile_base = {
-        dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh"],
+        dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
         default_make_targets: ["product-bundles", "test-bundles"],
         configure_args: concat(["--enable-jtreg-failure-handler"],
             "--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
@@ -688,14 +688,6 @@
                        profiles[openName].artifacts["jdk"].remote));
     });
 
-    // Enable ZGC in linux-x64-open builds
-    [ "linux-x64-open" ].forEach(function (name) {
-        var configureArgs = { configure_args: [ "--with-jvm-features=zgc" ] };
-        var debugName = name + common.debug_suffix;
-        profiles[name] = concatObjects(profiles[name], configureArgs);
-        profiles[debugName] = concatObjects(profiles[debugName], configureArgs);
-    });
-
     // Generate cmp-baseline profiles for each main profile and their
     // corresponding debug profile. This profile does a compare build run with no
     // changes to verify that the compare script has a clean baseline
@@ -898,6 +890,14 @@
             revision: "1.21+1.0"
         },
 
+        jcov: {
+            server: "jpg",
+            product: "jcov",
+            version: "3.0",
+            build_number: "b07",
+            file: "bundles/jcov-3_0.zip",
+        },
+
         gnumake: {
             organization: common.organization,
             ext: "tar.gz",
--- a/make/copy/Copy-java.desktop.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/copy/Copy-java.desktop.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/copy/CopyCommon.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/copy/CopyCommon.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/data/charsetmapping/IBM970.c2b	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/charsetmapping/IBM970.c2b	Tue Dec 04 13:35:04 2018 +0530
@@ -5,14 +5,3 @@
 A2A6       FF5E
 A2C1       2299
 A3DC       20A9
-#
-# see .map file for the info regarding following 3 entries
-#
-a1aa	6950
-a1a9	84f1
-a1ad	cf7f
-
-
-
-
-
--- a/make/data/charsetmapping/IBM970.map	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/charsetmapping/IBM970.map	Tue Dec 04 13:35:04 2018 +0530
@@ -1,15 +1,6 @@
 #
 #    source: Cp970.b2c, which is identical(?) to 03CA34B0.TPMAP100
 #
-#    Warning:
-#        following 3 c->b only entries exist in the "old" implementation,
-#        they don't appear existing in any of of the cdc 970 tables. Added
-#        them into c2b for "compatibility
-#        6950  ->  a1aa    2014
-#        84f1  ->  a1a9    2010
-#        cf7f  ->  a1ad    301c
-#
-#
 00         0000			
 01         0001			
 02         0002			
@@ -294,6 +285,7 @@
 A2BE       2665			
 A2BF       2667			
 A2C0       2663			
+A2C1       25C9			
 A2C2       25C8			
 A2C3       25A3			
 A2C4       25D0			
--- a/make/data/fontconfig/macosx.fontconfig.properties	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/fontconfig/macosx.fontconfig.properties	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/data/fontconfig/solaris.fontconfig.properties	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/fontconfig/solaris.fontconfig.properties	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #
 #
-# Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/data/fontconfig/windows.fontconfig.properties	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/fontconfig/windows.fontconfig.properties	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #
 # 
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/data/lsrdata/language-subtag-registry.txt	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/data/lsrdata/language-subtag-registry.txt	Tue Dec 04 13:35:04 2018 +0530
@@ -1,4 +1,4 @@
-File-Date: 2018-04-23
+File-Date: 2018-10-31
 %%
 Type: language
 Subtag: aa
@@ -3351,7 +3351,7 @@
 %%
 Type: language
 Subtag: aue
-Description: =/Kx'au//'ein
+Description: ǂKxʼauǁʼein
 Added: 2009-07-29
 Deprecated: 2015-02-12
 Preferred-Value: ktz
@@ -9812,6 +9812,12 @@
 Added: 2009-07-29
 %%
 Type: language
+Subtag: dno
+Description: Ndrulo
+Description: Northern Lendu
+Added: 2018-10-28
+%%
+Type: language
 Subtag: dnr
 Description: Danaru
 Added: 2009-07-29
@@ -10338,6 +10344,11 @@
 Added: 2016-05-30
 %%
 Type: language
+Subtag: dwz
+Description: Dewas Rai
+Added: 2018-10-28
+%%
+Type: language
 Subtag: dya
 Description: Dyan
 Added: 2009-07-29
@@ -12022,7 +12033,7 @@
 %%
 Type: language
 Subtag: gfx
-Description: Mangetti Dune !Xung
+Description: Mangetti Dune ǃXung
 Added: 2012-08-12
 Deprecated: 2015-02-12
 Preferred-Value: vaj
@@ -12328,7 +12339,6 @@
 Type: language
 Subtag: gku
 Description: ǂUngkue
-Description: =/Ungkue
 Added: 2015-02-12
 %%
 Type: language
@@ -12523,7 +12533,6 @@
 %%
 Type: language
 Subtag: gnk
-Description: //Gana
 Description: ǁGana
 Added: 2009-07-29
 %%
@@ -13156,7 +13165,6 @@
 %%
 Type: language
 Subtag: gwj
-Description: /Gwi
 Description: ǀGwi
 Added: 2009-07-29
 %%
@@ -13489,7 +13497,6 @@
 %%
 Type: language
 Subtag: hgm
-Description: Hai//om
 Description: Haiǁom
 Added: 2009-07-29
 %%
@@ -13833,7 +13840,6 @@
 %%
 Type: language
 Subtag: hnh
-Description: //Ani
 Description: ǁAni
 Added: 2009-07-29
 %%
@@ -14113,7 +14119,6 @@
 %%
 Type: language
 Subtag: huc
-Description: =/Hua
 Description: ǂHua
 Added: 2009-07-29
 %%
@@ -18425,7 +18430,6 @@
 %%
 Type: language
 Subtag: ktz
-Description: Ju/'hoan
 Description: Juǀʼhoan
 Description: Juǀʼhoansi
 Added: 2009-07-29
@@ -24926,7 +24930,6 @@
 %%
 Type: language
 Subtag: ngh
-Description: N/u
 Description: Nǀu
 Added: 2009-07-29
 %%
@@ -25641,7 +25644,6 @@
 %%
 Type: language
 Subtag: nmn
-Description: !Xóõ
 Description: ǃXóõ
 Added: 2009-07-29
 %%
@@ -27613,7 +27615,7 @@
 %%
 Type: language
 Subtag: oun
-Description: !O!ung
+Description: ǃOǃung
 Added: 2009-07-29
 Deprecated: 2015-02-12
 Preferred-Value: vaj
@@ -36667,7 +36669,6 @@
 Type: language
 Subtag: vaj
 Description: Sekele
-Description: Northwestern !Kung
 Description: Northwestern ǃKung
 Description: Vasekele
 Added: 2009-07-29
@@ -38299,7 +38300,6 @@
 %%
 Type: language
 Subtag: xam
-Description: /Xam
 Description: ǀXam
 Added: 2009-07-29
 %%
@@ -38559,7 +38559,6 @@
 %%
 Type: language
 Subtag: xeg
-Description: //Xegwi
 Description: ǁXegwi
 Added: 2009-07-29
 %%
@@ -44036,6 +44035,11 @@
 Added: 2010-08-16
 %%
 Type: script
+Subtag: Elym
+Description: Elymaic
+Added: 2018-10-28
+%%
+Type: script
 Subtag: Ethi
 Description: Ethiopic
 Description: Geʻez
@@ -44432,6 +44436,11 @@
 Added: 2005-10-16
 %%
 Type: script
+Subtag: Nand
+Description: Nandinagari
+Added: 2018-10-28
+%%
+Type: script
 Subtag: Narb
 Description: Old North Arabian
 Description: Ancient North Arabian
@@ -46032,6 +46041,8 @@
 %%
 Type: region
 Subtag: SZ
+Description: Eswatini
+Description: eSwatini
 Description: Swaziland
 Added: 2005-10-16
 %%
--- a/make/devkit/createMacosxDevkit6.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/devkit/createMacosxDevkit6.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/devkit/createSolarisDevkit12.4.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/devkit/createSolarisDevkit12.4.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/devkit/createWindowsDevkit2013.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/devkit/createWindowsDevkit2013.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataFontConfig.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gendata/GendataFontConfig.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataHtml32dtd.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gendata/GendataHtml32dtd.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gendata/GendataTZDB.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gendata/GendataTZDB.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/Gensrc-jdk.localedata.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/Gensrc-jdk.localedata.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcCharsetCoder.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcCharsetCoder.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcCommonLangtools.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcCommonLangtools.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcLocaleData.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcLocaleData.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcMisc.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcMisc.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcModuleLoaderMap.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcModuleLoaderMap.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcSwing.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcSwing.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/gensrc/GensrcVarHandles.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/gensrc/GensrcVarHandles.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/gensrc/GenerateSources.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/hotspot/gensrc/GenerateSources.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/hotspot/gensrc/GensrcDtrace.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -64,8 +64,9 @@
     include lib/JvmFeatures.gmk
     include lib/JvmFlags.gmk
 
-    # We cannot compile until the JVMTI gensrc has finished
+    # We cannot compile until the JVMTI and JFR gensrc has finished
     JVMTI_H := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h
+    JFR_FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jfrfiles/jfrEventClasses.hpp
 
     $(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
         NAME := dtraceGenOffsets, \
@@ -76,7 +77,7 @@
         CFLAGS := -m64 $(JVM_CFLAGS), \
         DISABLED_WARNINGS_solstudio := hidef w_novirtualdescr unknownpragma \
             doubunder nokeyworddefine wunreachable, \
-        EXTRA_DEPS := $(JVMTI_H), \
+        EXTRA_DEPS := $(JVMTI_H) $(JFR_FILES), \
         OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
         OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
     ))
--- a/make/hotspot/src/classes/build/tools/projectcreator/BuildConfig.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/hotspot/src/classes/build/tools/projectcreator/BuildConfig.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/jdk/src/classes/build/tools/module/GenModuleInfoSource.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/jdk/src/classes/build/tools/module/ModuleInfoExtraTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/jdk/src/classes/build/tools/module/ModuleInfoExtraTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/langtools/build.xml	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/langtools/build.xml	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
+  ~ Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
   ~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   ~
   ~ This code is free software; you can redistribute it and/or modify it
--- a/make/langtools/intellij/template/src/idea/LangtoolsIdeaAntLogger.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/langtools/intellij/template/src/idea/LangtoolsIdeaAntLogger.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/langtools/tools/propertiesparser/PropertiesParser.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/langtools/tools/propertiesparser/PropertiesParser.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/langtools/tools/propertiesparser/gen/ClassGenerator.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/langtools/tools/propertiesparser/gen/ClassGenerator.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
--- a/make/launcher/Launcher-jdk.aot.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/launcher/Launcher-jdk.aot.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/lib/Lib-jdk.accessibility.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/lib/Lib-jdk.accessibility.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -41,7 +41,7 @@
         EXTRA_SRC := common, \
         OPTIMIZATION := LOW, \
         DISABLED_WARNINGS_microsoft := 4311 4302 4312, \
-        CFLAGS := $(CFLAGS_JDKLIB) \
+        CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
             -DACCESSBRIDGE_ARCH_$2, \
         EXTRA_HEADER_DIRS := \
             include/bridge \
--- a/make/nashorn/build.xml	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/nashorn/build.xml	Tue Dec 04 13:35:04 2018 +0530
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!--
- Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -278,7 +278,7 @@
       <arg value="${javadoc.option}"/>
       <fileset dir="${nashorn.module.src.dir}" includes="**/*.java"/>
       <fileset dir="${dynalink.module.src.dir}" includes="**/*.java"/>
-      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.pkg.list}"/>
+      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.element.list}"/>
     </javadoc>
   </target>
 
@@ -296,7 +296,7 @@
       <arg value="."/>
       <arg value="${javadoc.option}"/>
       <fileset dir="${nashorn.module.src.dir}" includes="jdk/nashorn/api/**/*.java"/>
-      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.pkg.list}"/>
+      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.element.list}"/>
     </javadoc>
   </target>
 
@@ -314,7 +314,7 @@
       <arg value="."/>
       <arg value="${javadoc.option}"/>
       <fileset dir="${dynalink.module.src.dir}" includes="**/*.java"/>
-      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.pkg.list}"/>
+      <link offline="true" href="${javadoc.base.url}" packagelistLoc="${javadoc.element.list}"/>
     </javadoc>
   </target>
 
@@ -835,8 +835,8 @@
 
     <!-- yui -->
     <mkdir dir="${test.external.dir}/yui"/>
-    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
-    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
+    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true" tryGzipEncoding="true"/>
+    <get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true" tryGzipEncoding="true"/>
 
     <!-- showdown -->
     <mkdir dir="${test.external.dir}/showdown"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/nashorn/element-list	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,282 @@
+module:java.base
+java.io
+java.lang
+java.lang.annotation
+java.lang.invoke
+java.lang.module
+java.lang.ref
+java.lang.reflect
+java.math
+java.net
+java.net.spi
+java.nio
+java.nio.channels
+java.nio.channels.spi
+java.nio.charset
+java.nio.charset.spi
+java.nio.file
+java.nio.file.attribute
+java.nio.file.spi
+java.security
+java.security.acl
+java.security.cert
+java.security.interfaces
+java.security.spec
+java.text
+java.text.spi
+java.time
+java.time.chrono
+java.time.format
+java.time.temporal
+java.time.zone
+java.util
+java.util.concurrent
+java.util.concurrent.atomic
+java.util.concurrent.locks
+java.util.function
+java.util.jar
+java.util.regex
+java.util.spi
+java.util.stream
+java.util.zip
+javax.crypto
+javax.crypto.interfaces
+javax.crypto.spec
+javax.net
+javax.net.ssl
+javax.security.auth
+javax.security.auth.callback
+javax.security.auth.login
+javax.security.auth.spi
+javax.security.auth.x500
+javax.security.cert
+module:java.compiler
+javax.annotation.processing
+javax.lang.model
+javax.lang.model.element
+javax.lang.model.type
+javax.lang.model.util
+javax.tools
+module:java.datatransfer
+java.awt.datatransfer
+module:java.desktop
+java.applet
+java.awt
+java.awt.color
+java.awt.desktop
+java.awt.dnd
+java.awt.event
+java.awt.font
+java.awt.geom
+java.awt.im
+java.awt.im.spi
+java.awt.image
+java.awt.image.renderable
+java.awt.print
+java.beans
+java.beans.beancontext
+javax.accessibility
+javax.imageio
+javax.imageio.event
+javax.imageio.metadata
+javax.imageio.plugins.bmp
+javax.imageio.plugins.jpeg
+javax.imageio.plugins.tiff
+javax.imageio.spi
+javax.imageio.stream
+javax.print
+javax.print.attribute
+javax.print.attribute.standard
+javax.print.event
+javax.sound.midi
+javax.sound.midi.spi
+javax.sound.sampled
+javax.sound.sampled.spi
+javax.swing
+javax.swing.border
+javax.swing.colorchooser
+javax.swing.event
+javax.swing.filechooser
+javax.swing.plaf
+javax.swing.plaf.basic
+javax.swing.plaf.metal
+javax.swing.plaf.multi
+javax.swing.plaf.nimbus
+javax.swing.plaf.synth
+javax.swing.table
+javax.swing.text
+javax.swing.text.html
+javax.swing.text.html.parser
+javax.swing.text.rtf
+javax.swing.tree
+javax.swing.undo
+module:java.instrument
+java.lang.instrument
+module:java.logging
+java.util.logging
+module:java.management
+java.lang.management
+javax.management
+javax.management.loading
+javax.management.modelmbean
+javax.management.monitor
+javax.management.openmbean
+javax.management.relation
+javax.management.remote
+javax.management.timer
+module:java.management.rmi
+javax.management.remote.rmi
+module:java.naming
+javax.naming
+javax.naming.directory
+javax.naming.event
+javax.naming.ldap
+javax.naming.spi
+module:java.net.http
+java.net.http
+module:java.prefs
+java.util.prefs
+module:java.rmi
+java.rmi
+java.rmi.activation
+java.rmi.dgc
+java.rmi.registry
+java.rmi.server
+javax.rmi.ssl
+module:java.scripting
+javax.script
+module:java.se
+module:java.security.jgss
+javax.security.auth.kerberos
+org.ietf.jgss
+module:java.security.sasl
+javax.security.sasl
+module:java.smartcardio
+javax.smartcardio
+module:java.sql
+java.sql
+javax.sql
+module:java.sql.rowset
+javax.sql.rowset
+javax.sql.rowset.serial
+javax.sql.rowset.spi
+module:java.transaction.xa
+javax.transaction.xa
+module:java.xml
+javax.xml
+javax.xml.catalog
+javax.xml.datatype
+javax.xml.namespace
+javax.xml.parsers
+javax.xml.stream
+javax.xml.stream.events
+javax.xml.stream.util
+javax.xml.transform
+javax.xml.transform.dom
+javax.xml.transform.sax
+javax.xml.transform.stax
+javax.xml.transform.stream
+javax.xml.validation
+javax.xml.xpath
+org.w3c.dom
+org.w3c.dom.bootstrap
+org.w3c.dom.events
+org.w3c.dom.ls
+org.w3c.dom.ranges
+org.w3c.dom.traversal
+org.w3c.dom.views
+org.xml.sax
+org.xml.sax.ext
+org.xml.sax.helpers
+module:java.xml.crypto
+javax.xml.crypto
+javax.xml.crypto.dom
+javax.xml.crypto.dsig
+javax.xml.crypto.dsig.dom
+javax.xml.crypto.dsig.keyinfo
+javax.xml.crypto.dsig.spec
+module:jdk.accessibility
+com.sun.java.accessibility.util
+module:jdk.attach
+com.sun.tools.attach
+com.sun.tools.attach.spi
+module:jdk.charsets
+module:jdk.compiler
+com.sun.source.doctree
+com.sun.source.tree
+com.sun.source.util
+com.sun.tools.javac
+module:jdk.crypto.cryptoki
+module:jdk.crypto.ec
+module:jdk.dynalink
+jdk.dynalink
+jdk.dynalink.beans
+jdk.dynalink.linker
+jdk.dynalink.linker.support
+jdk.dynalink.support
+module:jdk.editpad
+module:jdk.hotspot.agent
+module:jdk.httpserver
+com.sun.net.httpserver
+com.sun.net.httpserver.spi
+module:jdk.jartool
+com.sun.jarsigner
+jdk.security.jarsigner
+module:jdk.javadoc
+com.sun.javadoc
+com.sun.tools.javadoc
+jdk.javadoc.doclet
+module:jdk.jcmd
+module:jdk.jconsole
+com.sun.tools.jconsole
+module:jdk.jdeps
+module:jdk.jdi
+com.sun.jdi
+com.sun.jdi.connect
+com.sun.jdi.connect.spi
+com.sun.jdi.event
+com.sun.jdi.request
+module:jdk.jdwp.agent
+module:jdk.jfr
+jdk.jfr
+jdk.jfr.consumer
+module:jdk.jlink
+module:jdk.jshell
+jdk.jshell
+jdk.jshell.execution
+jdk.jshell.spi
+jdk.jshell.tool
+module:jdk.jsobject
+netscape.javascript
+module:jdk.jstatd
+module:jdk.localedata
+module:jdk.management
+com.sun.management
+module:jdk.management.agent
+module:jdk.management.jfr
+jdk.management.jfr
+module:jdk.naming.dns
+module:jdk.naming.rmi
+module:jdk.net
+jdk.net
+jdk.nio
+module:jdk.pack
+module:jdk.rmic
+module:jdk.scripting.nashorn
+jdk.nashorn.api.scripting
+jdk.nashorn.api.tree
+module:jdk.sctp
+com.sun.nio.sctp
+module:jdk.security.auth
+com.sun.security.auth
+com.sun.security.auth.callback
+com.sun.security.auth.login
+com.sun.security.auth.module
+module:jdk.security.jgss
+com.sun.security.jgss
+module:jdk.xml.dom
+org.w3c.dom.css
+org.w3c.dom.html
+org.w3c.dom.stylesheets
+org.w3c.dom.xpath
+module:jdk.zipfs
--- a/make/nashorn/package-list	Mon Dec 03 16:12:33 2018 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,314 +0,0 @@
-com.sun.jarsigner
-com.sun.java.accessibility.util
-com.sun.javadoc
-com.sun.jdi
-com.sun.jdi.connect
-com.sun.jdi.connect.spi
-com.sun.jdi.event
-com.sun.jdi.request
-com.sun.management
-com.sun.net.httpserver
-com.sun.net.httpserver.spi
-com.sun.nio.sctp
-com.sun.security.auth
-com.sun.security.auth.callback
-com.sun.security.auth.login
-com.sun.security.auth.module
-com.sun.security.jgss
-com.sun.source.doctree
-com.sun.source.tree
-com.sun.source.util
-com.sun.tools.attach
-com.sun.tools.attach.spi
-com.sun.tools.doclets
-com.sun.tools.doclets.standard
-com.sun.tools.javac
-com.sun.tools.javadoc
-com.sun.tools.jconsole
-java.applet
-java.awt
-java.awt.color
-java.awt.datatransfer
-java.awt.desktop
-java.awt.dnd
-java.awt.event
-java.awt.font
-java.awt.geom
-java.awt.im
-java.awt.im.spi
-java.awt.image
-java.awt.image.renderable
-java.awt.print
-java.beans
-java.beans.beancontext
-java.io
-java.lang
-java.lang.annotation
-java.lang.instrument
-java.lang.invoke
-java.lang.management
-java.lang.module
-java.lang.ref
-java.lang.reflect
-java.math
-java.net
-java.net.spi
-java.nio
-java.nio.channels
-java.nio.channels.spi
-java.nio.charset
-java.nio.charset.spi
-java.nio.file
-java.nio.file.attribute
-java.nio.file.spi
-java.rmi
-java.rmi.activation
-java.rmi.dgc
-java.rmi.registry
-java.rmi.server
-java.security
-java.security.acl
-java.security.cert
-java.security.interfaces
-java.security.spec
-java.sql
-java.text
-java.text.spi
-java.time
-java.time.chrono
-java.time.format
-java.time.temporal
-java.time.zone
-java.util
-java.util.concurrent
-java.util.concurrent.atomic
-java.util.concurrent.locks
-java.util.function
-java.util.jar
-java.util.logging
-java.util.prefs
-java.util.regex
-java.util.spi
-java.util.stream
-java.util.zip
-javafx.animation
-javafx.application
-javafx.beans
-javafx.beans.binding
-javafx.beans.property
-javafx.beans.property.adapter
-javafx.beans.value
-javafx.collections
-javafx.collections.transformation
-javafx.concurrent
-javafx.css
-javafx.css.converter
-javafx.embed.swing
-javafx.event
-javafx.fxml
-javafx.geometry
-javafx.print
-javafx.scene
-javafx.scene.canvas
-javafx.scene.chart
-javafx.scene.control
-javafx.scene.control.cell
-javafx.scene.control.skin
-javafx.scene.effect
-javafx.scene.image
-javafx.scene.input
-javafx.scene.layout
-javafx.scene.media
-javafx.scene.paint
-javafx.scene.shape
-javafx.scene.text
-javafx.scene.transform
-javafx.scene.web
-javafx.stage
-javafx.util
-javafx.util.converter
-javax.accessibility
-javax.activation
-javax.activity
-javax.annotation
-javax.annotation.processing
-javax.crypto
-javax.crypto.interfaces
-javax.crypto.spec
-javax.imageio
-javax.imageio.event
-javax.imageio.metadata
-javax.imageio.plugins.bmp
-javax.imageio.plugins.jpeg
-javax.imageio.plugins.tiff
-javax.imageio.spi
-javax.imageio.stream
-javax.jnlp
-javax.jws
-javax.jws.soap
-javax.lang.model
-javax.lang.model.element
-javax.lang.model.type
-javax.lang.model.util
-javax.management
-javax.management.loading
-javax.management.modelmbean
-javax.management.monitor
-javax.management.openmbean
-javax.management.relation
-javax.management.remote
-javax.management.remote.rmi
-javax.management.timer
-javax.naming
-javax.naming.directory
-javax.naming.event
-javax.naming.ldap
-javax.naming.spi
-javax.net
-javax.net.ssl
-javax.print
-javax.print.attribute
-javax.print.attribute.standard
-javax.print.event
-javax.rmi
-javax.rmi.CORBA
-javax.rmi.ssl
-javax.script
-javax.security.auth
-javax.security.auth.callback
-javax.security.auth.kerberos
-javax.security.auth.login
-javax.security.auth.spi
-javax.security.auth.x500
-javax.security.cert
-javax.security.sasl
-javax.smartcardio
-javax.sound.midi
-javax.sound.midi.spi
-javax.sound.sampled
-javax.sound.sampled.spi
-javax.sql
-javax.sql.rowset
-javax.sql.rowset.serial
-javax.sql.rowset.spi
-javax.swing
-javax.swing.border
-javax.swing.colorchooser
-javax.swing.event
-javax.swing.filechooser
-javax.swing.plaf
-javax.swing.plaf.basic
-javax.swing.plaf.metal
-javax.swing.plaf.multi
-javax.swing.plaf.nimbus
-javax.swing.plaf.synth
-javax.swing.table
-javax.swing.text
-javax.swing.text.html
-javax.swing.text.html.parser
-javax.swing.text.rtf
-javax.swing.tree
-javax.swing.undo
-javax.tools
-javax.transaction
-javax.transaction.xa
-javax.xml
-javax.xml.bind
-javax.xml.bind.annotation
-javax.xml.bind.annotation.adapters
-javax.xml.bind.attachment
-javax.xml.bind.helpers
-javax.xml.bind.util
-javax.xml.catalog
-javax.xml.crypto
-javax.xml.crypto.dom
-javax.xml.crypto.dsig
-javax.xml.crypto.dsig.dom
-javax.xml.crypto.dsig.keyinfo
-javax.xml.crypto.dsig.spec
-javax.xml.datatype
-javax.xml.namespace
-javax.xml.parsers
-javax.xml.soap
-javax.xml.stream
-javax.xml.stream.events
-javax.xml.stream.util
-javax.xml.transform
-javax.xml.transform.dom
-javax.xml.transform.sax
-javax.xml.transform.stax
-javax.xml.transform.stream
-javax.xml.validation
-javax.xml.ws
-javax.xml.ws.handler
-javax.xml.ws.handler.soap
-javax.xml.ws.http
-javax.xml.ws.soap
-javax.xml.ws.spi
-javax.xml.ws.spi.http
-javax.xml.ws.wsaddressing
-javax.xml.xpath
-jdk.dynalink
-jdk.dynalink.beans
-jdk.dynalink.linker
-jdk.dynalink.linker.support
-jdk.dynalink.support
-jdk.incubator.http
-jdk.javadoc.doclet
-jdk.jfr
-jdk.jfr.consumer
-jdk.jshell
-jdk.jshell.execution
-jdk.jshell.spi
-jdk.jshell.tool
-jdk.management.jfr
-jdk.management.resource
-jdk.nashorn.api.scripting
-jdk.nashorn.api.tree
-jdk.net
-jdk.packager.services
-jdk.security.jarsigner
-netscape.javascript
-org.ietf.jgss
-org.omg.CORBA
-org.omg.CORBA_2_3
-org.omg.CORBA_2_3.portable
-org.omg.CORBA.DynAnyPackage
-org.omg.CORBA.ORBPackage
-org.omg.CORBA.portable
-org.omg.CORBA.TypeCodePackage
-org.omg.CosNaming
-org.omg.CosNaming.NamingContextExtPackage
-org.omg.CosNaming.NamingContextPackage
-org.omg.Dynamic
-org.omg.DynamicAny
-org.omg.DynamicAny.DynAnyFactoryPackage
-org.omg.DynamicAny.DynAnyPackage
-org.omg.IOP
-org.omg.IOP.CodecFactoryPackage
-org.omg.IOP.CodecPackage
-org.omg.Messaging
-org.omg.PortableInterceptor
-org.omg.PortableInterceptor.ORBInitInfoPackage
-org.omg.PortableServer
-org.omg.PortableServer.CurrentPackage
-org.omg.PortableServer.POAManagerPackage
-org.omg.PortableServer.POAPackage
-org.omg.PortableServer.portable
-org.omg.PortableServer.ServantLocatorPackage
-org.omg.SendingContext
-org.omg.stub.java.rmi
-org.w3c.dom
-org.w3c.dom.bootstrap
-org.w3c.dom.css
-org.w3c.dom.events
-org.w3c.dom.html
-org.w3c.dom.ls
-org.w3c.dom.ranges
-org.w3c.dom.stylesheets
-org.w3c.dom.traversal
-org.w3c.dom.views
-org.w3c.dom.xpath
-org.xml.sax
-org.xml.sax.ext
-org.xml.sax.helpers
--- a/make/nashorn/project.properties	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/nashorn/project.properties	Tue Dec 04 13:35:04 2018 +0530
@@ -36,8 +36,8 @@
 jdk.build.dir=build
 nashorn.make.dir=make/nashorn
 
-javadoc.base.url=https://docs.oracle.com/javase/9/docs/api/
-javadoc.pkg.list=make/nashorn
+javadoc.base.url=https://docs.oracle.com/en/java/javase/11/docs/api/
+javadoc.element.list=make/nashorn
 
 javadoc.option=\
     -tag "implSpec:a:Implementation Requirements:" \
--- a/make/rmic/Rmic-java.management.rmi.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/rmic/Rmic-java.management.rmi.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/scripts/compare_exceptions.sh.incl	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/scripts/compare_exceptions.sh.incl	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
--- a/make/scripts/update_copyright_year.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/scripts/update_copyright_year.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -98,7 +98,7 @@
   count=0
   files=${tmp}/files.$1
   rm -f ${files}
-  hg log --rev $1 -v --template '{files}\n' | expand \
+  hg log -l1 --rev $1 -v --template '{files}\n' | expand \
     | ${awk} -F' ' '{for(i=1;i<=NF;i++)print $i}' \
     > ${files}
   if [ -f "${files}" -a -s "${files}" ] ; then
@@ -120,8 +120,8 @@
     printf "  ERROR: No files changed in the changeset? Must be a mistake.\n"
     set -x
     ls -al ${files}
-    hg log --rev $1 -v --template '{files}\n'
-    hg log --rev $1 -v --template '{files}\n' | expand \
+    hg log -l1 --rev $1 -v --template '{files}\n'
+    hg log -l1 --rev $1 -v --template '{files}\n' | expand \
       | ${awk} -F' ' '{for(i=1;i<=NF;i++)print $i}'
     set +x
     exit 1
@@ -150,7 +150,7 @@
     desc=${tmp}/desc.${changeset}
     rm -f ${desc}
     echo "------------------------------------------------"
-    hg log --rev ${changeset} --template '{desc}\n' > ${desc}
+    hg log -l1 --rev ${changeset} --template '{desc}\n' > ${desc}
     printf "%d: %s\n%s\n" ${index} "${changeset}" "`cat ${desc}|head -1`"
     if [ "${year}" = "2010" ] ; then
       if cat ${desc} | fgrep -i "Added tag" > /dev/null ; then
--- a/make/test/JtregNativeJdk.gmk	Mon Dec 03 16:12:33 2018 -0800
+++ b/make/test/JtregNativeJdk.gmk	Tue Dec 04 13:35:04 2018 +0530
@@ -48,28 +48,38 @@
 
 BUILD_JDK_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/jdk/jtreg
 
+BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
+    -I$(TOPDIR)/src/java.base/share/native/libjli \
+    -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
+    -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
+
 # Platform specific setup
 ifeq ($(OPENJDK_TARGET_OS), windows)
   BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c
 
   WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
   BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
+  WIN_LIB_JLI := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib
+  BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := $(WIN_LIB_JLI)
 else
   BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
   BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
   ifeq ($(OPENJDK_TARGET_OS), linux)
     BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
   else ifeq ($(OPENJDK_TARGET_OS), solaris)
-    BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava
+    BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lsocket -lnsl
   endif
+  BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := -ljli
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libTestMainKeyWindow := -ObjC
   BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestMainKeyWindow := -framework JavaVM \
       -framework Cocoa -framework JavaNativeFoundation
+  BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJniInvocationTest := -ljli
 else
   BUILD_JDK_JTREG_EXCLUDE += libTestMainKeyWindow.c
+  BUILD_JDK_JTREG_EXCLUDE += exeJniInvocationTest.c
 endif
 
 $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -4019,105 +4019,6 @@
  * @param len   register containing number of bytes
  * @param table register pointing to CRC table
  *
- * Uses R9..R12 as work register. Must be saved/restored by caller!
- */
-void MacroAssembler::kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
-                                        Register t0,  Register t1,  Register t2,  Register t3,
-                                        Register tc0, Register tc1, Register tc2, Register tc3,
-                                        bool invertCRC) {
-  assert_different_registers(crc, buf, len, table);
-
-  Label L_mainLoop, L_tail;
-  Register  tmp  = t0;
-  Register  data = t0;
-  Register  tmp2 = t1;
-  const int mainLoop_stepping  = 8;
-  const int tailLoop_stepping  = 1;
-  const int log_stepping       = exact_log2(mainLoop_stepping);
-  const int mainLoop_alignment = 32; // InputForNewCode > 4 ? InputForNewCode : 32;
-  const int complexThreshold   = 2*mainLoop_stepping;
-
-  // Don't test for len <= 0 here. This pathological case should not occur anyway.
-  // Optimizing for it by adding a test and a branch seems to be a waste of CPU cycles
-  // for all well-behaved cases. The situation itself is detected and handled correctly
-  // within update_byteLoop_crc32.
-  assert(tailLoop_stepping == 1, "check tailLoop_stepping!");
-
-  BLOCK_COMMENT("kernel_crc32_2word {");
-
-  if (invertCRC) {
-    nand(crc, crc, crc);                      // 1s complement of crc
-  }
-
-  // Check for short (<mainLoop_stepping) buffer.
-  cmpdi(CCR0, len, complexThreshold);
-  blt(CCR0, L_tail);
-
-  // Pre-mainLoop alignment did show a slight (1%) positive effect on performance.
-  // We leave the code in for reference. Maybe we need alignment when we exploit vector instructions.
-  {
-    // Align buf addr to mainLoop_stepping boundary.
-    neg(tmp2, buf);                           // Calculate # preLoop iterations for alignment.
-    rldicl(tmp2, tmp2, 0, 64-log_stepping);   // Rotate tmp2 0 bits, insert into tmp2, anding with mask with 1s from 62..63.
-
-    if (complexThreshold > mainLoop_stepping) {
-      sub(len, len, tmp2);                       // Remaining bytes for main loop (>=mainLoop_stepping is guaranteed).
-    } else {
-      sub(tmp, len, tmp2);                       // Remaining bytes for main loop.
-      cmpdi(CCR0, tmp, mainLoop_stepping);
-      blt(CCR0, L_tail);                         // For less than one mainloop_stepping left, do only tail processing
-      mr(len, tmp);                              // remaining bytes for main loop (>=mainLoop_stepping is guaranteed).
-    }
-    update_byteLoop_crc32(crc, buf, tmp2, table, data, false);
-  }
-
-  srdi(tmp2, len, log_stepping);                 // #iterations for mainLoop
-  andi(len, len, mainLoop_stepping-1);           // remaining bytes for tailLoop
-  mtctr(tmp2);
-
-#ifdef VM_LITTLE_ENDIAN
-  Register crc_rv = crc;
-#else
-  Register crc_rv = tmp;                         // Load_reverse needs separate registers to work on.
-                                                 // Occupies tmp, but frees up crc.
-  load_reverse_32(crc_rv, crc);                  // Revert byte order because we are dealing with big-endian data.
-  tmp = crc;
-#endif
-
-  int reconstructTableOffset = crc32_table_columns(table, tc0, tc1, tc2, tc3);
-
-  align(mainLoop_alignment);                     // Octoword-aligned loop address. Shows 2% improvement.
-  BIND(L_mainLoop);
-    update_1word_crc32(crc_rv, buf, table, 0, 0, crc_rv, t1, t2, t3, tc0, tc1, tc2, tc3);
-    update_1word_crc32(crc_rv, buf, table, 4, mainLoop_stepping, crc_rv, t1, t2, t3, tc0, tc1, tc2, tc3);
-    bdnz(L_mainLoop);
-
-#ifndef VM_LITTLE_ENDIAN
-  load_reverse_32(crc, crc_rv);                  // Revert byte order because we are dealing with big-endian data.
-  tmp = crc_rv;                                  // Tmp uses it's original register again.
-#endif
-
-  // Restore original table address for tailLoop.
-  if (reconstructTableOffset != 0) {
-    addi(table, table, -reconstructTableOffset);
-  }
-
-  // Process last few (<complexThreshold) bytes of buffer.
-  BIND(L_tail);
-  update_byteLoop_crc32(crc, buf, len, table, data, false);
-
-  if (invertCRC) {
-    nand(crc, crc, crc);                      // 1s complement of crc
-  }
-  BLOCK_COMMENT("} kernel_crc32_2word");
-}
-
-/**
- * @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 R9..R12 as work register. Must be saved/restored by caller!
  */
 void MacroAssembler::kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -835,10 +835,6 @@
   void update_1word_crc32(Register crc, Register buf, Register table, int bufDisp, int bufInc,
                           Register t0,  Register t1,  Register t2,  Register t3,
                           Register tc0, Register tc1, Register tc2, Register tc3);
-  void kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
-                          Register t0,  Register t1,  Register t2,  Register t3,
-                          Register tc0, Register tc1, Register tc2, Register tc3,
-                          bool invertCRC);
   void kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
                           Register t0,  Register t1,  Register t2,  Register t3,
                           Register tc0, Register tc1, Register tc2, Register tc3,
--- a/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/cpu/ppc/stubRoutines_ppc.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -62,7 +62,6 @@
  public:
 
   // CRC32 Intrinsics.
-  static void generate_load_table_addr(MacroAssembler* masm, Register table, address table_addr, uint64_t table_contents);
   static void generate_load_crc_table_addr(MacroAssembler* masm, Register table);
   static void generate_load_crc_constants_addr(MacroAssembler* masm, Register table);
   static void generate_load_crc_barret_constants_addr(MacroAssembler* masm, Register table);
--- a/src/hotspot/cpu/s390/macroAssembler_s390.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -6333,75 +6333,6 @@
  *
  * uses Z_R10..Z_R13 as work register. Must be saved/restored by caller!
  */
-void MacroAssembler::kernel_crc32_2word(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);
-
-  Label L_mainLoop, L_tail;
-  Register  data = t0;
-  Register  ctr  = Z_R0;
-  const int mainLoop_stepping = 8;
-  const int tailLoop_stepping = 1;
-  const int log_stepping      = exact_log2(mainLoop_stepping);
-
-  // Don't test for len <= 0 here. This pathological case should not occur anyway.
-  // Optimizing for it by adding a test and a branch seems to be a waste of CPU cycles.
-  // The situation itself is detected and handled correctly by the conditional branches
-  // following aghi(len, -stepping) and aghi(len, +stepping).
-
-  if (invertCRC) {
-    not_(crc, noreg, false);           // 1s complement of crc
-  }
-
-#if 0
-  {
-    // Pre-mainLoop alignment did not show any positive effect on performance.
-    // We leave the code in for reference. Maybe the vector instructions in z13 depend on alignment.
-
-    z_cghi(len, mainLoop_stepping);    // Alignment is useless for short data streams.
-    z_brnh(L_tail);
-
-    // Align buf to word (4-byte) boundary.
-    z_lcr(ctr, buf);
-    rotate_then_insert(ctr, ctr, 62, 63, 0, true); // TODO: should set cc
-    z_sgfr(len, ctr);                  // Remaining len after alignment.
-
-    update_byteLoop_crc32(crc, buf, ctr, table, data);
-  }
-#endif
-
-  // Check for short (<mainLoop_stepping bytes) buffer.
-  z_srag(ctr, len, log_stepping);
-  z_brnh(L_tail);
-
-  z_lrvr(crc, crc);          // Revert byte order because we are dealing with big-endian data.
-  rotate_then_insert(len, len, 64-log_stepping, 63, 0, true); // #bytes for tailLoop
-
-  BIND(L_mainLoop);
-    update_1word_crc32(crc, buf, table, 0, 0, crc, t1, t2, t3);
-    update_1word_crc32(crc, buf, table, 4, mainLoop_stepping, crc, t1, t2, t3);
-    z_brct(ctr, L_mainLoop); // Iterate.
-
-  z_lrvr(crc, crc);          // Revert byte order back to original.
-
-  // Process last few (<8) bytes of buffer.
-  BIND(L_tail);
-  update_byteLoop_crc32(crc, buf, len, table, data);
-
-  if (invertCRC) {
-    not_(crc, noreg, false);           // 1s complement of crc
-  }
-}
-
-/**
- * @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 Z_R10..Z_R13 as work register. Must be saved/restored by caller!
- */
 void MacroAssembler::kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
                                         Register t0,  Register t1,  Register t2,  Register t3,
                                         bool invertCRC) {
--- a/src/hotspot/cpu/s390/macroAssembler_s390.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/cpu/s390/macroAssembler_s390.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1056,9 +1056,6 @@
   void kernel_crc32_1word(Register crc, Register buf, Register len, Register table,
                           Register t0,  Register t1,  Register t2,  Register t3,
                           bool invertCRC);
-  void kernel_crc32_2word(Register crc, Register buf, Register len, Register table,
-                          Register t0,  Register t1,  Register t2,  Register t3,
-                          bool invertCRC);
 
   // Emitters for BigInteger.multiplyToLen intrinsic
   // note: length of result array (zlen) is passed on the stack
--- a/src/hotspot/share/adlc/adlc.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/adlc/adlc.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,10 @@
 #define strdup _strdup
 #endif
 
+#if _MSC_VER < 1900
+#define snprintf _snprintf
+#endif
+
 #ifndef _INTPTR_T_DEFINED
 #ifdef _WIN64
 typedef __int64 intptr_t;
--- a/src/hotspot/share/adlc/dfa.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/adlc/dfa.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -719,21 +719,21 @@
 
   // Preserve use of external name which has a zero value
   if( c1->_external_name != NULL ) {
-    sprintf(string_buffer, "%s", c1->as_string());
-    if( !c2->is_zero() ) {
-      strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
-      strncat(string_buffer, c2->as_string(), STRING_BUFFER_LENGTH);
+    if( c2->is_zero() ) {
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s", c1->as_string());
+    } else {
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s+%s", c1->as_string(), c2->as_string());
     }
+    string_buffer[STRING_BUFFER_LENGTH - 1] = '\0';
     result = strdup(string_buffer);
   }
   else if( c2->_external_name != NULL ) {
-    if( !c1->is_zero() ) {
-      sprintf(string_buffer, "%s", c1->as_string());
-      strncat(string_buffer, " + ", STRING_BUFFER_LENGTH);
+    if( c1->is_zero() ) {
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s", c2->_external_name);
     } else {
-      string_buffer[0] = '\0';
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s + %s", c1->as_string(), c2->as_string());
     }
-    strncat(string_buffer, c2->_external_name, STRING_BUFFER_LENGTH);
+    string_buffer[STRING_BUFFER_LENGTH - 1] = '\0';
     result = strdup(string_buffer);
   }
   return result;
@@ -741,18 +741,19 @@
 
 const char *Expr::compute_expr(const Expr *c1, const Expr *c2) {
   if( !c1->is_zero() ) {
-    sprintf( string_buffer, "%s", c1->_expr);
-    if( !c2->is_zero() ) {
-      strncat(string_buffer, "+", STRING_BUFFER_LENGTH);
-      strncat(string_buffer, c2->_expr, STRING_BUFFER_LENGTH);
+    if( c2->is_zero() ) {
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s", c1->_expr);
+    } else {
+      snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s+%s", c1->_expr, c2->_expr);
     }
   }
   else if( !c2->is_zero() ) {
-    sprintf( string_buffer, "%s", c2->_expr);
+    snprintf(string_buffer, STRING_BUFFER_LENGTH, "%s", c2->_expr);
   }
   else {
     sprintf( string_buffer, "0");
   }
+  string_buffer[STRING_BUFFER_LENGTH - 1] = '\0';
   char *cost = strdup(string_buffer);
 
   return cost;
--- a/src/hotspot/share/ci/ciInstanceKlass.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/ci/ciInstanceKlass.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -57,7 +57,7 @@
   AccessFlags access_flags = ik->access_flags();
   _flags = ciFlags(access_flags);
   _has_finalizer = access_flags.has_finalizer();
-  _has_subklass = ik->subklass() != NULL;
+  _has_subklass = flags().is_final() ? subklass_false : subklass_unknown;
   _init_state = ik->init_state();
   _nonstatic_field_size = ik->nonstatic_field_size();
   _has_nonstatic_fields = ik->has_nonstatic_fields();
@@ -147,8 +147,8 @@
 bool ciInstanceKlass::compute_shared_has_subklass() {
   GUARDED_VM_ENTRY(
     InstanceKlass* ik = get_instanceKlass();
-    _has_subklass = ik->subklass() != NULL;
-    return _has_subklass;
+    _has_subklass = ik->subklass() != NULL ? subklass_true : subklass_false;
+    return _has_subklass == subklass_true;
   )
 }
 
@@ -583,7 +583,7 @@
   if (is_shared()) {
     return is_final();  // approximately correct
   } else {
-    return !_has_subklass && (nof_implementors() == 0);
+    return !has_subklass() && (nof_implementors() == 0);
   }
 }
 
--- a/src/hotspot/share/ci/ciInstanceKlass.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/ci/ciInstanceKlass.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -44,13 +44,15 @@
   friend class ciField;
 
 private:
+  enum SubklassValue { subklass_unknown, subklass_false, subklass_true };
+
   jobject                _loader;
   jobject                _protection_domain;
 
   InstanceKlass::ClassState _init_state;           // state of class
   bool                   _is_shared;
   bool                   _has_finalizer;
-  bool                   _has_subklass;
+  SubklassValue          _has_subklass;
   bool                   _has_nonstatic_fields;
   bool                   _has_nonstatic_concrete_methods;
   bool                   _is_unsafe_anonymous;
@@ -139,14 +141,15 @@
     return _has_finalizer; }
   bool                   has_subklass()   {
     assert(is_loaded(), "must be loaded");
-    if (_is_shared && !_has_subklass) {
+    if (_has_subklass == subklass_unknown ||
+        (_is_shared && _has_subklass == subklass_false)) {
       if (flags().is_final()) {
         return false;
       } else {
         return compute_shared_has_subklass();
       }
     }
-    return _has_subklass;
+    return _has_subklass == subklass_true;
   }
   jint                   size_helper()  {
     return (Klass::layout_helper_size_in_bytes(layout_helper())
--- a/src/hotspot/share/ci/ciMethodData.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/ci/ciMethodData.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -198,17 +198,28 @@
   }
 }
 
-
 void ciTypeStackSlotEntries::translate_type_data_from(const TypeStackSlotEntries* entries) {
   for (int i = 0; i < number_of_entries(); i++) {
     intptr_t k = entries->type(i);
-    TypeStackSlotEntries::set_type(i, translate_klass(k));
+    Klass* klass = (Klass*)klass_part(k);
+    if (klass != NULL && !klass->is_loader_alive()) {
+      // With concurrent class unloading, the MDO could have stale metadata; override it
+      TypeStackSlotEntries::set_type(i, TypeStackSlotEntries::with_status((Klass*)NULL, k));
+    } else {
+      TypeStackSlotEntries::set_type(i, translate_klass(k));
+    }
   }
 }
 
 void ciReturnTypeEntry::translate_type_data_from(const ReturnTypeEntry* ret) {
   intptr_t k = ret->type();
-  set_type(translate_klass(k));
+  Klass* klass = (Klass*)klass_part(k);
+  if (klass != NULL && !klass->is_loader_alive()) {
+    // With concurrent class unloading, the MDO could have stale metadata; override it
+    set_type(ReturnTypeEntry::with_status((Klass*)NULL, k));
+  } else {
+    set_type(translate_klass(k));
+  }
 }
 
 void ciSpeculativeTrapData::translate_from(const ProfileData* data) {
--- a/src/hotspot/share/classfile/classLoaderDataGraph.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,6 +29,7 @@
 #include "classfile/metadataOnStackMark.hpp"
 #include "classfile/moduleEntry.hpp"
 #include "classfile/packageEntry.hpp"
+#include "code/dependencyContext.hpp"
 #include "logging/log.hpp"
 #include "logging/logStream.hpp"
 #include "memory/allocation.inline.hpp"
@@ -597,6 +598,7 @@
     Metaspace::purge();
     set_metaspace_oom(false);
   }
+  DependencyContext::purge_dependency_contexts();
 }
 
 int ClassLoaderDataGraph::resize_if_needed() {
--- a/src/hotspot/share/classfile/compactHashtable.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/classfile/compactHashtable.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -375,6 +375,9 @@
   inline int remain() {
     return (int)(_end - _p);
   }
+  int last_line_no() {
+    return _line_no - 1;
+  }
 
   void corrupted(const char *p, const char *msg);
 
--- a/src/hotspot/share/classfile/javaClasses.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -3741,6 +3741,7 @@
 // Support for java_lang_invoke_MethodHandleNatives_CallSiteContext
 
 int java_lang_invoke_MethodHandleNatives_CallSiteContext::_vmdependencies_offset;
+int java_lang_invoke_MethodHandleNatives_CallSiteContext::_last_cleanup_offset;
 
 void java_lang_invoke_MethodHandleNatives_CallSiteContext::compute_offsets() {
   InstanceKlass* k = SystemDictionary::Context_klass();
@@ -3755,8 +3756,9 @@
 
 DependencyContext java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(oop call_site) {
   assert(java_lang_invoke_MethodHandleNatives_CallSiteContext::is_instance(call_site), "");
-  intptr_t* vmdeps_addr = (intptr_t*)call_site->field_addr(_vmdependencies_offset);
-  DependencyContext dep_ctx(vmdeps_addr);
+  nmethodBucket* volatile* vmdeps_addr = (nmethodBucket* volatile*)call_site->field_addr(_vmdependencies_offset);
+  volatile uint64_t* last_cleanup_addr = (volatile uint64_t*)call_site->field_addr(_last_cleanup_offset);
+  DependencyContext dep_ctx(vmdeps_addr, last_cleanup_addr);
   return dep_ctx;
 }
 
--- a/src/hotspot/share/classfile/javaClasses.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/classfile/javaClasses.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1201,7 +1201,8 @@
 // Interface to java.lang.invoke.MethodHandleNatives$CallSiteContext objects
 
 #define CALLSITECONTEXT_INJECTED_FIELDS(macro) \
-  macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, vmdependencies, intptr_signature, false)
+  macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, vmdependencies, intptr_signature, false) \
+  macro(java_lang_invoke_MethodHandleNatives_CallSiteContext, last_cleanup, long_signature, false)
 
 class DependencyContext;
 
@@ -1210,6 +1211,7 @@
 
 private:
   static int _vmdependencies_offset;
+  static int _last_cleanup_offset;
 
   static void compute_offsets();
 
--- a/src/hotspot/share/classfile/vmSymbols.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/classfile/vmSymbols.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -426,6 +426,7 @@
   template(signers_name,                              "signers_name")                             \
   template(loader_data_name,                          "loader_data")                              \
   template(vmdependencies_name,                       "vmdependencies")                           \
+  template(last_cleanup_name,                         "last_cleanup")                             \
   template(loader_name,                               "loader")                                   \
   template(getModule_name,                            "getModule")                                \
   template(input_stream_void_signature,               "(Ljava/io/InputStream;)V")                 \
--- a/src/hotspot/share/code/codeBlob.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/codeBlob.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -116,7 +116,12 @@
 
   CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments);
   CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
+
 public:
+  // Only used by unit test.
+  CodeBlob()
+    : _type(compiler_none) {}
+
   // Returns the space needed for CodeBlob
   static unsigned int allocation_size(CodeBuffer* cb, int header_size);
   static unsigned int align_code_offset(int offset);
--- a/src/hotspot/share/code/codeCache.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/codeCache.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,6 +29,7 @@
 #include "code/codeHeapState.hpp"
 #include "code/compiledIC.hpp"
 #include "code/dependencies.hpp"
+#include "code/dependencyContext.hpp"
 #include "code/icBuffer.hpp"
 #include "code/nmethod.hpp"
 #include "code/pcDesc.hpp"
@@ -940,6 +941,19 @@
   }
 }
 
+CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
+  : _is_unloading_behaviour(is_alive)
+{
+  IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
+  increment_unloading_cycle();
+  DependencyContext::cleaning_start();
+}
+
+CodeCache::UnloadingScope::~UnloadingScope() {
+  IsUnloadingBehaviour::set_current(NULL);
+  DependencyContext::cleaning_end();
+}
+
 void CodeCache::verify_oops() {
   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
   VerifyOopClosure voc;
--- a/src/hotspot/share/code/codeCache.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/codeCache.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -180,17 +180,10 @@
     ClosureIsUnloadingBehaviour _is_unloading_behaviour;
 
   public:
-    UnloadingScope(BoolObjectClosure* is_alive)
-      : _is_unloading_behaviour(is_alive)
-    {
-      IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
-      increment_unloading_cycle();
-    }
+    UnloadingScope(BoolObjectClosure* is_alive);
+    ~UnloadingScope();
+  };
 
-    ~UnloadingScope() {
-      IsUnloadingBehaviour::set_current(NULL);
-    }
-  };
   static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
   static uint8_t unloading_cycle() { return _unloading_cycle; }
   static void increment_unloading_cycle();
--- a/src/hotspot/share/code/compiledMethod.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/compiledMethod.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -177,6 +177,9 @@
   CompiledMethod(Method* method, const char* name, CompilerType type, int size, int header_size, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
 
 public:
+  // Only used by unit test.
+  CompiledMethod() {}
+
   virtual bool is_compiled() const                { return true; }
 
   template<typename T>
--- a/src/hotspot/share/code/dependencyContext.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/dependencyContext.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -35,6 +35,8 @@
 PerfCounter* DependencyContext::_perf_total_buckets_deallocated_count = NULL;
 PerfCounter* DependencyContext::_perf_total_buckets_stale_count       = NULL;
 PerfCounter* DependencyContext::_perf_total_buckets_stale_acc_count   = NULL;
+nmethodBucket* volatile DependencyContext::_purge_list = NULL;
+volatile uint64_t DependencyContext::_cleaning_epoch = 0;
 
 void dependencyContext_init() {
   DependencyContext::init();
@@ -61,7 +63,7 @@
 //
 int DependencyContext::mark_dependent_nmethods(DepChange& changes) {
   int found = 0;
-  for (nmethodBucket* b = dependencies(); b != NULL; b = b->next()) {
+  for (nmethodBucket* b = dependencies_not_unloading(); b != NULL; b = b->next_not_unloading()) {
     nmethod* nm = b->get_nmethod();
     // since dependencies aren't removed until an nmethod becomes a zombie,
     // the dependency list may contain nmethods which aren't alive.
@@ -86,21 +88,49 @@
 // so a count is kept for each bucket to guarantee that creation and
 // deletion of dependencies is consistent.
 //
-void DependencyContext::add_dependent_nmethod(nmethod* nm, bool expunge) {
+void DependencyContext::add_dependent_nmethod(nmethod* nm) {
   assert_lock_strong(CodeCache_lock);
-  for (nmethodBucket* b = dependencies(); b != NULL; b = b->next()) {
+  for (nmethodBucket* b = dependencies_not_unloading(); b != NULL; b = b->next_not_unloading()) {
     if (nm == b->get_nmethod()) {
       b->increment();
       return;
     }
   }
-  set_dependencies(new nmethodBucket(nm, dependencies()));
+  nmethodBucket* new_head = new nmethodBucket(nm, NULL);
+  for (;;) {
+    nmethodBucket* head = Atomic::load(_dependency_context_addr);
+    new_head->set_next(head);
+    if (Atomic::cmpxchg(new_head, _dependency_context_addr, head) == head) {
+      break;
+    }
+  }
   if (UsePerfData) {
     _perf_total_buckets_allocated_count->inc();
   }
+}
+
+void DependencyContext::release(nmethodBucket* b) {
+  bool expunge = Atomic::load(&_cleaning_epoch) == 0;
   if (expunge) {
-    // Remove stale entries from the list.
-    expunge_stale_entries();
+    assert_locked_or_safepoint(CodeCache_lock);
+    delete b;
+    if (UsePerfData) {
+      _perf_total_buckets_deallocated_count->inc();
+    }
+  } else {
+    // Mark the context as having stale entries, since it is not safe to
+    // expunge the list right now.
+    for (;;) {
+      nmethodBucket* purge_list_head = Atomic::load(&_purge_list);
+      b->set_purge_list_next(purge_list_head);
+      if (Atomic::cmpxchg(b, &_purge_list, purge_list_head) == purge_list_head) {
+        break;
+      }
+    }
+    if (UsePerfData) {
+      _perf_total_buckets_stale_count->inc();
+      _perf_total_buckets_stale_acc_count->inc();
+    }
   }
 }
 
@@ -111,92 +141,71 @@
 // a corresponding bucket otherwise there's a bug in the recording of dependencies.
 // Can be called concurrently by parallel GC threads.
 //
-void DependencyContext::remove_dependent_nmethod(nmethod* nm, bool expunge) {
+void DependencyContext::remove_dependent_nmethod(nmethod* nm) {
   assert_locked_or_safepoint(CodeCache_lock);
-  nmethodBucket* first = dependencies();
+  nmethodBucket* first = dependencies_not_unloading();
   nmethodBucket* last = NULL;
-  for (nmethodBucket* b = first; b != NULL; b = b->next()) {
+  for (nmethodBucket* b = first; b != NULL; b = b->next_not_unloading()) {
     if (nm == b->get_nmethod()) {
       int val = b->decrement();
       guarantee(val >= 0, "Underflow: %d", val);
       if (val == 0) {
-        if (expunge) {
-          if (last == NULL) {
-            set_dependencies(b->next());
-          } else {
-            last->set_next(b->next());
-          }
-          delete b;
-          if (UsePerfData) {
-            _perf_total_buckets_deallocated_count->inc();
-          }
+        if (last == NULL) {
+          // If there was not a head that was not unloading, we can set a new
+          // head without a CAS, because we know there is no contending cleanup.
+          set_dependencies(b->next_not_unloading());
         } else {
-          // Mark the context as having stale entries, since it is not safe to
-          // expunge the list right now.
-          set_has_stale_entries(true);
-          if (UsePerfData) {
-            _perf_total_buckets_stale_count->inc();
-            _perf_total_buckets_stale_acc_count->inc();
-          }
+          // Only supports a single inserting thread (protected by CodeCache_lock)
+          // for now. Therefore, the next pointer only competes with another cleanup
+          // operation. That interaction does not need a CAS.
+          last->set_next(b->next_not_unloading());
         }
-      }
-      if (expunge) {
-        // Remove stale entries from the list.
-        expunge_stale_entries();
+        release(b);
       }
       return;
     }
     last = b;
   }
-#ifdef ASSERT
-  tty->print_raw_cr("### can't find dependent nmethod");
-  nm->print();
-#endif // ASSERT
-  ShouldNotReachHere();
 }
 
 //
 // Reclaim all unused buckets.
 //
-void DependencyContext::expunge_stale_entries() {
-  assert_locked_or_safepoint(CodeCache_lock);
-  if (!has_stale_entries()) {
-    assert(!find_stale_entries(), "inconsistent info");
+void DependencyContext::purge_dependency_contexts() {
+  int removed = 0;
+  for (nmethodBucket* b = _purge_list; b != NULL;) {
+    nmethodBucket* next = b->purge_list_next();
+    removed++;
+    delete b;
+    b = next;
+  }
+  if (UsePerfData && removed > 0) {
+    _perf_total_buckets_deallocated_count->inc(removed);
+  }
+  _purge_list = NULL;
+}
+
+//
+// Cleanup a dependency context by unlinking and placing all dependents corresponding
+// to is_unloading nmethods on a purge list, which will be deleted later when it is safe.
+void DependencyContext::clean_unloading_dependents() {
+  if (!claim_cleanup()) {
+    // Somebody else is cleaning up this dependency context.
     return;
   }
-  nmethodBucket* first = dependencies();
-  nmethodBucket* last = NULL;
-  int removed = 0;
-  for (nmethodBucket* b = first; b != NULL;) {
-    assert(b->count() >= 0, "bucket count: %d", b->count());
-    nmethodBucket* next = b->next();
-    if (b->count() == 0) {
-      if (last == NULL) {
-        first = next;
-      } else {
-        last->set_next(next);
-      }
-      removed++;
-      delete b;
-      // last stays the same.
-    } else {
-      last = b;
-    }
+  // Walk the nmethodBuckets and move dead entries on the purge list, which will
+  // be deleted during ClassLoaderDataGraph::purge().
+  nmethodBucket* b = dependencies_not_unloading();
+  while (b != NULL) {
+    nmethodBucket* next = b->next_not_unloading();
     b = next;
   }
-  set_dependencies(first);
-  set_has_stale_entries(false);
-  if (UsePerfData && removed > 0) {
-    _perf_total_buckets_deallocated_count->inc(removed);
-    _perf_total_buckets_stale_count->dec(removed);
-  }
 }
 
 //
 // Invalidate all dependencies in the context
 int DependencyContext::remove_all_dependents() {
-  assert_locked_or_safepoint(CodeCache_lock);
-  nmethodBucket* b = dependencies();
+  nmethodBucket* b = dependencies_not_unloading();
   set_dependencies(NULL);
   int marked = 0;
   int removed = 0;
@@ -206,12 +215,11 @@
       nm->mark_for_deoptimization();
       marked++;
     }
-    nmethodBucket* next = b->next();
+    nmethodBucket* next = b->next_not_unloading();
     removed++;
-    delete b;
+    release(b);
     b = next;
   }
-  set_has_stale_entries(false);
   if (UsePerfData && removed > 0) {
     _perf_total_buckets_deallocated_count->inc(removed);
   }
@@ -221,7 +229,7 @@
 #ifndef PRODUCT
 void DependencyContext::print_dependent_nmethods(bool verbose) {
   int idx = 0;
-  for (nmethodBucket* b = dependencies(); b != NULL; b = b->next()) {
+  for (nmethodBucket* b = dependencies_not_unloading(); b != NULL; b = b->next_not_unloading()) {
     nmethod* nm = b->get_nmethod();
     tty->print("[%d] count=%d { ", idx++, b->count());
     if (!verbose) {
@@ -236,7 +244,7 @@
 }
 
 bool DependencyContext::is_dependent_nmethod(nmethod* nm) {
-  for (nmethodBucket* b = dependencies(); b != NULL; b = b->next()) {
+  for (nmethodBucket* b = dependencies_not_unloading(); b != NULL; b = b->next_not_unloading()) {
     if (nm == b->get_nmethod()) {
 #ifdef ASSERT
       int count = b->count();
@@ -248,15 +256,112 @@
   return false;
 }
 
-bool DependencyContext::find_stale_entries() {
-  for (nmethodBucket* b = dependencies(); b != NULL; b = b->next()) {
-    if (b->count() == 0)  return true;
-  }
-  return false;
-}
-
 #endif //PRODUCT
 
 int nmethodBucket::decrement() {
   return Atomic::sub(1, &_count);
 }
+
+// We use a safepoint counter to track the safepoint counter the last time a given
+// dependency context was cleaned. GC threads claim cleanup tasks by performing
+// a CAS on this value.
+bool DependencyContext::claim_cleanup() {
+  uint64_t cleaning_epoch = Atomic::load(&_cleaning_epoch);
+  uint64_t last_cleanup = Atomic::load(_last_cleanup_addr);
+  if (last_cleanup >= cleaning_epoch) {
+    return false;
+  }
+  return Atomic::cmpxchg(cleaning_epoch, _last_cleanup_addr, last_cleanup) == last_cleanup;
+}
+
+// Retrieve the first nmethodBucket that has a dependent that does not correspond to
+// an is_unloading nmethod. Any nmethodBucket entries observed from the original head
+// that is_unloading() will be unlinked and placed on the purge list.
+nmethodBucket* DependencyContext::dependencies_not_unloading() {
+  for (;;) {
+    // Need acquire becase the read value could come from a concurrent insert.
+    nmethodBucket* head = OrderAccess::load_acquire(_dependency_context_addr);
+    if (head == NULL || !head->get_nmethod()->is_unloading()) {
+      return head;
+    }
+    nmethodBucket* head_next = head->next();
+    OrderAccess::loadload();
+    if (Atomic::load(_dependency_context_addr) != head) {
+      // Unstable load of head w.r.t. head->next
+      continue;
+    }
+    if (Atomic::cmpxchg(head_next, _dependency_context_addr, head) == head) {
+      // Release is_unloading entries if unlinking was claimed
+      DependencyContext::release(head);
+    }
+  }
+}
+
+// Relaxed accessors
+void DependencyContext::set_dependencies(nmethodBucket* b) {
+  Atomic::store(b, _dependency_context_addr);
+}
+
+nmethodBucket* DependencyContext::dependencies() {
+  return Atomic::load(_dependency_context_addr);
+}
+
+// After the gc_prologue, the dependency contexts may be claimed by the GC
+// and releasing of nmethodBucket entries will be deferred and placed on
+// a purge list to be deleted later.
+void DependencyContext::cleaning_start() {
+  assert(SafepointSynchronize::is_at_safepoint(), "must be");
+  uint64_t epoch = SafepointSynchronize::safepoint_counter();
+  Atomic::store(epoch, &_cleaning_epoch);
+}
+
+// The epilogue marks the end of dependency context cleanup by the GC,
+// and also makes subsequent releases of nmethodBuckets case immediate
+// deletion. It is admitted to end the cleanup in a concurrent phase.
+void DependencyContext::cleaning_end() {
+  uint64_t epoch = 0;
+  Atomic::store(epoch, &_cleaning_epoch);
+}
+
+// This function skips over nmethodBuckets in the list corresponding to
+// nmethods that are is_unloading. This allows exposing a view of the
+// dependents as-if they were already cleaned, despite being cleaned
+// concurrently. Any entry observed that is_unloading() will be unlinked
+// and placed on the purge list.
+nmethodBucket* nmethodBucket::next_not_unloading() {
+  for (;;) {
+    // Do not need acquire because the loaded entry can never be
+    // concurrently inserted.
+    nmethodBucket* next = Atomic::load(&_next);
+    if (next == NULL || !next->get_nmethod()->is_unloading()) {
+      return next;
+    }
+    nmethodBucket* next_next = Atomic::load(&next->_next);
+    OrderAccess::loadload();
+    if (Atomic::load(&_next) != next) {
+      // Unstable load of next w.r.t. next->next
+      continue;
+    }
+    if (Atomic::cmpxchg(next_next, &_next, next) == next) {
+      // Release is_unloading entries if unlinking was claimed
+      DependencyContext::release(next);
+    }
+  }
+}
+
+// Relaxed accessors
+nmethodBucket* nmethodBucket::next() {
+  return Atomic::load(&_next);
+}
+
+void nmethodBucket::set_next(nmethodBucket* b) {
+  Atomic::store(b, &_next);
+}
+
+nmethodBucket* nmethodBucket::purge_list_next() {
+  return Atomic::load(&_purge_list_next);
+}
+
+void nmethodBucket::set_purge_list_next(nmethodBucket* b) {
+  Atomic::store(b, &_purge_list_next);
+}
--- a/src/hotspot/share/code/dependencyContext.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/dependencyContext.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -48,70 +48,50 @@
   friend class VMStructs;
  private:
   nmethod*       _nmethod;
-  int            _count;
-  nmethodBucket* _next;
+  volatile int   _count;
+  nmethodBucket* volatile _next;
+  nmethodBucket* volatile _purge_list_next;
 
  public:
   nmethodBucket(nmethod* nmethod, nmethodBucket* next) :
-   _nmethod(nmethod), _count(1), _next(next) {}
+    _nmethod(nmethod), _count(1), _next(next), _purge_list_next(NULL) {}
 
-  int count()                             { return _count; }
-  int increment()                         { _count += 1; return _count; }
+  int count()                                { return _count; }
+  int increment()                            { _count += 1; return _count; }
   int decrement();
-  nmethodBucket* next()                   { return _next; }
-  void set_next(nmethodBucket* b)         { _next = b; }
-  nmethod* get_nmethod()                  { return _nmethod; }
+  nmethodBucket* next();
+  nmethodBucket* next_not_unloading();
+  void set_next(nmethodBucket* b);
+  nmethodBucket* purge_list_next();
+  void set_purge_list_next(nmethodBucket* b);
+  nmethod* get_nmethod()                     { return _nmethod; }
 };
 
 //
 // Utility class to manipulate nmethod dependency context.
-// The context consists of nmethodBucket* (a head of a linked list)
-// and a boolean flag (does the list contains stale entries). The structure is
-// encoded as an intptr_t: lower bit is used for the flag. It is possible since
-// nmethodBucket* is aligned - the structure is malloc'ed in C heap.
 // Dependency context can be attached either to an InstanceKlass (_dep_context field)
 // or CallSiteContext oop for call_site_target dependencies (see javaClasses.hpp).
-// DependencyContext class operates on some location which holds a intptr_t value.
+// DependencyContext class operates on some location which holds a nmethodBucket* value
+// and uint64_t integer recording the safepoint counter at the last cleanup.
 //
 class DependencyContext : public StackObj {
   friend class VMStructs;
   friend class TestDependencyContext;
  private:
-  enum TagBits { _has_stale_entries_bit = 1, _has_stale_entries_mask = 1 };
-
-  intptr_t* _dependency_context_addr;
-
-  void set_dependencies(nmethodBucket* b) {
-    assert((intptr_t(b) & _has_stale_entries_mask) == 0, "should be aligned");
-    if (has_stale_entries()) {
-      *_dependency_context_addr = intptr_t(b) | _has_stale_entries_mask;
-    } else {
-      *_dependency_context_addr = intptr_t(b);
-    }
-  }
+  nmethodBucket* volatile* _dependency_context_addr;
+  volatile uint64_t*       _last_cleanup_addr;
 
-  void set_has_stale_entries(bool x) {
-    if (x) {
-      *_dependency_context_addr |= _has_stale_entries_mask;
-    } else {
-      *_dependency_context_addr &= ~_has_stale_entries_mask;
-    }
-  }
-
-  nmethodBucket* dependencies() {
-    intptr_t value = *_dependency_context_addr;
-    return (nmethodBucket*) (value & ~_has_stale_entries_mask);
-  }
-
-  bool has_stale_entries() const {
-    intptr_t value = *_dependency_context_addr;
-    return (value & _has_stale_entries_mask) != 0;
-  }
+  bool claim_cleanup();
+  void set_dependencies(nmethodBucket* b);
+  nmethodBucket* dependencies();
+  nmethodBucket* dependencies_not_unloading();
 
   static PerfCounter* _perf_total_buckets_allocated_count;
   static PerfCounter* _perf_total_buckets_deallocated_count;
   static PerfCounter* _perf_total_buckets_stale_count;
   static PerfCounter* _perf_total_buckets_stale_acc_count;
+  static nmethodBucket* volatile _purge_list;
+  static volatile uint64_t       _cleaning_epoch;
 
  public:
 #ifdef ASSERT
@@ -120,31 +100,35 @@
   // (e.g. CallSiteContext Java object).
   uint64_t _safepoint_counter;
 
-  DependencyContext(intptr_t* addr) : _dependency_context_addr(addr),
-    _safepoint_counter(SafepointSynchronize::safepoint_counter()) {}
+  DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
+    : _dependency_context_addr(bucket_addr),
+      _last_cleanup_addr(last_cleanup_addr),
+      _safepoint_counter(SafepointSynchronize::safepoint_counter()) {}
 
   ~DependencyContext() {
     assert(_safepoint_counter == SafepointSynchronize::safepoint_counter(), "safepoint happened");
   }
 #else
-  DependencyContext(intptr_t* addr) : _dependency_context_addr(addr) {}
+  DependencyContext(nmethodBucket* volatile* bucket_addr, volatile uint64_t* last_cleanup_addr)
+    : _dependency_context_addr(bucket_addr),
+      _last_cleanup_addr(last_cleanup_addr) {}
 #endif // ASSERT
 
-  static const intptr_t EMPTY = 0; // dependencies = NULL, has_stale_entries = false
-
   static void init();
 
   int  mark_dependent_nmethods(DepChange& changes);
-  void add_dependent_nmethod(nmethod* nm, bool expunge_stale_entries = false);
-  void remove_dependent_nmethod(nmethod* nm, bool expunge_stale_entries = false);
+  void add_dependent_nmethod(nmethod* nm);
+  void remove_dependent_nmethod(nmethod* nm);
   int  remove_all_dependents();
-
-  void expunge_stale_entries();
+  void clean_unloading_dependents();
+  static void purge_dependency_contexts();
+  static void release(nmethodBucket* b);
+  static void cleaning_start();
+  static void cleaning_end();
 
 #ifndef PRODUCT
   void print_dependent_nmethods(bool verbose);
   bool is_dependent_nmethod(nmethod* nm);
-  bool find_stale_entries();
 #endif //PRODUCT
 };
 #endif // SHARE_VM_CODE_DEPENDENCYCONTEXT_HPP
--- a/src/hotspot/share/code/nmethod.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/nmethod.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1053,7 +1053,8 @@
   // recorded in instanceKlasses get flushed.
   // Since this work is being done during a GC, defer deleting dependencies from the
   // InstanceKlass.
-  assert(Universe::heap()->is_gc_active(), "should only be called during gc");
+  assert(Universe::heap()->is_gc_active() || Thread::current()->is_ConcurrentGC_thread(),
+         "should only be called during gc");
   flush_dependencies(/*delete_immediately*/false);
 
   // Break cycle between nmethod & method
@@ -1095,7 +1096,8 @@
   }
 
   // Make the class unloaded - i.e., change state and notify sweeper
-  assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
+  assert(SafepointSynchronize::is_at_safepoint() || Thread::current()->is_ConcurrentGC_thread(),
+         "must be at safepoint");
 
   // Unregister must be done before the state change
   Universe::heap()->unregister_nmethod(this);
@@ -1372,8 +1374,8 @@
 // notifies instanceKlasses that are reachable
 
 void nmethod::flush_dependencies(bool delete_immediately) {
-  assert_locked_or_safepoint(CodeCache_lock);
-  assert(Universe::heap()->is_gc_active() != delete_immediately,
+  DEBUG_ONLY(bool called_by_gc = Universe::heap()->is_gc_active() || Thread::current()->is_ConcurrentGC_thread();)
+  assert(called_by_gc != delete_immediately,
   "delete_immediately is false if and only if we are called during GC");
   if (!has_flushed_dependencies()) {
     set_has_flushed_dependencies();
@@ -1381,7 +1383,12 @@
       if (deps.type() == Dependencies::call_site_target_value) {
         // CallSite dependencies are managed on per-CallSite instance basis.
         oop call_site = deps.argument_oop(0);
-        MethodHandles::remove_dependent_nmethod(call_site, this);
+        if (delete_immediately) {
+          assert_locked_or_safepoint(CodeCache_lock);
+          MethodHandles::remove_dependent_nmethod(call_site, this);
+        } else {
+          MethodHandles::clean_dependency_context(call_site);
+        }
       } else {
         Klass* klass = deps.context_type();
         if (klass == NULL) {
@@ -1389,11 +1396,12 @@
         }
         // During GC delete_immediately is false, and liveness
         // of dependee determines class that needs to be updated.
-        if (delete_immediately || klass->is_loader_alive()) {
-          // The GC defers deletion of this entry, since there might be multiple threads
-          // iterating over the _dependencies graph. Other call paths are single-threaded
-          // and may delete it immediately.
-          InstanceKlass::cast(klass)->remove_dependent_nmethod(this, delete_immediately);
+        if (delete_immediately) {
+          assert_locked_or_safepoint(CodeCache_lock);
+          InstanceKlass::cast(klass)->remove_dependent_nmethod(this);
+        } else if (klass->is_loader_alive()) {
+          // The GC may clean dependency contexts concurrently and in parallel.
+          InstanceKlass::cast(klass)->clean_dependency_context();
         }
       }
     }
@@ -2917,6 +2925,10 @@
 }
 
 void nmethod::maybe_invalidate_installed_code() {
+  if (!is_compiled_by_jvmci()) {
+    return;
+  }
+
   assert(Patching_lock->is_locked() ||
          SafepointSynchronize::is_at_safepoint(), "should be performed under a lock for consistency");
   oop installed_code = JNIHandles::resolve(_jvmci_installed_code);
--- a/src/hotspot/share/code/nmethod.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/code/nmethod.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -257,6 +257,14 @@
 #endif
   );
 
+  // Only used for unit tests.
+  nmethod()
+    : CompiledMethod(),
+      _is_unloading_state(0),
+      _native_receiver_sp_offset(in_ByteSize(-1)),
+      _native_basic_lock_sp_offset(in_ByteSize(-1)) {}
+
+
   static nmethod* new_native_nmethod(const methodHandle& method,
                                      int compile_id,
                                      CodeBuffer *code_buffer,
--- a/src/hotspot/share/gc/g1/g1Arguments.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1Arguments.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -81,6 +81,13 @@
     vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", NULL);
   }
 
+  // When dumping the CDS archive we want to reduce fragmentation by
+  // triggering a full collection. To get as low fragmentation as
+  // possible we only use one worker thread.
+  if (DumpSharedSpaces) {
+    FLAG_SET_ERGO(uint, ParallelGCThreads, 1);
+  }
+
   if (FLAG_IS_DEFAULT(G1ConcRefinementThreads)) {
     FLAG_SET_ERGO(uint, G1ConcRefinementThreads, ParallelGCThreads);
   }
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1563,16 +1563,33 @@
   guarantee(_task_queues != NULL, "task_queues allocation failure.");
 }
 
+static size_t actual_reserved_page_size(ReservedSpace rs) {
+  size_t page_size = os::vm_page_size();
+  if (UseLargePages) {
+    // There are two ways to manage large page memory.
+    // 1. OS supports committing large page memory.
+    // 2. OS doesn't support committing large page memory so ReservedSpace manages it.
+    //    And ReservedSpace calls it 'special'. If we failed to set 'special',
+    //    we reserved memory without large page.
+    if (os::can_commit_large_page_memory() || rs.special()) {
+      page_size = rs.alignment();
+    }
+  }
+
+  return page_size;
+}
+
 G1RegionToSpaceMapper* G1CollectedHeap::create_aux_memory_mapper(const char* description,
                                                                  size_t size,
                                                                  size_t translation_factor) {
   size_t preferred_page_size = os::page_size_for_region_unaligned(size, 1);
   // Allocate a new reserved space, preferring to use large pages.
   ReservedSpace rs(size, preferred_page_size);
+  size_t page_size = actual_reserved_page_size(rs);
   G1RegionToSpaceMapper* result  =
     G1RegionToSpaceMapper::create_mapper(rs,
                                          size,
-                                         rs.alignment(),
+                                         page_size,
                                          HeapRegion::GrainBytes,
                                          translation_factor,
                                          mtGC);
@@ -1580,7 +1597,7 @@
   os::trace_page_sizes_for_requested_size(description,
                                           size,
                                           preferred_page_size,
-                                          rs.alignment(),
+                                          page_size,
                                           rs.base(),
                                           rs.size());
 
@@ -1675,7 +1692,7 @@
 
   // Carve out the G1 part of the heap.
   ReservedSpace g1_rs = heap_rs.first_part(max_byte_size);
-  size_t page_size = UseLargePages ? os::large_page_size() : os::vm_page_size();
+  size_t page_size = actual_reserved_page_size(heap_rs);
   G1RegionToSpaceMapper* heap_storage =
     G1RegionToSpaceMapper::create_mapper(g1_rs,
                                          g1_rs.size(),
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -273,6 +273,69 @@
 };
 
 // Should be only used at CDS dump time
+class VerifyReadyForArchivingRegionClosure : public HeapRegionClosure {
+  bool _seen_free;
+  bool _has_holes;
+  bool _has_unexpected_holes;
+  bool _has_humongous;
+public:
+  bool has_holes() {return _has_holes;}
+  bool has_unexpected_holes() {return _has_unexpected_holes;}
+  bool has_humongous() {return _has_humongous;}
+
+  VerifyReadyForArchivingRegionClosure() : HeapRegionClosure() {
+    _seen_free = false;
+    _has_holes = false;
+    _has_unexpected_holes = false;
+    _has_humongous = false;
+  }
+  virtual bool do_heap_region(HeapRegion* hr) {
+    const char* hole = "";
+
+    if (hr->is_free()) {
+      _seen_free = true;
+    } else {
+      if (_seen_free) {
+        _has_holes = true;
+        if (hr->is_humongous()) {
+          hole = " hole";
+        } else {
+          _has_unexpected_holes = true;
+          hole = " hole **** unexpected ****";
+        }
+      }
+    }
+    if (hr->is_humongous()) {
+      _has_humongous = true;
+    }
+    log_info(gc, region, cds)("HeapRegion " INTPTR_FORMAT " %s%s", p2i(hr->bottom()), hr->get_type_str(), hole);
+    return false;
+  }
+};
+
+// We want all used regions to be moved to the bottom-end of the heap, so we have
+// a contiguous range of free regions at the top end of the heap. This way, we can
+// avoid fragmentation while allocating the archive regions.
+//
+// Before calling this, a full GC should have been executed with a single worker thread,
+// so that no old regions would be moved to the middle of the heap.
+void G1HeapVerifier::verify_ready_for_archiving() {
+  VerifyReadyForArchivingRegionClosure cl;
+  G1CollectedHeap::heap()->heap_region_iterate(&cl);
+  if (cl.has_holes()) {
+    log_warning(gc, verify)("All free regions should be at the top end of the heap, but"
+                            " we found holes. This is probably caused by (unmovable) humongous"
+                            " allocations, and may lead to fragmentation while"
+                            " writing archive heap memory regions.");
+  }
+  if (cl.has_humongous()) {
+    log_warning(gc, verify)("(Unmovable) humongous regions have been found and"
+                            " may lead to fragmentation while"
+                            " writing archive heap memory regions.");
+  }
+  assert(!cl.has_unexpected_holes(), "all holes should have been caused by humongous regions");
+}
+
 class VerifyArchivePointerRegionClosure: public HeapRegionClosure {
 private:
   G1CollectedHeap* _g1h;
--- a/src/hotspot/share/gc/g1/g1HeapVerifier.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/g1/g1HeapVerifier.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -115,6 +115,7 @@
   void verify_dirty_region(HeapRegion* hr) PRODUCT_RETURN;
   void verify_dirty_young_regions() PRODUCT_RETURN;
 
+  static void verify_ready_for_archiving();
   static void verify_archive_regions();
 };
 
--- a/src/hotspot/share/gc/shared/gcCause.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/shared/gcCause.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,6 +60,9 @@
     case _wb_full_gc:
       return "WhiteBox Initiated Full GC";
 
+    case _archive_time_gc:
+      return "Full GC for -Xshare:dump";
+
     case _no_gc:
       return "No GC";
 
--- a/src/hotspot/share/gc/shared/gcCause.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/shared/gcCause.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,6 +52,7 @@
     _wb_young_gc,
     _wb_conc_mark,
     _wb_full_gc,
+    _archive_time_gc,
 
     /* implementation independent, but reserved for GC use */
     _no_gc,
--- a/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/z/c2/zBarrierSetC2.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -658,8 +658,6 @@
       kit->set_control(gvn.transform(new ProjNode(barrier, LoadBarrierNode::Control)));
     }
     Node* result = gvn.transform(new ProjNode(transformed_barrier, LoadBarrierNode::Oop));
-    assert(is_gc_barrier_node(result), "sanity");
-    assert(step_over_gc_barrier(result) == val, "sanity");
     return result;
   } else {
     return val;
--- a/src/hotspot/share/gc/z/zForwardingTable.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/z/zForwardingTable.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -38,11 +38,18 @@
   _size = ZUtils::round_up_power_of_2(live_objects * 2);
   _table = MallocArrayAllocator<ZForwardingTableEntry>::allocate(_size, mtGC);
 
-  // Clear table
-  memset(_table, ZForwardingTableEntry::empty(), _size * sizeof(ZForwardingTableEntry));
+  // Construct table entries
+  for (size_t i = 0; i < _size; i++) {
+    ::new (_table + i) ZForwardingTableEntry();
+  }
 }
 
 void ZForwardingTable::reset() {
+  // Destruct table entries
+  for (size_t i = 0; i < _size; i++) {
+    (_table + i)->~ZForwardingTableEntry();
+  }
+
   // Free table
   MallocArrayAllocator<ZForwardingTableEntry>::free(_table);
   _table = NULL;
--- a/src/hotspot/share/gc/z/zForwardingTableEntry.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/gc/z/zForwardingTableEntry.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -52,6 +52,10 @@
 
   uint64_t _entry;
 
+  static uintptr_t empty() {
+    return (uintptr_t)-1;
+  }
+
 public:
   ZForwardingTableEntry() :
       _entry(empty()) {}
@@ -60,10 +64,6 @@
       _entry(field_from_index::encode(from_index) |
              field_to_offset::encode(to_offset)) {}
 
-  static uintptr_t empty() {
-    return (uintptr_t)-1;
-  }
-
   bool is_empty() const {
     return _entry == empty();
   }
--- a/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/binaryTreeDictionary.inline.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -229,7 +229,8 @@
   assert(chunk->list() == this, "list should be set for chunk");
   assert(tail() != NULL, "The tree list is embedded in the first chunk");
   // which means that the list can never be empty.
-  assert(!this->verify_chunk_in_free_list(chunk), "Double entry");
+  // This is expensive for metaspace
+  assert(!FLSVerifyDictionary || !this->verify_chunk_in_free_list(chunk), "Double entry");
   assert(head() == NULL || head()->prev() == NULL, "list invariant");
   assert(tail() == NULL || tail()->next() == NULL, "list invariant");
 
@@ -253,7 +254,8 @@
   assert(chunk->list() == this, "list should be set for chunk");
   assert(head() != NULL, "The tree list is embedded in the first chunk");
   assert(chunk != NULL, "returning NULL chunk");
-  assert(!this->verify_chunk_in_free_list(chunk), "Double entry");
+  // This is expensive for metaspace
+  assert(!FLSVerifyDictionary || !this->verify_chunk_in_free_list(chunk), "Double entry");
   assert(head() == NULL || head()->prev() == NULL, "list invariant");
   assert(tail() == NULL || tail()->next() == NULL, "list invariant");
 
--- a/src/hotspot/share/memory/filemap.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/filemap.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -683,7 +683,7 @@
   int arr_len = heap_mem == NULL ? 0 : heap_mem->length();
   if(arr_len > max_num_regions) {
     fail_stop("Unable to write archive heap memory regions: "
-              "number of memory regions exceeds maximum due to fragmentation."
+              "number of memory regions exceeds maximum due to fragmentation. "
               "Please increase java heap size "
               "(current MaxHeapSize is " SIZE_FORMAT ", InitialHeapSize is " SIZE_FORMAT ").",
               MaxHeapSize, InitialHeapSize);
--- a/src/hotspot/share/memory/heapShared.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/heapShared.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -193,6 +193,8 @@
     return;
   }
 
+  G1HeapVerifier::verify_ready_for_archiving();
+
   {
     NoSafepointVerifier nsv;
 
@@ -581,7 +583,7 @@
   for (JavaFieldStream fs(k); !fs.done(); fs.next()) {
     if (!fs.access_flags().is_static()) {
       BasicType ft = fs.field_descriptor().field_type();
-      if (!fs.access_flags().is_final() && (ft == T_ARRAY || T_OBJECT)) {
+      if (!fs.access_flags().is_final() && (ft == T_ARRAY || ft == T_OBJECT)) {
         ResourceMark rm(THREAD);
         log_warning(cds, heap)(
           "Please check reference field in %s instance in closed archive heap region: %s %s",
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,6 +29,7 @@
 #include "classfile/classLoaderExt.hpp"
 #include "classfile/dictionary.hpp"
 #include "classfile/loaderConstraints.hpp"
+#include "classfile/javaClasses.inline.hpp"
 #include "classfile/placeholders.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/stringTable.hpp"
@@ -350,7 +351,11 @@
   }
 }
 
+static GrowableArray<Handle>* _extra_interned_strings = NULL;
+
 void MetaspaceShared::read_extra_data(const char* filename, TRAPS) {
+  _extra_interned_strings = new (ResourceObj::C_HEAP, mtInternal)GrowableArray<Handle>(10000, true);
+
   HashtableTextDump reader(filename);
   reader.check_version("VERSION: 1.0");
 
@@ -358,15 +363,45 @@
     int utf8_length;
     int prefix_type = reader.scan_prefix(&utf8_length);
     ResourceMark rm(THREAD);
-    char* utf8_buffer = NEW_RESOURCE_ARRAY(char, utf8_length);
+    if (utf8_length == 0x7fffffff) {
+      // buf_len will overflown 32-bit value.
+      vm_exit_during_initialization(err_msg("string length too large: %d", utf8_length));
+    }
+    int buf_len = utf8_length+1;
+    char* utf8_buffer = NEW_RESOURCE_ARRAY(char, buf_len);
     reader.get_utf8(utf8_buffer, utf8_length);
+    utf8_buffer[utf8_length] = '\0';
 
     if (prefix_type == HashtableTextDump::SymbolPrefix) {
-      SymbolTable::new_symbol(utf8_buffer, utf8_length, THREAD);
+      SymbolTable::new_permanent_symbol(utf8_buffer, THREAD);
     } else{
       assert(prefix_type == HashtableTextDump::StringPrefix, "Sanity");
-      utf8_buffer[utf8_length] = '\0';
       oop s = StringTable::intern(utf8_buffer, THREAD);
+
+      if (HAS_PENDING_EXCEPTION) {
+        log_warning(cds, heap)("[line %d] extra interned string allocation failed; size too large: %d",
+                               reader.last_line_no(), utf8_length);
+        CLEAR_PENDING_EXCEPTION;
+      } else {
+#if INCLUDE_G1GC
+        if (UseG1GC) {
+          typeArrayOop body = java_lang_String::value(s);
+          const HeapRegion* hr = G1CollectedHeap::heap()->heap_region_containing(body);
+          if (hr->is_humongous()) {
+            // Don't keep it alive, so it will be GC'ed before we dump the strings, in order
+            // to maximize free heap space and minimize fragmentation.
+            log_warning(cds, heap)("[line %d] extra interned string ignored; size too large: %d",
+                                reader.last_line_no(), utf8_length);
+            continue;
+          }
+        }
+#endif
+        // Interned strings are GC'ed if there are no references to it, so let's
+        // add a reference to keep this string alive.
+        assert(s != NULL, "must succeed");
+        Handle h(THREAD, s);
+        _extra_interned_strings->append(h);
+      }
     }
   }
 }
@@ -451,8 +486,6 @@
   return _cds_i2i_entry_code_buffers;
 }
 
-// CDS code for dumping shared archive.
-
 // Global object for holding classes that have been loaded.  Since this
 // is run at a safepoint just before exit, this is the entire set of classes.
 static GrowableArray<Klass*>* _global_klass_objects;
@@ -1686,6 +1719,13 @@
     link_and_cleanup_shared_classes(CATCH);
     tty->print_cr("Rewriting and linking classes: done");
 
+    if (HeapShared::is_heap_object_archiving_allowed()) {
+      // Avoid fragmentation while archiving heap objects.
+      Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(true);
+      Universe::heap()->collect(GCCause::_archive_time_gc);
+      Universe::heap()->soft_ref_policy()->set_should_clear_all_soft_refs(false);
+    }
+
     VM_PopulateDumpSharedSpace op;
     VMThread::execute(&op);
   }
--- a/src/hotspot/share/memory/universe.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/universe.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -529,10 +529,6 @@
 #undef assert_pll_locked
 #undef assert_pll_ownership
 
-// initialize_vtable could cause gc if
-// 1) we specified true to initialize_vtable and
-// 2) this ran after gc was enabled
-// In case those ever change we use handles for oops
 void Universe::reinitialize_vtable_of(Klass* ko, TRAPS) {
   // init vtable of k and all subclasses
   ko->vtable().initialize_vtable(false, CHECK);
@@ -545,6 +541,14 @@
   }
 }
 
+void Universe::reinitialize_vtables(TRAPS) {
+  // The vtables are initialized by starting at java.lang.Object and
+  // initializing through the subclass links, so that the super
+  // classes are always initialized first.
+  Klass* ok = SystemDictionary::Object_klass();
+  Universe::reinitialize_vtable_of(ok, THREAD);
+}
+
 
 void initialize_itable_for_klass(InstanceKlass* k, TRAPS) {
   k->itable().initialize_itable(false, CHECK);
@@ -961,9 +965,7 @@
   { ResourceMark rm;
     Interpreter::initialize();      // needed for interpreter entry points
     if (!UseSharedSpaces) {
-      HandleMark hm(THREAD);
-      Klass* ok = SystemDictionary::Object_klass();
-      Universe::reinitialize_vtable_of(ok, CHECK_false);
+      Universe::reinitialize_vtables(CHECK_false);
       Universe::reinitialize_itables(CHECK_false);
     }
   }
--- a/src/hotspot/share/memory/universe.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/memory/universe.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -218,6 +218,7 @@
   static void fixup_mirrors(TRAPS);
 
   static void reinitialize_vtable_of(Klass* k, TRAPS);
+  static void reinitialize_vtables(TRAPS);
   static void reinitialize_itables(TRAPS);
   static void compute_base_vtable_size();             // compute vtable size of class Object
 
--- a/src/hotspot/share/oops/instanceKlass.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1070,27 +1070,32 @@
 }
 
 Klass* InstanceKlass::implementor() const {
-  assert_locked_or_safepoint(Compile_lock);
-  Klass** k = adr_implementor();
+  Klass* volatile* k = adr_implementor();
   if (k == NULL) {
     return NULL;
   } else {
-    return *k;
+    // This load races with inserts, and therefore needs acquire.
+    Klass* kls = OrderAccess::load_acquire(k);
+    if (kls != NULL && !kls->is_loader_alive()) {
+      return NULL;  // don't return unloaded class
+    } else {
+      return kls;
+    }
   }
 }
 
+
 void InstanceKlass::set_implementor(Klass* k) {
   assert_lock_strong(Compile_lock);
   assert(is_interface(), "not interface");
-  Klass** addr = adr_implementor();
+  Klass* volatile* addr = adr_implementor();
   assert(addr != NULL, "null addr");
   if (addr != NULL) {
-    *addr = k;
+    OrderAccess::release_store(addr, k);
   }
 }
 
 int  InstanceKlass::nof_implementors() const {
-  assert_lock_strong(Compile_lock);
   Klass* k = implementor();
   if (k == NULL) {
     return 0;
@@ -2117,7 +2122,7 @@
 }
 
 inline DependencyContext InstanceKlass::dependencies() {
-  DependencyContext dep_context(&_dep_context);
+  DependencyContext dep_context(&_dep_context, &_dep_context_last_cleaned);
   return dep_context;
 }
 
@@ -2129,8 +2134,12 @@
   dependencies().add_dependent_nmethod(nm);
 }
 
-void InstanceKlass::remove_dependent_nmethod(nmethod* nm, bool delete_immediately) {
-  dependencies().remove_dependent_nmethod(nm, delete_immediately);
+void InstanceKlass::remove_dependent_nmethod(nmethod* nm) {
+  dependencies().remove_dependent_nmethod(nm);
+}
+
+void InstanceKlass::clean_dependency_context() {
+  dependencies().clean_unloading_dependents();
 }
 
 #ifndef PRODUCT
@@ -2146,26 +2155,28 @@
 void InstanceKlass::clean_weak_instanceklass_links() {
   clean_implementors_list();
   clean_method_data();
-
-  // Since GC iterates InstanceKlasses sequentially, it is safe to remove stale entries here.
-  DependencyContext dep_context(&_dep_context);
-  dep_context.expunge_stale_entries();
 }
 
 void InstanceKlass::clean_implementors_list() {
   assert(is_loader_alive(), "this klass should be live");
   if (is_interface()) {
-    if (ClassUnloading) {
-      Klass* impl = implementor();
-      if (impl != NULL) {
-        if (!impl->is_loader_alive()) {
-          // remove this guy
-          Klass** klass = adr_implementor();
-          assert(klass != NULL, "null klass");
-          if (klass != NULL) {
-            *klass = NULL;
+    assert (ClassUnloading, "only called for ClassUnloading");
+    for (;;) {
+      // Use load_acquire due to competing with inserts
+      Klass* impl = OrderAccess::load_acquire(adr_implementor());
+      if (impl != NULL && !impl->is_loader_alive()) {
+        // NULL this field, might be an unloaded klass or NULL
+        Klass* volatile* klass = adr_implementor();
+        if (Atomic::cmpxchg((Klass*)NULL, klass, impl) == impl) {
+          // Successfully unlinking implementor.
+          if (log_is_enabled(Trace, class, unload)) {
+            ResourceMark rm;
+            log_trace(class, unload)("unlinking class (implementor): %s", impl->external_name());
           }
+          return;
         }
+      } else {
+        return;
       }
     }
   }
@@ -2334,7 +2345,7 @@
   // These are not allocated from metaspace, but they should should all be empty
   // during dump time, so we don't need to worry about them in InstanceKlass::iterate().
   guarantee(_source_debug_extension == NULL, "must be");
-  guarantee(_dep_context == DependencyContext::EMPTY, "must be");
+  guarantee(_dep_context == NULL, "must be");
   guarantee(_osr_nmethods_head == NULL, "must be");
 
 #if INCLUDE_JVMTI
@@ -2479,7 +2490,7 @@
     FreeHeap(jmeths);
   }
 
-  assert(_dep_context == DependencyContext::EMPTY,
+  assert(_dep_context == NULL,
          "dependencies should already be cleaned");
 
 #if INCLUDE_JVMTI
@@ -3106,7 +3117,6 @@
   st->cr();
 
   if (is_interface()) {
-    MutexLocker ml(Compile_lock);
     st->print_cr(BULLET"nof implementors:  %d", nof_implementors());
     if (nof_implementors() == 1) {
       st->print_cr(BULLET"implementor:    ");
@@ -3514,9 +3524,6 @@
     guarantee(sib->super() == super, "siblings should have same superklass");
   }
 
-  // Verify implementor fields requires the Compile_lock, but this is sometimes
-  // called inside a safepoint, so don't verify.
-
   // Verify local interfaces
   if (local_interfaces()) {
     Array<InstanceKlass*>* local_interfaces = this->local_interfaces();
--- a/src/hotspot/share/oops/instanceKlass.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/oops/instanceKlass.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -69,6 +69,7 @@
 class jniIdMapBase;
 class JNIid;
 class JvmtiCachedClassFieldMap;
+class nmethodBucket;
 class SuperTypeClosure;
 
 // This is used in iterators below.
@@ -249,7 +250,8 @@
   OopMapCache*    volatile _oop_map_cache;   // OopMapCache for all methods in the klass (allocated lazily)
   JNIid*          _jni_ids;              // First JNI identifier for static fields in this class
   jmethodID*      volatile _methods_jmethod_ids;  // jmethodIDs corresponding to method_idnum, or NULL if none
-  intptr_t        _dep_context;          // packed DependencyContext structure
+  nmethodBucket*  volatile _dep_context;          // packed DependencyContext structure
+  uint64_t        volatile _dep_context_last_cleaned;
   nmethod*        _osr_nmethods_head;    // Head of list of on-stack replacement nmethods for this class
 #if INCLUDE_JVMTI
   BreakpointInfo* _breakpoints;          // bpt lists, managed by Method*
@@ -976,7 +978,8 @@
   inline DependencyContext dependencies();
   int  mark_dependent_nmethods(KlassDepChange& changes);
   void add_dependent_nmethod(nmethod* nm);
-  void remove_dependent_nmethod(nmethod* nm, bool delete_immediately);
+  void remove_dependent_nmethod(nmethod* nm);
+  void clean_dependency_context();
 
   // On-stack replacement support
   nmethod* osr_nmethods_head() const         { return _osr_nmethods_head; };
@@ -1092,9 +1095,9 @@
                      nonstatic_oop_map_count());
   }
 
-  Klass** adr_implementor() const {
+  Klass* volatile* adr_implementor() const {
     if (is_interface()) {
-      return (Klass**)end_of_nonstatic_oop_maps();
+      return (Klass* volatile*)end_of_nonstatic_oop_maps();
     } else {
       return NULL;
     }
@@ -1102,7 +1105,7 @@
 
   InstanceKlass** adr_unsafe_anonymous_host() const {
     if (is_unsafe_anonymous()) {
-      InstanceKlass** adr_impl = (InstanceKlass **)adr_implementor();
+      InstanceKlass** adr_impl = (InstanceKlass**)adr_implementor();
       if (adr_impl != NULL) {
         return adr_impl + 1;
       } else {
@@ -1120,7 +1123,7 @@
         return (address)(adr_host + 1);
       }
 
-      Klass** adr_impl = adr_implementor();
+      Klass* volatile* adr_impl = adr_implementor();
       if (adr_impl != NULL) {
         return (address)(adr_impl + 1);
       }
--- a/src/hotspot/share/oops/klass.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/oops/klass.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -121,7 +121,7 @@
   Klass *r = this;
   while( r->is_abstract() ) {   // Receiver is abstract?
     Klass *s = r->subklass();   // Check for exactly 1 subklass
-    if( !s || s->next_sibling() ) // Oops; wrong count; give up
+    if (s == NULL || s->next_sibling() != NULL) // Oops; wrong count; give up
       return this;              // Return 'this' as a no-progress flag
     r = s;                    // Loop till find concrete class
   }
@@ -362,22 +362,71 @@
 }
 
 
+// superklass links
 InstanceKlass* Klass::superklass() const {
   assert(super() == NULL || super()->is_instance_klass(), "must be instance klass");
   return _super == NULL ? NULL : InstanceKlass::cast(_super);
 }
 
+// subklass links.  Used by the compiler (and vtable initialization)
+// May be cleaned concurrently, so must use the Compile_lock.
+// The log parameter is for clean_weak_klass_links to report unlinked classes.
+Klass* Klass::subklass(bool log) const {
+  // Need load_acquire on the _subklass, because it races with inserts that
+  // publishes freshly initialized data.
+  for (Klass* chain = OrderAccess::load_acquire(&_subklass);
+       chain != NULL;
+       // Do not need load_acquire on _next_sibling, because inserts never
+       // create _next_sibling edges to dead data.
+       chain = Atomic::load(&chain->_next_sibling))
+  {
+    if (chain->is_loader_alive()) {
+      return chain;
+    } else if (log) {
+      if (log_is_enabled(Trace, class, unload)) {
+        ResourceMark rm;
+        log_trace(class, unload)("unlinking class (subclass): %s", chain->external_name());
+      }
+    }
+  }
+  return NULL;
+}
+
+Klass* Klass::next_sibling(bool log) const {
+  // Do not need load_acquire on _next_sibling, because inserts never
+  // create _next_sibling edges to dead data.
+  for (Klass* chain = Atomic::load(&_next_sibling);
+       chain != NULL;
+       chain = Atomic::load(&chain->_next_sibling)) {
+    // Only return alive klass, there may be stale klass
+    // in this chain if cleaned concurrently.
+    if (chain->is_loader_alive()) {
+      return chain;
+    } else if (log) {
+      if (log_is_enabled(Trace, class, unload)) {
+        ResourceMark rm;
+        log_trace(class, unload)("unlinking class (sibling): %s", chain->external_name());
+      }
+    }
+  }
+  return NULL;
+}
+
 void Klass::set_subklass(Klass* s) {
   assert(s != this, "sanity check");
-  _subklass = s;
+  OrderAccess::release_store(&_subklass, s);
 }
 
 void Klass::set_next_sibling(Klass* s) {
   assert(s != this, "sanity check");
-  _next_sibling = s;
+  // Does not need release semantics. If used by cleanup, it will link to
+  // already safely published data, and if used by inserts, will be published
+  // safely using cmpxchg.
+  Atomic::store(s, &_next_sibling);
 }
 
 void Klass::append_to_sibling_list() {
+  assert_locked_or_safepoint(Compile_lock);
   debug_only(verify();)
   // add ourselves to superklass' subklass list
   InstanceKlass* super = superklass();
@@ -385,16 +434,39 @@
   assert((!super->is_interface()    // interfaces cannot be supers
           && (super->superklass() == NULL || !is_interface())),
          "an interface can only be a subklass of Object");
-  Klass* prev_first_subklass = super->subklass();
-  if (prev_first_subklass != NULL) {
-    // set our sibling to be the superklass' previous first subklass
-    set_next_sibling(prev_first_subklass);
+
+  // Make sure there is no stale subklass head
+  super->clean_subklass();
+
+  for (;;) {
+    Klass* prev_first_subklass = OrderAccess::load_acquire(&_super->_subklass);
+    if (prev_first_subklass != NULL) {
+      // set our sibling to be the superklass' previous first subklass
+      assert(prev_first_subklass->is_loader_alive(), "May not attach not alive klasses");
+      set_next_sibling(prev_first_subklass);
+    }
+    // Note that the prev_first_subklass is always alive, meaning no sibling_next links
+    // are ever created to not alive klasses. This is an important invariant of the lock-free
+    // cleaning protocol, that allows us to safely unlink dead klasses from the sibling list.
+    if (Atomic::cmpxchg(this, &super->_subklass, prev_first_subklass) == prev_first_subklass) {
+      return;
+    }
   }
-  // make ourselves the superklass' first subklass
-  super->set_subklass(this);
   debug_only(verify();)
 }
 
+void Klass::clean_subklass() {
+  for (;;) {
+    // Need load_acquire, due to contending with concurrent inserts
+    Klass* subklass = OrderAccess::load_acquire(&_subklass);
+    if (subklass == NULL || subklass->is_loader_alive()) {
+      return;
+    }
+    // Try to fix _subklass until it points at something not dead.
+    Atomic::cmpxchg(subklass->next_sibling(), &_subklass, subklass);
+  }
+}
+
 oop Klass::holder_phantom() const {
   return class_loader_data()->holder_phantom();
 }
@@ -414,30 +486,14 @@
     assert(current->is_loader_alive(), "just checking, this should be live");
 
     // Find and set the first alive subklass
-    Klass* sub = current->subklass();
-    while (sub != NULL && !sub->is_loader_alive()) {
-#ifndef PRODUCT
-      if (log_is_enabled(Trace, class, unload)) {
-        ResourceMark rm;
-        log_trace(class, unload)("unlinking class (subclass): %s", sub->external_name());
-      }
-#endif
-      sub = sub->next_sibling();
-    }
-    current->set_subklass(sub);
+    Klass* sub = current->subklass(true);
+    current->clean_subklass();
     if (sub != NULL) {
       stack.push(sub);
     }
 
     // Find and set the first alive sibling
-    Klass* sibling = current->next_sibling();
-    while (sibling != NULL && !sibling->is_loader_alive()) {
-      if (log_is_enabled(Trace, class, unload)) {
-        ResourceMark rm;
-        log_trace(class, unload)("[Unlinking class (sibling) %s]", sibling->external_name());
-      }
-      sibling = sibling->next_sibling();
-    }
+    Klass* sibling = current->next_sibling(true);
     current->set_next_sibling(sibling);
     if (sibling != NULL) {
       stack.push(sibling);
@@ -470,8 +526,8 @@
     it->push(&_primary_supers[i]);
   }
   it->push(&_super);
-  it->push(&_subklass);
-  it->push(&_next_sibling);
+  it->push((Klass**)&_subklass);
+  it->push((Klass**)&_next_sibling);
   it->push(&_next_link);
 
   vtableEntry* vt = start_of_vtable();
--- a/src/hotspot/share/oops/klass.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/oops/klass.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -140,9 +140,9 @@
   // Superclass
   Klass*      _super;
   // First subclass (NULL if none); _subklass->next_sibling() is next one
-  Klass*      _subklass;
+  Klass* volatile _subklass;
   // Sibling link (or NULL); links all subklasses of a klass
-  Klass*      _next_sibling;
+  Klass* volatile _next_sibling;
 
   // All klasses loaded by a class loader are chained through these links
   Klass*      _next_link;
@@ -284,8 +284,9 @@
   // Use InstanceKlass::contains_field_offset to classify field offsets.
 
   // sub/superklass links
-  Klass* subklass() const              { return _subklass; }
-  Klass* next_sibling() const          { return _next_sibling; }
+  Klass* subklass(bool log = false) const;
+  Klass* next_sibling(bool log = false) const;
+
   InstanceKlass* superklass() const;
   void append_to_sibling_list();           // add newly created receiver to superklass' subklass list
 
@@ -659,6 +660,8 @@
   // be used safely.
   oop holder_phantom() const;
 
+  void clean_subklass();
+
   static void clean_weak_klass_links(bool unloading_occurred, bool clean_alive_klasses = true);
   static void clean_subklass_tree() {
     clean_weak_klass_links(/*unloading_occurred*/ true , /* clean_alive_klasses */ false);
--- a/src/hotspot/share/opto/vectornode.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/opto/vectornode.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -553,6 +553,7 @@
   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt, ControlDependency control_dependency = LoadNode::DependsOnlyOnTest)
     : LoadNode(c, mem, adr, at, vt, MemNode::unordered, control_dependency) {
     init_class_id(Class_LoadVector);
+    set_mismatched_access();
   }
 
   const TypeVect* vect_type() const { return type()->is_vect(); }
@@ -581,6 +582,7 @@
     : StoreNode(c, mem, adr, at, val, MemNode::unordered) {
     assert(val->is_Vector() || val->is_LoadVector(), "sanity");
     init_class_id(Class_StoreVector);
+    set_mismatched_access();
   }
 
   const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
--- a/src/hotspot/share/prims/methodHandles.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/prims/methodHandles.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -1064,14 +1064,6 @@
   return rfill + overflow;
 }
 
-// Is it safe to remove stale entries from a dependency list?
-static bool safe_to_expunge() {
-  // Since parallel GC threads can concurrently iterate over a dependency
-  // list during safepoint, it is safe to remove entries only when
-  // CodeCache lock is held.
-  return CodeCache_lock->owned_by_self();
-}
-
 void MethodHandles::add_dependent_nmethod(oop call_site, nmethod* nm) {
   assert_locked_or_safepoint(CodeCache_lock);
 
@@ -1082,7 +1074,7 @@
   // in order to avoid memory leak, stale entries are purged whenever a dependency list
   // is changed (both on addition and removal). Though memory reclamation is delayed,
   // it avoids indefinite memory usage growth.
-  deps.add_dependent_nmethod(nm, /*expunge_stale_entries=*/safe_to_expunge());
+  deps.add_dependent_nmethod(nm);
 }
 
 void MethodHandles::remove_dependent_nmethod(oop call_site, nmethod* nm) {
@@ -1090,7 +1082,15 @@
 
   oop context = java_lang_invoke_CallSite::context_no_keepalive(call_site);
   DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
-  deps.remove_dependent_nmethod(nm, /*expunge_stale_entries=*/safe_to_expunge());
+  deps.remove_dependent_nmethod(nm);
+}
+
+void MethodHandles::clean_dependency_context(oop call_site) {
+  assert_locked_or_safepoint(CodeCache_lock);
+
+  oop context = java_lang_invoke_CallSite::context_no_keepalive(call_site);
+  DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context);
+  deps.clean_unloading_dependents();
 }
 
 void MethodHandles::flush_dependent_nmethods(Handle call_site, Handle target) {
@@ -1500,7 +1500,6 @@
     {
       NoSafepointVerifier nsv;
       MutexLockerEx mu2(CodeCache_lock, Mutex::_no_safepoint_check_flag);
-      assert(safe_to_expunge(), "removal is not safe");
       DependencyContext deps = java_lang_invoke_MethodHandleNatives_CallSiteContext::vmdependencies(context());
       marked = deps.remove_all_dependents();
     }
--- a/src/hotspot/share/prims/methodHandles.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/prims/methodHandles.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -79,6 +79,7 @@
   // CallSite support
   static void add_dependent_nmethod(oop call_site, nmethod* nm);
   static void remove_dependent_nmethod(oop call_site, nmethod* nm);
+  static void clean_dependency_context(oop call_site);
 
   static void flush_dependent_nmethods(Handle call_site, Handle target);
 
--- a/src/hotspot/share/runtime/globals.hpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/runtime/globals.hpp	Tue Dec 04 13:35:04 2018 +0530
@@ -2585,7 +2585,7 @@
   develop(bool, VerifyMetaspace, false,                                     \
           "Verify metaspace on chunk movements.")                           \
                                                                             \
-  diagnostic(bool, ShowRegistersOnAssert, false,                            \
+  diagnostic(bool, ShowRegistersOnAssert, true,                             \
           "On internal errors, include registers in error report.")         \
                                                                             \
   experimental(bool, UseSwitchProfiling, true,                              \
--- a/src/hotspot/share/runtime/vmStructs.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -259,12 +259,12 @@
   nonstatic_field(Klass,                       _java_mirror,                                  OopHandle)                             \
   nonstatic_field(Klass,                       _modifier_flags,                               jint)                                  \
   nonstatic_field(Klass,                       _super,                                        Klass*)                                \
-  nonstatic_field(Klass,                       _subklass,                                     Klass*)                                \
+  volatile_nonstatic_field(Klass,              _subklass,                                     Klass*)                                 \
   nonstatic_field(Klass,                       _layout_helper,                                jint)                                  \
   nonstatic_field(Klass,                       _name,                                         Symbol*)                               \
   nonstatic_field(Klass,                       _access_flags,                                 AccessFlags)                           \
   nonstatic_field(Klass,                       _prototype_header,                             markOop)                               \
-  nonstatic_field(Klass,                       _next_sibling,                                 Klass*)                                \
+  volatile_nonstatic_field(Klass,              _next_sibling,                                 Klass*)                                \
   nonstatic_field(Klass,                       _next_link,                                    Klass*)                                \
   nonstatic_field(Klass,                       _vtable_len,                                   int)                                   \
   nonstatic_field(Klass,                       _class_loader_data,                            ClassLoaderData*)                      \
--- a/src/java.base/macosx/native/libjli/java_md_macosx.m	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/macosx/native/libjli/java_md_macosx.m	Tue Dec 04 13:35:04 2018 +0530
@@ -508,7 +508,7 @@
         return JNI_FALSE;
     }
 
-    const char lastPathComponent[] = "/lib/jli/libjli.dylib";
+    const char lastPathComponent[] = "/lib/libjli.dylib";
     size_t sizeOfLastPathComponent = sizeof(lastPathComponent) - 1;
     if (pathLen < sizeOfLastPathComponent) {
         return JNI_FALSE;
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandleNatives.java	Tue Dec 04 13:35:04 2018 +0530
@@ -75,6 +75,7 @@
     /** Represents a context to track nmethod dependencies on CallSite instance target. */
     static class CallSiteContext implements Runnable {
         //@Injected JVM_nmethodBucket* vmdependencies;
+        //@Injected jlong last_cleanup;
 
         static CallSiteContext make(CallSite cs) {
             final CallSiteContext newContext = new CallSiteContext();
--- a/src/java.base/share/classes/java/util/Date.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/util/Date.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,12 +84,12 @@
  * <i>not</i> adjusted for leap seconds. An interesting source of
  * further information is the United States Naval Observatory (USNO):
  * <blockquote><pre>
- *     <a href="http://www.usno.navy.mil/USNO">http://www.usno.navy.mil/USNO</a>
+ *     <a href="https://www.usno.navy.mil/USNO">https://www.usno.navy.mil/USNO</a>
  * </pre></blockquote>
  * <p>
  * and the material regarding "Systems of Time" at:
  * <blockquote><pre>
- *     <a href="http://www.usno.navy.mil/USNO/time/master-clock/systems-of-time">http://www.usno.navy.mil/USNO/time/master-clock/systems-of-time</a>
+ *     <a href="https://www.usno.navy.mil/USNO/time/master-clock/systems-of-time">https://www.usno.navy.mil/USNO/time/master-clock/systems-of-time</a>
  * </pre></blockquote>
  * <p>
  * which has descriptions of various different time systems including
--- a/src/java.base/share/classes/java/util/ResourceBundle.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/util/ResourceBundle.java	Tue Dec 04 13:35:04 2018 +0530
@@ -3184,10 +3184,16 @@
                                 bundleClass.getName() + " in " + m.toString());
                         }
                         try {
-                            // bundle in a unnamed module
-                            Constructor<ResourceBundle> ctor = bundleClass.getConstructor();
+                            Constructor<ResourceBundle> ctor = AccessController.doPrivileged(
+                                new PrivilegedExceptionAction<>() {
+                                    @Override
+                                    public Constructor<ResourceBundle> run() throws NoSuchMethodException {
+                                        return bundleClass.getDeclaredConstructor();
+                                    }
+                                });
                             if (!Modifier.isPublic(ctor.getModifiers())) {
-                                return null;
+                                throw new IllegalAccessException("no-arg constructor in " +
+                                    bundleClass.getName() + " is not publicly accessible.");
                             }
 
                             // java.base may not be able to read the bundleClass's module.
@@ -3196,12 +3202,16 @@
                             bundle = ctor.newInstance((Object[]) null);
                         } catch (InvocationTargetException e) {
                             uncheckedThrow(e);
+                        } catch (PrivilegedActionException e) {
+                            assert e.getException() instanceof NoSuchMethodException;
+                            throw new InstantiationException("public no-arg constructor " +
+                                "does not exist in " + bundleClass.getName());
                         }
                     } else {
                         throw new ClassCastException(c.getName()
                                 + " cannot be cast to ResourceBundle");
                     }
-                } catch (ClassNotFoundException|NoSuchMethodException e) {
+                } catch (ClassNotFoundException e) {
                 }
             } else if (format.equals("java.properties")) {
                 final String resourceName = toResourceName0(bundleName, "properties");
--- a/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/util/doc-files/coll-reference.html	Tue Dec 04 13:35:04 2018 +0530
@@ -431,7 +431,7 @@
 fill(List, Object)</a></strong> - Overwrites every element in a
 list with the specified value.</li>
 <li><strong><a href=
-"../Collections.html#copy-java.util.List(java.util.List)">
+"../Collections.html#copy(java.util.List,java.util.List)">
 copy(List dest, List src)</a></strong> - Copies the source list
 into the destination list.</li>
 <li><strong><a href=
--- a/src/java.base/share/classes/java/util/spi/TimeZoneNameProvider.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/util/spi/TimeZoneNameProvider.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@
      * presentation to the user in the specified locale. The given time
      * zone ID is "GMT" or one of the names defined using "Zone" entries
      * in the "tz database", a public domain time zone database at
-     * <a href="ftp://elsie.nci.nih.gov/pub/">ftp://elsie.nci.nih.gov/pub/</a>.
+     * <a href="https://www.iana.org/time-zones">https://www.iana.org/time-zones</a>.
      * The data of this database is contained in a file whose name starts with
      * "tzdata", and the specification of the data format is part of the zic.8
      * man page, which is contained in a file whose name starts with "tzcode".
--- a/src/java.base/share/classes/java/util/zip/Deflater.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/java/util/zip/Deflater.java	Tue Dec 04 13:35:04 2018 +0530
@@ -224,7 +224,6 @@
      * One of the {@code setInput()} methods should be called whenever
      * {@code needsInput()} returns true indicating that more input data
      * is required.
-     * <p>
      * @param input the input data bytes
      * @param off the start offset of the data
      * @param len the length of the data
@@ -248,7 +247,6 @@
      * One of the {@code setInput()} methods should be called whenever
      * {@code needsInput()} returns true indicating that more input data
      * is required.
-     * <p>
      * @param input the input data bytes
      * @see Deflater#needsInput
      */
--- a/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/javax/net/ssl/SSLContext.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,18 +38,16 @@
  * secure random bytes.
  *
  * <p> Every implementation of the Java platform is required to support the
- * following standard {@code SSLContext} protocols:
+ * following standard {@code SSLContext} protocol:
  * <ul>
- * <li>{@code TLSv1}</li>
- * <li>{@code TLSv1.1}</li>
  * <li>{@code TLSv1.2}</li>
  * </ul>
- * These protocols are described in the <a href=
+ * This protocol is described in the <a href=
  * "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
  * SSLContext section</a> of the
  * Java Security Standard Algorithm Names Specification.
  * Consult the release documentation for your implementation to see if any
- * other algorithms are supported.
+ * other protocols are supported.
  *
  * @since 1.4
  */
--- a/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -87,10 +87,17 @@
      * A check for sessions exceeding the timeout is made immediately whenever
      * the timeout limit is changed for this <code>SSLSessionContext</code>.
      *
+     * @apiNote Note that the JDK Implementation uses default values for both
+     *          the session cache size and timeout.  See
+     *          {@code getSessionCacheSize} and {@code getSessionTimeout} for
+     *          more information.  Applications should consider their
+     *          performance requirements and override the defaults if necessary.
+     *
      * @param seconds the new session timeout limit in seconds; zero means
-     *          there is no limit.
+     *        there is no limit.
      *
-     * @exception IllegalArgumentException if the timeout specified is {@code < 0}.
+     * @throws IllegalArgumentException if the timeout specified is {@code < 0}.
+     *
      * @see #getSessionTimeout
      */
     public void setSessionTimeout(int seconds)
@@ -109,33 +116,50 @@
      * whenever the timeout limit is changed for this
      * <code>SSLSessionContext</code>.
      *
+     * @implNote The JDK implementation returns the session timeout as set by
+     *           the {@code setSessionTimeout} method, or if not set, a default
+     *           value of 86400 seconds (24 hours).
+     *
      * @return the session timeout limit in seconds; zero means there is no
-     * limit.
+     *         limit.
+     *
      * @see #setSessionTimeout
      */
     public int getSessionTimeout();
 
     /**
-     * Sets the size of the cache used for storing
-     * <code>SSLSession</code> objects grouped under this
-     * <code>SSLSessionContext</code>.
+     * Sets the size of the cache used for storing <code>SSLSession</code>
+     * objects grouped under this <code>SSLSessionContext</code>.
+     *
+     * @apiNote Note that the JDK Implementation uses default values for both
+     *          the session cache size and timeout.  See
+     *          {@code getSessionCacheSize} and {@code getSessionTimeout} for
+     *          more information.  Applications should consider their
+     *          performance requirements and override the defaults if necessary.
      *
      * @param size the new session cache size limit; zero means there is no
-     * limit.
-     * @exception IllegalArgumentException if the specified size is {@code < 0}.
+     *        limit.
+     *
+     * @throws IllegalArgumentException if the specified size is {@code < 0}.
+     *
      * @see #getSessionCacheSize
      */
     public void setSessionCacheSize(int size)
                  throws IllegalArgumentException;
 
     /**
-     * Returns the size of the cache used for storing
-     * <code>SSLSession</code> objects grouped under this
-     * <code>SSLSessionContext</code>.
+     * Returns the size of the cache used for storing <code>SSLSession</code>
+     * objects grouped under this <code>SSLSessionContext</code>.
+     *
+     * @implNote The JDK implementation returns the cache size as set by
+     *           the {@code setSessionCacheSize} method, or if not set, the
+     *           value of the {@systemProperty javax.net.ssl.sessionCacheSize}
+     *           system property.  If neither is set, it returns a default
+     *           value of 20480.
      *
      * @return size of the session cache; zero means there is no size limit.
+     *
      * @see #setSessionCacheSize
      */
     public int getSessionCacheSize();
-
 }
--- a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Tue Dec 04 13:35:04 2018 +0530
@@ -32,11 +32,13 @@
 import javax.net.ssl.SSLSession;
 import javax.net.ssl.SSLSessionContext;
 
-import sun.security.action.GetPropertyAction;
+import sun.security.action.GetIntegerAction;
 import sun.security.util.Cache;
 
 
 final class SSLSessionContextImpl implements SSLSessionContext {
+    private final static int DEFAULT_MAX_CACHE_SIZE = 20480;
+
     private final Cache<SessionId, SSLSessionImpl> sessionCache;
                                         // session cache, session id as key
     private final Cache<String, SSLSessionImpl> sessionHostPortCache;
@@ -196,16 +198,29 @@
     }
 
     private static int getDefaultCacheLimit() {
-        int defaultCacheLimit = 0;
         try {
-            String s = GetPropertyAction
-                    .privilegedGetProperty("javax.net.ssl.sessionCacheSize");
-            defaultCacheLimit = (s != null) ? Integer.parseInt(s) : 0;
+            int defaultCacheLimit = GetIntegerAction.privilegedGetProperty(
+                    "javax.net.ssl.sessionCacheSize", DEFAULT_MAX_CACHE_SIZE);
+
+            if (defaultCacheLimit >= 0) {
+                return defaultCacheLimit;
+            } else if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
+                SSLLogger.warning(
+                    "invalid System Property javax.net.ssl.sessionCacheSize, " +
+                    "use the default session cache size (" +
+                    DEFAULT_MAX_CACHE_SIZE + ") instead");
+            }
         } catch (Exception e) {
-            // swallow the exception
+            // unlikely, log it for safe
+            if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
+                SSLLogger.warning(
+                    "the System Property javax.net.ssl.sessionCacheSize is " +
+                    "not available, use the default value (" +
+                    DEFAULT_MAX_CACHE_SIZE + ") instead");
+            }
         }
 
-        return (defaultCacheLimit > 0) ? defaultCacheLimit : 0;
+        return DEFAULT_MAX_CACHE_SIZE;
     }
 
     private boolean isTimedout(SSLSession sess) {
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Tue Dec 04 13:35:04 2018 +0530
@@ -51,6 +51,8 @@
 import java.security.cert.URICertStoreParameters;
 
 
+import java.security.interfaces.ECKey;
+import java.security.spec.ECParameterSpec;
 import java.text.Collator;
 import java.text.MessageFormat;
 import java.util.*;
@@ -70,6 +72,7 @@
 
 import sun.security.util.ECKeySizeParameterSpec;
 import sun.security.util.KeyUtil;
+import sun.security.util.NamedCurve;
 import sun.security.util.ObjectIdentifier;
 import sun.security.pkcs10.PKCS10;
 import sun.security.pkcs10.PKCS10Attribute;
@@ -1882,11 +1885,12 @@
 
         MessageFormat form = new MessageFormat(rb.getString
             ("Generating.keysize.bit.keyAlgName.key.pair.and.self.signed.certificate.sigAlgName.with.a.validity.of.validality.days.for"));
-        Object[] source = {keysize,
-                            privKey.getAlgorithm(),
-                            chain[0].getSigAlgName(),
-                            validity,
-                            x500Name};
+        Object[] source = {
+                groupName == null ? keysize : KeyUtil.getKeySize(privKey),
+                fullDisplayAlgName(privKey),
+                chain[0].getSigAlgName(),
+                validity,
+                x500Name};
         System.err.println(form.format(source));
 
         if (keyPass == null) {
@@ -3266,19 +3270,28 @@
         }
     }
 
-    private String withWeak(PublicKey key) {
+    private String fullDisplayAlgName(Key key) {
+        String result = key.getAlgorithm();
+        if (key instanceof ECKey) {
+            ECParameterSpec paramSpec = ((ECKey) key).getParams();
+            if (paramSpec instanceof NamedCurve) {
+                result += " (" + paramSpec.toString().split(" ")[0] + ")";
+            }
+        }
+        return result;
+    }
+
+    private String withWeak(Key key) {
+        int kLen = KeyUtil.getKeySize(key);
+        String displayAlg = fullDisplayAlgName(key);
         if (DISABLED_CHECK.permits(SIG_PRIMITIVE_SET, key)) {
-            int kLen = KeyUtil.getKeySize(key);
             if (kLen >= 0) {
-                return String.format(rb.getString("key.bit"),
-                        kLen, key.getAlgorithm());
+                return String.format(rb.getString("key.bit"), kLen, displayAlg);
             } else {
-                return String.format(
-                        rb.getString("unknown.size.1"), key.getAlgorithm());
+                return String.format(rb.getString("unknown.size.1"), displayAlg);
             }
         } else {
-            return String.format(rb.getString("key.bit.weak"),
-                    KeyUtil.getKeySize(key), key.getAlgorithm());
+            return String.format(rb.getString("key.bit.weak"), kLen, displayAlg);
         }
     }
 
--- a/src/java.base/unix/native/libnet/net_util_md.c	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Tue Dec 04 13:35:04 2018 +0530
@@ -305,12 +305,12 @@
     }
 
     /*
-     * If fd 0 is a socket it means we've been launched from inetd or
+     * If fd 0 is a socket it means we may have been launched from inetd or
      * xinetd. If it's a socket then check the family - if it's an
      * IPv4 socket then we need to disable IPv6.
      */
     if (getsockname(0, &sa.sa, &sa_len) == 0) {
-        if (sa.sa.sa_family != AF_INET6) {
+        if (sa.sa.sa_family == AF_INET) {
             close(fd);
             return JNI_FALSE;
         }
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -89,7 +89,7 @@
  * @author K.Venugopal SUN Microsystems
  * @author Neeraj Bajaj SUN Microsystems
  * @author Sunitha Reddy SUN Microsystems
- * @LastModified: Oct 2017
+ * @LastModified: Nov 2018
  */
 public class XMLEntityManager implements XMLComponent, XMLEntityResolver {
 
@@ -855,7 +855,7 @@
 
         // We've seen a new Reader.
         // Push it on the stack so we can close it later.
-        //fOwnReaders.add(reader);
+        fReaderStack.push(reader);
 
         // push entity on stack
         if (fCurrentEntity != null) {
@@ -1444,16 +1444,21 @@
             (fEntityStack.empty() ? null : fEntityStack.get(0));
     }
 
+    // A stack containing all the open readers
+    protected Stack<Reader> fReaderStack = new Stack<>();
 
     /**
      * Close all opened InputStreams and Readers opened by this parser.
      */
     public void closeReaders() {
-        /** this call actually does nothing, readers are closed in the endEntity method
-         * through the current entity.
-         * The change seems to have happened during the jdk6 development with the
-         * addition of StAX
-        **/
+        // close all readers
+        while (!fReaderStack.isEmpty()) {
+            try {
+                (fReaderStack.pop()).close();
+            } catch (IOException e) {
+                // ignore
+            }
+        }
     }
 
     public void endEntity() throws IOException, XNIException {
@@ -1487,6 +1492,13 @@
             }
         }
 
+        // REVISIT: We should never encounter underflow if the calls
+        // to startEntity and endEntity are balanced, but guard
+        // against the EmptyStackException for now. -- mrglavas
+        if (!fReaderStack.isEmpty()) {
+            fReaderStack.pop();
+        }
+
         if (fEntityHandler != null) {
             //so this is the last opened entity, signal it to current fEntityHandler using Augmentation
             if(entity == null){
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Tue Dec 04 13:35:04 2018 +0530
@@ -169,9 +169,12 @@
 
     /**
      * Determine whether an annotation is a declaration annotation,
-     * a type annotation, or both.
+     * a type annotation, or both (or none, i.e a non-annotation masquerading as one).
      */
     public AnnotationType annotationTargetType(Attribute.Compound a, Symbol s) {
+        if (!a.type.tsym.isAnnotationType()) {
+            return AnnotationType.NONE;
+        }
         List<Attribute> targets = annotationTargets(a.type.tsym);
         return (targets == null) ?
                 AnnotationType.DECLARATION :
@@ -319,6 +322,8 @@
                         onlyTypeAnnos.append(ta);
                         break;
                     }
+                    case NONE: // Error signaled already, just drop the non-annotation.
+                        break;
                 }
             }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue Dec 04 13:35:04 2018 +0530
@@ -344,17 +344,19 @@
 
             Assert.checkNonNull(c, "Failed to create annotation");
 
-            if (annotated.containsKey(a.type.tsym)) {
-                if (!allowRepeatedAnnos) {
-                    log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), Feature.REPEATED_ANNOTATIONS.error(sourceName));
+            if (a.type.tsym.isAnnotationType()) {
+                if (annotated.containsKey(a.type.tsym)) {
+                    if (!allowRepeatedAnnos) {
+                        log.error(DiagnosticFlag.SOURCE_LEVEL, a.pos(), Feature.REPEATED_ANNOTATIONS.error(sourceName));
+                    }
+                    ListBuffer<T> l = annotated.get(a.type.tsym);
+                    l = l.append(c);
+                    annotated.put(a.type.tsym, l);
+                    pos.put(c, a.pos());
+                } else {
+                    annotated.put(a.type.tsym, ListBuffer.of(c));
+                    pos.put(c, a.pos());
                 }
-                ListBuffer<T> l = annotated.get(a.type.tsym);
-                l = l.append(c);
-                annotated.put(a.type.tsym, l);
-                pos.put(c, a.pos());
-            } else {
-                annotated.put(a.type.tsym, ListBuffer.of(c));
-                pos.put(c, a.pos());
             }
 
             // Note: @Deprecated has no effect on local variables and parameters
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java	Tue Dec 04 13:35:04 2018 +0530
@@ -2749,7 +2749,7 @@
         class AnnotationValidator extends TreeScanner {
             @Override
             public void visitAnnotation(JCAnnotation tree) {
-                if (!tree.type.isErroneous()) {
+                if (!tree.type.isErroneous() && tree.type.tsym.isAnnotationType()) {
                     super.visitAnnotation(tree);
                     validateAnnotation(tree);
                 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Tue Dec 04 13:35:04 2018 +0530
@@ -300,7 +300,7 @@
      * Base visitor class for all visitors implementing dataflow analysis logic.
      * This class define the shared logic for handling jumps (break/continue statements).
      */
-    static abstract class BaseAnalyzer<P extends BaseAnalyzer.PendingExit> extends TreeScanner {
+    static abstract class BaseAnalyzer extends TreeScanner {
 
         enum JumpKind {
             BREAK(JCTree.Tag.BREAK) {
@@ -328,7 +328,7 @@
         /** The currently pending exits that go from current inner blocks
          *  to an enclosing block, in source order.
          */
-        ListBuffer<P> pendingExits;
+        ListBuffer<PendingExit> pendingExits;
 
         /** A pending exit.  These are the statements return, break, and
          *  continue.  In addition, exception-throwing expressions or
@@ -351,20 +351,20 @@
         abstract void markDead();
 
         /** Record an outward transfer of control. */
-        void recordExit(P pe) {
+        void recordExit(PendingExit pe) {
             pendingExits.append(pe);
             markDead();
         }
 
         /** Resolve all jumps of this statement. */
         private Liveness resolveJump(JCTree tree,
-                         ListBuffer<P> oldPendingExits,
+                         ListBuffer<PendingExit> oldPendingExits,
                          JumpKind jk) {
             boolean resolved = false;
-            List<P> exits = pendingExits.toList();
+            List<PendingExit> exits = pendingExits.toList();
             pendingExits = oldPendingExits;
             for (; exits.nonEmpty(); exits = exits.tail) {
-                P exit = exits.head;
+                PendingExit exit = exits.head;
                 if (exit.tree.hasTag(jk.treeTag) &&
                         jk.getTarget(exit.tree) == tree) {
                     exit.resolveJump();
@@ -378,11 +378,11 @@
 
         /** Resolve all continues of this statement. */
         Liveness resolveContinues(JCTree tree) {
-            return resolveJump(tree, new ListBuffer<P>(), JumpKind.CONTINUE);
+            return resolveJump(tree, new ListBuffer<PendingExit>(), JumpKind.CONTINUE);
         }
 
         /** Resolve all breaks of this statement. */
-        Liveness resolveBreaks(JCTree tree, ListBuffer<P> oldPendingExits) {
+        Liveness resolveBreaks(JCTree tree, ListBuffer<PendingExit> oldPendingExits) {
             return resolveJump(tree, oldPendingExits, JumpKind.BREAK);
         }
 
@@ -412,7 +412,7 @@
      * The output of this analysis pass are used by other analyzers. This analyzer
      * sets the 'finallyCanCompleteNormally' field in the JCTry class.
      */
-    class AliveAnalyzer extends BaseAnalyzer<BaseAnalyzer.PendingExit> {
+    class AliveAnalyzer extends BaseAnalyzer {
 
         /** A flag that indicates whether the last statement could
          *  complete normally.
@@ -831,7 +831,7 @@
      * thrown is declared or caught. The analyzer uses some info that has been set by
      * the liveliness analyzer.
      */
-    class FlowAnalyzer extends BaseAnalyzer<FlowAnalyzer.FlowPendingExit> {
+    class FlowAnalyzer extends BaseAnalyzer {
 
         /** A flag that indicates whether the last statement could
          *  complete normally.
@@ -851,11 +851,11 @@
          */
         List<Type> caught;
 
-        class FlowPendingExit extends BaseAnalyzer.PendingExit {
+        class ThrownPendingExit extends BaseAnalyzer.PendingExit {
 
             Type thrown;
 
-            FlowPendingExit(JCTree tree, Type thrown) {
+            ThrownPendingExit(JCTree tree, Type thrown) {
                 super(tree);
                 this.thrown = thrown;
             }
@@ -871,21 +871,23 @@
         /** Complain that pending exceptions are not caught.
          */
         void errorUncaught() {
-            for (FlowPendingExit exit = pendingExits.next();
+            for (PendingExit exit = pendingExits.next();
                  exit != null;
                  exit = pendingExits.next()) {
+                Assert.check(exit instanceof ThrownPendingExit);
+                ThrownPendingExit thrownExit = (ThrownPendingExit) exit;
                 if (classDef != null &&
                     classDef.pos == exit.tree.pos) {
                     log.error(exit.tree.pos(),
-                              Errors.UnreportedExceptionDefaultConstructor(exit.thrown));
+                              Errors.UnreportedExceptionDefaultConstructor(thrownExit.thrown));
                 } else if (exit.tree.hasTag(VARDEF) &&
                         ((JCVariableDecl)exit.tree).sym.isResourceVariable()) {
                     log.error(exit.tree.pos(),
-                              Errors.UnreportedExceptionImplicitClose(exit.thrown,
+                              Errors.UnreportedExceptionImplicitClose(thrownExit.thrown,
                                                                       ((JCVariableDecl)exit.tree).sym.name));
                 } else {
                     log.error(exit.tree.pos(),
-                              Errors.UnreportedExceptionNeedToCatchOrThrow(exit.thrown));
+                              Errors.UnreportedExceptionNeedToCatchOrThrow(thrownExit.thrown));
                 }
             }
         }
@@ -896,7 +898,7 @@
         void markThrown(JCTree tree, Type exc) {
             if (!chk.isUnchecked(tree.pos(), exc)) {
                 if (!chk.isHandled(exc, caught)) {
-                    pendingExits.append(new FlowPendingExit(tree, exc));
+                    pendingExits.append(new ThrownPendingExit(tree, exc));
                 }
                 thrown = chk.incl(exc, thrown);
             }
@@ -914,7 +916,7 @@
             JCClassDecl classDefPrev = classDef;
             List<Type> thrownPrev = thrown;
             List<Type> caughtPrev = caught;
-            ListBuffer<FlowPendingExit> pendingExitsPrev = pendingExits;
+            ListBuffer<PendingExit> pendingExitsPrev = pendingExits;
             Lint lintPrev = lint;
             boolean anonymousClass = tree.name == names.empty;
             pendingExits = new ListBuffer<>();
@@ -1024,12 +1026,12 @@
 
                 scan(tree.body);
 
-                List<FlowPendingExit> exits = pendingExits.toList();
+                List<PendingExit> exits = pendingExits.toList();
                 pendingExits = new ListBuffer<>();
                 while (exits.nonEmpty()) {
-                    FlowPendingExit exit = exits.head;
+                    PendingExit exit = exits.head;
                     exits = exits.tail;
-                    if (exit.thrown == null) {
+                    if (!(exit instanceof ThrownPendingExit)) {
                         Assert.check(exit.tree.hasTag(RETURN));
                     } else {
                         // uncaught throws will be reported later
@@ -1059,7 +1061,7 @@
         }
 
         public void visitDoLoop(JCDoWhileLoop tree) {
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             scan(tree.body);
             resolveContinues(tree);
@@ -1068,7 +1070,7 @@
         }
 
         public void visitWhileLoop(JCWhileLoop tree) {
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             scan(tree.cond);
             scan(tree.body);
@@ -1077,7 +1079,7 @@
         }
 
         public void visitForLoop(JCForLoop tree) {
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             scan(tree.init);
             pendingExits = new ListBuffer<>();
             if (tree.cond != null) {
@@ -1091,7 +1093,7 @@
 
         public void visitForeachLoop(JCEnhancedForLoop tree) {
             visitVarDef(tree.var);
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             scan(tree.expr);
             pendingExits = new ListBuffer<>();
             scan(tree.body);
@@ -1100,7 +1102,7 @@
         }
 
         public void visitLabelled(JCLabeledStatement tree) {
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             scan(tree.body);
             resolveBreaks(tree, prevPendingExits);
@@ -1116,7 +1118,7 @@
         }
 
         private void handleSwitch(JCTree tree, JCExpression selector, List<JCCase> cases) {
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             scan(selector);
             for (List<JCCase> l = cases; l.nonEmpty(); l = l.tail) {
@@ -1140,7 +1142,7 @@
                 }
             }
 
-            ListBuffer<FlowPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             for (JCTree resource : tree.resources) {
                 if (resource instanceof JCVariableDecl) {
@@ -1204,7 +1206,7 @@
             if (tree.finalizer != null) {
                 List<Type> savedThrown = thrown;
                 thrown = List.nil();
-                ListBuffer<FlowPendingExit> exits = pendingExits;
+                ListBuffer<PendingExit> exits = pendingExits;
                 pendingExits = prevPendingExits;
                 scan(tree.finalizer);
                 if (!tree.finallyCanCompleteNormally) {
@@ -1221,7 +1223,7 @@
                 }
             } else {
                 thrown = chk.union(thrown, chk.diff(thrownInTry, caughtInTry));
-                ListBuffer<FlowPendingExit> exits = pendingExits;
+                ListBuffer<PendingExit> exits = pendingExits;
                 pendingExits = prevPendingExits;
                 while (exits.nonEmpty()) pendingExits.append(exits.next());
             }
@@ -1267,16 +1269,16 @@
         public void visitBreak(JCBreak tree) {
             if (tree.isValueBreak())
                 scan(tree.value);
-            recordExit(new FlowPendingExit(tree, null));
+            recordExit(new PendingExit(tree));
         }
 
         public void visitContinue(JCContinue tree) {
-            recordExit(new FlowPendingExit(tree, null));
+            recordExit(new PendingExit(tree));
         }
 
         public void visitReturn(JCReturn tree) {
             scan(tree.expr);
-            recordExit(new FlowPendingExit(tree, null));
+            recordExit(new PendingExit(tree));
         }
 
         public void visitThrow(JCThrow tree) {
@@ -1343,18 +1345,18 @@
             }
             List<Type> prevCaught = caught;
             List<Type> prevThrown = thrown;
-            ListBuffer<FlowPendingExit> prevPending = pendingExits;
+            ListBuffer<PendingExit> prevPending = pendingExits;
             try {
                 pendingExits = new ListBuffer<>();
                 caught = tree.getDescriptorType(types).getThrownTypes();
                 thrown = List.nil();
                 scan(tree.body);
-                List<FlowPendingExit> exits = pendingExits.toList();
+                List<PendingExit> exits = pendingExits.toList();
                 pendingExits = new ListBuffer<>();
                 while (exits.nonEmpty()) {
-                    FlowPendingExit exit = exits.head;
+                    PendingExit exit = exits.head;
                     exits = exits.tail;
-                    if (exit.thrown == null) {
+                    if (!(exit instanceof ThrownPendingExit)) {
                         Assert.check(exit.tree.hasTag(RETURN));
                     } else {
                         // uncaught throws will be reported later
@@ -1488,7 +1490,7 @@
             }
             List<Type> prevCaught = caught;
             List<Type> prevThrown = thrown;
-            ListBuffer<FlowPendingExit> prevPending = pendingExits;
+            ListBuffer<PendingExit> prevPending = pendingExits;
             inLambda = true;
             try {
                 pendingExits = new ListBuffer<>();
@@ -1517,7 +1519,7 @@
      * effectively-final local variables/parameters.
      */
 
-    public class AssignAnalyzer extends BaseAnalyzer<AssignAnalyzer.AssignPendingExit> {
+    public class AssignAnalyzer extends BaseAnalyzer {
 
         /** The set of definitely assigned variables.
          */
@@ -1835,7 +1837,7 @@
                 JCClassDecl classDefPrev = classDef;
                 int firstadrPrev = firstadr;
                 int nextadrPrev = nextadr;
-                ListBuffer<AssignPendingExit> pendingExitsPrev = pendingExits;
+                ListBuffer<PendingExit> pendingExitsPrev = pendingExits;
 
                 pendingExits = new ListBuffer<>();
                 if (tree.name != names.empty) {
@@ -1970,14 +1972,15 @@
                             }
                         }
                     }
-                    List<AssignPendingExit> exits = pendingExits.toList();
+                    List<PendingExit> exits = pendingExits.toList();
                     pendingExits = new ListBuffer<>();
                     while (exits.nonEmpty()) {
-                        AssignPendingExit exit = exits.head;
+                        PendingExit exit = exits.head;
                         exits = exits.tail;
                         Assert.check(exit.tree.hasTag(RETURN), exit.tree);
                         if (isInitialConstructor) {
-                            inits.assign(exit.exit_inits);
+                            Assert.check(exit instanceof AssignPendingExit);
+                            inits.assign(((AssignPendingExit) exit).exit_inits);
                             for (int i = firstadr; i < nextadr; i++) {
                                 checkInit(exit.tree.pos(), vardecls[i].sym);
                             }
@@ -2027,7 +2030,7 @@
         }
 
         public void visitDoLoop(JCDoWhileLoop tree) {
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             FlowKind prevFlowKind = flowKind;
             flowKind = FlowKind.NORMAL;
             final Bits initsSkip = new Bits(true);
@@ -2059,7 +2062,7 @@
         }
 
         public void visitWhileLoop(JCWhileLoop tree) {
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             FlowKind prevFlowKind = flowKind;
             flowKind = FlowKind.NORMAL;
             final Bits initsSkip = new Bits(true);
@@ -2095,7 +2098,7 @@
         }
 
         public void visitForLoop(JCForLoop tree) {
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             FlowKind prevFlowKind = flowKind;
             flowKind = FlowKind.NORMAL;
             int nextadrPrev = nextadr;
@@ -2143,7 +2146,7 @@
         public void visitForeachLoop(JCEnhancedForLoop tree) {
             visitVarDef(tree.var);
 
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             FlowKind prevFlowKind = flowKind;
             flowKind = FlowKind.NORMAL;
             int nextadrPrev = nextadr;
@@ -2174,7 +2177,7 @@
         }
 
         public void visitLabelled(JCLabeledStatement tree) {
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             scan(tree.body);
             resolveBreaks(tree, prevPendingExits);
@@ -2189,7 +2192,7 @@
         }
 
         private void handleSwitch(JCTree tree, JCExpression selector, List<JCCase> cases) {
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             int nextadrPrev = nextadr;
             scanExpr(selector);
@@ -2245,7 +2248,7 @@
         public void visitTry(JCTry tree) {
             ListBuffer<JCVariableDecl> resourceVarDecls = new ListBuffer<>();
             final Bits uninitsTryPrev = new Bits(uninitsTry);
-            ListBuffer<AssignPendingExit> prevPendingExits = pendingExits;
+            ListBuffer<PendingExit> prevPendingExits = pendingExits;
             pendingExits = new ListBuffer<>();
             final Bits initsTry = new Bits(inits);
             uninitsTry.assign(uninits);
@@ -2302,7 +2305,7 @@
             if (tree.finalizer != null) {
                 inits.assign(initsTry);
                 uninits.assign(uninitsTry);
-                ListBuffer<AssignPendingExit> exits = pendingExits;
+                ListBuffer<PendingExit> exits = pendingExits;
                 pendingExits = prevPendingExits;
                 scan(tree.finalizer);
                 if (!tree.finallyCanCompleteNormally) {
@@ -2312,10 +2315,10 @@
                     // FIX: this doesn't preserve source order of exits in catch
                     // versus finally!
                     while (exits.nonEmpty()) {
-                        AssignPendingExit exit = exits.next();
-                        if (exit.exit_inits != null) {
-                            exit.exit_inits.orSet(inits);
-                            exit.exit_uninits.andSet(uninits);
+                        PendingExit exit = exits.next();
+                        if (exit instanceof AssignPendingExit) {
+                            ((AssignPendingExit) exit).exit_inits.orSet(inits);
+                            ((AssignPendingExit) exit).exit_uninits.andSet(uninits);
                         }
                         pendingExits.append(exit);
                     }
@@ -2324,7 +2327,7 @@
             } else {
                 inits.assign(initsEnd);
                 uninits.assign(uninitsEnd);
-                ListBuffer<AssignPendingExit> exits = pendingExits;
+                ListBuffer<PendingExit> exits = pendingExits;
                 pendingExits = prevPendingExits;
                 while (exits.nonEmpty()) pendingExits.append(exits.next());
             }
@@ -2390,8 +2393,34 @@
 
         @Override
         public void visitBreak(JCBreak tree) {
-            if (tree.isValueBreak())
+            if (tree.isValueBreak()) {
+                if (tree.target.hasTag(SWITCH_EXPRESSION)) {
+                    JCSwitchExpression expr = (JCSwitchExpression) tree.target;
+                    if (expr.type.hasTag(BOOLEAN)) {
+                        scanCond(tree.value);
+                        Bits initsAfterBreakWhenTrue = new Bits(initsWhenTrue);
+                        Bits initsAfterBreakWhenFalse = new Bits(initsWhenFalse);
+                        Bits uninitsAfterBreakWhenTrue = new Bits(uninitsWhenTrue);
+                        Bits uninitsAfterBreakWhenFalse = new Bits(uninitsWhenFalse);
+                        PendingExit exit = new PendingExit(tree) {
+                            @Override
+                            void resolveJump() {
+                                if (!inits.isReset()) {
+                                    split(true);
+                                }
+                                initsWhenTrue.andSet(initsAfterBreakWhenTrue);
+                                initsWhenFalse.andSet(initsAfterBreakWhenFalse);
+                                uninitsWhenTrue.andSet(uninitsAfterBreakWhenTrue);
+                                uninitsWhenFalse.andSet(uninitsAfterBreakWhenFalse);
+                            }
+                        };
+                        merge();
+                        recordExit(exit);
+                        return ;
+                    }
+                }
                 scan(tree.value);
+            }
             recordExit(new AssignPendingExit(tree, inits, uninits));
         }
 
@@ -2428,7 +2457,7 @@
             final Bits prevInits = new Bits(inits);
             int returnadrPrev = returnadr;
             int nextadrPrev = nextadr;
-            ListBuffer<AssignPendingExit> prevPending = pendingExits;
+            ListBuffer<PendingExit> prevPending = pendingExits;
             try {
                 returnadr = nextadr;
                 pendingExits = new ListBuffer<>();
@@ -2618,7 +2647,7 @@
      * As effectively final variables are marked as such during DA/DU, this pass must run after
      * AssignAnalyzer.
      */
-    class CaptureAnalyzer extends BaseAnalyzer<BaseAnalyzer.PendingExit> {
+    class CaptureAnalyzer extends BaseAnalyzer {
 
         JCTree currentTree; //local class or lambda
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Tue Dec 04 13:35:04 2018 +0530
@@ -63,6 +63,7 @@
 import com.sun.tools.javac.tree.JCTree.JCExpression;
 import com.sun.tools.javac.tree.JCTree.JCExpressionStatement;
 import static com.sun.tools.javac.tree.JCTree.JCOperatorExpression.OperandPos.LEFT;
+import com.sun.tools.javac.tree.JCTree.JCSwitchExpression;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 
 /** This pass translates away some syntactic sugar: inner classes,
@@ -3362,14 +3363,29 @@
     }
 
     public void visitSwitch(JCSwitch tree) {
+        handleSwitch(tree, tree.selector, tree.cases);
+    }
+
+    @Override
+    public void visitSwitchExpression(JCSwitchExpression tree) {
+        if (tree.cases.stream().noneMatch(c -> c.pats.isEmpty())) {
+            JCThrow thr = make.Throw(makeNewClass(syms.incompatibleClassChangeErrorType,
+                                                  List.nil()));
+            JCCase c = make.Case(JCCase.STATEMENT, List.nil(), List.of(thr), null);
+            tree.cases = tree.cases.append(c);
+        }
+        handleSwitch(tree, tree.selector, tree.cases);
+    }
+
+    private void handleSwitch(JCTree tree, JCExpression selector, List<JCCase> cases) {
         //expand multiple label cases:
-        ListBuffer<JCCase> cases = new ListBuffer<>();
-
-        for (JCCase c : tree.cases) {
+        ListBuffer<JCCase> convertedCases = new ListBuffer<>();
+
+        for (JCCase c : cases) {
             switch (c.pats.size()) {
                 case 0: //default
                 case 1: //single label
-                    cases.append(c);
+                    convertedCases.append(c);
                     break;
                 default: //multiple labels, expand:
                     //case C1, C2, C3: ...
@@ -3379,19 +3395,19 @@
                     //case C3: ...
                     List<JCExpression> patterns = c.pats;
                     while (patterns.tail.nonEmpty()) {
-                        cases.append(make_at(c.pos()).Case(JCCase.STATEMENT,
+                        convertedCases.append(make_at(c.pos()).Case(JCCase.STATEMENT,
                                                            List.of(patterns.head),
                                                            List.nil(),
                                                            null));
                         patterns = patterns.tail;
                     }
                     c.pats = patterns;
-                    cases.append(c);
+                    convertedCases.append(c);
                     break;
             }
         }
 
-        for (JCCase c : cases) {
+        for (JCCase c : convertedCases) {
             if (c.caseKind == JCCase.RULE && c.completesNormally) {
                 JCBreak b = make_at(c.pos()).Break(null);
                 b.target = tree;
@@ -3399,58 +3415,75 @@
             }
         }
 
-        tree.cases = cases.toList();
-
-        Type selsuper = types.supertype(tree.selector.type);
+        cases = convertedCases.toList();
+
+        Type selsuper = types.supertype(selector.type);
         boolean enumSwitch = selsuper != null &&
-            (tree.selector.type.tsym.flags() & ENUM) != 0;
+            (selector.type.tsym.flags() & ENUM) != 0;
         boolean stringSwitch = selsuper != null &&
-            types.isSameType(tree.selector.type, syms.stringType);
-        Type target = enumSwitch ? tree.selector.type :
+            types.isSameType(selector.type, syms.stringType);
+        Type target = enumSwitch ? selector.type :
             (stringSwitch? syms.stringType : syms.intType);
-        tree.selector = translate(tree.selector, target);
-        tree.cases = translateCases(tree.cases);
+        selector = translate(selector, target);
+        cases = translateCases(cases);
+        if (tree.hasTag(SWITCH)) {
+            ((JCSwitch) tree).selector = selector;
+            ((JCSwitch) tree).cases = cases;
+        } else if (tree.hasTag(SWITCH_EXPRESSION)) {
+            ((JCSwitchExpression) tree).selector = selector;
+            ((JCSwitchExpression) tree).cases = cases;
+        } else {
+            Assert.error();
+        }
         if (enumSwitch) {
-            result = visitEnumSwitch(tree);
+            result = visitEnumSwitch(tree, selector, cases);
         } else if (stringSwitch) {
-            result = visitStringSwitch(tree);
+            result = visitStringSwitch(tree, selector, cases);
         } else {
             result = tree;
         }
     }
 
-    public JCTree visitEnumSwitch(JCSwitch tree) {
-        TypeSymbol enumSym = tree.selector.type.tsym;
+    public JCTree visitEnumSwitch(JCTree tree, JCExpression selector, List<JCCase> cases) {
+        TypeSymbol enumSym = selector.type.tsym;
         EnumMapping map = mapForEnum(tree.pos(), enumSym);
         make_at(tree.pos());
         Symbol ordinalMethod = lookupMethod(tree.pos(),
                                             names.ordinal,
-                                            tree.selector.type,
+                                            selector.type,
                                             List.nil());
-        JCArrayAccess selector = make.Indexed(map.mapVar,
-                                        make.App(make.Select(tree.selector,
+        JCArrayAccess newSelector = make.Indexed(map.mapVar,
+                                        make.App(make.Select(selector,
                                                              ordinalMethod)));
-        ListBuffer<JCCase> cases = new ListBuffer<>();
-        for (JCCase c : tree.cases) {
+        ListBuffer<JCCase> newCases = new ListBuffer<>();
+        for (JCCase c : cases) {
             if (c.pats.nonEmpty()) {
                 VarSymbol label = (VarSymbol)TreeInfo.symbol(c.pats.head);
                 JCLiteral pat = map.forConstant(label);
-                cases.append(make.Case(JCCase.STATEMENT, List.of(pat), c.stats, null));
+                newCases.append(make.Case(JCCase.STATEMENT, List.of(pat), c.stats, null));
             } else {
-                cases.append(c);
+                newCases.append(c);
             }
         }
-        JCSwitch enumSwitch = make.Switch(selector, cases.toList());
+        JCTree enumSwitch;
+        if (tree.hasTag(SWITCH)) {
+            enumSwitch = make.Switch(newSelector, newCases.toList());
+        } else if (tree.hasTag(SWITCH_EXPRESSION)) {
+            enumSwitch = make.SwitchExpression(newSelector, newCases.toList());
+            enumSwitch.setType(tree.type);
+        } else {
+            Assert.error();
+            throw new AssertionError();
+        }
         patchTargets(enumSwitch, tree, enumSwitch);
         return enumSwitch;
     }
 
-    public JCTree visitStringSwitch(JCSwitch tree) {
-        List<JCCase> caseList = tree.getCases();
+    public JCTree visitStringSwitch(JCTree tree, JCExpression selector, List<JCCase> caseList) {
         int alternatives = caseList.size();
 
-        if (alternatives == 0) { // Strange but legal possibility
-            return make.at(tree.pos()).Exec(attr.makeNullCheck(tree.getExpression()));
+        if (alternatives == 0) { // Strange but legal possibility (only legal for switch statement)
+            return make.at(tree.pos()).Exec(attr.makeNullCheck(selector));
         } else {
             /*
              * The general approach used is to translate a single
@@ -3551,7 +3584,7 @@
                                                names.fromString("s" + tree.pos + target.syntheticNameChar()),
                                                syms.stringType,
                                                currentMethodSym);
-            stmtList.append(make.at(tree.pos()).VarDef(dollar_s, tree.getExpression()).setType(dollar_s.type));
+            stmtList.append(make.at(tree.pos()).VarDef(dollar_s, selector).setType(dollar_s.type));
 
             VarSymbol dollar_tmp = new VarSymbol(SYNTHETIC,
                                                  names.fromString("tmp" + tree.pos + target.syntheticNameChar()),
@@ -3601,12 +3634,7 @@
             // position map.
 
             ListBuffer<JCCase> lb = new ListBuffer<>();
-            JCSwitch switch2 = make.Switch(make.Ident(dollar_tmp), lb.toList());
             for(JCCase oneCase : caseList ) {
-                // Rewire up old unlabeled break statements to the
-                // replacement switch being created.
-                patchTargets(oneCase, tree, switch2);
-
                 boolean isDefault = (oneCase.pats.isEmpty());
                 JCExpression caseExpr;
                 if (isDefault)
@@ -3617,85 +3645,44 @@
                 }
 
                 lb.append(make.Case(JCCase.STATEMENT, caseExpr == null ? List.nil() : List.of(caseExpr),
-                                    oneCase.getStatements(), null));
+                                    oneCase.stats, null));
             }
 
-            switch2.cases = lb.toList();
-            stmtList.append(switch2);
-
-            return make.Block(0L, stmtList.toList());
+            if (tree.hasTag(SWITCH)) {
+                JCSwitch switch2 = make.Switch(make.Ident(dollar_tmp), lb.toList());
+                // Rewire up old unlabeled break statements to the
+                // replacement switch being created.
+                patchTargets(switch2, tree, switch2);
+
+                stmtList.append(switch2);
+
+                return make.Block(0L, stmtList.toList());
+            } else {
+                JCSwitchExpression switch2 = make.SwitchExpression(make.Ident(dollar_tmp), lb.toList());
+
+                // Rewire up old unlabeled break statements to the
+                // replacement switch being created.
+                patchTargets(switch2, tree, switch2);
+
+                switch2.setType(tree.type);
+
+                LetExpr res = make.LetExpr(stmtList.toList(), switch2);
+
+                res.needsCond = true;
+                res.setType(tree.type);
+
+                return res;
+            }
         }
     }
 
     @Override
-    public void visitSwitchExpression(JCSwitchExpression tree) {
-        //translates switch expression to statement switch:
-        //switch (selector) {
-        //    case C: break value;
-        //    ...
-        //}
-        //=>
-        //(letexpr T exprswitch$;
-        //         switch (selector) {
-        //             case C: { exprswitch$ = value; break; }
-        //         }
-        //         exprswitch$
-        //)
-        VarSymbol dollar_switchexpr = new VarSymbol(Flags.FINAL|Flags.SYNTHETIC,
-                           names.fromString("exprswitch" + tree.pos + target.syntheticNameChar()),
-                           tree.type,
-                           currentMethodSym);
-
-        ListBuffer<JCStatement> stmtList = new ListBuffer<>();
-
-        stmtList.append(make.at(tree.pos()).VarDef(dollar_switchexpr, null).setType(dollar_switchexpr.type));
-        JCSwitch switchStatement = make.Switch(tree.selector, null);
-        switchStatement.cases =
-                tree.cases.stream()
-                          .map(c -> convertCase(dollar_switchexpr, switchStatement, tree, c))
-                          .collect(List.collector());
-        if (tree.cases.stream().noneMatch(c -> c.pats.isEmpty())) {
-            JCThrow thr = make.Throw(makeNewClass(syms.incompatibleClassChangeErrorType,
-                                                  List.nil()));
-            JCCase c = make.Case(JCCase.STATEMENT, List.nil(), List.of(thr), null);
-            switchStatement.cases = switchStatement.cases.append(c);
+    public void visitBreak(JCBreak tree) {
+        if (tree.isValueBreak()) {
+            tree.value = translate(tree.value, tree.target.type);
         }
-
-        stmtList.append(translate(switchStatement));
-
-        result = make.LetExpr(stmtList.toList(), make.Ident(dollar_switchexpr))
-                     .setType(dollar_switchexpr.type);
+        result = tree;
     }
-        //where:
-        private JCCase convertCase(VarSymbol dollar_switchexpr, JCSwitch switchStatement,
-                                   JCSwitchExpression switchExpr, JCCase c) {
-            make.at(c.pos());
-            ListBuffer<JCStatement> statements = new ListBuffer<>();
-            statements.addAll(new TreeTranslator() {
-                @Override
-                public void visitLambda(JCLambda tree) {}
-                @Override
-                public void visitClassDef(JCClassDecl tree) {}
-                @Override
-                public void visitMethodDef(JCMethodDecl tree) {}
-                @Override
-                public void visitBreak(JCBreak tree) {
-                    if (tree.target == switchExpr) {
-                        tree.target = switchStatement;
-                        JCExpressionStatement assignment =
-                                make.Exec(make.Assign(make.Ident(dollar_switchexpr),
-                                                      translate(tree.value))
-                                              .setType(dollar_switchexpr.type));
-                        result = make.Block(0, List.of(assignment,
-                                                       tree));
-                        tree.value = null;
-                    } else {
-                        result = tree;
-                    }
-                }
-            }.translate(c.stats));
-            return make.Case(JCCase.STATEMENT, c.pats, statements.toList(), null);
-        }
 
     public void visitNewArray(JCNewArray tree) {
         tree.elemtype = translate(tree.elemtype);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Tue Dec 04 13:35:04 2018 +0530
@@ -245,6 +245,7 @@
                                                              tree.sym.type.getReturnType());
         }
         if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++;
+        localEnv.info.breakResult = null;
         return localEnv;
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Tue Dec 04 13:35:04 2018 +0530
@@ -313,7 +313,7 @@
                 fs = new DirectoryContainer(realPath);
             } else {
                 try {
-                    fs = new ArchiveContainer(realPath);
+                    fs = new ArchiveContainer(path);
                 } catch (ProviderNotFoundException | SecurityException ex) {
                     throw new IOException(ex);
                 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/CRTable.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/CRTable.java	Tue Dec 04 13:35:04 2018 +0530
@@ -33,6 +33,7 @@
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.tree.EndPosTable;
+import com.sun.tools.javac.tree.JCTree.JCSwitchExpression;
 
 /** This class contains the CharacterRangeTable for some method
  *  and the hashtable for mapping trees or lists of trees to their
@@ -311,6 +312,14 @@
             result = sr;
         }
 
+        @Override
+        public void visitSwitchExpression(JCSwitchExpression tree) {
+            SourceRange sr = new SourceRange(startPos(tree), endPos(tree));
+            sr.mergeWith(csp(tree.selector));
+            sr.mergeWith(cspCases(tree.cases));
+            result = sr;
+        }
+
         public void visitCase(JCCase tree) {
             SourceRange sr = new SourceRange(startPos(tree), endPos(tree));
             sr.mergeWith(csp(tree.pats));
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Code.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1220,7 +1220,7 @@
     }
 
     public boolean isStatementStart() {
-        return state.stacksize == letExprStackPos;
+        return !alive || state.stacksize == letExprStackPos;
     }
 
 /**************************************************************************
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Tue Dec 04 13:35:04 2018 +0530
@@ -25,6 +25,8 @@
 
 package com.sun.tools.javac.jvm;
 
+import java.util.function.BiConsumer;
+
 import com.sun.tools.javac.tree.TreeInfo.PosKind;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -161,6 +163,10 @@
      */
     EndPosTable endPosTable;
 
+    boolean inCondSwitchExpression;
+    Chain switchExpressionTrueChain;
+    Chain switchExpressionFalseChain;
+
     /** Generate code to load an integer constant.
      *  @param n     The integer to be loaded.
      */
@@ -719,6 +725,42 @@
                                       Code.mergeChains(falseJumps, second.falseJumps));
             if (markBranches) result.tree = tree.falsepart;
             return result;
+        } else if (inner_tree.hasTag(SWITCH_EXPRESSION)) {
+            boolean prevInCondSwitchExpression = inCondSwitchExpression;
+            Chain prevSwitchExpressionTrueChain = switchExpressionTrueChain;
+            Chain prevSwitchExpressionFalseChain = switchExpressionFalseChain;
+            try {
+                inCondSwitchExpression = true;
+                switchExpressionTrueChain = null;
+                switchExpressionFalseChain = null;
+                try {
+                    doHandleSwitchExpression((JCSwitchExpression) inner_tree);
+                } catch (CompletionFailure ex) {
+                    chk.completionError(_tree.pos(), ex);
+                    code.state.stacksize = 1;
+                }
+                CondItem result = items.makeCondItem(goto_,
+                                                     switchExpressionTrueChain,
+                                                     switchExpressionFalseChain);
+                if (markBranches) result.tree = _tree;
+                return result;
+            } finally {
+                inCondSwitchExpression = prevInCondSwitchExpression;
+                switchExpressionTrueChain = prevSwitchExpressionTrueChain;
+                switchExpressionFalseChain = prevSwitchExpressionFalseChain;
+            }
+        } else if (inner_tree.hasTag(LETEXPR) && ((LetExpr) inner_tree).needsCond) {
+            LetExpr tree = (LetExpr) inner_tree;
+            int limit = code.nextreg;
+            int prevLetExprStart = code.setLetExprStackPos(code.state.stacksize);
+            try {
+                genStats(tree.defs, env);
+            } finally {
+                code.setLetExprStackPos(prevLetExprStart);
+            }
+            CondItem result = genCond(tree.expr, markBranches);
+            code.endScopes(limit);
+            return result;
         } else {
             CondItem result = genExpr(_tree, syms.booleanType).mkCond();
             if (markBranches) result.tree = _tree;
@@ -1119,25 +1161,50 @@
     }
 
     public void visitSwitch(JCSwitch tree) {
+        handleSwitch(tree, tree.selector, tree.cases);
+    }
+
+    @Override
+    public void visitSwitchExpression(JCSwitchExpression tree) {
+        code.resolvePending();
+        boolean prevInCondSwitchExpression = inCondSwitchExpression;
+        try {
+            inCondSwitchExpression = false;
+            doHandleSwitchExpression(tree);
+        } finally {
+            inCondSwitchExpression = prevInCondSwitchExpression;
+        }
+        result = items.makeStackItem(pt);
+    }
+
+    private void doHandleSwitchExpression(JCSwitchExpression tree) {
+        int prevLetExprStart = code.setLetExprStackPos(code.state.stacksize);
+        try {
+            handleSwitch(tree, tree.selector, tree.cases);
+        } finally {
+            code.setLetExprStackPos(prevLetExprStart);
+        }
+    }
+
+    private void handleSwitch(JCTree swtch, JCExpression selector, List<JCCase> cases) {
         int limit = code.nextreg;
-        Assert.check(!tree.selector.type.hasTag(CLASS));
+        Assert.check(!selector.type.hasTag(CLASS));
         int startpcCrt = genCrt ? code.curCP() : 0;
         Assert.check(code.isStatementStart());
-        Item sel = genExpr(tree.selector, syms.intType);
-        List<JCCase> cases = tree.cases;
+        Item sel = genExpr(selector, syms.intType);
         if (cases.isEmpty()) {
             // We are seeing:  switch <sel> {}
             sel.load().drop();
             if (genCrt)
-                code.crt.put(TreeInfo.skipParens(tree.selector),
+                code.crt.put(TreeInfo.skipParens(selector),
                              CRT_FLOW_CONTROLLER, startpcCrt, code.curCP());
         } else {
             // We are seeing a nonempty switch.
             sel.load();
             if (genCrt)
-                code.crt.put(TreeInfo.skipParens(tree.selector),
+                code.crt.put(TreeInfo.skipParens(selector),
                              CRT_FLOW_CONTROLLER, startpcCrt, code.curCP());
-            Env<GenContext> switchEnv = env.dup(tree, new GenContext());
+            Env<GenContext> switchEnv = env.dup(swtch, new GenContext());
             switchEnv.info.isSwitch = true;
 
             // Compute number of labels and minimum and maximum label values.
@@ -1593,10 +1660,35 @@
 
     public void visitBreak(JCBreak tree) {
         int tmpPos = code.pendingStatPos;
+        Assert.check(code.isStatementStart());
         Env<GenContext> targetEnv = unwind(tree.target, env);
         code.pendingStatPos = tmpPos;
-        Assert.check(code.isStatementStart());
-        targetEnv.info.addExit(code.branch(goto_));
+        if (tree.isValueBreak()) {
+            if (inCondSwitchExpression) {
+                CondItem value = genCond(tree.value, CRT_FLOW_TARGET);
+                Chain falseJumps = value.jumpFalse();
+                code.resolve(value.trueJumps);
+                Chain trueJumps = code.branch(goto_);
+                if (switchExpressionTrueChain == null) {
+                    switchExpressionTrueChain = trueJumps;
+                } else {
+                    switchExpressionTrueChain =
+                            Code.mergeChains(switchExpressionTrueChain, trueJumps);
+                }
+                if (switchExpressionFalseChain == null) {
+                    switchExpressionFalseChain = falseJumps;
+                } else {
+                    switchExpressionFalseChain =
+                            Code.mergeChains(switchExpressionFalseChain, falseJumps);
+                }
+            } else {
+                genExpr(tree.value, pt).load();
+                code.state.forceStackTop(tree.target.type);
+                targetEnv.info.addExit(code.branch(goto_));
+            }
+        } else {
+            targetEnv.info.addExit(code.branch(goto_));
+        }
         endFinalizerGaps(env, targetEnv);
     }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Tue Dec 04 13:35:04 2018 +0530
@@ -3016,6 +3016,8 @@
     public static class LetExpr extends JCExpression {
         public List<JCStatement> defs;
         public JCExpression expr;
+        /**true if a expr should be run through Gen.genCond:*/
+        public boolean needsCond;
         protected LetExpr(List<JCStatement> defs, JCExpression expr) {
             this.defs = defs;
             this.expr = expr;
--- a/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/PRNG.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.crypto.mscapi/windows/classes/sun/security/mscapi/PRNG.java	Tue Dec 04 13:35:04 2018 +0530
@@ -25,6 +25,7 @@
 
 package sun.security.mscapi;
 
+import java.lang.ref.Cleaner;
 import java.security.ProviderException;
 import java.security.SecureRandomSpi;
 
@@ -43,12 +44,31 @@
      * The CryptGenRandom function fills a buffer with cryptographically random
      * bytes.
      */
-    private static native byte[] generateSeed(int length, byte[] seed);
+    private static native byte[] generateSeed(long ctxt, int length, byte[] seed);
+    private static native long getContext();
+    private static native void releaseContext(long ctxt);
+    private static final Cleaner CLEANER = Cleaner.create();
+
+    private transient long ctxt;
+
+    private static class State implements Runnable {
+        private final long ctxt;
 
+        State(long ctxt) {
+            this.ctxt = ctxt;
+        }
+
+        @Override
+        public void run() {
+            releaseContext(ctxt);
+        }
+    }
     /**
      * Creates a random number generator.
      */
     public PRNG() {
+        ctxt = getContext();
+        CLEANER.register(this, new State(ctxt));
     }
 
     /**
@@ -59,9 +79,9 @@
      * @param seed the seed.
      */
     @Override
-    protected void engineSetSeed(byte[] seed) {
+    protected synchronized void engineSetSeed(byte[] seed) {
         if (seed != null) {
-            generateSeed(-1, seed);
+            generateSeed(ctxt, -1, seed);
         }
     }
 
@@ -71,9 +91,9 @@
      * @param bytes the array to be filled in with random bytes.
      */
     @Override
-    protected void engineNextBytes(byte[] bytes) {
+    protected synchronized void engineNextBytes(byte[] bytes) {
         if (bytes != null) {
-            if (generateSeed(0, bytes) == null) {
+            if (generateSeed(ctxt, 0, bytes) == null) {
                 throw new ProviderException("Error generating random bytes");
             }
         }
@@ -88,12 +108,20 @@
      * @return the seed bytes.
      */
     @Override
-    protected byte[] engineGenerateSeed(int numBytes) {
-        byte[] seed = generateSeed(numBytes, null);
+    protected synchronized byte[] engineGenerateSeed(int numBytes) {
+        byte[] seed = generateSeed(ctxt, numBytes, null);
 
         if (seed == null) {
             throw new ProviderException("Error generating seed bytes");
         }
         return seed;
     }
+
+    private void readObject(java.io.ObjectInputStream s)
+            throws java.io.IOException, ClassNotFoundException
+    {
+        s.defaultReadObject();
+        ctxt = getContext();
+        CLEANER.register(this, new State(ctxt));
+    }
 }
--- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -242,32 +242,54 @@
 
 /*
  * Class:     sun_security_mscapi_PRNG
+ * Method:    getContext
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_sun_security_mscapi_PRNG_getContext
+        (JNIEnv *env, jclass clazz) {
+    HCRYPTPROV hCryptProv = NULL;
+    if(::CryptAcquireContext(
+       &hCryptProv,
+       NULL,
+       NULL,
+       PROV_RSA_FULL,
+       CRYPT_VERIFYCONTEXT) == FALSE)
+    {
+        ThrowException(env, PROVIDER_EXCEPTION, GetLastError());
+    }
+    return hCryptProv;
+}
+
+
+/*
+ * Class:     sun_security_mscapi_PRNG
+ * Method:    releaseContext
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_sun_security_mscapi_PRNG_releaseContext
+        (JNIEnv *env, jclass clazz, jlong ctxt) {
+    if (ctxt) {
+        ::CryptReleaseContext((HCRYPTPROV)ctxt, 0);
+    }
+}
+
+
+/*
+ * Class:     sun_security_mscapi_PRNG
  * Method:    generateSeed
- * Signature: (I[B)[B
+ * Signature: (JI[B)[B
  */
 JNIEXPORT jbyteArray JNICALL Java_sun_security_mscapi_PRNG_generateSeed
-  (JNIEnv *env, jclass clazz, jint length, jbyteArray seed)
+  (JNIEnv *env, jclass clazz, jlong ctxt, jint length, jbyteArray seed)
 {
 
-    HCRYPTPROV hCryptProv = NULL;
+    HCRYPTPROV hCryptProv = (HCRYPTPROV)ctxt;
     jbyte*     reseedBytes = NULL;
     jbyte*     seedBytes = NULL;
     jbyteArray result = NULL;
 
     __try
     {
-        //  Acquire a CSP context.
-        if(::CryptAcquireContext(
-           &hCryptProv,
-           NULL,
-           NULL,
-           PROV_RSA_FULL,
-           CRYPT_VERIFYCONTEXT) == FALSE)
-        {
-            ThrowException(env, PROVIDER_EXCEPTION, GetLastError());
-            __leave;
-        }
-
         /*
          * If length is negative then use the supplied seed to re-seed the
          * generator and return null.
@@ -330,9 +352,6 @@
 
         if (seedBytes)
             env->ReleaseByteArrayElements(seed, seedBytes, 0); // update orig
-
-        if (hCryptProv)
-            ::CryptReleaseContext(hCryptProv, 0);
     }
 
     return result;
--- a/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AccessibleMembersLookup.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.dynalink/share/classes/jdk/dynalink/beans/AccessibleMembersLookup.java	Tue Dec 04 13:35:04 2018 +0530
@@ -65,9 +65,8 @@
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.LinkedHashSet;
+import java.util.LinkedHashMap;
 import java.util.Map;
-import java.util.Set;
 
 /**
  * Utility class for discovering accessible methods and inner classes. Normally, a public member declared on a class is
@@ -78,7 +77,7 @@
  */
 class AccessibleMembersLookup {
     private final Map<MethodSignature, Method> methods;
-    private final Set<Class<?>> innerClasses;
+    private final Map<String, Class<?>> innerClasses;
     private final boolean instance;
 
     /**
@@ -89,7 +88,7 @@
      */
     AccessibleMembersLookup(final Class<?> clazz, final boolean instance) {
         this.methods = new HashMap<>();
-        this.innerClasses = new LinkedHashSet<>();
+        this.innerClasses = new LinkedHashMap<>();
         this.instance = instance;
         lookupAccessibleMembers(clazz);
     }
@@ -110,7 +109,7 @@
     }
 
     Class<?>[] getInnerClasses() {
-        return innerClasses.toArray(new Class<?>[0]);
+        return innerClasses.values().toArray(new Class<?>[0]);
     }
 
     /**
@@ -216,7 +215,8 @@
                 // NOTE: getting inner class objects through getClasses() does not resolve them, so if those classes
                 // were not yet loaded, they'll only get loaded in a non-resolved state; no static initializers for
                 // them will trigger just by doing this.
-                innerClasses.add(innerClass);
+                // Don't overwrite an inner class with an inherited inner class with the same name.
+                innerClasses.putIfAbsent(innerClass.getSimpleName(), innerClass);
             }
         } else {
             searchSuperTypes = true;
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/OopUtilities.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,16 +63,16 @@
   private static BooleanField threadDaemonField;
 
   // possible values of java_lang_Thread::ThreadStatus
-  private static int THREAD_STATUS_NEW;
+  public static int THREAD_STATUS_NEW;
 
-  private static int THREAD_STATUS_RUNNABLE;
-  private static int THREAD_STATUS_SLEEPING;
-  private static int THREAD_STATUS_IN_OBJECT_WAIT;
-  private static int THREAD_STATUS_IN_OBJECT_WAIT_TIMED;
-  private static int THREAD_STATUS_PARKED;
-  private static int THREAD_STATUS_PARKED_TIMED;
-  private static int THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER;
-  private static int THREAD_STATUS_TERMINATED;
+  public static int THREAD_STATUS_RUNNABLE;
+  public static int THREAD_STATUS_SLEEPING;
+  public static int THREAD_STATUS_IN_OBJECT_WAIT;
+  public static int THREAD_STATUS_IN_OBJECT_WAIT_TIMED;
+  public static int THREAD_STATUS_PARKED;
+  public static int THREAD_STATUS_PARKED_TIMED;
+  public static int THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER;
+  public static int THREAD_STATUS_TERMINATED;
 
   // java.util.concurrent.locks.AbstractOwnableSynchronizer fields
   private static OopField absOwnSyncOwnerThreadField;
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaVFrame.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaVFrame.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -99,13 +99,14 @@
         // we are still waiting for notification or timeout. Otherwise if
         // we earlier reported java.lang.Thread.State == "BLOCKED (on object
         // monitor)", then we are actually waiting to re-lock the monitor.
-        // At this level we can't distinguish the two cases to report
-        // "waited on" rather than "waiting on" for the second case.
         StackValueCollection locs = getLocals();
         if (!locs.isEmpty()) {
           StackValue sv = locs.get(0);
           if (sv.getType() == BasicType.getTObject()) {
             OopHandle o = sv.getObject();
+            if (OopUtilities.threadOopGetThreadStatus(thread.getThreadObj()) == OopUtilities.THREAD_STATUS_BLOCKED_ON_MONITOR_ENTER) {
+              waitState = "waiting to re-lock in wait()";
+            }
             printLockedObjectClassName(tty, o, waitState);
           }
         } else {
@@ -146,13 +147,6 @@
             // an inflated monitor that is first on the monitor list in
             // the first frame can block us on a monitor enter.
             lockState = identifyLockState(monitor, "waiting to lock");
-          } else if (frameCount != 0) {
-            // This is not the first frame so we either own this monitor
-            // or we owned the monitor before and called wait(). Because
-            // wait() could have been called on any monitor in a lower
-            // numbered frame on the stack, we have to check all the
-            // monitors on the list for this frame.
-            lockState = identifyLockState(monitor, "waiting to re-lock in wait()");
           }
           printLockedObjectClassName(tty, monitor.owner(), lockState);
           foundFirstMonitor = true;
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JMap.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/JMap.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -182,7 +182,7 @@
             hgw.write(fileName);
             System.out.println("heap written to " + fileName);
             return true;
-        } catch (IOException exp) {
+        } catch (IOException | RuntimeException exp) {
             System.err.println(exp.getMessage());
             return false;
         }
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java	Tue Dec 04 13:35:04 2018 +0530
@@ -32,6 +32,7 @@
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.classfile.*;
+import sun.jvm.hotspot.gc.z.ZCollectedHeap;
 
 /*
  * This class writes Java heap in hprof binary format. This format is
@@ -388,11 +389,15 @@
     }
 
     public synchronized void write(String fileName) throws IOException {
+        VM vm = VM.getVM();
+        if (vm.getUniverse().heap() instanceof ZCollectedHeap) {
+            throw new RuntimeException("This operation is not supported with ZGC.");
+        }
+
         // open file stream and create buffered data output stream
         fos = new FileOutputStream(fileName);
         out = new DataOutputStream(new BufferedOutputStream(fos));
 
-        VM vm = VM.getVM();
         dbg = vm.getDebugger();
         objectHeap = vm.getObjectHeap();
 
--- a/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/src/jdk.jshell/share/classes/jdk/jshell/Eval.java	Tue Dec 04 13:35:04 2018 +0530
@@ -327,7 +327,7 @@
                     String initCode = rinit.part(compileSource);
                     ExpressionInfo ei =
                             ExpressionToTypeInfo.localVariableTypeForInitializer(initCode, state, false);
-                    if (ei != null) {
+                    if (ei != null && ei.declareTypeName != null) {
                         typeName = ei.declareTypeName;
                         fullTypeName = ei.fullTypeName;
                         displayType = ei.displayTypeName;
--- a/test/hotspot/gtest/code/test_dependencyContext.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/gtest/code/test_dependencyContext.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -24,29 +24,33 @@
 
 #include "precompiled.hpp"
 #include "code/dependencyContext.hpp"
+#include "code/nmethod.hpp"
 #include "unittest.hpp"
 
 class TestDependencyContext {
  public:
-  nmethod* _nmethods[3];
+  nmethod _nmethods[3];
 
-  intptr_t _dependency_context;
+  nmethodBucket* volatile _dependency_context;
+  volatile uint64_t _last_cleanup;
 
   DependencyContext dependencies() {
-    DependencyContext depContext(&_dependency_context);
+    DependencyContext depContext(&_dependency_context, &_last_cleanup);
     return depContext;
   }
 
-  TestDependencyContext() : _dependency_context(DependencyContext::EMPTY) {
+  TestDependencyContext()
+    : _dependency_context(NULL),
+      _last_cleanup(0) {
     CodeCache_lock->lock_without_safepoint_check();
 
-    _nmethods[0] = reinterpret_cast<nmethod*>(0x8 * 0);
-    _nmethods[1] = reinterpret_cast<nmethod*>(0x8 * 1);
-    _nmethods[2] = reinterpret_cast<nmethod*>(0x8 * 2);
+    _nmethods[0].clear_unloading_state();
+    _nmethods[1].clear_unloading_state();
+    _nmethods[2].clear_unloading_state();
 
-    dependencies().add_dependent_nmethod(_nmethods[2]);
-    dependencies().add_dependent_nmethod(_nmethods[1]);
-    dependencies().add_dependent_nmethod(_nmethods[0]);
+    dependencies().add_dependent_nmethod(&_nmethods[2]);
+    dependencies().add_dependent_nmethod(&_nmethods[1]);
+    dependencies().add_dependent_nmethod(&_nmethods[0]);
   }
 
   ~TestDependencyContext() {
@@ -54,21 +58,10 @@
     CodeCache_lock->unlock();
   }
 
-  static bool has_stale_entries(DependencyContext ctx) {
-    return ctx.has_stale_entries();
-  }
-
-#ifndef PRODUCT
-  static bool find_stale_entries(DependencyContext ctx) {
-    return ctx.find_stale_entries();
-  }
-#endif
-
   void wipe() {
-    DependencyContext ctx(&_dependency_context);
+    DependencyContext ctx(&_dependency_context, &_last_cleanup);
     nmethodBucket* b = ctx.dependencies();
     ctx.set_dependencies(NULL);
-    ctx.set_has_stale_entries(false);
     while (b != NULL) {
       nmethodBucket* next = b->next();
       delete b;
@@ -77,33 +70,18 @@
   }
 };
 
-static void test_remove_dependent_nmethod(int id, bool delete_immediately) {
+static void test_remove_dependent_nmethod(int id) {
   TestDependencyContext c;
   DependencyContext depContext = c.dependencies();
-  NOT_PRODUCT(ASSERT_FALSE(TestDependencyContext::find_stale_entries(depContext)));
-  ASSERT_FALSE(TestDependencyContext::has_stale_entries(depContext));
-
-  nmethod* nm = c._nmethods[id];
-  depContext.remove_dependent_nmethod(nm, delete_immediately);
 
-  if (!delete_immediately) {
-    NOT_PRODUCT(ASSERT_TRUE(TestDependencyContext::find_stale_entries(depContext)));
-    ASSERT_TRUE(TestDependencyContext::has_stale_entries(depContext));
-    NOT_PRODUCT(ASSERT_TRUE(depContext.is_dependent_nmethod(nm)));
-    depContext.expunge_stale_entries();
-  }
+  nmethod* nm = &c._nmethods[id];
+  depContext.remove_dependent_nmethod(nm);
 
-  NOT_PRODUCT(ASSERT_FALSE(TestDependencyContext::find_stale_entries(depContext)));
-  ASSERT_FALSE(TestDependencyContext::has_stale_entries(depContext));
   NOT_PRODUCT(ASSERT_FALSE(depContext.is_dependent_nmethod(nm)));
 }
 
 TEST_VM(code, dependency_context) {
-  test_remove_dependent_nmethod(0, false);
-  test_remove_dependent_nmethod(1, false);
-  test_remove_dependent_nmethod(2, false);
-
-  test_remove_dependent_nmethod(0, true);
-  test_remove_dependent_nmethod(1, true);
-  test_remove_dependent_nmethod(2, true);
+  test_remove_dependent_nmethod(0);
+  test_remove_dependent_nmethod(1);
+  test_remove_dependent_nmethod(2);
 }
--- a/test/hotspot/jtreg/ProblemList.txt	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/ProblemList.txt	Tue Dec 04 13:35:04 2018 +0530
@@ -99,7 +99,7 @@
 serviceability/sa/ClhsdbField.java 8193639 solaris-all
 serviceability/sa/ClhsdbFindPC.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64
 serviceability/sa/ClhsdbFlags.java 8193639 solaris-all
-serviceability/sa/ClhsdbInspect.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64
+serviceability/sa/ClhsdbInspect.java 8193639,8211767,8213457 solaris-all,linux-ppc64le,linux-ppc64,windows-all
 serviceability/sa/ClhsdbJdis.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64
 serviceability/sa/ClhsdbJhisto.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64
 serviceability/sa/ClhsdbJstack.java 8193639,8211767 solaris-all,linux-ppc64le,linux-ppc64
--- a/test/hotspot/jtreg/applications/jcstress/JcstressRunner.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/applications/jcstress/JcstressRunner.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
  * jcstress tests wrapper
  */
 @Artifact(organization = "org.openjdk.jcstress", name = "jcstress-tests-all",
-        revision = "0.3", extension = "jar", unpack = false)
+        revision = "0.5", extension = "jar", unpack = false)
 public class JcstressRunner {
 
     public static final String MAIN_CLASS = "org.openjdk.jcstress.Main";
@@ -55,7 +55,7 @@
             throw new Error("TESTBUG: Can not resolve artifacts for "
                             + JcstressRunner.class.getName(), e);
         }
-        return artifacts.get("org.openjdk.jcstress.jcstress-tests-all-0.3")
+        return artifacts.get("org.openjdk.jcstress.jcstress-tests-all-0.5")
                         .toAbsolutePath();
     }
 
@@ -115,4 +115,3 @@
         return result;
     }
 }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/applications/jcstress/threadlocal.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+/* DO NOT MODIFY THIS FILE. GENERATED BY applications.jcstress.TestGenerator */
+
+/**
+ * @test threadlocal
+ * @library /test/lib /
+ * @run driver/timeout=21600 applications.jcstress.JcstressRunner -v -t org.openjdk.jcstress.tests.threadlocal\.
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/compiler/loopopts/LoadVectorFromStableArray.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8214344
+ * @summary LoadVector from a known element of a stable array shouldn't attempt to constant fold
+ * @modules java.base/jdk.internal.vm.annotation
+ *
+ * @run main/bootclasspath/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement LoadVectorFromStableArray
+ *
+ */
+
+import jdk.internal.vm.annotation.Stable;
+
+public class LoadVectorFromStableArray {
+    public static void main(String[] args) {
+        byte[] byte_array = new byte[100];
+        for (int i = 0; i < 20_000; i++) {
+            test_helper(0, 0);
+            test_helper(42, 0);
+            test_helper2(0, 20, byte_array, byte_array);
+        }
+        for (int i = 0; i < 20_000; i++) {
+            test(20, true);
+            test(20, false);
+        }
+    }
+
+    static @Stable byte[] stable_array1 = new byte[100];
+    static @Stable byte[] stable_array2 = new byte[100];
+
+    private static void test(int stop, boolean flag) {
+        int start = 0;
+        byte[] byte_array1 = stable_array1;
+        byte[] byte_array2 = flag ? stable_array1 : stable_array2;
+        int k = 2;
+        for (; k < 4; k *= 2);
+        int i = test_helper(k, stop);
+        // Loop in this method is unrolled and vectorized, then, upper
+        // bound is found to be constant and small. A single iteration
+        // of the main loop is executed. That iteration attempts to
+        // load a vector element from the array at a constant offset.
+        test_helper2(start, i, byte_array1, byte_array2);
+    }
+
+
+    private static void test_helper2(int start, int stop, byte[] byte_array1, byte[] byte_array2) {
+        for (int j = start; j < stop; j++) {
+            byte b = byte_array1[j+3];
+            byte_array2[j+3] = b;
+        }
+    }
+
+    private static int test_helper(int k, int stop) {
+        int i = 0;
+        if (k == 42) {
+            i = stop;
+        } else {
+            i = 5;
+        }
+        return i;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/ClassUnload/UnloadInterfaceTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test UnloadInterfaceTest
+ * @requires vm.opt.final.ClassUnloading
+ * @modules java.base/jdk.internal.misc
+ * @library /runtime/testlibrary /test/lib
+ * @compile test/Interface.java
+ * @compile test/ImplementorClass.java
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xlog:class+unload=trace UnloadInterfaceTest
+ */
+import sun.hotspot.WhiteBox;
+import test.Interface;
+import java.lang.ClassLoader;
+
+/**
+ * Test that verifies that class unloaded removes the implementor from its the interface that it implements
+ * via logging.
+ * [1.364s][info][class,unload] unloading class test.ImplementorClass 0x00000008000a2840
+ * [1.366s][trace][class,unload] unlinking class (subclass): test.ImplementorClass
+ * [1.366s][trace][class,unload] unlinking class (implementor): test.ImplementorClass
+ */
+public class UnloadInterfaceTest {
+    private static String className = "test.ImplementorClass";
+    private static String interfaceName = "test.Interface";
+
+    static class LoaderToUnload extends ClassLoader {
+       ClassLoader myParent;
+        public Class loadClass(String name) throws ClassNotFoundException {
+            if (name.contains(className)) {
+              System.out.println("className found " + className);
+              byte[] data = ClassUnloadCommon.getClassData(name);
+              return defineClass(name, data, 0, data.length);
+            } else {
+              return myParent.loadClass(name);
+            }
+        }
+        public LoaderToUnload(ClassLoader parent) {
+            super();
+            myParent = parent;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+       run();
+    }
+
+    private static void run() throws Exception {
+        final WhiteBox wb = WhiteBox.getWhiteBox();
+
+        ClassUnloadCommon.failIf(wb.isClassAlive(className), "is not expected to be alive yet");
+
+        // Load interface Class with one class loader.
+        ClassLoader icl = ClassUnloadCommon.newClassLoader();
+        Class<?> ic = icl.loadClass(interfaceName);
+
+        ClassLoader cl = new LoaderToUnload(icl);
+        Class<?> c = cl.loadClass(className);
+        Object o = c.newInstance();
+
+        ClassUnloadCommon.failIf(!wb.isClassAlive(className), "should be live here");
+        ClassUnloadCommon.failIf(!wb.isClassAlive(interfaceName), "should be live here");
+
+        cl = null; c = null; o = null;
+        ClassUnloadCommon.triggerUnloading();
+        ClassUnloadCommon.failIf(wb.isClassAlive(className), "should have been unloaded");
+        ClassUnloadCommon.failIf(!wb.isClassAlive(interfaceName), "should be live here");
+        System.out.println("We still have Interface referenced" + ic);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/ClassUnload/test/ImplementorClass.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package test;
+
+public class ImplementorClass implements Interface {
+  public void foo() { System.out.println("foo implemented!"); }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/ClassUnload/test/Interface.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+package test;
+
+public interface Interface {
+  public void foo();
+}
--- a/test/hotspot/jtreg/runtime/appcds/LotsOfClasses.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/LotsOfClasses.java	Tue Dec 04 13:35:04 2018 +0530
@@ -57,16 +57,12 @@
         opts.addSuffix("--add-modules");
         opts.addSuffix("ALL-SYSTEM");
         opts.addSuffix("-Xlog:hashtables");
-        opts.addSuffix("-Xms500m");
         opts.addSuffix("-Xmx500m");
+        opts.addSuffix("-Xlog:gc+region+cds");
+        opts.addSuffix("-Xlog:gc+region=trace");
 
         OutputAnalyzer out = CDSTestUtils.createArchive(opts);
-        try {
-            CDSTestUtils.checkDump(out);
-        } catch (java.lang.RuntimeException re) {
-            out.shouldContain(
-                "number of memory regions exceeds maximum due to fragmentation");
-        }
+        CDSTestUtils.checkDump(out);
     }
 
     static void findAllClasses(ArrayList<String> list) throws Throwable {
--- a/test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedIntegerCacheTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/ArchivedIntegerCacheTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -146,8 +146,11 @@
                 "-Xmx1g",
                 "-XX:NewSize=1g",
                 "-Xlog:cds+heap=info",
+                "-Xlog:gc+region+cds",
+                "-Xlog:gc+region=trace",
                 use_whitebox_jar);
         TestCommon.checkDump(output,
-            "Cannot archive the sub-graph referenced from [Ljava.lang.Integer; object");
+            "Cannot archive the sub-graph referenced from [Ljava.lang.Integer; object",
+            "humongous regions have been found and may lead to fragmentation");
     }
 }
--- a/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/cacheObject/DifferentHeapSizes.java	Tue Dec 04 13:35:04 2018 +0530
@@ -31,7 +31,7 @@
  * @compile ../test-classes/Hello.java
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
- * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. DifferentHeapSizes
+ * @run main/othervm/timeout=160 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. DifferentHeapSizes
  */
 
 import jdk.test.lib.process.OutputAnalyzer;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/appcds/javaldr/HumongousDuringDump.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @summary Test how CDS dumping handles the existence of humongous G1 regions.
+ * @library /test/lib /test/hotspot/jtreg/runtime/appcds /test/hotspot/jtreg/runtime/appcds/test-classes
+ * @requires vm.cds.archived.java.heap
+ * @requires vm.flavor != "minimal"
+ * @modules java.base/jdk.internal.misc
+ *          jdk.jartool/sun.tools.jar
+ *          java.management
+ * @build HumongousDuringDumpTransformer Hello
+ * @run main/othervm/timeout=240 HumongousDuringDump
+ */
+
+import jdk.test.lib.cds.CDSOptions;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class HumongousDuringDump {
+    public static String appClasses[] = {
+        "Hello",
+    };
+    public static String agentClasses[] = {
+        "HumongousDuringDumpTransformer",
+    };
+
+    public static void main(String[] args) throws Throwable {
+        String agentJar =
+            ClassFileInstaller.writeJar("HumongousDuringDumpTransformer.jar",
+                                        ClassFileInstaller.Manifest.fromSourceFile("HumongousDuringDumpTransformer.mf"),
+                                        agentClasses);
+
+        String appJar =
+            ClassFileInstaller.writeJar("HumongousDuringDumpApp.jar", appClasses);
+
+        String gcLog = Boolean.getBoolean("test.cds.verbose.gc") ?
+            "-Xlog:gc*=info,gc+region=trace,gc+alloc+region=debug" : "-showversion";
+
+        String extraArg = "-javaagent:" + agentJar;
+        String extraOption = "-XX:+AllowArchivingWithJavaAgent";
+
+        OutputAnalyzer out =
+          TestCommon.testDump(appJar, TestCommon.list("Hello"),
+                              "-XX:+UnlockDiagnosticVMOptions", extraOption,
+                              "-Xlog:gc+region+cds",
+                              "-Xlog:gc+region=trace",
+                              extraArg, "-Xmx64m", gcLog);
+        out.shouldContain("(Unmovable) humongous regions have been found and may lead to fragmentation");
+        out.shouldContain("All free regions should be at the top end of the heap, but we found holes.");
+        out.shouldMatch("gc,region,cds. HeapRegion .* HUM. hole");
+        String pattern = "gc,region,cds. HeapRegion .*hole";
+        out.shouldMatch(pattern);
+        out.shouldNotMatch(pattern + ".*unexpected");
+
+        TestCommon.run(
+                "-cp", appJar,
+                "-verbose",
+                "-Xmx64m",
+                "-XX:+PrintSharedSpaces",
+                "-XX:+UnlockDiagnosticVMOptions", extraOption,
+                gcLog,
+                "Hello")
+              .assertNormalExit();
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/appcds/javaldr/HumongousDuringDumpTransformer.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.Instrumentation;
+import java.lang.instrument.IllegalClassFormatException;
+import java.security.ProtectionDomain;
+
+// This test is sensitive to -Xmx. It must be run with -xmx64m.
+// Running with a different -Xmx requires changing the parameters and careful re-testing.
+public class HumongousDuringDumpTransformer implements ClassFileTransformer {
+    public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined,
+                            ProtectionDomain pd, byte[] buffer) throws IllegalClassFormatException {
+        if (name.equals("Hello")) {
+            try {
+                makeHumongousRegions();
+            } catch (Throwable t) {
+                array = null;
+                humon = null;
+                System.out.println("Unexpected error: " + t);
+                t.printStackTrace();
+            }
+        }
+        array = null;
+        return null;
+    }
+
+    private static Instrumentation savedInstrumentation;
+
+    public static void premain(String agentArguments, Instrumentation instrumentation) {
+        long xmx = Runtime.getRuntime().maxMemory();
+        if (xmx < 60 * 1024 * 1024 || xmx > 80 * 1024 * 1024) {
+            System.out.println("Running with incorrect heap size: " + xmx);
+            System.exit(1);
+        }
+
+        System.out.println("ClassFileTransformer.premain() is called");
+        instrumentation.addTransformer(new HumongousDuringDumpTransformer(), /*canRetransform=*/true);
+        savedInstrumentation = instrumentation;
+    }
+
+    public static Instrumentation getInstrumentation() {
+        return savedInstrumentation;
+    }
+
+    public static void agentmain(String args, Instrumentation inst) throws Exception {
+        premain(args, inst);
+    }
+
+    Object[] array;
+
+    static final int DUMMY_SIZE = 4096 - 16 - 8;
+    static final int HUMON_SIZE = 4 * 1024 * 1024 - 16 - 8;
+    static final int SKIP = 13;
+
+    byte humon[] = null;
+    boolean first = true;
+
+    public synchronized void makeHumongousRegions() {
+        if (!first) {
+            return;
+        }
+        System.out.println("===============================================================================");
+        first = false;
+
+        int total = 0;
+        array = new Object[100000];
+        System.out.println(array);
+
+        // (1) Allocate about 8MB of old objects.
+        for (int n=0, i=0; total < 8 * 1024 * 1024; n++) {
+            // Make enough allocations to cause a GC (for 64MB heap) to create
+            // old regions.
+            //
+            // But don't completely fill up the heap. That would cause OOM and
+            // may not be handled gracefully inside class transformation!
+            Object x = new byte[DUMMY_SIZE];
+            if ((n  % SKIP) == 0) {
+                array[i++] = x;
+                total += DUMMY_SIZE;
+            }
+        }
+
+        System.gc();
+
+        // (2) Now allocate a humongous array. It will sit above the 8MB of old regions.
+        humon = new byte[HUMON_SIZE];
+        array = null;
+        System.gc();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/appcds/javaldr/HumongousDuringDumpTransformer.mf	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Premain-Class: HumongousDuringDumpTransformer
+Agent-Class: HumongousDuringDumpTransformer
+Can-Retransform-Classes: true
+Can-Redefine-Classes: true
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/InvalidFileFormat.java	Tue Dec 04 13:35:04 2018 +0530
@@ -57,6 +57,7 @@
         test("OverflowPrefix.txt", "Num overflow. Corrupted at line 4");
         test("UnrecognizedPrefix.txt", "Unrecognized format. Corrupted at line 5");
         test("TruncatedString.txt", "Truncated. Corrupted at line 3");
+        test("LengthOverflow.txt", "string length too large: 2147483647");
     }
 
     private static void
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsHumongous.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @summary Use a shared string allocated in a humongous G1 region.
+ * @comment -- the following implies that G1 is used (by command-line or by default)
+ * @requires vm.cds.archived.java.heap
+ *
+ * @library /test/hotspot/jtreg/runtime/appcds /test/lib
+ * @modules jdk.jartool/sun.tools.jar
+ * @build HelloString
+ * @build sun.hotspot.WhiteBox
+ * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. SharedStringsHumongous
+ */
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import sun.hotspot.WhiteBox;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.Asserts;
+
+public class SharedStringsHumongous {
+    static String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsHumongous_gen.txt";
+
+    public static void main(String[] args) throws Exception {
+        WhiteBox wb = WhiteBox.getWhiteBox();
+
+        try (FileOutputStream fos = new FileOutputStream(sharedArchiveConfigFile)) {
+            PrintWriter out = new PrintWriter(new OutputStreamWriter(fos));
+            out.println("VERSION: 1.0");
+            out.println("@SECTION: String");
+            out.println("31: shared_test_string_unique_14325");
+            int region_size = wb.g1RegionSize();
+            char body[] = new char[region_size + region_size / 2];
+            for (int i = 0; i < body.length; i++) {
+              body[i] = 'x';
+            }
+            Asserts.assertTrue(wb.g1IsHumongous(body));
+            String prefix = "generated_string (followed by " + body.length + " 'x') ";
+
+            System.out.println("G1 region size: " + region_size);
+            System.out.println("Using a humongous string: " + prefix);
+
+            String s = prefix + new String(body);
+            out.println(s.length() + ": " + s);
+            out.close();
+        }
+
+        SharedStringsUtils.run(args, SharedStringsHumongous::test);
+    }
+
+    public static void test(String[] args) throws Exception {
+        String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
+        String appJar = JarBuilder.build("SharedStringsHumongous", "HelloString");
+
+        OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"),
+                TestCommon.concat(vmOptionsPrefix,
+                    "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
+                    "-Xlog:gc+region+cds",
+                    "-Xlog:gc+region=trace"));
+        TestCommon.checkDump(dumpOutput, "extra interned string ignored; size too large");
+        // Extra strings that are humongous are not kelp alive, so they should be GC'ed
+        // before dumping the string table. That means the heap should contain no
+        // humongous regions.
+        dumpOutput.shouldNotMatch("gc,region,cds. HeapRegion 0x[0-9a-f]* HUM");
+
+        OutputAnalyzer execOutput = TestCommon.exec(appJar,
+            TestCommon.concat(vmOptionsPrefix, "HelloString"));
+        TestCommon.checkExec(execOutput);
+    }
+}
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsStress.java	Tue Dec 04 13:35:04 2018 +0530
@@ -29,7 +29,7 @@
  * @library /test/hotspot/jtreg/runtime/appcds /test/lib
  * @modules jdk.jartool/sun.tools.jar
  * @build HelloString
- * @run driver SharedStringsStress
+ * @run driver/timeout=500 SharedStringsStress
  */
 import java.io.File;
 import java.io.FileOutputStream;
@@ -39,34 +39,56 @@
 import jdk.test.lib.process.ProcessTools;
 
 public class SharedStringsStress {
-    public static void main(String[] args) throws Exception {
-        SharedStringsUtils.run(args, SharedStringsStress::test);
-    }
+    static String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsStress_gen.txt";
 
-    public static void test(String[] args) throws Exception {
-        String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
-
-        String appJar = JarBuilder.build("SharedStringsStress", "HelloString");
-
-        String sharedArchiveConfigFile = System.getProperty("user.dir") + File.separator + "SharedStringsStress_gen.txt";
+    public static void main(String[] args) throws Exception {
         try (FileOutputStream fos = new FileOutputStream(sharedArchiveConfigFile)) {
             PrintWriter out = new PrintWriter(new OutputStreamWriter(fos));
             out.println("VERSION: 1.0");
             out.println("@SECTION: String");
             out.println("31: shared_test_string_unique_14325");
-            for (int i=0; i<100000; i++) {
+            for (int i=0; i<200000; i++) {
                 String s = "generated_string " + i;
                 out.println(s.length() + ": " + s);
             }
             out.close();
         }
 
-        OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"),
-            TestCommon.concat(vmOptionsPrefix,
-                "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile));
-        TestCommon.checkDump(dumpOutput);
-        OutputAnalyzer execOutput = TestCommon.exec(appJar,
-            TestCommon.concat(vmOptionsPrefix, "HelloString"));
-        TestCommon.checkExec(execOutput);
+        SharedStringsUtils.run(args, SharedStringsStress::test);
+    }
+
+    public static void test(String[] args) throws Exception {
+        String vmOptionsPrefix[] = SharedStringsUtils.getChildVMOptionsPrefix();
+        String appJar = JarBuilder.build("SharedStringsStress", "HelloString");
+
+        String test_cases[][] = {
+            // default heap size
+            {},
+
+            // Test for handling of heap fragmentation. With sharedArchiveConfigFile, we will dump about
+            // 18MB of shared objects on 64 bit VM (smaller on 32-bit).
+            //
+            // During dump time, an extra copy of these objects are allocated,
+            // so we need about 36MB, plus a few MB for other system data. So 64MB total heap
+            // should be enough.
+            //
+            // The VM should executed a full GC to maximize contiguous free space and
+            // avoid fragmentation.
+            {"-Xmx64m"},
+        };
+
+        for (String[] extra_opts: test_cases) {
+            vmOptionsPrefix = TestCommon.concat(vmOptionsPrefix, extra_opts);
+
+            OutputAnalyzer dumpOutput = TestCommon.dump(appJar, TestCommon.list("HelloString"),
+                TestCommon.concat(vmOptionsPrefix,
+                    "-XX:SharedArchiveConfigFile=" + sharedArchiveConfigFile,
+                    "-Xlog:gc+region+cds",
+                    "-Xlog:gc+region=trace"));
+            TestCommon.checkDump(dumpOutput);
+            OutputAnalyzer execOutput = TestCommon.exec(appJar,
+                TestCommon.concat(vmOptionsPrefix, "HelloString"));
+            TestCommon.checkExec(execOutput);
+        }
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/invalidFormat/LengthOverflow.txt	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,10 @@
+VERSION: 1.0
+@SECTION: String
+2147483647: s
+5: cp819
+31: shared_test_string_intern_12345
+7: test123
+@SECTION: Symbol
+41 -1: (Ljava/util/Set<TE;>;Ljava/lang/Object;)V
+10 -1: linkMethod
+20 -1: isAlphaNumericString
--- a/test/hotspot/jtreg/runtime/appcds/sharedStrings/invalidFormat/TruncatedString.txt	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/appcds/sharedStrings/invalidFormat/TruncatedString.txt	Tue Dec 04 13:35:04 2018 +0530
@@ -1,6 +1,6 @@
 VERSION: 1.0
 @SECTION: String
-2147483647: s
+40000: s
 5: cp819
 31: shared_test_string_intern_12345
 7: test123
--- a/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/runtime/testlibrary/ClassUnloadCommon.java	Tue Dec 04 13:35:04 2018 +0530
@@ -27,7 +27,10 @@
  * for an example.
  */
 
+
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
@@ -104,4 +107,22 @@
             throw new RuntimeException(e);
         }
     }
+
+    // Get data for pre-compiled class file to load.
+    public static byte[] getClassData(String name) {
+        try {
+           String TempName = name.replaceAll("\\.", "/");
+           String currentDir = System.getProperty("test.classes");
+           String filename = currentDir + File.separator + TempName + ".class";
+           System.out.println("filename is " + filename);
+           FileInputStream fis = new FileInputStream(filename);
+           byte[] b = new byte[5000];
+           int cnt = fis.read(b, 0, 5000);
+           byte[] c = new byte[cnt];
+           for (int i=0; i<cnt; i++) c[i] = b[i];
+              return c;
+        } catch (IOException e) {
+           return null;
+        }
+    }
 }
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbJhisto.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbJhisto.java	Tue Dec 04 13:35:04 2018 +0530
@@ -34,6 +34,7 @@
  * @bug 8191658
  * @summary Test clhsdb jhisto command
  * @requires vm.hasSA
+ * @requires vm.gc != "Z"
  * @library /test/lib
  * @run main/othervm ClhsdbJhisto
  */
--- a/test/hotspot/jtreg/serviceability/sa/TestHeapDumpForInvokeDynamic.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/serviceability/sa/TestHeapDumpForInvokeDynamic.java	Tue Dec 04 13:35:04 2018 +0530
@@ -50,6 +50,7 @@
  * @test
  * @library /test/lib
  * @requires vm.hasSAandCanAttach & os.family != "mac"
+ * @requires vm.gc != "Z"
  * @modules java.base/jdk.internal.misc
  *          jdk.hotspot.agent/sun.jvm.hotspot
  *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
--- a/test/hotspot/jtreg/serviceability/sa/TestHeapDumpForLargeArray.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/serviceability/sa/TestHeapDumpForLargeArray.java	Tue Dec 04 13:35:04 2018 +0530
@@ -47,6 +47,7 @@
  * @library /test/lib
  * @bug 8171084
  * @requires vm.hasSAandCanAttach & (vm.bits == "64" & os.maxMemory > 8g)
+ * @requires vm.gc != "Z"
  * @modules java.base/jdk.internal.misc
  *          jdk.hotspot.agent/sun.jvm.hotspot
  *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
--- a/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/serviceability/sa/TestJmapCore.java	Tue Dec 04 13:35:04 2018 +0530
@@ -37,6 +37,7 @@
 import jdk.test.lib.hprof.HprofParser;
 import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Utils;
 import jtreg.SkippedException;
 
 import java.io.File;
@@ -134,10 +135,24 @@
         System.out.println(out.getStdout());
         System.err.println(out.getStderr());
 
-        Asserts.assertTrue(dumpFile.exists() && dumpFile.isFile(),
-                "Could not find dump file " + dumpFile.getAbsolutePath());
+        if (dumpFile.exists() && dumpFile.isFile()) {
+            HprofParser.parse(dumpFile);
+        } else {
+            boolean ZGCUsed = false;
 
-        HprofParser.parse(dumpFile);
+            for (String opt: Utils.getFilteredTestJavaOpts()) {
+                if (opt.contains("+UseZGC")) {
+                    ZGCUsed = true;
+                    break;
+                }
+            }
+
+            if (!ZGCUsed) {
+                throw new RuntimeException(
+                    "Could not find dump file " + dumpFile.getAbsolutePath());
+            }
+        }
+
         System.out.println("PASSED");
     }
 }
--- a/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/metaspace/stressDictionary/StressDictionary.java	Tue Dec 04 13:35:04 2018 +0530
@@ -29,7 +29,7 @@
  *
  * @library /vmTestbase /test/lib
  * @run driver jdk.test.lib.FileInstaller . .
- * @run main/othervm/timeout=420 -XX:+IgnoreUnrecognizedVMOptions -XX:-CMSPrecleaningEnabled metaspace.stressDictionary.StressDictionary -stressTime 30
+ * @run main/othervm/timeout=420 metaspace.stressDictionary.StressDictionary -stressTime 30
  */
 
 package metaspace.stressDictionary;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002/attach002Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -52,7 +52,7 @@
 static jvmtiEvent testEvents[] = {
         JVMTI_EVENT_CLASS_LOAD,
         JVMTI_EVENT_CLASS_PREPARE,
-        JVMTI_EVENT_CLASS_FILE_LOAD_HOOK};
+        JVMTI_EVENT_CLASS_FILE_LOAD_HOOK };
 
 static const int testEventsNumber = 3;
 
@@ -70,7 +70,7 @@
 int registerNativeMethods(JNIEnv* jni) {
     jclass appClass;
     JNINativeMethod nativeMethods[] = {
-            {(char*) "agentGotCapabilities", (char*) "()Z", (void*) Java_nsk_jvmti_AttachOnDemand_attach002_attach002Target_agentGotCapabilities}};
+            { (char*) "agentGotCapabilities", (char*) "()Z", (void*) Java_nsk_jvmti_AttachOnDemand_attach002_attach002Target_agentGotCapabilities } };
     jint nativeMethodsNumber = 1;
 
     appClass = jni->FindClass(ATTACH002_TARGET_APP_CLASS_NAME);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/attach002aAgent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -43,7 +43,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_VM_OBJECT_ALLOC};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_VM_OBJECT_ALLOC };
 
 static const int testEventsNumber = 1;
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach008/attach008Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,7 +41,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_MONITOR_CONTENDED_ENTER, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_MONITOR_CONTENDED_ENTER, JVMTI_EVENT_MONITOR_CONTENDED_ENTERED };
 static const int testEventsNumber = 2;
 
 static volatile int monitorEnter = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach020/attach020Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -44,7 +44,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_GARBAGE_COLLECTION_START, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_GARBAGE_COLLECTION_START, JVMTI_EVENT_GARBAGE_COLLECTION_FINISH };
 static const int testEventsNumber = 2;
 
 static jrawMonitorID gcFinishMonitor;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach021/attach021Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -90,8 +90,8 @@
 int registerNativeMethods(JNIEnv* jni) {
     jclass appClass;
     JNINativeMethod nativeMethods[] = {
-            {(char*) "setTagFor", (char*) "(Ljava/lang/Object;)Z", (void*) Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_setTagFor},
-            {(char*) "shutdownAgent", (char*) "()V", (void*) Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_shutdownAgent}};
+            { (char*) "setTagFor", (char*) "(Ljava/lang/Object;)Z", (void*) Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_setTagFor },
+            { (char*) "shutdownAgent", (char*) "()V", (void*) Java_nsk_jvmti_AttachOnDemand_attach021_attach021Target_shutdownAgent } };
     jint nativeMethodsNumber = 2;
 
     appClass = jni->FindClass(ATTACH021_TARGET_APP_CLASS_NAME);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach022/attach022Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -36,7 +36,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_OBJECT_FREE, JVMTI_EVENT_VM_OBJECT_ALLOC};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_OBJECT_FREE, JVMTI_EVENT_VM_OBJECT_ALLOC };
 static const int testEventsNumber = 2;
 
 static volatile int taggedObjectsCounter = 0;
@@ -100,8 +100,8 @@
 int registerNativeMethods(JNIEnv* jni) {
     jclass appClass;
     JNINativeMethod nativeMethods[] = {
-            {(char*)"shutdownAgent", (char*)"(I)Z",
-            (void*) Java_nsk_jvmti_AttachOnDemand_attach022_attach022Target_shutdownAgent}};
+            { (char*)"shutdownAgent", (char*)"(I)Z",
+              (void*) Java_nsk_jvmti_AttachOnDemand_attach022_attach022Target_shutdownAgent } };
     jint nativeMethodsNumber = 1;
 
     appClass = jni->FindClass(ATTACH022_TARGET_APP_CLASS_NAME);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach037/attach037Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,7 +41,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_MONITOR_WAIT, JVMTI_EVENT_MONITOR_WAITED};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_MONITOR_WAIT, JVMTI_EVENT_MONITOR_WAITED };
 static const int testEventsNumber = 2;
 
 volatile int monitorWaitReceived = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach038/attach038Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,7 +41,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END };
 static const int testEventsNumber = 2;
 
 static volatile int threadStartReceived = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach039/attach039Agent00.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -43,7 +43,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END };
 static const int testEventsNumber = 2;
 
 volatile int threadStartReceived = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent02.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,7 +41,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_THREAD_START, JVMTI_EVENT_THREAD_END };
 static const int testEventsNumber = 2;
 
 static jrawMonitorID eventsCounterMonitor;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach045/attach045Agent03.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -40,7 +40,7 @@
 static Options* options = NULL;
 static const char* agentName;
 
-static jvmtiEvent testEvents[] = {JVMTI_EVENT_VM_OBJECT_ALLOC};
+static jvmtiEvent testEvents[] = { JVMTI_EVENT_VM_OBJECT_ALLOC };
 static const int testEventsNumber = 1;
 
 static jrawMonitorID eventsCounterMonitor;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/breakpoint001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -38,8 +38,8 @@
 
 #define METH_NUM 2
 static const char *METHODS[][2] = {
-    {"bpMethod", "()V"},
-    {"bpMethod2", "()I"}
+    { "bpMethod", "()V" },
+    { "bpMethod2", "()I" }
 };
 
 static const char *CLASS_SIG =
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClassPrepare/classprep001/classprep001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -59,8 +59,8 @@
 static size_t eventsCount = 0;
 static size_t eventsExpected = 0;
 static class_info classes[] = {
-    {"Lnsk/jvmti/ClassPrepare/classprep001$TestInterface;", EXP_STATUS, 2, 1, 0},
-    {"Lnsk/jvmti/ClassPrepare/classprep001$TestClass;", EXP_STATUS, 3, 2, 1}
+    { "Lnsk/jvmti/ClassPrepare/classprep001$TestInterface;", EXP_STATUS, 2, 1, 0 },
+    { "Lnsk/jvmti/ClassPrepare/classprep001$TestClass;", EXP_STATUS, 3, 2, 1 }
 };
 
 void printStatus(jint status) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldAccessWatch/clrfldw001/clrfldw001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldAccessWatch/clrfldw001/clrfldw001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -47,12 +47,12 @@
 static jint result = PASSED;
 static jfieldID thrown_fid = NULL;
 static field fields[] = {
-    {"nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld0", "I", 0, NULL},
-    {"nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld1", "I", 1, NULL},
-    {"nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld2",
-        "Lnsk/jvmti/ClearFieldAccessWatch/clrfldw001a;", 0, NULL},
-    {"nsk/jvmti/ClearFieldAccessWatch/clrfldw001a", "fld3", "[I", 0, NULL},
-    {"nsk/jvmti/ClearFieldAccessWatch/clrfldw001b", "fld4", "F", 0, NULL},
+    { "nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld0", "I", 0, NULL },
+    { "nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld1", "I", 1, NULL },
+    { "nsk/jvmti/ClearFieldAccessWatch/clrfldw001", "fld2",
+      "Lnsk/jvmti/ClearFieldAccessWatch/clrfldw001a;", 0, NULL },
+    { "nsk/jvmti/ClearFieldAccessWatch/clrfldw001a", "fld3", "[I", 0, NULL },
+    { "nsk/jvmti/ClearFieldAccessWatch/clrfldw001b", "fld4", "F", 0, NULL },
 };
 
 void switchWatch(JNIEnv *env, jint ind, jboolean on) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldModificationWatch/clrfmodw001/clrfmodw001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ClearFieldModificationWatch/clrfmodw001/clrfmodw001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -47,12 +47,12 @@
 static jint result = PASSED;
 static jfieldID thrown_fid = NULL;
 static field fields[] = {
-    {"nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld0", "I", 0, NULL},
-    {"nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld1", "I", 1, NULL},
-    {"nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld2",
-        "Lnsk/jvmti/ClearFieldModificationWatch/clrfmodw001a;", 0, NULL},
-    {"nsk/jvmti/ClearFieldModificationWatch/clrfmodw001a", "fld3", "[I", 0, NULL},
-    {"nsk/jvmti/ClearFieldModificationWatch/clrfmodw001b", "fld4", "F", 0, NULL},
+    { "nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld0", "I", 0, NULL },
+    { "nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld1", "I", 1, NULL },
+    { "nsk/jvmti/ClearFieldModificationWatch/clrfmodw001", "fld2",
+      "Lnsk/jvmti/ClearFieldModificationWatch/clrfmodw001a;", 0, NULL },
+    { "nsk/jvmti/ClearFieldModificationWatch/clrfmodw001a", "fld3", "[I", 0, NULL },
+    { "nsk/jvmti/ClearFieldModificationWatch/clrfmodw001b", "fld4", "F", 0, NULL },
 };
 
 void switchWatch(JNIEnv *env, jint ind, jboolean on) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001/exception001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Exception/exception001/exception001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -63,15 +63,15 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static exceptionInfo exs[] = {
-  {"Lnsk/jvmti/Exception/exception001c;",
-   "Lnsk/jvmti/Exception/exception001b;", "meth1", "()V", 7,
-   "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 14},
-  {"Ljava/lang/ArithmeticException;",
-   "Lnsk/jvmti/Exception/exception001b;", "meth2", "(I)I", 3,
-   "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 24},
-  {"Ljava/lang/ArrayIndexOutOfBoundsException;",
-   "Lnsk/jvmti/Exception/exception001b;", "meth3", "(I)I", 10,
-   "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 34}
+  { "Lnsk/jvmti/Exception/exception001c;",
+    "Lnsk/jvmti/Exception/exception001b;", "meth1", "()V", 7,
+    "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 14 },
+  { "Ljava/lang/ArithmeticException;",
+    "Lnsk/jvmti/Exception/exception001b;", "meth2", "(I)I", 3,
+    "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 24 },
+  { "Ljava/lang/ArrayIndexOutOfBoundsException;",
+    "Lnsk/jvmti/Exception/exception001b;", "meth3", "(I)I", 10,
+    "Lnsk/jvmti/Exception/exception001a;", "run", "()V", 34 }
 };
 static int eventsCount = 0;
 static int eventsExpected = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ExceptionCatch/excatch001/excatch001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ExceptionCatch/excatch001/excatch001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -55,12 +55,12 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static exceptionInfo exs[] = {
-  {"Lnsk/jvmti/ExceptionCatch/excatch001c;",
-   "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 14},
-  {"Ljava/lang/ArithmeticException;",
-   "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 24},
-  {"Ljava/lang/ArrayIndexOutOfBoundsException;",
-   "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 34}
+  { "Lnsk/jvmti/ExceptionCatch/excatch001c;",
+    "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 14 },
+  { "Ljava/lang/ArithmeticException;",
+    "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 24 },
+  { "Ljava/lang/ArrayIndexOutOfBoundsException;",
+    "Lnsk/jvmti/ExceptionCatch/excatch001a;", "run", "()V", 34 }
 };
 static int eventsCount = 0;
 static int eventsExpected = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/FramePop/framepop001/framepop001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/FramePop/framepop001/framepop001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -49,8 +49,8 @@
 static size_t eventsExpected = 0;
 static size_t eventsCount = 0;
 static pop_info pops[] = {
-    {"Lnsk/jvmti/FramePop/framepop001;", "chain", "()V", 0},
-    {"Lnsk/jvmti/FramePop/framepop001a;", "dummy", "()V", 3},
+    { "Lnsk/jvmti/FramePop/framepop001;", "chain", "()V", 0 },
+    { "Lnsk/jvmti/FramePop/framepop001a;", "dummy", "()V", 3 },
 };
 
 void JNICALL Breakpoint(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAllThreads/allthr001/allthr001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetAllThreads/allthr001/allthr001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,11 +46,11 @@
 static jint result = PASSED;
 static jvmtiThreadInfo inf;
 static int sys_cnt;
-static const char *names0[] = {"main"};
-static const char *names1[] = {"main", "thread1"};
-static const char *names2[] = {"main", "Thread-"};
+static const char *names0[] = { "main" };
+static const char *names1[] = { "main", "thread1" };
+static const char *names2[] = { "main", "Thread-" };
 static info thrInfo[] = {
-    {1, names0}, {1, names0}, {2, names1}, {1, names0}, {2, names2}
+    { 1, names0 }, { 1, names0 }, { 2, names1 }, { 1, names0 }, { 2, names2 }
 };
 
 jthread jthr(JNIEnv *env) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetBytecodes/bytecodes001/bytecodes001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetBytecodes/bytecodes001/bytecodes001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,13 +46,13 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 
-static unsigned char m0[] = {0x2A, 0xB7, 0x00, 0x01, 0xB1};
-static unsigned char m1[] = {0xB1};
-static unsigned char m2[] = {0x1A, 0xBC, 0x06, 0x4C, 0x2B, 0xB0};
+static unsigned char m0[] = { 0x2A, 0xB7, 0x00, 0x01, 0xB1 };
+static unsigned char m1[] = { 0xB1 };
+static unsigned char m2[] = { 0x1A, 0xBC, 0x06, 0x4C, 0x2B, 0xB0 };
 static info meth_tab[3] = {
-    {"<init>", "()V",   JNI_FALSE, 5, m0},
-    {"meth1",  "()V",   JNI_FALSE, 1, m1},
-    {"meth2",  "(I)[F", JNI_TRUE,  6, m2}
+    { "<init>", "()V",   JNI_FALSE, 5, m0 },
+    { "meth1",  "()V",   JNI_FALSE, 1, m1 },
+    { "meth2",  "(I)[F", JNI_TRUE,  6, m2 }
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetBytecodes/bytecodes003/bytecodes003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetBytecodes/bytecodes003/bytecodes003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -53,211 +53,211 @@
 static jboolean printdump = JNI_FALSE;
 static int eventsCount = 0;
 static opcode_info opcodes[] = {
-    {"nop", 0, 1},
-    {"aconst_null", 1, 1},
-    {"iconst_m1", 2, 1},
-    {"iconst_0", 3, 1},
-    {"iconst_1", 4, 1},
-    {"iconst_2", 5, 1},
-    {"iconst_3", 6, 1},
-    {"iconst_4", 7, 1},
-    {"iconst_5", 8, 1},
-    {"lconst_0", 9, 1},
-    {"lconst_1", 10, 1},
-    {"fconst_0", 11, 1},
-    {"fconst_1", 12, 1},
-    {"fconst_2", 13, 1},
-    {"dconst_0", 14, 1},
-    {"dconst_1", 15, 1},
-    {"bipush", 16, 2},
-    {"sipush", 17, 3},
-    {"ldc", 18, 2},
-    {"ldc_w", 19, 3},
-    {"ldc2_w", 20, 3},
-    {"iload", 21, 2},
-    {"lload", 22, 2},
-    {"fload", 23, 2},
-    {"dload", 24, 2},
-    {"aload", 25, 2},
-    {"iload_0", 26, 1},
-    {"iload_1", 27, 1},
-    {"iload_2", 28, 1},
-    {"iload_3", 29, 1},
-    {"lload_0", 30, 1},
-    {"lload_1", 31, 1},
-    {"lload_2", 32, 1},
-    {"lload_3", 33, 1},
-    {"fload_0", 34, 1},
-    {"fload_1", 35, 1},
-    {"fload_2", 36, 1},
-    {"fload_3", 37, 1},
-    {"dload_0", 38, 1},
-    {"dload_1", 39, 1},
-    {"dload_2", 40, 1},
-    {"dload_3", 41, 1},
-    {"aload_0", 42, 1},
-    {"aload_1", 43, 1},
-    {"aload_2", 44, 1},
-    {"aload_3", 45, 1},
-    {"iaload", 46, 1},
-    {"laload", 47, 1},
-    {"faload", 48, 1},
-    {"daload", 49, 1},
-    {"aaload", 50, 1},
-    {"baload", 51, 1},
-    {"caload", 52, 1},
-    {"saload", 53, 1},
-    {"istore", 54, 2},
-    {"lstore", 55, 2},
-    {"fstore", 56, 2},
-    {"dstore", 57, 2},
-    {"astore", 58, 2},
-    {"istore_0", 59, 1},
-    {"istore_1", 60, 1},
-    {"istore_2", 61, 1},
-    {"istore_3", 62, 1},
-    {"lstore_0", 63, 1},
-    {"lstore_1", 64, 1},
-    {"lstore_2", 65, 1},
-    {"lstore_3", 66, 1},
-    {"fstore_0", 67, 1},
-    {"fstore_1", 68, 1},
-    {"fstore_2", 69, 1},
-    {"fstore_3", 70, 1},
-    {"dstore_0", 71, 1},
-    {"dstore_1", 72, 1},
-    {"dstore_2", 73, 1},
-    {"dstore_3", 74, 1},
-    {"astore_0", 75, 1},
-    {"astore_1", 76, 1},
-    {"astore_2", 77, 1},
-    {"astore_3", 78, 1},
-    {"iastore", 79, 1},
-    {"lastore", 80, 1},
-    {"fastore", 81, 1},
-    {"dastore", 82, 1},
-    {"aastore", 83, 1},
-    {"bastore", 84, 1},
-    {"castore", 85, 1},
-    {"sastore", 86, 1},
-    {"pop", 87, 1},
-    {"pop2", 88, 1},
-    {"dup", 89, 1},
-    {"dup_x1", 90, 1},
-    {"dup_x2", 91, 1},
-    {"dup2", 92, 1},
-    {"dup2_x1", 93, 1},
-    {"dup2_x2", 94, 1},
-    {"swap", 95, 1},
-    {"iadd", 96, 1},
-    {"ladd", 97, 1},
-    {"fadd", 98, 1},
-    {"dadd", 99, 1},
-    {"isub", 100, 1},
-    {"lsub", 101, 1},
-    {"fsub", 102, 1},
-    {"dsub", 103, 1},
-    {"imul", 104, 1},
-    {"lmul", 105, 1},
-    {"fmul", 106, 1},
-    {"dmul", 107, 1},
-    {"idiv", 108, 1},
-    {"ldiv", 109, 1},
-    {"fdiv", 110, 1},
-    {"ddiv", 111, 1},
-    {"irem", 112, 1},
-    {"lrem", 113, 1},
-    {"frem", 114, 1},
-    {"drem", 115, 1},
-    {"ineg", 116, 1},
-    {"lneg", 117, 1},
-    {"fneg", 118, 1},
-    {"dneg", 119, 1},
-    {"ishl", 120, 1},
-    {"lshl", 121, 1},
-    {"ishr", 122, 1},
-    {"lshr", 123, 1},
-    {"iushr", 124, 1},
-    {"lushr", 125, 1},
-    {"iand", 126, 1},
-    {"land", 127, 1},
-    {"ior", 128, 1},
-    {"lor", 129, 1},
-    {"ixor", 130, 1},
-    {"lxor", 131, 1},
-    {"iinc", 132, 3},
-    {"i2l", 133, 1},
-    {"i2f", 134, 1},
-    {"i2d", 135, 1},
-    {"l2i", 136, 1},
-    {"l2f", 137, 1},
-    {"l2d", 138, 1},
-    {"f2i", 139, 1},
-    {"f2l", 140, 1},
-    {"f2d", 141, 1},
-    {"d2i", 142, 1},
-    {"d2l", 143, 1},
-    {"d2f", 144, 1},
-    {"i2b", 145, 1},
-    {"i2c", 146, 1},
-    {"i2s", 147, 1},
-    {"lcmp", 148, 1},
-    {"fcmpl", 149, 1},
-    {"fcmpg", 150, 1},
-    {"dcmpl", 151, 1},
-    {"dcmpg", 152, 1},
-    {"ifeq", 153, 3},
-    {"ifne", 154, 3},
-    {"iflt", 155, 3},
-    {"ifge", 156, 3},
-    {"ifgt", 157, 3},
-    {"ifle", 158, 3},
-    {"if_icmpeq", 159, 3},
-    {"if_icmpne", 160, 3},
-    {"if_icmplt", 161, 3},
-    {"if_icmpge", 162, 3},
-    {"if_icmpgt", 163, 3},
-    {"if_icmple", 164, 3},
-    {"if_acmpeq", 165, 3},
-    {"if_acmpne", 166, 3},
-    {"goto", 167, 3},
-    {"jsr", 168, 3},
-    {"ret", 169, 2},
-    {"tableswitch", 170, 0},
-    {"lookupswitch", 171, 0},
-    {"ireturn", 172, 1},
-    {"lreturn", 173, 1},
-    {"freturn", 174, 1},
-    {"dreturn", 175, 1},
-    {"areturn", 176, 1},
-    {"return", 177, 1},
-    {"getstatic", 178, 3},
-    {"putstatic", 179, 3},
-    {"getfield", 180, 3},
-    {"putfield", 181, 3},
-    {"invokevirtual", 182, 3},
-    {"invokespecial", 183, 3},
-    {"invokestatic", 184, 3},
-    {"invokeinterface", 185, 5},
-    {"invokedynamic", 186, 5},
-    {"new", 187, 3},
-    {"newarray", 188, 2},
-    {"anewarray", 189, 3},
-    {"arraylength", 190, 1},
-    {"athrow", 191, 1},
-    {"checkcast", 192, 3},
-    {"instanceof", 193, 3},
-    {"monitorenter", 194, 1},
-    {"monitorexit", 195, 1},
-    {"wide", 196, 0},
-    {"multianewarray", 197, 4},
-    {"ifnull", 198, 3},
-    {"ifnonnull", 199, 3},
-    {"goto_w", 200, 5},
-    {"jsr_w", 201, 5},
-    {"breakpoint", 202, 1},
-    {"impdep1", 254, 1},
-    {"impdep2", 255, 1}
+    { "nop", 0, 1 },
+    { "aconst_null", 1, 1 },
+    { "iconst_m1", 2, 1 },
+    { "iconst_0", 3, 1 },
+    { "iconst_1", 4, 1 },
+    { "iconst_2", 5, 1 },
+    { "iconst_3", 6, 1 },
+    { "iconst_4", 7, 1 },
+    { "iconst_5", 8, 1 },
+    { "lconst_0", 9, 1 },
+    { "lconst_1", 10, 1 },
+    { "fconst_0", 11, 1 },
+    { "fconst_1", 12, 1 },
+    { "fconst_2", 13, 1 },
+    { "dconst_0", 14, 1 },
+    { "dconst_1", 15, 1 },
+    { "bipush", 16, 2 },
+    { "sipush", 17, 3 },
+    { "ldc", 18, 2 },
+    { "ldc_w", 19, 3 },
+    { "ldc2_w", 20, 3 },
+    { "iload", 21, 2 },
+    { "lload", 22, 2 },
+    { "fload", 23, 2 },
+    { "dload", 24, 2 },
+    { "aload", 25, 2 },
+    { "iload_0", 26, 1 },
+    { "iload_1", 27, 1 },
+    { "iload_2", 28, 1 },
+    { "iload_3", 29, 1 },
+    { "lload_0", 30, 1 },
+    { "lload_1", 31, 1 },
+    { "lload_2", 32, 1 },
+    { "lload_3", 33, 1 },
+    { "fload_0", 34, 1 },
+    { "fload_1", 35, 1 },
+    { "fload_2", 36, 1 },
+    { "fload_3", 37, 1 },
+    { "dload_0", 38, 1 },
+    { "dload_1", 39, 1 },
+    { "dload_2", 40, 1 },
+    { "dload_3", 41, 1 },
+    { "aload_0", 42, 1 },
+    { "aload_1", 43, 1 },
+    { "aload_2", 44, 1 },
+    { "aload_3", 45, 1 },
+    { "iaload", 46, 1 },
+    { "laload", 47, 1 },
+    { "faload", 48, 1 },
+    { "daload", 49, 1 },
+    { "aaload", 50, 1 },
+    { "baload", 51, 1 },
+    { "caload", 52, 1 },
+    { "saload", 53, 1 },
+    { "istore", 54, 2 },
+    { "lstore", 55, 2 },
+    { "fstore", 56, 2 },
+    { "dstore", 57, 2 },
+    { "astore", 58, 2 },
+    { "istore_0", 59, 1 },
+    { "istore_1", 60, 1 },
+    { "istore_2", 61, 1 },
+    { "istore_3", 62, 1 },
+    { "lstore_0", 63, 1 },
+    { "lstore_1", 64, 1 },
+    { "lstore_2", 65, 1 },
+    { "lstore_3", 66, 1 },
+    { "fstore_0", 67, 1 },
+    { "fstore_1", 68, 1 },
+    { "fstore_2", 69, 1 },
+    { "fstore_3", 70, 1 },
+    { "dstore_0", 71, 1 },
+    { "dstore_1", 72, 1 },
+    { "dstore_2", 73, 1 },
+    { "dstore_3", 74, 1 },
+    { "astore_0", 75, 1 },
+    { "astore_1", 76, 1 },
+    { "astore_2", 77, 1 },
+    { "astore_3", 78, 1 },
+    { "iastore", 79, 1 },
+    { "lastore", 80, 1 },
+    { "fastore", 81, 1 },
+    { "dastore", 82, 1 },
+    { "aastore", 83, 1 },
+    { "bastore", 84, 1 },
+    { "castore", 85, 1 },
+    { "sastore", 86, 1 },
+    { "pop", 87, 1 },
+    { "pop2", 88, 1 },
+    { "dup", 89, 1 },
+    { "dup_x1", 90, 1 },
+    { "dup_x2", 91, 1 },
+    { "dup2", 92, 1 },
+    { "dup2_x1", 93, 1 },
+    { "dup2_x2", 94, 1 },
+    { "swap", 95, 1 },
+    { "iadd", 96, 1 },
+    { "ladd", 97, 1 },
+    { "fadd", 98, 1 },
+    { "dadd", 99, 1 },
+    { "isub", 100, 1 },
+    { "lsub", 101, 1 },
+    { "fsub", 102, 1 },
+    { "dsub", 103, 1 },
+    { "imul", 104, 1 },
+    { "lmul", 105, 1 },
+    { "fmul", 106, 1 },
+    { "dmul", 107, 1 },
+    { "idiv", 108, 1 },
+    { "ldiv", 109, 1 },
+    { "fdiv", 110, 1 },
+    { "ddiv", 111, 1 },
+    { "irem", 112, 1 },
+    { "lrem", 113, 1 },
+    { "frem", 114, 1 },
+    { "drem", 115, 1 },
+    { "ineg", 116, 1 },
+    { "lneg", 117, 1 },
+    { "fneg", 118, 1 },
+    { "dneg", 119, 1 },
+    { "ishl", 120, 1 },
+    { "lshl", 121, 1 },
+    { "ishr", 122, 1 },
+    { "lshr", 123, 1 },
+    { "iushr", 124, 1 },
+    { "lushr", 125, 1 },
+    { "iand", 126, 1 },
+    { "land", 127, 1 },
+    { "ior", 128, 1 },
+    { "lor", 129, 1 },
+    { "ixor", 130, 1 },
+    { "lxor", 131, 1 },
+    { "iinc", 132, 3 },
+    { "i2l", 133, 1 },
+    { "i2f", 134, 1 },
+    { "i2d", 135, 1 },
+    { "l2i", 136, 1 },
+    { "l2f", 137, 1 },
+    { "l2d", 138, 1 },
+    { "f2i", 139, 1 },
+    { "f2l", 140, 1 },
+    { "f2d", 141, 1 },
+    { "d2i", 142, 1 },
+    { "d2l", 143, 1 },
+    { "d2f", 144, 1 },
+    { "i2b", 145, 1 },
+    { "i2c", 146, 1 },
+    { "i2s", 147, 1 },
+    { "lcmp", 148, 1 },
+    { "fcmpl", 149, 1 },
+    { "fcmpg", 150, 1 },
+    { "dcmpl", 151, 1 },
+    { "dcmpg", 152, 1 },
+    { "ifeq", 153, 3 },
+    { "ifne", 154, 3 },
+    { "iflt", 155, 3 },
+    { "ifge", 156, 3 },
+    { "ifgt", 157, 3 },
+    { "ifle", 158, 3 },
+    { "if_icmpeq", 159, 3 },
+    { "if_icmpne", 160, 3 },
+    { "if_icmplt", 161, 3 },
+    { "if_icmpge", 162, 3 },
+    { "if_icmpgt", 163, 3 },
+    { "if_icmple", 164, 3 },
+    { "if_acmpeq", 165, 3 },
+    { "if_acmpne", 166, 3 },
+    { "goto", 167, 3 },
+    { "jsr", 168, 3 },
+    { "ret", 169, 2 },
+    { "tableswitch", 170, 0 },
+    { "lookupswitch", 171, 0 },
+    { "ireturn", 172, 1 },
+    { "lreturn", 173, 1 },
+    { "freturn", 174, 1 },
+    { "dreturn", 175, 1 },
+    { "areturn", 176, 1 },
+    { "return", 177, 1 },
+    { "getstatic", 178, 3 },
+    { "putstatic", 179, 3 },
+    { "getfield", 180, 3 },
+    { "putfield", 181, 3 },
+    { "invokevirtual", 182, 3 },
+    { "invokespecial", 183, 3 },
+    { "invokestatic", 184, 3 },
+    { "invokeinterface", 185, 5 },
+    { "invokedynamic", 186, 5 },
+    { "new", 187, 3 },
+    { "newarray", 188, 2 },
+    { "anewarray", 189, 3 },
+    { "arraylength", 190, 1 },
+    { "athrow", 191, 1 },
+    { "checkcast", 192, 3 },
+    { "instanceof", 193, 3 },
+    { "monitorenter", 194, 1 },
+    { "monitorexit", 195, 1 },
+    { "wide", 196, 0 },
+    { "multianewarray", 197, 4 },
+    { "ifnull", 198, 3 },
+    { "ifnonnull", 199, 3 },
+    { "goto_w", 200, 5 },
+    { "jsr_w", 201, 5 },
+    { "breakpoint", 202, 1 },
+    { "impdep1", 254, 1 },
+    { "impdep2", 255, 1 }
 };
 
 jint get_u4(unsigned char *p) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007/getclfld007.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassFields/getclfld007/getclfld007.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -49,52 +49,52 @@
 static jboolean printdump = JNI_FALSE;
 
 static fld_info f0[] = {
-    {"fld_1", "Ljava/lang/String;"}
+    { "fld_1", "Ljava/lang/String;" }
 };
 
 static fld_info f1[] = {
-    {"fld_n1", "I"}
+    { "fld_n1", "I" }
 };
 
 static fld_info f2[] = {
-    {"fld_n2", "I"}
+    { "fld_n2", "I" }
 };
 
 static fld_info f4[] = {
-    {"fld_o2", "I"}
+    { "fld_o2", "I" }
 };
 
 static fld_info f5[] = {
-    {"fld_o3", "I"}
+    { "fld_o3", "I" }
 };
 
 static fld_info f6[] = {
-    {"fld_i1", "I"}
+    { "fld_i1", "I" }
 };
 
 static fld_info f7[] = {
-    {"fld_i2", "I"}
+    { "fld_i2", "I" }
 };
 
 static fld_info f8[] = {
-    {"fld_i2", "I"}
+    { "fld_i2", "I" }
 };
 
 static fld_info f9[] = {
-    {"fld_i1", "I"}
+    { "fld_i1", "I" }
 };
 
 static class_info classes[] = {
-    {"InnerClass1", 1, f0},
-    {"InnerInterface", 1, f1},
-    {"InnerClass2", 1, f2},
-    {"OuterClass1", 0, NULL},
-    {"OuterClass2", 1, f4},
-    {"OuterClass3", 1, f5},
-    {"OuterInterface1", 1, f6},
-    {"OuterInterface2", 1, f7},
-    {"OuterClass4", 1, f8},
-    {"OuterClass5", 1, f9}
+    { "InnerClass1", 1, f0 },
+    { "InnerInterface", 1, f1 },
+    { "InnerClass2", 1, f2 },
+    { "OuterClass1", 0, NULL },
+    { "OuterClass2", 1, f4 },
+    { "OuterClass3", 1, f5 },
+    { "OuterInterface1", 1, f6 },
+    { "OuterInterface2", 1, f7 },
+    { "OuterClass4", 1, f8 },
+    { "OuterClass5", 1, f9 }
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007/getclmthd007.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassMethods/getclmthd007/getclmthd007.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -49,64 +49,64 @@
 static jboolean printdump = JNI_FALSE;
 
 static meth_info m0[] = {
-    {"<init>", "(Lnsk/jvmti/GetClassMethods/getclmthd007;)V"},
-    {"meth_1", "(Ljava/lang/String;)V"}
+    { "<init>", "(Lnsk/jvmti/GetClassMethods/getclmthd007;)V" },
+    { "meth_1", "(Ljava/lang/String;)V" }
 };
 
 static meth_info m1[] = {
-    {"meth_n1", "()V"}
+    { "meth_n1", "()V" }
 };
 
 static meth_info m2[] = {
-    {"<init>", "()V"},
-    {"meth_n1", "()V"},
-    {"meth_n2", "()I"},
-    {"<clinit>", "()V"}
+    { "<init>", "()V" },
+    { "meth_n1", "()V" },
+    { "meth_n2", "()I" },
+    { "<clinit>", "()V" }
 };
 
 static meth_info m3[] = {
-    {"<init>", "()V"}
+    { "<init>", "()V" }
 };
 
 static meth_info m4[] = {
-    {"<init>", "()V"},
-    {"meth_o2", "()V"}
+    { "<init>", "()V" },
+    { "meth_o2", "()V" }
 };
 
 static meth_info m5[] = {
-    {"<init>", "()V"},
-    {"meth_o3", "()I"}
+    { "<init>", "()V" },
+    { "meth_o3", "()I" }
 };
 
 static meth_info m6[] = {
-    {"meth_i1", "()I"}
+    { "meth_i1", "()I" }
 };
 
 static meth_info m7[] = {
-    {"meth_i2", "()I"}
+    { "meth_i2", "()I" }
 };
 
 static meth_info m8[] = {
-    {"<init>", "()V"},
-    {"meth_i2", "()I"}
+    { "<init>", "()V" },
+    { "meth_i2", "()I" }
 };
 
 static meth_info m9[] = {
-    {"<init>", "()V"},
-    {"meth_i1", "()I"}
+    { "<init>", "()V" },
+    { "meth_i1", "()I" }
 };
 
 static class_info classes[] = {
-    {"InnerClass1", 2, m0},
-    {"InnerInterface", 1, m1},
-    {"InnerClass2", 4, m2},
-    {"OuterClass1", 1, m3},
-    {"OuterClass2", 2, m4},
-    {"OuterClass3", 2, m5},
-    {"OuterInterface1", 1, m6},
-    {"OuterInterface2", 1, m7},
-    {"OuterClass4", 2, m8},
-    {"OuterClass5", 2, m9}
+    { "InnerClass1", 2, m0 },
+    { "InnerInterface", 1, m1 },
+    { "InnerClass2", 4, m2 },
+    { "OuterClass1", 1, m3 },
+    { "OuterClass2", 2, m4 },
+    { "OuterClass3", 2, m5 },
+    { "OuterInterface1", 1, m6 },
+    { "OuterInterface2", 1, m7 },
+    { "OuterClass4", 2, m8 },
+    { "OuterClass5", 2, m9 }
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetClassSignature/getclsig006/getclsig006.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -40,15 +40,15 @@
 
 /* expected class signatures are below */
 static const char *class_sig[][CLS_NUM] = {
-    {"getclsig006", "Lnsk/jvmti/GetClassSignature/getclsig006;", "NULL"},
-    {"getclsig006b", "Lnsk/jvmti/GetClassSignature/getclsig006b;",
-        "<L:Ljava/lang/String;>Ljava/lang/Object;"},
-    {"getclsig006c", "Lnsk/jvmti/GetClassSignature/getclsig006c;",
-        "<A:Ljava/lang/Object;B:Ljava/lang/Integer;>Ljava/lang/Object;"},
-    {"getclsig006if", "Lnsk/jvmti/GetClassSignature/getclsig006if;",
-        "<I:Ljava/lang/Object;>Ljava/lang/Object;"},
-    {"getclsig006g", "Lnsk/jvmti/GetClassSignature/getclsig006g;",
-        "<E:Lnsk/jvmti/GetClassSignature/getclsig006e;:Lnsk/jvmti/GetClassSignature/getclsig006if;>Ljava/lang/Object;"}
+    { "getclsig006", "Lnsk/jvmti/GetClassSignature/getclsig006;", "NULL" },
+    { "getclsig006b", "Lnsk/jvmti/GetClassSignature/getclsig006b;",
+      "<L:Ljava/lang/String;>Ljava/lang/Object;" },
+    { "getclsig006c", "Lnsk/jvmti/GetClassSignature/getclsig006c;",
+      "<A:Ljava/lang/Object;B:Ljava/lang/Integer;>Ljava/lang/Object;" },
+    { "getclsig006if", "Lnsk/jvmti/GetClassSignature/getclsig006if;",
+      "<I:Ljava/lang/Object;>Ljava/lang/Object;" },
+    { "getclsig006g", "Lnsk/jvmti/GetClassSignature/getclsig006g;",
+      "<E:Lnsk/jvmti/GetClassSignature/getclsig006e;:Lnsk/jvmti/GetClassSignature/getclsig006if;>Ljava/lang/Object;" }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/getfldnm005.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -40,47 +40,47 @@
 
 /* expected field signatures are below */
 static const char *fld_sig[][FLDS_NUM] = {
-    {"_getfldnm005St", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005;", "NULL"},
+    { "_getfldnm005St", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005;", "NULL" },
 
-    {"_getfldnm005b", "instance",
-        "Lnsk/jvmti/GetFieldName/getfldnm005b;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005b<Ljava/lang/String;>;"},
-    {"_getfldnm005bSt", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005b;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005b<Ljava/lang/String;>;"},
+    { "_getfldnm005b", "instance",
+      "Lnsk/jvmti/GetFieldName/getfldnm005b;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005b<Ljava/lang/String;>;" },
+    { "_getfldnm005bSt", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005b;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005b<Ljava/lang/String;>;" },
 
-    {"_getfldnm005c", "instance",
-        "Lnsk/jvmti/GetFieldName/getfldnm005c;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;"},
-    {"_getfldnm005cSt", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005c;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;"},
+    { "_getfldnm005c", "instance",
+      "Lnsk/jvmti/GetFieldName/getfldnm005c;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;" },
+    { "_getfldnm005cSt", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005c;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;" },
 
-    {"_getfldnm005e", "instance",
-        "Lnsk/jvmti/GetFieldName/getfldnm005e;",
-        "NULL"},
-    {"_getfldnm005eSt", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005e;",
-        "NULL"},
+    { "_getfldnm005e", "instance",
+      "Lnsk/jvmti/GetFieldName/getfldnm005e;",
+      "NULL" },
+    { "_getfldnm005eSt", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005e;",
+      "NULL" },
 
-    {"_getfldnm005if", "instance",
-        "Lnsk/jvmti/GetFieldName/getfldnm005if;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005if<Ljava/lang/Object;>;"},
-    {"_getfldnm005ifSt", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005if;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005if<Ljava/lang/Object;>;"},
+    { "_getfldnm005if", "instance",
+      "Lnsk/jvmti/GetFieldName/getfldnm005if;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005if<Ljava/lang/Object;>;" },
+    { "_getfldnm005ifSt", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005if;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005if<Ljava/lang/Object;>;" },
 
-    {"_getfldnm005g", "instance",
-        "Lnsk/jvmti/GetFieldName/getfldnm005g;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005g<Lnsk/jvmti/GetFieldName/getfldnm005f;>;"},
-    {"_getfldnm005gSt", "static",
-        "Lnsk/jvmti/GetFieldName/getfldnm005g;",
-        "Lnsk/jvmti/GetFieldName/getfldnm005g<Lnsk/jvmti/GetFieldName/getfldnm005f;>;"},
+    { "_getfldnm005g", "instance",
+      "Lnsk/jvmti/GetFieldName/getfldnm005g;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005g<Lnsk/jvmti/GetFieldName/getfldnm005f;>;" },
+    { "_getfldnm005gSt", "static",
+      "Lnsk/jvmti/GetFieldName/getfldnm005g;",
+      "Lnsk/jvmti/GetFieldName/getfldnm005g<Lnsk/jvmti/GetFieldName/getfldnm005f;>;" },
 
-    {"_getfldnm005gArr", "instance",
-        "[Lnsk/jvmti/GetFieldName/getfldnm005g;",
-        "NULL"}
+    { "_getfldnm005gArr", "instance",
+      "[Lnsk/jvmti/GetFieldName/getfldnm005g;",
+      "NULL" }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFrameLocation/frameloc002/frameloc002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetFrameLocation/frameloc002/frameloc002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -45,8 +45,8 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static frame_info fi =
-    {"Lnsk/jvmti/GetFrameLocation/frameloc002;", "check",
-     "(Ljava/lang/Thread;)I", -1};
+    { "Lnsk/jvmti/GetFrameLocation/frameloc002;", "check",
+      "(Ljava/lang/Thread;)I", -1 };
 
 #ifdef STATIC_BUILD
 JNIEXPORT jint JNICALL Agent_OnLoad_frameloc002(JavaVM *jvm, char *options, void *reserved) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/getintrf007.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -48,37 +48,37 @@
 static jboolean printdump = JNI_FALSE;
 
 static iface_info i2[] = {
-    {"Lnsk/jvmti/GetImplementedInterfaces/getintrf007$InnerInterface1;"}
+    { "Lnsk/jvmti/GetImplementedInterfaces/getintrf007$InnerInterface1;" }
 };
 
 static iface_info i3[] = {
-    {"Lnsk/jvmti/GetImplementedInterfaces/getintrf007$InnerInterface2;"}
+    { "Lnsk/jvmti/GetImplementedInterfaces/getintrf007$InnerInterface2;" }
 };
 
 static iface_info i7[] = {
-    {"Lnsk/jvmti/GetImplementedInterfaces/OuterInterface1;"}
+    { "Lnsk/jvmti/GetImplementedInterfaces/OuterInterface1;" }
 };
 
 static iface_info i8[] = {
-    {"Lnsk/jvmti/GetImplementedInterfaces/OuterInterface1;"}
+    { "Lnsk/jvmti/GetImplementedInterfaces/OuterInterface1;" }
 };
 
 static iface_info i9[] = {
-    {"Lnsk/jvmti/GetImplementedInterfaces/OuterInterface2;"}
+    { "Lnsk/jvmti/GetImplementedInterfaces/OuterInterface2;" }
 };
 
 static class_info classes[] = {
-    {"InnerClass1", 0, NULL},
-    {"InnerInterface1", 0, NULL},
-    {"InnerInterface2", 1, i2},
-    {"InnerClass2", 1, i3},
-    {"OuterClass1", 0, NULL},
-    {"OuterClass2", 0, NULL},
-    {"OuterInterface1", 0, NULL},
-    {"OuterClass3", 1, i7},
-    {"OuterInterface2", 1, i8},
-    {"OuterClass4", 1, i9},
-    {"OuterClass5", 0, NULL}
+    { "InnerClass1", 0, NULL },
+    { "InnerInterface1", 0, NULL },
+    { "InnerInterface2", 1, i2 },
+    { "InnerClass2", 1, i3 },
+    { "OuterClass1", 0, NULL },
+    { "OuterClass2", 0, NULL },
+    { "OuterInterface1", 0, NULL },
+    { "OuterClass3", 1, i7 },
+    { "OuterInterface2", 1, i8 },
+    { "OuterClass4", 1, i9 },
+    { "OuterClass5", 0, NULL }
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLineNumberTable/linetab001/linetab001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLineNumberTable/linetab001/linetab001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -42,15 +42,15 @@
 static jvmtiCapabilities caps;
 static jint result = PASSED;
 static jvmtiLineNumberEntry m0[] = {
-    {0, 64}
+    { 0, 64 }
 };
 static jvmtiLineNumberEntry m1[] = {
-    {0, 67},
-    {4, 68},
-    {7, 69},
-    {12,70}
+    { 0, 67 },
+    { 4, 68 },
+    { 7, 69 },
+    { 12,70 }
 };
-static info meth_tab[] = {{1, m0}, {4, m1}};
+static info meth_tab[] = { { 1, m0 }, { 4, m1 } };
 
 void checkMeth(JNIEnv *env, jclass cl, const char *name, const char *sig,
                int stat, int meth_ind) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab001/localtab001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab001/localtab001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -42,53 +42,53 @@
 static jvmtiCapabilities caps;
 static jint result = PASSED;
 static jvmtiLocalVariableEntry m1[] = {
-    {0, 21, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0},
-    {4, 17, (char*) "l",    (char*) "J", NULL, 1},
-    {7, 14, (char*) "f",    (char*) "F", NULL, 2},
-    {12, 9, (char*) "d",    (char*) "D", NULL, 3}
+    { 0, 21, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0 },
+    { 4, 17, (char*) "l",    (char*) "J", NULL, 1 },
+    { 7, 14, (char*) "f",    (char*) "F", NULL, 2 },
+    { 12, 9, (char*) "d",    (char*) "D", NULL, 3 }
 };
 static jvmtiLocalVariableEntry m2[] = {
-    {0, 32, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0},
-    {0, 32, (char*) "step", (char*) "I", NULL, 1},
-    {2, 29, (char*) "i2",   (char*) "S", NULL, 2},
-    {4, 27, (char*) "i3",   (char*) "C", NULL, 3},
-    {7, 24, (char*) "i4",   (char*) "B", NULL, 4},
-    {10,21, (char*) "i5",   (char*) "Z", NULL, 5},
-    {13,18, (char*) "i1",   (char*) "I", NULL, 6}
+    { 0, 32, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0 },
+    { 0, 32, (char*) "step", (char*) "I", NULL, 1 },
+    { 2, 29, (char*) "i2",   (char*) "S", NULL, 2 },
+    { 4, 27, (char*) "i3",   (char*) "C", NULL, 3 },
+    { 7, 24, (char*) "i4",   (char*) "B", NULL, 4 },
+    { 10,21, (char*) "i5",   (char*) "Z", NULL, 5 },
+    { 13,18, (char*) "i1",   (char*) "I", NULL, 6 }
 };
 static jvmtiLocalVariableEntry m3[] = {
-    {0, 70, (char*) "ob",  (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0},
-    {2, 67, (char*) "ob1", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 1},
-    {56,13, (char*) "ob2", (char*) "[I", NULL, 2},
-    {61, 0, (char*) "i",   (char*) "I", NULL, 3},
-    {64, 5, (char*) "e",   (char*) "Ljava/lang/IndexOutOfBoundsException;", NULL, 4}
+    { 0, 70, (char*) "ob",  (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0 },
+    { 2, 67, (char*) "ob1", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 1 },
+    { 56,13, (char*) "ob2", (char*) "[I", NULL, 2 },
+    { 61, 0, (char*) "i",   (char*) "I", NULL, 3 },
+    { 64, 5, (char*) "e",   (char*) "Ljava/lang/IndexOutOfBoundsException;", NULL, 4 }
 };
 static jvmtiLocalVariableEntry m4[] = {
-    {0, 33, (char*) "i1", (char*) "I", NULL, 0},
-    {0, 33, (char*) "l",  (char*) "J", NULL, 1},
-    {0, 33, (char*) "i2", (char*) "S", NULL, 2},
-    {0, 33, (char*) "d",  (char*) "D", NULL, 3},
-    {0, 33, (char*) "i3", (char*) "C", NULL, 4},
-    {0, 33, (char*) "f",  (char*) "F", NULL, 5},
-    {0, 33, (char*) "i4", (char*) "B", NULL, 6},
-    {0, 33, (char*) "b",  (char*) "Z", NULL, 7}
+    { 0, 33, (char*) "i1", (char*) "I", NULL, 0 },
+    { 0, 33, (char*) "l",  (char*) "J", NULL, 1 },
+    { 0, 33, (char*) "i2", (char*) "S", NULL, 2 },
+    { 0, 33, (char*) "d",  (char*) "D", NULL, 3 },
+    { 0, 33, (char*) "i3", (char*) "C", NULL, 4 },
+    { 0, 33, (char*) "f",  (char*) "F", NULL, 5 },
+    { 0, 33, (char*) "i4", (char*) "B", NULL, 6 },
+    { 0, 33, (char*) "b",  (char*) "Z", NULL, 7 }
 };
 static jvmtiLocalVariableEntry m5[] = {
-    {0, 6, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0},
-    {0, 6, (char*) "i",    (char*) "I", NULL, 1},
-    {2, 4, (char*) "i12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", (char*) "I", NULL, 2}
+    { 0, 6, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0 },
+    { 0, 6, (char*) "i",    (char*) "I", NULL, 1 },
+    { 2, 4, (char*) "i12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678", (char*) "I", NULL, 2 }
 };
 static jvmtiLocalVariableEntry m6[] = {
-    {0, 5, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0},
+    { 0, 5, (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab001;", NULL, 0 },
 };
 static info meth_tab[] = {
-    {0, NULL},
-    {4, m1},
-    {7, m2},
-    {5, m3},
-    {8, m4},
-    {3, m5},
-    {1, m6}
+    { 0, NULL },
+    { 4, m1 },
+    { 7, m2 },
+    { 5, m3 },
+    { 8, m4 },
+    { 3, m5 },
+    { 1, m6 }
 };
 
 void checkMeth(JNIEnv *env, jclass cl, const char *name, const char *sig,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab004/localtab004.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -44,30 +44,30 @@
 
 /* expected local variable info are below */
 static localVar constr_lv[] = { /* constructor's local variables */
-    {(char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab004a;"},
-    {(char*) "constr_i", (char*) "I"},
-    {(char*) "constr_l", (char*) "J"},
-    {(char*) "constr_d", (char*) "D"},
-    {(char*) "constr_f", (char*) "F"},
-    {(char*) "constr_c", (char*) "C"}
+    { (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab004a;" },
+    { (char*) "constr_i", (char*) "I" },
+    { (char*) "constr_l", (char*) "J" },
+    { (char*) "constr_d", (char*) "D" },
+    { (char*) "constr_f", (char*) "F" },
+    { (char*) "constr_c", (char*) "C" }
 };
 
 static localVar finMeth_lv[] = { /* finMethod()'s local variables */
-    {(char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab004a;"},
-    {(char*) "fin_c", (char*) "C"},
-    {(char*) "fin_i", (char*) "J"},
-    {(char*) "fin_j", (char*) "I"},
-    {(char*) "fin_k", (char*) "J"},
-    {(char*) "fin_l", (char*) "J"},
-    {(char*) "fin_f", (char*) "F"}
+    { (char*) "this", (char*) "Lnsk/jvmti/GetLocalVariableTable/localtab004a;" },
+    { (char*) "fin_c", (char*) "C" },
+    { (char*) "fin_i", (char*) "J" },
+    { (char*) "fin_j", (char*) "I" },
+    { (char*) "fin_k", (char*) "J" },
+    { (char*) "fin_l", (char*) "J" },
+    { (char*) "fin_f", (char*) "F" }
 };
 
 static localVar statMeth_lv[] = { /* statMethod()'s local variables */
-    {(char*) "stat_x", (char*) "I"},
-    {(char*) "stat_y", (char*) "I"},
-    {(char*) "stat_z", (char*) "I"},
-    {(char*) "stat_j", (char*) "D"},
-    {(char*) "stat_i", (char*) "I"}
+    { (char*) "stat_x", (char*) "I" },
+    { (char*) "stat_y", (char*) "I" },
+    { (char*) "stat_z", (char*) "I" },
+    { (char*) "stat_j", (char*) "D" },
+    { (char*) "stat_i", (char*) "I" }
 };
 
 typedef struct {    /* local variables of a method */
@@ -81,9 +81,9 @@
 
 /* list of tested methods */
 static methodInfo methInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 6, constr_lv, NULL},
-    {1, (char*) "finMethod", (char*) "(CJIJ)V", 7, finMeth_lv, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 6, constr_lv, NULL },
+    { 1, (char*) "finMethod", (char*) "(CJIJ)V", 7, finMeth_lv, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetLocalVariableTable/localtab005/localtab005.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -45,37 +45,37 @@
 
 /* expected local variable info are below */
 static localVar constr_lv[] = { /* constructor's local variables */
-    {"this", "Lnsk/jvmti/GetLocalVariableTable/localtab005a;", "NULL"},
-    {"constr_b", "Lnsk/jvmti/GetLocalVariableTable/localtab005b;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005b<Ljava/lang/String;>;"},
-    {"constr_i", "I", "NULL"},
-    {"constr_c", "Lnsk/jvmti/GetLocalVariableTable/localtab005c;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;"},
-    {"constr_f", "F", "NULL"},
-    {"constr_ch", "C", "NULL"},
-    {"constr_if", "Lnsk/jvmti/GetLocalVariableTable/localtab005if;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005if<Ljava/lang/Object;>;"}
+    { "this", "Lnsk/jvmti/GetLocalVariableTable/localtab005a;", "NULL" },
+    { "constr_b", "Lnsk/jvmti/GetLocalVariableTable/localtab005b;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005b<Ljava/lang/String;>;" },
+    { "constr_i", "I", "NULL" },
+    { "constr_c", "Lnsk/jvmti/GetLocalVariableTable/localtab005c;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005c<Ljava/lang/Boolean;Ljava/lang/Integer;>;" },
+    { "constr_f", "F", "NULL" },
+    { "constr_ch", "C", "NULL" },
+    { "constr_if", "Lnsk/jvmti/GetLocalVariableTable/localtab005if;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005if<Ljava/lang/Object;>;" }
 };
 
 static localVar insMeth_lv[] = { /* finMethod()'s local variables */
-    {"this", "Lnsk/jvmti/GetLocalVariableTable/localtab005a;", "NULL"},
-    {"ins_c", "C", "NULL"},
-    {"ins_i", "J", "NULL"},
-    {"ltab005d", "Lnsk/jvmti/GetLocalVariableTable/localtab005d;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005d<Ljava/lang/Object;>;"},
-    {"ins_k", "J", "NULL"},
-    {"ins_l", "J", "NULL"},
-    {"ins_g", "Lnsk/jvmti/GetLocalVariableTable/localtab005g;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005g<Lnsk/jvmti/GetLocalVariableTable/localtab005f;>;"}
+    { "this", "Lnsk/jvmti/GetLocalVariableTable/localtab005a;", "NULL" },
+    { "ins_c", "C", "NULL" },
+    { "ins_i", "J", "NULL" },
+    { "ltab005d", "Lnsk/jvmti/GetLocalVariableTable/localtab005d;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005d<Ljava/lang/Object;>;" },
+    { "ins_k", "J", "NULL" },
+    { "ins_l", "J", "NULL" },
+    { "ins_g", "Lnsk/jvmti/GetLocalVariableTable/localtab005g;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005g<Lnsk/jvmti/GetLocalVariableTable/localtab005f;>;" }
 };
 
 static localVar statMeth_lv[] = { /* statMethod()'s local variables */
-    {"stat_x", "I", "NULL"},
-    {"stat_y", "I", "NULL"},
-    {"stat_z", "I", "NULL"},
-    {"stat_j", "D", "NULL"},
-    {"stat_d", "Lnsk/jvmti/GetLocalVariableTable/localtab005d;",
-        "Lnsk/jvmti/GetLocalVariableTable/localtab005d<Ljava/lang/Byte;>;"}
+    { "stat_x", "I", "NULL" },
+    { "stat_y", "I", "NULL" },
+    { "stat_z", "I", "NULL" },
+    { "stat_j", "D", "NULL" },
+    { "stat_d", "Lnsk/jvmti/GetLocalVariableTable/localtab005d;",
+      "Lnsk/jvmti/GetLocalVariableTable/localtab005d<Ljava/lang/Byte;>;" }
 };
 
 typedef struct {    /* local variables of a method */
@@ -89,9 +89,9 @@
 
 /* list of tested methods */
 static methodInfo methInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 7, constr_lv, NULL},
-    {1, (char*) "insMethod", (char*) "(CJLnsk/jvmti/GetLocalVariableTable/localtab005d;J)V", 7, insMeth_lv, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 7, constr_lv, NULL },
+    { 1, (char*) "insMethod", (char*) "(CJLnsk/jvmti/GetLocalVariableTable/localtab005d;J)V", 7, insMeth_lv, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodDeclaringClass/declcls003/declcls003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodDeclaringClass/declcls003/declcls003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -37,7 +37,7 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static const char *exp_class_sig = "Ljava/lang/Object;";
-static const char *arr_sigs[] = {"[B", "[C", "[D", "[F", "[I", "[J", "[S", "[Z",
+static const char *arr_sigs[] = { "[B", "[C", "[D", "[F", "[I", "[J", "[S", "[Z",
     "[Lnsk/jvmti/GetMethodDeclaringClass/declcls003;",
     "[[Lnsk/jvmti/GetMethodDeclaringClass/declcls003;"
 };
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodLocation/methloc001/methloc001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodLocation/methloc001/methloc001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -39,9 +39,9 @@
 static jvmtiEnv *jvmti;
 static jint result = PASSED;
 static info meth_tab[] = {
-    {0, 4},  /* 0 <init> */
-    {0, 0},  /* 1 meth1 */
-    {0, 5}   /* 2 meth2 */
+    { 0, 4 },  /* 0 <init> */
+    { 0, 0 },  /* 1 meth1 */
+    { 0, 5 }   /* 2 meth2 */
 };
 
 void checkMeth(JNIEnv *env, jclass cl, const char *name, const char *sig,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetMethodName/methname003/methname003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -44,40 +44,40 @@
 
 /* expected class signatures are below */
 static const char *meth_sig[][METH_NUM][TOT_NUM] = {
-    {{"methname003bMeth", "instance",
+    { { "methname003bMeth", "instance",
         "(Lnsk/jvmti/GetMethodName/methname003b;)Lnsk/jvmti/GetMethodName/methname003b;",
-        "<L:Ljava/lang/String;>(Lnsk/jvmti/GetMethodName/methname003b<TL;>;)Lnsk/jvmti/GetMethodName/methname003b<Ljava/lang/String;>;"},
-     {"methname003bMethSt", "static",
-        "(Lnsk/jvmti/GetMethodName/methname003b;)Lnsk/jvmti/GetMethodName/methname003b;",
-        "<T:Ljava/lang/String;>(Lnsk/jvmti/GetMethodName/methname003b<TT;>;)Lnsk/jvmti/GetMethodName/methname003b<Ljava/lang/String;>;"}},
+        "<L:Ljava/lang/String;>(Lnsk/jvmti/GetMethodName/methname003b<TL;>;)Lnsk/jvmti/GetMethodName/methname003b<Ljava/lang/String;>;" },
+     { "methname003bMethSt", "static",
+       "(Lnsk/jvmti/GetMethodName/methname003b;)Lnsk/jvmti/GetMethodName/methname003b;",
+       "<T:Ljava/lang/String;>(Lnsk/jvmti/GetMethodName/methname003b<TT;>;)Lnsk/jvmti/GetMethodName/methname003b<Ljava/lang/String;>;" } },
 
-    {{"methname003cMeth", "instance",
+    { { "methname003cMeth", "instance",
         "(Ljava/lang/Class;)Ljava/lang/Object;",
-        "<U:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;)TU;"},
-     {"methname003cMethSt", "static",
-        "(Ljava/lang/Class;)Ljava/lang/Object;",
-        "<U:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;)TU;"}},
+        "<U:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;)TU;" },
+     { "methname003cMethSt", "static",
+       "(Ljava/lang/Class;)Ljava/lang/Object;",
+       "<U:Ljava/lang/Object;>(Ljava/lang/Class<TU;>;)TU;" } },
 
-    {{"methname003eMeth", "instance",
+    { { "methname003eMeth", "instance",
         "(Lnsk/jvmti/GetMethodName/methname003e;)V",
-        "NULL"},
-     {"methname003eMethSt", "static",
-        "(Lnsk/jvmti/GetMethodName/methname003e;)V",
-        "NULL"}},
+        "NULL" },
+     { "methname003eMethSt", "static",
+       "(Lnsk/jvmti/GetMethodName/methname003e;)V",
+       "NULL" } },
 
-    {{"methname003ifMeth", "instance",
+    { { "methname003ifMeth", "instance",
         "()I",
-        "NULL"},
-     {"methname003ifMeth2", "instance",
-        "(Ljava/lang/Object;)I",
-        "<T:Ljava/lang/Object;>(TT;)I"}},
+        "NULL" },
+     { "methname003ifMeth2", "instance",
+       "(Ljava/lang/Object;)I",
+       "<T:Ljava/lang/Object;>(TT;)I" } },
 
-    {{"methname003gMeth", "instance",
+    { { "methname003gMeth", "instance",
         "(Ljava/lang/Byte;Ljava/lang/Double;[Ljava/lang/Class;)V",
-        "<A:Ljava/lang/Byte;B:Ljava/lang/Double;>(TA;TB;[Ljava/lang/Class<*>;)V"},
-     {"methname003gMethSt", "static",
-        "(Ljava/lang/Byte;Ljava/lang/Double;)V",
-        "<A:Ljava/lang/Byte;B:Ljava/lang/Double;>(TA;TB;)V"}}
+        "<A:Ljava/lang/Byte;B:Ljava/lang/Double;>(TA;TB;[Ljava/lang/Class<*>;)V" },
+     { "methname003gMethSt", "static",
+       "(Ljava/lang/Byte;Ljava/lang/Double;)V",
+       "<A:Ljava/lang/Byte;B:Ljava/lang/Double;>(TA;TB;)V" } }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr001/getstacktr001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr001/getstacktr001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -43,14 +43,14 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr001;", "check",
-     "(Ljava/lang/Thread;)V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr001;", "dummy", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr001;", "chain", "()I"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr001;", "run",
-     "([Ljava/lang/String;Ljava/io/PrintStream;)I"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr001;", "main",
-     "([Ljava/lang/String;)V"}
+    { "Lnsk/jvmti/GetStackTrace/getstacktr001;", "check",
+     "(Ljava/lang/Thread;)V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr001;", "dummy", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr001;", "chain", "()I" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr001;", "run",
+     "([Ljava/lang/String;Ljava/io/PrintStream;)I" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr001;", "main",
+     "([Ljava/lang/String;)V" }
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr003/getstacktr003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr003/getstacktr003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -44,10 +44,10 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static frame_info frames[] = {
-    {"Ljava/lang/Object;", "wait", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr003;", "dummy", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr003;", "chain", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr003$TestThread;", "run", "()V"},
+    { "Ljava/lang/Object;", "wait", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr003;", "dummy", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr003;", "chain", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr003$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr004/getstacktr004.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr004/getstacktr004.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,12 +46,12 @@
 static jboolean printdump = JNI_FALSE;
 static jmethodID mid;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "checkPoint", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain4", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain3", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain2", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain1", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "run", "()V"},
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "checkPoint", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain4", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain3", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain2", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "chain1", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr004$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr005/getstacktr005.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr005/getstacktr005.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,11 +46,11 @@
 static jboolean printdump = JNI_FALSE;
 static jmethodID mid;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain4", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain3", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain2", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain1", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "run", "()V"},
+    { "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain4", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain3", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain2", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "chain1", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr005$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr006/getstacktr006.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr006/getstacktr006.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,11 +46,11 @@
 static jboolean printdump = JNI_FALSE;
 static jmethodID mid;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain4", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain3", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain2", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain1", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "run", "()V"},
+    { "Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain4", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain3", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain2", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "chain1", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr006$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr007/getstacktr007.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr007/getstacktr007.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -47,12 +47,12 @@
 static jmethodID mid;
 static jbyteArray classBytes;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "checkPoint", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain4", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain3", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain2", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain1", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "run", "()V"},
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "checkPoint", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain4", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain3", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain2", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "chain1", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr007$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr008/getstacktr008.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetStackTrace/getstacktr008/getstacktr008.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -49,14 +49,14 @@
 static jmethodID mid_checkPoint, mid_chain4;
 static jbyteArray classBytes;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "checkPoint", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain5", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain4", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008;", "nativeChain", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain3", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain2", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain1", "()V"},
-    {"Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "run", "()V"},
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "checkPoint", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain5", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain4", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008;", "nativeChain", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain3", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain2", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "chain1", "()V" },
+    { "Lnsk/jvmti/GetStackTrace/getstacktr008$TestThread;", "run", "()V" },
 };
 
 #define NUMBER_OF_STACK_FRAMES ((int) (sizeof(frames)/sizeof(frame_info)))
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/getsysprops002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -42,8 +42,8 @@
 } PropertyDesc;
 
 static PropertyDesc propDescList[PROPERTIES_COUNT] = {
-    {"nsk.jvmti.test.property", "value of nsk.jvmti.test.property", 0},
-    {"nsk.jvmti.test.property.empty", "", 0}
+    { "nsk.jvmti.test.property", "value of nsk.jvmti.test.property", 0 },
+    { "nsk.jvmti.test.property.empty", "", 0 }
 };
 
 /* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/getsysprop002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,8 +41,8 @@
 } PropertyDesc;
 
 static PropertyDesc propDescList[PROPERTIES_COUNT] = {
-    {"nsk.jvmti.test.property", "value of nsk.jvmti.test.property"},
-    {"nsk.jvmti.test.property.empty", ""}
+    { "nsk.jvmti.test.property", "value of nsk.jvmti.test.property" },
+    { "nsk.jvmti.test.property.empty", "" }
 };
 
 /* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/thrinfo001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/thrinfo001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -43,9 +43,9 @@
 static jint result = PASSED;
 static jvmtiThreadInfo inf;
 static info threads[] = {
-    {"main", JVMTI_THREAD_NORM_PRIORITY, 0},
-    {"thread1", JVMTI_THREAD_MIN_PRIORITY + 2, 1},
-    {"Thread-", JVMTI_THREAD_MIN_PRIORITY, 1}
+    { "main", JVMTI_THREAD_NORM_PRIORITY, 0 },
+    { "thread1", JVMTI_THREAD_MIN_PRIORITY + 2, 1 },
+    { "Thread-", JVMTI_THREAD_MIN_PRIORITY, 1 }
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodSynthetic/issynth001/issynth001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IsMethodSynthetic/issynth001/issynth001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -46,19 +46,19 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static method_info methods[] = {
-    {1, "meth_stat", "(ILjava/lang/String;)[F", JNI_TRUE, JNI_FALSE},
-    {1, "meth_1", "(CCC)C", JNI_FALSE, JNI_FALSE},
-    {1, "class$", "(Ljava/lang/String;)Ljava/lang/Class;", JNI_TRUE, JNI_TRUE},
-    {1, "access$000",
-        "(Lnsk/jvmti/IsMethodSynthetic/issynth001a;)I", JNI_TRUE, JNI_TRUE},
-    {1, "nmeth", "()V", JNI_FALSE, JNI_FALSE},
-    {1, "check", "(Ljava/lang/Class;Ljava/lang/Class;)I", JNI_TRUE, JNI_FALSE},
+    { 1, "meth_stat", "(ILjava/lang/String;)[F", JNI_TRUE, JNI_FALSE },
+    { 1, "meth_1", "(CCC)C", JNI_FALSE, JNI_FALSE },
+    { 1, "class$", "(Ljava/lang/String;)Ljava/lang/Class;", JNI_TRUE, JNI_TRUE },
+    { 1, "access$000",
+        "(Lnsk/jvmti/IsMethodSynthetic/issynth001a;)I", JNI_TRUE, JNI_TRUE },
+    { 1, "nmeth", "()V", JNI_FALSE, JNI_FALSE },
+    { 1, "check", "(Ljava/lang/Class;Ljava/lang/Class;)I", JNI_TRUE, JNI_FALSE },
 
-    {2, "<init>", "()V", JNI_FALSE, JNI_FALSE},
-    {2, "run",
-        "([Ljava/lang/String;Ljava/io/PrintStream;)I", JNI_TRUE, JNI_FALSE},
+    { 2, "<init>", "()V", JNI_FALSE, JNI_FALSE },
+    { 2, "run",
+        "([Ljava/lang/String;Ljava/io/PrintStream;)I", JNI_TRUE, JNI_FALSE },
 
-    {3, "meth_inn", "(Ljava/lang/String;J)V", JNI_FALSE, JNI_FALSE},
+    { 3, "meth_inn", "(Ljava/lang/String;J)V", JNI_FALSE, JNI_FALSE },
 };
 
 #ifdef STATIC_BUILD
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/callbacks/Callbacks.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -75,14 +75,14 @@
 #define ARRAY_LENGTH 5
 
 static const wchar_t *STRING = L"I hope you'll find me in the heap!";
-static jboolean BOOLEAN_ARRAY[] = {JNI_TRUE, JNI_TRUE, JNI_FALSE, JNI_TRUE, JNI_FALSE};
-static jbyte BYTE_ARRAY[] = {BYTE, BYTE+1, BYTE+2, BYTE+3, BYTE+4};
-static jchar CHAR_ARRAY[] = {CHAR, CHAR+1, CHAR+2, CHAR+3, CHAR+4};
-static jshort SHORT_ARRAY[] = {SHORT, SHORT+1, SHORT+2, SHORT+3, SHORT+4};
-static jint INT_ARRAY[] = {INT, INT+1, INT+2, INT+3, INT+4};
-static jlong LONG_ARRAY[] = {LONG, LONG+1, LONG+2, LONG+3, LONG+4};
-static jfloat FLOAT_ARRAY[] = {FLOAT, FLOAT+1, FLOAT+2, FLOAT+3, FLOAT+4};
-static jdouble DOUBLE_ARRAY[] = {DOUBLE, DOUBLE+1, DOUBLE+2, DOUBLE+3, DOUBLE+4};
+static jboolean BOOLEAN_ARRAY[] = { JNI_TRUE, JNI_TRUE, JNI_FALSE, JNI_TRUE, JNI_FALSE };
+static jbyte BYTE_ARRAY[] = { BYTE, BYTE+1, BYTE+2, BYTE+3, BYTE+4 };
+static jchar CHAR_ARRAY[] = { CHAR, CHAR+1, CHAR+2, CHAR+3, CHAR+4 };
+static jshort SHORT_ARRAY[] = { SHORT, SHORT+1, SHORT+2, SHORT+3, SHORT+4 };
+static jint INT_ARRAY[] = { INT, INT+1, INT+2, INT+3, INT+4 };
+static jlong LONG_ARRAY[] = { LONG, LONG+1, LONG+2, LONG+3, LONG+4 };
+static jfloat FLOAT_ARRAY[] = { FLOAT, FLOAT+1, FLOAT+2, FLOAT+3, FLOAT+4 };
+static jdouble DOUBLE_ARRAY[] = { DOUBLE, DOUBLE+1, DOUBLE+2, DOUBLE+3, DOUBLE+4 };
 
 static long timeout = 0;
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/filter-tagged/HeapFilter.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -61,14 +61,13 @@
 //expected values
 #define INT_ARRAY_LENGTH 2
 
-static jint TAGGED_STATIC_INT_VALUE = 0xC0DE01;
-static jint TAGGED_INT_VALUE = 0xC0DE02;
-static jint UNTAGGED_STATIC_INT_VALUE = 0xC0DE03;
-static jint UNTAGGED_INT_VALUE = 0xC0DE04;
-static jint TAGGED_INT_ARRAY_VALUE[] = {0xC0DE01,
-                                                 0xC0DE01+1};
-static jint UNTAGGED_INT_ARRAY_VALUE[] = {0xC0DE03,
-                                                   0xC0DE03+1};
+static jint POISON = 0x1234;
+static jint TAGGED_STATIC_INT_VALUE = 0xC0DE01 + POISON;
+static jint TAGGED_INT_VALUE = 0xC0DE02 + POISON;
+static jint UNTAGGED_STATIC_INT_VALUE = 0xC0DE03 + POISON;
+static jint UNTAGGED_INT_VALUE = 0xC0DE04 + POISON;
+static jint TAGGED_INT_ARRAY_VALUE[] = { 0xC0DE01, 0xC0DE01 + 1 };
+static jint UNTAGGED_INT_ARRAY_VALUE[] = { 0xC0DE03, 0xC0DE03 + 1 };
 static const wchar_t *TAGGED_STRING_VALUE = L"I'm a tagged string";
 static const wchar_t *UNTAGGED_STRING_VALUE = L"I'm an untagged string";
 
@@ -352,6 +351,14 @@
       if (is_primitive_type(objects_info[object].fields[field].signature)) {
         objects_info[object].fields[field].primitive = 1;
         is_primitive = 1;
+        // Add POISON to all int fields to make the values opaque to the JIT compiler.
+        if (is_static) {
+          jint value = jni->GetStaticIntField(targetClass, targetFields[field]);
+          jni->SetStaticIntField(targetClass, targetFields[field], value + POISON);
+        } else {
+          jint value = jni->GetIntField(target, targetFields[field]);
+          jni->SetIntField(target, targetFields[field], value + POISON);
+        }
       } else {
         jobject value;
         if (!NSK_JVMTI_VERIFY(jvmti->GetFieldModifiers(
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateThroughHeap/non-concrete-klass-filter/NonConcreteKlassFilter.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -52,7 +52,7 @@
 //klass-filters used in this test
 #define FILTER_COUNT 2
 static const char *types[] = { "nsk/jvmti/IterateThroughHeap/non_concrete_klass_filter/Interface",
-                               "nsk/jvmti/IterateThroughHeap/non_concrete_klass_filter/AbstractClass"};
+                               "nsk/jvmti/IterateThroughHeap/non_concrete_klass_filter/AbstractClass" };
 
 jint JNICALL field_callback(jvmtiHeapReferenceKind kind,
                             const jvmtiHeapReferenceInfo* info,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodEntry/mentry001/mentry001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodEntry/mentry001/mentry001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -54,9 +54,9 @@
 static size_t eventsExpected = 0;
 static size_t eventsCount = 0;
 static entry_info entries[] = {
-    {"check", "()I", -1},
-    {"dummy", "()V", 0},
-    {"chain", "()V", -1}
+    { "check", "()I", -1 },
+    { "dummy", "()V", 0 },
+    { "chain", "()V", -1 }
 };
 
 void JNICALL MethodEntry(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodExit/mexit001/mexit001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodExit/mexit001/mexit001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -50,8 +50,8 @@
 static size_t eventsExpected = 0;
 static size_t eventsCount = 0;
 static exit_info exits[] = {
-    {"Lnsk/jvmti/MethodExit/mexit001a;", "chain", "()V", -1},
-    {"Lnsk/jvmti/MethodExit/mexit001a;", "dummy", "()V", 3}
+    { "Lnsk/jvmti/MethodExit/mexit001a;", "chain", "()V", -1 },
+    { "Lnsk/jvmti/MethodExit/mexit001a;", "dummy", "()V", 3 }
 };
 
 void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodExit/mexit002/mexit002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/MethodExit/mexit002/mexit002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -50,8 +50,8 @@
 static size_t eventsExpected = 0;
 static size_t eventsCount = 0;
 static exit_info exits[] = {
-    {"Lnsk/jvmti/MethodExit/mexit002a;", "chain", "()V", -1},
-    {"Lnsk/jvmti/MethodExit/mexit002a;", "dummy", "()V", 3}
+    { "Lnsk/jvmti/MethodExit/mexit002a;", "chain", "()V", -1 },
+    { "Lnsk/jvmti/MethodExit/mexit002a;", "dummy", "()V", 3 }
 };
 
 void JNICALL MethodExit(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/nativemethbind001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -39,15 +39,15 @@
 /* tested methods */
 #define METH_NUM 2
 static const char *METHODS[][2] = {
-    {"nativeMethod", "(Z)V"},
-    {"anotherNativeMethod", "()V"},
+    { "nativeMethod", "(Z)V" },
+    { "anotherNativeMethod", "()V" },
 };
 
 /* event counters for the tested methods and expected numbers
    of the events */
 static volatile int bindEv[][2] = {
-    {0, 1},
-    {0, 1}
+    { 0, 1 },
+    { 0, 1 }
 };
 
 static const char *CLASS_SIG =
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe006/popframe006.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe006/popframe006.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -51,15 +51,15 @@
 static int stepCount = 0, stepExpected = 0;
 static int popCount = 0, popExpected = 0;
 static check_info checks[] = {
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "run", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "C", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "C", "()V", 0},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 3},
-    {"Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 3}
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "run", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "C", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "C", "()V", 0 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "B", "()V", 3 },
+    { "Lnsk/jvmti/PopFrame/popframe006$TestThread;", "A", "()V", 3 }
 };
 
 void check(jvmtiEnv *jvmti_env, jmethodID mid, jlocation loc, int i) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe008/popframe008.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/PopFrame/popframe008/popframe008.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -50,10 +50,10 @@
 static int framesExpected = 0;
 static int framesCount = 0;
 static frame_info frames[] = {
-    {"Lnsk/jvmti/PopFrame/popframe008$TestThread;", "C", "()V", 1},
-    {"Lnsk/jvmti/PopFrame/popframe008$TestThread;", "B", "()V", 1},
-    {"Lnsk/jvmti/PopFrame/popframe008$TestThread;", "A", "()V", 1},
-    {"Lnsk/jvmti/PopFrame/popframe008$TestThread;", "run", "()V", 1}
+    { "Lnsk/jvmti/PopFrame/popframe008$TestThread;", "C", "()V", 1 },
+    { "Lnsk/jvmti/PopFrame/popframe008$TestThread;", "B", "()V", 1 },
+    { "Lnsk/jvmti/PopFrame/popframe008$TestThread;", "A", "()V", 1 },
+    { "Lnsk/jvmti/PopFrame/popframe008$TestThread;", "run", "()V", 1 }
 };
 
 void check(jvmtiEnv *jvmti_env, jmethodID mid, jlocation loc, int i) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass008/redefclass008.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass008/redefclass008.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -45,11 +45,11 @@
 
 /* list of breakpoints */
 static breakpoint breakpoints[] = {
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 0, NULL},
-    {1, (char*) "finMethod", (char*) "(JIJ)V", 5, NULL},
-    {1, (char*) "finMethod", (char*) "(JIJ)V", 4, NULL},
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 1, NULL},
-    {0, (char*) "statMethod", (char*) "(III)I", 1, NULL}
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 0, NULL },
+    { 1, (char*) "finMethod", (char*) "(JIJ)V", 5, NULL },
+    { 1, (char*) "finMethod", (char*) "(JIJ)V", 4, NULL },
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 1, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)I", 1, NULL }
 };
 
 static jclass redefCls; /* JNI's Java class object */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass009/redefclass009.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass009/redefclass009.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -42,33 +42,33 @@
 
 /* local variables of redefined methods */
 static localVar constr_lv[] = { /* constructor's local variables */
-    {(char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;"},
-    {(char*) "constr_i", (char*) "I"},
-    {(char*) "constr_l", (char*) "J"},
-    {(char*) "constr_d", (char*) "D"},
-    {(char*) "constr_f", (char*) "F"},
-    {(char*) "constr_c", (char*) "C"}
+    { (char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;" },
+    { (char*) "constr_i", (char*) "I" },
+    { (char*) "constr_l", (char*) "J" },
+    { (char*) "constr_d", (char*) "D" },
+    { (char*) "constr_f", (char*) "F" },
+    { (char*) "constr_c", (char*) "C" }
 };
 static localVar checkIt_lv[] = { /* checkIt()'s local variables */
-    {(char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;"},
-    {(char*) "out", (char*) "Ljava/io/PrintStream;"},
-    {(char*) "DEBUG_MODE", (char*) "Z"}
+    { (char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;" },
+    { (char*) "out", (char*) "Ljava/io/PrintStream;" },
+    { (char*) "DEBUG_MODE", (char*) "Z" }
 };
 static localVar finMeth_lv[] = { /* finMethod()'s local variables */
-    {(char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;"},
-    {(char*) "fin_c", (char*) "C"},
-    {(char*) "fin_i", (char*) "J"},
-    {(char*) "fin_j", (char*) "I"},
-    {(char*) "fin_k", (char*) "J"},
-    {(char*) "fin_l", (char*) "J"},
-    {(char*) "fin_f", (char*) "F"}
+    { (char*) "this", (char*) "Lnsk/jvmti/RedefineClasses/redefclass009r;" },
+    { (char*) "fin_c", (char*) "C" },
+    { (char*) "fin_i", (char*) "J" },
+    { (char*) "fin_j", (char*) "I" },
+    { (char*) "fin_k", (char*) "J" },
+    { (char*) "fin_l", (char*) "J" },
+    { (char*) "fin_f", (char*) "F" }
 };
 static localVar statMeth_lv[] = { /* statMethod()'s local variables */
-    {(char*) "stat_x", (char*) "I"},
-    {(char*) "stat_y", (char*) "I"},
-    {(char*) "stat_z", (char*) "I"},
-    {(char*) "stat_j", (char*) "D"},
-    {(char*) "stat_i", (char*) "I"}
+    { (char*) "stat_x", (char*) "I" },
+    { (char*) "stat_y", (char*) "I" },
+    { (char*) "stat_z", (char*) "I" },
+    { (char*) "stat_j", (char*) "D" },
+    { (char*) "stat_i", (char*) "I" }
 };
 
 typedef struct {    /* local variables of a method */
@@ -82,18 +82,18 @@
 
 /* list of original methods with NULL pointers to localVar */
 static methInfo origMethInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 1, NULL, NULL},
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 4, NULL, NULL},
-    {1, (char*) "finMethod", (char*) "(CJIJ)V", 5, NULL, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 3, NULL, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 1, NULL, NULL },
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 4, NULL, NULL },
+    { 1, (char*) "finMethod", (char*) "(CJIJ)V", 5, NULL, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 3, NULL, NULL }
 };
 
 /* list of redefined methods */
 static methInfo redefMethInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 6, constr_lv, NULL},
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, checkIt_lv, NULL},
-    {1, (char*) "finMethod", (char*) "(CJIJ)V", 7, finMeth_lv, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 6, constr_lv, NULL },
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, checkIt_lv, NULL },
+    { 1, (char*) "finMethod", (char*) "(CJIJ)V", 7, finMeth_lv, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 5, statMeth_lv, NULL }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass010/redefclass010.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass010/redefclass010.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -37,18 +37,18 @@
 
 /* line number matrix of original methods */
 static int orig_ln[METH_NUM][8] = {
-    {34, 0, 0, 0, 0, 0, 0, 0}, /* <init> */
-    {40,41,43, 0, 0, 0, 0, 0}, /* checkIt */
-    {55, 0, 0, 0, 0, 0, 0, 0}, /* finMethod */
-    {48,50,51,50,52, 0, 0, 0}  /* statMethod */
+    { 34, 0, 0, 0, 0, 0, 0, 0 }, /* <init> */
+    { 40,41,43, 0, 0, 0, 0, 0 }, /* checkIt */
+    { 55, 0, 0, 0, 0, 0, 0, 0 }, /* finMethod */
+    { 48,50,51,50,52, 0, 0, 0 }  /* statMethod */
 };
 
 /* line number matrix of redefined methods */
 static int redf_ln[METH_NUM][8] = {
-    {38,39,40,41,42,43,44,46}, /* <init> */
-    {51,53,55, 0, 0, 0, 0, 0}, /* checkIt */
-    {64,66,67,68,69,70,72, 0}, /* finMethod */
-    {60, 0, 0, 0, 0, 0, 0, 0}  /* statMethod */
+    { 38,39,40,41,42,43,44,46 }, /* <init> */
+    { 51,53,55, 0, 0, 0, 0, 0 }, /* checkIt */
+    { 64,66,67,68,69,70,72, 0 }, /* finMethod */
+    { 60, 0, 0, 0, 0, 0, 0, 0 }  /* statMethod */
 };
 
 typedef struct {   /* line numbers of a method */
@@ -61,18 +61,18 @@
 
 /* list of original methods */
 static methInfo origMethInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 1, NULL},
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, NULL},
-    {1, (char*) "finMethod", (char*) "(CJIJ)V", 1, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 5, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 1, NULL },
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, NULL },
+    { 1, (char*) "finMethod", (char*) "(CJIJ)V", 1, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 5, NULL }
 };
 
 /* list of redefined methods */
 static methInfo redefMethInfo[] = {
-    {1, (char*) "<init>", (char*) "()V", 8, NULL},
-    {1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, NULL},
-    {1, (char*) "finMethod", (char*) "(CJIJ)V", 7, NULL},
-    {0, (char*) "statMethod", (char*) "(III)D", 1, NULL}
+    { 1, (char*) "<init>", (char*) "()V", 8, NULL },
+    { 1, (char*) "checkIt", (char*) "(Ljava/io/PrintStream;Z)I", 3, NULL },
+    { 1, (char*) "finMethod", (char*) "(CJIJ)V", 7, NULL },
+    { 0, (char*) "statMethod", (char*) "(III)D", 1, NULL }
 };
 
 static jvmtiEnv *jvmti = NULL;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass019/redefclass019.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass019/redefclass019.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -62,33 +62,33 @@
 static const char *cls_exp = "Lnsk/jvmti/RedefineClasses/redefclass019a;";
 
 static var_info run[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0 }
 };
 
 static var_info checkPoint[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0 }
 };
 
 static var_info chain1[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0},
-    {"localInt1", "I", 2},
-    {"localInt2", "I", 3333}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0 },
+    { "localInt1", "I", 2 },
+    { "localInt2", "I", 3333 }
 };
 
 static var_info chain2[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0 }
 };
 
 static var_info chain3[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass019a;", 0 }
 };
 
 static frame_info frames[] = {
-    {JNI_TRUE,  "checkPoint", "()V", 115, 1, checkPoint},
-    {JNI_FALSE, "chain3",     "()V", 49, 1, chain3},
-    {JNI_FALSE, "chain2",     "()V", 44, 1, chain2},
-    {JNI_FALSE, "chain1",     "()V", 39, 3, chain1},
-    {JNI_FALSE, "run",        "()V", 32, 1, run},
+    { JNI_TRUE,  "checkPoint", "()V", 115, 1, checkPoint },
+    { JNI_FALSE, "chain3",     "()V", 49, 1, chain3 },
+    { JNI_FALSE, "chain2",     "()V", 44, 1, chain2 },
+    { JNI_FALSE, "chain1",     "()V", 39, 3, chain1 },
+    { JNI_FALSE, "run",        "()V", 32, 1, run },
 };
 
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass027/redefclass027.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/redefclass027/redefclass027.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -80,38 +80,38 @@
 static const char *cls_exp = "Lnsk/jvmti/RedefineClasses/redefclass027a;";
 
 static var_info run[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0},
-    {"localInt1", "I", 1}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0 },
+    { "localInt1", "I", 1 }
 };
 
 static var_info method1[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0},
-    {"argInt1", "I", 10},
-    {"localInt2", "I", 2},
-    {"ex", "Ljava/lang/Exception;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0 },
+    { "argInt1", "I", 10 },
+    { "localInt2", "I", 2 },
+    { "ex", "Ljava/lang/Exception;", 0 }
 };
 
 static var_info pop[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0},
-    {"argInt1", "I", 10},
-    {"localInt2", "I", 2},
-    {"ex", "Ljava/lang/Exception;", 0}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0 },
+    { "argInt1", "I", 10 },
+    { "localInt2", "I", 2 },
+    { "ex", "Ljava/lang/Exception;", 0 }
 };
 
 static var_info method2[] = {
-    {"this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0},
-    {"argInt2", "I", 20},
-    {"localInt4", "I", 4}
+    { "this", "Lnsk/jvmti/RedefineClasses/redefclass027a;", 0 },
+    { "argInt2", "I", 20 },
+    { "localInt4", "I", 4 }
 };
 
 static frame_info frames[] = {
-    {JNI_FALSE, "run",     "()V",  97,  2, run,     "bp"},
-    {JNI_FALSE, "run",     "()V",  97,  2, run,     "step"},
-    {JNI_FALSE, "run",     "()V",  99,  2, run,     "mod"},
-    {JNI_FALSE, "method2", "(I)V", 116, 3, method2, "acc"},
-    {JNI_FALSE, "method2", "(I)V", 117, 3, method2, "exc"},
-    {JNI_FALSE, "method1", "(I)V", 108, 4, method1, "catch"},
-    {JNI_FALSE, "method1", "(I)V", 112, 4, pop,     "pop"},
+    { JNI_FALSE, "run",     "()V",  97,  2, run,     "bp" },
+    { JNI_FALSE, "run",     "()V",  97,  2, run,     "step" },
+    { JNI_FALSE, "run",     "()V",  99,  2, run,     "mod" },
+    { JNI_FALSE, "method2", "(I)V", 116, 3, method2, "acc" },
+    { JNI_FALSE, "method2", "(I)V", 117, 3, method2, "exc" },
+    { JNI_FALSE, "method1", "(I)V", 108, 4, method1, "catch" },
+    { JNI_FALSE, "method1", "(I)V", 112, 4, pop,     "pop" },
 };
 
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw001/setfldw001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw001/setfldw001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -48,12 +48,12 @@
 static jvmtiCapabilities caps;
 static jint result = PASSED;
 static field fields[] = {
-    {"nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld0", "I", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld1", "I", 1, NULL, NULL},
-    {"nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld2",
-        "Lnsk/jvmti/SetFieldAccessWatch/setfldw001a;", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldAccessWatch/setfldw001a", "fld3", "[I", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldAccessWatch/setfldw001b", "fld4", "F", 0, NULL, NULL},
+    { "nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld0", "I", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld1", "I", 1, NULL, NULL },
+    { "nsk/jvmti/SetFieldAccessWatch/setfldw001", "fld2",
+      "Lnsk/jvmti/SetFieldAccessWatch/setfldw001a;", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldAccessWatch/setfldw001a", "fld3", "[I", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldAccessWatch/setfldw001b", "fld4", "F", 0, NULL, NULL },
 };
 
 void setWatch(JNIEnv *env, jint ind) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw003/setfldw003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw003/setfldw003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -40,7 +40,7 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static jfieldID actual_fid = NULL;
-static jfieldID fids[4] = {NULL, NULL, NULL, NULL};
+static jfieldID fids[4] = { NULL, NULL, NULL, NULL };
 
 void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
         jthread thr, jmethodID method,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw004/setfldw004.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw004/setfldw004.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -40,7 +40,7 @@
 static jint result = PASSED;
 static jboolean printdump = JNI_FALSE;
 static jfieldID actual_fid = NULL;
-static jfieldID fids[4] = {NULL, NULL, NULL, NULL};
+static jfieldID fids[4] = { NULL, NULL, NULL, NULL };
 
 void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
         jthread thr, jmethodID method,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw005/setfldw005.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw005/setfldw005.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -49,22 +49,22 @@
 static jboolean printdump = JNI_FALSE;
 static jfieldID actual_fid = NULL;
 static field fields[] = {
-    {"fld0", "J", JNI_TRUE, NULL, "static long"},
-    {"fld1", "J", JNI_FALSE, NULL, "long"},
-    {"fld2", "F", JNI_TRUE, NULL, "static float"},
-    {"fld3", "F", JNI_FALSE, NULL, "float"},
-    {"fld4", "D", JNI_TRUE, NULL, "static double"},
-    {"fld5", "D", JNI_FALSE, NULL, "double"},
-    {"fld6", "Ljava/lang/Object;", JNI_TRUE, NULL, "static Object"},
-    {"fld7", "Ljava/lang/Object;", JNI_FALSE, NULL, "Object"},
-    {"fld8", "Z", JNI_TRUE, NULL, "static boolean"},
-    {"fld9", "Z", JNI_FALSE, NULL, "boolean"},
-    {"fld10", "B", JNI_TRUE, NULL, "static byte"},
-    {"fld11", "B", JNI_FALSE, NULL, "byte"},
-    {"fld12", "S", JNI_TRUE, NULL, "static short"},
-    {"fld13", "S", JNI_FALSE, NULL, "short"},
-    {"fld14", "C", JNI_TRUE, NULL, "static char"},
-    {"fld15", "C", JNI_FALSE, NULL, "char"}
+    { "fld0", "J", JNI_TRUE, NULL, "static long" },
+    { "fld1", "J", JNI_FALSE, NULL, "long" },
+    { "fld2", "F", JNI_TRUE, NULL, "static float" },
+    { "fld3", "F", JNI_FALSE, NULL, "float" },
+    { "fld4", "D", JNI_TRUE, NULL, "static double" },
+    { "fld5", "D", JNI_FALSE, NULL, "double" },
+    { "fld6", "Ljava/lang/Object;", JNI_TRUE, NULL, "static Object" },
+    { "fld7", "Ljava/lang/Object;", JNI_FALSE, NULL, "Object" },
+    { "fld8", "Z", JNI_TRUE, NULL, "static boolean" },
+    { "fld9", "Z", JNI_FALSE, NULL, "boolean" },
+    { "fld10", "B", JNI_TRUE, NULL, "static byte" },
+    { "fld11", "B", JNI_FALSE, NULL, "byte" },
+    { "fld12", "S", JNI_TRUE, NULL, "static short" },
+    { "fld13", "S", JNI_FALSE, NULL, "short" },
+    { "fld14", "C", JNI_TRUE, NULL, "static char" },
+    { "fld15", "C", JNI_FALSE, NULL, "char" }
 };
 
 void JNICALL FieldAccess(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw001/setfmodw001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw001/setfmodw001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -48,12 +48,12 @@
 static jvmtiCapabilities caps;
 static jint result = PASSED;
 static field fields[] = {
-    {"nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld0", "I", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld1", "I", 1, NULL, NULL},
-    {"nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld2",
-        "Lnsk/jvmti/SetFieldModificationWatch/setfmodw001a;", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldModificationWatch/setfmodw001a", "fld3", "[I", 0, NULL, NULL},
-    {"nsk/jvmti/SetFieldModificationWatch/setfmodw001b", "fld4", "F", 0, NULL, NULL},
+    { "nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld0", "I", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld1", "I", 1, NULL, NULL },
+    { "nsk/jvmti/SetFieldModificationWatch/setfmodw001", "fld2",
+      "Lnsk/jvmti/SetFieldModificationWatch/setfmodw001a;", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldModificationWatch/setfmodw001a", "fld3", "[I", 0, NULL, NULL },
+    { "nsk/jvmti/SetFieldModificationWatch/setfmodw001b", "fld4", "F", 0, NULL, NULL },
 };
 
 void setWatch(JNIEnv *env, jint ind) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw003/setfmodw003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw003/setfmodw003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -51,10 +51,10 @@
 static char actual_sig = '\0';
 static jint actual_val = 0;
 static field flds[] = {
-    {"fld0", 'I', JNI_TRUE, 42, NULL},
-    {"fld1", 'I', JNI_TRUE, 43, NULL},
-    {"fld2", 'I', JNI_FALSE, 44, NULL},
-    {"fld3", 'I', JNI_FALSE, 45, NULL}
+    { "fld0", 'I', JNI_TRUE, 42, NULL },
+    { "fld1", 'I', JNI_TRUE, 43, NULL },
+    { "fld2", 'I', JNI_FALSE, 44, NULL },
+    { "fld3", 'I', JNI_FALSE, 45, NULL }
 };
 
 void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw004/setfmodw004.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw004/setfmodw004.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -51,10 +51,10 @@
 static char actual_sig = '\0';
 static jint actual_val = 0;
 static field flds[] = {
-    {"fld0", 'I', JNI_TRUE, 96, NULL},
-    {"fld1", 'I', JNI_TRUE, 97, NULL},
-    {"fld2", 'I', JNI_FALSE, 98, NULL},
-    {"fld3", 'I', JNI_FALSE, 99, NULL}
+    { "fld0", 'I', JNI_TRUE, 96, NULL },
+    { "fld1", 'I', JNI_TRUE, 97, NULL },
+    { "fld2", 'I', JNI_FALSE, 98, NULL },
+    { "fld3", 'I', JNI_FALSE, 99, NULL }
 };
 
 void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw005/setfmodw005.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetFieldModificationWatch/setfmodw005/setfmodw005.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -52,22 +52,22 @@
 static char actual_sig = '\0';
 static jvalue actual_val = {};
 static field flds[] = {
-    {"fld0", "J", JNI_TRUE, "static long", NULL, {} },
-    {"fld1", "J", JNI_FALSE, "long", NULL, {} },
-    {"fld2", "F", JNI_TRUE, "static float", NULL, {} },
-    {"fld3", "F", JNI_FALSE, "float", NULL, {} },
-    {"fld4", "D", JNI_TRUE, "static double", NULL, {} },
-    {"fld5", "D", JNI_FALSE, "double", NULL, {} },
-    {"fld6", "Ljava/lang/Object;", JNI_TRUE, "static Object", NULL, {} },
-    {"fld7", "Ljava/lang/Object;", JNI_FALSE, "Object", NULL, {} },
-    {"fld8", "Z", JNI_TRUE, "static boolean", NULL, {} },
-    {"fld9", "Z", JNI_FALSE, "boolean", NULL, {} },
-    {"fld10", "B", JNI_TRUE, "static byte", NULL, {} },
-    {"fld11", "B", JNI_FALSE, "byte", NULL, {} },
-    {"fld12", "S", JNI_TRUE, "static short", NULL, {} },
-    {"fld13", "S", JNI_FALSE, "short", NULL, {} },
-    {"fld14", "C", JNI_TRUE, "static char", NULL, {} },
-    {"fld15", "C", JNI_FALSE, "char", NULL, {} }
+    { "fld0", "J", JNI_TRUE, "static long", NULL, {} },
+    { "fld1", "J", JNI_FALSE, "long", NULL, {} },
+    { "fld2", "F", JNI_TRUE, "static float", NULL, {} },
+    { "fld3", "F", JNI_FALSE, "float", NULL, {} },
+    { "fld4", "D", JNI_TRUE, "static double", NULL, {} },
+    { "fld5", "D", JNI_FALSE, "double", NULL, {} },
+    { "fld6", "Ljava/lang/Object;", JNI_TRUE, "static Object", NULL, {} },
+    { "fld7", "Ljava/lang/Object;", JNI_FALSE, "Object", NULL, {} },
+    { "fld8", "Z", JNI_TRUE, "static boolean", NULL, {} },
+    { "fld9", "Z", JNI_FALSE, "boolean", NULL, {} },
+    { "fld10", "B", JNI_TRUE, "static byte", NULL, {} },
+    { "fld11", "B", JNI_FALSE, "byte", NULL, {} },
+    { "fld12", "S", JNI_TRUE, "static short", NULL, {} },
+    { "fld13", "S", JNI_FALSE, "short", NULL, {} },
+    { "fld14", "C", JNI_TRUE, "static char", NULL, {} },
+    { "fld15", "C", JNI_FALSE, "char", NULL, {} }
 };
 
 void JNICALL FieldModification(jvmtiEnv *jvmti_env, JNIEnv *env,
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetSystemProperty/setsysprop003/setsysprop003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -41,9 +41,9 @@
 } PropertyDesc;
 
 static PropertyDesc propDescList[PROPERTIES_COUNT] = {
-    {"nsk.jvmti.test.property", "new value of nsk.jvmti.test.property"},
-    {"nsk.jvmti.test.property.empty.old", "new value of nsk.jvmti.test.property.emply.old"},
-    {"nsk.jvmti.test.property.empty.new", ""}
+    { "nsk.jvmti.test.property", "new value of nsk.jvmti.test.property" },
+    { "nsk.jvmti.test.property.empty.old", "new value of nsk.jvmti.test.property.emply.old" },
+    { "nsk.jvmti.test.property.empty.new", "" }
 };
 
 /* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SingleStep/singlestep001/singlestep001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SingleStep/singlestep001/singlestep001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -48,7 +48,7 @@
     "([Ljava/lang/String;Ljava/io/PrintStream;)I"
 };
 
-static volatile long stepEv[] = {0, 0};
+static volatile long stepEv[] = { 0, 0 };
 
 static const char *CLASS_SIG =
     "Lnsk/jvmti/SingleStep/singlestep001;";
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SingleStep/singlestep003/singlestep003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SingleStep/singlestep003/singlestep003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -39,19 +39,19 @@
 /* tested methods */
 #define METH_NUM 4
 static const char *METHODS[][2] = {
-    {"bpMethod", "()V"},
-    {"nativeMethod", "()V"},
-    {"anotherNativeMethod", "(I)V"},
-    {"runThis", "([Ljava/lang/String;Ljava/io/PrintStream;)I"}
+    { "bpMethod", "()V" },
+    { "nativeMethod", "()V" },
+    { "anotherNativeMethod", "(I)V" },
+    { "runThis", "([Ljava/lang/String;Ljava/io/PrintStream;)I" }
 };
 
 /* event counters for the tested methods and expected numbers
  of the events */
 static volatile long stepEv[][2] = {
-    {0, 1},
-    {0, 0},
-    {0, 0},
-    {0, 1}
+    { 0, 1 },
+    { 0, 0 },
+    { 0, 0 },
+    { 0, 1 }
 };
 
 static const char *CLASS_SIG =
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM05/em05t001/em05t001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM05/em05t001/em05t001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -65,8 +65,8 @@
 
 /* descriptions of tested methods */
 static MethodDesc methodsDesc[METHODS_COUNT] = {
-    {"javaMethod", "(I)I", NULL, 0, 0, 0},
-    {"nativeMethod", "(I)I", NULL, 0, 0, 0}
+    { "javaMethod", "(I)I", NULL, 0, 0, 0 },
+    { "nativeMethod", "(I)I", NULL, 0, 0, 0 }
 };
 
 /* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM05/em05t002/em05t002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/events/EM05/em05t002/em05t002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -71,8 +71,8 @@
 
 /* descriptions of tested methods */
 static MethodDesc methodsDesc[METHODS_COUNT] = {
-    {"javaMethod", "(I)I", NULL, 0, {}, {} },
-    {"nativeMethod", "(I)I", NULL, 0, {}, {} }
+    { "javaMethod", "(I)I", NULL, 0, {}, {} },
+    { "nativeMethod", "(I)I", NULL, 0, {}, {} }
 };
 
 /* current compilation moment */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI03/ji03t002/ji03t002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -53,8 +53,8 @@
 } methInfo;
 
 static methInfo meth_info[] = {
-    {0, "statMeth", "(I)D", NULL, "statMeth_calls", NULL, 0, 0},
-    {1, "voidMeth", "()V", NULL, "voidMeth_calls", NULL, 0, 0}
+    { 0, "statMeth", "(I)D", NULL, "statMeth_calls", NULL, 0, 0 },
+    { 1, "voidMeth", "()V", NULL, "voidMeth_calls", NULL, 0, 0 }
 };
 
 /* the original JNI function table */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t001/sp02t001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -50,12 +50,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", 2, NULL},
-    {"threadEntering", 2, NULL},
-    {"threadWaiting", 2, NULL},
-    {"threadSleeping", 2, NULL},
-    {"threadRunningInterrupted", 2, NULL},
-    {"threadRunningNative", 2, NULL}
+    { "threadRunning", 2, NULL },
+    { "threadEntering", 2, NULL },
+    { "threadWaiting", 2, NULL },
+    { "threadSleeping", 2, NULL },
+    { "threadRunningInterrupted", 2, NULL },
+    { "threadRunningNative", 2, NULL }
 };
 
 /* ============================================================================= */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t002/sp02t002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -54,12 +54,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadEntering", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadWaiting", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadSleeping", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadRunningInterrupted", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadRunningNative", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION}
+    { "threadRunning", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadEntering", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadWaiting", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadSleeping", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadRunningInterrupted", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadRunningNative", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION }
 };
 
 /* indexes of known threads */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP02/sp02t003/sp02t003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -54,12 +54,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadEntering", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadWaiting", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadSleeping", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadRunningInterrupted", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION},
-    {"threadRunningNative", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION}
+    { "threadRunning", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadEntering", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadWaiting", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadSleeping", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadRunningInterrupted", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION },
+    { "threadRunningNative", "testedMethod", "()V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION }
 };
 
 /* indexes of known threads */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t001/sp06t001.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -62,12 +62,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE},
-    {"threadEntering", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE},
-    {"threadWaiting", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE},
-    {"threadSleeping", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE},
-    {"threadRunningInterrupted", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE},
-    {"threadRunningNative", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE}
+    { "threadRunning", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE },
+    { "threadEntering", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE },
+    { "threadWaiting", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE },
+    { "threadSleeping", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE },
+    { "threadRunningInterrupted", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE },
+    { "threadRunningNative", "testedMethod", "(ZI)V", 2, NULL, NULL, NULL, NSK_FALSE }
 };
 
 /* indexes of known threads */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t002/sp06t002.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -62,12 +62,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadEntering", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadWaiting", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadSleeping", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadRunningInterrupted", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadRunningNative", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE}
+    { "threadRunning", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadEntering", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadWaiting", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadSleeping", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadRunningInterrupted", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadRunningNative", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE }
 };
 
 /* indexes of known threads */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/sampling/SP06/sp06t003/sp06t003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -62,12 +62,12 @@
 
 /* descriptions of tested threads */
 static ThreadDesc threadsDesc[THREADS_COUNT] = {
-    {"threadRunning", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadEntering", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadWaiting", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadSleeping", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadRunningInterrupted", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE},
-    {"threadRunningNative", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE}
+    { "threadRunning", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadEntering", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadWaiting", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadSleeping", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadRunningInterrupted", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE },
+    { "threadRunningNative", "testedMethod", "(ZI)V", NULL, NULL, NULL, NSK_JVMTI_INVALID_JLOCATION, NSK_FALSE }
 };
 
 /* indexes of known threads */
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/MethodBind/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/MethodBind/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,8 +29,8 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/StackTrace/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/StackTrace/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -32,8 +32,8 @@
 
 extern "C" {
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/AddToBootstrapClassLoaderSearch/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/AddToBootstrapClassLoaderSearch/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,8 +29,8 @@
 
 extern "C" {
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/Dispose/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/Dispose/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,8 +29,8 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/ForceGarbageCollection/gc/gc.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/ForceGarbageCollection/gc/gc.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,7 +29,7 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
 #define THREADS_LIMIT 8
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/environment/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/environment/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,8 +29,8 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendMonitorInfo/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendMonitorInfo/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -29,8 +29,8 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendStackTrace/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/nosuspendStackTrace/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -28,8 +28,8 @@
 
 extern "C" {
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/rawmonitor/rawmonitor.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/functions/rawmonitor/rawmonitor.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -51,8 +51,8 @@
 extern "C" {
 
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf(" unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf(" unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf(" %d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/setNullVMInit/JvmtiTest/JvmtiTest.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/unit/setNullVMInit/JvmtiTest/JvmtiTest.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -38,8 +38,8 @@
 
 extern "C" {
 
-#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res;}
-#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res;}
+#define JVMTI_ERROR_CHECK(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); return res; }
+#define JVMTI_ERROR_CHECK_EXPECTED_ERROR(str,res,err) if (res != err) { printf(str); printf("unexpected error %d\n",res); return res; }
 
 #define JVMTI_ERROR_CHECK_VOID(str,res) if (res != JVMTI_ERROR_NONE) { printf(str); printf("%d\n",res); iGlobalStatus = 2; }
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch_agent.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/AddToBootstrapClassLoaderSearch/bootclssearch_agent.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -37,7 +37,7 @@
 static char segment1[3000] = "";
 static char segment2[3000] = "";
 
-static const char* const illegal_segments[] = {"", "tmp/"};
+static const char* const illegal_segments[] = { "", "tmp/" };
 
 jboolean use_segment2 = JNI_FALSE;
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/AddToSystemClassLoaderSearch/systemclssearch_agent.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/AddToSystemClassLoaderSearch/systemclssearch_agent.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -37,7 +37,7 @@
 static char segment1[3000] = "";
 static char segment2[3000] = "";
 
-static const char* const illegal_segments[] = {"", "tmp/"};
+static const char* const illegal_segments[] = { "", "tmp/" };
 
 jboolean use_segment2 = JNI_FALSE;
 
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/Injector.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -494,7 +494,7 @@
                 //    verification_type_info locals[number_of_locals];
                 //    u2 number_of_stack_items;
                 //    verification_type_info stack[number_of_stack_items];
-                //}
+                // }
 
                 put_u1(FULL_FRAME);
                 frameOffsetDelta = get_u2();
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/agent_tools.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jvmti/agent_tools.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -42,7 +42,7 @@
 static void* agentThreadArg = NULL;
 
 
-typedef enum {NEW, RUNNABLE, WAITING, SUSPENDED, TERMINATED} thread_state_t;
+typedef enum { NEW, RUNNABLE, WAITING, SUSPENDED, TERMINATED } thread_state_t;
 
 typedef struct agent_data_t {
     volatile thread_state_t thread_state;
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/native/nsk_tools.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -43,7 +43,7 @@
     int verbose;
     int tracing;
     int nComplains;
-} nsk_context = {NSK_FALSE, NSK_TRACE_NONE, 0};
+} nsk_context = { NSK_FALSE, NSK_TRACE_NONE, 0 };
 
 void nsk_setVerboseMode(int verbose) {
     nsk_context.verbose = verbose;
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/jni/libjnistress003.cpp	Tue Dec 04 13:35:04 2018 +0530
@@ -68,7 +68,7 @@
     arrayArray[DOUBLE]=env->NewDoubleArray(SIZE); CE
 
     for (i=0;i<8;i++)
-    {env->SetObjectArrayElement(objectsArray,i,arrayArray[i]); CE }
+    { env->SetObjectArrayElement(objectsArray,i,arrayArray[i]); CE }
 
     boolBuf=(jboolean *)malloc(SIZE*sizeof(jboolean));
     byteBuf=(jbyte *)malloc(SIZE*sizeof(jbyte));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jaxp/javax/xml/jaxp/unittest/sax/SAXParserTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sax;
+
+import static jaxp.library.JAXPTestUtilities.getSystemProperty;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import org.testng.annotations.Listeners;
+import org.testng.annotations.Test;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/*
+ * @test
+ * @bug 8213734
+ * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
+ * @run testng sax.SAXParserTest
+ * @summary Tests functionalities for SAXParser.
+ */
+@Listeners({ jaxp.library.BasePolicy.class })
+public class SAXParserTest {
+
+    /*
+     * @bug 8213734
+     * Verifies that files opened by the SAXParser is closed when Exception
+     * occurs.
+     */
+    @Test
+    public void testCloseReaders() throws Exception {
+        if (!getSystemProperty("os.name").contains("Windows")) {
+            System.out.println("This test only needs to be run on Windows.");
+            return;
+        }
+        Path testFile = createTestFile(null, "Test");
+        System.out.println("Test file: " + testFile.toString());
+        SAXParserFactory factory = SAXParserFactory.newDefaultInstance();
+        SAXParser parser = factory.newSAXParser();
+        try {
+            parser.parse(testFile.toFile(), new DefaultHandler() {
+                @Override
+                public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+                    throw new SAXException("Stop the parser.");
+                }
+            });
+        } catch (SAXException e) {
+            // Do nothing
+        }
+
+        // deletion failes on Windows when the file is not closed
+        Files.deleteIfExists(testFile);
+    }
+
+    private static Path createTestFile(Path dir, String name) throws IOException {
+        Path path = Files.createTempFile(name, ".xml");
+            byte[] bytes = "<?xml version=\"1.0\"?><test a1=\"x\" a2=\"y\"/>"
+        .getBytes(StandardCharsets.UTF_8);
+
+        Files.write(path, bytes);
+        return path;
+    }
+}
--- a/test/jdk/java/math/BigInteger/PrimitiveConversionTests.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/math/BigInteger/PrimitiveConversionTests.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -63,6 +63,7 @@
     }
 
     public static int testDoubleValue() {
+        System.out.println("--- testDoubleValue ---");
         int failures = 0;
         for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) {
             double expected = Double.parseDouble(big.toString());
@@ -71,7 +72,8 @@
             // should be bitwise identical
             if (Double.doubleToRawLongBits(expected) != Double
                     .doubleToRawLongBits(actual)) {
-                System.out.println(big);
+                System.out.format("big: %s, expected: %f, actual: %f%n",
+                    big, expected, actual);
                 failures++;
             }
         }
@@ -79,6 +81,7 @@
     }
 
     public static int testFloatValue() {
+        System.out.println("--- testFloatValue ---");
         int failures = 0;
         for (BigInteger big : ALL_BIGINTEGER_CANDIDATES) {
             float expected = Float.parseFloat(big.toString());
@@ -87,7 +90,8 @@
             // should be bitwise identical
             if (Float.floatToRawIntBits(expected) != Float
                     .floatToRawIntBits(actual)) {
-                System.out.println(big + " " + expected + " " + actual);
+                System.out.format("big: %s, expected: %f, actual: %f%n",
+                    big, expected, actual);
                 failures++;
             }
         }
--- a/test/jdk/java/net/URL/HandlerLoop.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/net/URL/HandlerLoop.java	Tue Dec 04 13:35:04 2018 +0530
@@ -21,16 +21,19 @@
  * questions.
  */
 
-import java.io.*;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.net.URLStreamHandlerFactory;
+
 /*
  * @test
  * @bug 4135031
- * @summary Test boostrap problem when a URLStreamHandlerFactory is loaded
+ * @summary Test bootstrap problem when a URLStreamHandlerFactory is loaded
  *          by the application class loader.
- *
+ * @modules java.base/sun.net.www.protocol.file
+ * @run main HandlerLoop
  */
-import java.net.*;
-
 public class HandlerLoop {
 
     public static void main(String args[]) throws Exception {
@@ -57,13 +60,13 @@
             // shares the same stream handler factory.
             new Dummy();
             try {
-                Class c = Class.forName(name);
-                return (URLStreamHandler)c.newInstance();
-            } catch (ClassNotFoundException e) {
-                e.printStackTrace();
-            } catch (IllegalAccessException e) {
-                e.printStackTrace();
-            } catch (InstantiationException e) {
+                Class<?> c = Class.forName(name);
+                return (URLStreamHandler)c.getDeclaredConstructor().newInstance();
+            } catch (ClassNotFoundException |
+                    IllegalAccessException |
+                    InstantiationException |
+                    NoSuchMethodException |
+                    InvocationTargetException e) {
                 e.printStackTrace();
             }
             return null;
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4673940 4930794
+ * @bug 4673940 4930794 8211842
  * @summary Unit tests for inetd feature
  * @requires (os.family == "linux" | os.family == "solaris")
  * @library /test/lib
@@ -33,7 +33,7 @@
  *        jdk.test.lib.JDKToolLauncher
  *        jdk.test.lib.Platform
  *        jdk.test.lib.process.*
- *        StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
+ *        UnixSocketTest StateTest StateTestService EchoTest EchoService CloseTest Launcher Util
  * @run testng/othervm/native InheritedChannelTest
  * @key intermittent
  */
@@ -73,6 +73,7 @@
     @DataProvider
     public Object[][] testCases() {
         return new Object[][]{
+            { "UnixSocketTest", List.of(UnixSocketTest.class.getName())},
             { "StateTest", List.of(StateTest.class.getName()) },
             { "EchoTest",  List.of(EchoTest.class.getName())  },
             { "CloseTest", List.of(CloseTest.class.getName()) },
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java	Tue Dec 04 13:35:04 2018 +0530
@@ -62,6 +62,19 @@
         launch0(cmdarray, fd);
     }
 
+
+    /**
+     * Launch 'java' with specified class using a UnixDomainSocket pair linking calling
+     * process to the child VM. UnixDomainSocket is a simplified interface to PF_UNIX sockets
+     * which supports byte a time reads and writes.
+     */
+    public static UnixDomainSocket launchWithUnixDomainSocket(String className) throws IOException {
+        UnixDomainSocket[] socks = UnixDomainSocket.socketpair();
+        launch(className, null, null, socks[0].fd());
+        socks[0].close();
+        return socks[1];
+    }
+
     /*
      * Launch 'java' with specified class with the specified arguments (may be null).
      * The launched process will inherit a connected TCP socket. The remote endpoint
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/UnixDomainSocket.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * A simplified Unix domain socket which can read and write bytes at a time
+ * used for simulating external launchers which use UNIX sockets to talk
+ * the VM.
+ */
+
+import java.io.IOException;
+
+public class UnixDomainSocket {
+
+    static {
+        System.loadLibrary("InheritedChannel");
+        init();
+    }
+
+    private final int fd;
+
+    public UnixDomainSocket(int fd) {
+        this.fd = fd;
+    }
+
+    public int read() throws IOException {
+        return read0(fd);
+    }
+
+    public void write(int w) throws IOException {
+        write0(fd, w);
+    }
+
+    public void close() {
+        close0(fd);
+    }
+
+    public int fd() {
+        return fd;
+    }
+
+    public String toString() {
+        return "UnixDomainSocket: fd=" + Integer.toString(fd);
+    }
+
+    /* read and write bytes with UNIX domain sockets */
+
+    private static native int read0(int fd) throws IOException;
+    private static native void write0(int fd, int w) throws IOException;
+    private static native void close0(int fd);
+    private static native void init();
+    public static native UnixDomainSocket[] socketpair();
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/UnixSocketTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * If the platform has IPv6 we spawn a child process simulating the
+ * effect of being launched from node.js. We check that IPv6 is available in the child
+ * and report back as appropriate.
+ */
+
+import jdk.test.lib.Utils;
+import java.io.*;
+import java.net.InetAddress;
+import java.net.Inet6Address;
+import java.net.NetworkInterface;
+import java.util.Collections;
+import java.util.Enumeration;
+
+public class UnixSocketTest {
+
+    static boolean hasIPv6() throws Exception {
+        Enumeration<NetworkInterface> nets = NetworkInterface.getNetworkInterfaces();
+        for (NetworkInterface netint : Collections.list(nets)) {
+            Enumeration<InetAddress> inetAddresses = netint.getInetAddresses();
+            for (InetAddress inetAddress : Collections.list(inetAddresses)) {
+                if (inetAddress instanceof Inet6Address) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    public static class Child {
+        public static void main(String[] args) throws Exception {
+            System.out.write('X');
+            System.out.flush();
+            if (hasIPv6()) {
+                System.out.println("Y"); // GOOD
+            } else
+                System.out.println("N"); // BAD
+        }
+    }
+
+    public static void main(String args[]) throws Exception {
+
+        if (!hasIPv6()) {
+            return; // can only test if IPv6 is present
+        }
+        UnixDomainSocket sock = Launcher.launchWithUnixDomainSocket("UnixSocketTest$Child");
+        if (sock.read() != 'X') {
+            System.exit(-2);
+        }
+        if (sock.read() != 'Y') {
+            System.exit(-2);
+        }
+    }
+}
--- a/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/libInheritedChannel.c	Tue Dec 04 13:35:04 2018 +0530
@@ -36,6 +36,11 @@
 
 #include "jni.h"
 
+#define CHECK(X) if ((X) == 0) {printf("JNI init error line %d\n", __LINE__); _exit(1);}
+
+static jclass unixSocketClass;
+static jmethodID unixSocketCtor;
+
 /*
  * Throws the exception of the given class name and detail message
  */
@@ -182,3 +187,63 @@
     execvp(cmdv[0], cmdv);
     _exit(-1);
 }
+
+JNIEXPORT void JNICALL Java_UnixDomainSocket_init(JNIEnv *env, jclass cls) {
+    CHECK(unixSocketClass = (*env)->FindClass(env, "UnixDomainSocket"));
+    CHECK(unixSocketClass = (*env)->NewGlobalRef(env, unixSocketClass));
+    CHECK(unixSocketCtor = (*env)->GetMethodID(env, unixSocketClass, "<init>", "(I)V"));
+}
+
+/*
+ * Class:     UnixDomainSocket
+ * Method:    socketpair
+ * Signature: ()[LUnixDomainSocket
+ */
+JNIEXPORT jobjectArray JNICALL Java_UnixDomainSocket_socketpair
+  (JNIEnv *env, jclass cls)
+{
+    int fds[2];
+    jobject socket;
+    jobjectArray result = (*env)->NewObjectArray(env, 2, unixSocketClass, 0);
+    if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+        perror("socketpair");
+        return result;
+    }
+    socket = (*env)->NewObject(env, unixSocketClass, unixSocketCtor, fds[0]);
+    (*env)->SetObjectArrayElement(env, result, 0, socket);
+    socket = (*env)->NewObject(env, unixSocketClass, unixSocketCtor, fds[1]);
+    (*env)->SetObjectArrayElement(env, result, 1, socket);
+    return result;
+}
+
+JNIEXPORT jint JNICALL Java_UnixDomainSocket_read0
+  (JNIEnv *env, jclass cls, jint fd)
+{
+    int ret;
+    unsigned char res;
+    ret = read(fd, &res, 1);
+    if (ret == 0)
+        return -1; /* EOF */
+    else if (ret < 0) {
+        ThrowException(env, "java/io/IOException", "read error");
+        return -1;
+    }
+    return res;
+}
+
+JNIEXPORT void JNICALL Java_UnixDomainSocket_write0
+  (JNIEnv *env, jclass cls, jint fd, jint byte)
+{
+    int ret;
+    unsigned char w = (unsigned char)byte;
+    ret = write(fd, &w, 1);
+    if (ret < 0) {
+        ThrowException(env, "java/io/IOException", "write error");
+    }
+}
+
+JNIEXPORT void JNICALL Java_UnixDomainSocket_close0
+  (JNIEnv *env, jclass cls, jint fd)
+{
+    close(fd);
+}
--- a/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@
         callGetBundle("AbstractRB", InstantiationException.class);
         callGetBundle("BadStaticInitRB", ExceptionInInitializerError.class);
         callGetBundle("UnreadableRB", IOException.class);
+        callGetBundle("NoNoArgConstructorRB", InstantiationException.class);
     }
 
     private static void callGetBundle(String baseName,
--- a/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTest.sh	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTest.sh	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 # 
-# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 # 
 # This code is free software; you can redistribute it and/or modify it
@@ -28,30 +28,29 @@
 # shared with other test cases.)
 # @build MissingResourceCauseTest
 # @build NonResourceBundle PrivateConstructorRB AbstractRB BadStaticInitRB
+#   NoNoArgConstructorRB
 # @run shell MissingResourceCauseTest.sh
 
 case "`uname`" in
-Windows*)
-    DEL=";";
+Windows* | CYGWIN*)
+    exit 0;
     ;;
 *)
     DEL=":";
+    PS="/";
     ;;
 esac
 
 #
 # Create an unreadble properties file
 #
-UNREADABLE=UnreadableRB.properties
+UNREADABLE=${TESTCLASSPATH}${PS}UnreadableRB.properties
 rm -f $UNREADABLE
 echo "type=unreadable" >$UNREADABLE
 chmod 000 $UNREADABLE
 
-: ${TESTCLASS:=.}
-: ${TESTSRC:=.}
-
-${TESTJAVA}/bin/java ${TESTVMOPTS} -esa -cp ${TESTCLASS}${DEL}${TESTSRC} MissingResourceCauseTest
+${TESTJAVA}/bin/java ${TESTVMOPTS} -esa -cp ${TESTCLASSES}${DEL}${TESTSRC} MissingResourceCauseTest
 STATUS=$?
 chmod 666 $UNREADABLE
 rm -f $UNREADABLE
-exit $?
+exit $STATUS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/java/util/ResourceBundle/Control/NoNoArgConstructorRB.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ *
+ */
+
+import java.util.*;
+
+public class NoNoArgConstructorRB extends ListResourceBundle {
+    public NoNoArgConstructorRB(Object o) {
+    }
+    public Object[][] getContents() {
+        return new Object[][] {
+            { "type", "class (no no-arg constructor)" }
+        };
+    }
+}
--- a/test/jdk/sun/nio/cs/TestIBMBugs.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/sun/nio/cs/TestIBMBugs.java	Tue Dec 04 13:35:04 2018 +0530
@@ -174,6 +174,19 @@
         }
     }
 
+    private static void bug8213618 () throws Exception {
+        String cs = "x-IBM970";
+        byte[] ba = new byte[]{(byte)0xA2,(byte)0xC1};
+        String s = "\u25C9";
+        if (!(new String(ba, cs)).equals(s))
+            throw new Exception("Cp970 failed");
+        if (!Arrays.equals(ba, s.getBytes(cs)))
+            throw new Exception("Cp970 failed");
+        ba = new byte[]{0x3f,0x3f,0x3f};
+        if (!Arrays.equals(ba, "\u6950\u84f1\ucf7f".getBytes(cs)))
+            throw new Exception("Cp970 failed");
+    }
+
     private static void bug8202329() throws Exception {
         String original = "\\\u007E\u00A5\u203E"; // [backslash][tilde][yen][overscore]
         byte[] expectedBytes; // bytes after conversion
@@ -232,5 +245,6 @@
         bug6371431();
         bug6569191();
         bug8202329();
+        bug8213618();
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/mscapi/PrngSerialize.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8210476
+ * @requires os.family == "windows"
+ * @summary MSCAPI's PRNG should support serialization
+ * @library /test/lib
+ * @run main PrngSerialize
+ */
+
+import jdk.test.lib.util.SerializationUtils;
+
+import java.security.SecureRandom;
+
+public class PrngSerialize {
+
+    public static void main(String[] args) throws Exception {
+        SecureRandom sr = SecureRandom.getInstance("Windows-PRNG", "SunMSCAPI");
+        sr = (SecureRandom) SerializationUtils.deserialize(SerializationUtils.serialize(sr));
+
+        // This line is likely to release the context in the original sr.
+        System.gc();
+
+        // Make sure the new object is still useable.
+        sr.nextInt();
+    }
+}
--- a/test/jdk/sun/security/mscapi/PrngSlow.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/sun/security/mscapi/PrngSlow.java	Tue Dec 04 13:35:04 2018 +0530
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug 6449335
+ * @bug 6449335 8210476
  * @requires os.family == "windows"
  * @summary MSCAPI's PRNG is too slow
  * @key randomness
@@ -44,7 +44,7 @@
         };
         t = (System.nanoTime() - start) / 1000000000.0;
         System.err.println("\nSpend " + t + " seconds");
-        if (t > 5)
+        if (t > 0.5)
             throw new RuntimeException("Still too slow");
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/sun/security/ssl/SSLSessionContextImpl/DefautlCacheSize.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8210985
+ * @summary Update the default SSL session cache size to 20480
+ * @run main/othervm DefautlCacheSize
+ */
+
+// The SunJSSE provider cannot use System Properties in samevm/agentvm mode.
+// Please run JSSE test in othervm mode.
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLServerSocketFactory;
+import javax.net.ssl.SSLSessionContext;
+
+public class DefautlCacheSize {
+
+    public static void main(String[] args) throws Exception {
+        SSLServerSocketFactory sssf =
+                (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
+
+        try (SSLServerSocket serverSocket =
+                    (SSLServerSocket)sssf.createServerSocket()) {
+
+            String[] protocols = serverSocket.getSupportedProtocols();
+            for (int i = 0; i < protocols.length; i++) {
+                if (protocols[i].equals("SSLv2Hello")) {
+                    continue;
+                }
+                SSLContext sslContext = SSLContext.getInstance(protocols[i]);
+                SSLSessionContext sessionContext =
+                        sslContext.getServerSessionContext();
+                if (sessionContext.getSessionCacheSize() == 0) {
+                    throw new Exception(
+                        "the default server session cache size is infinite");
+                }
+
+                sessionContext = sslContext.getClientSessionContext();
+                if (sessionContext.getSessionCacheSize() == 0) {
+                    throw new Exception(
+                        "the default client session cache size is infinite");
+                }
+            }
+        }
+    }
+}
--- a/test/jdk/sun/security/tools/keytool/DeprecateKeyalg.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/sun/security/tools/keytool/DeprecateKeyalg.java	Tue Dec 04 13:35:04 2018 +0530
@@ -26,7 +26,7 @@
 
 /**
  * @test
- * @bug 8212003
+ * @bug 8212003 8214179
  * @summary Deprecating the default keytool -keyalg option
  * @library /test/lib
  */
@@ -55,6 +55,15 @@
                 .shouldContain("Generated")
                 .shouldContain("default key algorithm (DES)")
                 .shouldContain("-keyalg option must be specified");
+
+        kt("-genkeypair -alias e -dname CN=e -keyalg EC -groupname brainpoolP256r1")
+                .shouldContain("Generating 256 bit EC (brainpoolP256r1) key pair");
+
+        kt("-genkeypair -alias f -dname CN=f -keyalg EC")
+                .shouldContain("Generating 256 bit EC (secp256r1) key pair");
+
+        kt("-genkeypair -alias g -dname CN=g -keyalg EC -keysize 384")
+                .shouldContain("Generating 384 bit EC (secp384r1) key pair");
     }
 
     private static OutputAnalyzer kt(String cmd) throws Throwable {
--- a/test/jdk/sun/security/tools/keytool/GroupName.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/jdk/sun/security/tools/keytool/GroupName.java	Tue Dec 04 13:35:04 2018 +0530
@@ -31,7 +31,7 @@
 
 /**
  * @test
- * @bug 8213400
+ * @bug 8213400 8214179
  * @summary Support choosing group name in keytool keypair generation
  * @library /test/lib
  */
@@ -69,6 +69,10 @@
                 .shouldHaveExitValue(0)
                 .shouldNotContain("Specifying -keysize for generating EC keys is deprecated");
         checkCurveName("f", "brainpoolP256r1");
+
+        kt("-list -v")
+                .shouldHaveExitValue(0)
+                .shouldContain("Subject Public Key Algorithm: 256-bit EC (secp256r1) key");
     }
 
     private static void checkCurveName(String a, String name)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/launcher/JliLaunchTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8213362
+ * @comment Test JLI_Launch for tools distributed outside JDK
+ * @library /test/lib
+ * @run main/native JliLaunchTest
+ */
+
+import java.util.Map;
+import jdk.test.lib.Utils;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public class JliLaunchTest {
+    public static void main(String[] args) throws IOException {
+        Path launcher = Paths.get(System.getProperty("test.nativepath"),
+            "JliLaunchTest" + (Platform.isWindows() ? ".exe" : ""));
+        System.out.println("Launcher = " + launcher + (Files.exists(launcher) ? " (exists)" : " (not exists)"));
+        ProcessBuilder pb = new ProcessBuilder(launcher.toString(), "--version");
+        Map<String, String> env = pb.environment();
+        if (Platform.isWindows()) {
+            // The DLL should be in JDK/bin
+        } else {
+            String libdir = Paths.get(Utils.TEST_JDK).resolve("lib").toAbsolutePath().toString();
+            String LD_LIBRARY_PATH = Platform.isOSX() ? "DYLD_LIBRARY_PATH" : "LD_LIBRARY_PATH";
+            env.compute(LD_LIBRARY_PATH, (k, v) -> (k == null) ? libdir : v + ":" + libdir);
+        }
+
+        OutputAnalyzer outputf = new OutputAnalyzer(pb.start());
+        outputf.shouldHaveExitValue(0);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/tools/launcher/exeJliLaunchTest.c	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+
+/*
+ * This file contains the main entry point into the launcher code
+ * this is the only file which will be repeatedly compiled by other
+ * tools. The rest of the files will be linked in.
+ */
+
+#include "java.h"
+
+int
+main(int argc, char **argv)
+{
+    return JLI_Launch(argc, argv,
+                   0, NULL,
+                   0, NULL,
+                   "1", "0",
+                   *argv, *argv,
+                   0, 0, 0, 0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/vm/JniInvocationTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 8213362
+ * @comment Test uses custom launcher that starts VM using JNI via libjli, only for MacOS
+ * @requires os.family == "mac"
+ * @library /test/lib
+ * @run main/native JniInvocationTest
+ */
+
+import java.util.Map;
+import jdk.test.lib.Utils;
+import jdk.test.lib.process.OutputAnalyzer;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+public class JniInvocationTest {
+    public static void main(String[] args) throws IOException {
+        Path launcher = Paths.get(System.getProperty("test.nativepath"), "JniInvocationTest");
+        System.out.println("Launcher = " + launcher + (Files.exists(launcher) ? " (exists)" : " (not exists)"));
+        ProcessBuilder pb = new ProcessBuilder(launcher.toString());
+        Map<String, String> env = pb.environment();
+        String libdir = Paths.get(Utils.TEST_JDK).resolve("lib").toAbsolutePath().toString();
+        env.compute("DYLD_LIBRARY_PATH", (k, v) -> (k == null) ? libdir : v + ":" + libdir);
+        OutputAnalyzer outputf = new OutputAnalyzer(pb.start());
+        outputf.shouldHaveExitValue(0);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/vm/exeJniInvocationTest.c	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "jni.h"
+#include "stdio.h"
+#include "stdlib.h"
+
+int main(int argc, char** args) {
+    JavaVMInitArgs vm_args;
+    JNIEnv *env;
+    JavaVM *vm;
+    int i =0;
+    jint result;
+
+    vm_args.version = JNI_VERSION_1_2;
+    vm_args.ignoreUnrecognized = JNI_FALSE;
+
+    JavaVMOption option1[2];
+    option1[0].optionString="-XX:+PrintCommandLineFlags";
+    option1[1].optionString="-Xrs";
+
+    vm_args.options=option1;
+    vm_args.nOptions=2;
+
+    // Print the VM options in use
+    printf("initVM: numOptions = %d\n", vm_args.nOptions);
+    for (i = 0; i < vm_args.nOptions; i++)
+    {
+        printf("\tvm_args.options[%d].optionString = %s\n", i, vm_args.options[i].optionString);
+    }
+
+    // Initialize VM with given options
+    result = JNI_CreateJavaVM( &vm, (void **) &env, &vm_args );
+    if (result != 0) {
+        printf("ERROR: cannot create JAVA VM.\n");
+        exit(-1);
+    }
+
+    (*vm)->DestroyJavaVM(vm);
+}
+
--- a/test/langtools/jdk/jshell/KullaTesting.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/langtools/jdk/jshell/KullaTesting.java	Tue Dec 04 13:35:04 2018 +0530
@@ -737,7 +737,7 @@
                 expectedSubKind, unressz, othersz);
         String signature = var.typeName();
         assertEquals(signature, expectedTypeName,
-                "Expected " + var.source() + " to have the name: " +
+                "Expected " + var.source() + " to have the type name: " +
                         expectedTypeName + ", got: " + signature);
     }
 
--- a/test/langtools/jdk/jshell/VariablesTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/langtools/jdk/jshell/VariablesTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8144903 8177466 8191842 8211694
+ * @bug 8144903 8177466 8191842 8211694 8213725
  * @summary Tests for EvaluationState.variables
  * @library /tools/lib
  * @modules jdk.compiler/com.sun.tools.javac.api
@@ -492,6 +492,21 @@
         assertVarDeclRedefNoInit("String", "s", "\"hi\"", "null");
     }
 
+    public void badPkgVarDecl() {
+        Compiler compiler = new Compiler();
+        Path nopkgdirpath = Paths.get("cp", "xyz");
+        compiler.compile(nopkgdirpath,
+                "public class TestZ { public static int V = 0; }\n");
+        assertDeclareFail("import static xyz.TestZ.V;",
+                        "compiler.err.cant.access");
+
+
+        VarSnippet v1 = varKey(assertEval("var v = xyz.TestZ.V;", IGNORE_VALUE, null,
+                DiagCheck.DIAG_ERROR, DiagCheck.DIAG_OK, added(RECOVERABLE_NOT_DEFINED)));
+        assertVariableDeclSnippet(v1, "v", "java.lang.Object", RECOVERABLE_NOT_DEFINED, SubKind.VAR_DECLARATION_WITH_INITIALIZER_SUBKIND, 0, 1);
+        assertEval("1+1", "2");
+    }
+
     private void assertVarDeclRedefNoInit(String typeName, String name, String value, String dvalue) {
         assertVarDeclRedefNoInit(typeName, name, value, value, dvalue);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,11 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8206325
+ * @summary AssertionError in TypeSymbol.getAnnotationTypeMetadata
+ * @compile/fail/ref=AtNonAnnotationTypeTest.out -XDrawDiagnostics -XDdev AtNonAnnotationTypeTest.java
+ */
+
+import java.lang.annotation.Annotation;
+class AtNonAnnotationTypeTest<Override extends Annotation> {
+  AtNonAnnotationTypeTest(@Override String foo) {}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/annotations/AtNonAnnotationTypeTest.out	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,2 @@
+AtNonAnnotationTypeTest.java:10:28: compiler.err.not.annotation.type: Override
+1 error
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/file/SymLinkArchiveTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2018, Google LLC. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8181897
+ * @summary
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.jdeps/com.sun.tools.classfile
+ * @build toolbox.JavacTask toolbox.TestRunner toolbox.ToolBox
+ * @run main SymLinkArchiveTest
+ */
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.jar.JarEntry;
+import java.util.jar.JarOutputStream;
+import toolbox.JavacTask;
+import toolbox.Task.Expect;
+import toolbox.Task.OutputKind;
+import toolbox.Task.Result;
+import toolbox.TestRunner;
+import toolbox.TestRunner.Test;
+import toolbox.ToolBox;
+
+public class SymLinkArchiveTest extends TestRunner {
+    public static void main(String... args) throws Exception {
+        new SymLinkArchiveTest().runTests(m -> new Object[] {Paths.get(m.getName())});
+    }
+
+    private final ToolBox tb = new ToolBox();
+
+    public SymLinkArchiveTest() {
+        super(System.err);
+    }
+
+    @Test
+    public void testJarSymlink(Path base) throws Exception {
+        Files.createDirectories(base);
+        Path classpath = base.resolve("CLASSPATH");
+        try (JarOutputStream jos = new JarOutputStream(Files.newOutputStream(classpath))) {
+            jos.putNextEntry(new JarEntry("p/B.class"));
+            jos.write(new byte[10]);
+        }
+        Path javaFile = base.resolve("T.java");
+        tb.writeFile(javaFile, "class T extends p.B {}");
+
+        Path jar = base.resolve("lib.jar");
+        Files.createSymbolicLink(jar, classpath.getFileName());
+
+        Result result = new JavacTask(tb).files(javaFile).classpath(jar).run(Expect.FAIL);
+        String output = result.getOutput(OutputKind.DIRECT);
+
+        String expected = jar + "(/p/B.class)";
+        if (!output.contains(expected)) {
+            throw new AssertionError(
+                    "expected output to contain: " + expected + "\nwas:\n" + output);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/CRT.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8214031
+ * @summary Test the CharacterRangeTable generated for switch expressions
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.main
+ *          jdk.jdeps/com.sun.tools.javap
+ * @build toolbox.Assert toolbox.ToolBox toolbox.JavacTask
+ * @run main CRT
+ */
+
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.stream.Collectors;
+
+import toolbox.JavacTask;
+import toolbox.JavapTask;
+import toolbox.Task.OutputKind;
+import toolbox.ToolBox;
+
+public class CRT {
+    public static void main(String... args) throws Exception {
+        new CRT().run();
+    }
+
+    private ToolBox tb = new ToolBox();
+
+    private void run() throws Exception {
+        doTest("    private String convert(int i) {\n" +
+               "        String res;" +
+               "        switch (i) {\n" +
+               "            case 0: res = \"a\"; break;\n" +
+               "            default: res = \"\"; break;\n" +
+               "        };\n" +
+               "        return res;\n" +
+               "    }\n",
+               "CharacterRangeTable:\n" +
+               "             0,  0,    c24,    c25,    8        //  0,  0,    3:36,    3:37, flow-controller\n" +
+               "            20, 22,   1015,   101f,    1        // 20, 22,    4:21,    4:31, statement\n" +
+               "            23, 25,   1020,   1026,    1        // 23, 25,    4:32,    4:38, statement\n" +
+               "            20, 25,   1015,   1026,   10        // 20, 25,    4:21,    4:38, flow-target\n" +
+               "            26, 28,   1416,   141f,    1        // 26, 28,    5:22,    5:31, statement\n" +
+               "            29, 31,   1420,   1426,    1        // 29, 31,    5:32,    5:38, statement\n" +
+               "            26, 31,   1416,   1426,   10        // 26, 31,    5:22,    5:38, flow-target\n" +
+               "             0, 31,    c1c,   180a,    1        //  0, 31,    3:28,    6:10, statement\n" +
+               "            32, 33,   1c09,   1c14,    1        // 32, 33,    7:09,    7:20, statement\n" +
+               "             0, 33,    823,   2006,    2        //  0, 33,    2:35,    8:06, block\n");
+        doTest("    private String convert(int i) {\n" +
+               "        return switch (i) {\n" +
+               "            case 0 -> \"a\";\n" +
+               "            default -> \"\";\n" +
+               "        };\n" +
+               "    }\n",
+               "CharacterRangeTable:\n" +
+               "             0,  0,    c18,    c19,    8        //  0,  0,    3:24,    3:25, flow-controller\n" +
+               "            20, 24,   1017,   101b,   11        // 20, 24,    4:23,    4:27, statement, flow-target\n" +
+               "            25, 29,   1418,   141b,   11        // 25, 29,    5:24,    5:27, statement, flow-target\n" +
+               "             0, 30,    c09,   180b,    1        //  0, 30,    3:09,    6:11, statement\n" +
+               "             0, 30,    823,   1c06,    2        //  0, 30,    2:35,    7:06, block");
+        doTest("    private boolean convert(int i) {\n" +
+               "        return switch (i) {\n" +
+               "            case 0 -> true;\n" +
+               "            default -> false;\n" +
+               "        } && i == 0;\n" +
+               "    }\n",
+               "CharacterRangeTable:\n" +
+               "             0,  0,    c18,    c19,    8        //  0,  0,    3:24,    3:25, flow-controller\n" +
+               "            20, 22,   1017,   101c,   11        // 20, 22,    4:23,    4:28, statement, flow-target\n" +
+               "            23, 25,   1418,   141e,   11        // 23, 25,    5:24,    5:30, statement, flow-target\n" +
+               "             0, 25,    c10,   180a,    8        //  0, 25,    3:16,    6:10, flow-controller\n" +
+               "            26, 26,   180e,   1814,   10        // 26, 26,    6:14,    6:20, flow-target\n" +
+               "             0, 35,    c09,   1815,    1        //  0, 35,    3:09,    6:21, statement\n" +
+               "             0, 35,    824,   1c06,    2        //  0, 35,    2:36,    7:06, block\n");
+        doTest("    private boolean convert(int i) {\n" +
+               "        return i >= 0 ? i == 0\n" +
+               "                        ? true\n" +
+               "                        : false\n" +
+               "                      : i == -1\n" +
+               "                        ? false\n" +
+               "                        : true;\n" +
+               "    }\n",
+               "CharacterRangeTable:\n" +
+               "             0,  0,    c10,    c16,    8        //  0,  0,    3:16,    3:22, flow-controller\n" +
+               "             1,  3,    c10,    c16,  100        //  1,  3,    3:16,    3:22, branch-false\n" +
+               "             4,  4,    c19,    c1f,    8        //  4,  4,    3:25,    3:31, flow-controller\n" +
+               "             5,  7,    c19,    c1f,  100        //  5,  7,    3:25,    3:31, branch-false\n" +
+               "             8,  8,   101b,   101f,   10        //  8,  8,    4:27,    4:31, flow-target\n" +
+               "            12, 12,   141b,   1420,   10        // 12, 12,    5:27,    5:32, flow-target\n" +
+               "             4, 12,    c19,   1420,   10        //  4, 12,    3:25,    5:32, flow-target\n" +
+               "            16, 17,   1819,   1820,    8        // 16, 17,    6:25,    6:32, flow-controller\n" +
+               "            18, 20,   1819,   1820,  100        // 18, 20,    6:25,    6:32, branch-false\n" +
+               "            21, 21,   1c1b,   1c20,   10        // 21, 21,    7:27,    7:32, flow-target\n" +
+               "            25, 25,   201b,   201f,   10        // 25, 25,    8:27,    8:31, flow-target\n" +
+               "            16, 25,   1819,   201f,   10        // 16, 25,    6:25,    8:31, flow-target\n" +
+               "             0, 26,    c09,   2020,    1        //  0, 26,    3:09,    8:32, statement\n" +
+               "             0, 26,    824,   2406,    2        //  0, 26,    2:36,    9:06, block\n");
+        doTest("    private boolean convert(int i) {\n" +
+               "        return i >= 0 ? switch (i) {\n" +
+               "            case 0 -> true;\n" +
+               "            default -> false;\n" +
+               "        } : switch (i) {\n" +
+               "            case -1 -> false;\n" +
+               "            default -> true;\n" +
+               "        };\n" +
+               "    }\n",
+               "CharacterRangeTable:\n" +
+               "             0,  0,    c10,    c16,    8        //  0,  0,    3:16,    3:22, flow-controller\n" +
+               "             1,  3,    c10,    c16,  100        //  1,  3,    3:16,    3:22, branch-false\n" +
+               "             4,  4,    c21,    c22,    8        //  4,  4,    3:33,    3:34, flow-controller\n" +
+               "            24, 27,   1017,   101c,   11        // 24, 27,    4:23,    4:28, statement, flow-target\n" +
+               "            28, 31,   1418,   141e,   11        // 28, 31,    5:24,    5:30, statement, flow-target\n" +
+               "             4, 31,    c19,   180a,   10        //  4, 31,    3:25,    6:10, flow-target\n" +
+               "            35, 35,   1815,   1816,    8        // 35, 35,    6:21,    6:22, flow-controller\n" +
+               "            56, 59,   1c18,   1c1e,   11        // 56, 59,    7:24,    7:30, statement, flow-target\n" +
+               "            60, 63,   2018,   201d,   11        // 60, 63,    8:24,    8:29, statement, flow-target\n" +
+               "            35, 63,   180d,   240a,   10        // 35, 63,    6:13,    9:10, flow-target\n" +
+               "             0, 64,    c09,   240b,    1        //  0, 64,    3:09,    9:11, statement\n" +
+               "             0, 64,    824,   2806,    2        //  0, 64,    2:36,   10:06, block\n");
+    }
+
+    private void doTest(String code, String expected) throws Exception {
+        Path base = Paths.get(".");
+        Path classes = base.resolve("classes");
+        tb.createDirectories(classes);
+        tb.cleanDirectory(classes);
+        new JavacTask(tb)
+                .options("-Xjcov",
+                         "--enable-preview",
+                         "-source", "12")
+                .outdir(classes)
+                .sources("public class Test {\n" +
+                         code +
+                         "}\n")
+                .run()
+                .writeAll();
+        String out = new JavapTask(tb)
+                .options("-private",
+                         "-verbose",
+                         "-s")
+                .classpath(classes.toString())
+                .classes("Test")
+                .run()
+                .writeAll()
+                .getOutputLines(OutputKind.DIRECT)
+                .stream()
+                .collect(Collectors.joining("\n"));
+        String crt = cutCRT(out);
+        if (!expected.trim().equals(crt.trim())) {
+            throw new AssertionError("Expected CharacterRangeTable not found, found: " + crt);
+        }
+    }
+
+    private static String cutCRT(String from) {
+        int start = from.indexOf("CharacterRangeTable:", from.indexOf("convert(int);"));
+        int end = from.indexOf("StackMapTable:");
+        return from.substring(start, end);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/DefiniteAssignment1.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,411 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 8214031
+ * @summary Verify that definite assignment when true works (legal code)
+ * @compile --enable-preview --source 12 DefiniteAssignment1.java
+ * @run main/othervm --enable-preview DefiniteAssignment1
+ */
+public class DefiniteAssignment1 {
+    public static void main(String[] args) {
+        int a = 0;
+        boolean b = true;
+
+        {
+        int x;
+
+        boolean t1 = (b && switch(a) {
+            case 0: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t1) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t1 = (b && switch(a) {
+            case 0: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t1) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t1a = (b && switch(a) {
+            case 0: break (x = 1) == 1;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t1a) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t1b = (switch(a) {
+            case 0: break (x = 1) == 1;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t1b) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t2 = !(b && switch(a) {
+            case 0: break (x = 1) == 1 || true;
+            default: break false;
+        }) || x == 1;
+
+        if (!t2) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t2 = !(b && switch(a) {
+            case 0: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) || x == 1;
+
+        if (!t2) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t3 = !(switch(a) {
+            case 0: break (x = 1) == 1 || true;
+            default: break false;
+        }) || x == 2;
+
+        if (t3) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t3 = !(switch(a) {
+            case 0: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) || x == 2;
+
+        if (t3) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        boolean t4 = (b && switch(a) {
+            case 0: break (x = 1) == 1 || true;
+            default: throw new IllegalStateException();
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t4) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+
+        {
+        int x;
+
+        boolean t4 = (b && switch(a) {
+            case 0: break (x = 1) == 1 || isTrue();
+            default: throw new IllegalStateException();
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t4) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        String s = "a";
+
+        boolean t5 = (switch(s) {
+            case "a": break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t5) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        String s = "a";
+
+        boolean t5 = (switch(s) {
+            case "a": break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t5) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.B;
+
+        boolean t6 = (switch(e) {
+            case B: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t6) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.B;
+
+        boolean t6 = (switch(e) {
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t6) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        int t7 = new DefiniteAssignment1().id(switch(0) {
+            default -> true;
+        } && (x = 1) == 1 && x == 1 ? 2 : -1);
+
+        if (t7 != 2) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+
+        int t7 = new DefiniteAssignment1().id(switch(0) {
+            default -> isTrue();
+        } && (x = 1) == 1 && x == 1 ? 2 : -1);
+
+        if (t7 != 2) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.B;
+
+        boolean t8 = (switch(e) {
+            case A: x = 1; break true;
+            case B: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t8) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.B;
+
+        boolean t8 = (switch(e) {
+            case A: x = 1; break isTrue();
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t8) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.A;
+
+        boolean t9 = (switch(e) {
+            case A: x = 1; break true;
+            case B: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t9) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.A;
+
+        boolean t9 = (switch(e) {
+            case A: x = 1; break isTrue();
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!t9) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.C;
+
+        boolean tA = (switch(e) {
+            case A: x = 1; break true;
+            case B: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (tA) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.C;
+
+        boolean tA = (switch(e) {
+            case A: x = 1; break isTrue();
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (tA) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        final int x;
+        E e = E.C;
+
+        boolean tA = (switch(e) {
+            case A: x = 1; break true;
+            case B: break (x = 2) == 2 || true;
+            default: break false;
+        }) || (x = 3) == 3; //x is definitelly unassigned here
+
+        if (x != 3) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.A;
+
+        boolean tA = (switch(e) {
+            case A: break isTrue() && (x = 1) == 1;
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!tA) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.A;
+
+        boolean tA = (switch(e) {
+            case A: break isTrue() && e != E.C ? (x = 1) == 1 && e != E.B : false;
+            case B: break (x = 1) == 1 || true;
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!tA) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+
+        {
+        int x;
+        E e = E.A;
+
+        boolean tA = (switch(e) {
+            case A: break isTrue() && e != E.C ? (x = 1) == 1 && e != E.B : false;
+            case B: break (x = 1) == 1 || isTrue();
+            default: break false;
+        }) && x == 1; //x is definitelly assigned here
+
+        if (!tA) {
+            throw new IllegalStateException("Unexpected result.");
+        }
+        }
+    }
+
+    private int id(int v) {
+        return v;
+    }
+
+    private static boolean isTrue() {
+        return true;
+    }
+
+    enum E {
+        A, B, C;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,87 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 8214031
+ * @summary Verify that definite assignment when true works (illegal code)
+ * @compile/fail/ref=DefiniteAssignment2.out --enable-preview --source 12 -XDrawDiagnostics DefiniteAssignment2.java
+ */
+public class DefiniteAssignment2 {
+
+    public static void main(String[] args) {
+        int a = 0;
+        boolean b = true;
+        boolean t;
+
+        {
+            int x;
+
+            t = (b && switch(a) {
+                case 0: break (x = 1) == 1 || true;
+                default: break false;
+            }) || x == 1;
+        }
+
+        {
+            int x;
+
+            t = (switch(a) {
+                case 0: break (x = 1) == 1;
+                default: break false;
+            }) || x == 1;
+        }
+
+        {
+            int x;
+
+            t = (switch(a) {
+                case 0: x = 1; break true;
+                case 1: break (x = 1) == 1;
+                default: break false;
+            }) || x == 1;
+        }
+
+        {
+            int x;
+
+            t = (switch(a) {
+                case 0: break true;
+                case 1: break (x = 1) == 1;
+                default: break false;
+            }) && x == 1;
+        }
+
+        {
+            int x;
+
+            t = (switch(a) {
+                case 0: break false;
+                case 1: break isTrue() || (x = 1) == 1;
+                default: break false;
+            }) && x == 1;
+        }
+
+        {
+            int x;
+
+            t = (switch(a) {
+                case 0: break false;
+                case 1: break isTrue() ? true : (x = 1) == 1;
+                default: break false;
+            }) && x == 1;
+        }
+
+        {
+            final int x;
+
+            t = (switch(a) {
+                case 0: break false;
+                case 1: break isTrue() ? true : (x = 1) == 1;
+                default: break false;
+            }) && (x = 1) == 1;
+        }
+    }
+
+    private static boolean isTrue() {
+        return true;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/DefiniteAssignment2.out	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,10 @@
+DefiniteAssignment2.java:20:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:29:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:39:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:49:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:59:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:69:19: compiler.err.var.might.not.have.been.initialized: x
+DefiniteAssignment2.java:79:20: compiler.err.var.might.already.be.assigned: x
+- compiler.note.preview.filename: DefiniteAssignment2.java
+- compiler.note.preview.recompile
+7 errors
--- a/test/langtools/tools/javac/switchexpr/ExpressionSwitch-old.out	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitch-old.out	Tue Dec 04 13:35:04 2018 +0530
@@ -1,3 +1,4 @@
-ExpressionSwitch.java:30:16: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.switch.expressions)
-ExpressionSwitch.java:31:20: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.switch.rules)
-2 errors
+ExpressionSwitch.java:38:16: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.switch.expressions)
+ExpressionSwitch.java:39:20: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.switch.rules)
+ExpressionSwitch.java:89:21: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.multiple.case.labels)
+3 errors
--- a/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitch.java	Tue Dec 04 13:35:04 2018 +0530
@@ -23,6 +23,14 @@
         assertEquals(scopesIsolated(T.B), "B");
         assertEquals(lambdas1(T.B).get(), "B");
         assertEquals(lambdas2(T.B).get(), "B");
+        assertEquals(convert1("A"), 0);
+        assertEquals(convert1("B"), 0);
+        assertEquals(convert1("C"), 1);
+        assertEquals(convert1(""), -1);
+        assertEquals(convert2("A"), 0);
+        assertEquals(convert2("B"), 0);
+        assertEquals(convert2("C"), 1);
+        assertEquals(convert2(""), -1);
         localClass(T.A);
     }
 
@@ -76,6 +84,22 @@
         };
     }
 
+    private int convert1(String s) {
+        return switch (s) {
+            case "A", "B" -> 0;
+            case "C" -> { break 1; }
+            default -> -1;
+        };
+    }
+
+    private int convert2(String s) {
+        return switch (s) {
+            case "A", "B": break 0;
+            case "C": break 1;
+            default: break -1;
+        };
+    }
+
     private void localClass(T t) {
         String good = "good";
         class L {
--- a/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugs.java	Tue Dec 04 13:35:04 2018 +0530
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8206986
+ * @bug 8206986 8214529
  * @summary Verify various corner cases with nested switch expressions.
  * @compile --enable-preview -source 12 ExpressionSwitchBugs.java
  * @run main/othervm --enable-preview ExpressionSwitchBugs
@@ -32,6 +32,7 @@
 public class ExpressionSwitchBugs {
     public static void main(String... args) {
         new ExpressionSwitchBugs().testNested();
+        new ExpressionSwitchBugs().testAnonymousClasses();
     }
 
     private void testNested() {
@@ -66,6 +67,23 @@
         }));
     }
 
+    private void testAnonymousClasses() {
+        for (int i : new int[] {1, 2}) {
+            check(3, id((switch (i) {
+                case 1: break new I() {
+                    public int g() { return 3; }
+                };
+                default: break (I) () -> { return 3; };
+            }).g()));
+            check(3, id((switch (i) {
+                case 1 -> new I() {
+                    public int g() { return 3; }
+                };
+                default -> (I) () -> { return 3; };
+            }).g()));
+        }
+    }
+
     private int id(int i) {
         return i;
     }
@@ -79,4 +97,8 @@
             throw new AssertionError("Unexpected result: " + actual);
         }
     }
+
+    public interface I {
+        public int g();
+    }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchBugsInGen.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8214031
+ * @summary Verify various corner cases with nested switch expressions.
+ * @compile --enable-preview -source 12 ExpressionSwitchBugsInGen.java
+ * @run main/othervm --enable-preview ExpressionSwitchBugsInGen
+ */
+
+public class ExpressionSwitchBugsInGen {
+    public static void main(String... args) {
+        new ExpressionSwitchBugsInGen().test(0, 0, 0, false);
+        new ExpressionSwitchBugsInGen().test(0, 0, 1, true);
+        new ExpressionSwitchBugsInGen().test(0, 1, 1, false);
+        new ExpressionSwitchBugsInGen().test(1, 1, -1, true);
+        new ExpressionSwitchBugsInGen().test(1, 12, -1, false);
+        new ExpressionSwitchBugsInGen().testCommonSuperType(0, "a", new StringBuilder(), "a");
+        new ExpressionSwitchBugsInGen().testCommonSuperType(1, "", new StringBuilder("a"), "a");
+        new ExpressionSwitchBugsInGen().testSwitchExpressionInConditional(0, null, -1);
+        new ExpressionSwitchBugsInGen().testSwitchExpressionInConditional(1, "", 0);
+        new ExpressionSwitchBugsInGen().testSwitchExpressionInConditional(1, 1, 1);
+        new ExpressionSwitchBugsInGen().testIntBoxing(0, 10, 10);
+        new ExpressionSwitchBugsInGen().testIntBoxing(1, 10, -1);
+    }
+
+    private void test(int a, int b, int c, boolean expected) {
+        if ( !(switch (a) {
+                case 0 -> b == (switch (c) { case 0 -> 0; default -> 1; });
+                default -> b == 12;
+            })) {
+            if (!expected) {
+                throw new IllegalStateException();
+            }
+        } else {
+            if (expected) {
+                throw new IllegalStateException();
+            }
+        }
+    }
+
+    private void testCommonSuperType(int a, String s1, StringBuilder s2, String expected) {
+        String r = (switch (a) {
+            case 0 -> s1;
+            default -> s2;
+        }).toString();
+        if (!expected.equals(r)) {
+            throw new IllegalStateException();
+        }
+    }
+
+    private void testSwitchExpressionInConditional(int a, Object o, int expected) {
+        int v = a == 0 ? -1
+                       : switch (o instanceof String ? 0 : 1) {
+                             case 0 -> 0;
+                             default -> 1;
+                       };
+        if (v != expected) {
+            throw new IllegalStateException();
+        }
+    }
+
+    private void testIntBoxing(int a, Integer res, int expected) {
+        int r = switch (a) {
+            case 0 -> res;
+            default -> -1;
+        };
+        if (r != expected) {
+            throw new IllegalStateException();
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/langtools/tools/javac/switchexpr/ExpressionSwitchEmbedding.java	Tue Dec 04 13:35:04 2018 +0530
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8214031
+ * @summary Verify switch expressions embedded in various statements work properly.
+ * @compile --enable-preview -source 12 ExpressionSwitchEmbedding.java
+ * @run main/othervm --enable-preview ExpressionSwitchEmbedding
+ */
+
+public class ExpressionSwitchEmbedding {
+    public static void main(String... args) {
+        new ExpressionSwitchEmbedding().run();
+    }
+
+    private void run() {
+        {
+            int i = 6;
+            int o = 0;
+            while (switch (i) {
+                case 1: i = 0; break true;
+                case 2: i = 1; break true;
+                case 3, 4: i--;
+                    if (i == 2 || i == 4) {
+                        break switch (i) {
+                            case 2 -> true;
+                            case 4 -> false;
+                            default -> throw new IllegalStateException();
+                        };
+                    } else {
+                        break true;
+                    }
+                default: i--; break switch (i) {
+                    case -1 -> false;
+                    case 3 -> true;
+                    default -> true;
+                };
+            }) {
+                o++;
+            }
+            if (o != 6 && i >= 0) {
+                throw new IllegalStateException();
+            }
+        }
+        {
+            int i = 6;
+            int o = 0;
+            if (switch (i) {
+                case 1: i = 0; break true;
+                case 2: i = 1; break true;
+                case 3, 4: i--;
+                    if (i == 2 || i == 4) {
+                        break (switch (i) {
+                            case 2 -> 3;
+                            case 4 -> 5;
+                            default -> throw new IllegalStateException();
+                        }) == i + 1;
+                    } else {
+                        break true;
+                    }
+                default: i--; break switch (i) {
+                    case -1 -> false;
+                    case 3 -> true;
+                    default -> true;
+                };
+            }) {
+                o++;
+            }
+            if (o != 1 && i != 5) {
+                throw new IllegalStateException();
+            }
+        }
+        {
+            int o = 0;
+            for (int i = 6; (switch (i) {
+                case 1: i = 0; break true;
+                case 2: i = 1; break true;
+                case 3, 4: i--;
+                    if (i == 2 || i == 4) {
+                        break switch (i) {
+                            case 2 -> true;
+                            case 4 -> false;
+                            default -> throw new IllegalStateException();
+                        };
+                    } else {
+                        break true;
+                    }
+                default: i--; break switch (i) {
+                    case -1 -> false;
+                    case 3 -> true;
+                    default -> true;
+                };
+            }); ) {
+                o++;
+            }
+            if (o != 6) {
+                throw new IllegalStateException();
+            }
+        }
+        {
+            int i = 6;
+            int o = 0;
+            do {
+                o++;
+            } while (switch (i) {
+                case 1: i = 0; break true;
+                case 2: i = 1; break true;
+                case 3, 4: i--;
+                    if (i == 2 || i == 4) {
+                        break switch (i) {
+                            case 2 -> true;
+                            case 4 -> false;
+                            default -> throw new IllegalStateException();
+                        };
+                    } else {
+                        break true;
+                    }
+                default: i--; break switch (i) {
+                    case -1 -> false;
+                    case 3 -> true;
+                    default -> true;
+                };
+            });
+            if (o != 6 && i >= 0) {
+                throw new IllegalStateException();
+            }
+        }
+    }
+
+}
--- a/test/nashorn/src/jdk/dynalink/beans/test/BeansLinkerTest.java	Mon Dec 03 16:12:33 2018 -0800
+++ b/test/nashorn/src/jdk/dynalink/beans/test/BeansLinkerTest.java	Tue Dec 04 13:35:04 2018 +0530
@@ -47,6 +47,7 @@
 import jdk.dynalink.NamespaceOperation;
 import jdk.dynalink.NoSuchDynamicMethodException;
 import jdk.dynalink.Operation;
+import jdk.dynalink.beans.StaticClass;
 import jdk.dynalink.support.SimpleRelinkableCallSite;
 import org.testng.Assert;
 import org.testng.annotations.Test;
@@ -224,6 +225,25 @@
         });
     }
 
+    public static class A {
+        public static class Inner {}
+    }
+
+    public static class B extends A {
+        public static class Inner {}
+    }
+
+    @Test
+    public static void testInnerClassGetter() {
+        Object inner1 = call(GET.withNamespace(PROPERTY), StaticClass.forClass(A.class), "Inner");
+        Assert.assertTrue(inner1 instanceof StaticClass);
+        Assert.assertEquals(A.Inner.class, ((StaticClass) inner1).getRepresentedClass());
+
+        Object inner2 = call(GET.withNamespace(PROPERTY), StaticClass.forClass(B.class), "Inner");
+        Assert.assertTrue(inner2 instanceof StaticClass);
+        Assert.assertEquals(B.Inner.class, ((StaticClass) inner2).getRepresentedClass());
+    }
+
     private static void expectNoSuchDynamicMethodException(final Runnable r) {
         try {
             r.run();