Merge tag jb8u212-b1586.4

Change-Id: I023373c0933fb0f01e71c7aa2dbec6a0a8f5046f
diff --git a/.hgtags b/.hgtags
index 07e7624..c231965 100644
--- a/.hgtags
+++ b/.hgtags
@@ -1245,3 +1245,54 @@
 1f822ff877d1a250165d5d2d52faf6957f8fcd00 jdk8u192-b12
 e0e4c3a86ef0e4daf4fe96bd058045a2b13ebf84 jdk8u192-b26
 79b4c0a88c00226dcd14496652adf84d53b5cb9c jdk8u202-b01
+9ce27f0a4683a2083d3aed59a40d6a3ccfc8e397 jdk8u202-b02
+c0836eee40e5cfc7b3eebbb7a53bfcd98bc66278 jdk8u202-b03
+270570f695e077f3dbd8e051a7a14c312bcad3cf jdk8u202-b04
+04b9a5286eca10f676132ede70f29ba643f9b78b jdk8u202-b05
+2fa6434658660b4341be233828362e533782f036 jdk8u202-b06
+32c99b1faf57d7ed59e026339a4d7eb8f86b2d83 jdk8u202-b07
+818b1963f7a227a2368a4f363d5500dd226a529e jdk8u202-b08
+1083b49a881011f43667ebebc280d519f077f9e6 jdk8u202-b25
+7a69774c67cb79a79ccb2ac2d6d258a11e22aa6f jdk8u202-b26
+818b1963f7a227a2368a4f363d5500dd226a529e jdk8u202-ga
+f7bd3ef62b03503c2abd2c877103fce4c41752ec jdk8u181-b31
+a2be8e761961b9aea1641593f2638406c8052bff jdk8u181-b32
+9d9f4c81eb3df5991f4409429a8eed5da385e138 jdk8u181-b33
+2ac6a4ff7b3c9c45bda2a449523f7f1babffd857 jdk8u181-b34
+f3eb9719e6961890add8af56c43a3273bedd3510 jdk8u181-b35
+5418d85b93ea93af1b75a700501cab9e53e282c5 jdk8u181-b36
+310a8a03be9363e47cc0856e43661cf71b516101 jdk8u181-b37
+cec91c1510a4f6b54f454f8a18c2ce19e1ef4002 jdk8u201-b01
+242132d678006ccd4139c33c1a188f09a09683c6 jdk8u201-b02
+68ee3b18354df0572de37bc04c3a7a8046d5a654 jdk8u201-b03
+f85cae50e04085dd498cc573cea5f829a6ab8d95 jdk8u201-b04
+2b490d8df3575cc40caf7f9ab54df2ff82ca1d6f jdk8u201-b74
+4b17023e0a3a168bd527b3a4cf2ca58fb77c691a jdk8u201-b05
+3f6c3bf8f0b17113a8b7d39962fc04db9cef360e jdk8u201-b75
+6ee55134973590878c9c922bdf76be9f1ac76940 jdk8u201-b06
+f53cabbd1a91af46b61230315e54df42c353b181 jdk8u201-b76
+dee6a1ce4a0c526c47d71ef402d10e4b8915c5cb jdk8u201-b07
+e4daab85ac15ae3c51f14ed8fba888e54e4c6830 jdk8u201-b77
+e2c2448a1ca75333879e055655f11525decc2c39 jdk8u201-b08
+48947e4db9f3b88fd0ec55801e969a3bd6cb74a9 jdk8u201-b09
+bd988b43db1b5ca6ee545097e79ddc5a4c8b5c87 jdk8u201-b79
+b9347a42530a741b7028e0cce47ce0bdd70697a3 jdk8u201-b25
+fb760c9d9649ab7d107b777a41f1424eebfb4883 jdk8u201-b26
+48947e4db9f3b88fd0ec55801e969a3bd6cb74a9 jdk8u201-ga
+79b4c0a88c00226dcd14496652adf84d53b5cb9c jdk8u202-b01
+9ce27f0a4683a2083d3aed59a40d6a3ccfc8e397 jdk8u202-b02
+c0836eee40e5cfc7b3eebbb7a53bfcd98bc66278 jdk8u202-b03
+270570f695e077f3dbd8e051a7a14c312bcad3cf jdk8u202-b04
+04b9a5286eca10f676132ede70f29ba643f9b78b jdk8u202-b05
+2fa6434658660b4341be233828362e533782f036 jdk8u202-b06
+32c99b1faf57d7ed59e026339a4d7eb8f86b2d83 jdk8u202-b07
+818b1963f7a227a2368a4f363d5500dd226a529e jdk8u202-b08
+1083b49a881011f43667ebebc280d519f077f9e6 jdk8u202-b25
+7a69774c67cb79a79ccb2ac2d6d258a11e22aa6f jdk8u202-b26
+818b1963f7a227a2368a4f363d5500dd226a529e jdk8u202-ga
+9ce27f0a4683a2083d3aed59a40d6a3ccfc8e397 jdk8u212-b00
+9ee244aee077ffad50d1b183a61d9f5fc39a1285 jdk8u212-b01
+2d94aac71d3337c7c3284bdb101b7ea15ef6d5f5 jdk8u212-b02
+96fec237fcc0acfcacea0a2bac07bf8ca919e64b jdk8u212-b03
+b2000ea410b0aa80d94a89105ba3dc8bdebd80b7 jdk8u212-b04
+96fec237fcc0acfcacea0a2bac07bf8ca919e64b jdk8u212-ga
diff --git a/THIRD_PARTY_README b/THIRD_PARTY_README
index a1662fe..f9268ad 100644
--- a/THIRD_PARTY_README
+++ b/THIRD_PARTY_README
@@ -1668,13 +1668,13 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Little CMS 2.7, which may be 
+%% This notice is provided with respect to Little CMS 2.9, which may be
 included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
 Little CMS
-Copyright (c) 1998-2015 Marti Maria Saguer
+Copyright (c) 1998-2011 Marti Maria Saguer
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/make/aix/makefiles/buildtree.make b/make/aix/makefiles/buildtree.make
index 8825330..07747c0 100644
--- a/make/aix/makefiles/buildtree.make
+++ b/make/aix/makefiles/buildtree.make
@@ -1,6 +1,7 @@
 #
 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -215,6 +216,10 @@
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "VENDOR = $(COMPANY_NAME)"; \
+	echo "VENDOR_URL = $(VENDOR_URL)"; \
+	echo "VENDOR_URL_BUG = $(VENDOR_URL_BUG)"; \
+	echo "VENDOR_URL_VM_BUG = $(VENDOR_URL_VM_BUG)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
diff --git a/make/aix/makefiles/vm.make b/make/aix/makefiles/vm.make
index d989dab..52c88b3 100644
--- a/make/aix/makefiles/vm.make
+++ b/make/aix/makefiles/vm.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2012, 2013 SAP AG. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
@@ -101,7 +101,8 @@
 # This is VERY important! The version define must only be supplied to vm_version.o
 # If not, ccache will not re-use the cache at all, since the version string might contain
 # a time and date.
-CXXFLAGS/vm_version.o += ${JRE_VERSION}
+CXXFLAGS/vm_version.o += ${JRE_VERSION} ${VERSION_CFLAGS}
+CXXFLAGS/arguments.o += ${VERSION_CFLAGS}
 
 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
 
diff --git a/make/bsd/makefiles/buildtree.make b/make/bsd/makefiles/buildtree.make
index 88b141e..b39bf22 100644
--- a/make/bsd/makefiles/buildtree.make
+++ b/make/bsd/makefiles/buildtree.make
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -221,6 +222,10 @@
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "VENDOR = $(COMPANY_NAME)"; \
+	echo "VENDOR_URL = $(VENDOR_URL)"; \
+	echo "VENDOR_URL_BUG = $(VENDOR_URL_BUG)"; \
+	echo "VENDOR_URL_VM_BUG = $(VENDOR_URL_VM_BUG)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
diff --git a/make/bsd/makefiles/gcc.make b/make/bsd/makefiles/gcc.make
index 95761ce..a391d99 100644
--- a/make/bsd/makefiles/gcc.make
+++ b/make/bsd/makefiles/gcc.make
@@ -323,10 +323,11 @@
 
 # Work around some compiler bugs.
 ifeq ($(USE_CLANG), true)
-  ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
+#  Removed check for Xcode version to compile on newer versions
+#  ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
     OPT_CFLAGS/unsafe.o += -O1
-  endif
+#  endif
 else
   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
diff --git a/make/bsd/makefiles/vm.make b/make/bsd/makefiles/vm.make
index 60d3a20..f07338c 100644
--- a/make/bsd/makefiles/vm.make
+++ b/make/bsd/makefiles/vm.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -100,7 +100,8 @@
 # This is VERY important! The version define must only be supplied to vm_version.o
 # If not, ccache will not re-use the cache at all, since the version string might contain
 # a time and date.
-CXXFLAGS/vm_version.o += ${JRE_VERSION}
+CXXFLAGS/vm_version.o += ${JRE_VERSION} ${VERSION_CFLAGS}
+CXXFLAGS/arguments.o += ${VERSION_CFLAGS}
 
 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
 
diff --git a/make/linux/Makefile b/make/linux/Makefile
index 17c1409..e8f2010 100644
--- a/make/linux/Makefile
+++ b/make/linux/Makefile
@@ -227,20 +227,7 @@
 	@echo "  $(TARGETS_SHARK)"
 	@echo "  $(TARGETS_MINIMAL1)"
 
-checks: check_os_version check_j2se_version
-
-# We do not want people accidentally building on old systems (e.g. Linux 2.2.x,
-# Solaris 2.5.1, 2.6).
-# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
-
-SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3% 4%
-OS_VERSION := $(shell uname -r)
-EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
-
-check_os_version:
-ifeq ($(DISABLE_HOTSPOT_OS_VERSION_CHECK)$(EMPTY_IF_NOT_SUPPORTED),)
-	$(QUIETLY) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;
-endif
+checks: check_j2se_version
 
 # jvmti.make requires XSLT (J2SE 1.4.x or newer):
 XSLT_CHECK	= $(REMOTE) $(RUN.JAVAP) javax.xml.transform.TransformerFactory
diff --git a/make/linux/makefiles/buildtree.make b/make/linux/makefiles/buildtree.make
index b597765..bdd077a 100644
--- a/make/linux/makefiles/buildtree.make
+++ b/make/linux/makefiles/buildtree.make
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -220,6 +221,10 @@
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "VENDOR = $(COMPANY_NAME)"; \
+	echo "VENDOR_URL = $(VENDOR_URL)"; \
+	echo "VENDOR_URL_BUG = $(VENDOR_URL_BUG)"; \
+	echo "VENDOR_URL_VM_BUG = $(VENDOR_URL_VM_BUG)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
diff --git a/make/linux/makefiles/vm.make b/make/linux/makefiles/vm.make
index 05e9bc0..d3feec8 100644
--- a/make/linux/makefiles/vm.make
+++ b/make/linux/makefiles/vm.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -102,7 +102,8 @@
 # This is VERY important! The version define must only be supplied to vm_version.o
 # If not, ccache will not re-use the cache at all, since the version string might contain
 # a time and date.
-CXXFLAGS/vm_version.o += ${JRE_VERSION}
+CXXFLAGS/vm_version.o += ${JRE_VERSION} ${VERSION_CFLAGS}
+CXXFLAGS/arguments.o += ${VERSION_CFLAGS}
 
 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
 
diff --git a/make/openjdk_distro b/make/openjdk_distro
index 520b33d..e0fe258 100644
--- a/make/openjdk_distro
+++ b/make/openjdk_distro
@@ -1,5 +1,6 @@
 # 
 # Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -28,5 +29,4 @@
 
 # Don't put quotes (fail windows build).
 HOTSPOT_VM_DISTRO=OpenJDK
-COMPANY_NAME=
 PRODUCT_NAME=OpenJDK
diff --git a/make/solaris/makefiles/buildtree.make b/make/solaris/makefiles/buildtree.make
index e5dbbc6..aab52a9 100644
--- a/make/solaris/makefiles/buildtree.make
+++ b/make/solaris/makefiles/buildtree.make
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -208,6 +209,10 @@
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "VENDOR = $(COMPANY_NAME)"; \
+	echo "VENDOR_URL = $(VENDOR_URL)"; \
+	echo "VENDOR_URL_BUG = $(VENDOR_URL_BUG)"; \
+	echo "VENDOR_URL_VM_BUG = $(VENDOR_URL_VM_BUG)"; \
 	echo "OPENJDK = $(OPENJDK)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
diff --git a/make/solaris/makefiles/vm.make b/make/solaris/makefiles/vm.make
index 11942b4..c2a3527 100644
--- a/make/solaris/makefiles/vm.make
+++ b/make/solaris/makefiles/vm.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -88,7 +88,8 @@
 # This is VERY important! The version define must only be supplied to vm_version.o
 # If not, ccache will not re-use the cache at all, since the version string might contain
 # a time and date.
-CXXFLAGS/vm_version.o += ${JRE_VERSION}
+CXXFLAGS/vm_version.o += ${JRE_VERSION} ${VERSION_CFLAGS}
+CXXFLAGS/arguments.o += ${VERSION_CFLAGS}
 
 CXXFLAGS/BYFILE = $(CXXFLAGS/$@)
 
diff --git a/make/windows/build.make b/make/windows/build.make
index 7c66b20..725dccf 100644
--- a/make/windows/build.make
+++ b/make/windows/build.make
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -279,6 +280,10 @@
 	@ echo HS_COMPANY=$(COMPANY_NAME)			>> $@
 	@ echo HS_FILEDESC=$(HS_FILEDESC)			>> $@
 	@ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO)		>> $@
+	@ echo VENDOR=$(VENDOR)					>> $@
+	@ echo VENDOR_URL=$(VENDOR_URL)				>> $@
+	@ echo VENDOR_URL_BUG=$(VENDOR_URL_BUG)			>> $@
+	@ echo VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG)		>> $@
 	@ if "$(OPENJDK)" NEQ "" echo OPENJDK=$(OPENJDK)	>> $@
 	@ echo HS_COPYRIGHT=$(HOTSPOT_VM_COPYRIGHT)		>> $@
 	@ echo HS_NAME=$(PRODUCT_NAME) $(JDK_MKTG_VERSION)	>> $@
diff --git a/make/windows/makefiles/vm.make b/make/windows/makefiles/vm.make
index 61a8f08..c5a85c5 100644
--- a/make/windows/makefiles/vm.make
+++ b/make/windows/makefiles/vm.make
@@ -1,5 +1,6 @@
 #
 # Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2019 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -61,6 +62,13 @@
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\""
 CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\""
+# Workaround for JBR-1405, see common/autoconf/spec.gmk.in
+!if "$(COMPANY_NAME)" != "" && "$(COMPANY_NAME)" != "N/A"
+CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR=\"$(COMPANY_NAME)\""
+!endif
+CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL=\"$(VENDOR_URL)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_BUG=\"$(VENDOR_URL_BUG)\""
+CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_VM_BUG=\"$(VENDOR_URL_VM_BUG)\""
 
 CXX_FLAGS=$(CXX_FLAGS) $(CXX_INCLUDE_DIRS)
 
diff --git a/src/cpu/ppc/vm/templateInterpreter_ppc.hpp b/src/cpu/ppc/vm/templateInterpreter_ppc.hpp
index eb817b0..51e4ebf 100644
--- a/src/cpu/ppc/vm/templateInterpreter_ppc.hpp
+++ b/src/cpu/ppc/vm/templateInterpreter_ppc.hpp
@@ -34,7 +34,7 @@
   // Run with +PrintInterpreter to get the VM to print out the size.
   // Max size with JVMTI
 
-  const static int InterpreterCodeSize = 210*K;
+  const static int InterpreterCodeSize = 220*K;
 
 #endif // CPU_PPC_VM_TEMPLATEINTERPRETER_PPC_HPP
 
diff --git a/src/os/windows/vm/os_windows.cpp b/src/os/windows/vm/os_windows.cpp
index 4f550c9..ca798a2 100644
--- a/src/os/windows/vm/os_windows.cpp
+++ b/src/os/windows/vm/os_windows.cpp
@@ -1757,7 +1757,13 @@
     if (is_workstation) {
       st->print("10");
     } else {
-      st->print("Server 2016");
+      // distinguish Windows Server 2016 and 2019 by build number
+      // Windows server 2019 GA 10/2018 build number is 17763
+      if (build_number > 17762) {
+        st->print("Server 2019");
+      } else {
+        st->print("Server 2016");
+      }
     }
     break;
 
diff --git a/src/share/vm/classfile/classFileParser.cpp b/src/share/vm/classfile/classFileParser.cpp
index a5bfb9d..07d07e4 100644
--- a/src/share/vm/classfile/classFileParser.cpp
+++ b/src/share/vm/classfile/classFileParser.cpp
@@ -4210,9 +4210,6 @@
           this_klass(), &all_mirandas, CHECK_(nullHandle));
     }
 
-    // Update the loader_data graph.
-    record_defined_class_dependencies(this_klass, CHECK_NULL);
-
     ClassLoadingService::notify_class_loaded(InstanceKlass::cast(this_klass()),
                                              false /* not shared class */);
 
@@ -4498,30 +4495,6 @@
   }
 }
 
-// Attach super classes and interface classes to class loader data
-void ClassFileParser::record_defined_class_dependencies(instanceKlassHandle defined_klass, TRAPS) {
-  ClassLoaderData * defining_loader_data = defined_klass->class_loader_data();
-  if (defining_loader_data->is_the_null_class_loader_data()) {
-      // Dependencies to null class loader data are implicit.
-      return;
-  } else {
-    // add super class dependency
-    Klass* super = defined_klass->super();
-    if (super != NULL) {
-      defining_loader_data->record_dependency(super, CHECK);
-    }
-
-    // add super interface dependencies
-    Array<Klass*>* local_interfaces = defined_klass->local_interfaces();
-    if (local_interfaces != NULL) {
-      int length = local_interfaces->length();
-      for (int i = 0; i < length; i++) {
-        defining_loader_data->record_dependency(local_interfaces->at(i), CHECK);
-      }
-    }
-  }
-}
-
 // utility methods for appending an array with check for duplicates
 
 void append_interfaces(GrowableArray<Klass*>* result, Array<Klass*>* ifs) {
diff --git a/src/share/vm/classfile/dictionary.cpp b/src/share/vm/classfile/dictionary.cpp
index f4e3501..b9d473b 100644
--- a/src/share/vm/classfile/dictionary.cpp
+++ b/src/share/vm/classfile/dictionary.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -159,33 +159,9 @@
       if (!is_strongly_reachable(loader_data, e)) {
         // Entry was not visited in phase1 (negated test from phase1)
         assert(!loader_data->is_the_null_class_loader_data(), "unloading entry with null class loader");
-        ClassLoaderData* k_def_class_loader_data = ik->class_loader_data();
-
-        // Do we need to delete this system dictionary entry?
-        bool purge_entry = false;
 
         // Do we need to delete this system dictionary entry?
         if (loader_data->is_unloading()) {
-          // If the loader is not live this entry should always be
-          // removed (will never be looked up again).
-          purge_entry = true;
-        } else {
-          // The loader in this entry is alive. If the klass is dead,
-          // (determined by checking the defining class loader)
-          // the loader must be an initiating loader (rather than the
-          // defining loader). Remove this entry.
-          if (k_def_class_loader_data->is_unloading()) {
-            // If we get here, the class_loader_data must not be the defining
-            // loader, it must be an initiating one.
-            assert(k_def_class_loader_data != loader_data,
-                   "cannot have live defining loader and unreachable klass");
-            // Loader is live, but class and its defining loader are dead.
-            // Remove the entry. The class is going away.
-            purge_entry = true;
-          }
-        }
-
-        if (purge_entry) {
           *p = probe->next();
           if (probe == _current_class_entry) {
             _current_class_entry = NULL;
diff --git a/src/share/vm/classfile/systemDictionary.cpp b/src/share/vm/classfile/systemDictionary.cpp
index 40e6644..da2717d 100644
--- a/src/share/vm/classfile/systemDictionary.cpp
+++ b/src/share/vm/classfile/systemDictionary.cpp
@@ -816,7 +816,16 @@
         check_constraints(d_index, d_hash, k, class_loader, false, THREAD);
 
         // Need to check for a PENDING_EXCEPTION again; check_constraints
-        // can throw and doesn't use the CHECK macro.
+        // can throw but we may have to remove entry from the placeholder table below.
+        if (!HAS_PENDING_EXCEPTION) {
+          // Record dependency for non-parent delegation.
+          // This recording keeps the defining class loader of the klass (k) found
+          // from being unloaded while the initiating class loader is loaded
+          // even if the reference to the defining class loader is dropped
+          // before references to the initiating class loader.
+          loader_data->record_dependency(k(), THREAD);
+        }
+
         if (!HAS_PENDING_EXCEPTION) {
           { // Grabbing the Compile_lock prevents systemDictionary updates
             // during compilations.
diff --git a/src/share/vm/classfile/verificationType.cpp b/src/share/vm/classfile/verificationType.cpp
index bdba76f..3f7dcdc 100644
--- a/src/share/vm/classfile/verificationType.cpp
+++ b/src/share/vm/classfile/verificationType.cpp
@@ -63,7 +63,6 @@
         name(), Handle(THREAD, klass->class_loader()),
         Handle(THREAD, klass->protection_domain()), true, CHECK_false);
     KlassHandle this_class(THREAD, obj);
-    klass->class_loader_data()->record_dependency(obj, CHECK_false);
 
     if (this_class->is_interface() && (!from_field_is_protected ||
         from.name() != vmSymbols::java_lang_Object())) {
@@ -75,7 +74,6 @@
       Klass* from_class = SystemDictionary::resolve_or_fail(
           from.name(), Handle(THREAD, klass->class_loader()),
           Handle(THREAD, klass->protection_domain()), true, CHECK_false);
-      klass->class_loader_data()->record_dependency(from_class, CHECK_false);
       bool result = InstanceKlass::cast(from_class)->is_subclass_of(this_class());
       if (result && DumpSharedSpaces) {
         if (klass()->is_subclass_of(from_class) && klass()->is_subclass_of(this_class())) {
diff --git a/src/share/vm/classfile/verifier.cpp b/src/share/vm/classfile/verifier.cpp
index 82509ff..2a57205 100644
--- a/src/share/vm/classfile/verifier.cpp
+++ b/src/share/vm/classfile/verifier.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, 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
@@ -1949,11 +1949,9 @@
   oop loader = current_class()->class_loader();
   oop protection_domain = current_class()->protection_domain();
 
-  Klass* kls = SystemDictionary::resolve_or_fail(
+  return SystemDictionary::resolve_or_fail(
     name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
     true, CHECK_NULL);
-  current_class()->class_loader_data()->record_dependency(kls, CHECK_NULL);
-  return kls;
 }
 
 bool ClassVerifier::is_protected_access(instanceKlassHandle this_class,
diff --git a/src/share/vm/oops/constantPool.cpp b/src/share/vm/oops/constantPool.cpp
index 9ab9e9d..98a11fe 100644
--- a/src/share/vm/oops/constantPool.cpp
+++ b/src/share/vm/oops/constantPool.cpp
@@ -339,8 +339,6 @@
       // Only updated constant pool - if it is resolved.
       do_resolve = this_oop->tag_at(which).is_unresolved_klass();
       if (do_resolve) {
-        ClassLoaderData* this_key = this_oop->pool_holder()->class_loader_data();
-        this_key->record_dependency(k(), CHECK_NULL); // Can throw OOM
         this_oop->klass_at_put(which, k());
       }
     }
diff --git a/src/share/vm/oops/cpCache.cpp b/src/share/vm/oops/cpCache.cpp
index cea52ef..cda9a4e 100644
--- a/src/share/vm/oops/cpCache.cpp
+++ b/src/share/vm/oops/cpCache.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, 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
@@ -209,12 +209,22 @@
   if (byte_no == 1) {
     assert(invoke_code != Bytecodes::_invokevirtual &&
            invoke_code != Bytecodes::_invokeinterface, "");
+    bool do_resolve = true;
     // Don't mark invokespecial to method as resolved if sender is an interface.  The receiver
     // has to be checked that it is a subclass of the current class every time this bytecode
     // is executed.
-    if (invoke_code != Bytecodes::_invokespecial || !sender_is_interface ||
-        method->name() == vmSymbols::object_initializer_name()) {
-    set_bytecode_1(invoke_code);
+    if (invoke_code == Bytecodes::_invokespecial && sender_is_interface &&
+        method->name() != vmSymbols::object_initializer_name()) {
+      do_resolve = false;
+    }
+    // Don't mark invokestatic to method as resolved if the holder class has not yet completed
+    // initialization. An invokestatic must only proceed if the class is initialized, but if
+    // we resolve it before then that class initialization check is skipped.
+    if (invoke_code == Bytecodes::_invokestatic && !method->method_holder()->is_initialized()) {
+      do_resolve = false;
+    }
+    if (do_resolve) {
+        set_bytecode_1(invoke_code);
     }
   } else if (byte_no == 2)  {
     if (change_to_virtual) {
diff --git a/src/share/vm/opto/compile.cpp b/src/share/vm/opto/compile.cpp
index 130a059..5e7c270 100644
--- a/src/share/vm/opto/compile.cpp
+++ b/src/share/vm/opto/compile.cpp
@@ -1680,16 +1680,23 @@
   const TypePtr* flat = flatten_alias_type(adr_type);
 
 #ifdef ASSERT
-  assert(flat == flatten_alias_type(flat), "idempotent");
-  assert(flat != TypePtr::BOTTOM,     "cannot alias-analyze an untyped ptr");
-  if (flat->isa_oopptr() && !flat->isa_klassptr()) {
-    const TypeOopPtr* foop = flat->is_oopptr();
-    // Scalarizable allocations have exact klass always.
-    bool exact = !foop->klass_is_exact() || foop->is_known_instance();
-    const TypePtr* xoop = foop->cast_to_exactness(exact)->is_ptr();
-    assert(foop == flatten_alias_type(xoop), "exactness must not affect alias type");
+  {
+    ResourceMark rm;
+    assert(flat == flatten_alias_type(flat),
+           err_msg("not idempotent: adr_type = %s; flat = %s => %s", Type::str(adr_type),
+                   Type::str(flat), Type::str(flatten_alias_type(flat))));
+    assert(flat != TypePtr::BOTTOM,
+           err_msg("cannot alias-analyze an untyped ptr: adr_type = %s", Type::str(adr_type)));
+    if (flat->isa_oopptr() && !flat->isa_klassptr()) {
+      const TypeOopPtr* foop = flat->is_oopptr();
+      // Scalarizable allocations have exact klass always.
+      bool exact = !foop->klass_is_exact() || foop->is_known_instance();
+      const TypePtr* xoop = foop->cast_to_exactness(exact)->is_ptr();
+      assert(foop == flatten_alias_type(xoop),
+             err_msg("exactness must not affect alias type: foop = %s; xoop = %s",
+                     Type::str(foop), Type::str(xoop)));
+    }
   }
-  assert(flat == flatten_alias_type(flat), "exact bit doesn't matter");
 #endif
 
   int idx = AliasIdxTop;
diff --git a/src/share/vm/opto/library_call.cpp b/src/share/vm/opto/library_call.cpp
index 105f8c0..5f2bb30 100644
--- a/src/share/vm/opto/library_call.cpp
+++ b/src/share/vm/opto/library_call.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2544,8 +2544,8 @@
 
 #ifndef PRODUCT
     if (C->print_intrinsics() || C->print_inlining()) {
-      tty->print("  from base type: ");  adr_type->dump();
-      tty->print("  sharpened value: ");  tjp->dump();
+      tty->print("  from base type:  ");  adr_type->dump(); tty->cr();
+      tty->print("  sharpened value: ");  tjp->dump();      tty->cr();
     }
 #endif
     // Sharpen the value type.
@@ -2608,9 +2608,10 @@
   Node* offset = top();
   Node* val;
 
+  // The base is either a Java object or a value produced by Unsafe.staticFieldBase
+  Node* base = argument(1);  // type: oop
+
   if (!is_native_ptr) {
-    // The base is either a Java object or a value produced by Unsafe.staticFieldBase
-    Node* base = argument(1);  // type: oop
     // The offset is a value produced by Unsafe.staticFieldOffset or Unsafe.objectFieldOffset
     offset = argument(2);  // type: long
     // We currently rely on the cookies produced by Unsafe.xxxFieldOffset
@@ -2630,8 +2631,9 @@
     val = is_store ? argument(3) : NULL;
   }
 
-  // Can base be NULL? Otherwise, always on-heap access.
-  bool can_access_non_heap = TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop));
+  if ((_gvn.type(base)->isa_ptr() == TypePtr::NULL_PTR) && type == T_OBJECT) {
+    return false; // off-heap oop accesses are not supported
+  }
 
   const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
 
@@ -2776,34 +2778,10 @@
     }
 
     MemNode::MemOrd mo = is_volatile ? MemNode::release : MemNode::unordered;
-    if (type != T_OBJECT ) {
-      (void) store_to_memory(control(), adr, val, type, adr_type, mo, is_volatile, unaligned, mismatched);
+    if (type == T_OBJECT ) {
+      (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched);
     } else {
-      // Possibly an oop being stored to Java heap or native memory
-      if (!can_access_non_heap) {
-        // oop to Java heap.
-        (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched);
-      } else {
-        // We can't tell at compile time if we are storing in the Java heap or outside
-        // of it. So we need to emit code to conditionally do the proper type of
-        // store.
-
-        IdealKit ideal(this);
-#define __ ideal.
-        // QQQ who knows what probability is here??
-        __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); {
-          // Sync IdealKit and graphKit.
-          sync_kit(ideal);
-          Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched);
-          // Update IdealKit memory.
-          __ sync_kit(this);
-        } __ else_(); {
-          __ store(__ ctrl(), adr, val, type, alias_type->index(), mo, is_volatile, mismatched);
-        } __ end_if();
-        // Final sync IdealKit and GraphKit.
-        final_sync(ideal);
-#undef __
-      }
+      (void) store_to_memory(control(), adr, val, type, adr_type, mo, is_volatile, unaligned, mismatched);
     }
   }
 
diff --git a/src/share/vm/opto/type.cpp b/src/share/vm/opto/type.cpp
index 7cf794a..4743139 100644
--- a/src/share/vm/opto/type.cpp
+++ b/src/share/vm/opto/type.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -885,6 +885,13 @@
     st->print(" [narrowklass]");
   }
 }
+
+//-----------------------------------------------------------------------------
+const char* Type::str(const Type* t) {
+  stringStream ss;
+  t->dump_on(&ss);
+  return ss.as_string();
+}
 #endif
 
 //------------------------------singleton--------------------------------------
diff --git a/src/share/vm/opto/type.hpp b/src/share/vm/opto/type.hpp
index c0d5529..88e31fa 100644
--- a/src/share/vm/opto/type.hpp
+++ b/src/share/vm/opto/type.hpp
@@ -358,6 +358,8 @@
   }
   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
   static  void dump_stats();
+
+  static const char* str(const Type* t);
 #endif
   void typerr(const Type *t) const; // Mixing types error
 
diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp
index c9d8cc8..f43dc5e 100644
--- a/src/share/vm/prims/jvm.cpp
+++ b/src/share/vm/prims/jvm.cpp
@@ -1064,12 +1064,6 @@
   Handle h_prot  (THREAD, protection_domain);
   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
                                                h_prot, true, thread);
-  if (result != NULL) {
-    oop mirror = JNIHandles::resolve_non_null(result);
-    Klass* to_class = java_lang_Class::as_Klass(mirror);
-    ClassLoaderData* cld = ClassLoaderData::class_loader_data(h_loader());
-    cld->record_dependency(to_class, CHECK_NULL);
-  }
 
   if (TraceClassResolution && result != NULL) {
     // this function is generally only used for class loading during verification.
diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
index d914c73..43e31d2 100644
--- a/src/share/vm/runtime/arguments.cpp
+++ b/src/share/vm/runtime/arguments.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,7 +66,11 @@
 #endif // INCLUDE_ALL_GCS
 
 // Note: This is a special bug reporting site for the JVM
-#define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
+#ifdef VENDOR_URL_VM_BUG
+# define DEFAULT_VENDOR_URL_BUG VENDOR_URL_VM_BUG
+#else
+# define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
+#endif
 #define DEFAULT_JAVA_LAUNCHER  "generic"
 
 // Disable options not supported in this release, with a warning if they
diff --git a/src/share/vm/runtime/sharedRuntime.cpp b/src/share/vm/runtime/sharedRuntime.cpp
index d14f173..d5bea29 100644
--- a/src/share/vm/runtime/sharedRuntime.cpp
+++ b/src/share/vm/runtime/sharedRuntime.cpp
@@ -1232,6 +1232,14 @@
   }
 #endif
 
+  // Do not patch call site for static call when the class is not
+  // fully initialized.
+  if (invoke_code == Bytecodes::_invokestatic &&
+      !callee_method->method_holder()->is_initialized()) {
+    assert(callee_method->method_holder()->is_linked(), "must be");
+    return callee_method;
+  }
+
   // JSR 292 key invariant:
   // If the resolved method is a MethodHandle invoke target, the call
   // site must be a MethodHandle call site, because the lambda form might tail-call
diff --git a/src/share/vm/runtime/vm_version.cpp b/src/share/vm/runtime/vm_version.cpp
index 6ad28d5..1f754a1 100644
--- a/src/share/vm/runtime/vm_version.cpp
+++ b/src/share/vm/runtime/vm_version.cpp
@@ -140,7 +140,7 @@
 
 const char* Abstract_VM_Version::vm_vendor() {
 #ifdef VENDOR
-  return XSTR(VENDOR);
+  return VENDOR;
 #else
   return "JetBrains s.r.o";
 #endif
diff --git a/test/Makefile b/test/Makefile
index 055ddb9..e91844e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -262,6 +262,8 @@
 # Default JTREG to run
 JTREG = $(JT_HOME)/bin/jtreg
 
+# Use agent mode
+JTREG_BASIC_OPTIONS += -agentvm
 # Only run automatic tests
 JTREG_BASIC_OPTIONS += -a
 # Report details on all failed or error tests, times too
diff --git a/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java b/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
index 1695c35..120ab28 100644
--- a/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
+++ b/test/compiler/jsr292/RedefineMethodUsedByMultipleMethodHandles.java
@@ -26,7 +26,7 @@
  * @bug 8042235
  * @summary redefining method used by multiple MethodHandles crashes VM
  * @compile -XDignore.symbol.file RedefineMethodUsedByMultipleMethodHandles.java
- * @run main RedefineMethodUsedByMultipleMethodHandles
+ * @run main/othervm RedefineMethodUsedByMultipleMethodHandles
  */
 
 import java.io.*;
diff --git a/test/compiler/unsafe/MixedUnsafeStoreObject.java b/test/compiler/unsafe/MixedUnsafeStoreObject.java
new file mode 100644
index 0000000..637784c
--- /dev/null
+++ b/test/compiler/unsafe/MixedUnsafeStoreObject.java
@@ -0,0 +1,76 @@
+/*
+ * 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 8155635
+ * @library /testlibrary
+ * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -Xbatch -XX:-TieredCompilation compiler.unsafe.MixedUnsafeStoreObject
+ * @run main/othervm -Xbatch compiler.unsafe.MixedUnsafeStoreObject
+ * @comment Testcase currently only known to reproduce when run with -XX:+UseG1GC.
+ */
+
+package compiler.unsafe;
+
+import sun.misc.Unsafe;
+
+import com.oracle.java.testlibrary.Utils;
+
+public class MixedUnsafeStoreObject {
+    static final Unsafe UNSAFE = Utils.getUnsafe();
+
+    static final long F_OFFSET;
+
+    static {
+        try {
+            F_OFFSET = UNSAFE.objectFieldOffset(T.class.getDeclaredField("f"));
+        } catch (Exception e) {
+            throw new Error(e);
+        }
+    }
+
+    static class T {
+        Object f;
+    }
+
+    public static void testFieldInstanceObject(Object t) {
+        for (int c = 0; c < 20000; c++) { // trigger OSR compilation
+            // java/lang/Object+12 *
+            // _base = InstPtr, _ptr = BotPTR, _field = NULL, mismatched = true
+            UNSAFE.putObject(t, F_OFFSET, "foo");
+        }
+    }
+
+    public static void testFieldInstanceT(T t) {
+        for (int c = 0; c < 20000; c++) { // trigger OSR compilation
+            // ...$T+12 *
+            // _base = InstPtr, _ptr = BotPTR, _field = T.f, mismatched = false
+            UNSAFE.putObject(t, F_OFFSET, "foo");
+        }
+    }
+    public static void main(String[] args) {
+        testFieldInstanceObject(new T());
+        testFieldInstanceT(new T());
+    }
+}
+
diff --git a/test/jbProblemsList.txt b/test/jbProblemsList.txt
index 5ff6416..0d148c6 100644
--- a/test/jbProblemsList.txt
+++ b/test/jbProblemsList.txt
@@ -1,4 +1,11 @@
 # Wrong value for java.vendor property, "JetBrains s.r.o", expected to be of form: "Oracle Corporation"
+compiler/6857159/Test6857159.java                                                   8180904 generic-all
+compiler/gcbarriers/TestMembarDependencies.java                                     8180904 generic-all
+compiler/rtm/locking/TestUseRTMXendForLockBusy.java                                 8180723 generic-all
 runtime/6981737/Test6981737.java                                                            generic-all
-runtime/NMT/NMTWithCDS.java                                                         8180936 linux-all
-8180936`
\ No newline at end of file
+runtime/NMT/NMTWithCDS.java                                                         8180936 linux-all,macosx-all,windows-all
+gc/arguments/TestMinInitialErgonomics.java                                          8033667 linux-all,macosx-all
+gc/TestVerifySilently.java                                                          8180904 generic-all
+gc/TestVerifySubSet.java                                                            8180904 generic-all
+serviceability/jvmti/TestRedefineWithUnresolvedClass.java                           8180904 generic-all
+runtime/NMT/NMTWithCDS.java                                                         8180936 linux-all
\ No newline at end of file
diff --git a/test/runtime/ClassUnload/ConstantPoolDependsTest.java b/test/runtime/ClassUnload/ConstantPoolDependsTest.java
new file mode 100644
index 0000000..425d02b
--- /dev/null
+++ b/test/runtime/ClassUnload/ConstantPoolDependsTest.java
@@ -0,0 +1,86 @@
+/*
+ * 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 ConstantPoolDependsTest
+ * @bug 8210094
+ * @summary Create ClassLoader dependency from initiating loader to class loader through constant pool reference
+ * @modules java.base/jdk.internal.misc
+ *          java.compiler
+ * @library /testlibrary /testlibrary/whitebox /runtime/testlibrary
+ * @build sun.hotspot.WhiteBox
+ * @compile p2/c2.java MyDiffClassLoader.java
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ConstantPoolDependsTest
+ */
+
+import sun.hotspot.WhiteBox;
+
+
+public class ConstantPoolDependsTest {
+    public static WhiteBox wb = WhiteBox.getWhiteBox();
+    public static final String MY_TEST = "ConstantPoolDependsTest$c1c";
+
+    public static class c1c {
+        private void test() throws Exception {
+            // ConstantPool.klass_at_impl loads through constant pool and creates dependency
+            p2.c2 c2_obj = new p2.c2();
+            c2_obj.method2();
+        }
+
+        public c1c () throws Exception {
+            test();
+            ClassUnloadCommon.triggerUnloading();  // should not unload anything
+            test();
+            ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        }
+    }
+
+    static void test() throws Throwable {
+
+        // now use the same loader to load class MyTest
+        Class MyTest_class = new MyDiffClassLoader(MY_TEST).loadClass(MY_TEST);
+
+        try {
+            // Call MyTest to load p2.c2 twice and call p2.c2.method2
+            MyTest_class.newInstance();
+        } catch (Exception e) {
+            throw new RuntimeException("Test FAILED if NoSuchMethodException is thrown");
+        }
+        ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        ClassUnloadCommon.failIf(!wb.isClassAlive(MY_TEST), "should not be unloaded");
+        ClassUnloadCommon.failIf(!wb.isClassAlive("p2.c2"), "should not be unloaded");
+        // Unless MyTest_class is referenced here, the compiler can unload it.
+        System.out.println("Should not unload anything before here because " + MyTest_class + " is still alive.");
+    }
+
+    public static void main(String args[]) throws Throwable {
+        test();
+        ClassUnloadCommon.triggerUnloading();  // should unload
+        System.gc();
+        System.out.println("Should unload p2.c2 just now");
+        ClassUnloadCommon.failIf(wb.isClassAlive(MY_TEST), "should be unloaded");
+        ClassUnloadCommon.failIf(wb.isClassAlive("p2.c2"), "should be unloaded");
+    }
+}
diff --git a/test/runtime/ClassUnload/DictionaryDependsTest.java b/test/runtime/ClassUnload/DictionaryDependsTest.java
new file mode 100644
index 0000000..1a3c172
--- /dev/null
+++ b/test/runtime/ClassUnload/DictionaryDependsTest.java
@@ -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 DictionaryDependsTest
+ * @bug 8210094
+ * @summary Create ClassLoader dependency from initiating loader to class loader through reflection
+ * @modules java.base/jdk.internal.misc
+ *          java.compiler
+ * @library /testlibrary /testlibrary/whitebox /runtime/testlibrary
+ * @build sun.hotspot.WhiteBox
+ * @compile p2/c2.java MyDiffClassLoader.java
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DictionaryDependsTest
+ */
+import sun.hotspot.WhiteBox;
+import java.lang.reflect.Method;
+
+public class DictionaryDependsTest {
+    public static WhiteBox wb = WhiteBox.getWhiteBox();
+    public static final String MY_TEST = "DictionaryDependsTest$c1r";
+
+    static public class c1r {
+
+        private void test() throws Exception {
+            // forName loads through reflection and doesn't create dependency
+            Class<?> x = Class.forName("p2.c2", true, c1r.class.getClassLoader());
+            Method m = x.getMethod("method2");
+            java.lang.Object t = x.newInstance();
+            m.invoke(t);
+        }
+
+        public c1r () throws Exception {
+            test();
+            ClassUnloadCommon.triggerUnloading();  // should unload p2.c2
+            test();
+            ClassUnloadCommon.triggerUnloading();  // should unload p2.c2
+        }
+    }
+
+    public void test() throws Throwable {
+
+        // now use the same loader to load class MyTest
+        Class MyTest_class = new MyDiffClassLoader(MY_TEST).loadClass(MY_TEST);
+
+        try {
+            // Call MyTest to load p2.c2 twice and call p2.c2.method2
+            MyTest_class.newInstance();
+        } catch (Exception e) {
+            System.out.println("Not expected NSME");
+            throw new RuntimeException("Not expecting NSME");
+        }
+        ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        ClassUnloadCommon.failIf(!wb.isClassAlive(MY_TEST), "should not be unloaded");
+        ClassUnloadCommon.failIf(!wb.isClassAlive("p2.c2"), "should not be unloaded");
+        // Unless MyTest_class is referenced here, the compiler can unload it.
+        System.out.println("Should not unload anything before here because " + MyTest_class + " is still alive.");
+    }
+
+    public static void main(String args[]) throws Throwable {
+        DictionaryDependsTest d = new DictionaryDependsTest();
+        d.test();
+        ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        System.out.println("Should unload MyTest and p2.c2 just now");
+        ClassUnloadCommon.failIf(wb.isClassAlive(MY_TEST), "should be unloaded");
+        ClassUnloadCommon.failIf(wb.isClassAlive("p2.c2"), "should be unloaded");
+    }
+}
diff --git a/test/runtime/ClassUnload/MyDiffClassLoader.java b/test/runtime/ClassUnload/MyDiffClassLoader.java
new file mode 100644
index 0000000..84afd06
--- /dev/null
+++ b/test/runtime/ClassUnload/MyDiffClassLoader.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import com.oracle.java.testlibrary.InMemoryJavaCompiler;
+
+public class MyDiffClassLoader extends ClassLoader {
+
+    public String loaderName;
+    public static boolean switchClassData = false;
+
+    MyDiffClassLoader(String name) {
+        this.loaderName = name;
+    }
+
+    public Class loadClass(String name) throws ClassNotFoundException {
+        if (!name.contains("c1r") &&
+            !name.contains("c1c") &&
+            !name.contains("c1s") &&
+            !name.equals("p2.c2")) {
+                return super.loadClass(name);
+        }
+
+        // new loader loads p2.c2
+        if  (name.equals("p2.c2") && !loaderName.equals("C2Loader")) {
+            Class<?> c = new MyDiffClassLoader("C2Loader").loadClass(name);
+            switchClassData = true;
+            return c;
+        }
+
+        byte[] data = switchClassData ? getNewClassData(name) : getClassData(name);
+        System.out.println("name is " + name);
+        return defineClass(name, data, 0, data.length);
+    }
+    byte[] getClassData(String name) {
+        try {
+           String TempName = name.replaceAll("\\.", "/");
+           String currentDir = System.getProperty("test.classes");
+           String filename = currentDir + File.separator + TempName + ".class";
+           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;
+        }
+    }
+
+    // Return p2.c2 with everything removed
+    byte[] getNewClassData(String name) {
+        return InMemoryJavaCompiler.compile("p2.c2", "package p2; public class c2 { }");
+    }
+}
diff --git a/test/runtime/ClassUnload/SuperDependsTest.java b/test/runtime/ClassUnload/SuperDependsTest.java
new file mode 100644
index 0000000..215b479
--- /dev/null
+++ b/test/runtime/ClassUnload/SuperDependsTest.java
@@ -0,0 +1,81 @@
+/*
+ * 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 SuperDependsTest
+ * @bug 8210094
+ * @summary Create ClassLoader dependency from initiating loader to class loader through subclassing
+ * @modules java.base/jdk.internal.misc
+ *          java.compiler
+ * @library /testlibrary /testlibrary/whitebox /runtime/testlibrary
+ * @build sun.hotspot.WhiteBox
+ * @compile p2/c2.java MyDiffClassLoader.java
+ * @run main ClassFileInstaller sun.hotspot.WhiteBox
+ *                              sun.hotspot.WhiteBox$WhiteBoxPermission
+ * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SuperDependsTest
+ */
+import sun.hotspot.WhiteBox;
+import p2.*;
+
+public class SuperDependsTest {
+    public static WhiteBox wb = WhiteBox.getWhiteBox();
+    public static final String MY_TEST = "SuperDependsTest$c1s";
+
+
+    // p2.c2 loads through super class and creates dependency
+    public static class c1s extends p2.c2 {
+
+        private void test() throws Exception {
+            method2();
+        }
+
+        public c1s () throws Exception {
+            test();
+            ClassUnloadCommon.triggerUnloading();  // should not unload anything
+            test();
+        }
+    }
+
+    public void test() throws Throwable {
+
+        // now use the same loader to load class MyTest
+        Class MyTest_class = new MyDiffClassLoader(MY_TEST).loadClass(MY_TEST);
+
+        // Call MyTest to load p2.c2 twice and call p2.c2.method2
+        MyTest_class.newInstance();
+        ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        ClassUnloadCommon.failIf(!wb.isClassAlive(MY_TEST), "should not be unloaded");
+        ClassUnloadCommon.failIf(!wb.isClassAlive("p2.c2"), "should not be unloaded");
+        // Unless MyTest_class is referenced here, the compiler can unload it.
+        System.out.println("Should not unload anything before here because " + MyTest_class + " is still alive.");
+    }
+
+    public static void main(String args[]) throws Throwable {
+        SuperDependsTest d = new SuperDependsTest();
+        d.test();
+        ClassUnloadCommon.triggerUnloading();  // should not unload anything
+        System.out.println("Should unload MyTest and p2.c2 just now");
+        ClassUnloadCommon.failIf(wb.isClassAlive(MY_TEST), "should be unloaded");
+        ClassUnloadCommon.failIf(wb.isClassAlive("p2.c2"), "should be unloaded");
+    }
+}
diff --git a/test/runtime/ClassUnload/p2/c2.java b/test/runtime/ClassUnload/p2/c2.java
new file mode 100644
index 0000000..2892539
--- /dev/null
+++ b/test/runtime/ClassUnload/p2/c2.java
@@ -0,0 +1,28 @@
+/*
+ * 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 p2;
+
+public class c2 {
+    int i;
+    public void method2() { i = 5; System.out.println("c2 method2 called"); }
+}
diff --git a/test/sanity/WhiteBox.java b/test/sanity/MismatchedWhiteBox/WhiteBox.java
similarity index 100%
rename from test/sanity/WhiteBox.java
rename to test/sanity/MismatchedWhiteBox/WhiteBox.java
diff --git a/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java b/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java
index 1953d18..4895fe1 100644
--- a/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java
+++ b/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java
@@ -152,6 +152,9 @@
     args.add(javapath);
     Collections.addAll(args, getPlatformSpecificVMArgs());
 
+    args.add("-cp");
+    args.add(System.getProperty("java.class.path"));
+
     if (addTestVmOptions) {
       String vmopts = System.getProperty("test.vm.opts");
       if (vmopts != null && vmopts.length() > 0) {