Merge
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 9b00c66..0c61460 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -376,3 +376,4 @@
 8728756c2f70a79a90188f4019cfd6b9a275765c jdk-9+131
 a24702d4d5ab0015a5c553ed57f66fce7d85155e jdk-9+132
 be1218f792a450dfb5d4b1f82616b9d95a6a732e jdk-9+133
+065724348690eda41fc69112278d8da6dcde548c jdk-9+134
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 92e055d..b233cdc 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -5095,7 +5095,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1470863189
+DATE_WHEN_GENERATED=1472718471
 
 ###############################################################################
 #
@@ -15944,6 +15944,8 @@
     HOTSPOT_TARGET_CPU_DEFINE=S390
   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
     HOTSPOT_TARGET_CPU_DEFINE=S390
+  elif test "x$OPENJDK_TARGET_CPU" != x; then
+    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
   fi
 
 
@@ -16117,6 +16119,8 @@
     HOTSPOT_BUILD_CPU_DEFINE=S390
   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
     HOTSPOT_BUILD_CPU_DEFINE=S390
+  elif test "x$OPENJDK_BUILD_CPU" != x; then
+    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
   fi
 
 
diff --git a/common/autoconf/platform.m4 b/common/autoconf/platform.m4
index 2fbac1d..e7ffe4a 100644
--- a/common/autoconf/platform.m4
+++ b/common/autoconf/platform.m4
@@ -454,6 +454,8 @@
     HOTSPOT_$1_CPU_DEFINE=S390
   elif test "x$OPENJDK_$1_CPU" = xs390x; then
     HOTSPOT_$1_CPU_DEFINE=S390
+  elif test "x$OPENJDK_$1_CPU" != x; then
+    HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
   fi
   AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
 
diff --git a/corba/.hgtags b/corba/.hgtags
index a959d0d..ee81ced 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -376,3 +376,4 @@
 f7e1d5337c2e550fe553df7a3886bbed80292ecd jdk-9+131
 1ab4b9399c4cba584f66c1c088188f2f565fbf9c jdk-9+132
 2021bfedf1c478a4808a7711a6090682a12f4c0e jdk-9+133
+1a497f5ca0cfd88115cc7daa8af8a62b8741caf2 jdk-9+134
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index 8d8a2e6..4cc7243 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -536,3 +536,4 @@
 943bf73b49c33c2d7cbd796f6a4ae3c7a00ae932 jdk-9+131
 713951c08aa26813375175c2ab6cc99ff2a56903 jdk-9+132
 a25e0fb6033245ab075136e744d362ce765464cd jdk-9+133
+b8b694c6b4d2ab0939aed7adaf0eec1ac321a085 jdk-9+134
diff --git a/hotspot/make/test/JtregNative.gmk b/hotspot/make/test/JtregNative.gmk
index ce4a031..9ed952f 100644
--- a/hotspot/make/test/JtregNative.gmk
+++ b/hotspot/make/test/JtregNative.gmk
@@ -71,15 +71,15 @@
 endif
 
 ifeq ($(TOOLCHAIN_TYPE), solstudio)
-    BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_liboverflow := -lc
-    BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libSimpleClassFileLoadHook := -lc
-    BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libGetNamedModuleTest := -lc
+    BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
+    BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
+    BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
 endif
 
 ifeq ($(OPENJDK_TARGET_OS), linux)
     BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
     BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
-    BUILD_HOTSPOT_JTREG_EXECUTABLES_LDFLAGS_exeinvoke := -ljvm -lpthread
+    BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
     BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
 endif
 
diff --git a/hotspot/src/cpu/aarch64/vm/aarch64.ad b/hotspot/src/cpu/aarch64/vm/aarch64.ad
index 50c6d33..f338390 100644
--- a/hotspot/src/cpu/aarch64/vm/aarch64.ad
+++ b/hotspot/src/cpu/aarch64/vm/aarch64.ad
@@ -4680,7 +4680,7 @@
       Label retaddr;
       __ adr(rscratch2, retaddr);
       __ lea(rscratch1, RuntimeAddress(entry));
-      // Leave a breadcrumb for JavaThread::pd_last_frame().
+      // Leave a breadcrumb for JavaFrameAnchor::capture_last_Java_pc()
       __ stp(zr, rscratch2, Address(__ pre(sp, -2 * wordSize)));
       __ blrt(rscratch1, gpcnt, fpcnt, rtype);
       __ bind(retaddr);
diff --git a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
index 7752e7b..f6339d7 100644
--- a/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp
@@ -78,7 +78,7 @@
   }
   pop(r0, sp);
 #endif
-  reset_last_Java_frame(true, true);
+  reset_last_Java_frame(true);
   maybe_isb();
 
   // check for pending exceptions
@@ -547,7 +547,7 @@
     __ bind(L);
   }
 #endif
-  __ reset_last_Java_frame(true, false);
+  __ reset_last_Java_frame(true);
   __ maybe_isb();
 
   // check for pending exceptions
diff --git a/hotspot/src/cpu/aarch64/vm/frame_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/frame_aarch64.cpp
index 473c4bc..8963353 100644
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.cpp
@@ -336,13 +336,16 @@
   JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
   assert(!entry_frame_is_first(), "next Java fp must be non zero");
   assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");
+  // Since we are walking the stack now this nested anchor is obviously walkable
+  // even if it wasn't when it was stacked.
+  if (!jfa->walkable()) {
+    // Capture _last_Java_pc (if needed) and mark anchor walkable.
+    jfa->capture_last_Java_pc();
+  }
   map->clear();
   assert(map->include_argument_oops(), "should be set by clear");
-  if (jfa->last_Java_pc() != NULL ) {
-    frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
-    return fr;
-  }
-  frame fr(jfa->last_Java_sp(), jfa->last_Java_fp());
+  vmassert(jfa->last_Java_pc() != NULL, "not walkable");
+  frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
   return fr;
 }
 
@@ -769,3 +772,21 @@
   init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
 }
 #endif
+
+void JavaFrameAnchor::make_walkable(JavaThread* thread) {
+  // last frame set?
+  if (last_Java_sp() == NULL) return;
+  // already walkable?
+  if (walkable()) return;
+  vmassert(Thread::current() == (Thread*)thread, "not current thread");
+  vmassert(last_Java_sp() != NULL, "not called from Java code?");
+  vmassert(last_Java_pc() == NULL, "already walkable");
+  capture_last_Java_pc();
+  vmassert(walkable(), "something went wrong");
+}
+
+void JavaFrameAnchor::capture_last_Java_pc() {
+  vmassert(_last_Java_sp != NULL, "no last frame set");
+  vmassert(_last_Java_pc == NULL, "already walkable");
+  _last_Java_pc = (address)_last_Java_sp[-1];
+}
diff --git a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp
index dd73bf5..925690b 100644
--- a/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp
@@ -201,7 +201,7 @@
 // #endif
     MacroAssembler::null_check(reg, offset);
 // #ifdef ASSERT
-//     reset_last_Java_frame(true, false);
+//     reset_last_Java_frame(true);
 // #endif
   }
 
diff --git a/hotspot/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp
index e6375d7..afdab23 100644
--- a/hotspot/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/javaFrameAnchor_aarch64.hpp
@@ -64,10 +64,9 @@
     _last_Java_sp = src->_last_Java_sp;
   }
 
-  // Always walkable
-  bool walkable(void) { return true; }
-  // Never any thing to do since we are always walkable and can find address of return addresses
-  void make_walkable(JavaThread* thread) { }
+  bool walkable(void)                            { return _last_Java_sp != NULL && _last_Java_pc != NULL; }
+  void make_walkable(JavaThread* thread);
+  void capture_last_Java_pc(void);
 
   intptr_t* last_Java_sp(void) const             { return _last_Java_sp; }
 
diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
index 6e686f5..bd35071 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp
@@ -274,19 +274,18 @@
 }
 
 
-void MacroAssembler::reset_last_Java_frame(bool clear_fp,
-                                           bool clear_pc) {
+void MacroAssembler::reset_last_Java_frame(bool clear_fp) {
   // we must set sp to zero to clear frame
   str(zr, Address(rthread, JavaThread::last_Java_sp_offset()));
+
   // must clear fp, so that compiled frames are not confused; it is
   // possible that we need it only for debugging
   if (clear_fp) {
     str(zr, Address(rthread, JavaThread::last_Java_fp_offset()));
   }
 
-  if (clear_pc) {
-    str(zr, Address(rthread, JavaThread::last_Java_pc_offset()));
-  }
+  // Always clear the pc because it could have been set by make_walkable()
+  str(zr, Address(rthread, JavaThread::last_Java_pc_offset()));
 }
 
 // Calls to C land
@@ -632,7 +631,7 @@
 
   // reset last Java frame
   // Only interpreter should have to clear fp
-  reset_last_Java_frame(true, true);
+  reset_last_Java_frame(true);
 
    // C++ interp handles this in the interpreter
   check_and_handle_popframe(java_thread);
@@ -875,7 +874,7 @@
   if (type == bytecode_start) {
     // set_last_Java_frame(esp, rfp, (address)NULL);
     Assembler:: notify(type);
-    // reset_last_Java_frame(true, false);
+    // reset_last_Java_frame(true);
   }
   else
     Assembler:: notify(type);
diff --git a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
index 51a47b7..84fe75e 100644
--- a/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.hpp
@@ -757,10 +757,10 @@
                            Register last_java_pc,
                            Register scratch);
 
-  void reset_last_Java_frame(Register thread, bool clearfp, bool clear_pc);
+  void reset_last_Java_frame(Register thread);
 
-  // thread in the default location (r15_thread on 64bit)
-  void reset_last_Java_frame(bool clear_fp, bool clear_pc);
+  // thread in the default location (rthread)
+  void reset_last_Java_frame(bool clear_fp);
 
   // Stores
   void store_check(Register obj);                // store check for obj - register is destroyed afterwards
diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
index 6a5bb7a..771dc09 100644
--- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
@@ -2030,7 +2030,7 @@
     __ bind(dtrace_method_exit_done);
   }
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   // Unpack oop result
   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@@ -2370,7 +2370,7 @@
     __ bind(retaddr);
     oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
 
-    __ reset_last_Java_frame(false, false);
+    __ reset_last_Java_frame(false);
 
     __ b(after_fetch_unroll_info_call);
   } // EnableJVMCI
@@ -2465,7 +2465,7 @@
   // find any register it might need.
   oop_maps->add_gc_map(__ pc() - start, map);
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
 #if INCLUDE_JVMCI
   if (EnableJVMCI) {
@@ -2606,7 +2606,7 @@
                        new OopMap( frame_size_in_words, 0 ));
 
   // Clear fp AND pc
-  __ reset_last_Java_frame(true, true);
+  __ reset_last_Java_frame(true);
 
   // Collect return values
   __ ldrd(v0, Address(sp, RegisterSaver::v0_offset_in_bytes()));
@@ -2709,7 +2709,7 @@
 
   oop_maps->add_gc_map(__ pc() - start, map);
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   // move UnrollBlock* into r4
   __ mov(r4, r0);
@@ -2828,7 +2828,7 @@
   oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
 
   // Clear fp AND pc
-  __ reset_last_Java_frame(true, true);
+  __ reset_last_Java_frame(true);
 
   // Pop self-frame.
   __ leave();                 // Epilog
@@ -2906,7 +2906,7 @@
 
   Label noException;
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   __ maybe_isb();
   __ membar(Assembler::LoadLoad | Assembler::LoadStore);
@@ -2985,7 +2985,7 @@
   // r0 contains the address we are going to jump to assuming no exception got installed
 
   // clear last_Java_sp
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
   // check for pending exceptions
   Label pending;
   __ ldr(rscratch1, Address(rthread, Thread::pending_exception_offset()));
@@ -3116,7 +3116,7 @@
 
   oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   // Restore callee-saved registers
 
diff --git a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
index 13071f5..4df4aad 100644
--- a/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp
@@ -3801,7 +3801,7 @@
 
     oop_maps->add_gc_map(the_pc - start, map);
 
-    __ reset_last_Java_frame(true, true);
+    __ reset_last_Java_frame(true);
     __ maybe_isb();
 
     __ leave();
diff --git a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp
index 293024c..5ac01c9 100644
--- a/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/templateInterpreterGenerator_aarch64.cpp
@@ -1353,7 +1353,7 @@
   __ stlrw(rscratch1, rscratch2);
 
   // reset_last_Java_frame
-  __ reset_last_Java_frame(true, true);
+  __ reset_last_Java_frame(true);
 
   // reset handle block
   __ ldr(t, Address(rthread, JavaThread::active_handles_offset()));
diff --git a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
index 3fd9dbe..b2f6e23 100644
--- a/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -852,26 +852,23 @@
     // get next bytecode
     __ load_unsigned_byte(r1, at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)));
 
-    // do actual aload_0
-    aload(0);
-
     // if _getfield then wait with rewrite
     __ cmpw(r1, Bytecodes::Bytecodes::_getfield);
     __ br(Assembler::EQ, done);
 
-    // if _igetfield then reqrite to _fast_iaccess_0
+    // if _igetfield then rewrite to _fast_iaccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_iaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpw(r1, Bytecodes::_fast_igetfield);
     __ movw(bc, Bytecodes::_fast_iaccess_0);
     __ br(Assembler::EQ, rewrite);
 
-    // if _agetfield then reqrite to _fast_aaccess_0
+    // if _agetfield then rewrite to _fast_aaccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_aaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpw(r1, Bytecodes::_fast_agetfield);
     __ movw(bc, Bytecodes::_fast_aaccess_0);
     __ br(Assembler::EQ, rewrite);
 
-    // if _fgetfield then reqrite to _fast_faccess_0
+    // if _fgetfield then rewrite to _fast_faccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_faccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpw(r1, Bytecodes::_fast_fgetfield);
     __ movw(bc, Bytecodes::_fast_faccess_0);
@@ -887,9 +884,10 @@
     patch_bytecode(Bytecodes::_aload_0, bc, r1, false);
 
     __ bind(done);
-  } else {
-    aload(0);
   }
+
+  // Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
+  aload(0);
 }
 
 void TemplateTable::istore()
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
index bab62cd..2209709 100644
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,6 +28,7 @@
 
 #include "runtime/globals_extension.hpp"
 #include "runtime/vm_version.hpp"
+#include "utilities/sizes.hpp"
 
 class VM_Version : public Abstract_VM_Version {
   friend class JVMCIVMStructs;
diff --git a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
index 44bee0c..f828aa0 100644
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
@@ -705,9 +705,6 @@
     // get next byte
     __ ldub(at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)), G3_scratch);
 
-    // do actual aload_0
-    aload(0);
-
     // if _getfield then wait with rewrite
     __ cmp_and_br_short(G3_scratch, (int)Bytecodes::_getfield, Assembler::equal, Assembler::pn, done);
 
@@ -738,9 +735,10 @@
     __ bind(rewrite);
     patch_bytecode(Bytecodes::_aload_0, G4_scratch, G3_scratch, false);
     __ bind(done);
-  } else {
-    aload(0);
   }
+
+  // Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
+  aload(0);
 }
 
 void TemplateTable::istore() {
diff --git a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
index 0b607df..5fe4556 100644
--- a/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_Runtime1_x86.cpp
@@ -98,7 +98,7 @@
   }
   pop(rax);
 #endif
-  reset_last_Java_frame(thread, true, align_stack);
+  reset_last_Java_frame(thread, true);
 
   // discard thread and arguments
   NOT_LP64(addptr(rsp, num_rt_args()*BytesPerWord));
@@ -872,7 +872,7 @@
   }
   __ pop(rax);
 #endif
-  __ reset_last_Java_frame(thread, true, false);
+  __ reset_last_Java_frame(thread, true);
 #ifndef _LP64
   __ pop(rcx); // discard thread arg
   __ pop(rcx); // discard dummy
diff --git a/hotspot/src/cpu/x86/vm/frame_x86.cpp b/hotspot/src/cpu/x86/vm/frame_x86.cpp
index 1db4b42..0a636f4 100644
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp
@@ -337,13 +337,16 @@
   JavaFrameAnchor* jfa = entry_frame_call_wrapper()->anchor();
   assert(!entry_frame_is_first(), "next Java fp must be non zero");
   assert(jfa->last_Java_sp() > sp(), "must be above this frame on stack");
+  // Since we are walking the stack now this nested anchor is obviously walkable
+  // even if it wasn't when it was stacked.
+  if (!jfa->walkable()) {
+    // Capture _last_Java_pc (if needed) and mark anchor walkable.
+    jfa->capture_last_Java_pc();
+  }
   map->clear();
   assert(map->include_argument_oops(), "should be set by clear");
-  if (jfa->last_Java_pc() != NULL ) {
-    frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
-    return fr;
-  }
-  frame fr(jfa->last_Java_sp(), jfa->last_Java_fp());
+  vmassert(jfa->last_Java_pc() != NULL, "not walkable");
+  frame fr(jfa->last_Java_sp(), jfa->last_Java_fp(), jfa->last_Java_pc());
   return fr;
 }
 
@@ -666,3 +669,21 @@
   init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
 }
 #endif
+
+void JavaFrameAnchor::make_walkable(JavaThread* thread) {
+  // last frame set?
+  if (last_Java_sp() == NULL) return;
+  // already walkable?
+  if (walkable()) return;
+  vmassert(Thread::current() == (Thread*)thread, "not current thread");
+  vmassert(last_Java_sp() != NULL, "not called from Java code?");
+  vmassert(last_Java_pc() == NULL, "already walkable");
+  capture_last_Java_pc();
+  vmassert(walkable(), "something went wrong");
+}
+
+void JavaFrameAnchor::capture_last_Java_pc() {
+  vmassert(_last_Java_sp != NULL, "no last frame set");
+  vmassert(_last_Java_pc == NULL, "already walkable");
+  _last_Java_pc = (address)_last_Java_sp[-1];
+}
diff --git a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
index 0c968ce..d7d8e47 100644
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
@@ -101,6 +101,7 @@
   // call a specialized frame constructor instead of this one.
   // Then we could use the assert below. However this assert is of somewhat dubious
   // value.
+  // UPDATE: this constructor is only used by trace_method_handle_stub() now.
   // assert(_pc != NULL, "no pc?");
 
   _cb = CodeCache::find_blob(_pc);
diff --git a/hotspot/src/cpu/x86/vm/javaFrameAnchor_x86.hpp b/hotspot/src/cpu/x86/vm/javaFrameAnchor_x86.hpp
index 77298e5..40eedf0 100644
--- a/hotspot/src/cpu/x86/vm/javaFrameAnchor_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/javaFrameAnchor_x86.hpp
@@ -62,10 +62,9 @@
     _last_Java_sp = src->_last_Java_sp;
   }
 
-  // Always walkable
-  bool walkable(void) { return true; }
-  // Never any thing to do since we are always walkable and can find address of return addresses
-  void make_walkable(JavaThread* thread) { }
+  bool walkable(void)                            { return _last_Java_sp != NULL && _last_Java_pc != NULL; }
+  void make_walkable(JavaThread* thread);
+  void capture_last_Java_pc(void);
 
   intptr_t* last_Java_sp(void) const             { return _last_Java_sp; }
 
diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
index 9b52535..9957425 100644
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp
@@ -752,8 +752,7 @@
   }
 }
 
-void MacroAssembler::reset_last_Java_frame(bool clear_fp,
-                                           bool clear_pc) {
+void MacroAssembler::reset_last_Java_frame(bool clear_fp) {
   // we must set sp to zero to clear frame
   movptr(Address(r15_thread, JavaThread::last_Java_sp_offset()), NULL_WORD);
   // must clear fp, so that compiled frames are not confused; it is
@@ -762,9 +761,8 @@
     movptr(Address(r15_thread, JavaThread::last_Java_fp_offset()), NULL_WORD);
   }
 
-  if (clear_pc) {
-    movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
-  }
+  // Always clear the pc because it could have been set by make_walkable()
+  movptr(Address(r15_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
 }
 
 void MacroAssembler::set_last_Java_frame(Register last_java_sp,
@@ -2531,7 +2529,7 @@
   }
   // reset last Java frame
   // Only interpreter should have to clear fp
-  reset_last_Java_frame(java_thread, true, false);
+  reset_last_Java_frame(java_thread, true);
 
    // C++ interp handles this in the interpreter
   check_and_handle_popframe(java_thread);
@@ -3642,8 +3640,7 @@
   pusha();
 }
 
-void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp, bool clear_pc) {
-  // determine java_thread register
+void MacroAssembler::reset_last_Java_frame(Register java_thread, bool clear_fp) { // determine java_thread register
   if (!java_thread->is_valid()) {
     java_thread = rdi;
     get_thread(java_thread);
@@ -3654,8 +3651,8 @@
     movptr(Address(java_thread, JavaThread::last_Java_fp_offset()), NULL_WORD);
   }
 
-  if (clear_pc)
-    movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
+  // Always clear the pc because it could have been set by make_walkable()
+  movptr(Address(java_thread, JavaThread::last_Java_pc_offset()), NULL_WORD);
 
 }
 
diff --git a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
index 2098c05..cd3c67c 100644
--- a/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/macroAssembler_x86.hpp
@@ -288,10 +288,10 @@
                            Register last_java_fp,
                            address last_java_pc);
 
-  void reset_last_Java_frame(Register thread, bool clear_fp, bool clear_pc);
+  void reset_last_Java_frame(Register thread, bool clear_fp);
 
   // thread in the default location (r15_thread on 64bit)
-  void reset_last_Java_frame(bool clear_fp, bool clear_pc);
+  void reset_last_Java_frame(bool clear_fp);
 
   // Stores
   void store_check(Register obj);                // store check for obj - register is destroyed afterwards
diff --git a/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp b/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp
index 5ff6301..a40edbd 100644
--- a/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/runtime_x86_32.cpp
@@ -117,7 +117,7 @@
   // No registers to map, rbp is known implicitly
   oop_maps->add_gc_map( __ pc() - start,  new OopMap( framesize, 0 ));
   __ get_thread(rcx);
-  __ reset_last_Java_frame(rcx, false, false);
+  __ reset_last_Java_frame(rcx, false);
 
   // Restore callee-saved registers
   __ movptr(rbp, Address(rsp, rbp_off * wordSize));
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
index a24397f..96961a8 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
@@ -1330,7 +1330,7 @@
   __ increment(rsp, wordSize);
 
   __ get_thread(thread);
-  __ reset_last_Java_frame(thread, false, true);
+  __ reset_last_Java_frame(thread, false);
 
   save_or_restore_arguments(masm, stack_slots, total_in_args,
                             arg_save_area, NULL, in_regs, in_sig_bt);
@@ -2224,7 +2224,7 @@
 
   // We can finally stop using that last_Java_frame we setup ages ago
 
-  __ reset_last_Java_frame(thread, false, true);
+  __ reset_last_Java_frame(thread, false);
 
   // Unpack oop result
   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@@ -2553,7 +2553,7 @@
   __ pop(rcx);
 
   __ get_thread(rcx);
-  __ reset_last_Java_frame(rcx, false, false);
+  __ reset_last_Java_frame(rcx, false);
 
   // Load UnrollBlock into EDI
   __ mov(rdi, rax);
@@ -2702,7 +2702,7 @@
   __ push(rax);
 
   __ get_thread(rcx);
-  __ reset_last_Java_frame(rcx, false, false);
+  __ reset_last_Java_frame(rcx, false);
 
   // Collect return values
   __ movptr(rax,Address(rsp, (RegisterSaver::raxOffset() + additional_words + 1)*wordSize));
@@ -2806,7 +2806,7 @@
 
   __ get_thread(rcx);
 
-  __ reset_last_Java_frame(rcx, false, false);
+  __ reset_last_Java_frame(rcx, false);
 
   // Load UnrollBlock into EDI
   __ movptr(rdi, rax);
@@ -2912,7 +2912,7 @@
   oop_maps->add_gc_map( __ pc()-start, new OopMap( framesize, 0 ) );
 
   __ get_thread(rdi);
-  __ reset_last_Java_frame(rdi, true, false);
+  __ reset_last_Java_frame(rdi, true);
 
   // Pop self-frame.
   __ leave();     // Epilog!
@@ -3007,7 +3007,7 @@
 
   // Clear last_Java_sp again
   __ get_thread(java_thread);
-  __ reset_last_Java_frame(java_thread, false, false);
+  __ reset_last_Java_frame(java_thread, false);
 
   __ cmpptr(Address(java_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
   __ jcc(Assembler::equal, noException);
@@ -3082,7 +3082,7 @@
   __ addptr(rsp, wordSize);
 
   // clear last_Java_sp
-  __ reset_last_Java_frame(thread, true, false);
+  __ reset_last_Java_frame(thread, true);
   // check for pending exceptions
   Label pending;
   __ cmpptr(Address(thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
index 81ed472f..76b7bb4 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
@@ -1461,7 +1461,7 @@
   __ mov(rsp, r12); // restore sp
   __ reinit_heapbase();
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   save_or_restore_arguments(masm, stack_slots, total_in_args,
                             arg_save_area, NULL, in_regs, in_sig_bt);
@@ -2577,7 +2577,7 @@
     restore_native_result(masm, ret_type, stack_slots);
   }
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   // Unpack oop result
   if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
@@ -2849,7 +2849,7 @@
     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, Deoptimization::uncommon_trap)));
     oop_maps->add_gc_map( __ pc()-start, map->deep_copy());
 
-    __ reset_last_Java_frame(false, false);
+    __ reset_last_Java_frame(false);
 
     __ jmp(after_fetch_unroll_info_call);
   } // EnableJVMCI
@@ -2939,7 +2939,7 @@
   // find any register it might need.
   oop_maps->add_gc_map(__ pc() - start, map);
 
-  __ reset_last_Java_frame(false, false);
+  __ reset_last_Java_frame(false);
 
 #if INCLUDE_JVMCI
   if (EnableJVMCI) {
@@ -3087,7 +3087,7 @@
                        new OopMap( frame_size_in_words, 0 ));
 
   // Clear fp AND pc
-  __ reset_last_Java_frame(true, true);
+  __ reset_last_Java_frame(true);
 
   // Collect return values
   __ movdbl(xmm0, Address(rsp, RegisterSaver::xmm0_offset_in_bytes()));
@@ -3164,7 +3164,7 @@
 
   oop_maps->add_gc_map(__ pc() - start, map);
 
-  __ reset_last_Java_frame(false, false);
+  __ reset_last_Java_frame(false);
 
   // Load UnrollBlock* into rdi
   __ mov(rdi, rax);
@@ -3281,7 +3281,7 @@
   oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
 
   // Clear fp AND pc
-  __ reset_last_Java_frame(true, true);
+  __ reset_last_Java_frame(true);
 
   // Pop self-frame.
   __ leave();                 // Epilog
@@ -3364,7 +3364,7 @@
 
   Label noException;
 
-  __ reset_last_Java_frame(false, false);
+  __ reset_last_Java_frame(false);
 
   __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
   __ jcc(Assembler::equal, noException);
@@ -3434,7 +3434,7 @@
   // rax contains the address we are going to jump to assuming no exception got installed
 
   // clear last_Java_sp
-  __ reset_last_Java_frame(false, false);
+  __ reset_last_Java_frame(false);
   // check for pending exceptions
   Label pending;
   __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
@@ -3809,7 +3809,7 @@
 
   oop_maps->add_gc_map(the_pc - start, new OopMap(SimpleRuntimeFrame::framesize, 0));
 
-  __ reset_last_Java_frame(false, true);
+  __ reset_last_Java_frame(false);
 
   // Restore callee-saved registers
 
diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
index 60485a6..c52be1e 100644
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
@@ -3766,7 +3766,7 @@
     // however can use the register value directly if it is callee saved.
     __ get_thread(java_thread);
 
-    __ reset_last_Java_frame(java_thread, true, false);
+    __ reset_last_Java_frame(java_thread, true);
 
     __ leave(); // required for proper stackwalking of RuntimeStub frame
 
diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
index 02e46bd..668b3e1 100644
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
@@ -5018,7 +5018,7 @@
 
     oop_maps->add_gc_map(the_pc - start, map);
 
-    __ reset_last_Java_frame(true, true);
+    __ reset_last_Java_frame(true);
 
     __ leave(); // required for proper stackwalking of RuntimeStub frame
 
diff --git a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
index 225850e..845959f 100644
--- a/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/templateInterpreterGenerator_x86.cpp
@@ -1167,7 +1167,7 @@
   __ movl(Address(thread, JavaThread::thread_state_offset()), _thread_in_Java);
 
   // reset_last_Java_frame
-  __ reset_last_Java_frame(thread, true, true);
+  __ reset_last_Java_frame(thread, true);
 
   // reset handle block
   __ movptr(t, Address(thread, JavaThread::active_handles_offset()));
@@ -1659,7 +1659,7 @@
   __ set_last_Java_frame(noreg, rbp, __ pc());
   __ super_call_VM_leaf(CAST_FROM_FN_PTR(address, InterpreterRuntime::popframe_move_outgoing_args), r15_thread, c_rarg1, c_rarg2);
 #endif
-  __ reset_last_Java_frame(thread, true, true);
+  __ reset_last_Java_frame(thread, true);
 
   // Restore the last_sp and null it out
   __ movptr(rsp, Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize));
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp
index 9f99613..5f1c935 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -858,26 +858,23 @@
     // get next byte
     __ load_unsigned_byte(rbx, at_bcp(Bytecodes::length_for(Bytecodes::_aload_0)));
 
-    // do actual aload_0
-    aload(0);
-
     // if _getfield then wait with rewrite
     __ cmpl(rbx, Bytecodes::_getfield);
     __ jcc(Assembler::equal, done);
 
-    // if _igetfield then reqrite to _fast_iaccess_0
+    // if _igetfield then rewrite to _fast_iaccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_iaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpl(rbx, Bytecodes::_fast_igetfield);
     __ movl(bc, Bytecodes::_fast_iaccess_0);
     __ jccb(Assembler::equal, rewrite);
 
-    // if _agetfield then reqrite to _fast_aaccess_0
+    // if _agetfield then rewrite to _fast_aaccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_aaccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpl(rbx, Bytecodes::_fast_agetfield);
     __ movl(bc, Bytecodes::_fast_aaccess_0);
     __ jccb(Assembler::equal, rewrite);
 
-    // if _fgetfield then reqrite to _fast_faccess_0
+    // if _fgetfield then rewrite to _fast_faccess_0
     assert(Bytecodes::java_code(Bytecodes::_fast_faccess_0) == Bytecodes::_aload_0, "fix bytecode definition");
     __ cmpl(rbx, Bytecodes::_fast_fgetfield);
     __ movl(bc, Bytecodes::_fast_faccess_0);
@@ -893,9 +890,10 @@
     patch_bytecode(Bytecodes::_aload_0, bc, rbx, false);
 
     __ bind(done);
-  } else {
-    aload(0);
   }
+
+  // Do actual aload_0 (must do this after patch_bytecode which might call VM and GC might change oop).
+  aload(0);
 }
 
 void TemplateTable::istore() {
diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad
index 52b58ec..6be113d 100644
--- a/hotspot/src/cpu/x86/vm/x86_64.ad
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad
@@ -986,7 +986,7 @@
   emit_opcode(cbuf, 0x58 | RBP_enc);
 
   if (StackReservedPages > 0 && C->has_reserved_stack_access()) {
-    __ reserved_stack_check(); 
+    __ reserved_stack_check();
   }
 
   if (do_polling() && C->is_method_compilation()) {
@@ -7355,7 +7355,7 @@
             "movzbl  $res, $res" %}
   opcode(0x0F, 0xB0);
   ins_encode(lock_prefix,
-             REX_reg_mem(newval, mem_ptr),
+             REX_breg_mem(newval, mem_ptr),
              OpcP, OpcS,
              reg_mem(newval, mem_ptr),
              REX_breg(res), Opcode(0x0F), Opcode(0x94), reg(res), // sete
@@ -7380,7 +7380,7 @@
   opcode(0x0F, 0xB1);
   ins_encode(lock_prefix,
              SizePrefix,
-             REX_reg_mem(newval, mem_ptr),          
+             REX_reg_mem(newval, mem_ptr),
              OpcP, OpcS,
              reg_mem(newval, mem_ptr),
              REX_breg(res), Opcode(0x0F), Opcode(0x94), reg(res), // sete
@@ -7424,7 +7424,7 @@
             "If rax == $mem_ptr then store $newval into $mem_ptr\n\t"  %}
   opcode(0x0F, 0xB0);
   ins_encode(lock_prefix,
-             REX_reg_mem(newval, mem_ptr),
+             REX_breg_mem(newval, mem_ptr),
              OpcP, OpcS,
              reg_mem(newval, mem_ptr) // lock cmpxchg
              );
diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
index 9e91f22..1fcf7d9 100644
--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
@@ -37,7 +37,7 @@
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
diff --git a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java
index 89bc1fc..787060e 100644
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/code/CodeBlob.java
@@ -32,6 +32,7 @@
 import sun.jvm.hotspot.types.Type;
 import sun.jvm.hotspot.types.TypeDataBase;
 import sun.jvm.hotspot.utilities.Assert;
+import sun.jvm.hotspot.utilities.CStringUtilities;
 
 import java.io.PrintStream;
 import java.util.Observable;
@@ -115,7 +116,7 @@
   }
 
   public String getName() {
-    return getName();
+    return CStringUtilities.getString(nameField.getValue(addr));
   }
 
   /** OopMap for frame; can return null if none available */
diff --git a/hotspot/src/os/aix/vm/attachListener_aix.cpp b/hotspot/src/os/aix/vm/attachListener_aix.cpp
index 0622561..a199c71 100644
--- a/hotspot/src/os/aix/vm/attachListener_aix.cpp
+++ b/hotspot/src/os/aix/vm/attachListener_aix.cpp
@@ -494,7 +494,7 @@
   if (ret == 0) {
     ret = ::unlink(fn);
     if (ret == -1) {
-      debug_only(warning("failed to remove stale attach pid file at %s", fn));
+      log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
     }
   }
 }
@@ -537,16 +537,23 @@
   struct stat64 st;
   RESTARTABLE(::stat64(fn, &st), ret);
   if (ret == -1) {
+    log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
     snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
              os::get_temp_directory(), os::current_process_id());
     RESTARTABLE(::stat64(fn, &st), ret);
+    if (ret == -1) {
+      log_debug(attach)("Failed to find attach file: %s", fn);
+    }
   }
   if (ret == 0) {
     // simple check to avoid starting the attach mechanism when
     // a bogus user creates the file
     if (st.st_uid == geteuid()) {
       init();
+      log_trace(attach)("Attach trigerred by %s", fn);
       return true;
+    } else {
+      log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not triggered", fn, st.st_uid, geteuid());
     }
   }
   return false;
diff --git a/hotspot/src/os/aix/vm/os_aix.cpp b/hotspot/src/os/aix/vm/os_aix.cpp
index dffad2b..6c668c1 100644
--- a/hotspot/src/os/aix/vm/os_aix.cpp
+++ b/hotspot/src/os/aix/vm/os_aix.cpp
@@ -52,7 +52,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -3800,10 +3800,6 @@
   return ::stat(pathbuf, sbuf);
 }
 
-bool os::check_heap(bool force) {
-  return true;
-}
-
 // Is a (classpath) directory empty?
 bool os::dir_is_empty(const char* path) {
   DIR *dir = NULL;
diff --git a/hotspot/src/os/bsd/vm/attachListener_bsd.cpp b/hotspot/src/os/bsd/vm/attachListener_bsd.cpp
index 57db067..f924611 100644
--- a/hotspot/src/os/bsd/vm/attachListener_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/attachListener_bsd.cpp
@@ -456,7 +456,7 @@
   if (ret == 0) {
     ret = ::unlink(fn);
     if (ret == -1) {
-      debug_only(warning("failed to remove stale attach pid file at %s", fn));
+      log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
     }
   }
 }
@@ -493,19 +493,25 @@
   if (init_at_startup() || is_initialized()) {
     return false;               // initialized at startup or already initialized
   }
-  char path[PATH_MAX + 1];
+  char fn[PATH_MAX + 1];
   int ret;
   struct stat st;
 
-  snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d",
+  snprintf(fn, PATH_MAX + 1, "%s/.attach_pid%d",
            os::get_temp_directory(), os::current_process_id());
-  RESTARTABLE(::stat(path, &st), ret);
+  RESTARTABLE(::stat(fn, &st), ret);
+  if (ret == -1) {
+    log_debug(attach)("Failed to find attach file: %s", fn);
+  }
   if (ret == 0) {
     // simple check to avoid starting the attach mechanism when
     // a bogus user creates the file
     if (st.st_uid == geteuid()) {
       init();
+      log_trace(attach)("Attach trigerred by %s", fn);
       return true;
+    } else {
+      log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not triggered", fn, st.st_uid, geteuid());
     }
   }
   return false;
diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp
index a40175d..39cfd20 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp
@@ -42,7 +42,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -3780,11 +3780,6 @@
   return diff;
 }
 
-
-bool os::check_heap(bool force) {
-  return true;
-}
-
 // Is a (classpath) directory empty?
 bool os::dir_is_empty(const char* path) {
   DIR *dir = NULL;
diff --git a/hotspot/src/os/linux/vm/attachListener_linux.cpp b/hotspot/src/os/linux/vm/attachListener_linux.cpp
index 4e54d89..652d0de 100644
--- a/hotspot/src/os/linux/vm/attachListener_linux.cpp
+++ b/hotspot/src/os/linux/vm/attachListener_linux.cpp
@@ -453,7 +453,7 @@
   if (ret == 0) {
     ret = ::unlink(fn);
     if (ret == -1) {
-      debug_only(warning("failed to remove stale attach pid file at %s", fn));
+      log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
     }
   }
 }
@@ -496,16 +496,23 @@
   struct stat64 st;
   RESTARTABLE(::stat64(fn, &st), ret);
   if (ret == -1) {
+    log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
     snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
              os::get_temp_directory(), os::current_process_id());
     RESTARTABLE(::stat64(fn, &st), ret);
+    if (ret == -1) {
+      log_debug(attach)("Failed to find attach file: %s", fn);
+    }
   }
   if (ret == 0) {
     // simple check to avoid starting the attach mechanism when
     // a bogus user creates the file
     if (st.st_uid == geteuid()) {
       init();
+      log_trace(attach)("Attach trigerred by %s", fn);
       return true;
+    } else {
+      log_debug(attach)("File %s has wrong user id %d (vs %d). Attach is not trigerred", fn, st.st_uid, geteuid());
     }
   }
   return false;
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 5f4f117..9248eb72 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -42,7 +42,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -5174,10 +5174,6 @@
   return ::stat(pathbuf, sbuf);
 }
 
-bool os::check_heap(bool force) {
-  return true;
-}
-
 // Is a (classpath) directory empty?
 bool os::dir_is_empty(const char* path) {
   DIR *dir = NULL;
diff --git a/hotspot/src/os/solaris/vm/attachListener_solaris.cpp b/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
index b6a4b43..a1c0784 100644
--- a/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
@@ -394,7 +394,7 @@
   snprintf(initial_path, sizeof(initial_path), "%s.tmp", door_path);
   RESTARTABLE(::creat(initial_path, S_IRUSR | S_IWUSR), fd);
   if (fd == -1) {
-    debug_only(warning("attempt to create %s failed", initial_path));
+    log_debug(attach)("attempt to create door file %s failed (%d)", initial_path, errno);
     ::door_revoke(dd);
     return -1;
   }
@@ -409,6 +409,7 @@
       res = ::fattach(dd, initial_path);
     }
     if (res == -1) {
+      log_debug(attach)("unable to create door - fattach failed (%d)", errno);
       ::door_revoke(dd);
       dd = -1;
     }
@@ -419,12 +420,14 @@
     if (::rename(initial_path, door_path) == -1) {
         ::close(dd);
         ::fdetach(initial_path);
+        log_debug(attach)("unable to create door - rename %s to %s failed (%d)", errno);
         dd = -1;
     }
   }
   if (dd >= 0) {
     set_door_descriptor(dd);
     set_door_path(door_path);
+    log_trace(attach)("door file %s created succesfully", door_path);
   } else {
     // unable to create door, attach it to file, or rename file into place
     ::unlink(initial_path);
@@ -602,7 +605,7 @@
   if (ret == 0) {
     ret = ::unlink(fn);
     if (ret == -1) {
-      debug_only(warning("failed to remove stale attach pid file at %s", fn));
+      log_debug(attach)("Failed to remove stale attach pid file at %s", fn);
     }
   }
 }
@@ -645,9 +648,13 @@
   struct stat64 st;
   RESTARTABLE(::stat64(fn, &st), ret);
   if (ret == -1) {
+    log_trace(attach)("Failed to find attach file: %s, trying alternate", fn);
     snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
              os::get_temp_directory(), os::current_process_id());
     RESTARTABLE(::stat64(fn, &st), ret);
+    if (ret == -1) {
+      log_debug(attach)("Failed to find attach file: %s", fn);
+    }
   }
   if (ret == 0) {
     // simple check to avoid starting the attach mechanism when
diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp
index 3b9a379..825a679 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp
@@ -42,7 +42,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -4589,10 +4589,6 @@
   }
 }
 
-// OS interface.
-
-bool os::check_heap(bool force) { return true; }
-
 // Is a (classpath) directory empty?
 bool os::dir_is_empty(const char* path) {
   DIR *dir = NULL;
diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp
index 5dfdab0..24b3918 100644
--- a/hotspot/src/os/windows/vm/os_windows.cpp
+++ b/hotspot/src/os/windows/vm/os_windows.cpp
@@ -45,7 +45,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -5258,75 +5258,6 @@
   }
 }
 
-//--------------------------------------------------------------------------------------------------
-// Non-product code
-
-static int mallocDebugIntervalCounter = 0;
-static int mallocDebugCounter = 0;
-
-// For debugging possible bugs inside HeapWalk (a ring buffer)
-#define SAVE_COUNT 8
-static PROCESS_HEAP_ENTRY saved_heap_entries[SAVE_COUNT];
-static int saved_heap_entry_index;
-
-bool os::check_heap(bool force) {
-  if (++mallocDebugCounter < MallocVerifyStart && !force) return true;
-  if (++mallocDebugIntervalCounter >= MallocVerifyInterval || force) {
-    // Note: HeapValidate executes two hardware breakpoints when it finds something
-    // wrong; at these points, eax contains the address of the offending block (I think).
-    // To get to the exlicit error message(s) below, just continue twice.
-    //
-    // Note:  we want to check the CRT heap, which is not necessarily located in the
-    // process default heap.
-    HANDLE heap = (HANDLE) _get_heap_handle();
-    if (!heap) {
-      return true;
-    }
-
-    // If we fail to lock the heap, then gflags.exe has been used
-    // or some other special heap flag has been set that prevents
-    // locking. We don't try to walk a heap we can't lock.
-    if (HeapLock(heap) != 0) {
-      PROCESS_HEAP_ENTRY phe;
-      phe.lpData = NULL;
-      memset(saved_heap_entries, 0, sizeof(saved_heap_entries));
-      saved_heap_entry_index = 0;
-      int count = 0;
-
-      while (HeapWalk(heap, &phe) != 0) {
-        count ++;
-        if ((phe.wFlags & PROCESS_HEAP_ENTRY_BUSY) &&
-            !HeapValidate(heap, 0, phe.lpData)) {
-          tty->print_cr("C heap has been corrupted (time: %d allocations)", mallocDebugCounter);
-          tty->print_cr("corrupted block near address %#x, length %d, count %d", phe.lpData, phe.cbData, count);
-          HeapUnlock(heap);
-          fatal("corrupted C heap");
-        } else {
-          // Save previous seen entries in a ring buffer. We have seen strange
-          // heap corruption fatal errors that produced mdmp files, but when we load
-          // these mdmp files in WinDBG, "!heap -triage" shows no error.
-          // We can examine the saved_heap_entries[] array in the mdmp file to
-          // diagnose such seemingly spurious errors reported by HeapWalk.
-          saved_heap_entries[saved_heap_entry_index++] = phe;
-          if (saved_heap_entry_index >= SAVE_COUNT) {
-            saved_heap_entry_index = 0;
-          }
-        }
-      }
-      DWORD err = GetLastError();
-      if (err != ERROR_NO_MORE_ITEMS && err != ERROR_CALL_NOT_IMPLEMENTED &&
-         (err == ERROR_INVALID_FUNCTION && phe.lpData != NULL)) {
-        HeapUnlock(heap);
-        fatal("heap walk aborted with error %d", err);
-      }
-      HeapUnlock(heap);
-    }
-    mallocDebugIntervalCounter = 0;
-  }
-  return true;
-}
-
-
 bool os::find(address addr, outputStream* st) {
   int offset = -1;
   bool result = false;
diff --git a/hotspot/src/os/windows/vm/threadCritical_windows.cpp b/hotspot/src/os/windows/vm/threadCritical_windows.cpp
index 3ea83c1..b432f7b 100644
--- a/hotspot/src/os/windows/vm/threadCritical_windows.cpp
+++ b/hotspot/src/os/windows/vm/threadCritical_windows.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadCritical.hpp"
 
diff --git a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp b/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp
similarity index 97%
rename from hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp
rename to hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp
index a7462ad..efa550b 100644
--- a/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.inline.hpp
+++ b/hotspot/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,11 +23,8 @@
  *
  */
 
-#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
-#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
+#ifndef OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
+#define OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
 
 #ifndef _LP64
 #error "Atomic currently only impleneted for PPC64"
@@ -479,4 +476,4 @@
 #undef strasm_nobarrier
 #undef strasm_nobarrier_clobber_memory
 
-#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_INLINE_HPP
+#endif // OS_CPU_AIX_OJDKPPC_VM_ATOMIC_AIX_PPC_HPP
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp b/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp
similarity index 96%
copy from hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
copy to hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp
index 8310003..92b5b93 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,9 @@
  *
  */
 
-#ifndef OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
-#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
+#ifndef OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP
+#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // Implementation of class atomic
@@ -225,4 +224,4 @@
 
 #endif // AMD64
 
-#endif // OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
+#endif // OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_HPP
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp b/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp
index bc28eb2..038d6f9 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_BSD_X86_VM_ORDERACCESS_BSD_X86_INLINE_HPP
 #define OS_CPU_BSD_X86_VM_ORDERACCESS_BSD_X86_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
 
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp
index df36e6e..9747e0a 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.cpp
@@ -45,7 +45,7 @@
 
   // If we have a last_Java_frame, then we should use it even if
   // isInJava == true.  It should be more reliable than ucontext info.
-  if (jt->has_last_Java_frame()) {
+  if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
     *fr_addr = jt->pd_last_frame();
     return true;
   }
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp b/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp
index 1d7921c..b1717c5 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/thread_bsd_x86.hpp
@@ -32,12 +32,8 @@
 
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
+    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
   }
 
  public:
diff --git a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.hpp
similarity index 96%
rename from hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
rename to hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.hpp
index 4490e49..e808340 100644
--- a/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
+++ b/hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,10 +23,9 @@
  *
  */
 
-#ifndef OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
-#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
+#ifndef OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
+#define OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // Implementation of class atomic
@@ -331,4 +330,4 @@
   os::atomic_copy64((volatile jlong*)&store_value, dest);
 }
 
-#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_INLINE_HPP
+#endif // OS_CPU_BSD_ZERO_VM_ATOMIC_BSD_ZERO_HPP
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp b/hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp
similarity index 94%
rename from hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp
rename to hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp
index 95d007f..77dd34a 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.inline.hpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,11 +23,9 @@
  *
  */
 
-#ifndef OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
-#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
+#ifndef OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
+#define OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
 
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
 #include "vm_version_aarch64.hpp"
 
 // Implementation of class atomic
@@ -161,4 +159,4 @@
 
 inline jlong Atomic::load(volatile jlong* src) { return *src; }
 
-#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_INLINE_HPP
+#endif // OS_CPU_LINUX_AARCH64_VM_ATOMIC_LINUX_AARCH64_HPP
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp b/hotspot/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp
index adeaa0a..03c6b31 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/orderAccess_linux_aarch64.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,7 +26,7 @@
 #ifndef OS_CPU_LINUX_AARCH64_VM_ORDERACCESS_LINUX_AARCH64_INLINE_HPP
 #define OS_CPU_LINUX_AARCH64_VM_ORDERACCESS_LINUX_AARCH64_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
 #include "vm_version_aarch64.hpp"
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
index 07206d8..f0f2e05 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.cpp
@@ -47,7 +47,7 @@
 
   // If we have a last_Java_frame, then we should use it even if
   // isInJava == true.  It should be more reliable than ucontext info.
-  if (jt->has_last_Java_frame()) {
+  if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
     *fr_addr = jt->pd_last_frame();
     return true;
   }
diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
index 70e37ce..95127e6 100644
--- a/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
+++ b/hotspot/src/os_cpu/linux_aarch64/vm/thread_linux_aarch64.hpp
@@ -43,12 +43,7 @@
 
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
   }
 
  public:
diff --git a/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp b/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.hpp
similarity index 97%
rename from hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp
rename to hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.hpp
index 6c8498c..0f4a5a8 100644
--- a/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.inline.hpp
+++ b/hotspot/src/os_cpu/linux_ppc/vm/atomic_linux_ppc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,11 +23,8 @@
  *
  */
 
-#ifndef OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
-#define OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
+#ifndef OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
+#define OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
 
 #ifndef PPC64
 #error "Atomic currently only implemented for PPC64"
@@ -479,4 +476,4 @@
 #undef strasm_nobarrier
 #undef strasm_nobarrier_clobber_memory
 
-#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_INLINE_HPP
+#endif // OS_CPU_LINUX_PPC_VM_ATOMIC_LINUX_PPC_HPP
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
index b0df28d..5830beb 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,6 @@
 #ifndef OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
 #define OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
 
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
 // Implementation of class atomic
 
 inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp
similarity index 96%
rename from hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
rename to hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp
index 8310003..7b51da41 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.inline.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,9 @@
  *
  */
 
-#ifndef OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
-#define OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
+#ifndef OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP
+#define OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // Implementation of class atomic
@@ -192,7 +191,7 @@
 }
 
 extern "C" {
-  // defined in bsd_x86.s
+  // defined in linux_x86.s
   jlong _Atomic_cmpxchg_long(jlong, volatile jlong*, jlong, bool);
   void _Atomic_move_long(volatile jlong* src, volatile jlong* dst);
 }
@@ -225,4 +224,4 @@
 
 #endif // AMD64
 
-#endif // OS_CPU_BSD_X86_VM_ATOMIC_BSD_X86_INLINE_HPP
+#endif // OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_HPP
diff --git a/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp
deleted file mode 100644
index faf0a80..0000000
--- a/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
-#define OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "runtime/os.hpp"
-
-// Implementation of class atomic
-
-inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
-inline void Atomic::store    (jshort   store_value, jshort*   dest) { *dest = store_value; }
-inline void Atomic::store    (jint     store_value, jint*     dest) { *dest = store_value; }
-inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; }
-inline void Atomic::store_ptr(void*    store_value, void*     dest) { *(void**)dest = store_value; }
-
-inline void Atomic::store    (jbyte    store_value, volatile jbyte*    dest) { *dest = store_value; }
-inline void Atomic::store    (jshort   store_value, volatile jshort*   dest) { *dest = store_value; }
-inline void Atomic::store    (jint     store_value, volatile jint*     dest) { *dest = store_value; }
-inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; }
-inline void Atomic::store_ptr(void*    store_value, volatile void*     dest) { *(void* volatile *)dest = store_value; }
-
-
-// Adding a lock prefix to an instruction on MP machine
-#define LOCK_IF_MP(mp) "cmp $0, " #mp "; je 1f; lock; 1: "
-
-inline jint     Atomic::add    (jint     add_value, volatile jint*     dest) {
-  jint addend = add_value;
-  int mp = os::is_MP();
-  __asm__ volatile (  LOCK_IF_MP(%3) "xaddl %0,(%2)"
-                    : "=r" (addend)
-                    : "0" (addend), "r" (dest), "r" (mp)
-                    : "cc", "memory");
-  return addend + add_value;
-}
-
-inline void Atomic::inc    (volatile jint*     dest) {
-  int mp = os::is_MP();
-  __asm__ volatile (LOCK_IF_MP(%1) "addl $1,(%0)" :
-                    : "r" (dest), "r" (mp) : "cc", "memory");
-}
-
-inline void Atomic::inc_ptr(volatile void*     dest) {
-  inc_ptr((volatile intptr_t*)dest);
-}
-
-inline void Atomic::dec    (volatile jint*     dest) {
-  int mp = os::is_MP();
-  __asm__ volatile (LOCK_IF_MP(%1) "subl $1,(%0)" :
-                    : "r" (dest), "r" (mp) : "cc", "memory");
-}
-
-inline void Atomic::dec_ptr(volatile void*     dest) {
-  dec_ptr((volatile intptr_t*)dest);
-}
-
-inline jint     Atomic::xchg    (jint     exchange_value, volatile jint*     dest) {
-  __asm__ volatile (  "xchgl (%2),%0"
-                    : "=r" (exchange_value)
-                    : "0" (exchange_value), "r" (dest)
-                    : "memory");
-  return exchange_value;
-}
-
-inline void*    Atomic::xchg_ptr(void*    exchange_value, volatile void*     dest) {
-  return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
-}
-
-#define VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-inline jbyte    Atomic::cmpxchg    (jbyte    exchange_value, volatile jbyte*    dest, jbyte    compare_value, cmpxchg_memory_order order) {
-  int mp = os::is_MP();
-  __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgb %1,(%3)"
-                    : "=a" (exchange_value)
-                    : "q" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp)
-                    : "cc", "memory");
-  return exchange_value;
-}
-
-inline jint     Atomic::cmpxchg    (jint     exchange_value, volatile jint*     dest, jint     compare_value, cmpxchg_memory_order order) {
-  int mp = os::is_MP();
-  __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgl %1,(%3)"
-                    : "=a" (exchange_value)
-                    : "r" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp)
-                    : "cc", "memory");
-  return exchange_value;
-}
-
-#ifdef AMD64
-inline void Atomic::store    (jlong    store_value, jlong*    dest) { *dest = store_value; }
-inline void Atomic::store    (jlong    store_value, volatile jlong*    dest) { *dest = store_value; }
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  intptr_t addend = add_value;
-  bool mp = os::is_MP();
-  __asm__ __volatile__ (LOCK_IF_MP(%3) "xaddq %0,(%2)"
-                        : "=r" (addend)
-                        : "0" (addend), "r" (dest), "r" (mp)
-                        : "cc", "memory");
-  return addend + add_value;
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)add_ptr(add_value, (volatile intptr_t*)dest);
-}
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  bool mp = os::is_MP();
-  __asm__ __volatile__ (LOCK_IF_MP(%1) "addq $1,(%0)"
-                        :
-                        : "r" (dest), "r" (mp)
-                        : "cc", "memory");
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  bool mp = os::is_MP();
-  __asm__ __volatile__ (LOCK_IF_MP(%1) "subq $1,(%0)"
-                        :
-                        : "r" (dest), "r" (mp)
-                        : "cc", "memory");
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  __asm__ __volatile__ ("xchgq (%2),%0"
-                        : "=r" (exchange_value)
-                        : "0" (exchange_value), "r" (dest)
-                        : "memory");
-  return exchange_value;
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-  bool mp = os::is_MP();
-  __asm__ __volatile__ (LOCK_IF_MP(%4) "cmpxchgq %1,(%3)"
-                        : "=a" (exchange_value)
-                        : "r" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp)
-                        : "cc", "memory");
-  return exchange_value;
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
-  return (intptr_t)cmpxchg((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value, order);
-}
-
-inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
-  return (void*)cmpxchg((jlong)exchange_value, (volatile jlong*)dest, (jlong)compare_value, order);
-}
-
-inline jlong Atomic::load(volatile jlong* src) { return *src; }
-
-#else // !AMD64
-
-inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-  return (intptr_t)Atomic::add((jint)add_value, (volatile jint*)dest);
-}
-
-inline void*    Atomic::add_ptr(intptr_t add_value, volatile void*     dest) {
-  return (void*)Atomic::add((jint)add_value, (volatile jint*)dest);
-}
-
-
-inline void Atomic::inc_ptr(volatile intptr_t* dest) {
-  inc((volatile jint*)dest);
-}
-
-inline void Atomic::dec_ptr(volatile intptr_t* dest) {
-  dec((volatile jint*)dest);
-}
-
-inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) {
-  return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-extern "C" {
-  // defined in linux_x86.s
-  jlong _Atomic_cmpxchg_long(jlong, volatile jlong*, jlong, bool);
-  void _Atomic_move_long(volatile jlong* src, volatile jlong* dst);
-}
-
-inline jlong    Atomic::cmpxchg    (jlong    exchange_value, volatile jlong*    dest, jlong    compare_value, cmpxchg_memory_order order) {
-  return _Atomic_cmpxchg_long(exchange_value, dest, compare_value, os::is_MP());
-}
-
-inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, cmpxchg_memory_order order) {
-  return (intptr_t)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value, order);
-}
-
-inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value, cmpxchg_memory_order order) {
-  return (void*)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value, order);
-}
-
-inline jlong Atomic::load(volatile jlong* src) {
-  volatile jlong dest;
-  _Atomic_move_long(src, &dest);
-  return dest;
-}
-
-inline void Atomic::store(jlong store_value, jlong* dest) {
-  _Atomic_move_long((volatile jlong*)&store_value, (volatile jlong*)dest);
-}
-
-inline void Atomic::store(jlong store_value, volatile jlong* dest) {
-  _Atomic_move_long((volatile jlong*)&store_value, dest);
-}
-
-#endif // AMD64
-
-#endif // OS_CPU_LINUX_X86_VM_ATOMIC_LINUX_X86_INLINE_HPP
diff --git a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp
index b4aceaf..0f56421 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_LINUX_X86_VM_ORDERACCESS_LINUX_X86_INLINE_HPP
 #define OS_CPU_LINUX_X86_VM_ORDERACCESS_LINUX_X86_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
 
diff --git a/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp
index 3075dd1..59991b7 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.cpp
@@ -46,7 +46,7 @@
 
   // If we have a last_Java_frame, then we should use it even if
   // isInJava == true.  It should be more reliable than ucontext info.
-  if (jt->has_last_Java_frame()) {
+  if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
     *fr_addr = jt->pd_last_frame();
     return true;
   }
diff --git a/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp b/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp
index 75fb7df..ab8bd4c 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/thread_linux_x86.hpp
@@ -32,12 +32,8 @@
 
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
+    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
   }
 
  public:
diff --git a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.hpp
similarity index 96%
rename from hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
rename to hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.hpp
index 4a9b2c0..7c3235f 100644
--- a/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+++ b/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2011, 2015, Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,10 +23,9 @@
  *
  */
 
-#ifndef OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
-#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
+#ifndef OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
+#define OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // Implementation of class atomic
@@ -325,4 +324,4 @@
   os::atomic_copy64((volatile jlong*)&store_value, dest);
 }
 
-#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP
+#endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_HPP
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.hpp
similarity index 97%
rename from hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp
rename to hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.hpp
index 03c4326..3c292a4 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,9 @@
  *
  */
 
-#ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
-#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
+#ifndef OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
+#define OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // Implementation of class atomic
@@ -374,4 +373,4 @@
 
 #endif // _GNU_SOURCE
 
-#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_INLINE_HPP
+#endif // OS_CPU_SOLARIS_SPARC_VM_ATOMIC_SOLARIS_SPARC_HPP
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp
index 4bf5833..7a74147 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/orderAccess_solaris_sparc.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_SOLARIS_SPARC_VM_ORDERACCESS_SOLARIS_SPARC_INLINE_HPP
 #define OS_CPU_SOLARIS_SPARC_VM_ORDERACCESS_SOLARIS_SPARC_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 
 // Compiler version last used for testing: solaris studio 12u3
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
index be5134d..a4a4e3d 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
@@ -274,8 +274,14 @@
       // stack overflow handling
       return false;
     } else {
-      *fr = os::fetch_frame_from_ucontext(thread, uc);
-      *fr = frame(fr->sender_sp(), fr->sp());
+      // Returned frame will be the caller of the method that faults on the stack bang.
+      // Register window not yet rotated (happens at SAVE after stack bang), so there is no new
+      // frame to go with the faulting PC. Using caller SP that is still in SP, and caller PC
+      // that was written to O7 at call.
+      intptr_t* sp = os::Solaris::ucontext_get_sp(uc);
+      address pc = (address)uc->uc_mcontext.gregs[REG_O7];
+      *fr = frame(sp, frame::unpatchable, pc);
+
       if (!fr->is_java_frame()) {
         assert(fr->safe_for_sender(thread), "Safety check");
         *fr = fr->java_sender();
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.hpp
similarity index 97%
rename from hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
rename to hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.hpp
index e856b75..44f2699 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,9 @@
  *
  */
 
-#ifndef OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
-#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
+#ifndef OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
+#define OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 inline void Atomic::store    (jbyte    store_value, jbyte*    dest) { *dest = store_value; }
@@ -276,4 +275,4 @@
 
 #endif // _GNU_SOURCE
 
-#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_INLINE_HPP
+#endif // OS_CPU_SOLARIS_X86_VM_ATOMIC_SOLARIS_X86_HPP
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp
index af4e2e2..b88e715 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef OS_CPU_SOLARIS_X86_VM_ORDERACCESS_SOLARIS_X86_INLINE_HPP
 #define OS_CPU_SOLARIS_X86_VM_ORDERACCESS_SOLARIS_X86_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
 
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
index 7713550..ef64ff7 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
@@ -38,7 +38,7 @@
 #include "prims/jvm.h"
 #include "prims/jvm_misc.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/extendedPC.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
index 48af49f..4f413ba 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.cpp
@@ -45,9 +45,8 @@
   assert(this->is_Java_thread(), "must be JavaThread");
   JavaThread* jt = (JavaThread *)this;
 
-  // last_Java_frame is always walkable and safe use it if we have it
-
-  if (jt->has_last_Java_frame()) {
+  // There is small window where last_Java_frame is not walkable or safe
+  if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
     *fr_addr = jt->pd_last_frame();
     return true;
   }
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp
index 7589a81..934f80a 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/thread_solaris_x86.hpp
@@ -30,12 +30,8 @@
 
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
+    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
   }
 
  public:
diff --git a/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp b/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.hpp
similarity index 96%
rename from hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp
rename to hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.hpp
index 3d7662e..953e13d 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.inline.hpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/atomic_windows_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,10 +22,9 @@
  *
  */
 
-#ifndef OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
-#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
+#ifndef OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
+#define OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
 
-#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 // The following alternative implementations are needed because
@@ -301,4 +300,4 @@
 
 #pragma warning(default: 4035) // Enables warnings reporting missing return statement
 
-#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_INLINE_HPP
+#endif // OS_CPU_WINDOWS_X86_VM_ATOMIC_WINDOWS_X86_HPP
diff --git a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp
index 8481bd9..36c1c4a 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #define OS_CPU_WINDOWS_X86_VM_ORDERACCESS_WINDOWS_X86_INLINE_HPP
 
 #include <intrin.h>
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "runtime/os.hpp"
 
diff --git a/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp b/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp
index ba5be57..c093c14 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.cpp
@@ -48,7 +48,7 @@
 
   // If we have a last_Java_frame, then we should use it even if
   // isInJava == true.  It should be more reliable than CONTEXT info.
-  if (jt->has_last_Java_frame()) {
+  if (jt->has_last_Java_frame() && jt->frame_anchor()->walkable()) {
     *fr_addr = jt->pd_last_frame();
     return true;
   }
diff --git a/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp
index 65aac35..8d6e5f8 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/thread_windows_x86.hpp
@@ -32,12 +32,8 @@
 
   frame pd_last_frame() {
     assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
-    if (_anchor.last_Java_pc() != NULL) {
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
-    } else {
-      // This will pick up pc from sp
-      return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
-    }
+    vmassert(_anchor.last_Java_pc() != NULL, "not walkable");
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
   }
 
  public:
diff --git a/hotspot/src/share/vm/asm/assembler.cpp b/hotspot/src/share/vm/asm/assembler.cpp
index fe8dbb1..120b68e 100644
--- a/hotspot/src/share/vm/asm/assembler.cpp
+++ b/hotspot/src/share/vm/asm/assembler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #include "asm/codeBuffer.hpp"
 #include "asm/macroAssembler.hpp"
 #include "asm/macroAssembler.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/icache.hpp"
 #include "runtime/os.hpp"
 #include "runtime/thread.hpp"
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
index 7120e76..d78cdc8 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
@@ -4255,7 +4255,7 @@
 #if INCLUDE_TRACE
   EventCompilerInlining event;
   if (event.should_commit()) {
-    event.set_compileID(compilation()->env()->task()->compile_id());
+    event.set_compileId(compilation()->env()->task()->compile_id());
     event.set_message(msg);
     event.set_succeeded(success);
     event.set_bci(bci());
diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
index 3ee774e..bbb5ef8 100644
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
@@ -49,7 +49,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/interfaceSupport.hpp"
diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp
index 323b75a..024909b 100644
--- a/hotspot/src/share/vm/ci/ciEnv.cpp
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -1149,10 +1149,10 @@
 
 void ciEnv::report_failure(const char* reason) {
   // Create and fire JFR event
-  EventCompilerFailure event;
+  EventCompilationFailure event;
   if (event.should_commit()) {
-    event.set_compileID(compile_id());
-    event.set_failure(reason);
+    event.set_compileId(compile_id());
+    event.set_failureMessage(reason);
     event.commit();
   }
 }
diff --git a/hotspot/src/share/vm/ci/ciMethod.cpp b/hotspot/src/share/vm/ci/ciMethod.cpp
index a54c0a7..4860427 100644
--- a/hotspot/src/share/vm/ci/ciMethod.cpp
+++ b/hotspot/src/share/vm/ci/ciMethod.cpp
@@ -1410,11 +1410,11 @@
 }
 
 #if INCLUDE_TRACE
-TraceStructCiMethod ciMethod::to_trace_struct() const {
-  TraceStructCiMethod result;
-  result.set_class(holder()->name()->as_utf8());
+TraceStructCalleeMethod ciMethod::to_trace_struct() const {
+  TraceStructCalleeMethod result;
+  result.set_type(holder()->name()->as_utf8());
   result.set_name(name()->as_utf8());
-  result.set_signature(signature()->as_symbol()->as_utf8());
+  result.set_descriptor(signature()->as_symbol()->as_utf8());
   return result;
 }
 #endif
diff --git a/hotspot/src/share/vm/ci/ciMethod.hpp b/hotspot/src/share/vm/ci/ciMethod.hpp
index 7a56f1c..94e6ac5 100644
--- a/hotspot/src/share/vm/ci/ciMethod.hpp
+++ b/hotspot/src/share/vm/ci/ciMethod.hpp
@@ -342,7 +342,7 @@
   void print_short_name(outputStream* st = tty);
 
 #if INCLUDE_TRACE
-  TraceStructCiMethod to_trace_struct() const;
+  TraceStructCalleeMethod to_trace_struct() const;
 #endif
 };
 
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index 0028f1a..3026269 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -5844,6 +5844,7 @@
                                                     _super_klass,
                                                     _methods,
                                                     _access_flags,
+                                                    _major_version,
                                                     _loader_data->class_loader(),
                                                     _class_name,
                                                     _local_interfaces,
diff --git a/hotspot/src/share/vm/classfile/classLoaderData.cpp b/hotspot/src/share/vm/classfile/classLoaderData.cpp
index 09ddbf4..ba11916 100644
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp
@@ -63,7 +63,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/javaCalls.hpp"
 #include "runtime/jniHandles.hpp"
 #include "runtime/mutex.hpp"
diff --git a/hotspot/src/share/vm/classfile/klassFactory.cpp b/hotspot/src/share/vm/classfile/klassFactory.cpp
index 6eb6ccc..4d08ea3 100644
--- a/hotspot/src/share/vm/classfile/klassFactory.cpp
+++ b/hotspot/src/share/vm/classfile/klassFactory.cpp
@@ -31,12 +31,12 @@
 #include "prims/jvmtiEnvBase.hpp"
 #include "trace/traceMacros.hpp"
 
-static ClassFileStream* prologue(ClassFileStream* stream,
-                                 Symbol* name,
-                                 ClassLoaderData* loader_data,
-                                 Handle protection_domain,
-                                 JvmtiCachedClassFileData** cached_class_file,
-                                 TRAPS) {
+static ClassFileStream* check_class_file_load_hook(ClassFileStream* stream,
+                                                   Symbol* name,
+                                                   ClassLoaderData* loader_data,
+                                                   Handle protection_domain,
+                                                   JvmtiCachedClassFileData** cached_class_file,
+                                                   TRAPS) {
 
   assert(stream != NULL, "invariant");
 
@@ -102,8 +102,6 @@
   assert(loader_data != NULL, "invariant");
   assert(THREAD->is_Java_thread(), "must be a JavaThread");
 
-  bool changed_by_loadhook = false;
-
   ResourceMark rm;
   HandleMark hm;
 
@@ -111,12 +109,15 @@
 
   ClassFileStream* old_stream = stream;
 
-  stream = prologue(stream,
-                    name,
-                    loader_data,
-                    protection_domain,
-                    &cached_class_file,
-                    CHECK_NULL);
+  // Skip this processing for VM anonymous classes
+  if (host_klass == NULL) {
+    stream = check_class_file_load_hook(stream,
+                                        name,
+                                        loader_data,
+                                        protection_domain,
+                                        &cached_class_file,
+                                        CHECK_NULL);
+  }
 
   ClassFileParser parser(stream,
                          name,
diff --git a/hotspot/src/share/vm/classfile/stringTable.cpp b/hotspot/src/share/vm/classfile/stringTable.cpp
index abf662c..7d3fe16 100644
--- a/hotspot/src/share/vm/classfile/stringTable.cpp
+++ b/hotspot/src/share/vm/classfile/stringTable.cpp
@@ -34,7 +34,7 @@
 #include "memory/filemap.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/hashtable.inline.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp
index f4997a7..8f51f52 100644
--- a/hotspot/src/share/vm/classfile/symbolTable.cpp
+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp
@@ -34,7 +34,7 @@
 #include "memory/filemap.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/hashtable.inline.hpp"
 
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index 033980e..70f9e6a 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -1641,7 +1641,6 @@
       JvmtiExport::post_class_load((JavaThread *) THREAD, k());
 
   }
-  TRACE_KLASS_DEFINITION(k, THREAD);
   class_define_event(k);
 }
 
diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp
index d09518c..db757f7 100644
--- a/hotspot/src/share/vm/code/nmethod.cpp
+++ b/hotspot/src/share/vm/code/nmethod.cpp
@@ -41,7 +41,7 @@
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiImpl.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp
index f9768b5..b3bc80c 100644
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp
@@ -42,7 +42,7 @@
 #include "prims/nativeLookup.hpp"
 #include "prims/whitebox.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -1755,7 +1755,7 @@
   assert(task->compile_id() != CICrashAt, "just as planned");
   if (event.should_commit()) {
     event.set_method(task->method());
-    event.set_compileID(task->compile_id());
+    event.set_compileId(task->compile_id());
     event.set_compileLevel(task->comp_level());
     event.set_succeded(task->is_success());
     event.set_isOsr(task->osr_bci() != CompileBroker::standard_entry_bci);
@@ -2399,4 +2399,3 @@
     }
   }
 }
-
diff --git a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
index cbbbfbd..6d78865 100644
--- a/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
+++ b/hotspot/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
@@ -61,7 +61,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/globals_extension.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
diff --git a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
index da6b6d6..e8f606e 100644
--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp
@@ -50,7 +50,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp b/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp
index cc9dbf4..1e757b8 100644
--- a/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp
+++ b/hotspot/src/share/vm/gc/g1/collectionSetChooser.cpp
@@ -26,7 +26,7 @@
 #include "gc/g1/collectionSetChooser.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/shared/space.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 // Even though we don't use the GC efficiency in our heuristics as
 // much as we used to, we still order according to GC efficiency. This
diff --git a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp
index b16ccc6..dcd88be 100644
--- a/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp
+++ b/hotspot/src/share/vm/gc/g1/dirtyCardQueue.cpp
@@ -27,7 +27,7 @@
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
 #include "gc/shared/workgroup.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp b/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp
index 100b894..fc6fe46 100644
--- a/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1CardLiveData.cpp
@@ -30,7 +30,7 @@
 #include "gc/shared/workgroup.hpp"
 #include "logging/log.hpp"
 #include "memory/universe.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/os.hpp"
 #include "utilities/bitMap.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
index d84e100..e1462e9 100644
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
@@ -74,7 +74,7 @@
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/init.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/vmThread.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
index 454c598..27f4071 100644
--- a/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1ConcurrentMark.cpp
@@ -52,7 +52,7 @@
 #include "memory/allocation.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/java.hpp"
 #include "runtime/prefetch.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1EvacStats.inline.hpp b/hotspot/src/share/vm/gc/g1/g1EvacStats.inline.hpp
index 337d462..007f62d 100644
--- a/hotspot/src/share/vm/gc/g1/g1EvacStats.inline.hpp
+++ b/hotspot/src/share/vm/gc/g1/g1EvacStats.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #define SHARE_VM_GC_G1_G1EVACSTATS_INLINE_HPP
 
 #include "gc/g1/g1EvacStats.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 inline void G1EvacStats::add_direct_allocated(size_t value) {
   Atomic::add_ptr(value, &_direct_allocated);
diff --git a/hotspot/src/share/vm/gc/g1/g1HotCardCache.cpp b/hotspot/src/share/vm/gc/g1/g1HotCardCache.cpp
index aae9c94..c18fb36 100644
--- a/hotspot/src/share/vm/gc/g1/g1HotCardCache.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1HotCardCache.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #include "gc/g1/dirtyCardQueue.hpp"
 #include "gc/g1/g1CollectedHeap.inline.hpp"
 #include "gc/g1/g1HotCardCache.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h):
   _g1h(g1h), _hot_cache(NULL), _use_cache(false), _card_counts(g1h) {}
diff --git a/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp b/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp
index 3d8866d..4eed096 100644
--- a/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1MarkSweep.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@
 #include "oops/instanceRefKlass.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/synchronizer.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp b/hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp
index c701b70..006a658 100644
--- a/hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1SATBCardTableModRefBS.cpp
@@ -30,7 +30,7 @@
 #include "gc/shared/memset_with_concurrent_readers.hpp"
 #include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/thread.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp b/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp
index 8b8ce06..e9f91bd 100644
--- a/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedup.cpp
@@ -31,7 +31,7 @@
 #include "gc/g1/g1StringDedupStat.hpp"
 #include "gc/g1/g1StringDedupTable.hpp"
 #include "gc/g1/g1StringDedupThread.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 bool G1StringDedup::_enabled = false;
 
diff --git a/hotspot/src/share/vm/gc/g1/g1StringDedup.hpp b/hotspot/src/share/vm/gc/g1/g1StringDedup.hpp
index 9191613..6ed8f22 100644
--- a/hotspot/src/share/vm/gc/g1/g1StringDedup.hpp
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedup.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -84,7 +84,6 @@
 
 #include "memory/allocation.hpp"
 #include "oops/oop.hpp"
-#include "runtime/atomic.hpp"
 
 class OopClosure;
 class BoolObjectClosure;
diff --git a/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp b/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp
index 3bca86a..b029c3f 100644
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupQueue.cpp
@@ -30,7 +30,7 @@
 #include "gc/shared/gcLocker.hpp"
 #include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/stack.inline.hpp"
 
diff --git a/hotspot/src/share/vm/gc/g1/g1StringDedupThread.cpp b/hotspot/src/share/vm/gc/g1/g1StringDedupThread.cpp
index 0bdfc19..f0b25d3 100644
--- a/hotspot/src/share/vm/gc/g1/g1StringDedupThread.cpp
+++ b/hotspot/src/share/vm/gc/g1/g1StringDedupThread.cpp
@@ -31,7 +31,7 @@
 #include "gc/g1/suspendibleThreadSet.hpp"
 #include "logging/log.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 G1StringDedupThread* G1StringDedupThread::_thread = NULL;
 
diff --git a/hotspot/src/share/vm/gc/g1/heapRegion.cpp b/hotspot/src/share/vm/gc/g1/heapRegion.cpp
index 13143a3..33d8268 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegion.cpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.cpp
@@ -39,7 +39,7 @@
 #include "memory/iterator.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 
 int    HeapRegion::LogOfHRGrainBytes = 0;
diff --git a/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp b/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp
index 248e0be..01c5328 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.inline.hpp
@@ -30,7 +30,7 @@
 #include "gc/g1/heapRegion.hpp"
 #include "gc/shared/space.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 inline HeapWord* G1ContiguousSpace::allocate_impl(size_t min_word_size,
                                                   size_t desired_word_size,
diff --git a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
index ad4821a..9aa4da6 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionRemSet.cpp
@@ -33,7 +33,7 @@
 #include "memory/allocation.hpp"
 #include "memory/padded.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/growableArray.hpp"
diff --git a/hotspot/src/share/vm/gc/g1/heapRegionTracer.cpp b/hotspot/src/share/vm/gc/g1/heapRegionTracer.cpp
index ec3febd..35baa9d 100644
--- a/hotspot/src/share/vm/gc/g1/heapRegionTracer.cpp
+++ b/hotspot/src/share/vm/gc/g1/heapRegionTracer.cpp
@@ -39,7 +39,7 @@
     e.set_to(to);
     e.set_start(start);
     e.set_used(used);
-    e.set_allocContext(allocationContext);
+    e.set_allocationContext(allocationContext);
     e.commit();
   }
 }
diff --git a/hotspot/src/share/vm/gc/g1/sparsePRT.cpp b/hotspot/src/share/vm/gc/g1/sparsePRT.cpp
index cab39b3..44e4346 100644
--- a/hotspot/src/share/vm/gc/g1/sparsePRT.cpp
+++ b/hotspot/src/share/vm/gc/g1/sparsePRT.cpp
@@ -30,7 +30,7 @@
 #include "gc/shared/cardTableModRefBS.hpp"
 #include "gc/shared/space.inline.hpp"
 #include "memory/allocation.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/mutexLocker.hpp"
 
 // Check that the size of the SparsePRTEntry is evenly divisible by the maximum
diff --git a/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp b/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
index 42e6711..48eb3c4 100644
--- a/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
+++ b/hotspot/src/share/vm/gc/parallel/gcTaskThread.cpp
@@ -30,7 +30,7 @@
 #include "memory/allocation.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/os.hpp"
diff --git a/hotspot/src/share/vm/gc/parallel/mutableNUMASpace.cpp b/hotspot/src/share/vm/gc/parallel/mutableNUMASpace.cpp
index e53d195..c4cb76d 100644
--- a/hotspot/src/share/vm/gc/parallel/mutableNUMASpace.cpp
+++ b/hotspot/src/share/vm/gc/parallel/mutableNUMASpace.cpp
@@ -1,6 +1,5 @@
-
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +27,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "gc/shared/spaceDecorator.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/thread.inline.hpp"
 
 MutableNUMASpace::MutableNUMASpace(size_t alignment) : MutableSpace(alignment) {
diff --git a/hotspot/src/share/vm/gc/parallel/mutableSpace.cpp b/hotspot/src/share/vm/gc/parallel/mutableSpace.cpp
index 4db2147..61dc795 100644
--- a/hotspot/src/share/vm/gc/parallel/mutableSpace.cpp
+++ b/hotspot/src/share/vm/gc/parallel/mutableSpace.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #include "gc/parallel/mutableSpace.hpp"
 #include "gc/shared/spaceDecorator.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/gc/parallel/parMarkBitMap.cpp b/hotspot/src/share/vm/gc/parallel/parMarkBitMap.cpp
index 39b63ac..df29bbd 100644
--- a/hotspot/src/share/vm/gc/parallel/parMarkBitMap.cpp
+++ b/hotspot/src/share/vm/gc/parallel/parMarkBitMap.cpp
@@ -27,7 +27,7 @@
 #include "gc/parallel/psCompactionManager.inline.hpp"
 #include "gc/parallel/psParallelCompact.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/bitMap.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/parallel/psCompactionManager.cpp b/hotspot/src/share/vm/gc/parallel/psCompactionManager.cpp
index 2884b4c..fc3e908 100644
--- a/hotspot/src/share/vm/gc/parallel/psCompactionManager.cpp
+++ b/hotspot/src/share/vm/gc/parallel/psCompactionManager.cpp
@@ -38,7 +38,7 @@
 #include "oops/instanceMirrorKlass.inline.hpp"
 #include "oops/objArrayKlass.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 PSOldGen*            ParCompactionManager::_old_gen = NULL;
 ParCompactionManager**  ParCompactionManager::_manager_array = NULL;
diff --git a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
index d16e510..ccd4648 100644
--- a/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
+++ b/hotspot/src/share/vm/gc/parallel/psParallelCompact.cpp
@@ -57,7 +57,7 @@
 #include "oops/methodData.hpp"
 #include "oops/objArrayKlass.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/vmThread.hpp"
diff --git a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp
index a10a9f1..147bc06 100644
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp
+++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp
@@ -46,7 +46,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/instanceRefKlass.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/java.hpp"
 #include "runtime/prefetch.inline.hpp"
 #include "runtime/thread.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/shared/allocTracer.cpp b/hotspot/src/share/vm/gc/shared/allocTracer.cpp
index af427a8..5f79a33 100644
--- a/hotspot/src/share/vm/gc/shared/allocTracer.cpp
+++ b/hotspot/src/share/vm/gc/shared/allocTracer.cpp
@@ -29,18 +29,18 @@
 #include "utilities/globalDefinitions.hpp"
 
 void AllocTracer::send_allocation_outside_tlab_event(KlassHandle klass, size_t alloc_size) {
-  EventAllocObjectOutsideTLAB event;
+  EventObjectAllocationOutsideTLAB event;
   if (event.should_commit()) {
-    event.set_class(klass());
+    event.set_objectClass(klass());
     event.set_allocationSize(alloc_size);
     event.commit();
   }
 }
 
 void AllocTracer::send_allocation_in_new_tlab_event(KlassHandle klass, size_t tlab_size, size_t alloc_size) {
-  EventAllocObjectInNewTLAB event;
+  EventObjectAllocationInNewTLAB event;
   if (event.should_commit()) {
-    event.set_class(klass());
+    event.set_objectClass(klass());
     event.set_allocationSize(alloc_size);
     event.set_tlabSize(tlab_size);
     event.commit();
diff --git a/hotspot/src/share/vm/gc/shared/cardTableRS.cpp b/hotspot/src/share/vm/gc/shared/cardTableRS.cpp
index 5e28170..eabc515 100644
--- a/hotspot/src/share/vm/gc/shared/cardTableRS.cpp
+++ b/hotspot/src/share/vm/gc/shared/cardTableRS.cpp
@@ -29,7 +29,7 @@
 #include "gc/shared/space.inline.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/gc/shared/gcLocker.cpp b/hotspot/src/share/vm/gc/shared/gcLocker.cpp
index cc84726..4b72cd8 100644
--- a/hotspot/src/share/vm/gc/shared/gcLocker.cpp
+++ b/hotspot/src/share/vm/gc/shared/gcLocker.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 #include "gc/shared/gcLocker.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "logging/log.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/thread.inline.hpp"
 
 volatile jint GCLocker::_jni_lock_count = 0;
diff --git a/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp b/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp
index e51e8fe..046db77 100644
--- a/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp
+++ b/hotspot/src/share/vm/gc/shared/gcTraceSend.cpp
@@ -43,7 +43,7 @@
 typedef uintptr_t TraceAddress;
 
 void GCTracer::send_garbage_collection_event() const {
-  EventGCGarbageCollection event(UNTIMED);
+  EventGarbageCollection event(UNTIMED);
   if (event.should_commit()) {
     event.set_gcId(GCId::current());
     event.set_name(_shared_gc_info.name());
@@ -91,7 +91,7 @@
 }
 
 void ParallelOldTracer::send_parallel_old_event() const {
-  EventGCParallelOld e(UNTIMED);
+  EventParallelOldGarbageCollection e(UNTIMED);
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_densePrefix((TraceAddress)_parallel_old_gc_info.dense_prefix());
@@ -102,7 +102,7 @@
 }
 
 void YoungGCTracer::send_young_gc_event() const {
-  EventGCYoungGarbageCollection e(UNTIMED);
+  EventYoungGarbageCollection e(UNTIMED);
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_tenuringThreshold(_tenuring_threshold);
@@ -127,7 +127,7 @@
   EventPromoteObjectInNewPLAB event;
   if (event.should_commit()) {
     event.set_gcId(GCId::current());
-    event.set_class(klass);
+    event.set_objectClass(klass);
     event.set_objectSize(obj_size);
     event.set_tenured(tenured);
     event.set_tenuringAge(age);
@@ -142,7 +142,7 @@
   EventPromoteObjectOutsidePLAB event;
   if (event.should_commit()) {
     event.set_gcId(GCId::current());
-    event.set_class(klass);
+    event.set_objectClass(klass);
     event.set_objectSize(obj_size);
     event.set_tenured(tenured);
     event.set_tenuringAge(age);
@@ -151,7 +151,7 @@
 }
 
 void OldGCTracer::send_old_gc_event() const {
-  EventGCOldGarbageCollection e(UNTIMED);
+  EventOldGarbageCollection e(UNTIMED);
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_starttime(_shared_gc_info.start_timestamp());
@@ -173,7 +173,7 @@
   EventPromotionFailed e;
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
-    e.set_data(to_trace_struct(pf_info));
+    e.set_promotionFailed(to_trace_struct(pf_info));
     e.set_thread(pf_info.thread_trace_id());
     e.commit();
   }
@@ -190,7 +190,7 @@
 
 #if INCLUDE_ALL_GCS
 void G1NewTracer::send_g1_young_gc_event() {
-  EventGCG1GarbageCollection e(UNTIMED);
+  EventG1GarbageCollection e(UNTIMED);
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_type(_g1_young_gc_info.type());
@@ -201,7 +201,7 @@
 }
 
 void G1MMUTracer::send_g1_mmu_event(double timeSlice, double gcTime, double maxTime) {
-  EventGCG1MMU e;
+  EventG1MMU e;
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_timeSlice(timeSlice);
@@ -212,15 +212,15 @@
 }
 
 void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
-  EventEvacuationInfo e;
+  EventEvacuationInformation e;
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
     e.set_cSetRegions(info->collectionset_regions());
     e.set_cSetUsedBefore(info->collectionset_used_before());
     e.set_cSetUsedAfter(info->collectionset_used_after());
     e.set_allocationRegions(info->allocation_regions());
-    e.set_allocRegionsUsedBefore(info->alloc_regions_used_before());
-    e.set_allocRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_copied());
+    e.set_allocationRegionsUsedBefore(info->alloc_regions_used_before());
+    e.set_allocationRegionsUsedAfter(info->alloc_regions_used_before() + info->bytes_copied());
     e.set_bytesCopied(info->bytes_copied());
     e.set_regionsFreed(info->regions_freed());
     e.commit();
@@ -231,13 +231,14 @@
   EventEvacuationFailed e;
   if (e.should_commit()) {
     e.set_gcId(GCId::current());
-    e.set_data(to_trace_struct(ef_info));
+    e.set_evacuationFailed(to_trace_struct(ef_info));
     e.commit();
   }
 }
 
-static TraceStructG1EvacStats create_g1_evacstats(unsigned gcid, const G1EvacSummary& summary) {
-  TraceStructG1EvacStats s;
+static TraceStructG1EvacuationStatistics
+create_g1_evacstats(unsigned gcid, const G1EvacSummary& summary) {
+  TraceStructG1EvacuationStatistics s;
   s.set_gcId(gcid);
   s.set_allocated(summary.allocated() * HeapWordSize);
   s.set_wasted(summary.wasted() * HeapWordSize);
@@ -252,17 +253,17 @@
 }
 
 void G1NewTracer::send_young_evacuation_statistics(const G1EvacSummary& summary) const {
-  EventGCG1EvacuationYoungStatistics surv_evt;
+  EventG1EvacuationYoungStatistics surv_evt;
   if (surv_evt.should_commit()) {
-    surv_evt.set_stats(create_g1_evacstats(GCId::current(), summary));
+    surv_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
     surv_evt.commit();
   }
 }
 
 void G1NewTracer::send_old_evacuation_statistics(const G1EvacSummary& summary) const {
-  EventGCG1EvacuationOldStatistics old_evt;
+  EventG1EvacuationOldStatistics old_evt;
   if (old_evt.should_commit()) {
-    old_evt.set_stats(create_g1_evacstats(GCId::current(), summary));
+    old_evt.set_statistics(create_g1_evacstats(GCId::current(), summary));
     old_evt.commit();
   }
 }
@@ -273,7 +274,7 @@
                                              size_t last_allocation_size,
                                              double last_allocation_duration,
                                              double last_marking_length) {
-  EventGCG1BasicIHOP evt;
+  EventG1BasicIHOP evt;
   if (evt.should_commit()) {
     evt.set_gcId(GCId::current());
     evt.set_threshold(threshold);
@@ -295,7 +296,7 @@
                                                 double predicted_allocation_rate,
                                                 double predicted_marking_length,
                                                 bool prediction_active) {
-  EventGCG1AdaptiveIHOP evt;
+  EventG1AdaptiveIHOP evt;
   if (evt.should_commit()) {
     evt.set_gcId(GCId::current());
     evt.set_threshold(threshold);
diff --git a/hotspot/src/share/vm/gc/shared/objectCountEventSender.cpp b/hotspot/src/share/vm/gc/shared/objectCountEventSender.cpp
index 4146a80..d9ca929 100644
--- a/hotspot/src/share/vm/gc/shared/objectCountEventSender.cpp
+++ b/hotspot/src/share/vm/gc/shared/objectCountEventSender.cpp
@@ -40,7 +40,7 @@
 
   EventObjectCountAfterGC event(UNTIMED);
   event.set_gcId(GCId::current());
-  event.set_class(entry->klass());
+  event.set_objectClass(entry->klass());
   event.set_count(entry->count());
   event.set_totalSize(entry->words() * BytesPerWord);
   event.set_endtime(timestamp);
diff --git a/hotspot/src/share/vm/gc/shared/plab.inline.hpp b/hotspot/src/share/vm/gc/shared/plab.inline.hpp
index 33a9f58..6963a7f 100644
--- a/hotspot/src/share/vm/gc/shared/plab.inline.hpp
+++ b/hotspot/src/share/vm/gc/shared/plab.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "gc/shared/plab.hpp"
 #include "memory/allocation.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 inline HeapWord* PLAB::allocate_aligned(size_t word_sz, unsigned short alignment_in_bytes) {
   HeapWord* res = CollectedHeap::align_allocation_or_fail(_top, _end, alignment_in_bytes);
diff --git a/hotspot/src/share/vm/gc/shared/space.cpp b/hotspot/src/share/vm/gc/shared/space.cpp
index c207dcd..db21862 100644
--- a/hotspot/src/share/vm/gc/shared/space.cpp
+++ b/hotspot/src/share/vm/gc/shared/space.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
 #include "gc/shared/spaceDecorator.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/java.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/prefetch.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/shared/taskqueue.cpp b/hotspot/src/share/vm/gc/shared/taskqueue.cpp
index 57b65fb..2fc94c6 100644
--- a/hotspot/src/share/vm/gc/shared/taskqueue.cpp
+++ b/hotspot/src/share/vm/gc/shared/taskqueue.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #include "gc/shared/taskqueue.hpp"
 #include "oops/oop.inline.hpp"
 #include "logging/log.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "runtime/thread.inline.hpp"
 #include "utilities/debug.hpp"
diff --git a/hotspot/src/share/vm/gc/shared/taskqueue.inline.hpp b/hotspot/src/share/vm/gc/shared/taskqueue.inline.hpp
index baa3505..8852557 100644
--- a/hotspot/src/share/vm/gc/shared/taskqueue.inline.hpp
+++ b/hotspot/src/share/vm/gc/shared/taskqueue.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 #include "gc/shared/taskqueue.hpp"
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/stack.inline.hpp"
diff --git a/hotspot/src/share/vm/gc/shared/workgroup.cpp b/hotspot/src/share/vm/gc/shared/workgroup.cpp
index 84016fe..6df874b 100644
--- a/hotspot/src/share/vm/gc/shared/workgroup.cpp
+++ b/hotspot/src/share/vm/gc/shared/workgroup.cpp
@@ -28,7 +28,7 @@
 #include "gc/shared/workerManager.hpp"
 #include "memory/allocation.hpp"
 #include "memory/allocation.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "runtime/semaphore.hpp"
 #include "runtime/thread.inline.hpp"
diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
index 179940d..655b58a 100644
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
@@ -39,7 +39,7 @@
 #include "oops/oop.inline.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
index 0770b39..18ac239 100644
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
@@ -48,7 +48,7 @@
 #include "oops/symbol.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/nativeLookup.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
diff --git a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
index 994220f..9c5d983 100644
--- a/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
+++ b/hotspot/src/share/vm/jvmci/jvmciEnv.cpp
@@ -342,7 +342,7 @@
   Symbol* sig_sym  = cpool->signature_ref_at(index);
 
   if (cpool->has_preresolution()
-      || (holder() == SystemDictionary::MethodHandle_klass() &&
+      || ((holder() == SystemDictionary::MethodHandle_klass() || holder() == SystemDictionary::VarHandle_klass()) &&
           MethodHandles::is_signature_polymorphic_name(holder(), name_sym))) {
     // Short-circuit lookups for JSR 292-related call sites.
     // That is, do not rely only on name-based lookups, because they may fail
diff --git a/hotspot/src/share/vm/logging/logDecorations.hpp b/hotspot/src/share/vm/logging/logDecorations.hpp
index 3988bac..38dcb40 100644
--- a/hotspot/src/share/vm/logging/logDecorations.hpp
+++ b/hotspot/src/share/vm/logging/logDecorations.hpp
@@ -53,10 +53,6 @@
 
   LogDecorations(LogLevelType level, const LogTagSet& tagset, const LogDecorators& decorators);
 
-  LogLevelType level() const {
-    return _level;
-  }
-
   void set_level(LogLevelType level) {
     _level = level;
   }
diff --git a/hotspot/src/share/vm/logging/logOutputList.cpp b/hotspot/src/share/vm/logging/logOutputList.cpp
index e2f8a6f..bc0565ae 100644
--- a/hotspot/src/share/vm/logging/logOutputList.cpp
+++ b/hotspot/src/share/vm/logging/logOutputList.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #include "logging/logLevel.hpp"
 #include "logging/logOutputList.hpp"
 #include "memory/allocation.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "utilities/globalDefinitions.hpp"
 
diff --git a/hotspot/src/share/vm/logging/logOutputList.hpp b/hotspot/src/share/vm/logging/logOutputList.hpp
index e983cb0..851f419 100644
--- a/hotspot/src/share/vm/logging/logOutputList.hpp
+++ b/hotspot/src/share/vm/logging/logOutputList.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 
 #include "logging/logLevel.hpp"
 #include "memory/allocation.hpp"
-#include "runtime/atomic.hpp"
 #include "utilities/globalDefinitions.hpp"
 
 class LogOutput;
@@ -61,6 +60,11 @@
   void add_output(LogOutput* output, LogLevelType level);
   void update_output_level(LogOutputNode* node, LogLevelType level);
 
+  // Bookkeeping functions to keep track of number of active readers/iterators for the list.
+  jint increase_readers();
+  jint decrease_readers();
+  void wait_until_no_readers() const;
+
  public:
   LogOutputList() : _active_readers(0) {
     for (size_t i = 0; i < LogLevel::Count; i++) {
@@ -84,11 +88,6 @@
   // Set (add/update/remove) the output to the specified level.
   void set_output_level(LogOutput* output, LogLevelType level);
 
-  // Bookkeeping functions to keep track of number of active readers/iterators for the list.
-  jint increase_readers();
-  jint decrease_readers();
-  void wait_until_no_readers() const;
-
   class Iterator VALUE_OBJ_CLASS_SPEC {
     friend class LogOutputList;
    private:
diff --git a/hotspot/src/share/vm/logging/logTag.hpp b/hotspot/src/share/vm/logging/logTag.hpp
index f5dc582..9cbb568 100644
--- a/hotspot/src/share/vm/logging/logTag.hpp
+++ b/hotspot/src/share/vm/logging/logTag.hpp
@@ -35,8 +35,9 @@
   LOG_TAG(add) \
   LOG_TAG(age) \
   LOG_TAG(alloc) \
-  LOG_TAG(arguments) \
   LOG_TAG(annotation) \
+  LOG_TAG(arguments) \
+  LOG_TAG(attach) \
   LOG_TAG(barrier) \
   LOG_TAG(biasedlocking) \
   LOG_TAG(bot) \
diff --git a/hotspot/src/share/vm/memory/allocation.cpp b/hotspot/src/share/vm/memory/allocation.cpp
index f7dea3d..2e32964 100644
--- a/hotspot/src/share/vm/memory/allocation.cpp
+++ b/hotspot/src/share/vm/memory/allocation.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 #include "memory/metaspaceShared.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "runtime/task.hpp"
 #include "runtime/threadCritical.hpp"
diff --git a/hotspot/src/share/vm/memory/allocation.inline.hpp b/hotspot/src/share/vm/memory/allocation.inline.hpp
index 5fe55f4..db09c0c 100644
--- a/hotspot/src/share/vm/memory/allocation.inline.hpp
+++ b/hotspot/src/share/vm/memory/allocation.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 #ifndef SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP
 #define SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/globalDefinitions.hpp"
diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp
index ac7d0f8..1801a7c 100644
--- a/hotspot/src/share/vm/memory/metaspace.cpp
+++ b/hotspot/src/share/vm/memory/metaspace.cpp
@@ -37,7 +37,7 @@
 #include "memory/metaspaceTracer.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/init.hpp"
 #include "runtime/java.hpp"
diff --git a/hotspot/src/share/vm/memory/universe.cpp b/hotspot/src/share/vm/memory/universe.cpp
index a3dff52..1e434d1 100644
--- a/hotspot/src/share/vm/memory/universe.cpp
+++ b/hotspot/src/share/vm/memory/universe.cpp
@@ -56,7 +56,7 @@
 #include "oops/oop.inline.hpp"
 #include "oops/typeArrayKlass.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/commandLineFlagConstraintList.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/fprofiler.hpp"
@@ -1129,8 +1129,6 @@
       verify_flags |= Verify_MetaspaceAux;
     } else if (strcmp(token, "jni_handles") == 0) {
       verify_flags |= Verify_JNIHandles;
-    } else if (strcmp(token, "c-heap") == 0) {
-      verify_flags |= Verify_CHeap;
     } else if (strcmp(token, "codecache_oops") == 0) {
       verify_flags |= Verify_CodeCacheOops;
     } else {
@@ -1208,10 +1206,6 @@
     log_debug(gc, verify)("JNIHandles");
     JNIHandles::verify();
   }
-  if (should_verify_subset(Verify_CHeap)) {
-    log_debug(gc, verify)("C-heap");
-    os::check_heap();
-  }
   if (should_verify_subset(Verify_CodeCacheOops)) {
     log_debug(gc, verify)("CodeCache Oops");
     CodeCache::verify_oops();
diff --git a/hotspot/src/share/vm/memory/universe.hpp b/hotspot/src/share/vm/memory/universe.hpp
index 924809b..054b11a 100644
--- a/hotspot/src/share/vm/memory/universe.hpp
+++ b/hotspot/src/share/vm/memory/universe.hpp
@@ -480,8 +480,7 @@
     Verify_ClassLoaderDataGraph = 64,
     Verify_MetaspaceAux = 128,
     Verify_JNIHandles = 256,
-    Verify_CHeap = 512,
-    Verify_CodeCacheOops = 1024,
+    Verify_CodeCacheOops = 512,
     Verify_All = -1
   };
   static void initialize_verify_flags();
diff --git a/hotspot/src/share/vm/oops/compiledICHolder.cpp b/hotspot/src/share/vm/oops/compiledICHolder.cpp
index 9e01e4e..55397d0 100644
--- a/hotspot/src/share/vm/oops/compiledICHolder.cpp
+++ b/hotspot/src/share/vm/oops/compiledICHolder.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 #include "oops/compiledICHolder.hpp"
 #include "oops/klass.hpp"
 #include "oops/method.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 
 volatile int CompiledICHolder::_live_count;
 volatile int CompiledICHolder::_live_not_claimed_count;
diff --git a/hotspot/src/share/vm/oops/cpCache.cpp b/hotspot/src/share/vm/oops/cpCache.cpp
index ee2425f..a30d19d 100644
--- a/hotspot/src/share/vm/oops/cpCache.cpp
+++ b/hotspot/src/share/vm/oops/cpCache.cpp
@@ -32,7 +32,7 @@
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index 1e7b1b1..d6b2323 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -56,7 +56,7 @@
 #include "prims/jvmtiRedefineClasses.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "prims/methodComparator.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/javaCalls.hpp"
diff --git a/hotspot/src/share/vm/oops/klass.cpp b/hotspot/src/share/vm/oops/klass.cpp
index d7fb892..38a613d 100644
--- a/hotspot/src/share/vm/oops/klass.cpp
+++ b/hotspot/src/share/vm/oops/klass.cpp
@@ -36,7 +36,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/klass.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "trace/traceMacros.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/oops/klassVtable.cpp b/hotspot/src/share/vm/oops/klassVtable.cpp
index 73db300..c3118cc 100644
--- a/hotspot/src/share/vm/oops/klassVtable.cpp
+++ b/hotspot/src/share/vm/oops/klassVtable.cpp
@@ -60,7 +60,7 @@
 void klassVtable::compute_vtable_size_and_num_mirandas(
     int* vtable_length_ret, int* num_new_mirandas,
     GrowableArray<Method*>* all_mirandas, const Klass* super,
-    Array<Method*>* methods, AccessFlags class_flags,
+    Array<Method*>* methods, AccessFlags class_flags, u2 major_version,
     Handle classloader, Symbol* classname, Array<Klass*>* local_interfaces,
     TRAPS) {
   NoSafepointVerifier nsv;
@@ -77,7 +77,7 @@
     assert(methods->at(i)->is_method(), "must be a Method*");
     methodHandle mh(THREAD, methods->at(i));
 
-    if (needs_new_vtable_entry(mh, super, classloader, classname, class_flags, THREAD)) {
+    if (needs_new_vtable_entry(mh, super, classloader, classname, class_flags, major_version, THREAD)) {
       vtable_length += vtableEntry::size(); // we need a new entry
     }
   }
@@ -256,10 +256,15 @@
 
     // In class hierarchies where the accessibility is not increasing (i.e., going from private ->
     // package_private -> public/protected), the vtable might actually be smaller than our initial
-    // calculation.
-    assert(initialized <= _length, "vtable initialization failed");
-    for(;initialized < _length; initialized++) {
-      put_method_at(NULL, initialized);
+    // calculation, for classfile versions for which we do not do transitive override
+    // calculations.
+    if (ik()->major_version() >= VTABLE_TRANSITIVE_OVERRIDE_VERSION) {
+      assert(initialized == _length, "vtable initialization failed");
+    } else {
+      assert(initialized <= _length, "vtable initialization failed");
+      for(;initialized < _length; initialized++) {
+        table()[initialized].clear();
+      }
     }
     NOT_PRODUCT(verify(tty, true));
   }
@@ -298,9 +303,9 @@
           ResourceMark rm(THREAD);
           outputStream* logst = Log(vtables)::trace_stream();
           char* sig = target_method()->name_and_sig_as_C_string();
-          logst->print("transitive overriding superclass %s with %s::%s index %d, original flags: ",
+          logst->print("transitive overriding superclass %s with %s index %d, original flags: ",
                        supersuperklass->internal_name(),
-                       _klass->internal_name(), sig, vtable_index);
+                       sig, vtable_index);
           super_method->print_linkage_flags(logst);
           logst->print("overriders flags: ");
           target_method->print_linkage_flags(logst);
@@ -330,11 +335,11 @@
     outputStream* logst = Log(vtables)::trace_stream();
     char* sig = target_method()->name_and_sig_as_C_string();
     if (overrides) {
-      logst->print("overriding with %s::%s index %d, original flags: ",
-                   target_klass->internal_name(), sig, i);
+      logst->print("overriding with %s index %d, original flags: ",
+                   sig, i);
     } else {
-      logst->print("NOT overriding with %s::%s index %d, original flags: ",
-                   target_klass->internal_name(), sig, i);
+      logst->print("NOT overriding with %s index %d, original flags: ",
+                   sig, i);
     }
     super_method->print_linkage_flags(logst);
     logst->print("overriders flags: ");
@@ -566,6 +571,7 @@
                                          Handle classloader,
                                          Symbol* classname,
                                          AccessFlags class_flags,
+                                         u2 major_version,
                                          TRAPS) {
   if (class_flags.is_interface()) {
     // Interfaces do not use vtables, except for java.lang.Object methods,
@@ -646,8 +652,12 @@
       }
     }
 
-    // Start with lookup result and continue to search up
-    k = superk->super(); // haven't found an override match yet; continue to look
+    // Start with lookup result and continue to search up, for versions supporting transitive override
+    if (major_version >= VTABLE_TRANSITIVE_OVERRIDE_VERSION) {
+      k = superk->super(); // haven't found an override match yet; continue to look
+    } else {
+      break;
+    }
   }
 
   // if the target method is public or protected it may have a matching
@@ -1500,15 +1510,22 @@
 
 void vtableEntry::verify(klassVtable* vt, outputStream* st) {
   NOT_PRODUCT(FlagSetting fs(IgnoreLockingAssertions, true));
-  assert(method() != NULL, "must have set method");
-  method()->verify();
-  // we sub_type, because it could be a miranda method
-  if (!vt->klass()->is_subtype_of(method()->method_holder())) {
-#ifndef PRODUCT
-    print();
-#endif
-    fatal("vtableEntry " PTR_FORMAT ": method is from subclass", p2i(this));
+  KlassHandle vtklass_h = vt->klass();
+  Klass* vtklass = vtklass_h();
+  if (vtklass->is_instance_klass() &&
+     (InstanceKlass::cast(vtklass)->major_version() >= klassVtable::VTABLE_TRANSITIVE_OVERRIDE_VERSION)) {
+    assert(method() != NULL, "must have set method");
   }
+  if (method() != NULL) {
+    method()->verify();
+    // we sub_type, because it could be a miranda method
+    if (!vtklass_h->is_subtype_of(method()->method_holder())) {
+#ifndef PRODUCT
+      print();
+#endif
+      fatal("vtableEntry " PTR_FORMAT ": method is from subclass", p2i(this));
+    }
+ }
 }
 
 #ifndef PRODUCT
diff --git a/hotspot/src/share/vm/oops/klassVtable.hpp b/hotspot/src/share/vm/oops/klassVtable.hpp
index 8d33f79..06e8403 100644
--- a/hotspot/src/share/vm/oops/klassVtable.hpp
+++ b/hotspot/src/share/vm/oops/klassVtable.hpp
@@ -90,6 +90,7 @@
                                                    const Klass* super,
                                                    Array<Method*>* methods,
                                                    AccessFlags class_flags,
+                                                   u2 major_version,
                                                    Handle classloader,
                                                    Symbol* classname,
                                                    Array<Klass*>* local_interfaces,
@@ -115,8 +116,14 @@
 
  protected:
   friend class vtableEntry;
- private:
+
+ public:
+  // Transitive overridng rules for class files < JDK1_7 use the older JVMS rules.
+  // Overriding is determined as we create the vtable, so we use the class file version
+  // of the class whose vtable we are calculating.
   enum { VTABLE_TRANSITIVE_OVERRIDE_VERSION = 51 } ;
+
+ private:
   void copy_vtable_to(vtableEntry* start);
   int  initialize_from_super(KlassHandle super);
   int  index_of(Method* m, int len) const; // same as index_of, but search only up to len
@@ -126,6 +133,7 @@
                                      Handle classloader,
                                      Symbol* classname,
                                      AccessFlags access_flags,
+                                     u2 major_version,
                                      TRAPS);
 
   bool update_inherited_vtable(InstanceKlass* klass, methodHandle target_method, int super_vtable_len, int default_index, bool checkconstraints, TRAPS);
diff --git a/hotspot/src/share/vm/oops/method.cpp b/hotspot/src/share/vm/oops/method.cpp
index 9bcf81f..f890d1d 100644
--- a/hotspot/src/share/vm/oops/method.cpp
+++ b/hotspot/src/share/vm/oops/method.cpp
@@ -54,6 +54,7 @@
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
+#include "runtime/init.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/relocator.hpp"
 #include "runtime/sharedRuntime.hpp"
@@ -1015,7 +1016,14 @@
   // so making them eagerly shouldn't be too expensive.
   AdapterHandlerEntry* adapter = AdapterHandlerLibrary::get_adapter(mh);
   if (adapter == NULL ) {
-    THROW_MSG_NULL(vmSymbols::java_lang_VirtualMachineError(), "Out of space in CodeCache for adapters");
+    if (!is_init_completed()) {
+      // Don't throw exceptions during VM initialization because java.lang.* classes
+      // might not have been initialized, causing problems when constructing the
+      // Java exception object.
+      vm_exit_during_initialization("Out of space in CodeCache for adapters");
+    } else {
+      THROW_MSG_NULL(vmSymbols::java_lang_VirtualMachineError(), "Out of space in CodeCache for adapters");
+    }
   }
 
   if (mh->is_shared()) {
diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp
index fe3cd50..578bcc4 100644
--- a/hotspot/src/share/vm/oops/oop.inline.hpp
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp
@@ -36,7 +36,7 @@
 #include "oops/klass.inline.hpp"
 #include "oops/markOop.inline.hpp"
 #include "oops/oop.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
diff --git a/hotspot/src/share/vm/oops/symbol.cpp b/hotspot/src/share/vm/oops/symbol.cpp
index 74d56db..f515621 100644
--- a/hotspot/src/share/vm/oops/symbol.cpp
+++ b/hotspot/src/share/vm/oops/symbol.cpp
@@ -29,7 +29,7 @@
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/symbol.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 
 Symbol::Symbol(const u1* name, int length, int refcount) {
diff --git a/hotspot/src/share/vm/oops/symbol.hpp b/hotspot/src/share/vm/oops/symbol.hpp
index b6801f0..468640c 100644
--- a/hotspot/src/share/vm/oops/symbol.hpp
+++ b/hotspot/src/share/vm/oops/symbol.hpp
@@ -26,8 +26,8 @@
 #define SHARE_VM_OOPS_SYMBOL_HPP
 
 #include "memory/allocation.hpp"
-#include "runtime/atomic.hpp"
 #include "utilities/exceptions.hpp"
+#include "utilities/macros.hpp"
 #include "utilities/utf8.hpp"
 
 // A Symbol is a canonicalized string.
diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
index 9882317..4c5ee04 100644
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
@@ -508,7 +508,7 @@
 #if INCLUDE_TRACE
   EventCompilerInlining event;
   if (event.should_commit()) {
-    event.set_compileID(C->compile_id());
+    event.set_compileId(C->compile_id());
     event.set_message(inline_msg);
     event.set_succeeded(success);
     event.set_bci(caller_bci);
diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp
index f2f8c46..651166c 100644
--- a/hotspot/src/share/vm/opto/compile.hpp
+++ b/hotspot/src/share/vm/opto/compile.hpp
@@ -729,7 +729,7 @@
     if (event.should_commit()) {
       event.set_starttime(C->_latest_stage_start_counter);
       event.set_phase((u1) cpt);
-      event.set_compileID(C->_compile_id);
+      event.set_compileId(C->_compile_id);
       event.set_phaseLevel(level);
       event.commit();
     }
@@ -748,7 +748,7 @@
     if (event.should_commit()) {
       event.set_starttime(C->_latest_stage_start_counter);
       event.set_phase((u1) PHASE_END);
-      event.set_compileID(C->_compile_id);
+      event.set_compileId(C->_compile_id);
       event.set_phaseLevel(level);
       event.commit();
     }
diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp
index 3626009..d0a3c4b 100644
--- a/hotspot/src/share/vm/opto/runtime.cpp
+++ b/hotspot/src/share/vm/opto/runtime.cpp
@@ -60,7 +60,7 @@
 #include "opto/runtime.hpp"
 #include "opto/subnode.hpp"
 #include "prims/jvmtiThreadState.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/fprofiler.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index 878bd66..f083a74 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -59,7 +59,7 @@
 #include "prims/jvm_misc.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/fieldDescriptor.hpp"
 #include "runtime/fprofiler.hpp"
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index 79c450b..b66c22b 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
+++ b/hotspot/src/share/vm/prims/jvm.cpp
@@ -54,7 +54,7 @@
 #include "prims/privilegedStack.hpp"
 #include "prims/stackwalk.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.hpp"
diff --git a/hotspot/src/share/vm/prims/jvmti.xml b/hotspot/src/share/vm/prims/jvmti.xml
index 3a06d2f..48b58c3 100644
--- a/hotspot/src/share/vm/prims/jvmti.xml
+++ b/hotspot/src/share/vm/prims/jvmti.xml
@@ -7152,15 +7152,19 @@
         returns <code>JNI_FALSE</code>) the class can be neither
         redefined nor retransformed.
         <p/>
-        Primitive classes (for example, <code>java.lang.Integer.TYPE</code>) 
-        and array classes are never modifiable. 
+        Primitive classes (for example, <code>java.lang.Integer.TYPE</code>),
+        array classes, and some implementation defined classes are never modifiable. 
         <p/>
       </description>
       <origin>new</origin>
       <capabilities>
         <capability id="can_redefine_any_class">
-          If possessed then all classes (except primitive and array classes) 
-          are modifiable.
+          If possessed then all classes (except primitive, array, and some implementation defined
+          classes) are modifiable (redefine or retransform).
+        </capability>
+        <capability id="can_retransform_any_class">
+          If possessed then all classes (except primitive, array, and some implementation defined
+          classes) are modifiable with <functionlink id="RetransformClasses"/>.
         </capability>
         <capability id="can_redefine_classes">
           No effect on the result of the function.
@@ -9900,7 +9904,7 @@
       </capabilityfield>
       <capabilityfield id="can_redefine_any_class">
 	<description>
-          Can modify (retransform or redefine) any non-primitive non-array class.
+          Can modify (retransform or redefine) any modifiable class.
           See <functionlink id="IsModifiableClass"/>.
 	</description>
       </capabilityfield>
@@ -10024,7 +10028,8 @@
       </capabilityfield>
       <capabilityfield id="can_retransform_any_class" since="1.1">
 	<description>
-          <functionlink id="RetransformClasses"/> can be called on any class 
+          <functionlink id="RetransformClasses"/> can be called on any modifiable class.
+          See <functionlink id="IsModifiableClass"/>.
           (<fieldlink id="can_retransform_classes" struct="jvmtiCapabilities"/>
           must also be set)
 	</description>
@@ -12494,8 +12499,8 @@
     Otherwise, this event may be sent before the VM is initialized (the start 
     <functionlink id="GetPhase">phase</functionlink>).
     Some classes might not be compatible
-    with the function (eg. ROMized classes) and this event will not be
-    generated for these classes.
+    with the function (eg. ROMized classes or implementation defined classes) and this event will
+    not be generated for these classes.
     <p/>
     The agent must allocate the space for the modified 
     class file data buffer
@@ -14498,6 +14503,10 @@
        - Add new capability can_generate_early_class_hook_events
        - Add new function GetNamedModule
   </change>
+  <change date="16 August 2016" version="9.0.0">
+      Clarified can_redefine_any_classes, can_retransform_any_classes and IsModifiableClass API to
+      disallow some implementation defined classes.
+  </change>
 </changehistory>
 
 </specification>
diff --git a/hotspot/src/share/vm/prims/jvmtiEnv.cpp b/hotspot/src/share/vm/prims/jvmtiEnv.cpp
index 5b44ee0..f1c5f96 100644
--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp
@@ -283,7 +283,7 @@
       return JVMTI_ERROR_INVALID_CLASS;
     }
 
-    if (java_lang_Class::is_primitive(k_mirror)) {
+    if (!VM_RedefineClasses::is_modifiable_class(k_mirror)) {
       return JVMTI_ERROR_UNMODIFIABLE_CLASS;
     }
 
@@ -294,9 +294,6 @@
     if (status & (JVMTI_CLASS_STATUS_ERROR)) {
       return JVMTI_ERROR_INVALID_CLASS;
     }
-    if (status & (JVMTI_CLASS_STATUS_ARRAY)) {
-      return JVMTI_ERROR_UNMODIFIABLE_CLASS;
-    }
 
     instanceKlassHandle ikh(current_thread, k_oop);
     if (ikh->get_cached_class_file_bytes() == NULL) {
diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.cpp b/hotspot/src/share/vm/prims/jvmtiImpl.cpp
index 398f572..2090522 100644
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
 #include "prims/jvmtiEventController.inline.hpp"
 #include "prims/jvmtiImpl.hpp"
 #include "prims/jvmtiRedefineClasses.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/handles.inline.hpp"
diff --git a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
index 003f12f..3ce6cf7 100644
--- a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "prims/jvmtiRawMonitor.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/orderAccess.inline.hpp"
 #include "runtime/thread.inline.hpp"
diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
index f173e57..8a84d0e 100644
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
@@ -130,7 +130,7 @@
     }
 
     oop mirror = JNIHandles::resolve_non_null(_class_defs[i].klass);
-    // classes for primitives and arrays cannot be redefined
+    // classes for primitives and arrays and vm anonymous classes cannot be redefined
     // check here so following code can assume these classes are InstanceKlass
     if (!is_modifiable_class(mirror)) {
       _res = JVMTI_ERROR_UNMODIFIABLE_CLASS;
@@ -250,9 +250,14 @@
   if (java_lang_Class::is_primitive(klass_mirror)) {
     return false;
   }
-  Klass* the_class_oop = java_lang_Class::as_Klass(klass_mirror);
+  Klass* k = java_lang_Class::as_Klass(klass_mirror);
   // classes for arrays cannot be redefined
-  if (the_class_oop == NULL || !the_class_oop->is_instance_klass()) {
+  if (k == NULL || !k->is_instance_klass()) {
+    return false;
+  }
+
+  // Cannot redefine or retransform an anonymous class.
+  if (InstanceKlass::cast(k)->is_anonymous()) {
     return false;
   }
   return true;
diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
index fa9d513..b2cf566 100644
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
@@ -3119,6 +3119,11 @@
             }
           }
 
+          // Follow oops from compiled nmethod
+          if (jvf->cb() != NULL && jvf->cb()->is_nmethod()) {
+            blk->set_context(thread_tag, tid, depth, method);
+            jvf->cb()->as_nmethod()->oops_do(blk);
+          }
         } else {
           blk->set_context(thread_tag, tid, depth, method);
           if (is_top_frame) {
diff --git a/hotspot/src/share/vm/prims/unsafe.cpp b/hotspot/src/share/vm/prims/unsafe.cpp
index d7721ec..55a9681 100644
--- a/hotspot/src/share/vm/prims/unsafe.cpp
+++ b/hotspot/src/share/vm/prims/unsafe.cpp
@@ -32,7 +32,7 @@
 #include "prims/jni.h"
 #include "prims/jvm.h"
 #include "prims/unsafe.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/orderAccess.inline.hpp"
@@ -1047,7 +1047,7 @@
 
   if (event.should_commit()) {
     oop obj = thread->current_park_blocker();
-    event.set_klass((obj != NULL) ? obj->klass() : NULL);
+    event.set_parkedClass((obj != NULL) ? obj->klass() : NULL);
     event.set_timeout(time);
     event.set_address((obj != NULL) ? (TYPE_ADDRESS) cast_from_oop<uintptr_t>(obj) : 0);
     event.commit();
diff --git a/hotspot/src/share/vm/runtime/atomic.hpp b/hotspot/src/share/vm/runtime/atomic.hpp
index c71a2d3..a685b60 100644
--- a/hotspot/src/share/vm/runtime/atomic.hpp
+++ b/hotspot/src/share/vm/runtime/atomic.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 #define SHARE_VM_RUNTIME_ATOMIC_HPP
 
 #include "memory/allocation.hpp"
+#include "utilities/macros.hpp"
 
 enum cmpxchg_memory_order {
   memory_order_relaxed,
@@ -119,24 +120,120 @@
   inline static void*        cmpxchg_ptr(void*        exchange_value, volatile void*         dest, void*        compare_value, cmpxchg_memory_order order = memory_order_conservative);
 };
 
-// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
-// aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
-// achieve is to place your short value next to another short value, which doesn't need atomic ops.
-//
-// Example
-//  ATOMIC_SHORT_PAIR(
-//    volatile short _refcount,  // needs atomic operation
-//    unsigned short _length     // number of UTF8 characters in the symbol (does not need atomic op)
-//  );
+// platform specific in-line definitions - must come before shared definitions
 
-#ifdef VM_LITTLE_ENDIAN
-  #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
-    non_atomic_decl;                                       \
-    atomic_decl
-#else
-  #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
-    atomic_decl;                                           \
-    non_atomic_decl
+#include OS_CPU_HEADER(atomic)
+
+// shared in-line definitions
+
+// size_t casts...
+#if (SIZE_MAX != UINTPTR_MAX)
+#error size_t is not WORD_SIZE, interesting platform, but missing implementation here
 #endif
 
+inline size_t Atomic::add(size_t add_value, volatile size_t* dest) {
+  return (size_t) add_ptr((intptr_t) add_value, (volatile intptr_t*) dest);
+}
+
+inline void Atomic::inc(volatile size_t* dest) {
+  inc_ptr((volatile intptr_t*) dest);
+}
+
+inline void Atomic::dec(volatile size_t* dest) {
+  dec_ptr((volatile intptr_t*) dest);
+}
+
+#ifndef VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+/*
+ * This is the default implementation of byte-sized cmpxchg. It emulates jbyte-sized cmpxchg
+ * in terms of jint-sized cmpxchg. Platforms may override this by defining their own inline definition
+ * as well as defining VM_HAS_SPECIALIZED_CMPXCHG_BYTE. This will cause the platform specific
+ * implementation to be used instead.
+ */
+inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte* dest,
+                             jbyte compare_value, cmpxchg_memory_order order) {
+  STATIC_ASSERT(sizeof(jbyte) == 1);
+  volatile jint* dest_int =
+      static_cast<volatile jint*>(align_ptr_down(dest, sizeof(jint)));
+  size_t offset = pointer_delta(dest, dest_int, 1);
+  jint cur = *dest_int;
+  jbyte* cur_as_bytes = reinterpret_cast<jbyte*>(&cur);
+
+  // current value may not be what we are looking for, so force it
+  // to that value so the initial cmpxchg will fail if it is different
+  cur_as_bytes[offset] = compare_value;
+
+  // always execute a real cmpxchg so that we get the required memory
+  // barriers even on initial failure
+  do {
+    // value to swap in matches current value ...
+    jint new_value = cur;
+    // ... except for the one jbyte we want to update
+    reinterpret_cast<jbyte*>(&new_value)[offset] = exchange_value;
+
+    jint res = cmpxchg(new_value, dest_int, cur, order);
+    if (res == cur) break; // success
+
+    // at least one jbyte in the jint changed value, so update
+    // our view of the current jint
+    cur = res;
+    // if our jbyte is still as cur we loop and try again
+  } while (cur_as_bytes[offset] == compare_value);
+
+  return cur_as_bytes[offset];
+}
+
+#endif // VM_HAS_SPECIALIZED_CMPXCHG_BYTE
+
+inline unsigned Atomic::xchg(unsigned int exchange_value, volatile unsigned int* dest) {
+  assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
+  return (unsigned int)Atomic::xchg((jint)exchange_value, (volatile jint*)dest);
+}
+
+inline unsigned Atomic::cmpxchg(unsigned int exchange_value,
+                         volatile unsigned int* dest, unsigned int compare_value,
+                         cmpxchg_memory_order order) {
+  assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
+  return (unsigned int)Atomic::cmpxchg((jint)exchange_value, (volatile jint*)dest,
+                                       (jint)compare_value, order);
+}
+
+inline jlong Atomic::add(jlong    add_value, volatile jlong*    dest) {
+  jlong old = load(dest);
+  jlong new_value = old + add_value;
+  while (old != cmpxchg(new_value, dest, old)) {
+    old = load(dest);
+    new_value = old + add_value;
+  }
+  return old;
+}
+
+inline void Atomic::inc(volatile short* dest) {
+  // Most platforms do not support atomic increment on a 2-byte value. However,
+  // if the value occupies the most significant 16 bits of an aligned 32-bit
+  // word, then we can do this with an atomic add of 0x10000 to the 32-bit word.
+  //
+  // The least significant parts of this 32-bit word will never be affected, even
+  // in case of overflow/underflow.
+  //
+  // Use the ATOMIC_SHORT_PAIR macro (see macros.hpp) to get the desired alignment.
+#ifdef VM_LITTLE_ENDIAN
+  assert((intx(dest) & 0x03) == 0x02, "wrong alignment");
+  (void)Atomic::add(0x10000, (volatile int*)(dest-1));
+#else
+  assert((intx(dest) & 0x03) == 0x00, "wrong alignment");
+  (void)Atomic::add(0x10000, (volatile int*)(dest));
+#endif
+}
+
+inline void Atomic::dec(volatile short* dest) {
+#ifdef VM_LITTLE_ENDIAN
+  assert((intx(dest) & 0x03) == 0x02, "wrong alignment");
+  (void)Atomic::add(-0x10000, (volatile int*)(dest-1));
+#else
+  assert((intx(dest) & 0x03) == 0x00, "wrong alignment");
+  (void)Atomic::add(-0x10000, (volatile int*)(dest));
+#endif
+}
+
 #endif // SHARE_VM_RUNTIME_ATOMIC_HPP
diff --git a/hotspot/src/share/vm/runtime/atomic.inline.hpp b/hotspot/src/share/vm/runtime/atomic.inline.hpp
deleted file mode 100644
index 690be7d..0000000
--- a/hotspot/src/share/vm/runtime/atomic.inline.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_RUNTIME_ATOMIC_INLINE_HPP
-#define SHARE_VM_RUNTIME_ATOMIC_INLINE_HPP
-
-#include "runtime/atomic.hpp"
-#include "utilities/macros.hpp"
-
-#include OS_CPU_HEADER_INLINE(atomic)
-
-// size_t casts...
-#if (SIZE_MAX != UINTPTR_MAX)
-#error size_t is not WORD_SIZE, interesting platform, but missing implementation here
-#endif
-
-inline size_t Atomic::add(size_t add_value, volatile size_t* dest) {
-  return (size_t) add_ptr((intptr_t) add_value, (volatile intptr_t*) dest);
-}
-
-inline void Atomic::inc(volatile size_t* dest) {
-  inc_ptr((volatile intptr_t*) dest);
-}
-
-inline void Atomic::dec(volatile size_t* dest) {
-  dec_ptr((volatile intptr_t*) dest);
-}
-
-#ifndef VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-/*
- * This is the default implementation of byte-sized cmpxchg. It emulates jbyte-sized cmpxchg
- * in terms of jint-sized cmpxchg. Platforms may override this by defining their own inline definition
- * as well as defining VM_HAS_SPECIALIZED_CMPXCHG_BYTE. This will cause the platform specific
- * implementation to be used instead.
- */
-inline jbyte Atomic::cmpxchg(jbyte exchange_value, volatile jbyte *dest, jbyte comparand, cmpxchg_memory_order order)
-{
-  assert(sizeof(jbyte) == 1, "assumption.");
-  uintptr_t dest_addr = (uintptr_t)dest;
-  uintptr_t offset = dest_addr % sizeof(jint);
-  volatile jint* dest_int = (volatile jint*)(dest_addr - offset);
-  jint cur = *dest_int;
-  jbyte* cur_as_bytes = (jbyte*)(&cur);
-  jint new_val = cur;
-  jbyte* new_val_as_bytes = (jbyte*)(&new_val);
-  new_val_as_bytes[offset] = exchange_value;
-  while (cur_as_bytes[offset] == comparand) {
-    jint res = cmpxchg(new_val, dest_int, cur, order);
-    if (res == cur) break;
-    cur = res;
-    new_val = cur;
-    new_val_as_bytes[offset] = exchange_value;
-  }
-  return cur_as_bytes[offset];
-}
-#endif // VM_HAS_SPECIALIZED_CMPXCHG_BYTE
-
-inline unsigned Atomic::xchg(unsigned int exchange_value, volatile unsigned int* dest) {
-  assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
-  return (unsigned int)Atomic::xchg((jint)exchange_value, (volatile jint*)dest);
-}
-
-inline unsigned Atomic::cmpxchg(unsigned int exchange_value,
-                         volatile unsigned int* dest, unsigned int compare_value,
-                         cmpxchg_memory_order order) {
-  assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
-  return (unsigned int)Atomic::cmpxchg((jint)exchange_value, (volatile jint*)dest,
-                                       (jint)compare_value, order);
-}
-
-inline jlong Atomic::add(jlong    add_value, volatile jlong*    dest) {
-  jlong old = load(dest);
-  jlong new_value = old + add_value;
-  while (old != cmpxchg(new_value, dest, old)) {
-    old = load(dest);
-    new_value = old + add_value;
-  }
-  return old;
-}
-
-inline void Atomic::inc(volatile short* dest) {
-  // Most platforms do not support atomic increment on a 2-byte value. However,
-  // if the value occupies the most significant 16 bits of an aligned 32-bit
-  // word, then we can do this with an atomic add of 0x10000 to the 32-bit word.
-  //
-  // The least significant parts of this 32-bit word will never be affected, even
-  // in case of overflow/underflow.
-  //
-  // Use the ATOMIC_SHORT_PAIR macro to get the desired alignment.
-#ifdef VM_LITTLE_ENDIAN
-  assert((intx(dest) & 0x03) == 0x02, "wrong alignment");
-  (void)Atomic::add(0x10000, (volatile int*)(dest-1));
-#else
-  assert((intx(dest) & 0x03) == 0x00, "wrong alignment");
-  (void)Atomic::add(0x10000, (volatile int*)(dest));
-#endif
-}
-
-inline void Atomic::dec(volatile short* dest) {
-#ifdef VM_LITTLE_ENDIAN
-  assert((intx(dest) & 0x03) == 0x02, "wrong alignment");
-  (void)Atomic::add(-0x10000, (volatile int*)(dest-1));
-#else
-  assert((intx(dest) & 0x03) == 0x00, "wrong alignment");
-  (void)Atomic::add(-0x10000, (volatile int*)(dest));
-#endif
-}
-
-#endif // SHARE_VM_RUNTIME_ATOMIC_INLINE_HPP
diff --git a/hotspot/src/share/vm/runtime/biasedLocking.cpp b/hotspot/src/share/vm/runtime/biasedLocking.cpp
index 1d5fd53..8434960 100644
--- a/hotspot/src/share/vm/runtime/biasedLocking.cpp
+++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp
@@ -28,7 +28,7 @@
 #include "oops/klass.inline.hpp"
 #include "oops/markOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/task.hpp"
diff --git a/hotspot/src/share/vm/runtime/globals.cpp b/hotspot/src/share/vm/runtime/globals.cpp
index b0a0d79..68ec6b0 100644
--- a/hotspot/src/share/vm/runtime/globals.cpp
+++ b/hotspot/src/share/vm/runtime/globals.cpp
@@ -975,8 +975,8 @@
 static void trace_flag_changed(const char* name, const T old_value, const T new_value, const Flag::Flags origin) {
   E e;
   e.set_name(name);
-  e.set_old_value(old_value);
-  e.set_new_value(new_value);
+  e.set_oldValue(old_value);
+  e.set_newValue(new_value);
   e.set_origin(origin);
   e.commit();
 }
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
index 8931466..20b62a6 100644
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -2242,7 +2242,7 @@
           "in a comma separated string. Sub-systems are: "                  \
           "threads, heap, symbol_table, string_table, codecache, "          \
           "dictionary, classloader_data_graph, metaspace, jni_handles, "    \
-          "c-heap, codecache_oops")                                         \
+          "codecache_oops")                                                 \
                                                                             \
   diagnostic(bool, GCParallelVerificationEnabled, true,                     \
           "Enable parallel memory system verification")                     \
@@ -3008,16 +3008,6 @@
   notproduct(intx, ZombieALotInterval,     5,                               \
           "Number of exits until ZombieALot kicks in")                      \
                                                                             \
-  diagnostic(intx, MallocVerifyInterval,     0,                             \
-          "If non-zero, verify C heap after every N calls to "              \
-          "malloc/realloc/free")                                            \
-          range(0, max_intx)                                                \
-                                                                            \
-  diagnostic(intx, MallocVerifyStart,     0,                                \
-          "If non-zero, start verifying C heap after Nth call to "          \
-          "malloc/realloc/free")                                            \
-          range(0, max_intx)                                                \
-                                                                            \
   diagnostic(uintx, MallocMaxTestWords,     0,                              \
           "If non-zero, maximum number of words that malloc/realloc can "   \
           "allocate (for testing only)")                                    \
diff --git a/hotspot/src/share/vm/runtime/handles.cpp b/hotspot/src/share/vm/runtime/handles.cpp
index baa4e2f..a8b6f8b 100644
--- a/hotspot/src/share/vm/runtime/handles.cpp
+++ b/hotspot/src/share/vm/runtime/handles.cpp
@@ -26,7 +26,7 @@
 #include "memory/allocation.inline.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/thread.inline.hpp"
 
diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.cpp b/hotspot/src/share/vm/runtime/interfaceSupport.cpp
index cd0d20a..db7ad9c 100644
--- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 #include "gc/shared/collectedHeap.inline.hpp"
 #include "gc/shared/genCollectedHeap.hpp"
 #include "memory/resourceArea.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/init.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/orderAccess.inline.hpp"
diff --git a/hotspot/src/share/vm/runtime/mutex.cpp b/hotspot/src/share/vm/runtime/mutex.cpp
index f24e2a0..86e1184 100644
--- a/hotspot/src/share/vm/runtime/mutex.cpp
+++ b/hotspot/src/share/vm/runtime/mutex.cpp
@@ -23,7 +23,7 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/mutex.hpp"
 #include "runtime/orderAccess.inline.hpp"
@@ -1148,7 +1148,16 @@
 }
 
 Monitor::~Monitor() {
-  assert((UNS(_owner)|UNS(_LockWord.FullWord)|UNS(_EntryList)|UNS(_WaitSet)|UNS(_OnDeck)) == 0, "");
+#ifdef ASSERT
+  uintptr_t owner = UNS(_owner);
+  uintptr_t lockword = UNS(_LockWord.FullWord);
+  uintptr_t entrylist = UNS(_EntryList);
+  uintptr_t waitset = UNS(_WaitSet);
+  uintptr_t ondeck = UNS(_OnDeck);
+  assert((owner|lockword|entrylist|waitset|ondeck) == 0,
+         "_owner(" INTPTR_FORMAT ")|_LockWord(" INTPTR_FORMAT ")|_EntryList(" INTPTR_FORMAT ")|_WaitSet("
+         INTPTR_FORMAT ")|_OnDeck(" INTPTR_FORMAT ") != 0", owner, lockword, entrylist, waitset, ondeck);
+#endif
 }
 
 void Monitor::ClearMonitor(Monitor * m, const char *name) {
diff --git a/hotspot/src/share/vm/runtime/objectMonitor.cpp b/hotspot/src/share/vm/runtime/objectMonitor.cpp
index 7590d90..e765ee0 100644
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp
@@ -27,7 +27,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/markOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/mutexLocker.hpp"
@@ -390,7 +390,7 @@
   }
 
   if (event.should_commit()) {
-    event.set_klass(((oop)this->object())->klass());
+    event.set_monitorClass(((oop)this->object())->klass());
     event.set_previousOwner((TYPE_THREAD)_previous_owner_tid);
     event.set_address((TYPE_ADDRESS)(uintptr_t)(this->object_addr()));
     event.commit();
@@ -1381,7 +1381,7 @@
                                             jlong timeout,
                                             bool timedout) {
   assert(event != NULL, "invariant");
-  event->set_klass(((oop)this->object())->klass());
+  event->set_monitorClass(((oop)this->object())->klass());
   event->set_timeout(timeout);
   event->set_address((TYPE_ADDRESS)this->object_addr());
   event->set_notifier(notifier_tid);
diff --git a/hotspot/src/share/vm/runtime/orderAccess.inline.hpp b/hotspot/src/share/vm/runtime/orderAccess.inline.hpp
index 0907a43..f7830c4 100644
--- a/hotspot/src/share/vm/runtime/orderAccess.inline.hpp
+++ b/hotspot/src/share/vm/runtime/orderAccess.inline.hpp
@@ -26,7 +26,7 @@
 #ifndef SHARE_VM_RUNTIME_ORDERACCESS_INLINE_HPP
 #define SHARE_VM_RUNTIME_ORDERACCESS_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
 #include "utilities/macros.hpp"
 
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index e9ff778..7089f6a 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -44,7 +44,7 @@
 #include "prims/jvm_misc.hpp"
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/java.hpp"
@@ -596,8 +596,6 @@
   }
 #endif
 
-  NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
-
   // For the test flag -XX:MallocMaxTestWords
   if (has_reached_max_malloc_test_peak(size)) {
     return NULL;
@@ -658,7 +656,6 @@
   // NMT support
   void* membase = MemTracker::malloc_base(memblock);
   verify_memory(membase);
-  NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
   if (size == 0) {
     return NULL;
   }
@@ -695,7 +692,6 @@
   }
   void* membase = MemTracker::record_free(memblock);
   verify_memory(membase);
-  NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
 
   GuardedMemory guarded(membase);
   size_t size = guarded.get_user_size();
diff --git a/hotspot/src/share/vm/runtime/os.hpp b/hotspot/src/share/vm/runtime/os.hpp
index 0cf1bd6..431e7b2 100644
--- a/hotspot/src/share/vm/runtime/os.hpp
+++ b/hotspot/src/share/vm/runtime/os.hpp
@@ -709,7 +709,6 @@
   static void* realloc (void *memblock, size_t size, MEMFLAGS flag);
 
   static void  free    (void *memblock);
-  static bool  check_heap(bool force = false);      // verify C heap integrity
   static char* strdup(const char *, MEMFLAGS flags = mtInternal);  // Like strdup
   // Like strdup, but exit VM when strdup() returns NULL
   static char* strdup_check_oom(const char*, MEMFLAGS flags = mtInternal);
diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp
index 28f00fd..50cae3c 100644
--- a/hotspot/src/share/vm/runtime/safepoint.cpp
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp
@@ -39,7 +39,7 @@
 #include "memory/universe.inline.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/frame.inline.hpp"
@@ -173,7 +173,7 @@
   //     block itself when it attempts transitions to a new state.
   //
   {
-    EventSafepointStateSync sync_event;
+    EventSafepointStateSynchronization sync_event;
     int initial_running = 0;
 
     _state            = _synchronizing;
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
index 11e7f83..c2bf3c0 100644
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
@@ -49,7 +49,7 @@
 #include "prims/methodHandles.hpp"
 #include "prims/nativeLookup.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/handles.inline.hpp"
diff --git a/hotspot/src/share/vm/runtime/sweeper.cpp b/hotspot/src/share/vm/runtime/sweeper.cpp
index 16cf5cd..60fc91c 100644
--- a/hotspot/src/share/vm/runtime/sweeper.cpp
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp
@@ -30,7 +30,7 @@
 #include "compiler/compileBroker.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/method.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/compilationPolicy.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "runtime/orderAccess.inline.hpp"
@@ -485,7 +485,7 @@
   if (event.should_commit()) {
     event.set_starttime(sweep_start_counter);
     event.set_endtime(sweep_end_counter);
-    event.set_sweepIndex(_traversals);
+    event.set_sweepId(_traversals);
     event.set_sweptCount(swept_count);
     event.set_flushedCount(flushed_count);
     event.set_zombifiedCount(zombified_count);
diff --git a/hotspot/src/share/vm/runtime/synchronizer.cpp b/hotspot/src/share/vm/runtime/synchronizer.cpp
index ef8a271..b9004d6 100644
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp
@@ -30,7 +30,7 @@
 #include "memory/resourceArea.hpp"
 #include "oops/markOop.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/interfaceSupport.hpp"
@@ -1819,7 +1819,7 @@
                                        const ObjectSynchronizer::InflateCause cause) {
 #if INCLUDE_TRACE
   assert(event.should_commit(), "check outside");
-  event.set_klass(obj->klass());
+  event.set_monitorClass(obj->klass());
   event.set_address((TYPE_ADDRESS)(uintptr_t)(void*)obj);
   event.set_cause((u1)cause);
   event.commit();
diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp
index c87de62..f3481da 100644
--- a/hotspot/src/share/vm/runtime/thread.cpp
+++ b/hotspot/src/share/vm/runtime/thread.cpp
@@ -57,7 +57,7 @@
 #include "prims/jvmtiThreadState.hpp"
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/commandLineFlagConstraintList.hpp"
 #include "runtime/commandLineFlagWriteableList.hpp"
diff --git a/hotspot/src/share/vm/runtime/thread.inline.hpp b/hotspot/src/share/vm/runtime/thread.inline.hpp
index b8c7a14..bb1fb9c 100644
--- a/hotspot/src/share/vm/runtime/thread.inline.hpp
+++ b/hotspot/src/share/vm/runtime/thread.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 
 #define SHARE_VM_RUNTIME_THREAD_INLINE_HPP_SCOPE
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.inline.hpp"
 #include "runtime/thread.hpp"
 
diff --git a/hotspot/src/share/vm/runtime/vmThread.cpp b/hotspot/src/share/vm/runtime/vmThread.cpp
index d7c0137..5b3fda0 100644
--- a/hotspot/src/share/vm/runtime/vmThread.cpp
+++ b/hotspot/src/share/vm/runtime/vmThread.cpp
@@ -279,7 +279,6 @@
     HandleMark hm(VMThread::vm_thread());
     // Among other things, this ensures that Eden top is correct.
     Universe::heap()->prepare_for_verify();
-    os::check_heap();
     // Silent verification so as not to pollute normal output,
     // unless we really asked for it.
     Universe::verify();
diff --git a/hotspot/src/share/vm/services/mallocTracker.cpp b/hotspot/src/share/vm/services/mallocTracker.cpp
index ea39940..16a0cde 100644
--- a/hotspot/src/share/vm/services/mallocTracker.cpp
+++ b/hotspot/src/share/vm/services/mallocTracker.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
 #include "precompiled.hpp"
 
 #include "runtime/atomic.hpp"
-#include "runtime/atomic.inline.hpp"
 #include "services/mallocSiteTable.hpp"
 #include "services/mallocTracker.hpp"
 #include "services/mallocTracker.inline.hpp"
diff --git a/hotspot/src/share/vm/services/memTracker.hpp b/hotspot/src/share/vm/services/memTracker.hpp
index f05d39f..1682cb9 100644
--- a/hotspot/src/share/vm/services/memTracker.hpp
+++ b/hotspot/src/share/vm/services/memTracker.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,7 +75,6 @@
 
 #else
 
-#include "runtime/atomic.hpp"
 #include "runtime/threadCritical.hpp"
 #include "services/mallocTracker.hpp"
 #include "services/virtualMemoryTracker.hpp"
diff --git a/hotspot/src/share/vm/services/threadService.cpp b/hotspot/src/share/vm/services/threadService.cpp
index f89ff8b..3bd7a9f 100644
--- a/hotspot/src/share/vm/services/threadService.cpp
+++ b/hotspot/src/share/vm/services/threadService.cpp
@@ -31,7 +31,7 @@
 #include "oops/instanceKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/thread.hpp"
diff --git a/hotspot/src/share/vm/services/virtualMemoryTracker.cpp b/hotspot/src/share/vm/services/virtualMemoryTracker.cpp
index 964af28..c21aa54 100644
--- a/hotspot/src/share/vm/services/virtualMemoryTracker.cpp
+++ b/hotspot/src/share/vm/services/virtualMemoryTracker.cpp
@@ -23,7 +23,7 @@
  */
 #include "precompiled.hpp"
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/os.hpp"
 #include "runtime/threadCritical.hpp"
 #include "services/memTracker.hpp"
diff --git a/hotspot/src/share/vm/shark/sharkRuntime.cpp b/hotspot/src/share/vm/shark/sharkRuntime.cpp
index 454c87f..fff5802 100644
--- a/hotspot/src/share/vm/shark/sharkRuntime.cpp
+++ b/hotspot/src/share/vm/shark/sharkRuntime.cpp
@@ -24,7 +24,7 @@
  */
 
 #include "precompiled.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/deoptimization.hpp"
 #include "runtime/thread.hpp"
diff --git a/hotspot/src/share/vm/trace/traceDataTypes.hpp b/hotspot/src/share/vm/trace/traceDataTypes.hpp
index 5df07eb..31be058 100644
--- a/hotspot/src/share/vm/trace/traceDataTypes.hpp
+++ b/hotspot/src/share/vm/trace/traceDataTypes.hpp
@@ -32,7 +32,6 @@
 enum {
   CONTENT_TYPE_NONE             = 0,
   CONTENT_TYPE_CLASS            = 20,
-  CONTENT_TYPE_UTF8             = 21,
   CONTENT_TYPE_THREAD           = 22,
   CONTENT_TYPE_STACKTRACE       = 23,
   CONTENT_TYPE_BYTES            = 24,
diff --git a/hotspot/src/share/vm/trace/traceMacros.hpp b/hotspot/src/share/vm/trace/traceMacros.hpp
index a69acef..67f71f3 100644
--- a/hotspot/src/share/vm/trace/traceMacros.hpp
+++ b/hotspot/src/share/vm/trace/traceMacros.hpp
@@ -30,7 +30,6 @@
 #define EVENT_THREAD_EXIT(thread)
 #define EVENT_THREAD_DESTRUCT(thread)
 #define TRACE_KLASS_CREATION(k, p, t)
-#define TRACE_KLASS_DEFINITION(k, t)
 
 #define TRACE_INIT_KLASS_ID(k)
 #define TRACE_REMOVE_KLASS_ID(k)
diff --git a/hotspot/src/share/vm/trace/traceevents.xml b/hotspot/src/share/vm/trace/traceevents.xml
index 10671cf..f3b6447 100644
--- a/hotspot/src/share/vm/trace/traceevents.xml
+++ b/hotspot/src/share/vm/trace/traceevents.xml
@@ -76,111 +76,112 @@
 
   <event id="ThreadPark" path="java/thread_park" label="Java Thread Park"
           has_thread="true" has_stacktrace="true" is_instant="false">
-    <value type="CLASS" field="klass" label="Class Parked On"/>
+    <value type="CLASS" field="parkedClass" label="Class Parked On"/>
     <value type="MILLIS" field="timeout" label="Park Timeout"/>
-    <value type="ADDRESS" field="address" label="Address of Object Parked" relation="JAVA_MONITOR_ADDRESS"/>
+    <value type="ADDRESS" field="address" label="Address of Object Parked" relation="JavaMonitorAddress"/>
   </event>
 
   <event id="JavaMonitorEnter" path="java/monitor_enter" label="Java Monitor Blocked"
           has_thread="true" has_stacktrace="true" is_instant="false">
-    <value type="CLASS" field="klass" label="Monitor Class"/>
+    <value type="CLASS" field="monitorClass" label="Monitor Class"/>
     <value type="THREAD" field="previousOwner" label="Previous Monitor Owner"/>
-    <value type="ADDRESS" field="address" label="Monitor Address" relation="JAVA_MONITOR_ADDRESS"/>
+    <value type="ADDRESS" field="address" label="Monitor Address" relation="JavaMonitorAddress"/>
   </event>
 
   <event id="JavaMonitorWait" path="java/monitor_wait" label="Java Monitor Wait" description="Waiting on a Java monitor"
           has_thread="true" has_stacktrace="true" is_instant="false">
-    <value type="CLASS" field="klass" label="Monitor Class" description="Class of object waited on"/>
+    <value type="CLASS" field="monitorClass" label="Monitor Class" description="Class of object waited on"/>
     <value type="THREAD" field="notifier" label="Notifier Thread" description="Notifying Thread"/>
     <value type="MILLIS" field="timeout" label="Timeout" description="Maximum wait time"/>
     <value type="BOOLEAN" field="timedOut" label="Timed Out" description="Wait has been timed out"/>
-    <value type="ADDRESS" field="address" label="Monitor Address" description="Address of object waited on" relation="JAVA_MONITOR_ADDRESS"/>
+    <value type="ADDRESS" field="address" label="Monitor Address" description="Address of object waited on" relation="JavaMonitorAddress"/>
   </event>
 
   <event id="JavaMonitorInflate" path="java/monitor_inflate" label="Java Monitor Inflated"
          has_thread="true" has_stacktrace="true" is_instant="false">
-    <value type="CLASS" field="klass" label="Monitor Class"/>
-    <value type="ADDRESS" field="address" label="Monitor Address" relation="JAVA_MONITOR_ADDRESS"/>
-    <value type="INFLATECAUSE" field="cause" label="Cause" description="Cause of inflation"/>
+    <value type="CLASS" field="monitorClass" label="Monitor Class"/>
+    <value type="ADDRESS" field="address" label="Monitor Address" relation="JavaMonitorAddress"/>
+    <value type="INFLATECAUSE" field="cause" label="Monitor Inflation Cause" description="Cause of inflation"/>
   </event>
 
-  <event id="ReservedStackActivation" path="java/reserved_stack_activation" label="Reserved Stack Activation" description="Activation of Reserved Stack Area caused by stack overflow with ReservedStackAccess annotated method in call stack"
-          has_thread="true" has_stacktrace="true" is_instant="true">
+  <event id="ReservedStackActivation" path="vm/runtime/reserved_stack_activation" label="Reserved Stack Activation"
+         description="Activation of Reserved Stack Area caused by stack overflow with ReservedStackAccess annotated method in call stack"
+         has_thread="true" has_stacktrace="true" is_instant="true">
       <value type="METHOD" field="method" label="Java Method"/>
   </event>
 
   <event id="ClassLoad" path="vm/class/load" label="Class Load"
-          has_thread="true" has_stacktrace="true" is_instant="false">
+         has_thread="true" has_stacktrace="true" is_instant="false">
     <value type="CLASS" field="loadedClass" label="Loaded Class"/>
     <value type="CLASS" field="definingClassLoader" label="Defining Class Loader"/>
     <value type="CLASS" field="initiatingClassLoader" label="Initiating Class Loader"/>
   </event>
 
   <event id="ClassDefine" path="vm/class/define" label="Class Define"
-          has_thread="true" has_stacktrace="true" is_instant="true">
+         has_thread="true" has_stacktrace="true" is_instant="true">
     <value type="CLASS" field="definedClass" label="Defined Class"/>
     <value type="CLASS" field="definingClassLoader" label="Defining Class Loader"/>
   </event>
 
   <event id="ClassUnload" path="vm/class/unload" label="Class Unload"
-      has_thread="true" is_instant="true">
+         has_thread="true" is_instant="true">
     <value type="CLASS" field="unloadedClass" label="Unloaded Class"/>
     <value type="CLASS" field="definingClassLoader" label="Defining Class Loader"/>
   </event>
 
   <event id="IntFlagChanged" path="vm/flag/int_changed" label="Int Flag Changed"
-        is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="INTEGER" field="old_value" label="Old Value" />
-    <value type="INTEGER" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="INTEGER" field="oldValue" label="Old Value" />
+    <value type="INTEGER" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="UnsignedIntFlagChanged" path="vm/flag/uint_changed" label="Unsigned Int Flag Changed"
-        is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="UINT" field="old_value" label="Old Value" />
-    <value type="UINT" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="UINT" field="oldValue" label="Old Value" />
+    <value type="UINT" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="LongFlagChanged" path="vm/flag/long_changed" label="Long Flag Changed"
-        is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="LONG" field="old_value" label="Old Value" />
-    <value type="LONG" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="LONG" field="oldValue" label="Old Value" />
+    <value type="LONG" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="UnsignedLongFlagChanged" path="vm/flag/ulong_changed" label="Unsigned Long Flag Changed"
-        is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="ULONG" field="old_value" label="Old Value" />
-    <value type="ULONG" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="ULONG" field="oldValue" label="Old Value" />
+    <value type="ULONG" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="DoubleFlagChanged" path="vm/flag/double_changed" label="Double Flag Changed"
-       is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="DOUBLE" field="old_value" label="Old Value" />
-    <value type="DOUBLE" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="DOUBLE" field="oldValue" label="Old Value" />
+    <value type="DOUBLE" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="BooleanFlagChanged" path="vm/flag/boolean_changed" label="Boolean Flag Changed"
-       is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="BOOLEAN" field="old_value" label="Old Value" />
-    <value type="BOOLEAN" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="BOOLEAN" field="oldValue" label="Old Value" />
+    <value type="BOOLEAN" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
   <event id="StringFlagChanged" path="vm/flag/string_changed" label="String Flag Changed"
-       is_instant="true">
-    <value type="UTF8" field="name" label="Name" />
-    <value type="UTF8" field="old_value" label="Old Value" />
-    <value type="UTF8" field="new_value" label="New Value" />
+         is_instant="true">
+    <value type="STRING" field="name" label="Name" />
+    <value type="STRING" field="oldValue" label="Old Value" />
+    <value type="STRING" field="newValue" label="New Value" />
     <value type="FLAGVALUEORIGIN" field="origin" label="Origin" />
   </event>
 
@@ -200,7 +201,7 @@
   </struct>
 
   <event id="GCHeapSummary" path="vm/gc/heap/summary" label="Heap Summary" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="GCWHEN" field="when" label="When" />
     <structvalue type="VirtualSpace" field="heapSpace" label="Heap Space"/>
     <value type="BYTES64" field="heapUsed" label="Heap Used" description="Bytes allocated by objects in the heap"/>
@@ -213,7 +214,7 @@
   </struct>
 
   <event id="MetaspaceSummary" path="vm/gc/heap/metaspace_summary" label="Metaspace Summary" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="GCWHEN" field="when" label="When" />
     <value type="BYTES64" field="gcThreshold" label="GC Threshold" />
     <structvalue type="MetaspaceSizes" field="metaspace" label="Total"/>
@@ -244,7 +245,7 @@
   </event>
 
   <event id="MetaspaceChunkFreeListSummary" path="vm/gc/metaspace/chunk_free_list_summary" label="Metaspace Chunk Free List Summary" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="GCWHEN" field="when" label="When" />
     <value type="METADATATYPE" field="metadataType" label="Metadata Type" />
     <value type="ULONG" field="specializedChunks" label="Specialized Chunks" />
@@ -258,7 +259,7 @@
   </event>
 
   <event id="PSHeapSummary" path="vm/gc/heap/ps_summary" label="Parallel Scavenge Heap Summary" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="GCWHEN" field="when" label="When" />
 
     <structvalue type="VirtualSpace" field="oldSpace" label="Old Space"/>
@@ -271,7 +272,7 @@
   </event>
 
   <event id="G1HeapSummary" path="vm/gc/heap/g1_summary" label="G1 Heap Summary" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="GCWHEN" field="when" label="When" />
 
     <value type="BYTES64" field="edenUsedSize" label="Eden Used Size" />
@@ -280,53 +281,53 @@
     <value type="UINT" field="numberOfRegions" label="Number of Regions" />
   </event>
 
-  <event id="GCGarbageCollection" path="vm/gc/collector/garbage_collection" label="Garbage Collection"
+  <event id="GarbageCollection" path="vm/gc/collector/garbage_collection" label="Garbage Collection"
          description="Garbage collection performed by the JVM">
-    <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
+    <value type="UINT" field="gcId"  label="GC Identifier" relation="GcId" />
     <value type="GCNAME" field="name" label="Name" description="The name of the Garbage Collector" />
     <value type="GCCAUSE" field="cause" label="Cause" description="The reason for triggering this Garbage Collection" />
     <value type="TICKSPAN" field="sumOfPauses" label="Sum of Pauses" description="Sum of all the times in which Java execution was paused during the garbage collection" />
     <value type="TICKSPAN" field="longestPause" label="Longest Pause" description="Longest individual pause during the garbage collection" />
   </event>
 
-  <event id="GCParallelOld" path="vm/gc/collector/parold_garbage_collection" label="Parallel Old Garbage Collection"
+  <event id="ParallelOldGarbageCollection" path="vm/gc/collector/parold_garbage_collection" label="Parallel Old Garbage Collection"
          description="Extra information specific to Parallel Old Garbage Collections">
-    <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
+    <value type="UINT" field="gcId"  label="GC Identifier" relation="GcId" />
     <value type="ADDRESS" field="densePrefix" label="Dense Prefix" description="The address of the dense prefix, used when compacting" />
   </event>
 
-  <event id="GCYoungGarbageCollection" path="vm/gc/collector/young_garbage_collection" label="Young Garbage Collection"
+  <event id="YoungGarbageCollection" path="vm/gc/collector/young_garbage_collection" label="Young Garbage Collection"
          description="Extra information specific to Young Garbage Collections">
-    <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
+    <value type="UINT" field="gcId"  label="GC Identifier" relation="GcId" />
     <value type="UINT" field="tenuringThreshold" label="Tenuring Threshold" />
   </event>
 
-  <event id="GCOldGarbageCollection" path="vm/gc/collector/old_garbage_collection" label="Old Garbage Collection"
+  <event id="OldGarbageCollection" path="vm/gc/collector/old_garbage_collection" label="Old Garbage Collection"
          description="Extra information specific to Old Garbage Collections">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
   </event>
 
-  <event id="GCG1GarbageCollection" path="vm/gc/collector/g1_garbage_collection" label="G1 Garbage Collection"
+  <event id="G1GarbageCollection" path="vm/gc/collector/g1_garbage_collection" label="G1 Garbage Collection"
          description="Extra information specific to G1 Garbage Collections">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="G1YCTYPE" field="type" label="Type" />
   </event>
 
-  <event id="GCG1MMU" path="vm/gc/detailed/g1_mmu_info" label="G1 MMU Information" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="DOUBLE" field="timeSlice" label="Time slice used to calculate MMU"/>
-    <value type="DOUBLE" field="gcTime" label="Time spent on GC during last time slice"/>
-    <value type="DOUBLE" field="maxGcTime" label="Max time allowed to be spent on GC during last time slice"/>
+  <event id="G1MMU" path="vm/gc/detailed/g1_mmu_info" label="G1 MMU Information" is_instant="true">
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="DOUBLE" field="timeSlice" label="Time Slice" description="Time slice used to calculate MMU"/>
+    <value type="DOUBLE" field="gcTime" label="GC Time" description="Time spent on GC during last time slice"/>
+    <value type="DOUBLE" field="maxGcTime" label="Max GC Time" description="Max time allowed to be spent on GC during last time slice"/>
   </event>
 
-  <event id="EvacuationInfo" path="vm/gc/detailed/evacuation_info" label="Evacuation Information" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+  <event id="EvacuationInformation" path="vm/gc/detailed/evacuation_info" label="Evacuation Information" is_instant="true">
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="UINT" field="cSetRegions" label="Collection Set Regions"/>
     <value type="BYTES64" field="cSetUsedBefore" label="Collection Set Before" description="Memory usage before GC in the collection set regions"/>
     <value type="BYTES64" field="cSetUsedAfter" label="Collection Set After" description="Memory usage after GC in the collection set regions"/>
     <value type="UINT" field="allocationRegions" label="Allocation Regions" description="Regions chosen as allocation regions during evacuation (includes survivors and old space regions)"/>
-    <value type="BYTES64" field="allocRegionsUsedBefore" label="Alloc Regions Before" description="Memory usage before GC in allocation regions"/>
-    <value type="BYTES64" field="allocRegionsUsedAfter" label="Alloc Regions After" description="Memory usage after GC in allocation regions"/>
+    <value type="BYTES64" field="allocationRegionsUsedBefore" label="Allocation Regions Before" description="Memory usage before GC in allocation regions"/>
+    <value type="BYTES64" field="allocationRegionsUsedAfter" label="Allocation Regions After" description="Memory usage after GC in allocation regions"/>
     <value type="BYTES64" field="bytesCopied" label="Bytes Copied"/>
     <value type="UINT" field="regionsFreed" label="Regions Freed"/>
   </event>
@@ -334,7 +335,7 @@
   <event id="GCReferenceStatistics" path="vm/gc/reference/statistics"
          label="GC Reference Statistics" is_instant="true"
          description="Total count of processed references during GC">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="REFERENCETYPE" field="type" label="Type" />
     <value type="ULONG" field="count" label="Total Count" />
   </event>
@@ -347,14 +348,14 @@
   </struct>
 
   <event id="ObjectCountAfterGC" path="vm/gc/detailed/object_count_after_gc" is_instant="true" label="Object Count after GC">
-    <value type="UINT" field="gcId"  label="GC ID" relation="GC_ID" />
-    <value type="CLASS" field="class" label="Class" />
+    <value type="UINT" field="gcId"  label="GC Identifier" relation="GcId" />
+    <value type="CLASS" field="objectClass" label="Object Class" />
     <value type="LONG" field="count" label="Count" />
     <value type="BYTES64" field="totalSize" label="Total Size" />
   </event>
 
-  <struct id="G1EvacStats">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+  <struct id="G1EvacuationStatistics">
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="BYTES64" field="allocated" label="Allocated" description="Total memory allocated by PLABs"/>
     <value type="BYTES64" field="wasted" label="Wasted" description="Total memory wasted within PLABs due to alignment or refill"/>
     <value type="BYTES64" field="used" label="Used" description="Total memory occupied by objects within PLABs"/>
@@ -366,48 +367,48 @@
     <value type="BYTES64" field="failureWaste" label="Wasted (failure)" description="Total memory left unused in regions where evacuation failed"/>
   </struct>
 
-  <event id="GCG1EvacuationYoungStatistics" path="vm/gc/detailed/g1_evac_young_stats" label="G1 Evacuation Statistics for Young" is_instant="true"
-         description="Memory related evacuation statistics during GC for the young generation">
-    <structvalue type="G1EvacStats" field="stats" label="Evacuation statistics"/>
+  <event id="G1EvacuationYoungStatistics" path="vm/gc/detailed/g1_evac_young_stats" label="G1 Evacuation Statistics for Young"
+         is_instant="true" description="Memory related evacuation statistics during GC for the young generation">
+    <structvalue type="G1EvacuationStatistics" field="statistics" label="Evacuation Statistics"/>
   </event>
 
-  <event id="GCG1EvacuationOldStatistics" path="vm/gc/detailed/g1_evac_old_stats" label="G1 Evacuation Memory Statistics for Old" is_instant="true"
-         description="Memory related evacuation statistics during GC for the old generation">
-    <structvalue type="G1EvacStats" field="stats" label="Evacuation statistics"/>
+  <event id="G1EvacuationOldStatistics" path="vm/gc/detailed/g1_evac_old_stats" label="G1 Evacuation Memory Statistics for Old"
+         is_instant="true" description="Memory related evacuation statistics during GC for the old generation">
+    <structvalue type="G1EvacuationStatistics" field="statistics" label="Evacuation Statistics"/>
   </event>
 
-  <event id="GCG1BasicIHOP" path="vm/gc/detailed/g1_basic_ihop_status" label="G1 Basic IHOP statistics" is_instant="true"
-         description="Basic statistics related to current IHOP calculation">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+  <event id="G1BasicIHOP" path="vm/gc/detailed/g1_basic_ihop_status" label="G1 Basic IHOP statistics"
+         is_instant="true" description="Basic statistics related to current IHOP calculation">
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="BYTES64" field="threshold" label="Current IHOP threshold" description="Current IHOP threshold in bytes"/>
     <value type="PERCENTAGE" field="thresholdPercentage" label="Current IHOP threshold in percent" description="Current IHOP threshold in percent of old gen"/>
-    <value type="BYTES64" field="targetOccupancy" label="Target occupancy" description="Target old gen occupancy to reach at the start of mixed GC in bytes"/>
-    <value type="BYTES64" field="currentOccupancy" label="Current occupancy" description="Current old gen occupancy in bytes"/>
-    <value type="BYTES64" field="lastAllocationSize" label="Last mutator allocation size" description="Mutator allocation during mutator operation since last GC in bytes"/>
-    <value type="DOUBLE" field="lastAllocationDuration" label="Last mutator operation duration" description="Time the mutator ran since last GC in seconds"/>
-    <value type="DOUBLE" field="lastAllocationRate" label="Last mutator allocation rate" description="Allocation rate of the mutator since last GC in bytes/second"/>
-    <value type="DOUBLE" field="lastMarkingLength" label="Last mutator time from initial mark to first mixed GC" description="Last time from the end of the last initial mark to the first mixed GC in seconds"/>
+    <value type="BYTES64" field="targetOccupancy" label="Target Occupancy" description="Target old gen occupancy to reach at the start of mixed GC in bytes"/>
+    <value type="BYTES64" field="currentOccupancy" label="Current Occupancy" description="Current old generation occupancy in bytes"/>
+    <value type="BYTES64" field="lastAllocationSize" label="Last Mutator Allocation" description="Mutator allocation during mutator operation since last GC in bytes"/>
+    <value type="DOUBLE" field="lastAllocationDuration" label="Last Mutator Operation" description="Time the mutator ran since last GC in seconds"/>
+    <value type="DOUBLE" field="lastAllocationRate" label="Last Mutator Allocation Rate" description="Allocation rate of the mutator since last GC in bytes/second"/>
+    <value type="DOUBLE" field="lastMarkingLength" label="Last Marking Length" description="Last time from the end of the last initial mark to the first mixed GC in seconds"/>
   </event>
 
-  <event id="GCG1AdaptiveIHOP" path="vm/gc/detailed/g1_adaptive_ihop_status" label="G1 Adaptive IHOP statistics" is_instant="true"
-         description="Statistics related to current adaptive IHOP calculation">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="BYTES64" field="threshold" label="Current IHOP threshold" description="Current IHOP threshold in bytes"/>
-    <value type="PERCENTAGE" field="thresholdPercentage" label="Current IHOP threshold in percent" description="Current IHOP threshold in percent of the internal target occupancy"/>
-    <value type="BYTES64" field="internalTargetOccupancy" label="Target occupancy" description="Internal target old gen occupancy to reach at the start of mixed GC in bytes"/>
-    <value type="BYTES64" field="currentOccupancy" label="Current occupancy" description="Current old gen occupancy in bytes"/>
-    <value type="BYTES64" field="additionalBufferSize" label="Additional buffer size" description="Additional buffer size in bytes"/>
-    <value type="DOUBLE" field="predictedAllocationRate" label="Predicted mutator allocation rate" description="Current predicted allocation rate for the mutator in bytes/second"/>
-    <value type="DOUBLE" field="predictedMarkingLength" label="Predicted time from initial mark to first mixed GC" description="Current predicted time from the end of the last initial mark to the first mixed GC in seconds"/>
-    <value type="BOOLEAN" field="predictionActive" label="Prediction active" description="Indicates whether the adaptive IHOP prediction is active"/>
+  <event id="G1AdaptiveIHOP" path="vm/gc/detailed/g1_adaptive_ihop_status" label="G1 Adaptive IHOP statistics"
+         is_instant="true" description="Statistics related to current adaptive IHOP calculation">
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="BYTES64" field="threshold" label="Threshold" description="Current IHOP threshold in bytes"/>
+    <value type="PERCENTAGE" field="thresholdPercentage" label="Threshold Percentage" description="Current IHOP threshold in percent of the internal target occupancy"/>
+    <value type="BYTES64" field="internalTargetOccupancy" label="Target Occupancy" description="Internal target old generation occupancy to reach at the start of mixed GC in bytes"/>
+    <value type="BYTES64" field="currentOccupancy" label="Current Occupancy" description="Current old generation occupancy in bytes"/>
+    <value type="BYTES64" field="additionalBufferSize" label="Additional Buffer" description="Additional buffer size in bytes"/>
+    <value type="DOUBLE" field="predictedAllocationRate" label="Predicted Allocation Rate" description="Current predicted allocation rate for the mutator in bytes/second"/>
+    <value type="DOUBLE" field="predictedMarkingLength" label="Predicted Marking Length" description="Current predicted time from the end of the last initial mark to the first mixed GC in seconds"/>
+    <value type="BOOLEAN" field="predictionActive" label="Prediction Active" description="Indicates whether the adaptive IHOP prediction is active"/>
   </event>
 
   <!-- Promotion events, Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. -->
   <event id="PromoteObjectInNewPLAB" path="vm/gc/detailed/object_promotion_in_new_PLAB" label="Promotion in new PLAB"
-      description="Object survived scavenge and was copied to a new Promotion Local Allocation Buffer (PLAB). Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects." 
+         description="Object survived scavenge and was copied to a new Promotion Local Allocation Buffer (PLAB). Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects." 
          has_thread="true" has_stacktrace="false" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID" description="ID of GC during which the object was promoted"/>
-    <value type="CLASS" field="class" label="Class" description="Class of promoted object"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId" description="Identifier signifying GC during which the object was promoted"/>
+    <value type="CLASS" field="objectClass" label="Object Class" description="Class of promoted object"/>
     <value type="BYTES64" field="objectSize" label="Object Size" description="Size of promoted object"/>
     <value type="UINT" field="tenuringAge" label="Object Tenuring Age" description="Tenuring age of a surviving object before being copied. The tenuring age of an object is a value between 0-15 and is incremented each scavange the object survives. Newly allocated objects have tenuring age 0."/>
     <value type="BOOLEAN" field="tenured" label="Tenured" description="True if object was promoted to Old space, otherwise the object was aged and copied to a Survivor space"/>
@@ -415,10 +416,10 @@
   </event>
   
   <event id="PromoteObjectOutsidePLAB" path="vm/gc/detailed/object_promotion_outside_PLAB" label="Promotion outside PLAB"
-      description="Object survived scavenge and was copied directly to the heap. Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects." 
+         description="Object survived scavenge and was copied directly to the heap. Supported GCs are Parallel Scavange, G1 and CMS with Parallel New. Due to promotion being done in parallel an object might be reported multiple times as the GC threads race to copy all objects." 
          has_thread="true" has_stacktrace="false" is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID" description="ID of GC during which the object was promoted"/>
-    <value type="CLASS" field="class" label="Class" description="Class of promoted object"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId" description="Identifier signifying GC during which the object was promoted"/>
+    <value type="CLASS" field="objectClass" label="Object Class" description="Class of promoted object"/>
     <value type="BYTES64" field="objectSize" label="Object Size" description="Size of promoted object"/>
     <value type="UINT" field="tenuringAge" label="Object Tenuring Age" description="Tenuring age of a surviving object before being copied. The tenuring age of an object is a value between 0-15 and is incremented each scavange the object survives. Newly allocated objects have tenuring age 0."/>
     <value type="BOOLEAN" field="tenured" label="Tenured" description="True if object was promoted to Old space, otherwise the object was aged and copied to a Survivor space"/>
@@ -426,81 +427,76 @@
 
   <event id="PromotionFailed" path="vm/gc/detailed/promotion_failed" label="Promotion Failed" is_instant="true"
          description="Promotion of an object failed">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <structvalue type="CopyFailed" field="data" label="Data"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <structvalue type="CopyFailed" field="promotionFailed" label="Promotion Failed Data"/>
     <value type="THREAD" field="thread" label="Running thread"/>
   </event>
 
   <event id="EvacuationFailed" path="vm/gc/detailed/evacuation_failed" label="Evacuation Failed" is_instant="true"
          description="Evacuation of an object failed">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <structvalue type="CopyFailed" field="data" label="Data"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <structvalue type="CopyFailed" field="evacuationFailed" label="Evacuation Failed Data"/>
   </event>
 
   <event id="ConcurrentModeFailure" path="vm/gc/detailed/concurrent_mode_failure" label="Concurrent Mode Failure"
          is_instant="true" description="Concurrent Mode failed">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
   </event>
 
   <event id="GCPhasePause" path="vm/gc/phases/pause" label="GC Phase Pause" has_thread="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="UTF8" field="name" label="Name" />
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="STRING" field="name" label="Name" />
   </event>
 
   <event id="GCPhasePauseLevel1" path="vm/gc/phases/pause_level_1" label="GC Phase Pause Level 1" has_thread="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="UTF8" field="name" label="Name" />
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="STRING" field="name" label="Name" />
   </event>
 
   <event id="GCPhasePauseLevel2" path="vm/gc/phases/pause_level_2" label="GC Phase Pause Level 2" has_thread="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="UTF8" field="name" label="Name" />
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="STRING" field="name" label="Name" />
   </event>
 
   <event id="GCPhasePauseLevel3" path="vm/gc/phases/pause_level_3" label="GC Phase Pause Level 3" has_thread="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="UTF8" field="name" label="Name" />
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="STRING" field="name" label="Name" />
   </event>
 
   <event id="GCPhaseConcurrent" path="vm/gc/phases/concurrent" label="GC Phase Concurrent" has_thread="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
-    <value type="UTF8" field="name" label="Name" />
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
+    <value type="STRING" field="name" label="Name" />
   </event>
 
   <event id="AllocationRequiringGC" path="vm/gc/detailed/allocation_requiring_gc" label="Allocation Requiring GC"
          has_thread="true" has_stacktrace="true"  is_instant="true">
-    <value type="UINT" field="gcId"  label="Pending GC ID" relation="GC_ID" />
+    <value type="UINT" field="gcId"  label="Pending GC Identifier" relation="GcId" />
     <value type="BYTES64" field="size" label="Allocation Size" />
   </event>
 
   <event id="TenuringDistribution" path="vm/gc/detailed/tenuring_distribution" label="Tenuring Distribution"
          is_instant="true">
-    <value type="UINT" field="gcId" label="GC ID" relation="GC_ID"/>
+    <value type="UINT" field="gcId" label="GC Identifier" relation="GcId"/>
     <value type="UINT" field="age" label="Age" />
     <value type="BYTES64" field="size" label="Size" />
   </event>
 
   <event id="G1HeapRegionTypeChange" path="vm/gc/detailed/g1_heap_region_type_change" label="G1 Heap Region Type Change"
-         description="Information about a G1 heap region type change." is_instant="true">
+         description="Information about a G1 heap region type change" is_instant="true">
     <value type="UINT" field="index" label="Index" />
-    <value type="G1HEAPREGIONTYPE" field="from" label="From Type" />
-    <value type="G1HEAPREGIONTYPE" field="to" label="To Type" />
+    <value type="G1HEAPREGIONTYPE" field="from" label="From" />
+    <value type="G1HEAPREGIONTYPE" field="to" label="To" />
     <value type="ADDRESS" field="start" label="Start" />
     <value type="BYTES64" field="used" label="Used" />
-    <value type="UINT" field="allocContext" label="Allocation Context" />
-  </event>
-
-  <event id="VMError" path="vm/runtime/vm_error" label="VM Error"
-         description="VM shutdown due to an error" has_stacktrace="true" has_thread="true">
-    <value type="BOOLEAN" field="out_of_java_memory" label="Java Out Of Memory"/>
+    <value type="UINT" field="allocationContext" label="Allocation Context" />
   </event>
 
   <!-- Compiler events -->
 
   <event id="Compilation" path="vm/compiler/compilation" label="Compilation"
-       has_thread="true" is_requestable="false" is_constant="false">
+         has_thread="true" is_requestable="false" is_constant="false">
     <value type="METHOD" field="method" label="Java Method"/>
-    <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
+    <value type="UINT" field="compileId" label="Compilation Identifier" relation="CompileId"/>
     <value type="USHORT" field="compileLevel" label="Compilation Level"/>
     <value type="BOOLEAN" field="succeded" label="Succeeded"/>
     <value type="BOOLEAN" field="isOsr" label="On Stack Replacement"/>
@@ -509,39 +505,39 @@
   </event>
 
   <event id="CompilerPhase" path="vm/compiler/phase" label="Compiler Phase"
-          has_thread="true" is_requestable="false" is_constant="false">
+         has_thread="true" is_requestable="false" is_constant="false">
     <value type="COMPILERPHASETYPE" field="phase" label="Compile Phase"/>
-    <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
+    <value type="UINT" field="compileId" label="Compilation Identifier" relation="CompileId"/>
     <value type="USHORT" field="phaseLevel" label="Phase Level"/>
   </event>
 
-  <event id="CompilerFailure" path="vm/compiler/failure" label="Compilation Failure"
-          has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
-    <value type="UTF8" field="failure" label="Message"/>
-    <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
+  <event id="CompilationFailure" path="vm/compiler/failure" label="Compilation Failure"
+         has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
+    <value type="STRING" field="failureMessage" label="Failure Message"/>
+    <value type="UINT" field="compileId" label="Compilation Identifier" relation="CompileId"/>
   </event>
 
-  <struct id="CiMethod">
-    <value type="UTF8" field="class" label="Class name"/>
-    <value type="UTF8" field="name" label="Method name"/>
-    <value type="UTF8" field="signature" label="Method signature"/>
+  <struct id="CalleeMethod">
+    <value type="STRING" field="type" label="Class"/>
+    <value type="STRING" field="name" label="Method Name"/>
+    <value type="STRING" field="descriptor" label="Method Descriptor"/>
   </struct>
 
   <event id="CompilerInlining" path="vm/compiler/optimization/inlining" label="Method Inlining"
-       has_thread="true" is_instant="true">
-    <value type="UINT" field="compileID" label="Compilation ID" relation="COMP_ID"/>
+         has_thread="true" is_instant="true">
+    <value type="UINT" field="compileId" label="Compilation Identifier" relation="CompileId"/>
     <value type="METHOD" field="caller" label="Caller Method"/>
-    <structvalue type="CiMethod" field="callee" label="Callee Method"/>
+    <structvalue type="CalleeMethod" field="callee" label="Callee Method"/>
     <value type="BOOLEAN" field="succeeded" label="Succeeded"/>
-    <value type="UTF8" field="message" label="Message"/>
+    <value type="STRING" field="message" label="Message"/>
     <value type="INTEGER" field="bci" label="Byte Code Index"/>
   </event>
 
   <!-- Code sweeper events -->
 
   <event id="SweepCodeCache" path="vm/code_sweeper/sweep" label="Sweep Code Cache"
-     has_thread="true" is_requestable="false" is_constant="false">
-    <value type="INTEGER" field="sweepIndex" label="Sweep Index" relation="SWEEP_ID"/>
+         has_thread="true" is_requestable="false" is_constant="false">
+    <value type="INTEGER" field="sweepId" label="Sweep Identifier" relation="SweepId"/>
     <value type="UINT" field="sweptCount" label="Methods Swept"/>
     <value type="UINT" field="flushedCount" label="Methods Flushed"/>
     <value type="UINT" field="zombifiedCount" label="Methods Zombified"/>
@@ -550,7 +546,7 @@
   <!-- Code cache events -->
 
   <event id="CodeCacheFull" path="vm/code_cache/full" label="Code Cache Full"
-       has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
+         has_thread="true" is_requestable="false" is_constant="false" is_instant="true">
     <value type="CODEBLOBTYPE" field="codeBlobType" label="Code Heap"/>
     <value type="ADDRESS" field="startAddress" label="Start Address"/>
     <value type="ADDRESS" field="commitedTopAddress" label="Commited Top"/>
@@ -564,14 +560,14 @@
 
   <event id="SafepointBegin" path="vm/runtime/safepoint/begin" label="Safepoint Begin"
          description="Safepointing begin" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
     <value type="INTEGER" field="totalThreadCount" label="Total Threads" description="The total number of threads at the start of safe point"/>
     <value type="INTEGER" field="jniCriticalThreadCount" label="JNI Critical Threads" description="The number of threads in JNI critical sections"/>
   </event>
 
-  <event id="SafepointStateSync" path="vm/runtime/safepoint/statesync" label="Safepoint State Sync"
+  <event id="SafepointStateSynchronization" path="vm/runtime/safepoint/statesync" label="Safepoint State Synchronization"
          description="Synchronize run state of threads" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
     <value type="INTEGER" field="initialThreadCount" label="Initial Threads" description="The number of threads running at the beginning of state check"/>
     <value type="INTEGER" field="runningThreadCount" label="Running Threads" description="The number of threads still running"/>
     <value type="INTEGER" field="iterations" label="Iterations" description="Number of state check iterations"/>
@@ -579,46 +575,46 @@
 
   <event id="SafepointWaitBlocked" path="vm/runtime/safepoint/waitblocked" label="Safepoint Wait Blocked"
          description="Safepointing begin waiting on running threads to block" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
     <value type="INTEGER" field="runningThreadCount" label="Running Threads" description="The number running of threads wait for safe point"/>
   </event>
 
   <event id="SafepointCleanup" path="vm/runtime/safepoint/cleanup" label="Safepoint Cleanup"
          description="Safepointing begin running cleanup tasks" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
   </event>
 
   <event id="SafepointCleanupTask" path="vm/runtime/safepoint/cleanuptask" label="Safepoint Cleanup Task"
          description="Safepointing begin running cleanup tasks" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
-    <value type="UTF8" field="name" label="Task Name" description="The task name"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
+    <value type="STRING" field="name" label="Task Name" description="The task name"/>
   </event>
 
   <event id="SafepointEnd" path="vm/runtime/safepoint/end" label="Safepoint End"
          description="Safepointing end" has_thread="true">
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" relation="SAFEPOINT_ID"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" relation="SafepointId"/>
   </event>
 
   <event id="ExecuteVMOperation" path="vm/runtime/execute_vm_operation" label="VM Operation"
-      description="Execution of a VM Operation" has_thread="true">
+         description="Execution of a VM Operation" has_thread="true">
     <value type="VMOPERATIONTYPE" field="operation" label="Operation" />
-    <value type="BOOLEAN" field="safepoint" label="At Safepoint" description="If the operation occured at a safepoint."/>
-    <value type="BOOLEAN" field="blocking" label="Caller Blocked" description="If the calling thread was blocked until the operation was complete."/>
-    <value type="THREAD" field="caller" label="Caller" transition="FROM" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown."/>
-    <value type="INTEGER" field="safepointId" label="Safepoint ID" description="The safepoint (if any) under which this operation was completed." relation="SAFEPOINT_ID"/>
+    <value type="BOOLEAN" field="safepoint" label="At Safepoint" description="If the operation occured at a safepoint"/>
+    <value type="BOOLEAN" field="blocking" label="Caller Blocked" description="If the calling thread was blocked until the operation was complete"/>
+    <value type="THREAD" field="caller" label="Caller" transition="FROM" description="Thread requesting operation. If non-blocking, will be set to 0 indicating thread is unknown"/>
+    <value type="INTEGER" field="safepointId" label="Safepoint Identifier" description="The safepoint (if any) under which this operation was completed" relation="SafepointId"/>
   </event>
 
   <!-- Allocation events -->
-  <event id="AllocObjectInNewTLAB" path="java/object_alloc_in_new_TLAB" label="Allocation in new TLAB"
-      description="Allocation in new Thread Local Allocation Buffer" has_thread="true" has_stacktrace="true" is_instant="true">
-    <value type="CLASS" field="class" label="Class" description="Class of allocated object"/>
+  <event id="ObjectAllocationInNewTLAB" path="java/object_alloc_in_new_TLAB" label="Allocation in new TLAB"
+         description="Allocation in new Thread Local Allocation Buffer" has_thread="true" has_stacktrace="true" is_instant="true">
+    <value type="CLASS" field="objectClass" label="Object Class" description="Class of allocated object"/>
     <value type="BYTES64" field="allocationSize" label="Allocation Size"/>
     <value type="BYTES64" field="tlabSize" label="TLAB Size"/>
   </event>
 
-  <event id="AllocObjectOutsideTLAB" path="java/object_alloc_outside_TLAB" label="Allocation outside TLAB"
-      description="Allocation outside Thread Local Allocation Buffers" has_thread="true" has_stacktrace="true" is_instant="true">
-    <value type="CLASS" field="class" label="Class" description="Class of allocated object"/>
+  <event id="ObjectAllocationOutsideTLAB" path="java/object_alloc_outside_TLAB" label="Allocation outside TLAB"
+         description="Allocation outside Thread Local Allocation Buffers" has_thread="true" has_stacktrace="true" is_instant="true">
+    <value type="CLASS" field="objectClass" label="Object Class" description="Class of allocated object"/>
     <value type="BYTES64" field="allocationSize" label="Allocation Size"/>
   </event>
 </events>
diff --git a/hotspot/src/share/vm/trace/tracerelationdecls.xml b/hotspot/src/share/vm/trace/tracerelationdecls.xml
index 06a83aa..472c5c6 100644
--- a/hotspot/src/share/vm/trace/tracerelationdecls.xml
+++ b/hotspot/src/share/vm/trace/tracerelationdecls.xml
@@ -27,9 +27,9 @@
 <!DOCTYPE relation_decls SYSTEM "trace.dtd">
 
 <relation_decls>
-  <relation_decl id="GC_ID" uri="vm/gc/id"/>
-  <relation_decl id="COMP_ID" uri="vm/compiler/id"/>
-  <relation_decl id="SWEEP_ID" uri="vm/code_sweeper/id"/>
-  <relation_decl id="JAVA_MONITOR_ADDRESS" uri="java/monitor/address"/>
-  <relation_decl id="SAFEPOINT_ID" uri="vm/runtime/safepoint/id"/>
+  <relation_decl id="GcId" uri="vm/gc/id"/>
+  <relation_decl id="CompileId" uri="vm/compiler/id"/>
+  <relation_decl id="SweepId" uri="vm/code_sweeper/id"/>
+  <relation_decl id="JavaMonitorAddress" uri="java/monitor/address"/>
+  <relation_decl id="SafepointId" uri="vm/runtime/safepoint/id"/>
 </relation_decls>
diff --git a/hotspot/src/share/vm/trace/tracetypes.xml b/hotspot/src/share/vm/trace/tracetypes.xml
index c4c3ddb..003b901 100644
--- a/hotspot/src/share/vm/trace/tracetypes.xml
+++ b/hotspot/src/share/vm/trace/tracetypes.xml
@@ -43,7 +43,7 @@
 Example: (GcMode)
 
 <content_type id="GCMode" hr_name="GC mode" type="U1" jvm_type="GCMODE">
-  <value type="UTF8" field="desc" description="Description"/>
+  <value type="STRING" field="desc" description="Description"/>
 </content_type>
 
 This creates a content type CONTENT_TYPE_GCMODE
@@ -61,131 +61,131 @@
   <content_types>
     <content_type id="Thread" hr_name="Thread"
                   type="U8" builtin_type="THREAD">
-      <value type="UTF8" field="osName" label="OS Thread Name"/>
-      <value type="LONG" field="osThreadID" label="OS Thread ID"/>
-      <value type="UTF8" field="javaName" label="Java Lang Thread Name"/>
-      <value type="LONG" field="javaThreadID" label="Java Lang Thread ID"/>
+      <value type="STRING" field="osName" label="OS Thread Name"/>
+      <value type="LONG" field="osThreadId" label="OS Thread Id"/>
+      <value type="STRING" field="javaName" label="Java Thread Name"/>
+      <value type="LONG" field="javaThreadId" label="Java Thread Id"/>
       <value type="THREADGROUP" field="group" label="Java Thread Group"/>
     </content_type>
 
     <content_type id="ThreadGroup" hr_name="Thread group"
                   type="U8" jvm_type="THREADGROUP">
       <value type="THREADGROUP" field="parent" label="Parent"/>
-      <value type="UTF8" field="name" label="Name"/>
+      <value type="STRING" field="name" label="Name"/>
     </content_type>
 
     <content_type id="Class" hr_name="Java class"
                   type="U8" builtin_type="CLASS">
-      <value type="CLASS" field="loaderClass" label="ClassLoader"/>
+      <value type="CLASS" field="classLoaderType" label="Class Loader"/>
       <value type="SYMBOL" field="name" label="Name"/>
       <value type="PACKAGE" field="package" label="Package"/>
-      <value type="SHORT" field="modifiers" label="Access modifiers"/>
+      <value type="INTEGER" field="modifiers" label="Access Modifiers"/>
     </content_type>
 
     <content_type id="Method" hr_name="Java method"
                   type="U8" jvm_type="METHOD">
-      <value type="CLASS" field="class" label="Class"/>
+      <value type="CLASS" field="type" label="Type"/>
       <value type="SYMBOL" field="name" label="Name"/>
-      <value type="SYMBOL" field="signature" label="Signature"/>
-      <value type="SHORT" field="modifiers" label="Access modifiers"/>
+      <value type="SYMBOL" field="descriptor" label="Descriptor"/>
+      <value type="INTEGER" field="modifiers" label="Access Modifiers"/>
       <value type="BOOLEAN" field="hidden" label="Hidden"/>
     </content_type>
 
-    <content_type id="UTFConstant" hr_name="UTF constant"
+    <content_type id="Symbol" hr_name="Symbol"
                   type="U8" jvm_type="SYMBOL">
-      <value type="UTF8" field="utf8" label="UTF8 data"/>
+      <value type="STRING" field="string" label="String"/>
     </content_type>
 
     <content_type id="ThreadState" hr_name="Java Thread State"
                   type="U8" jvm_type="THREADSTATE">
-      <value type="UTF8" field="name" label="Name"/>
+      <value type="STRING" field="name" label="Name"/>
     </content_type>
 
     <content_type id="GCName" hr_name="GC Name"
                   type="U8" jvm_type="GCNAME">
-      <value type="UTF8" field="name" label="name" />
+      <value type="STRING" field="name" label="Name" />
     </content_type>
 
     <content_type id="GCCause" hr_name="GC Cause"
                   type="U8" jvm_type="GCCAUSE">
-      <value type="UTF8" field="cause" label="cause" />
+      <value type="STRING" field="cause" label="Cause" />
     </content_type>
 
     <content_type id="GCWhen" hr_name="GC When"
                   type="U8" jvm_type="GCWHEN">
-      <value type="UTF8" field="when" label="when" />
+      <value type="STRING" field="when" label="When" />
     </content_type>
 
     <content_type id="G1HeapRegionType" hr_name="G1 Heap Region Type"
                   type="U8" jvm_type="G1HEAPREGIONTYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
     
     <content_type id="G1YCType" hr_name="G1 YC Type"
                   type="U8" jvm_type="G1YCTYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
     <content_type id="GCThresholdUpdater" hr_name="GC Treshold Updater"
                   type="U8" jvm_type="GCTHRESHOLDUPDATER">
-      <value type="UTF8" field="updater" label="updater" />
+      <value type="STRING" field="updater" label="Updater" />
     </content_type>
 
     <content_type id="ReferenceType" hr_name="Reference Type"
                   type="U8" jvm_type="REFERENCETYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
     <content_type id="MetadataType" hr_name="Metadata Type"
                   type="U8" jvm_type="METADATATYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
     <content_type id="MetaspaceObjectType" hr_name="Metaspace Object Type"
                   type="U8" jvm_type="METASPACEOBJTYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
-    <content_type id="NARROW_OOP_MODE" hr_name="Narrow Oop Mode"
+    <content_type id="NarrowOopMode" hr_name="Narrow oop Mode"
                   type="U8" jvm_type="NARROWOOPMODE">
-      <value type="UTF8" field="mode" label="mode" />
+      <value type="STRING" field="mode" label="Mode" />
     </content_type>
 
     <content_type id="VMOperationType" hr_name="VM Operation Type"
                   type="U8" jvm_type="VMOPERATIONTYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
     <content_type id="CompilerPhaseType" hr_name="Compiler Phase Type"
                   type="U8" jvm_type="COMPILERPHASETYPE">
-      <value type="UTF8" field="phase" label="phase" />
+      <value type="STRING" field="phase" label="Phase" />
     </content_type>
 
     <content_type id="FlagValueOrigin" hr_name="Flag Value Origin"
                   type="U8" jvm_type="FLAGVALUEORIGIN">
-      <value type="UTF8" field="origin" label="origin" />
+      <value type="STRING" field="origin" label="Origin" />
     </content_type>
 
     <content_type id="CodeBlobType" hr_name="Code Blob Type"
                   type="U8" jvm_type="CODEBLOBTYPE">
-      <value type="UTF8" field="type" label="type" />
+      <value type="STRING" field="type" label="Type" />
     </content_type>
 
     <content_type id="InflateCause" hr_name="Inflation Cause"
                   type="U8" jvm_type="INFLATECAUSE">
-      <value type="UTF8" field="cause" label="cause" />
+      <value type="STRING" field="cause" label="Cause" />
     </content_type>
 
     <content_type id="Module" hr_name="Module"
-              type="U8" jvm_type="MODULE">
+                  type="U8" jvm_type="MODULE">
       <value type="SYMBOL" field="name" label="Name"/>
       <value type="SYMBOL" field="version" label="Version"/>
       <value type="SYMBOL" field="location" label="Location"/>
-      <value type="CLASS" field="classLoader" label="ClassLoader"/>
+      <value type="CLASS" field="classLoader" label="Class Loader"/>
     </content_type>
 
     <content_type id="Package" hr_name="Package"
-              type="U8" jvm_type="PACKAGE">
+                  type="U8" jvm_type="PACKAGE">
       <value type="SYMBOL" field="name" label="Name"/>
       <value type="MODULE" field="module" label="Module"/>
       <value type="BOOLEAN" field="exported" label="Exported"/>
@@ -288,8 +288,9 @@
     <primary_type symbol="PERCENTAGE" datatype="FLOAT" contenttype="PERCENTAGE"
                   type="float" sizeop="sizeof(float)"/>
 
-    <!-- UTF8-encoded string, max length Integer.MAX_VALUE -->
-    <primary_type symbol="UTF8" datatype="UTF8" contenttype="NONE"
+    <!-- STRING is a virtual type - depending on encoding
+         it will have polymorphic content -->
+    <primary_type symbol="STRING" datatype="STRING" contenttype="NONE"
                   type="const char*" sizeop="sizeof_utf(%)"/>
 
     <!-- Symbol* constant. Note that this may currently ONLY be used by
@@ -306,7 +307,7 @@
                   type="const ModuleEntry*" sizeop="sizeof(u8)"/>
 
     <primary_type symbol="PACKAGE" datatype="U8" contenttype="PACKAGE"
-              type="const PackageEntry*" sizeop="sizeof(u8)"/>
+                  type="const PackageEntry*" sizeop="sizeof(u8)"/>
 
     <!-- A Method *. The method is marked as "used" and will eventually be
          written into the recording constant pool. -->
@@ -325,8 +326,7 @@
     <!-- Threadgroup THIS TYPE MAY NOT BE USED IN NORMAL EVENTS (ATM). Only
           for thread constant pool // KK TODO: u8 should be ObjectP -->
     <primary_type symbol="THREADGROUP" datatype="U8" contenttype="THREADGROUP"
-                  type="u8"
-                  sizeop="sizeof(u8)"/>
+                  type="u8" sizeop="sizeof(u8)"/>
 
     <!-- FRAMETYPE enum -->
     <primary_type symbol="FRAMETYPE" datatype="U8" contenttype="FRAMETYPE"
@@ -361,39 +361,39 @@
                   type="u8" sizeop="sizeof(u8)" />
 
     <!-- REFERENCETYPE -->
-    <primary_type symbol="REFERENCETYPE" datatype="U8"
-                  contenttype="REFERENCETYPE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="REFERENCETYPE" datatype="U8" contenttype="REFERENCETYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- METADATATYPE -->
-    <primary_type symbol="METADATATYPE" datatype="U8"
-                  contenttype="METADATATYPE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="METADATATYPE" datatype="U8" contenttype="METADATATYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- METADATAOBJTYPE -->
-    <primary_type symbol="METASPACEOBJTYPE" datatype="U8"
-                  contenttype="METASPACEOBJTYPE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="METASPACEOBJTYPE" datatype="U8" contenttype="METASPACEOBJTYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- NARROWOOPMODE -->
-    <primary_type symbol="NARROWOOPMODE" datatype="U8"
-                  contenttype="NARROWOOPMODE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="NARROWOOPMODE" datatype="U8" contenttype="NARROWOOPMODE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- COMPILERPHASETYPE -->
-    <primary_type symbol="COMPILERPHASETYPE" datatype="U8"
-                  contenttype="COMPILERPHASETYPE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="COMPILERPHASETYPE" datatype="U8" contenttype="COMPILERPHASETYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- VMOPERATIONTYPE -->
     <primary_type symbol="VMOPERATIONTYPE" datatype="U8" contenttype="VMOPERATIONTYPE"
                   type="u8" sizeop="sizeof(u8)" />
                   
     <!-- FLAGVALUEORIGIN -->
-    <primary_type symbol="FLAGVALUEORIGIN" datatype="U8"
-                  contenttype="FLAGVALUEORIGIN" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="FLAGVALUEORIGIN" datatype="U8" contenttype="FLAGVALUEORIGIN"
+                  type="u8" sizeop="sizeof(u8)" />
                   
     <!-- CODEBLOBTYPE -->
-    <primary_type symbol="CODEBLOBTYPE" datatype="U8"
-                  contenttype="CODEBLOBTYPE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="CODEBLOBTYPE" datatype="U8" contenttype="CODEBLOBTYPE"
+                  type="u8" sizeop="sizeof(u8)" />
 
     <!-- INFLATECAUSE -->
-    <primary_type symbol="INFLATECAUSE" datatype="U8"
-                  contenttype="INFLATECAUSE" type="u8" sizeop="sizeof(u8)" />
+    <primary_type symbol="INFLATECAUSE" datatype="U8" contenttype="INFLATECAUSE"
+                  type="u8" sizeop="sizeof(u8)" />
   </primary_types>
 </types>
diff --git a/hotspot/src/share/vm/utilities/accessFlags.cpp b/hotspot/src/share/vm/utilities/accessFlags.cpp
index 9cc0f1b..17c47b3 100644
--- a/hotspot/src/share/vm/utilities/accessFlags.cpp
+++ b/hotspot/src/share/vm/utilities/accessFlags.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "utilities/accessFlags.hpp"
 
 void AccessFlags::atomic_set_bits(jint bits) {
diff --git a/hotspot/src/share/vm/utilities/bitMap.cpp b/hotspot/src/share/vm/utilities/bitMap.cpp
index 12758ab..b0b7d56 100644
--- a/hotspot/src/share/vm/utilities/bitMap.cpp
+++ b/hotspot/src/share/vm/utilities/bitMap.cpp
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/copy.hpp"
 #include "utilities/debug.hpp"
@@ -376,77 +376,99 @@
   par_put_range_within_word(bit_index(end_full_word), end, value);
 }
 
+inline bm_word_t tail_mask(idx_t tail_bits) {
+  assert(tail_bits != 0, "precondition"); // Works, but shouldn't be called.
+  assert(tail_bits < (idx_t)BitsPerWord, "precondition");
+  return (bm_word_t(1) << tail_bits) - 1;
+}
+
+// Get the low tail_bits of value, which is the last partial word of a map.
+inline bm_word_t tail_of_map(bm_word_t value, idx_t tail_bits) {
+  return value & tail_mask(tail_bits);
+}
+
+// Compute the new last word of a map with a non-aligned length.
+// new_value has the new trailing bits of the map in the low tail_bits.
+// old_value is the last word of the map, including bits beyond the end.
+// Returns old_value with the low tail_bits replaced by the corresponding
+// bits in new_value.
+inline bm_word_t merge_tail_of_map(bm_word_t new_value,
+                                   bm_word_t old_value,
+                                   idx_t tail_bits) {
+  bm_word_t mask = tail_mask(tail_bits);
+  return (new_value & mask) | (old_value & ~mask);
+}
+
 bool BitMap::contains(const BitMap& other) const {
   assert(size() == other.size(), "must have same size");
   const bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size_in_words(); index++) {
-    bm_word_t word_union = dest_map[index] | other_map[index];
-    // If this has more bits set than dest_map[index], then other is not a
-    // subset.
-    if (word_union != dest_map[index]) return false;
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    // false if other bitmap has bits set which are clear in this bitmap.
+    if ((~dest_map[index] & other_map[index]) != 0) return false;
   }
-  return true;
+  idx_t rest = bit_in_word(size());
+  // true unless there is a partial-word tail in which the other
+  // bitmap has bits set which are clear in this bitmap.
+  return (rest == 0) || tail_of_map(~dest_map[limit] & other_map[limit], rest) == 0;
 }
 
 bool BitMap::intersects(const BitMap& other) const {
   assert(size() == other.size(), "must have same size");
   const bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size_in_words(); index++) {
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
     if ((dest_map[index] & other_map[index]) != 0) return true;
   }
-  // Otherwise, no intersection.
-  return false;
+  idx_t rest = bit_in_word(size());
+  // false unless there is a partial-word tail with non-empty intersection.
+  return (rest > 0) && tail_of_map(dest_map[limit] & other_map[limit], rest) != 0;
 }
 
 void BitMap::set_union(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size_in_words(); index++) {
-    dest_map[index] = dest_map[index] | other_map[index];
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    dest_map[index] |= other_map[index];
+  }
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    dest_map[limit] = merge_tail_of_map(orig | other_map[limit], orig, rest);
   }
 }
 
-
 void BitMap::set_difference(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size_in_words(); index++) {
-    dest_map[index] = dest_map[index] & ~(other_map[index]);
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    dest_map[index] &= ~other_map[index];
+  }
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    dest_map[limit] = merge_tail_of_map(orig & ~other_map[limit], orig, rest);
   }
 }
 
-
 void BitMap::set_intersection(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
-    dest_map[index]  = dest_map[index] & other_map[index];
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    dest_map[index] &= other_map[index];
   }
-}
-
-
-void BitMap::set_intersection_at_offset(const BitMap& other, idx_t offset) {
-  assert(other.size() >= offset, "offset not in range");
-  assert(other.size() - offset >= size(), "other not large enough");
-  // XXX Ideally, we would remove this restriction.
-  guarantee((offset % (sizeof(bm_word_t) * BitsPerByte)) == 0,
-            "Only handle aligned cases so far.");
-  bm_word_t* dest_map = map();
-  const bm_word_t* other_map = other.map();
-  idx_t offset_word_ind = word_index(offset);
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
-    dest_map[index] = dest_map[index] & other_map[offset_word_ind + index];
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    dest_map[limit] = merge_tail_of_map(orig & other_map[limit], orig, rest);
   }
 }
 
@@ -455,88 +477,111 @@
   bool changed = false;
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
-    idx_t temp = dest_map[index] | other_map[index];
-    changed = changed || (temp != dest_map[index]);
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    bm_word_t orig = dest_map[index];
+    bm_word_t temp = orig | other_map[index];
+    changed = changed || (temp != orig);
     dest_map[index] = temp;
   }
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    bm_word_t temp = merge_tail_of_map(orig | other_map[limit], orig, rest);
+    changed = changed || (temp != orig);
+    dest_map[limit] = temp;
+  }
   return changed;
 }
 
-
 bool BitMap::set_difference_with_result(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bool changed = false;
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
-    bm_word_t temp = dest_map[index] & ~(other_map[index]);
-    changed = changed || (temp != dest_map[index]);
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    bm_word_t orig = dest_map[index];
+    bm_word_t temp = orig & ~other_map[index];
+    changed = changed || (temp != orig);
     dest_map[index] = temp;
   }
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    bm_word_t temp = merge_tail_of_map(orig & ~other_map[limit], orig, rest);
+    changed = changed || (temp != orig);
+    dest_map[limit] = temp;
+  }
   return changed;
 }
 
-
 bool BitMap::set_intersection_with_result(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bool changed = false;
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
     bm_word_t orig = dest_map[index];
     bm_word_t temp = orig & other_map[index];
     changed = changed || (temp != orig);
-    dest_map[index]  = temp;
+    dest_map[index] = temp;
+  }
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    bm_word_t orig = dest_map[limit];
+    bm_word_t temp = merge_tail_of_map(orig & other_map[limit], orig, rest);
+    changed = changed || (temp != orig);
+    dest_map[limit] = temp;
   }
   return changed;
 }
 
-
 void BitMap::set_from(const BitMap& other) {
   assert(size() == other.size(), "must have same size");
   bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
-    dest_map[index] = other_map[index];
+  idx_t copy_words = word_index(size());
+  Copy::disjoint_words((HeapWord*)other_map, (HeapWord*)dest_map, copy_words);
+  idx_t rest = bit_in_word(size());
+  if (rest > 0) {
+    dest_map[copy_words] = merge_tail_of_map(other_map[copy_words],
+                                             dest_map[copy_words],
+                                             rest);
   }
 }
 
-
-bool BitMap::is_same(const BitMap& other) {
+bool BitMap::is_same(const BitMap& other) const {
   assert(size() == other.size(), "must have same size");
-  bm_word_t* dest_map = map();
+  const bm_word_t* dest_map = map();
   const bm_word_t* other_map = other.map();
-  idx_t size = size_in_words();
-  for (idx_t index = 0; index < size; index++) {
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
     if (dest_map[index] != other_map[index]) return false;
   }
-  return true;
+  idx_t rest = bit_in_word(size());
+  return (rest == 0) || (tail_of_map(dest_map[limit] ^ other_map[limit], rest) == 0);
 }
 
 bool BitMap::is_full() const {
-  const bm_word_t* word = map();
-  idx_t rest = size();
-  for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) {
-    if (*word != ~(bm_word_t)0) return false;
-    word++;
+  const bm_word_t* words = map();
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    if (~words[index] != 0) return false;
   }
-  return rest == 0 || (*word | ~right_n_bits((int)rest)) == ~(bm_word_t)0;
+  idx_t rest = bit_in_word(size());
+  return (rest == 0) || (tail_of_map(~words[limit], rest) == 0);
 }
 
-
 bool BitMap::is_empty() const {
-  const bm_word_t* word = map();
-  idx_t rest = size();
-  for (; rest >= (idx_t) BitsPerWord; rest -= BitsPerWord) {
-    if (*word != 0) return false;
-    word++;
+  const bm_word_t* words = map();
+  idx_t limit = word_index(size());
+  for (idx_t index = 0; index < limit; ++index) {
+    if (words[index] != 0) return false;
   }
-  return rest == 0 || (*word & right_n_bits((int)rest)) == 0;
+  idx_t rest = bit_in_word(size());
+  return (rest == 0) || (tail_of_map(words[limit], rest) == 0);
 }
 
 void BitMap::clear_large() {
diff --git a/hotspot/src/share/vm/utilities/bitMap.hpp b/hotspot/src/share/vm/utilities/bitMap.hpp
index 01c94da..919a54c 100644
--- a/hotspot/src/share/vm/utilities/bitMap.hpp
+++ b/hotspot/src/share/vm/utilities/bitMap.hpp
@@ -284,18 +284,9 @@
   bool set_difference_with_result(const BitMap& bits);
   bool set_intersection_with_result(const BitMap& bits);
 
-  // Requires the submap of "bits" starting at offset to be at least as
-  // large as "this".  Modifies "this" to be the intersection of its
-  // current contents and the submap of "bits" starting at "offset" of the
-  // same length as "this."
-  // (For expedience, currently requires the offset to be aligned to the
-  // bitsize of a uintptr_t.  This should go away in the future though it
-  // will probably remain a good case to optimize.)
-  void set_intersection_at_offset(const BitMap& bits, idx_t offset);
-
   void set_from(const BitMap& bits);
 
-  bool is_same(const BitMap& bits);
+  bool is_same(const BitMap& bits) const;
 
   // Test if all bits are set or cleared
   bool is_full() const;
diff --git a/hotspot/src/share/vm/utilities/bitMap.inline.hpp b/hotspot/src/share/vm/utilities/bitMap.inline.hpp
index 1b3a9bb..ae890e9 100644
--- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp
+++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp
@@ -25,7 +25,7 @@
 #ifndef SHARE_VM_UTILITIES_BITMAP_INLINE_HPP
 #define SHARE_VM_UTILITIES_BITMAP_INLINE_HPP
 
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "utilities/bitMap.hpp"
 
 inline void BitMap::set_bit(idx_t bit) {
diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp
index 95fd3b6..d48479c 100644
--- a/hotspot/src/share/vm/utilities/debug.cpp
+++ b/hotspot/src/share/vm/utilities/debug.cpp
@@ -38,7 +38,7 @@
 #include "oops/oop.inline.hpp"
 #include "prims/privilegedStack.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/frame.hpp"
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
index aec8ab9..a7ebde3 100644
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
@@ -327,11 +327,12 @@
 // and then additions like
 //       ... top() + size ...
 // are safe because we know that top() is at least size below end().
-inline size_t pointer_delta(const void* left,
-                            const void* right,
+inline size_t pointer_delta(const volatile void* left,
+                            const volatile void* right,
                             size_t element_size) {
   return (((uintptr_t) left) - ((uintptr_t) right)) / element_size;
 }
+
 // A version specialized for HeapWord*'s.
 inline size_t pointer_delta(const HeapWord* left, const HeapWord* right) {
   return pointer_delta(left, right, sizeof(HeapWord));
@@ -516,6 +517,10 @@
   return (void*)align_size_down((intptr_t)ptr, (intptr_t)alignment);
 }
 
+inline volatile void* align_ptr_down(volatile void* ptr, size_t alignment) {
+  return (volatile void*)align_size_down((intptr_t)ptr, (intptr_t)alignment);
+}
+
 // Align metaspace objects by rounding up to natural word boundary
 
 inline intptr_t align_metadata_size(intptr_t size) {
diff --git a/hotspot/src/share/vm/utilities/histogram.cpp b/hotspot/src/share/vm/utilities/histogram.cpp
index f4d7091..6787fce 100644
--- a/hotspot/src/share/vm/utilities/histogram.cpp
+++ b/hotspot/src/share/vm/utilities/histogram.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 
 #include "precompiled.hpp"
 #include "oops/oop.inline.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "utilities/histogram.hpp"
 
 #ifdef ASSERT
diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp
index ebcaaee..9904650 100644
--- a/hotspot/src/share/vm/utilities/macros.hpp
+++ b/hotspot/src/share/vm/utilities/macros.hpp
@@ -486,4 +486,24 @@
 #define OS_CPU_HEADER(basename)        XSTR(OS_CPU_HEADER_STEM(basename).hpp)
 #define OS_CPU_HEADER_INLINE(basename) XSTR(OS_CPU_HEADER_STEM(basename).inline.hpp)
 
+// To use Atomic::inc(jshort* dest) and Atomic::dec(jshort* dest), the address must be specially
+// aligned, such that (*dest) occupies the upper 16 bits of an aligned 32-bit word. The best way to
+// achieve is to place your short value next to another short value, which doesn't need atomic ops.
+//
+// Example
+//  ATOMIC_SHORT_PAIR(
+//    volatile short _refcount,  // needs atomic operation
+//    unsigned short _length     // number of UTF8 characters in the symbol (does not need atomic op)
+//  );
+
+#ifdef VM_LITTLE_ENDIAN
+  #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
+    non_atomic_decl;                                       \
+    atomic_decl
+#else
+  #define ATOMIC_SHORT_PAIR(atomic_decl, non_atomic_decl)  \
+    atomic_decl;                                           \
+    non_atomic_decl
+#endif
+
 #endif // SHARE_VM_UTILITIES_MACROS_HPP
diff --git a/hotspot/src/share/vm/utilities/vmError.cpp b/hotspot/src/share/vm/utilities/vmError.cpp
index 4a2ac95..8ae3d52 100644
--- a/hotspot/src/share/vm/utilities/vmError.cpp
+++ b/hotspot/src/share/vm/utilities/vmError.cpp
@@ -31,7 +31,7 @@
 #include "logging/logConfiguration.hpp"
 #include "prims/whitebox.hpp"
 #include "runtime/arguments.hpp"
-#include "runtime/atomic.inline.hpp"
+#include "runtime/atomic.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/init.hpp"
 #include "runtime/os.hpp"
diff --git a/hotspot/test/TEST.groups b/hotspot/test/TEST.groups
index c87769b..2fdda38 100644
--- a/hotspot/test/TEST.groups
+++ b/hotspot/test/TEST.groups
@@ -407,6 +407,11 @@
   runtime/SelectionResolution \
  -:hotspot_fast_runtime
 
+hotspot_runtime_minimalvm = \
+  runtime/MinimalVM \
+  runtime/ErrorHandling \
+  runtime/logging
+  
 #All tests that depends on nashorn extension.
 #
 needs_nashorn = \
diff --git a/hotspot/test/compiler/arguments/BMISupportedCPUTest.java b/hotspot/test/compiler/arguments/BMISupportedCPUTest.java
index 9582e8f..4979de0 100644
--- a/hotspot/test/compiler/arguments/BMISupportedCPUTest.java
+++ b/hotspot/test/compiler/arguments/BMISupportedCPUTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package compiler.arguments;
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
 /**
diff --git a/hotspot/test/compiler/arguments/BMIUnsupportedCPUTest.java b/hotspot/test/compiler/arguments/BMIUnsupportedCPUTest.java
index 103d2a9..957bc76 100644
--- a/hotspot/test/compiler/arguments/BMIUnsupportedCPUTest.java
+++ b/hotspot/test/compiler/arguments/BMIUnsupportedCPUTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package compiler.arguments;
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
diff --git a/hotspot/test/compiler/arguments/CheckCICompilerCount.java b/hotspot/test/compiler/arguments/CheckCICompilerCount.java
index 14bbdaa..7a97578 100644
--- a/hotspot/test/compiler/arguments/CheckCICompilerCount.java
+++ b/hotspot/test/compiler/arguments/CheckCICompilerCount.java
@@ -25,7 +25,7 @@
  * @test CheckCheckCICompilerCount
  * @bug 8130858 8132525 8162881
  * @summary Check that correct range of values for CICompilerCount are allowed depending on whether tiered is enabled or not
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver compiler.arguments.CheckCICompilerCount
@@ -33,8 +33,8 @@
 
 package compiler.arguments;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class CheckCICompilerCount {
     private static final String[][] NON_TIERED_ARGUMENTS = {
diff --git a/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java b/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java
index ecfe31d..1d2de0f 100644
--- a/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java
+++ b/hotspot/test/compiler/arguments/CheckCompileThresholdScaling.java
@@ -25,7 +25,7 @@
  * @test CheckCompileThresholdScaling
  * @bug 8059604
  * @summary Add CompileThresholdScaling flag to control when methods are first compiled (with +/-TieredCompilation)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver compiler.arguments.CheckCompileThresholdScaling
@@ -33,8 +33,8 @@
 
 package compiler.arguments;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class CheckCompileThresholdScaling {
 
diff --git a/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java b/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java
index 5d7f9fc..001ac21 100644
--- a/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @bug 8031321
  * @summary Verify processing of UseBMI1Instructions option on CPU with
  *          BMI1 feature support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.arguments.TestUseBMI1InstructionsOnSupportedCPU
- *        compiler.arguments.BMISupportedCPUTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java b/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java
index 4fd996f..fe4f4d8 100644
--- a/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseBMI1InstructionsOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @bug 8031321
  * @summary Verify processing of UseBMI1Instructions option on CPU without
  *          BMI1 feature support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.arguments.TestUseBMI1InstructionsOnUnsupportedCPU
- *        compiler.arguments.BMIUnsupportedCPUTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java b/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java
index 3ebd44d..2d71823 100644
--- a/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @bug 8031321
  * @summary Verify processing of UseCountLeadingZerosInstruction option
  *          on CPU with LZCNT support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.arguments.TestUseCountLeadingZerosInstructionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java b/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java
index 4285c27..a79a04f 100644
--- a/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseCountLeadingZerosInstructionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @bug 8031321
  * @summary Verify processing of UseCountLeadingZerosInstruction option
  *          on CPU without LZCNT support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.arguments.TestUseCountLeadingZerosInstructionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java b/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java
index 3e988e6..a026295 100644
--- a/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @bug 8031321
  * @summary Verify processing of UseCountTrailingZerosInstruction option
  *          on CPU with TZCNT (BMI1 feature) support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.arguments.TestUseCountTrailingZerosInstructionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java b/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java
index 96ccd67..a6a9501 100644
--- a/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/arguments/TestUseCountTrailingZerosInstructionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @bug 8031321
  * @summary Verify processing of UseCountTrailingZerosInstruction option
  *          on CPU without TZCNT instruction (BMI1 feature) support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.arguments.TestUseCountTrailingZerosInstructionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java b/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java
index c3ee9a4..e121ab3 100644
--- a/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java
+++ b/hotspot/test/compiler/arraycopy/TestArrayCopyNoInitDeopt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,12 @@
  * @bug 8072016
  * @summary Infinite deoptimization/recompilation cycles in case of arraycopy with tightly coupled allocation
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.arraycopy.TestArrayCopyNoInitDeopt
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
- *                                jdk.test.lib.Platform
  * @run main/othervm -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:TypeProfileLevel=020
  *                   compiler.arraycopy.TestArrayCopyNoInitDeopt
diff --git a/hotspot/test/compiler/c2/PolynomialRoot.java b/hotspot/test/compiler/c2/PolynomialRoot.java
index 86836d0..fe34c84 100644
--- a/hotspot/test/compiler/c2/PolynomialRoot.java
+++ b/hotspot/test/compiler/c2/PolynomialRoot.java
@@ -13,7 +13,7 @@
  * @test
  * @bug 8005956
  * @summary C2: assert(!def_outside->member(r)) failed: Use of external LRG overlaps the same LRG defined in this block
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/c2/Test5057225.java b/hotspot/test/compiler/c2/Test5057225.java
index 632f678..99f7e5d 100644
--- a/hotspot/test/compiler/c2/Test5057225.java
+++ b/hotspot/test/compiler/c2/Test5057225.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 5057225
  * @summary Remove useless I2L conversions
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xcomp
  *      -XX:CompileCommand=compileonly,compiler.c2.Test5057225::doload
diff --git a/hotspot/test/compiler/c2/Test6603011.java b/hotspot/test/compiler/c2/Test6603011.java
index 9495fe3..a4e7d03 100644
--- a/hotspot/test/compiler/c2/Test6603011.java
+++ b/hotspot/test/compiler/c2/Test6603011.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 6603011
  * @summary long/int division by constant
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xcomp -Xbatch -XX:-Inline compiler.c2.Test6603011
  */
diff --git a/hotspot/test/compiler/c2/Test6800154.java b/hotspot/test/compiler/c2/Test6800154.java
index 9de9b76..d8407cf 100644
--- a/hotspot/test/compiler/c2/Test6800154.java
+++ b/hotspot/test/compiler/c2/Test6800154.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 6800154
  * @summary Add comments to long_by_long_mulhi() for better understandability
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xcomp
  *      -XX:CompileCommand=compileonly,compiler.c2.Test6800154::divcomp
diff --git a/hotspot/test/compiler/c2/Test6805724.java b/hotspot/test/compiler/c2/Test6805724.java
index 2433fce..d0565c6 100644
--- a/hotspot/test/compiler/c2/Test6805724.java
+++ b/hotspot/test/compiler/c2/Test6805724.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary ModLNode::Ideal() generates functionally incorrect graph
  *          when divisor is any (2^k-1) constant.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xcomp
  *      -XX:CompileCommand=compileonly,compiler.c2.Test6805724::fcomp
diff --git a/hotspot/test/compiler/c2/Test6857159.java b/hotspot/test/compiler/c2/Test6857159.java
index 894fc5f..efe9653 100644
--- a/hotspot/test/compiler/c2/Test6857159.java
+++ b/hotspot/test/compiler/c2/Test6857159.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 6857159
  * @summary local schedule failed with checkcast of Thread.currentThread()
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -35,8 +35,8 @@
 
 package compiler.c2;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class Test6857159 {
     public static void main(String[] args) throws Throwable {
diff --git a/hotspot/test/compiler/c2/Test7068051.java b/hotspot/test/compiler/c2/Test7068051.java
index 408fd6f..d166290 100644
--- a/hotspot/test/compiler/c2/Test7068051.java
+++ b/hotspot/test/compiler/c2/Test7068051.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 7068051
  * @summary SIGSEGV in PhaseIdealLoop::build_loop_late_post on T5440
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -36,7 +36,7 @@
 package compiler.c2;
 
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/hotspot/test/compiler/c2/Test7177917.java b/hotspot/test/compiler/c2/Test7177917.java
index 6fe88a3..ae4529a 100644
--- a/hotspot/test/compiler/c2/Test7177917.java
+++ b/hotspot/test/compiler/c2/Test7177917.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 7177917
  * @summary Micro-benchmark for Math.pow() and Math.exp()
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main compiler.c2.Test7177917
  */
diff --git a/hotspot/test/compiler/c2/cr6589834/Test_ia32.java b/hotspot/test/compiler/c2/cr6589834/Test_ia32.java
index c6cf651..58f5635 100644
--- a/hotspot/test/compiler/c2/cr6589834/Test_ia32.java
+++ b/hotspot/test/compiler/c2/cr6589834/Test_ia32.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,13 @@
  * @bug 6589834
  * @summary Safepoint placed between stack pointer increment and decrement leads
  *          to interpreter's stack corruption after deoptimization.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  *
- * @build ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.*
- *        compiler.c2.cr6589834.Test_ia32
- *        compiler.c2.cr6589834.InlinedArrayCloneTestCase
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/c2/stemmer/Stemmer.java b/hotspot/test/compiler/c2/stemmer/Stemmer.java
index 0f8cb29..893749d 100644
--- a/hotspot/test/compiler/c2/stemmer/Stemmer.java
+++ b/hotspot/test/compiler/c2/stemmer/Stemmer.java
@@ -3,7 +3,7 @@
  * @bug 7070134
  * @summary Hotspot crashes with sigsegv from PorterStemmer
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run driver jdk.test.lib.FileInstaller words words
  * @run main/othervm -Xbatch compiler.c2.stemmer.Stemmer words
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java
index 0ba2498..777189c 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2CompiledTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from compiled to compiled using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- *        compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java
index 98a86b1..e0a25eb 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2InterpretedTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from compiled to interpreted using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- * @build compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java
index 397faf2..4c81223 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeDynamic2NativeTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from compiled to native using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- *        compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java
index 46667c9..4332fda 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @modules java.base/jdk.internal.misc
  * @summary check calls from compiled to compiled using InvokeInterface
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java
index 07fcff1..c889b91 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to interpreted using InvokeInterface
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java
index e3a6895..2544b4c 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeInterface2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to native using InvokeInterface
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java
index 07e6fc9..882b75c 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to compiled using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java
index e08784d..79a8075 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to interpreted using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java
index 600301b..3018113 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeSpecial2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to native using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java
index ddd88ab..85412f2 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to compiled using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java
index 7ca6263..96c2d96 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to interpreted using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java
index 560c807..a40d9d4 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeStatic2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to native using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java
index ef408fd..1c6701d 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to compiled using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java
index 718aef2..7ece0a4 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to interpreted using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java
index e161834..c82f056 100644
--- a/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromCompiled/CompiledInvokeVirtual2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from compiled to native using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java
index f83beb4..4b9d84f 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2CompiledTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from interpreted to compiled using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- *        compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java
index e4ff099..0280088 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2InterpretedTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from interpreted to interpreted using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- *        compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java
index 3785058..1d5ac09 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeDynamic2NativeTest.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary check calls from interpreted to native using InvokeDynamic
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
  *
- * @build compiler.calls.common.InvokeDynamic
- *        compiler.calls.common.InvokeDynamicPatcher
+ * @build sun.hotspot.WhiteBox
  * @run main compiler.calls.common.InvokeDynamicPatcher
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java
index 83024bb..4d3f556 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to compiled using InvokeInterface
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java
index 2a81110..8c1b18d 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to interpreted using InvokeInterface
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java
index 72c9275..b03e5bd 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeInterface2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to native using InvokeInterface
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeInterface
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java
index ad0b12f..2624a94 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,8 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
- * @build compiler.calls.common.InvokeSpecial
+ * @library /test/lib /
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java
index a6a3ae4..d0da40e 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to interpreted using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java
index f52dd62..8593ebc 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeSpecial2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @summary check calls from interpreted to native using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
  * @build compiler.calls.common.InvokeSpecial
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java
index 1db1014..a83b6d3 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to compiled using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java
index 7e39254..88aca66 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to interpreted using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java
index 789fe9c..a17e9c5 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeStatic2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to native using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java
index 41e89d3..db644c1 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to compiled using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java
index f299f4a..e6d94ee 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to interpreted using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java
index 5a99727..9ebf7a3 100644
--- a/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromInterpreted/InterpretedInvokeVirtual2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from interpreted to native using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java
index b25f7a1..7400771 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to compiled using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java
index f7c66cf..4efd098 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to interpreted using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java
index 041af4f..1005783 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeSpecial2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to native using InvokeSpecial
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeSpecial
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java
index f7e8f52..f1f0634 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to compiled using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java
index ab0e447..fc0a059 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to interpreted using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java
index de0b8c1..f9da3d6 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeStatic2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to native using InvokeStatic
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeStatic
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java
index 4361a8d..b6cce29 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2CompiledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to compiled using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java
index fde2465..270ecfa 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2InterpretedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test
  * @summary check calls from native to interpreted using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
- * @build compiler.calls.common.InvokeVirtual
+ * @library /test/lib /
+ * @build sun.hotspot.WhiteBox
  *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java
index a075107..83564c1 100644
--- a/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java
+++ b/hotspot/test/compiler/calls/fromNative/NativeInvokeVirtual2NativeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @summary check calls from native to native using InvokeVirtual
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
- * @build compiler.calls.common.InvokeVirtual
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *    sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java b/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java
index 694b6e7..ea2d192 100644
--- a/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java
+++ b/hotspot/test/compiler/classUnloading/anonymousClass/TestAnonymousClassUnloading.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test TestAnonymousClassUnloading
  * @bug 8054402
  * @summary "Tests unloading of anonymous classes."
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *
  * @run main/othervm/bootclasspath -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java b/hotspot/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java
index d0f022d..9b0598f 100644
--- a/hotspot/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java
+++ b/hotspot/test/compiler/classUnloading/methodUnloading/TestMethodUnloading.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @bug 8029443
  * @summary Tests the unloading of methods to to class unloading
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.classUnloading.methodUnloading.TestMethodUnloading
+ * @build sun.hotspot.WhiteBox
  *        compiler.classUnloading.methodUnloading.WorkerClass
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java b/hotspot/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java
index 1c8d70f..eb8fcc0 100644
--- a/hotspot/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java
+++ b/hotspot/test/compiler/codecache/CheckReservedInitialCodeCacheSizeArgOrder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8013496
  * @summary Test checks that the order in which ReversedCodeCacheSize and
  *          InitialCodeCacheSize are passed to the VM is irrelevant.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -35,8 +35,8 @@
 
 package compiler.codecache;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class CheckReservedInitialCodeCacheSizeArgOrder {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java b/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java
index 2e09a4a..12e1ca1 100644
--- a/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java
+++ b/hotspot/test/compiler/codecache/CheckSegmentedCodeCache.java
@@ -25,11 +25,11 @@
  * @test CheckSegmentedCodeCache
  * @bug 8015774
  * @summary Checks VM options related to the segmented code cache
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.CheckSegmentedCodeCache
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -39,9 +39,9 @@
 
 package compiler.codecache;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 import sun.hotspot.WhiteBox;
 
 public class CheckSegmentedCodeCache {
diff --git a/hotspot/test/compiler/codecache/CheckUpperLimit.java b/hotspot/test/compiler/codecache/CheckUpperLimit.java
index d4c34ca..473ec3f1 100644
--- a/hotspot/test/compiler/codecache/CheckUpperLimit.java
+++ b/hotspot/test/compiler/codecache/CheckUpperLimit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8015635
  * @summary Test ensures that the ReservedCodeCacheSize is at most MAXINT
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -34,8 +34,8 @@
 
 package compiler.codecache;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class CheckUpperLimit {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java b/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java
index 6b45694..64bbd2c 100644
--- a/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java
+++ b/hotspot/test/compiler/codecache/OverflowCodeCacheTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @test OverflowCodeCacheTest
  * @bug 8059550
  * @summary testing of code cache segments overflow
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.OverflowCodeCacheTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java b/hotspot/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java
index c5db695..c6fc3af 100644
--- a/hotspot/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java
+++ b/hotspot/test/compiler/codecache/cli/TestSegmentedCodeCacheOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,20 +25,19 @@
  * @test
  * @bug 8015774
  * @summary Verify SegmentedCodeCache option's processing
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  *
- * @build jdk.test.lib.*
  * @run driver compiler.codecache.cli.TestSegmentedCodeCacheOption
  */
 
 package compiler.codecache.cli;
 
 import compiler.codecache.cli.common.CodeCacheOptions;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import sun.hotspot.code.BlobType;
diff --git a/hotspot/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java b/hotspot/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java
index ffc333c..56816e8 100644
--- a/hotspot/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java
+++ b/hotspot/test/compiler/codecache/cli/codeheapsize/CodeCacheFreeSpaceRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 import compiler.codecache.cli.common.CodeCacheCLITestCase;
 import compiler.codecache.cli.common.CodeCacheOptions;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import sun.hotspot.code.BlobType;
diff --git a/hotspot/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java b/hotspot/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java
index 8eb8d15..bde7beb 100644
--- a/hotspot/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java
+++ b/hotspot/test/compiler/codecache/cli/codeheapsize/JVMStartupRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 import compiler.codecache.cli.common.CodeCacheCLITestCase;
 import compiler.codecache.cli.common.CodeCacheOptions;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import sun.hotspot.code.BlobType;
diff --git a/hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java b/hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java
index ce57610..ca28cdb 100644
--- a/hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java
+++ b/hotspot/test/compiler/codecache/cli/codeheapsize/TestCodeHeapSizeOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,12 @@
  * @test
  * @bug 8015774
  * @summary Verify processing of options related to code heaps sizing.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  *
- * @build compiler.codecache.cli.codeheapsize.TestCodeHeapSizeOptions jdk.test.lib.*
  * @run driver/timeout=240 compiler.codecache.cli.codeheapsize.TestCodeHeapSizeOptions
  */
 
diff --git a/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java b/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java
index 4bd269a..43d4e38 100644
--- a/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java
+++ b/hotspot/test/compiler/codecache/cli/printcodecache/PrintCodeCacheRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.codecache.cli.common.CodeCacheCLITestCase;
 import compiler.codecache.cli.common.CodeCacheInfoFormatter;
 import compiler.codecache.cli.common.CodeCacheOptions;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import sun.hotspot.code.BlobType;
 
diff --git a/hotspot/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java b/hotspot/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java
index eb50d4a..74ed907 100644
--- a/hotspot/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java
+++ b/hotspot/test/compiler/codecache/cli/printcodecache/TestPrintCodeCacheOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,12 @@
  * @test
  * @bug 8015774
  * @summary Verify that PrintCodeCache option print correct information.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  *
- * @build jdk.test.lib.* compiler.codecache.cli.common.*
  * @run main/timeout=240 compiler.codecache.cli.printcodecache.TestPrintCodeCacheOption
  */
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceResultsAnalyzer.java b/hotspot/test/compiler/codecache/dtrace/DtraceResultsAnalyzer.java
similarity index 88%
rename from hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceResultsAnalyzer.java
rename to hotspot/test/compiler/codecache/dtrace/DtraceResultsAnalyzer.java
index 1df4512..9cab7a4 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceResultsAnalyzer.java
+++ b/hotspot/test/compiler/codecache/dtrace/DtraceResultsAnalyzer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -20,9 +20,9 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-package jdk.test.lib.dtrace;
+package compiler.codecache.dtrace;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public interface DtraceResultsAnalyzer {
     public void analyze(OutputAnalyzer oa, String logFilePath);
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceRunner.java b/hotspot/test/compiler/codecache/dtrace/DtraceRunner.java
similarity index 96%
rename from hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceRunner.java
rename to hotspot/test/compiler/codecache/dtrace/DtraceRunner.java
index 014087c..dbdbfa1 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dtrace/DtraceRunner.java
+++ b/hotspot/test/compiler/codecache/dtrace/DtraceRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -20,10 +20,10 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-package jdk.test.lib.dtrace;
+package compiler.codecache.dtrace;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java b/hotspot/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java
index 535adc0a..d4dbf66 100644
--- a/hotspot/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java
+++ b/hotspot/test/compiler/codecache/dtrace/SegmentedCodeCacheDtraceTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,9 +27,9 @@
  * @summary testing of dtrace for segmented code cache
  * @requires os.family=="solaris"
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.codecache.dtrace.SegmentedCodeCacheDtraceTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:.
@@ -42,10 +42,8 @@
 import compiler.testlibrary.CompilerUtils;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
-import jdk.test.lib.dtrace.DtraceResultsAnalyzer;
-import jdk.test.lib.dtrace.DtraceRunner;
 
 import java.io.IOException;
 import java.lang.reflect.Executable;
diff --git a/hotspot/test/compiler/codecache/jmx/BeanTypeTest.java b/hotspot/test/compiler/codecache/jmx/BeanTypeTest.java
index d620e9e..dca730a 100644
--- a/hotspot/test/compiler/codecache/jmx/BeanTypeTest.java
+++ b/hotspot/test/compiler/codecache/jmx/BeanTypeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary verify types of code cache memory pool bean
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.codecache.jmx.BeanTypeTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/CodeCacheUtils.java b/hotspot/test/compiler/codecache/jmx/CodeCacheUtils.java
index 31646f9..0cce093 100644
--- a/hotspot/test/compiler/codecache/jmx/CodeCacheUtils.java
+++ b/hotspot/test/compiler/codecache/jmx/CodeCacheUtils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -119,6 +119,28 @@
         }
     }
 
+    /**
+     * Verifies that 'newValue' is equal to 'oldValue' if usage of the
+     * corresponding code heap is predictable. Checks the weaker condition
+     * 'newValue <= oldValue' if usage is not predictable because intermediate
+     * allocations may happen.
+     *
+     * @param btype BlobType of the code heap to be checked
+     * @param newValue New value to be verified
+     * @param oldValue Old value to be verified
+     * @param msg Error message if verification fails
+     */
+    public static void assertEQorLTE(BlobType btype, long newValue, long oldValue, String msg) {
+        if (CodeCacheUtils.isCodeHeapPredictable(btype)) {
+            // Usage is predictable, check strong == condition
+            Asserts.assertEQ(newValue, oldValue, msg);
+        } else {
+            // Usage is not predictable, check weaker <= condition
+            Asserts.assertLTE(newValue, oldValue, msg);
+        }
+    }
+
+
     public static void disableCollectionUsageThresholds() {
         BlobType.getAvailable().stream()
                 .map(BlobType::getMemoryPool)
diff --git a/hotspot/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java b/hotspot/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java
index ccf6927..0bdd2f7 100644
--- a/hotspot/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java
+++ b/hotspot/test/compiler/codecache/jmx/CodeHeapBeanPresenceTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary verify CodeHeap bean presence
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.codecache.jmx.CodeHeapBeanPresenceTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/GetUsageTest.java b/hotspot/test/compiler/codecache/jmx/GetUsageTest.java
index 01f247c..cf838dd 100644
--- a/hotspot/test/compiler/codecache/jmx/GetUsageTest.java
+++ b/hotspot/test/compiler/codecache/jmx/GetUsageTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary testing of getUsage() for segmented code cache
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.codecache.jmx.GetUsageTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java b/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java
index e96dc47..49b1fa5 100644
--- a/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java
+++ b/hotspot/test/compiler/codecache/jmx/InitialAndMaxUsageTest.java
@@ -26,9 +26,9 @@
  * @summary testing of initial and max usage
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.codecache.jmx.InitialAndMaxUsageTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:-UseCodeCacheFlushing
diff --git a/hotspot/test/compiler/codecache/jmx/ManagerNamesTest.java b/hotspot/test/compiler/codecache/jmx/ManagerNamesTest.java
index f8e67872..a80298a 100644
--- a/hotspot/test/compiler/codecache/jmx/ManagerNamesTest.java
+++ b/hotspot/test/compiler/codecache/jmx/ManagerNamesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary verify getMemoryManageNames calls in case of segmented code cache
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.codecache.jmx.ManagerNamesTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java b/hotspot/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java
index b0796cd..6e5ea32 100644
--- a/hotspot/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java
+++ b/hotspot/test/compiler/codecache/jmx/MemoryPoolsPresenceTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary verify that MemoryManagerMXBean exists for every code cache segment
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.codecache.jmx.MemoryPoolsPresenceTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java b/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java
index e75a362..57518e6 100644
--- a/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java
+++ b/hotspot/test/compiler/codecache/jmx/PeakUsageTest.java
@@ -23,12 +23,11 @@
 
 /*
  * @test PeakUsageTest
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @ignore 8151345
- * @build ompiler.codecache.jmx.PeakUsageTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *     sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -69,9 +68,17 @@
         bean.resetPeakUsage();
         long addr = CodeCacheUtils.WB.allocateCodeBlob(
                 CodeCacheUtils.ALLOCATION_SIZE, btype.id);
-        long newPeakUsage = bean.getPeakUsage().getUsed();
+
         try {
-            CodeCacheUtils.assertEQorGTE(btype, newPeakUsage, bean.getUsage().getUsed(),
+            /*
+            Always save peakUsage after saving currentUsage. Reversing the order
+            can lead to inconsistent results (currentUsage > peakUsage) because
+            of intermediate allocations.
+            */
+            long currUsage = bean.getUsage().getUsed();
+            long peakUsage = bean.getPeakUsage().getUsed();
+            CodeCacheUtils.assertEQorLTE(btype, currUsage,
+                    peakUsage,
                     "Peak usage does not match usage after allocation for "
                     + bean.getName());
         } finally {
@@ -79,19 +86,21 @@
                 CodeCacheUtils.WB.freeCodeBlob(addr);
             }
         }
-        CodeCacheUtils.assertEQorGTE(btype, newPeakUsage, bean.getPeakUsage().getUsed(),
-                "Code cache peak usage has changed after usage decreased for "
-                + bean.getName());
         bean.resetPeakUsage();
-        CodeCacheUtils.assertEQorGTE(btype, bean.getPeakUsage().getUsed(),
-                bean.getUsage().getUsed(),
+        long currUsage = bean.getUsage().getUsed();
+        long peakUsage = bean.getPeakUsage().getUsed();
+        CodeCacheUtils.assertEQorLTE(btype, currUsage,
+                peakUsage,
                 "Code cache peak usage is not equal to usage after reset for "
                 + bean.getName());
         long addr2 = CodeCacheUtils.WB.allocateCodeBlob(
                 CodeCacheUtils.ALLOCATION_SIZE, btype.id);
         try {
-            CodeCacheUtils.assertEQorGTE(btype, bean.getPeakUsage().getUsed(),
-                    bean.getUsage().getUsed(),
+            currUsage = bean.getUsage().getUsed();
+            peakUsage = bean.getPeakUsage().getUsed();
+
+            CodeCacheUtils.assertEQorLTE(btype, currUsage,
+                    peakUsage,
                     "Code cache peak usage is not equal to usage after fresh "
                     + "allocation for " + bean.getName());
         } finally {
diff --git a/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java b/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java
index cd61fea..50b56ef 100644
--- a/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java
+++ b/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @summary testing of getUsageThreshold()
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.codecache.jmx.PoolsIndependenceTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java b/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java
index e173fc8..e3cc873 100644
--- a/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java
+++ b/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,11 +24,11 @@
 /*
  * @test ThresholdNotificationsTest
  * @summary testing of getUsageThreshold()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.jmx.ThresholdNotificationsTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -Xbootclasspath/a:. -XX:-UseCodeCacheFlushing
diff --git a/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java b/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java
index e90222d..fd39bea 100644
--- a/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java
+++ b/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededSeveralTimesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test UsageThresholdExceededSeveralTimesTest
  * @summary verifying that getUsageThresholdCount() returns correct value
  *     after threshold has been hit several times
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.jmx.UsageThresholdExceededTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededTest.java b/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededTest.java
index 154a096..bf78a1c 100644
--- a/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededTest.java
+++ b/hotspot/test/compiler/codecache/jmx/UsageThresholdExceededTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test UsageThresholdExceededTest
  * @summary verifying that getUsageThresholdCount() returns correct value
  *     after threshold has been hit
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.jmx.UsageThresholdExceededTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java b/hotspot/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java
index f432f8a..ee071d4 100644
--- a/hotspot/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java
+++ b/hotspot/test/compiler/codecache/jmx/UsageThresholdIncreasedTest.java
@@ -25,11 +25,10 @@
  * @test UsageThresholdIncreasedTest
  * @summary verifying that threshold hasn't been hit after allocation smaller
  *     than threshold value and that threshold value can be changed
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- *
- * @build compiler.codecache.jmx.UsageThresholdIncreasedTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java b/hotspot/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java
index 46bd21b..6058796 100644
--- a/hotspot/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java
+++ b/hotspot/test/compiler/codecache/jmx/UsageThresholdNotExceededTest.java
@@ -25,13 +25,13 @@
  * @test UsageThresholdNotExceededTest
  * @summary verifying that usage threshold not exceeded while allocating less
  *     than usage threshold
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
- * @build compiler.codecache.jmx.UsageThresholdNotExceededTest
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
  *     -XX:+WhiteBoxAPI -XX:-UseCodeCacheFlushing -XX:-MethodFlushing
  *     -XX:CompileCommand=compileonly,null::*
diff --git a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java
index e3d4a9a..e02eef8 100644
--- a/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java
+++ b/hotspot/test/compiler/codecache/stress/CodeCacheStressRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 
 package compiler.codecache.stress;
 
-import jdk.test.lib.TimeLimitedRunner;
+import jdk.test.lib.wrappers.TimeLimitedRunner;
 import jdk.test.lib.Utils;
 
 public class CodeCacheStressRunner {
diff --git a/hotspot/test/compiler/codecache/stress/Helper.java b/hotspot/test/compiler/codecache/stress/Helper.java
index 6399d30..1e2f04f 100644
--- a/hotspot/test/compiler/codecache/stress/Helper.java
+++ b/hotspot/test/compiler/codecache/stress/Helper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 
 import jdk.test.lib.Asserts;
 import jdk.test.lib.ByteCodeLoader;
-import jdk.test.lib.InfiniteLoop;
+import jdk.test.lib.wrappers.InfiniteLoop;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java b/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java
index 4a93f2e..9589987 100644
--- a/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java
+++ b/hotspot/test/compiler/codecache/stress/OverloadCompileQueueTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,12 @@
 /*
  * @test OverloadCompileQueueTest
  * @summary stressing code cache by overloading compile queues
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
  * @ignore 8071905
- * @build compiler.codecache.stress.OverloadCompileQueueTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/stress/RandomAllocationTest.java b/hotspot/test/compiler/codecache/stress/RandomAllocationTest.java
index 761cbfd..21f602b 100644
--- a/hotspot/test/compiler/codecache/stress/RandomAllocationTest.java
+++ b/hotspot/test/compiler/codecache/stress/RandomAllocationTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @test RandomAllocationTest
  * @key stress
  * @summary stressing code cache by allocating randomly sized "dummy" code blobs
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.stress.RandomAllocationTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java b/hotspot/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java
index 4cd43a1..a6b3a6c 100644
--- a/hotspot/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java
+++ b/hotspot/test/compiler/codecache/stress/UnexpectedDeoptimizationTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @test UnexpectedDeoptimizationTest
  * @key stress
  * @summary stressing code cache by forcing unexpected deoptimizations
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.codecache.stress.UnexpectedDeoptimizationTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/codegen/Test6823354.java b/hotspot/test/compiler/codegen/Test6823354.java
index 7ff6f2c..fb33242 100644
--- a/hotspot/test/compiler/codegen/Test6823354.java
+++ b/hotspot/test/compiler/codegen/Test6823354.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 6823354
  * @summary These methods can be instrinsified by using bit scan, bit test, and population count instructions.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xcomp
  *      -XX:CompileCommand=compileonly,compiler.codegen.Test6823354::lzcomp
diff --git a/hotspot/test/compiler/codegen/Test6896617.java b/hotspot/test/compiler/codegen/Test6896617.java
index 90e4854..bc3807b 100644
--- a/hotspot/test/compiler/codegen/Test6896617.java
+++ b/hotspot/test/compiler/codegen/Test6896617.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 6896617
  * @summary Optimize sun.nio.cs.ISO_8859_1$Encode.encodeArrayLoop() with SSE instructions on x86
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.base/sun.nio.cs
  *          java.management
diff --git a/hotspot/test/compiler/codegen/Test7100757.java b/hotspot/test/compiler/codegen/Test7100757.java
index 3736d85..6dbae9c 100644
--- a/hotspot/test/compiler/codegen/Test7100757.java
+++ b/hotspot/test/compiler/codegen/Test7100757.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 7100757
  * @summary The BitSet.nextSetBit() produces incorrect result in 32bit VM on Sparc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/codegen/aes/TestAESMain.java b/hotspot/test/compiler/codegen/aes/TestAESMain.java
index 36353ca..4c9398d 100644
--- a/hotspot/test/compiler/codegen/aes/TestAESMain.java
+++ b/hotspot/test/compiler/codegen/aes/TestAESMain.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 7184394
  * @key stress
  * @summary add intrinsics to use AES instructions
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/compilercontrol/InlineMatcherTest.java b/hotspot/test/compiler/compilercontrol/InlineMatcherTest.java
index a406e2e..b2c6507 100644
--- a/hotspot/test/compiler/compilercontrol/InlineMatcherTest.java
+++ b/hotspot/test/compiler/compilercontrol/InlineMatcherTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @bug 8074095
  * @summary Testing of compiler/InlineMatcher
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.compilercontrol.InlineMatcherTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java
index 882e783..11013a6 100644
--- a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java
+++ b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,12 @@
  * @test TestCompilerDirectivesCompatibilityBase
  * @bug 8137167
  * @summary Test compiler control compatibility with compile command
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.TestCompilerDirectivesCompatibilityBase
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java
index 9036919..d8e246c 100644
--- a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java
+++ b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOff.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,12 @@
  * @test TestCompilerDirectivesCompatibilityCommandOff
  * @bug 8137167
  * @summary Test compiler control compatibility with compile command
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.TestCompilerDirectivesCompatibilityCommandOff
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java
index 7336b0e..44bf2a7 100644
--- a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java
+++ b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityCommandOn.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,12 @@
  * @test TestCompilerDirectivesCompatibilityCommandOn
  * @bug 8137167
  * @summary Test compiler control compatibility with compile command
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.TestCompilerDirectivesCompatibilityCommandOn
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java
index a827656..81f1460 100644
--- a/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java
+++ b/hotspot/test/compiler/compilercontrol/TestCompilerDirectivesCompatibilityFlag.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,12 @@
 /*
  * @test TestCompilerDirectivesCompatibilityFlag
  * @bug 8137167
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.TestCompilerDirectivesCompatibilityFlag
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java b/hotspot/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java
index ae03d3f..bb49aea 100644
--- a/hotspot/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java
+++ b/hotspot/test/compiler/compilercontrol/commandfile/CompileOnlyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=compileonly
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commandfile.CompileOnlyTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commandfile.CompileOnlyTest
diff --git a/hotspot/test/compiler/compilercontrol/commandfile/ExcludeTest.java b/hotspot/test/compiler/compilercontrol/commandfile/ExcludeTest.java
index 0caa287..8c48e9a 100644
--- a/hotspot/test/compiler/compilercontrol/commandfile/ExcludeTest.java
+++ b/hotspot/test/compiler/compilercontrol/commandfile/ExcludeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=exclude
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commandfile.ExcludeTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commandfile.ExcludeTest
diff --git a/hotspot/test/compiler/compilercontrol/commandfile/LogTest.java b/hotspot/test/compiler/compilercontrol/commandfile/LogTest.java
index 1d5768b..5c0551a 100644
--- a/hotspot/test/compiler/compilercontrol/commandfile/LogTest.java
+++ b/hotspot/test/compiler/compilercontrol/commandfile/LogTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=log
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commandfile.LogTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commandfile.LogTest
diff --git a/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java b/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java
index 30127ce..1187d75 100644
--- a/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java
+++ b/hotspot/test/compiler/compilercontrol/commandfile/PrintTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=print
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commandfile.PrintTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commandfile.PrintTest
diff --git a/hotspot/test/compiler/compilercontrol/commands/CompileOnlyTest.java b/hotspot/test/compiler/compilercontrol/commands/CompileOnlyTest.java
index 49b6c48..7dcd188 100644
--- a/hotspot/test/compiler/compilercontrol/commands/CompileOnlyTest.java
+++ b/hotspot/test/compiler/compilercontrol/commands/CompileOnlyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=compileonly
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commands.CompileOnlyTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commands.CompileOnlyTest
diff --git a/hotspot/test/compiler/compilercontrol/commands/ExcludeTest.java b/hotspot/test/compiler/compilercontrol/commands/ExcludeTest.java
index d6b931e..3765d17 100644
--- a/hotspot/test/compiler/compilercontrol/commands/ExcludeTest.java
+++ b/hotspot/test/compiler/compilercontrol/commands/ExcludeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=exclude
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commands.ExcludeTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commands.ExcludeTest
diff --git a/hotspot/test/compiler/compilercontrol/commands/LogTest.java b/hotspot/test/compiler/compilercontrol/commands/LogTest.java
index b079475..0d9b7af2 100644
--- a/hotspot/test/compiler/compilercontrol/commands/LogTest.java
+++ b/hotspot/test/compiler/compilercontrol/commands/LogTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=log
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commands.LogTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commands.LogTest
diff --git a/hotspot/test/compiler/compilercontrol/commands/PrintTest.java b/hotspot/test/compiler/compilercontrol/commands/PrintTest.java
index ca5eaa0..26ce693 100644
--- a/hotspot/test/compiler/compilercontrol/commands/PrintTest.java
+++ b/hotspot/test/compiler/compilercontrol/commands/PrintTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests CompileCommand=print
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.commands.PrintTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.commands.PrintTest
diff --git a/hotspot/test/compiler/compilercontrol/directives/CompileOnlyTest.java b/hotspot/test/compiler/compilercontrol/directives/CompileOnlyTest.java
index fce5841..f79e97f 100644
--- a/hotspot/test/compiler/compilercontrol/directives/CompileOnlyTest.java
+++ b/hotspot/test/compiler/compilercontrol/directives/CompileOnlyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests directives to be able to compile only specified  methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.directives.CompileOnlyTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.directives.CompileOnlyTest
diff --git a/hotspot/test/compiler/compilercontrol/directives/ExcludeTest.java b/hotspot/test/compiler/compilercontrol/directives/ExcludeTest.java
index fda9b26..1d0dfe3 100644
--- a/hotspot/test/compiler/compilercontrol/directives/ExcludeTest.java
+++ b/hotspot/test/compiler/compilercontrol/directives/ExcludeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests directives to be able to exclude methods from compilation
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.directives.ExcludeTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.directives.ExcludeTest
diff --git a/hotspot/test/compiler/compilercontrol/directives/LogTest.java b/hotspot/test/compiler/compilercontrol/directives/LogTest.java
index d5cef20..5e32238 100644
--- a/hotspot/test/compiler/compilercontrol/directives/LogTest.java
+++ b/hotspot/test/compiler/compilercontrol/directives/LogTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests directives to be able to turn on LogCompilation
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.directives.LogTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.directives.LogTest
diff --git a/hotspot/test/compiler/compilercontrol/directives/PrintTest.java b/hotspot/test/compiler/compilercontrol/directives/PrintTest.java
index 4132654..83c6136 100644
--- a/hotspot/test/compiler/compilercontrol/directives/PrintTest.java
+++ b/hotspot/test/compiler/compilercontrol/directives/PrintTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests directives to be able to turn on print_assembly
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.directives.PrintTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.directives.PrintTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java b/hotspot/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java
index 55674eb..96e8599 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/AddAndRemoveTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests directives to be able to add and remove directives
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.AddAndRemoveTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.AddAndRemoveTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java b/hotspot/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java
index 598a2ea..5cb7069 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/AddCompileOnlyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to add a directive to compile only specified methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.AddCompileOnlyTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.AddCompileOnlyTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/AddExcludeTest.java b/hotspot/test/compiler/compilercontrol/jcmd/AddExcludeTest.java
index c8be85d..dc57aa2 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/AddExcludeTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/AddExcludeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to add a directive to exclude only specified methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.AddExcludeTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.AddExcludeTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/AddLogTest.java b/hotspot/test/compiler/compilercontrol/jcmd/AddLogTest.java
index c4ffd00..91b8c93 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/AddLogTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/AddLogTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to add a directive to log only specified methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.AddLogTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.AddLogTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java b/hotspot/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java
index 5d81789..d719df0 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/AddPrintAssemblyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,14 +27,9 @@
  * @summary Tests jcmd to be able to add a directive to print assembly
  *          only for specified methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.AddPrintAssemblyTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.AddPrintAssemblyTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java b/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java
index bd01ba1..ed76061 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,10 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to clear directives added via options
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
  * @ignore 8140405
- * @build compiler.compilercontrol.jcmd.ClearDirectivesFileStackTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.ClearDirectivesFileStackTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java b/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java
index d8c8c81..8514afd 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/ClearDirectivesStackTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests clear JCMD command
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.ClearDirectivesStackTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.ClearDirectivesStackTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java b/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java
index 297ad1a..335e89c 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/PrintDirectivesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,10 @@
  * @bug 8137167
  * @summary Tests jcmd to be able to add a directive to compile only specified methods
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @requires vm.flavor != "minimal"
  *
- * @build compiler.compilercontrol.jcmd.PrintDirectivesTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.PrintDirectivesTest
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java b/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java
index 4f8dd0f..30baaed 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/StressAddJcmdBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,8 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.pool.PoolHelper;
 import compiler.compilercontrol.share.scenario.Executor;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.TimeLimitedRunner;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.wrappers.TimeLimitedRunner;
 import jdk.test.lib.Utils;
 
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java b/hotspot/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java
index 2fbe536..e5c277a 100644
--- a/hotspot/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java
+++ b/hotspot/test/compiler/compilercontrol/jcmd/StressAddMultiThreadedTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,14 +27,9 @@
  * @summary Tests jcmd to be able to add a lot of huge directive files with
  *          parallel executed jcmds until timeout has reached
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.jcmd.StressAddMultiThreadedTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.jcmd.StressAddMultiThreadedTest
diff --git a/hotspot/test/compiler/compilercontrol/logcompilation/LogTest.java b/hotspot/test/compiler/compilercontrol/logcompilation/LogTest.java
index 1535d3e..b681029 100644
--- a/hotspot/test/compiler/compilercontrol/logcompilation/LogTest.java
+++ b/hotspot/test/compiler/compilercontrol/logcompilation/LogTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Tests LogCompilation executed standalone without log commands or directives
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.logcompilation.LogTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver compiler.compilercontrol.logcompilation.LogTest
diff --git a/hotspot/test/compiler/compilercontrol/matcher/MethodMatcherTest.java b/hotspot/test/compiler/compilercontrol/matcher/MethodMatcherTest.java
index 91c7fa7..cff4982 100644
--- a/hotspot/test/compiler/compilercontrol/matcher/MethodMatcherTest.java
+++ b/hotspot/test/compiler/compilercontrol/matcher/MethodMatcherTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,9 +26,9 @@
  * @bug 8135068
  * @summary Tests CompilerCommand's method matcher
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.matcher.MethodMatcherTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -40,7 +40,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.method.MethodGenerator;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import sun.hotspot.WhiteBox;
 
 import java.lang.reflect.Executable;
diff --git a/hotspot/test/compiler/compilercontrol/mixed/RandomCommandsTest.java b/hotspot/test/compiler/compilercontrol/mixed/RandomCommandsTest.java
index 85cb8c6..b7fd903 100644
--- a/hotspot/test/compiler/compilercontrol/mixed/RandomCommandsTest.java
+++ b/hotspot/test/compiler/compilercontrol/mixed/RandomCommandsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Randomly generates commands with random types
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.mixed.RandomCommandsTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver/timeout=600 compiler.compilercontrol.mixed.RandomCommandsTest
diff --git a/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java b/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java
index 4b1b6f6..9a1e9ce 100644
--- a/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java
+++ b/hotspot/test/compiler/compilercontrol/mixed/RandomValidCommandsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,9 @@
  * @bug 8137167
  * @summary Randomly generates valid commands with random types
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.compilercontrol.mixed.RandomValidCommandsTest
- *        compiler.compilercontrol.share.pool.sub.*
- *        compiler.compilercontrol.share.pool.subpack.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
- *        compiler.compilercontrol.share.actions.*
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver/timeout=600 compiler.compilercontrol.mixed.RandomValidCommandsTest
diff --git a/hotspot/test/compiler/compilercontrol/parser/DirectiveParserTest.java b/hotspot/test/compiler/compilercontrol/parser/DirectiveParserTest.java
index a362e02..b230b1d 100644
--- a/hotspot/test/compiler/compilercontrol/parser/DirectiveParserTest.java
+++ b/hotspot/test/compiler/compilercontrol/parser/DirectiveParserTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8137167
  * @summary Tests directive json parser
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
  * @run driver compiler.compilercontrol.parser.DirectiveParserTest
  */
@@ -35,7 +35,7 @@
 
 import compiler.compilercontrol.share.JSONFile;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 
 public class DirectiveParserTest {
diff --git a/hotspot/test/compiler/compilercontrol/parser/DirectiveStressTest.java b/hotspot/test/compiler/compilercontrol/parser/DirectiveStressTest.java
index fa95072..2cf7dbe 100644
--- a/hotspot/test/compiler/compilercontrol/parser/DirectiveStressTest.java
+++ b/hotspot/test/compiler/compilercontrol/parser/DirectiveStressTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8137167
  * @summary Stress directive json parser
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
  * @run driver compiler.compilercontrol.parser.DirectiveStressTest
  */
@@ -38,7 +38,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.pool.PoolHelper;
 import compiler.compilercontrol.share.scenario.DirectiveWriter;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.util.List;
 import java.util.stream.Collectors;
diff --git a/hotspot/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java b/hotspot/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java
index 6bf5932..9cd25bb 100644
--- a/hotspot/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java
+++ b/hotspot/test/compiler/compilercontrol/parser/HugeDirectiveUtil.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.scenario.DirectiveWriter;
 import compiler.compilercontrol.share.scenario.Scenario;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 
 import java.util.EnumSet;
diff --git a/hotspot/test/compiler/compilercontrol/share/AbstractTestBase.java b/hotspot/test/compiler/compilercontrol/share/AbstractTestBase.java
index 0baf937..2bec3f9 100644
--- a/hotspot/test/compiler/compilercontrol/share/AbstractTestBase.java
+++ b/hotspot/test/compiler/compilercontrol/share/AbstractTestBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.method.MethodGenerator;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.List;
diff --git a/hotspot/test/compiler/compilercontrol/share/actions/BaseAction.java b/hotspot/test/compiler/compilercontrol/share/actions/BaseAction.java
index d8a5bd1..424e7e8 100644
--- a/hotspot/test/compiler/compilercontrol/share/actions/BaseAction.java
+++ b/hotspot/test/compiler/compilercontrol/share/actions/BaseAction.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
 
 import compiler.compilercontrol.share.pool.PoolHelper;
 import compiler.compilercontrol.share.scenario.State;
-import jdk.test.lib.Pair;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.util.Pair;
+import jdk.test.lib.process.ProcessTools;
 
 import java.io.BufferedReader;
 import java.io.IOException;
diff --git a/hotspot/test/compiler/compilercontrol/share/actions/CompileAction.java b/hotspot/test/compiler/compilercontrol/share/actions/CompileAction.java
index e01c533..515aced 100644
--- a/hotspot/test/compiler/compilercontrol/share/actions/CompileAction.java
+++ b/hotspot/test/compiler/compilercontrol/share/actions/CompileAction.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 import compiler.compilercontrol.share.scenario.State;
 import compiler.testlibrary.CompilerUtils;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/compiler/compilercontrol/share/method/MethodDescriptor.java b/hotspot/test/compiler/compilercontrol/share/method/MethodDescriptor.java
index 11848d8..30c9a4d 100644
--- a/hotspot/test/compiler/compilercontrol/share/method/MethodDescriptor.java
+++ b/hotspot/test/compiler/compilercontrol/share/method/MethodDescriptor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package compiler.compilercontrol.share.method;
 
-import jdk.test.lib.Triple;
+import jdk.test.lib.util.Triple;
 
 import java.lang.reflect.Executable;
 import java.util.function.Function;
diff --git a/hotspot/test/compiler/compilercontrol/share/method/MethodGenerator.java b/hotspot/test/compiler/compilercontrol/share/method/MethodGenerator.java
index 50f5136..43f53bc 100644
--- a/hotspot/test/compiler/compilercontrol/share/method/MethodGenerator.java
+++ b/hotspot/test/compiler/compilercontrol/share/method/MethodGenerator.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,8 @@
 import compiler.compilercontrol.share.method.MethodDescriptor.PatternType;
 import compiler.compilercontrol.share.method.MethodDescriptor.Separator;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
-import jdk.test.lib.Triple;
+import jdk.test.lib.util.Pair;
+import jdk.test.lib.util.Triple;
 import jdk.test.lib.Utils;
 
 import java.lang.reflect.Executable;
diff --git a/hotspot/test/compiler/compilercontrol/share/pool/MethodHolder.java b/hotspot/test/compiler/compilercontrol/share/pool/MethodHolder.java
index a7b367a..4c3e010 100644
--- a/hotspot/test/compiler/compilercontrol/share/pool/MethodHolder.java
+++ b/hotspot/test/compiler/compilercontrol/share/pool/MethodHolder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package compiler.compilercontrol.share.pool;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.lang.reflect.Method;
diff --git a/hotspot/test/compiler/compilercontrol/share/pool/PoolHelper.java b/hotspot/test/compiler/compilercontrol/share/pool/PoolHelper.java
index ed06e1b..4dccdff 100644
--- a/hotspot/test/compiler/compilercontrol/share/pool/PoolHelper.java
+++ b/hotspot/test/compiler/compilercontrol/share/pool/PoolHelper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package compiler.compilercontrol.share.pool;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/compilercontrol/share/pool/SubMethodHolder.java b/hotspot/test/compiler/compilercontrol/share/pool/SubMethodHolder.java
index e9f23fc..9b7fc4c 100644
--- a/hotspot/test/compiler/compilercontrol/share/pool/SubMethodHolder.java
+++ b/hotspot/test/compiler/compilercontrol/share/pool/SubMethodHolder.java
@@ -1,6 +1,6 @@
 package compiler.compilercontrol.share.pool;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Executable;
diff --git a/hotspot/test/compiler/compilercontrol/share/processors/CommandProcessor.java b/hotspot/test/compiler/compilercontrol/share/processors/CommandProcessor.java
index 6d28e1e..947f0a4 100644
--- a/hotspot/test/compiler/compilercontrol/share/processors/CommandProcessor.java
+++ b/hotspot/test/compiler/compilercontrol/share/processors/CommandProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 import compiler.compilercontrol.share.scenario.CompileCommand;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.util.Iterator;
 import java.util.List;
diff --git a/hotspot/test/compiler/compilercontrol/share/processors/LogProcessor.java b/hotspot/test/compiler/compilercontrol/share/processors/LogProcessor.java
index 0cfc7d6..98fce87 100644
--- a/hotspot/test/compiler/compilercontrol/share/processors/LogProcessor.java
+++ b/hotspot/test/compiler/compilercontrol/share/processors/LogProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import compiler.compilercontrol.share.pool.PoolHelper;
 import compiler.compilercontrol.share.scenario.State;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.io.File;
 import java.io.FileNotFoundException;
diff --git a/hotspot/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java b/hotspot/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java
index 6abc192..51b2835 100644
--- a/hotspot/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java
+++ b/hotspot/test/compiler/compilercontrol/share/processors/PrintDirectivesProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.scenario.CompileCommand;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.util.ArrayList;
 import java.util.Iterator;
diff --git a/hotspot/test/compiler/compilercontrol/share/processors/PrintProcessor.java b/hotspot/test/compiler/compilercontrol/share/processors/PrintProcessor.java
index 9fa00c1..c023d01 100644
--- a/hotspot/test/compiler/compilercontrol/share/processors/PrintProcessor.java
+++ b/hotspot/test/compiler/compilercontrol/share/processors/PrintProcessor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 import compiler.compilercontrol.share.method.MethodGenerator;
 import compiler.compilercontrol.share.pool.PoolHelper;
 import compiler.compilercontrol.share.scenario.State;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.lang.management.ManagementFactory;
 import java.lang.reflect.Executable;
diff --git a/hotspot/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java b/hotspot/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java
index 2173128..6d550c9 100644
--- a/hotspot/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java
+++ b/hotspot/test/compiler/compilercontrol/share/scenario/AbstractCommandBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java b/hotspot/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java
index 124c265..3797d1f 100644
--- a/hotspot/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java
+++ b/hotspot/test/compiler/compilercontrol/share/scenario/DirectiveBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.method.MethodGenerator;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/compilercontrol/share/scenario/Executor.java b/hotspot/test/compiler/compilercontrol/share/scenario/Executor.java
index bd387d9..fbd3f13 100644
--- a/hotspot/test/compiler/compilercontrol/share/scenario/Executor.java
+++ b/hotspot/test/compiler/compilercontrol/share/scenario/Executor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
 
 import compiler.compilercontrol.share.actions.BaseAction;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 
diff --git a/hotspot/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java b/hotspot/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java
index bf12f99..f36d5fb 100644
--- a/hotspot/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java
+++ b/hotspot/test/compiler/compilercontrol/share/scenario/JcmdStateBuilder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.compilercontrol.share.method.MethodDescriptor;
 import compiler.compilercontrol.share.method.MethodGenerator;
 import compiler.compilercontrol.share.pool.PoolHelper;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/compilercontrol/share/scenario/Scenario.java b/hotspot/test/compiler/compilercontrol/share/scenario/Scenario.java
index 8a1723f..8c860de 100644
--- a/hotspot/test/compiler/compilercontrol/share/scenario/Scenario.java
+++ b/hotspot/test/compiler/compilercontrol/share/scenario/Scenario.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
 import compiler.compilercontrol.share.processors.PrintDirectivesProcessor;
 import compiler.compilercontrol.share.processors.PrintProcessor;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.Pair;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.util.Pair;
 
 import java.lang.reflect.Executable;
 import java.util.ArrayList;
diff --git a/hotspot/test/compiler/cpuflags/RestoreMXCSR.java b/hotspot/test/compiler/cpuflags/RestoreMXCSR.java
index b0df389..68138af 100644
--- a/hotspot/test/compiler/cpuflags/RestoreMXCSR.java
+++ b/hotspot/test/compiler/cpuflags/RestoreMXCSR.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8020433
  * @summary Crash when using -XX:+RestoreMXCSROnJNICalls
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -34,8 +34,8 @@
 
 package compiler.cpuflags;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class RestoreMXCSR {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java b/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
index c5c4db0..5f3b533 100644
--- a/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
+++ b/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @ignore 8146128
- * @build compiler.cpuflags.TestAESIntrinsicsOnSupportedConfig
- *        compiler.codegen.aes.TestAESMain
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -39,9 +38,9 @@
 
 package compiler.cpuflags;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestAESIntrinsicsOnSupportedConfig extends AESIntrinsicsBase {
 
diff --git a/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java b/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java
index caef413..4defa87 100644
--- a/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/cpuflags/TestAESIntrinsicsOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.cpuflags.TestAESIntrinsicsOnUnsupportedConfig
- *        compiler.codegen.aes.TestAESMain
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -39,8 +38,8 @@
 
 package compiler.cpuflags;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.cli.predicate.NotPredicate;
 
 public class TestAESIntrinsicsOnUnsupportedConfig extends AESIntrinsicsBase {
diff --git a/hotspot/test/compiler/debug/VerifyAdapterSharing.java b/hotspot/test/compiler/debug/VerifyAdapterSharing.java
index 263f263..00ec029 100644
--- a/hotspot/test/compiler/debug/VerifyAdapterSharing.java
+++ b/hotspot/test/compiler/debug/VerifyAdapterSharing.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8030783
  * @summary Regression test for 8026478
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -34,8 +34,8 @@
 
 package compiler.debug;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class VerifyAdapterSharing {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/compiler/eliminateAutobox/UnsignedLoads.java b/hotspot/test/compiler/eliminateAutobox/UnsignedLoads.java
index e5dbe6a..a54e030 100644
--- a/hotspot/test/compiler/eliminateAutobox/UnsignedLoads.java
+++ b/hotspot/test/compiler/eliminateAutobox/UnsignedLoads.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:+EliminateAutoBox
  *                   -XX:CompileOnly=::valueOf,::byteValue,::shortValue,::testUnsignedByte,::testUnsignedShort
diff --git a/hotspot/test/compiler/floatingpoint/TestPow2.java b/hotspot/test/compiler/floatingpoint/TestPow2.java
index 28e4f4c..5cf0aee 100644
--- a/hotspot/test/compiler/floatingpoint/TestPow2.java
+++ b/hotspot/test/compiler/floatingpoint/TestPow2.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8063086
  * @summary X^2 special case for C2 yields different result than interpreter
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.floatingpoint.TestPow2
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/gcbarriers/PreserveFPRegistersTest.java b/hotspot/test/compiler/gcbarriers/PreserveFPRegistersTest.java
index 483f99d..7884673 100644
--- a/hotspot/test/compiler/gcbarriers/PreserveFPRegistersTest.java
+++ b/hotspot/test/compiler/gcbarriers/PreserveFPRegistersTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8148175
  * @requires vm.gc=="G1" | vm.gc=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @run main/bootclasspath/othervm -Xbatch -XX:+UnlockDiagnosticVMOptions
  *      -XX:+WhiteBoxAPI -Xmx300m -XX:+UseG1GC
  *      compiler.gcbarriers.PreserveFPRegistersTest
diff --git a/hotspot/test/compiler/inlining/InlineAccessors.java b/hotspot/test/compiler/inlining/InlineAccessors.java
index 10d9f8e..df2c66d 100644
--- a/hotspot/test/compiler/inlining/InlineAccessors.java
+++ b/hotspot/test/compiler/inlining/InlineAccessors.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,15 @@
  * @bug 8140650
  * @summary Method::is_accessor should cover getters and setters for all types
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run driver compiler.inlining.InlineAccessors
  */
 
 package compiler.inlining;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class InlineAccessors {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/compiler/interpreter/DisableOSRTest.java b/hotspot/test/compiler/interpreter/DisableOSRTest.java
index 8bdd1ce..6676c29 100644
--- a/hotspot/test/compiler/interpreter/DisableOSRTest.java
+++ b/hotspot/test/compiler/interpreter/DisableOSRTest.java
@@ -26,7 +26,7 @@
  * @bug 8159620
  * @summary testing that -XX:-UseOnStackReplacement works with both -XX:(+/-)TieredCompilation
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java b/hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java
index ddc5bd0..2be9bf6 100644
--- a/hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java
+++ b/hotspot/test/compiler/intrinsics/IntrinsicAvailableTest.java
@@ -25,9 +25,9 @@
  * @test
  * @bug 8130832
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  *
- * @build compiler.intrinsics.IntrinsicAvailableTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/intrinsics/IntrinsicDisabledTest.java b/hotspot/test/compiler/intrinsics/IntrinsicDisabledTest.java
index 53cf827..3523aa6 100644
--- a/hotspot/test/compiler/intrinsics/IntrinsicDisabledTest.java
+++ b/hotspot/test/compiler/intrinsics/IntrinsicDisabledTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @bug 8138651
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.intrinsics.IntrinsicDisabledTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java b/hotspot/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java
index 01f3ce7..b524ca4 100644
--- a/hotspot/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java
+++ b/hotspot/test/compiler/intrinsics/bigInteger/MontgomeryMultiplyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2015, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -28,9 +28,9 @@
  * @summary Verify that the Montgomery multiply and square intrinsic works and correctly checks their arguments.
  * @requires vm.flavor == "server"
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
- * @build compiler.intrinsics.bigInteger.MontgomeryMultiplyTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/BMITestRunner.java b/hotspot/test/compiler/intrinsics/bmi/BMITestRunner.java
index 7ca7784..bda3b5e 100644
--- a/hotspot/test/compiler/intrinsics/bmi/BMITestRunner.java
+++ b/hotspot/test/compiler/intrinsics/bmi/BMITestRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
 package compiler.intrinsics.bmi;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 
 import java.io.IOException;
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestAndnI.java b/hotspot/test/compiler/intrinsics/bmi/TestAndnI.java
index bb8f971..cee9666 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestAndnI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestAndnI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,12 +27,10 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of ANDN instruction
- * @library /testlibrary /test/lib
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.intrinsics.bmi.TestAndnI
- *        compiler.intrinsics.bmi.BMITestRunner
- *        compiler.intrinsics.bmi.Expr
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestAndnL.java b/hotspot/test/compiler/intrinsics/bmi/TestAndnL.java
index 9409510..2516e14 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestAndnL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestAndnL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of ANDN instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestAndnL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsiI.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsiI.java
index a7bad9e..a7b37ef 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsiI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsiI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSI instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsiI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsiL.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsiL.java
index 90254f5..42b3581 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsiL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsiL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSI instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsiL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsmskI.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsmskI.java
index 818c141..78e7e76 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsmskI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsmskI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSMSK instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsmskI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsmskL.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsmskL.java
index 8c5c6b5..657bd04 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsmskL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsmskL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSMSK instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsmskL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsrI.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsrI.java
index 1d759d6..0f24d4a 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsrI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsrI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSR instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsrI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestBlsrL.java b/hotspot/test/compiler/intrinsics/bmi/TestBlsrL.java
index f299a77..592e37e 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestBlsrL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestBlsrL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of BLSR instruction
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestBlsrL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestLzcntI.java b/hotspot/test/compiler/intrinsics/bmi/TestLzcntI.java
index 31ac4ea..d2bdada 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestLzcntI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestLzcntI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of intrinsic
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestLzcntI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestLzcntL.java b/hotspot/test/compiler/intrinsics/bmi/TestLzcntL.java
index f27f845..c175040 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestLzcntL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestLzcntL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of intrinsic
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestLzcntL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestTzcntI.java b/hotspot/test/compiler/intrinsics/bmi/TestTzcntI.java
index c75e28d..a679efa 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestTzcntI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestTzcntI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of intrinsic
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestTzcntI BMITestRunner Expr
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/TestTzcntL.java b/hotspot/test/compiler/intrinsics/bmi/TestTzcntL.java
index f561681..040d081 100644
--- a/hotspot/test/compiler/intrinsics/bmi/TestTzcntL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/TestTzcntL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031321
  * @summary Verify that results of computations are the same w/
  *          and w/o usage of intrinsic
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.TestTzcntL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java
index ae940d7..f307a3e 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestI.java
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.AndnTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/bootclasspath/othervm -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java
index cf2729e..dd1bc57 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/AndnTestL.java
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.AndnTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/bootclasspath/othervm -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java
index 944d874..a5e34b5 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsiTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java
index 5d98755..72eb85a 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsiTestL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsiTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java
index 0ed1d9d..a5829a7 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsmskTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java
index 9554c5e..9198bc7 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsmskTestL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsmskTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java
index b11e275..2ab1c78 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsrTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java
index 08038e1..3addea2 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/BlsrTestL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.BlsrTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java
index e2ba693..886d462 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.LZcntTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java
index d68a32f..b6bf6b5 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/LZcntTestL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.LZcntTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java
index 4ab25be..8a5e861 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.TZcntTestI
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java
index 02359f6..44f79d0 100644
--- a/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java
+++ b/hotspot/test/compiler/intrinsics/bmi/verifycode/TZcntTestL.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8031321
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.bmi.verifycode.TZcntTestL
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java b/hotspot/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
index cb6d70c..b2a9554 100644
--- a/hotspot/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
+++ b/hotspot/test/compiler/intrinsics/klass/CastNullCheckDroppingsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,13 @@
  * @bug 8054492
  * @summary Casting can result in redundant null checks in generated code
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.*
- * @build compiler.intrinsics.klass.CastNullCheckDroppingsTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
- *                                jdk.test.lib.Platform
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   -Xmixed -XX:-BackgroundCompilation -XX:-TieredCompilation -XX:CompileThreshold=1000
  *                   -XX:CompileCommand=exclude,compiler.intrinsics.klass.CastNullCheckDroppingsTest::runTest
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java
index c8f3c1a..ab9f731 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactIConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8024924
  * @summary Test constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactILoadTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactILoadTest.java
index 517abe27..1c14f1c 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactILoadTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactILoadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8024924
  * @summary Test non constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
index a655e1e..b1f84f5 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8024924
  * @summary Test non constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java
index d1f0d42..82aba8e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactINonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8024924
  * @summary Test non constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java
index 649962d..7cc4f52 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactIRepeatTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8025657
  * @summary Test repeating addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java
index 10cf900..eb8c24e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactLConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java
index 32765a5..86f2d86 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/AddExactLNonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant addExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/DecExactITest.java b/hotspot/test/compiler/intrinsics/mathexact/DecExactITest.java
index 2f77174..3ba628e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/DecExactITest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/DecExactITest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test decrementExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/DecExactLTest.java b/hotspot/test/compiler/intrinsics/mathexact/DecExactLTest.java
index a24db22..0a72250 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/DecExactLTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/DecExactLTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test decrementExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/IncExactITest.java b/hotspot/test/compiler/intrinsics/mathexact/IncExactITest.java
index 8d38cf4..6fa2588 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/IncExactITest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/IncExactITest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test incrementExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/IncExactLTest.java b/hotspot/test/compiler/intrinsics/mathexact/IncExactLTest.java
index 3634764..52f6ba1 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/IncExactLTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/IncExactLTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test incrementExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java
index d30cb0d..1f3d909 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactIConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant multiplyExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactILoadTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactILoadTest.java
index 7db6a1d..49f909d 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactILoadTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactILoadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test multiplyExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java
index 086b530..f948e39 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactILoopDependentTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test loop dependent multiplyExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java
index 2ef12ea..9079d1c 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactINonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant multiplyExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java
index f1174d7..b638542 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactIRepeatTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test repeating multiplyExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java
index b340670..8a60b42 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactLConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant mulExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java
index ef6acae..9668f09 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/MulExactLNonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant mulExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java
index 85ef97a..c979713 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactIConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant negExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactILoadTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactILoadTest.java
index 9b00f83..1a56130 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactILoadTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactILoadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test negExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java
index 48b02c0..0ab86d3 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactILoopDependentTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test negExact loop dependent
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java
index 34a20d6..e751a21 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactINonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant negExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java
index b1d086a..c36917e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactLConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant negExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java
index f28d298..68dcacf 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/NegExactLNonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant negExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactICondTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactICondTest.java
index 95a177f..3ca4f72 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactICondTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactICondTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test subtractExact as condition
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java
index bcb9a1a..a0a2726 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactIConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactILoadTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactILoadTest.java
index 186f629..0ee861e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactILoadTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactILoadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java
index 880425e..4bb55a2 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactILoopDependentTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java
index 222649d..72d754c 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactINonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test non constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java
index 49631cf..61db69f 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactIRepeatTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8026844
  * @summary Test repeating subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java
index 996dab7..040f3eb 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactLConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8026844
  * @bug 8027353
  * @summary Test constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java b/hotspot/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java
index d1d1173..6ebe6fd 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/SubExactLNonConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8026844
  * @bug 8027353
  * @summary Test non constant subtractExact
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java
index 5b701af..cc95c6e 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.AddExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java
index 48dfddd..1ef33c4 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/AddExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.AddExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java
index ff17806..6c99623 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.DecrementExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java
index 2683a59..c1fad95 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.DecrementExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java
index 4c6569a..98133d7 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.IncrementExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java
index fa67b74..e5c4c3c 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.IncrementExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java
index 3883868..86a432b 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.MultiplyExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java
index 5000ea8..65cc284 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.MultiplyExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java
index a67b499..f6ea016 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.NegateExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java
index 038f014..50e5095 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.NegateExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java
index c74b7f7..d64757d 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,11 +23,11 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.mathexact.sanity.SubtractExactIntTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java b/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java
index 263059d..f3a024a 100644
--- a/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java
+++ b/hotspot/test/compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,10 @@
 
 /*
  * @test
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.intrinsics.mathexact.sanity.SubtractExactLongTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/object/TestClone.java b/hotspot/test/compiler/intrinsics/object/TestClone.java
index 1e96632..8bd3e88 100644
--- a/hotspot/test/compiler/intrinsics/object/TestClone.java
+++ b/hotspot/test/compiler/intrinsics/object/TestClone.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 8033626
  * @summary assert(ex_map->jvms()->same_calls_as(_exceptions->jvms())) failed: all collected exceptions must come from the same place
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -XX:-TieredCompilation -Xbatch
  *      -XX:CompileCommand=compileonly,compiler.intrinsics.object.TestClone::f
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
index 44fd2f3..7602829 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA1Intrinsics option processing on supported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA1IntrinsicsOptionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java
index a4d7f2a..558b421 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA1IntrinsicsOptionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA1Intrinsics option processing on unsupported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA1IntrinsicsOptionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java
index 33e19ec..92e4c33 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA256Intrinsics option processing on supported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA256IntrinsicsOptionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java
index c9f5ec5..3ed72bf 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA256IntrinsicsOptionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA256Intrinsics option processing on unsupported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA256IntrinsicsOptionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
index b5f2ac2..d064946 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA512Intrinsics option processing on supported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA512IntrinsicsOptionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java
index 26c989e..c05cf30 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHA512IntrinsicsOptionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA512Intrinsics option processing on unsupported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHA512IntrinsicsOptionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java
index 7938712..cc95d3c 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA option processing on supported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.intrinsics.sha.cli.TestUseSHAOptionOnSupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java
index 4a5a34c..58ce536 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/TestUseSHAOptionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test
  * @bug 8035968
  * @summary Verify UseSHA option processing on unsupported CPU.
- * @library /testlibrary /test/lib testcases /
+ * @library /test/lib testcases /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.intrinsics.sha.cli.TestUseSHAOptionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java
index 24487f8..9d89494 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForOtherCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package compiler.intrinsics.sha.cli.testcases;
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.NotPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java
index de67a39..f072a2d 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package compiler.intrinsics.sha.cli.testcases;
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java
index 64e60e8..0c85433 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedAArch64CPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package compiler.intrinsics.sha.cli.testcases;
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java
index 4698160..196c23a 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedSparcCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package compiler.intrinsics.sha.cli.testcases;
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java
index 2b90bed..3f94cdf 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/GenericTestCaseForUnsupportedX86CPU.java
@@ -24,7 +24,7 @@
 package compiler.intrinsics.sha.cli.testcases;
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java
index 3618147..e8b16e6 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHAIntrinsicsSpecificTestCaseForUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
 import compiler.testlibrary.sha.predicate.IntrinsicPredicates;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java
index 0a13cdb..6363614 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForSupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
 import compiler.testlibrary.sha.predicate.IntrinsicPredicates;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java
index 55e0f5b..4cb1a06 100644
--- a/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java
+++ b/hotspot/test/compiler/intrinsics/sha/cli/testcases/UseSHASpecificTestCaseForUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import compiler.intrinsics.sha.cli.SHAOptionsBase;
 import compiler.testlibrary.sha.predicate.IntrinsicPredicates;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java
index 71fd922..facfb7a 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1Intrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-1 intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA1Intrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java
index ffc8185..001dd7f 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA1MultiBlockIntrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-1 multi block intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA1MultiBlockIntrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java
index 85aa415..9a3c643 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256Intrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-256 intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA256Intrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java
index 292e0d0..6d8592d 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA256MultiBlockIntrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-256 multi block intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA256MultiBlockIntrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java
index de8be87..26cce56 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512Intrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-512 intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA512Intrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java
index 0086412..29151dd 100644
--- a/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java
+++ b/hotspot/test/compiler/intrinsics/sha/sanity/TestSHA512MultiBlockIntrinsics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8035968
  * @summary Verify that SHA-512 multi block intrinsic is actually used.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.testlibrary.intrinsics.Verifier
- *        compiler.intrinsics.sha.sanity.TestSHA512MultiBlockIntrinsics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/intrinsics/string/TestHasNegatives.java b/hotspot/test/compiler/intrinsics/string/TestHasNegatives.java
index df75e4d..df8dd7a 100644
--- a/hotspot/test/compiler/intrinsics/string/TestHasNegatives.java
+++ b/hotspot/test/compiler/intrinsics/string/TestHasNegatives.java
@@ -30,7 +30,6 @@
  * @library /compiler/patches
  *
  * @build java.base/java.lang.Helper
- * @build compiler.intrinsics.string.TestHasNegatives
  * @run main compiler.intrinsics.string.TestHasNegatives
  */
 
diff --git a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java
index 6918b52..053445d5 100644
--- a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java
+++ b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicMemoryFlow.java
@@ -26,7 +26,7 @@
  * @bug 8144212
  * @summary Check for correct memory flow with the String compress/inflate intrinsics.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main compiler.intrinsics.string.TestStringIntrinsicMemoryFlow
  */
diff --git a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java
index c5ed25c..3486950 100644
--- a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java
+++ b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsicRangeChecks.java
@@ -27,9 +27,8 @@
  * @test
  * @bug 8155608
  * @summary Verifies that string intrinsics throw array out of bounds exceptions.
- * @library /compiler/patches /testlibrary /test/lib
+ * @library /compiler/patches /test/lib
  * @build java.base/java.lang.Helper
- * @build compiler.intrinsics.string.TestStringIntrinsicRangeChecks
  * @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:-TieredCompilation compiler.intrinsics.string.TestStringIntrinsicRangeChecks
  */
 package compiler.intrinsics.string;
diff --git a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsics2.java b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsics2.java
index ef3ffe1..5c4f334 100644
--- a/hotspot/test/compiler/intrinsics/string/TestStringIntrinsics2.java
+++ b/hotspot/test/compiler/intrinsics/string/TestStringIntrinsics2.java
@@ -27,7 +27,7 @@
  * @bug 8145336
  * @summary PPC64: fix string intrinsics after CompactStrings change
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java b/hotspot/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java
index 5c27653..e35a5d7 100644
--- a/hotspot/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java
+++ b/hotspot/test/compiler/intrinsics/unsafe/DirectByteBufferTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8026049 8151163
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses -Djdk.test.lib.random.seed=0 DirectByteBufferTest
  * @run main/othervm -Djdk.test.lib.random.seed=0 DirectByteBufferTest
  * @summary Verify that direct byte buffers are correctly accessed.
diff --git a/hotspot/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java b/hotspot/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java
index e09fa47..d548a69 100644
--- a/hotspot/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java
+++ b/hotspot/test/compiler/intrinsics/unsafe/HeapByteBufferTest.java
@@ -27,7 +27,7 @@
  * @bug 8026049 8151163
  * @summary Verify that byte buffers are correctly accessed.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-UseUnalignedAccesses -Djdk.test.lib.random.seed=0
  *      HeapByteBufferTest
diff --git a/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java b/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java
index 7830744..973b213e 100644
--- a/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java
+++ b/hotspot/test/compiler/intrinsics/unsafe/TestUnsafeMismatchedArrayFieldAccess.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 8142386
  * @summary Unsafe access to an array is wrongly marked as mismatched
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
  * @run main/othervm -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:-TieredCompilation
  *      compiler.intrinsics.unsafe.TestUnsafeMismatchedArrayFieldAccess
diff --git a/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java b/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java
index c1f92ef..ad4815a 100644
--- a/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java
+++ b/hotspot/test/compiler/jsr292/ConcurrentClassLoadingTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8022595
  * @summary JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
index f932b62..d9f2ddb 100644
--- a/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
+++ b/hotspot/test/compiler/jsr292/ContinuousCallSiteTargetChange.java
@@ -24,15 +24,15 @@
 /**
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /
+ * @library /test/lib /
  *
  * @run driver compiler.jsr292.ContinuousCallSiteTargetChange
  */
 
 package compiler.jsr292;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.lang.invoke.CallSite;
 import java.lang.invoke.MethodHandle;
diff --git a/hotspot/test/compiler/jsr292/MHInlineTest.java b/hotspot/test/compiler/jsr292/MHInlineTest.java
index 150b79e..df73ea9 100644
--- a/hotspot/test/compiler/jsr292/MHInlineTest.java
+++ b/hotspot/test/compiler/jsr292/MHInlineTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,15 +26,15 @@
  * @bug 8062280
  * @summary C2: inlining failure due to access checks being too strict
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /
+ * @library /test/lib /
  *
  * @run main/othervm compiler.jsr292.MHInlineTest
  */
 
 package compiler.jsr292;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
diff --git a/hotspot/test/compiler/jsr292/NonInlinedCall/Agent.java b/hotspot/test/compiler/jsr292/NonInlinedCall/Agent.java
index 93540ea..32f29df 100644
--- a/hotspot/test/compiler/jsr292/NonInlinedCall/Agent.java
+++ b/hotspot/test/compiler/jsr292/NonInlinedCall/Agent.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 package compiler.jsr292.NonInlinedCall;
 
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.io.File;
 import java.io.PrintStream;
diff --git a/hotspot/test/compiler/jsr292/NonInlinedCall/GCTest.java b/hotspot/test/compiler/jsr292/NonInlinedCall/GCTest.java
index 02b06fa..8ae5432 100644
--- a/hotspot/test/compiler/jsr292/NonInlinedCall/GCTest.java
+++ b/hotspot/test/compiler/jsr292/NonInlinedCall/GCTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8072008
- * @library /testlibrary /test/lib ../patches
+ * @library /test/lib ../patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.vm.annotation
  *
diff --git a/hotspot/test/compiler/jsr292/NonInlinedCall/InvokeTest.java b/hotspot/test/compiler/jsr292/NonInlinedCall/InvokeTest.java
index 15ca369..c9569d0 100644
--- a/hotspot/test/compiler/jsr292/NonInlinedCall/InvokeTest.java
+++ b/hotspot/test/compiler/jsr292/NonInlinedCall/InvokeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,12 @@
 /*
  * @test
  * @bug 8072008
- * @library /testlibrary /test/lib / ../patches
+ * @library /test/lib / ../patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.vm.annotation
  *
  * @build java.base/java.lang.invoke.MethodHandleHelper
  *        sun.hotspot.WhiteBox
- *        compiler.jsr292.NonInlinedCall.InvokeTest
  * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions
  *                                 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                                 -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1
diff --git a/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java b/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java
index dbd9f92..806b7490 100644
--- a/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java
+++ b/hotspot/test/compiler/jsr292/NonInlinedCall/RedefineTest.java
@@ -27,7 +27,7 @@
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.vm.annotation
- * @library /testlibrary /test/lib / ../patches
+ * @library /test/lib / ../patches
  * @requires vm.flavor != "minimal"
  *
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/jsr292/PollutedTrapCounts.java b/hotspot/test/compiler/jsr292/PollutedTrapCounts.java
index 9090513..438cefd 100644
--- a/hotspot/test/compiler/jsr292/PollutedTrapCounts.java
+++ b/hotspot/test/compiler/jsr292/PollutedTrapCounts.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,15 @@
  * @test
  * @bug 8074551
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  *
  * @run driver compiler.jsr292.PollutedTrapCounts
  */
 
 package compiler.jsr292;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.lang.invoke.MethodHandle;
 import java.lang.invoke.MethodHandles;
diff --git a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java
index 28036f3..8abfeb2 100644
--- a/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java
+++ b/hotspot/test/compiler/jvmci/JVM_GetJVMCIRuntimeTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.runtime
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
diff --git a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java
index 529f7ac..5284fd2 100644
--- a/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java
+++ b/hotspot/test/compiler/jvmci/SecurityRestrictionsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java
index e9608ee..b6e9f7e 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/AllocateCompileIdTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -33,9 +33,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.AllocateCompileIdTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
@@ -49,7 +47,7 @@
 
 import compiler.jvmci.common.CTVMUtilities;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.Utils;
 import jdk.vm.ci.hotspot.CompilerToVMHelper;
 import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java
index dea8cb2..9fdb7c7 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/CanInlineMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,9 +34,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.CanInlineMethodTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java
index 46beea7..b3627b7 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/CollectCountersTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib/
+ * @library / /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.CollectCountersTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  *                   -XX:+EnableJVMCI
  *                   -XX:JVMCICounterSize=0
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java b/hotspot/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java
index 697aee2..7bc8b99 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/CompileCodeTestCase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 
 import compiler.jvmci.common.CTVMUtilities;
 import compiler.testlibrary.CompilerUtils;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.Utils;
 import jdk.vm.ci.code.InstalledCode;
 import sun.hotspot.WhiteBox;
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java
index b2477b7..13caa19 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DebugOutputTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.DebugOutputTest
  * @run main/othervm compiler.jvmci.compilerToVM.DebugOutputTest
  */
 
@@ -38,8 +37,8 @@
 
 package compiler.jvmci.compilerToVM;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.vm.ci.hotspot.CompilerToVMHelper;
 
 import java.util.Arrays;
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java
index 8bb3820..317ce0b 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DisassembleCodeBlobTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -35,9 +35,7 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *
  * @ignore 8139700
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.DisassembleCodeBlobTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java
index 2390557..e9e1622 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/DoNotInlineOrCompileTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,9 +34,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.DoNotInlineOrCompileTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java
index c6a36fc..90113dc 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ExecuteInstalledCodeTest.java
@@ -1,7 +1,7 @@
 package compiler.jvmci.compilerToVM;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.Utils;
 import jdk.vm.ci.code.InstalledCode;
 import jdk.vm.ci.code.InvalidInstalledCodeException;
@@ -17,7 +17,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @ignore 8139383
  * @modules java.base/jdk.internal.misc
@@ -25,9 +25,7 @@
  *          java.base/jdk.internal.org.objectweb.asm.tree
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.ExecuteInstalledCodeTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java
index 5eccc6d..32959f2 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/FindUniqueConcreteMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -35,7 +35,6 @@
  *          jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.FindUniqueConcreteMethodTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java
index 6bd182b..ecfdc11 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetBytecodeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,7 +34,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetBytecodeTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetBytecodeTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java
index c20b668..8204043 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetClassInitializerTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetClassInitializerTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetClassInitializerTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java
index 097d42e..3d8ab32 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetConstantPoolTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -36,7 +36,6 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetConstantPoolTest
  * @run main/othervm -Xbootclasspath/a:.
  *                   -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java
index 3e5ada1..a479ba4 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetExceptionTableTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,7 +34,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetExceptionTableTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetExceptionTableTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java
index dd0841d..d9dd305 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetImplementorTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib/
+ * @library / /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetImplementorTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetImplementorTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java
index ac99a5c..e86d2ab 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLineNumberTableTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
@@ -35,7 +35,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetLineNumberTableTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetLineNumberTableTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java
index 7d3b097..5c55136 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetLocalVariableTableTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -38,7 +38,6 @@
  * @compile -g DummyAbstractClass.java
  * @compile -g DummyClass.java
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetLocalVariableTableTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetLocalVariableTableTest
  * @clean compiler.jvmci.compilerToVM.*
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java
index fcdf29e..438eab2 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetMaxCallTargetOffsetTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib/
+ * @library / /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetMaxCallTargetOffsetTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetMaxCallTargetOffsetTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java
index b0c0d50..110c2cb 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetNextStackFrameTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,7 +34,6 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.meta
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetNextStackFrameTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetNextStackFrameTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java
index c863339..49a6e38 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodAtSlotTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -35,7 +35,6 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.meta
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetNextStackFrameTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetResolvedJavaMethodAtSlotTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java
index a893c71..c04196a 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,14 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  *        jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject
- * @build compiler.jvmci.compilerToVM.GetResolvedJavaMethodTest
+ *        sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java
index 2ed3686..4d0d5b8 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetResolvedJavaTypeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
@@ -34,8 +34,7 @@
  * @ignore 8158860
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  *        jdk.vm.ci/jdk.vm.ci.hotspot.PublicMetaspaceWrapperObject
- * @build compiler.jvmci.compilerToVM.GetResolvedJavaTypeTest
- * @build sun.hotspot.WhiteBox
+ *        sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java
index ec4458a..6f647dc 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetStackTraceElementTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,7 +34,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetStackTraceElementTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetStackTraceElementTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java
index 78922fa..d8f256f 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetSymbolTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,7 +34,6 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.meta
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetSymbolTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                  compiler.jvmci.compilerToVM.GetSymbolTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java
index a8a83d1..50c66cc 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/GetVtableIndexForInterfaceTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -33,7 +33,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.GetVtableIndexForInterfaceTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java
index 7349647..91c12f6 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/HasCompiledCodeForOSRTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,9 +34,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.HasCompiledCodeForOSRTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java
index dfb0d78..3c92490 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/HasFinalizableSubclassTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                  compiler.jvmci.compilerToVM.HasFinalizableSubclassTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java b/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java
index c4626d2..5e8c75a 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/InitializeConfigurationTest.java
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.InitializeConfigurationTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.InitializeConfigurationTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java
index 23ff0b9..5c245a0 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *
  * @ignore 8139700
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.InvalidateInstalledCodeTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java
index 1855ca2..9668ec4 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/IsMatureTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,12 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  *          ../common/patches
  * @modules java.base/jdk.internal.misc
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- *        compiler.jvmci.compilerToVM.IsMatureTest
  *        sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java
index ef32f13..91645ac 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/JVM_RegisterJVMCINatives.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.runtime
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java
index f036f0e..645871f 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassInPoolTest.java
@@ -27,7 +27,7 @@
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @summary Testing compiler.jvmci.CompilerToVM.lookupKlassInPool method
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -37,9 +37,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupKlassInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java
index 6e17296..5b47f4f 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupKlassRefIndexInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupKlassRefIndexInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java
index 4b4c498..bf6e66e 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupMethodInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupMethodInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java
index 88cc694..d880315 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameAndTypeRefIndexInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupNameAndTypeRefIndexInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java
index a43a453..de25e24 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupNameInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -38,7 +38,6 @@
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupNameInPoolTest
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java
index d5afc82..9eba654 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupSignatureInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -38,7 +38,6 @@
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.LookupSignatureInPoolTest
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java
index 437b561..20d57ba 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/LookupTypeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.LookupTypeTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.LookupTypeTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
index 7607d39..c4068a1 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/MaterializeVirtualObjectTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  *         & (vm.compMode != "Xcomp" | vm.opt.TieredCompilation == null | vm.opt.TieredCompilation == true)
  * @summary no "-Xcomp -XX:-TieredCompilation" combination allowed until JDK-8140018 is resolved
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.MaterializeVirtualObjectTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xmixed -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java
index e732faa..4157903 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/MethodIsIgnoredBySecurityStackWalkTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.reflect
@@ -35,7 +35,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.MethodIsIgnoredBySecurityStackWalkTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.MethodIsIgnoredBySecurityStackWalkTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java
index d9aa0b1..70f9d5f 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ReprofileTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64") & (vm.opt.TieredStopAtLevel == null | vm.opt.TieredStopAtLevel == 3)
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -35,9 +35,7 @@
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- * @build compiler.jvmci.compilerToVM.ReprofileTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java
index ba23d6a..ca82575 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveConstantInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -35,9 +35,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.ResolveConstantInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
index 6d60354..a730793 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveFieldInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.ResolveFieldInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java
index 389f558..b6164e0 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -33,7 +33,6 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.ResolveMethodTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   compiler.jvmci.compilerToVM.ResolveMethodTest
  */
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java
index 49a3cbd..45c32d9 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolvePossiblyCachedConstantInPoolTest.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8138708
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.ResolvePossiblyCachedConstantInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java
index 26fc8f8..3f7b857 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ResolveTypeInPoolTest.java
@@ -27,7 +27,7 @@
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
  * @summary Testing compiler.jvmci.CompilerToVM.resolveTypeInPool method
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
@@ -36,9 +36,7 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.meta
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build sun.hotspot.WhiteBox
- *        compiler.jvmci.compilerToVM.ResolveTypeInPoolTest
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java
index cbca06a..2e66c2e 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldDebugNonSafepointsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary /test/lib/
+ * @library / /test/lib/
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.ShouldDebugNonSafepointsTest
  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI
  *                   -XX:+UnlockDiagnosticVMOptions
  *                   -XX:+DebugNonSafepoints
diff --git a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java
index c86ff4d..61b7029 100644
--- a/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java
+++ b/hotspot/test/compiler/jvmci/compilerToVM/ShouldInlineMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -34,9 +34,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *
- * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
- * @build compiler.jvmci.compilerToVM.ShouldInlineMethodTest
- * @build sun.hotspot.WhiteBox
+ * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java
index 1f696df..4cc3524 100644
--- a/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java
+++ b/hotspot/test/compiler/jvmci/errors/TestInvalidCompilationResult.java
@@ -31,7 +31,6 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.common
  * @compile CodeInstallerTest.java
- * @build compiler.jvmci.errors.TestInvalidCompilationResult
  * @run junit/othervm -da:jdk.vm.ci... -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI compiler.jvmci.errors.TestInvalidCompilationResult
  */
 
diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java
index bcfc52f..276ca0a 100644
--- a/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java
+++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyBootstrapFinishedEventTest.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8156034
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  *          java.base/jdk.internal.org.objectweb.asm
@@ -37,7 +37,6 @@
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  * @build compiler.jvmci.common.JVMCIHelpers
- *        compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
  * @run driver jdk.test.lib.FileInstaller ../common/services/ ./META-INF/services/
  * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyBootstrapFinishedEventTest.config
  *     ./META-INF/services/jdk.vm.ci.hotspot.services.HotSpotVMEventListener
@@ -46,9 +45,6 @@
  *      compiler.jvmci.common.JVMCIHelpers$EmptyCompilerFactory
  *      compiler.jvmci.common.JVMCIHelpers$EmptyCompilationRequestResult
  *      compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
- *      compiler.jvmci.events.JvmciNotifyBootstrapFinishedEventTest
- *      jdk.test.lib.Asserts
- *      jdk.test.lib.Utils
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  *     -Djvmci.Compiler=EmptyCompiler -Xbootclasspath/a:.
  *     -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
diff --git a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java
index 6f5c83a..59ea363 100644
--- a/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java
+++ b/hotspot/test/compiler/jvmci/events/JvmciNotifyInstallEventTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library / /testlibrary
+ * @library / /test/lib
  * @library ../common/patches
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
@@ -38,7 +38,6 @@
  *
  * @build jdk.vm.ci/jdk.vm.ci.hotspot.CompilerToVMHelper
  * @build compiler.jvmci.common.JVMCIHelpers
- *     compiler.jvmci.events.JvmciNotifyInstallEventTest
  * @run driver jdk.test.lib.FileInstaller ../common/services/ ./META-INF/services/
  * @run driver jdk.test.lib.FileInstaller ./JvmciNotifyInstallEventTest.config
  *     ./META-INF/services/jdk.vm.ci.hotspot.services.HotSpotVMEventListener
@@ -46,12 +45,7 @@
  *      compiler.jvmci.common.JVMCIHelpers$EmptyHotspotCompiler
  *      compiler.jvmci.common.JVMCIHelpers$EmptyCompilerFactory
  *      compiler.jvmci.common.JVMCIHelpers$EmptyCompilationRequestResult
- *       compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
- *      compiler.jvmci.events.JvmciNotifyInstallEventTest
- *      compiler.jvmci.common.CTVMUtilities
- *      compiler.jvmci.common.testcases.SimpleClass
- *      jdk.test.lib.Asserts
- *      jdk.test.lib.Utils
+ *      compiler.jvmci.common.JVMCIHelpers$EmptyVMEventListener
  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  *     -Xbootclasspath/a:. -Xmixed
  *     -XX:+UseJVMCICompiler -XX:-BootstrapJVMCI
diff --git a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java
index d01d278..da60be0 100644
--- a/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java
+++ b/hotspot/test/compiler/jvmci/events/JvmciShutdownEventTest.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8136421
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
@@ -34,7 +34,6 @@
  *
  * @build compiler.jvmci.common.JVMCIHelpers
  *        compiler.jvmci.events.JvmciShutdownEventListener
- *        compiler.jvmci.events.JvmciShutdownEventTest
  * @run driver jdk.test.lib.FileInstaller ../common/services/ ./META-INF/services/
  * @run driver jdk.test.lib.FileInstaller ./JvmciShutdownEventTest.config
  *     ./META-INF/services/jdk.vm.ci.hotspot.services.HotSpotVMEventListener
@@ -49,7 +48,7 @@
 
 package compiler.jvmci.events;
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
 public class JvmciShutdownEventTest {
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java
index c7bb205..ccbc9d9 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java
@@ -24,7 +24,7 @@
 /**
  * @test
  * @requires (os.simpleArch == "x64" | os.simpleArch == "sparcv9") & os.arch != "aarch64"
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  * @modules jdk.vm.ci/jdk.vm.ci.hotspot
  *          jdk.vm.ci/jdk.vm.ci.code
  *          jdk.vm.ci/jdk.vm.ci.code.site
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java
index 5c9c7c6..c820b7e 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotConstantReflectionProviderTest.java
@@ -29,7 +29,7 @@
  *          jdk.vm.ci/jdk.vm.ci.hotspot
  *          java.base/jdk.internal.vm.annotation
  *          java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
+ * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
  * @build jdk.vm.ci.hotspot.test.DummyClass
  * @run driver ClassFileInstaller jdk.vm.ci.hotspot.test.DummyClass
  * @run testng/othervm/timeout=300 -Xbootclasspath/a:.
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java
index 03e7f68..e99f7bb 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MemoryAccessProviderTest.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8152341
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
+ * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.common
  *          jdk.vm.ci/jdk.vm.ci.runtime
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java
index c94d47a..601b192 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/MethodHandleAccessProviderTest.java
@@ -26,7 +26,7 @@
  * @bug 8152343
  * @bug 8161068
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
+ * @library /test/lib /compiler/jvmci/jdk.vm.ci.hotspot.test/src
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.hotspot
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java
index f345bad..69323c1 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ConstantTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.ConstantTest
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.ConstantTest
  */
 package jdk.vm.ci.runtime.test;
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java
index a93f934..f56aa75 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/RedefineClassTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.RedefineClassTest
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.RedefineClassTest
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java
index ab66c98..5d91756 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestConstantReflectionProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestConstantReflectionProvider
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestConstantReflectionProvider
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java
index 15e4959..622c25e 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaField.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestJavaField
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaField
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java
index a7a2e74..5af25f8 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaMethod.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestJavaMethod
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaMethod
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java
index 4b38875..66e5069 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestJavaType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestJavaType
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestJavaType
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java
index cae386e..4352654 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestMetaAccessProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestMetaAccessProvider
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestMetaAccessProvider
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java
index 5085748..3c15295 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestResolvedJavaField
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaField
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
index 3333734..7805d19 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
  * @modules jdk.vm.ci/jdk.vm.ci.meta
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestResolvedJavaMethod
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaMethod
  */
 
diff --git a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java
index 42d340f..84a6b0f 100644
--- a/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java
+++ b/hotspot/test/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java
@@ -31,7 +31,6 @@
  *          jdk.vm.ci/jdk.vm.ci.runtime
  *          jdk.vm.ci/jdk.vm.ci.common
  *          java.base/jdk.internal.misc
- * @build jdk.vm.ci.runtime.test.TestResolvedJavaType
  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI jdk.vm.ci.runtime.test.TestResolvedJavaType
  */
 
diff --git a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java
index d06278e..25bc2a9 100644
--- a/hotspot/test/compiler/jvmci/meta/StableFieldTest.java
+++ b/hotspot/test/compiler/jvmci/meta/StableFieldTest.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8151664
  * @requires (vm.simpleArch == "x64" | vm.simpleArch == "sparcv9" | vm.simpleArch == "aarch64")
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  *          jdk.vm.ci/jdk.vm.ci.hotspot
diff --git a/hotspot/test/compiler/loopopts/UseCountedLoopSafepoints.java b/hotspot/test/compiler/loopopts/UseCountedLoopSafepoints.java
index 77a9445..0bf9185 100644
--- a/hotspot/test/compiler/loopopts/UseCountedLoopSafepoints.java
+++ b/hotspot/test/compiler/loopopts/UseCountedLoopSafepoints.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 6869327
  * @summary Test that C2 flag UseCountedLoopSafepoints ensures a safepoint is kept in a CountedLoop
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @ignore 8146096
  * @run driver compiler.loopopts.UseCountedLoopSafepoints
@@ -34,8 +34,8 @@
 
 package compiler.loopopts;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.util.concurrent.atomic.AtomicLong;
 
diff --git a/hotspot/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java b/hotspot/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java
index 8ef4cde..02361b9 100644
--- a/hotspot/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java
+++ b/hotspot/test/compiler/loopopts/superword/TestVectorizationWithInvariant.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 8078497
  * @summary Tests correct alignment of vectors with loop invariant offset.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main compiler.loopopts.superword.TestVectorizationWithInvariant
  */
 
diff --git a/hotspot/test/compiler/onSpinWait/TestOnSpinWait.java b/hotspot/test/compiler/onSpinWait/TestOnSpinWait.java
index 97c3ab6..903bc5f 100644
--- a/hotspot/test/compiler/onSpinWait/TestOnSpinWait.java
+++ b/hotspot/test/compiler/onSpinWait/TestOnSpinWait.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2016 Azul Systems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -26,7 +26,7 @@
  * @test TestOnSpinWait
  * @summary (x86 only) checks that java.lang.Thread.onSpinWait is intrinsified
  * @bug 8147844
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @requires os.arch=="x86" | os.arch=="amd64" | os.arch=="x86_64"
  * @run driver compiler.onSpinWait.TestOnSpinWait
@@ -34,8 +34,8 @@
 
 package compiler.onSpinWait;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestOnSpinWait {
 
diff --git a/hotspot/test/compiler/oracle/CheckCompileCommandOption.java b/hotspot/test/compiler/oracle/CheckCompileCommandOption.java
index 10e71b4..39aaf59 100644
--- a/hotspot/test/compiler/oracle/CheckCompileCommandOption.java
+++ b/hotspot/test/compiler/oracle/CheckCompileCommandOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test CheckCompileCommandOption
  * @summary Checks parsing of -XX:CompileCommand=option
  * @bug 8055286 8056964 8059847 8069035
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver compiler.oracle.CheckCompileCommandOption
@@ -33,8 +33,8 @@
 
 package compiler.oracle;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.io.File;
 
diff --git a/hotspot/test/compiler/oracle/GetMethodOptionTest.java b/hotspot/test/compiler/oracle/GetMethodOptionTest.java
index 2da784c..dad9e89 100644
--- a/hotspot/test/compiler/oracle/GetMethodOptionTest.java
+++ b/hotspot/test/compiler/oracle/GetMethodOptionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,9 +24,9 @@
 /*
  * @test
  * @bug 8074980
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build sun.hotspot.WhiteBox jdk.test.lib.Asserts compiler.oracle.GetMethodOptionTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/oracle/MethodMatcherTest.java b/hotspot/test/compiler/oracle/MethodMatcherTest.java
index 3e7f1a0..6855429 100644
--- a/hotspot/test/compiler/oracle/MethodMatcherTest.java
+++ b/hotspot/test/compiler/oracle/MethodMatcherTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test MethodMatcherTest
  * @summary Testing of compiler/MethodMatcher
  * @bug 8135068
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/oracle/TestCompileCommand.java b/hotspot/test/compiler/oracle/TestCompileCommand.java
index d8ba4aa..7308e18 100644
--- a/hotspot/test/compiler/oracle/TestCompileCommand.java
+++ b/hotspot/test/compiler/oracle/TestCompileCommand.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test TestCompileCommand
  * @bug 8069389
  * @summary Regression tests of -XX:CompileCommand
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver compiler.oracle.TestCompileCommand
@@ -33,8 +33,8 @@
 
 package compiler.oracle;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestCompileCommand {
 
diff --git a/hotspot/test/compiler/print/TestProfileReturnTypePrinting.java b/hotspot/test/compiler/print/TestProfileReturnTypePrinting.java
index a09d9d3..15f60ac 100644
--- a/hotspot/test/compiler/print/TestProfileReturnTypePrinting.java
+++ b/hotspot/test/compiler/print/TestProfileReturnTypePrinting.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
 /**
  * @test
  * @bug 8073154
- * @build compiler.print.TestProfileReturnTypePrinting
  * @run main/othervm -XX:TypeProfileLevel=020
  *                   -XX:CompileCommand=compileonly,compiler.print.TestProfileReturnTypePrinting::testMethod
  *                   -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintLIR
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass/Agent.java b/hotspot/test/compiler/profiling/spectrapredefineclass/Agent.java
index f0a30c6..98be2c9 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass/Agent.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass/Agent.java
@@ -24,10 +24,12 @@
 package compiler.profiling.spectrapredefineclass;
 
 import com.sun.tools.attach.VirtualMachine;
+import jdk.test.lib.Utils;
 
 import java.lang.instrument.ClassFileTransformer;
 import java.lang.instrument.Instrumentation;
 import java.lang.management.ManagementFactory;
+import java.nio.file.Paths;
 import java.security.ProtectionDomain;
 
 class A {
@@ -67,8 +69,7 @@
 }
 
 public class Agent implements ClassFileTransformer {
-
-
+    public static final String AGENT_JAR = Paths.get(Utils.TEST_CLASSES, "agent.jar").toString();
     static public boolean m2(A a) {
         boolean res = false;
         if (a.getClass() == B.class) {
@@ -95,7 +96,7 @@
         // Redefine class
         try {
             VirtualMachine vm = VirtualMachine.attach(pid);
-            vm.loadAgent(System.getProperty("test.classes",".") + "/agent.jar", "");
+            vm.loadAgent(AGENT_JAR, "");
             vm.detach();
         } catch (Exception e) {
             throw new RuntimeException(e);
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
index 9559389..7674083 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass/Launcher.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,11 +24,11 @@
 /*
  * @test
  * @bug 8038636
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.instrument
  *          java.management
- * @build compiler.profiling.spectrapredefineclass_classloaders.Agent
+ * @build compiler.profiling.spectrapredefineclass.Agent
  * @run driver ClassFileInstaller compiler.profiling.spectrapredefineclass.Agent
  * @run driver compiler.profiling.spectrapredefineclass.Launcher
  * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation
@@ -39,23 +39,33 @@
 
 package compiler.profiling.spectrapredefineclass;
 
-import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.OutputAnalyzer;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.PrintWriter;
 
 public class Launcher {
+    private static final String MANIFEST = "MANIFEST.MF";
     public static void main(String[] args) throws Exception  {
+        try (PrintWriter pw = new PrintWriter(MANIFEST)) {
+            pw.println("Agent-Class: " + Agent.class.getName());
+            pw.println("Can-Retransform-Classes: true");
+        }
 
-      PrintWriter pw = new PrintWriter("MANIFEST.MF");
-      pw.println("Agent-Class: " + Launcher.class.getPackage().getName() +".Agent");
-      pw.println("Can-Retransform-Classes: true");
-      pw.close();
+        JDKToolLauncher jar = JDKToolLauncher.create("jar")
+                .addToolArg("cmf")
+                .addToolArg(MANIFEST)
+                .addToolArg(Agent.AGENT_JAR)
+                .addToolArg(Agent.class.getName().replace('.', File.separatorChar) + ".class");
 
-      ProcessBuilder pb = new ProcessBuilder();
-      pb.command(new String[] { JDKToolFinder.getJDKTool("jar"), "cmf", "MANIFEST.MF",
-              System.getProperty("test.classes",".") + "/agent.jar",
-              "compiler/profiling/spectrapredefineclass/Agent.class".replace('/', File.separatorChar)});
-      pb.start().waitFor();
+        ProcessBuilder pb = new ProcessBuilder(jar.getCommand());
+        try {
+            OutputAnalyzer output = new OutputAnalyzer(pb.start());
+            output.shouldHaveExitValue(0);
+        } catch (IOException ex) {
+            throw new Error("TESTBUG: jar failed.", ex);
+        }
     }
 }
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java
index 35f8523..e4a32e2 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Agent.java
@@ -24,6 +24,7 @@
 package compiler.profiling.spectrapredefineclass_classloaders;
 
 import com.sun.tools.attach.VirtualMachine;
+import jdk.test.lib.Utils;
 
 import java.lang.instrument.ClassFileTransformer;
 import java.lang.instrument.Instrumentation;
@@ -32,14 +33,16 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.security.ProtectionDomain;
 
 public class Agent implements ClassFileTransformer {
+    public static final String AGENT_JAR = Paths.get(Utils.TEST_CLASSES, "agent.jar").toString();
     public static ClassLoader newClassLoader() {
         try {
             return new URLClassLoader(new URL[] {
-                    Paths.get(System.getProperty("test.classes",".")).toUri().toURL(),
+                    Paths.get(Utils.TEST_CLASSES).toUri().toURL(),
             }, null);
         } catch (MalformedURLException e){
             throw new RuntimeException("Unexpected URL conversion failure", e);
@@ -76,7 +79,7 @@
         for (int i = 0; i < 2; i++) {
             try {
                 VirtualMachine vm = VirtualMachine.attach(pid);
-                vm.loadAgent(System.getProperty("test.classes",".") + "/agent.jar", "");
+                vm.loadAgent(AGENT_JAR, "");
                 vm.detach();
             } catch (Exception e) {
                 throw new RuntimeException(e);
diff --git a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
index 328c5bc..1f785b6 100644
--- a/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
+++ b/hotspot/test/compiler/profiling/spectrapredefineclass_classloaders/Launcher.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8040237
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.instrument
  *          java.management
@@ -39,26 +39,36 @@
  *                   -XX:ReservedCodeCacheSize=3M
  *                   compiler.profiling.spectrapredefineclass_classloaders.Agent
  */
+
 package compiler.profiling.spectrapredefineclass_classloaders;
 
-import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.OutputAnalyzer;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.PrintWriter;
 
 public class Launcher {
-    public static void main(String[] args) throws Exception {
+    private static final String MANIFEST = "MANIFEST.MF";
+    public static void main(String[] args) throws Exception  {
+        try (PrintWriter pw = new PrintWriter(MANIFEST)) {
+            pw.println("Agent-Class: " + Agent.class.getName());
+            pw.println("Can-Retransform-Classes: true");
+        }
 
-        PrintWriter pw = new PrintWriter("MANIFEST.MF");
+        JDKToolLauncher jar = JDKToolLauncher.create("jar")
+                .addToolArg("cmf")
+                .addToolArg(MANIFEST)
+                .addToolArg(Agent.AGENT_JAR)
+                .addToolArg(Agent.class.getName().replace('.', File.separatorChar) + ".class");
 
-        pw.println("Agent-Class: " + Launcher.class.getPackage().getName() + ".Agent");
-        pw.println("Can-Retransform-Classes: true");
-        pw.close();
-
-        ProcessBuilder pb = new ProcessBuilder();
-        pb.command(new String[]{JDKToolFinder.getJDKTool("jar"), "cmf", "MANIFEST.MF",
-                System.getProperty("test.classes", ".") + "/agent.jar",
-                "compiler/profiling/spectrapredefineclass/Agent.class".replace('/', File.separatorChar)});
-        pb.start().waitFor();
+        ProcessBuilder pb = new ProcessBuilder(jar.getCommand());
+        try {
+            OutputAnalyzer output = new OutputAnalyzer(pb.start());
+            output.shouldHaveExitValue(0);
+        } catch (IOException ex) {
+            throw new Error("TESTBUG: jar failed.", ex);
+        }
     }
 }
diff --git a/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java b/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java
index d712535..232134d 100644
--- a/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java
+++ b/hotspot/test/compiler/rangechecks/TestExplicitRangeChecks.java
@@ -25,11 +25,10 @@
  * @test
  * @bug 8073480
  * @summary explicit range checks should be recognized by C2
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
- * @build compiler.rangechecks.TestExplicitRangeChecks
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
- *                                jdk.test.lib.Platform
  * @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
  *                   -XX:CompileCommand=compileonly,compiler.rangechecks.TestExplicitRangeChecks::test*
diff --git a/hotspot/test/compiler/rangechecks/TestRangeCheckSmearing.java b/hotspot/test/compiler/rangechecks/TestRangeCheckSmearing.java
index 17c4327..a6e285a 100644
--- a/hotspot/test/compiler/rangechecks/TestRangeCheckSmearing.java
+++ b/hotspot/test/compiler/rangechecks/TestRangeCheckSmearing.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8066103
  * @summary C2's range check smearing allows out of bound array accesses
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rangechecks.TestRangeCheckSmearing
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
- *                                jdk.test.lib.Platform
  * @run main/othervm -ea -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *                   -XX:-BackgroundCompilation -XX:-UseOnStackReplacement
  *                   compiler.rangechecks.TestRangeCheckSmearing
diff --git a/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java b/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java
index 50784c5..7fa09b8 100644
--- a/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java
+++ b/hotspot/test/compiler/rtm/cli/RTMGenericCommandLineOptionTest.java
@@ -24,7 +24,7 @@
 
 package compiler.rtm.cli;
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
diff --git a/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java b/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java
index aad6397..6fcc279 100644
--- a/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java
+++ b/hotspot/test/compiler/rtm/cli/RTMLockingAwareTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java
index e8c9d17..b1dbafe 100644
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 
 package compiler.rtm.cli;
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java
index e48cfec..02f8acd 100644
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify PrintPreciseRTMLockingStatistics on CPUs with
  *          rtm support and on VM with rtm locking support,
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestPrintPreciseRTMLockingStatisticsOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java
index aeec526..3efcbf5 100644
--- a/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestPrintPreciseRTMLockingStatisticsOptionOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @bug 8031320
  * @summary Verify PrintPreciseRTMLockingStatistics on CPUs without
  *          rtm support and/or unsupported VM.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java
index 2d16a62..3a1e2cc 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify RTMAbortRatio option processing on CPU with rtm
  *          support and on VM with rtm locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMAbortRatioOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java
index 5921ae7..1fec34e 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortRatioOptionOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify RTMAbortRatio option processing on CPU without rtm
  *          support or on VM that does not support rtm locking.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMAbortRatioOptionOnUnsupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java b/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java
index 7444280..10b87c2 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMAbortThresholdOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of RTMAbortThreshold option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMAbortThresholdOption
  * @run main/othervm compiler.rtm.cli.TestRTMAbortThresholdOption
  */
 
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java b/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
index 35213b4..161573a 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMLockingCalculationDelayOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of RTMLockingCalculationDelay option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMLockingCalculationDelayOption
  * @run main/othervm compiler.rtm.cli.TestRTMLockingCalculationDelayOption
  */
 
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java b/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java
index 91a5bff..dab87dc 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMLockingThresholdOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of RTMLockingThreshold option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMLockingThresholdOption
  * @run main/othervm compiler.rtm.cli.TestRTMLockingThresholdOption
  */
 
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java b/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java
index d77c001..50b200a 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMRetryCountOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of RTMRetryCount option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMRetryCountOption
  * @run main/othervm compiler.rtm.cli.TestRTMRetryCountOption
  */
 
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java b/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java
index dc9ebf7..f8e0e64 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMSpinLoopCountOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of RTMSpinLoopCount option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMSpinLoopCountOption
  * @run main/othervm compiler.rtm.cli.TestRTMSpinLoopCountOption
  */
 
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
index b21aac4..6033633 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify RTMTotalCountIncrRate option processing on CPU with
  *          rtm support and on VM with rtm locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMTotalCountIncrRateOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java
index 886d0c3..fcbbfe7 100644
--- a/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestRTMTotalCountIncrRateOptionOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify RTMTotalCountIncrRate option processing on CPU without
  *          rtm support and/or on VM without rtm locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestRTMTotalCountIncrRateOptionOnUnsupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
index 001a826..e674b46 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMDeopt option processing on CPUs with rtm support
  *          when rtm locking is supported by VM.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMDeoptOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
index 385a7c7..e639731 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMDeoptOptionOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMDeopt option processing on CPUs without rtm support
  *          or on VMs without rtm locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMDeoptOptionOnUnsupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
index 532e68d..9e2163b 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMForStackLocks option processing on CPU with
  *          rtm support when VM supports rtm locking.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMForStackLocksOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
index 563fec1..84251d5 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMForStackLocksOptionOnUnsupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMForStackLocks option processing on CPUs without
  *          rtm support and/or on VMs without rtm locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMForStackLocksOptionOnUnsupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 import jdk.test.lib.cli.predicate.NotPredicate;
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
index b82badc..b0694e7 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnSupportedConfig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMLocking option processing on CPU with rtm support and
  *          on VM with rtm-locking support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMLockingOptionOnSupportedConfig
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
index 25e173e..3df1040 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedCPU.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMLocking option processing on CPU without
  *          rtm support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMLockingOptionOnUnsupportedCPU
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.Platform;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java
index f042a9d..510ede5 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionOnUnsupportedVM.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify UseRTMLocking option processing on CPU with rtm support
  *          in case when VM should not support this option.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMLockingOptionOnUnsupportedVM
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 import jdk.test.lib.cli.predicate.NotPredicate;
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
index cc004bd..3aeab02 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMLockingOptionWithBiasedLocking.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,11 @@
  * @bug 8031320
  * @summary Verify processing of UseRTMLocking and UseBiasedLocking
  *          options combination on CPU and VM with rtm support.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMLockingOptionWithBiasedLocking
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -43,7 +43,7 @@
 
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java b/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
index 5d365b7..ec8f3fe 100644
--- a/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
+++ b/hotspot/test/compiler/rtm/cli/TestUseRTMXendForLockBusyOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify processing of UseRTMXendForLockBusy option.
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.rtm.cli.TestUseRTMXendForLockBusyOption
  * @run main/othervm compiler.rtm.cli.TestUseRTMXendForLockBusyOption
  */
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java b/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java
index 893fbc8..6605ef1 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAbortRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMAbortRatio affects amount of aborts before
  *          deoptimization.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMAbortRatio
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -48,7 +48,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java b/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java
index 2d8492e..6090fa1 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAbortThreshold.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMAbortThreshold option affects
  *          amount of aborts after which abort ratio is calculated.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMAbortThreshold
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java b/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
index 606ed8c..4f43be6 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,10 @@
  *          caused by reason other then rtm_state_change will reset
  *          method's RTM state. And if we don't use RTMDeopt, then
  *          RTM state remain the same after such deoptimization.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMAfterNonRTMDeopt
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -50,7 +50,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
index f53a32c..0633d8a 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnHighAbortRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that on high abort ratio method will be recompiled
  *          without rtm locking.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMDeoptOnHighAbortRatio
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
index 567ec62..9386321 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify that on low abort ratio method will be recompiled.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMDeoptOnLowAbortRatio
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java b/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java
index 7c6ee46..33e263c 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMLockingCalculationDelay.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMLockingCalculationDelay affect when
  *          abort ratio calculation is started.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMLockingCalculationDelay
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -46,7 +46,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java b/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java
index d3ce56c..0f6ccbf 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMLockingThreshold affects rtm state transition
  *          ProfileRTM => UseRTM.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMLockingThreshold
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -48,7 +48,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java b/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java
index 2a1fc7d..5526e09 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMRetryCount.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify that RTMRetryCount affects actual amount of retries.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMRetryCount
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -46,7 +46,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java b/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java
index f6e849e..61dc2bc 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMSpinLoopCount.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMSpinLoopCount affects time spent
  *          between locking attempts.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMSpinLoopCount
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java b/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
index 6ae82df..29f560d 100644
--- a/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
+++ b/hotspot/test/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that RTMTotalCountIncrRate option affects
  *          RTM locking statistics.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestRTMTotalCountIncrRate
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -48,7 +48,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.internal.misc.Unsafe;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
diff --git a/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java b/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java
index be13c80..f7a752f 100644
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that rtm locking is used for stack locks before
  *          inflation and after it used for inflated locks.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestUseRTMAfterLockInflation
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java b/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java
index 05578b6..d9cf615 100644
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMDeopt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that UseRTMDeopt affects uncommon trap installation in
  *          copmpiled methods with synchronized block.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestUseRTMDeopt
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -46,7 +46,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java b/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java
index 94c4978..038496e 100644
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMForInflatedLocks.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify that rtm locking is used for inflated locks.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestUseRTMForInflatedLocks
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -45,7 +45,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java b/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java
index 6bb2646..cdb854a 100644
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMForStackLocks.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test
  * @bug 8031320
  * @summary Verify that rtm locking is used for stack locks.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestUseRTMForStackLocks
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -46,7 +46,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java b/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java
index d8dc7ca..936e7c9 100644
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMXendForLockBusy.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that UseRTMXendForLockBusy option affects
  *          method behaviour if lock is busy.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.locking.TestUseRTMXendForLockBusy
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -48,7 +48,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java b/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java
index 30d747e..d92cb70 100644
--- a/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java
+++ b/hotspot/test/compiler/rtm/method_options/TestNoRTMLockElidingOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,10 @@
  * @bug 8031320
  * @summary Verify that NoRTMLockEliding option could be applied to
  *          specified method and that such method will not use rtm.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.method_options.TestNoRTMLockElidingOption
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -47,7 +47,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java b/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java
index 5080834..b649715 100644
--- a/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java
+++ b/hotspot/test/compiler/rtm/method_options/TestUseRTMLockElidingOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,10 @@
  * @summary Verify that UseRTMLockEliding option could be applied to
  *          specified method and that such method will not be deoptimized
  *          on high abort ratio.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.method_options.TestUseRTMLockElidingOption
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -48,7 +48,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java b/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
index adeed6d..e9ec090 100644
--- a/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
+++ b/hotspot/test/compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,10 +29,10 @@
  *          on overall aborts and locks count and count of aborts of
  *          different types. Test also verify that VM output does not
  *          contain rtm locking statistics when it should not.
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.rtm.print.TestPrintPreciseRTMLockingStatistics
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -50,7 +50,7 @@
 import compiler.testlibrary.rtm.predicate.SupportedCPU;
 import compiler.testlibrary.rtm.predicate.SupportedVM;
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
 import jdk.test.lib.cli.predicate.AndPredicate;
 
diff --git a/hotspot/test/compiler/runtime/Test8010927.java b/hotspot/test/compiler/runtime/Test8010927.java
index 64dc5ca..ba50aeb 100644
--- a/hotspot/test/compiler/runtime/Test8010927.java
+++ b/hotspot/test/compiler/runtime/Test8010927.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,9 +25,9 @@
  * @test
  * @bug 8010927
  * @summary Kitchensink crashed with SIGSEGV, Problematic frame: v ~StubRoutines::checkcast_arraycopy
- * @library /test/lib /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build compiler.runtime.Test8010927
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions
diff --git a/hotspot/test/compiler/runtime/cr8015436/Test8015436.java b/hotspot/test/compiler/runtime/cr8015436/Test8015436.java
index 256f352..0e44c7e 100644
--- a/hotspot/test/compiler/runtime/cr8015436/Test8015436.java
+++ b/hotspot/test/compiler/runtime/cr8015436/Test8015436.java
@@ -25,10 +25,9 @@
  * @test
  * @bug 8015436
  * @summary the IK _initial_method_idnum value must be adjusted if overpass methods are added
- * @library /test/lib/share/classes /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @build compiler.runtime.cr8015436.Test8015436
- *        compiler.runtime.cr8015436.Driver8015436
  *
  * @run driver compiler.runtime.cr8015436.Driver8015436
  */
diff --git a/hotspot/test/compiler/stable/TestStableBoolean.java b/hotspot/test/compiler/stable/TestStableBoolean.java
index dbb9705..505d0e3 100644
--- a/hotspot/test/compiler/stable/TestStableBoolean.java
+++ b/hotspot/test/compiler/stable/TestStableBoolean.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableBoolean
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableBoolean
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableByte.java b/hotspot/test/compiler/stable/TestStableByte.java
index 5561b4b..b0d703f 100644
--- a/hotspot/test/compiler/stable/TestStableByte.java
+++ b/hotspot/test/compiler/stable/TestStableByte.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableByte
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableByte
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableChar.java b/hotspot/test/compiler/stable/TestStableChar.java
index 8a1f51e..bcd3154 100644
--- a/hotspot/test/compiler/stable/TestStableChar.java
+++ b/hotspot/test/compiler/stable/TestStableChar.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableChar
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableChar
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableDouble.java b/hotspot/test/compiler/stable/TestStableDouble.java
index ff96b2c..6bc5644 100644
--- a/hotspot/test/compiler/stable/TestStableDouble.java
+++ b/hotspot/test/compiler/stable/TestStableDouble.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableDouble
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableDouble
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableFloat.java b/hotspot/test/compiler/stable/TestStableFloat.java
index ab879c5..82696a5 100644
--- a/hotspot/test/compiler/stable/TestStableFloat.java
+++ b/hotspot/test/compiler/stable/TestStableFloat.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableFloat
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableFloat
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableInt.java b/hotspot/test/compiler/stable/TestStableInt.java
index e203a26..35a7ad5 100644
--- a/hotspot/test/compiler/stable/TestStableInt.java
+++ b/hotspot/test/compiler/stable/TestStableInt.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableInt
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableInt
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableLong.java b/hotspot/test/compiler/stable/TestStableLong.java
index 11e6a95..dd3cd82 100644
--- a/hotspot/test/compiler/stable/TestStableLong.java
+++ b/hotspot/test/compiler/stable/TestStableLong.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableLong
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableLong
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableObject.java b/hotspot/test/compiler/stable/TestStableObject.java
index 58affb9..70a3c8f 100644
--- a/hotspot/test/compiler/stable/TestStableObject.java
+++ b/hotspot/test/compiler/stable/TestStableObject.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableObject
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableObject
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableShort.java b/hotspot/test/compiler/stable/TestStableShort.java
index d893f8d..6682550 100644
--- a/hotspot/test/compiler/stable/TestStableShort.java
+++ b/hotspot/test/compiler/stable/TestStableShort.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableShort
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableShort
  *
  * @run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
  *                                 -XX:CompileOnly=::get,::get1,::get2,::get3,::get4
diff --git a/hotspot/test/compiler/stable/TestStableUByte.java b/hotspot/test/compiler/stable/TestStableUByte.java
index 5431345..6a6135f 100644
--- a/hotspot/test/compiler/stable/TestStableUByte.java
+++ b/hotspot/test/compiler/stable/TestStableUByte.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableUByte
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableUByte
  *
  * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline
  *                                 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
diff --git a/hotspot/test/compiler/stable/TestStableUShort.java b/hotspot/test/compiler/stable/TestStableUShort.java
index 88f5cb4..28b12a2 100644
--- a/hotspot/test/compiler/stable/TestStableUShort.java
+++ b/hotspot/test/compiler/stable/TestStableUShort.java
@@ -26,11 +26,10 @@
 /*
  * @test TestStableUShort
  * @summary tests on stable fields and arrays
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
  * @build sun.hotspot.WhiteBox
- * @build compiler.stable.TestStableUShort
  *
  * @run main/bootclasspath/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+AlwaysIncrementalInline
  *                                 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xcomp
diff --git a/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java b/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java
index 7abfc63..0491e1c 100644
--- a/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java
+++ b/hotspot/test/compiler/startup/NumCompilerThreadsCheck.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8034775
  * @summary Ensures correct minimal number of compiler threads (provided by -XX:CICompilerCount=)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -34,9 +34,9 @@
 
 package compiler.startup;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class NumCompilerThreadsCheck {
 
diff --git a/hotspot/test/compiler/startup/SmallCodeCacheStartup.java b/hotspot/test/compiler/startup/SmallCodeCacheStartup.java
index 2ff6437..a361baa 100644
--- a/hotspot/test/compiler/startup/SmallCodeCacheStartup.java
+++ b/hotspot/test/compiler/startup/SmallCodeCacheStartup.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary Test ensures that there is no crash if there is not enough ReservedCodeCacheSize
  *          to initialize all compiler threads. The option -Xcomp gives the VM more time to
  *          trigger the old bug.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -37,8 +37,8 @@
 
 package compiler.startup;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import static jdk.test.lib.Asserts.assertTrue;
 
diff --git a/hotspot/test/compiler/startup/StartupOutput.java b/hotspot/test/compiler/startup/StartupOutput.java
index b8cd315..f299c65 100644
--- a/hotspot/test/compiler/startup/StartupOutput.java
+++ b/hotspot/test/compiler/startup/StartupOutput.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,9 @@
 
 /*
  * @test
- * @bug 8026949
+ * @bug 8026949 8164091
  * @summary Test ensures correct VM output during startup
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
@@ -34,8 +34,8 @@
 
 package compiler.startup;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class StartupOutput {
     public static void main(String[] args) throws Exception {
@@ -45,7 +45,14 @@
         pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:+DisplayVMOutputToStdout", "-version");
         out = new OutputAnalyzer(pb.start());
         out.shouldNotContain("no space to run compilers");
-
         out.shouldHaveExitValue(0);
+
+        pb = ProcessTools.createJavaProcessBuilder("-Xint", "-XX:ReservedCodeCacheSize=1770K", "-XX:InitialCodeCacheSize=4K", "-version");
+        out = new OutputAnalyzer(pb.start());
+        // The VM should not crash but may return an error message because we don't have enough space for adapters
+        int exitCode = out.getExitValue();
+        if (exitCode != 1 && exitCode != 0) {
+            throw new Exception("VM crashed with exit code " + exitCode);
+        }
     }
 }
diff --git a/hotspot/test/compiler/testlibrary/rtm/RTMTestBase.java b/hotspot/test/compiler/testlibrary/rtm/RTMTestBase.java
index 65cbf0a..5fde3f2 100644
--- a/hotspot/test/compiler/testlibrary/rtm/RTMTestBase.java
+++ b/hotspot/test/compiler/testlibrary/rtm/RTMTestBase.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,8 @@
 
 package compiler.testlibrary.rtm;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
diff --git a/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java b/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java
index 6393f5c..37288d5 100644
--- a/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java
+++ b/hotspot/test/compiler/tiered/ConstantGettersTransitionsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,11 +24,11 @@
 /**
  * @test ConstantGettersTransitionsTest
  * @summary Test the correctness of compilation level transitions for constant getters methods
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.tiered.TransitionsTestExecutor
+ * @build sun.hotspot.WhiteBox
  *        compiler.tiered.ConstantGettersTransitionsTest
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/tiered/LevelTransitionTest.java b/hotspot/test/compiler/tiered/LevelTransitionTest.java
index d49d995..6730c18 100644
--- a/hotspot/test/compiler/tiered/LevelTransitionTest.java
+++ b/hotspot/test/compiler/tiered/LevelTransitionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,12 @@
 /**
  * @test LevelTransitionTest
  * @summary Test the correctness of compilation level transitions for different methods
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
  * @ignore 8067651
- * @build compiler.tiered.TransitionsTestExecutor compiler.tiered.LevelTransitionTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=240 -Xmixed -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/tiered/NonTieredLevelsTest.java b/hotspot/test/compiler/tiered/NonTieredLevelsTest.java
index 3973bdc..45d039f 100644
--- a/hotspot/test/compiler/tiered/NonTieredLevelsTest.java
+++ b/hotspot/test/compiler/tiered/NonTieredLevelsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,11 +24,11 @@
 /**
  * @test NonTieredLevelsTest
  * @summary Verify that only one level can be used
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @requires vm.opt.TieredStopAtLevel==null
- * @build compiler.tiered.NonTieredLevelsTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:-TieredCompilation
diff --git a/hotspot/test/compiler/tiered/TieredLevelsTest.java b/hotspot/test/compiler/tiered/TieredLevelsTest.java
index 768022b..1e23648 100644
--- a/hotspot/test/compiler/tiered/TieredLevelsTest.java
+++ b/hotspot/test/compiler/tiered/TieredLevelsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,11 +24,11 @@
 /**
  * @test TieredLevelsTest
  * @summary Verify that all levels &lt; 'TieredStopAtLevel' can be used
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build compiler.tiered.TieredLevelsTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+TieredCompilation
diff --git a/hotspot/test/compiler/tiered/TransitionsTestExecutor.java b/hotspot/test/compiler/tiered/TransitionsTestExecutor.java
index 832678b..1869842 100644
--- a/hotspot/test/compiler/tiered/TransitionsTestExecutor.java
+++ b/hotspot/test/compiler/tiered/TransitionsTestExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,8 @@
 package compiler.tiered;
 
 import compiler.whitebox.CompilerWhiteBoxTest;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.lang.management.ManagementFactory;
 import java.lang.management.RuntimeMXBean;
diff --git a/hotspot/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java b/hotspot/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java
index a5cf25d..1805086 100644
--- a/hotspot/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java
+++ b/hotspot/test/compiler/types/TestMeetIncompatibleInterfaceArrays.java
@@ -27,7 +27,7 @@
  * @summary C2 can not handle returns with inccompatible interface arrays
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  *
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/types/correctness/CorrectnessTest.java b/hotspot/test/compiler/types/correctness/CorrectnessTest.java
index 15a5bba..9198a3e 100644
--- a/hotspot/test/compiler/types/correctness/CorrectnessTest.java
+++ b/hotspot/test/compiler/types/correctness/CorrectnessTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,12 +26,12 @@
  * @bug 8038418
  * @summary Tests correctness of type usage with type profiling and speculations
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
  * @ignore 8066173
- * @build compiler.types.correctness.CorrectnessTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+IgnoreUnrecognizedVMOptions -XX:+UnlockExperimentalVMOptions
diff --git a/hotspot/test/compiler/types/correctness/OffTest.java b/hotspot/test/compiler/types/correctness/OffTest.java
index ad623fe..a88387e 100644
--- a/hotspot/test/compiler/types/correctness/OffTest.java
+++ b/hotspot/test/compiler/types/correctness/OffTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,12 @@
 /*
  * @test CorrectnessTest
  * @bug 8038418
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
  * @ignore 8066173
- * @build compiler.types.correctness.OffTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=1200 compiler.types.correctness.OffTest
@@ -38,8 +38,8 @@
 package compiler.types.correctness;
 
 import compiler.types.correctness.scenarios.ProfilingType;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 
 import java.util.Random;
diff --git a/hotspot/test/compiler/uncommontrap/DeoptReallocFailure.java b/hotspot/test/compiler/uncommontrap/DeoptReallocFailure.java
index 0363689..218eb2e 100644
--- a/hotspot/test/compiler/uncommontrap/DeoptReallocFailure.java
+++ b/hotspot/test/compiler/uncommontrap/DeoptReallocFailure.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8146416
- * @library /test/lib /testlibrary /
+ * @library /test/lib /
  *
  * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/compiler/uncommontrap/Test8009761.java b/hotspot/test/compiler/uncommontrap/Test8009761.java
index df9141e..c9f4897 100644
--- a/hotspot/test/compiler/uncommontrap/Test8009761.java
+++ b/hotspot/test/compiler/uncommontrap/Test8009761.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test
  * @bug 8009761
  * @summary Deoptimization on sparc doesn't set Llast_SP correctly in the interpreter frames it creates
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *
- * @build compiler.uncommontrap.Test8009761
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java b/hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java
index 25e4413..84f53c8 100644
--- a/hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java
+++ b/hotspot/test/compiler/uncommontrap/TestUnstableIfTrap.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,14 @@
 /*
  * @test
  * @bug 8030976 8059226
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  *
- * @build compiler.uncommontrap.TestUnstableIfTrap
- *        jdk.test.lib.*
- *        compiler.testlibrary.uncommontrap.Verifier
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbatch -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java b/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java
index 82661b2..e2e3158 100644
--- a/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java
+++ b/hotspot/test/compiler/unsafe/UnsafeGetConstantField.java
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary tests on constant folding of unsafe get operations
- * @library /testlibrary
+ * @library /test/lib
  *
  * @requires vm.flavor == "server"
  *
diff --git a/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java b/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java
index 956e993..bc32104 100644
--- a/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java
+++ b/hotspot/test/compiler/unsafe/UnsafeGetStableArrayElement.java
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary tests on constant folding of unsafe get operations from stable arrays
- * @library /testlibrary
+ * @library /test/lib
  *
  * @requires vm.flavor == "server"
  *
diff --git a/hotspot/test/compiler/unsafe/UnsafeRaw.java b/hotspot/test/compiler/unsafe/UnsafeRaw.java
index af1a1cd..269ca54 100644
--- a/hotspot/test/compiler/unsafe/UnsafeRaw.java
+++ b/hotspot/test/compiler/unsafe/UnsafeRaw.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8058744
  * @summary Invalid pattern-matching of address computations in raw unsafe
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -Xbatch compiler.unsafe.UnsafeRaw
diff --git a/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java b/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java
index 8f65176..def4400 100644
--- a/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java
+++ b/hotspot/test/compiler/whitebox/AllocationCodeBlobTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test AllocationCodeBlobTest
  * @summary testing of WB::allocate/freeCodeBlob()
  * @bug 8059624 8064669
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.AllocationCodeBlobTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
@@ -45,7 +45,7 @@
 package compiler.whitebox;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.InfiniteLoop;
+import jdk.test.lib.wrappers.InfiniteLoop;
 import sun.hotspot.WhiteBox;
 import sun.hotspot.code.BlobType;
 
diff --git a/hotspot/test/compiler/whitebox/BlockingCompilation.java b/hotspot/test/compiler/whitebox/BlockingCompilation.java
index a89ab05..d645352 100644
--- a/hotspot/test/compiler/whitebox/BlockingCompilation.java
+++ b/hotspot/test/compiler/whitebox/BlockingCompilation.java
@@ -26,9 +26,8 @@
  * @bug 8150646 8153013
  * @summary Add support for blocking compiles through whitebox API
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @build sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm
diff --git a/hotspot/test/compiler/whitebox/ClearMethodStateTest.java b/hotspot/test/compiler/whitebox/ClearMethodStateTest.java
index d0a06f9..55a0eae 100644
--- a/hotspot/test/compiler/whitebox/ClearMethodStateTest.java
+++ b/hotspot/test/compiler/whitebox/ClearMethodStateTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test ClearMethodStateTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::clearMethodState()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.ClearMethodStateTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java b/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java
index 2a718fc..3025b1e 100644
--- a/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java
+++ b/hotspot/test/compiler/whitebox/DeoptimizeAllTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test DeoptimizeAllTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::deoptimizeAll()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.DeoptimizeAllTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java b/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java
index 62f4154..87c66ce 100644
--- a/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java
+++ b/hotspot/test/compiler/whitebox/DeoptimizeFramesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test DeoptimizeFramesTest
  * @bug 8028595
  * @summary testing of WB::deoptimizeFrames()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.DeoptimizeFramesTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java b/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java
index f505bbd..7331fae 100644
--- a/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java
+++ b/hotspot/test/compiler/whitebox/DeoptimizeMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test DeoptimizeMethodTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::deoptimizeMethod()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.DeoptimizeMethodTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java b/hotspot/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java
index c5ec028..c3653b5 100644
--- a/hotspot/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java
+++ b/hotspot/test/compiler/whitebox/DeoptimizeMultipleOSRTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test DeoptimizeMultipleOSRTest
  * @bug 8061817
  * @summary testing of WB::deoptimizeMethod()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.DeoptimizeMultipleOSRTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
diff --git a/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java b/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java
index ccb8ab0..b2817b3 100644
--- a/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java
+++ b/hotspot/test/compiler/whitebox/EnqueueMethodForCompilationTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test EnqueueMethodForCompilationTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::enqueueMethodForCompilation()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.EnqueueMethodForCompilationTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java b/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java
index f9b7cda..04ac558 100644
--- a/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java
+++ b/hotspot/test/compiler/whitebox/ForceNMethodSweepTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test
  * @bug 8059624 8064669 8153265
  * @summary testing of WB::forceNMethodSweep
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.ForceNMethodSweepTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/GetCodeHeapEntriesTest.java b/hotspot/test/compiler/whitebox/GetCodeHeapEntriesTest.java
index c6493c0..305c888 100644
--- a/hotspot/test/compiler/whitebox/GetCodeHeapEntriesTest.java
+++ b/hotspot/test/compiler/whitebox/GetCodeHeapEntriesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test GetCodeHeapEntriesTest
  * @bug 8059624
  * @summary testing of WB::getCodeHeapEntries()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.GetCodeHeapEntriesTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/GetNMethodTest.java b/hotspot/test/compiler/whitebox/GetNMethodTest.java
index 4b64a6c..91d8cb7 100644
--- a/hotspot/test/compiler/whitebox/GetNMethodTest.java
+++ b/hotspot/test/compiler/whitebox/GetNMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @test GetNMethodTest
  * @bug 8038240
  * @summary testing of WB::getNMethod()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.GetNMethodTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java b/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java
index 6b80657..c5f4687 100644
--- a/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java
+++ b/hotspot/test/compiler/whitebox/IsMethodCompilableTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,16 +26,13 @@
  * @bug 8007270 8006683 8007288 8022832
  * @summary testing of WB::isMethodCompilable()
  * @requires vm.flavor == "server"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
  *
- * @build jdk.test.lib.*
- *        sun.hotspot.WhiteBox
- * @build compiler.whitebox.IsMethodCompilableTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
- *                                jdk.test.lib.Platform
  * @run main/othervm/timeout=2400 -XX:-TieredCompilation -Xmixed
  *      -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  *      -XX:PerMethodRecompilationCutoff=3 -XX:-UseCounterDecay
diff --git a/hotspot/test/compiler/whitebox/LockCompilationTest.java b/hotspot/test/compiler/whitebox/LockCompilationTest.java
index e3b8682..077cbf5 100644
--- a/hotspot/test/compiler/whitebox/LockCompilationTest.java
+++ b/hotspot/test/compiler/whitebox/LockCompilationTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test LockCompilationTest
  * @bug 8059624 8152169
  * @summary testing of WB::lock/unlockCompilation()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.LockCompilationTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmixed -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java b/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java
index 6722ace..8afec55 100644
--- a/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java
+++ b/hotspot/test/compiler/whitebox/MakeMethodNotCompilableTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test MakeMethodNotCompilableTest
  * @bug 8012322 8006683 8007288 8022832
  * @summary testing of WB::makeMethodNotCompilable()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.MakeMethodNotCompilableTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java b/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java
index 5a8c7c3..92d3022 100644
--- a/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java
+++ b/hotspot/test/compiler/whitebox/SetDontInlineMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test SetDontInlineMethodTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::testSetDontInlineMethod()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.SetDontInlineMethodTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java b/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java
index f3e27e9..5b346b5 100644
--- a/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java
+++ b/hotspot/test/compiler/whitebox/SetForceInlineMethodTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test SetForceInlineMethodTest
  * @bug 8006683 8007288 8022832
  * @summary testing of WB::testSetForceInlineMethod()
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build compiler.whitebox.SetForceInlineMethodTest
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/gc/CondCardMark/Basic.java b/hotspot/test/gc/CondCardMark/Basic.java
index a6cc3a0..7655841 100644
--- a/hotspot/test/gc/CondCardMark/Basic.java
+++ b/hotspot/test/gc/CondCardMark/Basic.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,6 @@
  * @bug 8078438
  * @summary Verify UseCondCardMark works
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build Basic
  * @run main/othervm -Xint Basic
  * @run main/othervm -Xint -XX:+UseCondCardMark Basic
  * @run main/othervm -XX:TieredStopAtLevel=1 Basic
diff --git a/hotspot/test/gc/TestCardTablePageCommits.java b/hotspot/test/gc/TestCardTablePageCommits.java
index 3577ebf..fe50587 100644
--- a/hotspot/test/gc/TestCardTablePageCommits.java
+++ b/hotspot/test/gc/TestCardTablePageCommits.java
@@ -22,8 +22,8 @@
 */
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
 
 /*
@@ -32,7 +32,7 @@
  * @bug 8059066
  * @summary Tests that the card table does not commit the same page twice
  * @requires vm.gc.Parallel
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestCardTablePageCommits
diff --git a/hotspot/test/gc/TestDisableExplicitGC.java b/hotspot/test/gc/TestDisableExplicitGC.java
index 316f50c..6789df4 100644
--- a/hotspot/test/gc/TestDisableExplicitGC.java
+++ b/hotspot/test/gc/TestDisableExplicitGC.java
@@ -25,7 +25,7 @@
  * @test TestDisableExplicitGC
  * @requires vm.opt.DisableExplicitGC == null
  * @summary Verify GC behavior with DisableExplicitGC flag.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules jdk.management/com.sun.management.internal
  * @run main/othervm                             -Xlog:gc=debug TestDisableExplicitGC
diff --git a/hotspot/test/gc/TestObjectAlignment.java b/hotspot/test/gc/TestObjectAlignment.java
index 2feaf63..9c6be10b 100644
--- a/hotspot/test/gc/TestObjectAlignment.java
+++ b/hotspot/test/gc/TestObjectAlignment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @key gc
  * @bug 8021823
  * @summary G1: Concurrent marking crashes with -XX:ObjectAlignmentInBytes>=32 in 64bit VMs
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm TestObjectAlignment -Xmx20M -XX:+ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=8
@@ -43,8 +43,8 @@
  * @run main/othervm TestObjectAlignment -Xmx20M -XX:-ExplicitGCInvokesConcurrent -XX:+IgnoreUnrecognizedVMOptions -XX:ObjectAlignmentInBytes=256
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestObjectAlignment {
 
diff --git a/hotspot/test/gc/TestSmallHeap.java b/hotspot/test/gc/TestSmallHeap.java
index 9b791a5..f604a4c 100644
--- a/hotspot/test/gc/TestSmallHeap.java
+++ b/hotspot/test/gc/TestSmallHeap.java
@@ -26,10 +26,10 @@
  * @bug 8067438 8152239
  * @requires vm.gc=="null"
  * @summary Verify that starting the VM with a small heap works
- * @library /testlibrary /test/lib /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build TestSmallHeap
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestSmallHeap
  */
diff --git a/hotspot/test/gc/TestSoftReferencesBehaviorOnOOME.java b/hotspot/test/gc/TestSoftReferencesBehaviorOnOOME.java
index 380c9b8..6ea2057 100644
--- a/hotspot/test/gc/TestSoftReferencesBehaviorOnOOME.java
+++ b/hotspot/test/gc/TestSoftReferencesBehaviorOnOOME.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
  * @test TestSoftReferencesBehaviorOnOOME
  * @key gc
  * @summary Tests that all SoftReferences has been cleared at time of OOM.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestSoftReferencesBehaviorOnOOME
  * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 512 2k
  * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 128k 256k
  * @run main/othervm -Xmx128m TestSoftReferencesBehaviorOnOOME 2k 32k
diff --git a/hotspot/test/gc/TestVerifyDuringStartup.java b/hotspot/test/gc/TestVerifyDuringStartup.java
index 3ac4cdd..7439e40 100644
--- a/hotspot/test/gc/TestVerifyDuringStartup.java
+++ b/hotspot/test/gc/TestVerifyDuringStartup.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,14 @@
  * @key gc
  * @bug 8010463 8011343 8011898
  * @summary Simple test run with -XX:+VerifyDuringStartup -XX:-UseTLAB to verify 8010463
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.ArrayList;
 import java.util.Collections;
 
diff --git a/hotspot/test/gc/TestVerifySilently.java b/hotspot/test/gc/TestVerifySilently.java
index a387ae4..7d11c44 100644
--- a/hotspot/test/gc/TestVerifySilently.java
+++ b/hotspot/test/gc/TestVerifySilently.java
@@ -25,13 +25,13 @@
  * @key gc
  * @bug 8032771
  * @summary Test silent verification.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.ArrayList;
 import java.util.Collections;
 import jdk.test.lib.Utils;
diff --git a/hotspot/test/gc/TestVerifySubSet.java b/hotspot/test/gc/TestVerifySubSet.java
index 9208d47..c430794 100644
--- a/hotspot/test/gc/TestVerifySubSet.java
+++ b/hotspot/test/gc/TestVerifySubSet.java
@@ -25,13 +25,13 @@
  * @key gc
  * @bug 8072725
  * @summary Test VerifySubSet option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.ArrayList;
 import java.util.Collections;
 import jdk.test.lib.Utils;
diff --git a/hotspot/test/testlibrary/jdk/test/lib/AllocationHelper.java b/hotspot/test/gc/arguments/AllocationHelper.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/AllocationHelper.java
rename to hotspot/test/gc/arguments/AllocationHelper.java
index c8366e7..bd4a771 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/AllocationHelper.java
+++ b/hotspot/test/gc/arguments/AllocationHelper.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,6 @@
 * questions.
 */
 
-package jdk.test.lib;
-
 import java.util.LinkedList;
 import java.util.concurrent.Callable;
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/HeapRegionUsageTool.java b/hotspot/test/gc/arguments/HeapRegionUsageTool.java
similarity index 96%
rename from hotspot/test/testlibrary/jdk/test/lib/HeapRegionUsageTool.java
rename to hotspot/test/gc/arguments/HeapRegionUsageTool.java
index b89b77d..1030012 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/HeapRegionUsageTool.java
+++ b/hotspot/test/gc/arguments/HeapRegionUsageTool.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,6 @@
 * questions.
 */
 
-package jdk.test.lib;
-
 import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryPoolMXBean;
 import java.lang.management.MemoryUsage;
diff --git a/hotspot/test/gc/arguments/TestArrayAllocatorMallocLimit.java b/hotspot/test/gc/arguments/TestArrayAllocatorMallocLimit.java
index d06d3ee..1daa6d7 100644
--- a/hotspot/test/gc/arguments/TestArrayAllocatorMallocLimit.java
+++ b/hotspot/test/gc/arguments/TestArrayAllocatorMallocLimit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,15 +27,15 @@
  * The test helps verifying that size_t flags can be set/read.
  * @bug 8054823
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestArrayAllocatorMallocLimit
  */
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.math.BigInteger;
 
 public class TestArrayAllocatorMallocLimit {
diff --git a/hotspot/test/gc/arguments/TestCMSHeapSizeFlags.java b/hotspot/test/gc/arguments/TestCMSHeapSizeFlags.java
index 4e5fa74..50782ab 100644
--- a/hotspot/test/gc/arguments/TestCMSHeapSizeFlags.java
+++ b/hotspot/test/gc/arguments/TestCMSHeapSizeFlags.java
@@ -27,10 +27,10 @@
  * @bug 8006088
  * @requires vm.gc.ConcMarkSweep
  * @summary Tests argument processing for initial and maximum heap size for the CMS collector
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestCMSHeapSizeFlags TestMaxHeapSizeTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestCMSHeapSizeFlags
diff --git a/hotspot/test/gc/arguments/TestCompressedClassFlags.java b/hotspot/test/gc/arguments/TestCompressedClassFlags.java
index 3cc50ad..9d09084 100644
--- a/hotspot/test/gc/arguments/TestCompressedClassFlags.java
+++ b/hotspot/test/gc/arguments/TestCompressedClassFlags.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,16 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.Platform;
 
 /*
  * @test
  * @bug 8015107
  * @summary Tests that VM prints a warning when -XX:CompressedClassSpaceSize
  *          is used together with -XX:-UseCompressedClassPointers
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/arguments/TestDisableDefaultGC.java b/hotspot/test/gc/arguments/TestDisableDefaultGC.java
index 73ac9d4..4bbc469 100644
--- a/hotspot/test/gc/arguments/TestDisableDefaultGC.java
+++ b/hotspot/test/gc/arguments/TestDisableDefaultGC.java
@@ -26,15 +26,15 @@
  * @summary Test that the VM complains when the default GC is disabled and no other GC is specified
  * @bug 8068579
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.gc=="null"
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestDisableDefaultGC
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestDisableDefaultGC {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java b/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java
index 9193581..c6d2b54 100644
--- a/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java
+++ b/hotspot/test/gc/arguments/TestDynMaxHeapFreeRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
  * @test TestDynMaxHeapFreeRatio
  * @bug 8028391
  * @summary Verify that MaxHeapFreeRatio flag is manageable
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @run main TestDynMaxHeapFreeRatio
diff --git a/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java b/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java
index f8dca9b..e21f066 100644
--- a/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java
+++ b/hotspot/test/gc/arguments/TestDynMinHeapFreeRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test TestDynMinHeapFreeRatio
  * @bug 8028391
  * @summary Verify that MinHeapFreeRatio flag is manageable
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @run main TestDynMinHeapFreeRatio
diff --git a/hotspot/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java b/hotspot/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java
index bd9e73a..65536d5 100644
--- a/hotspot/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java
+++ b/hotspot/test/gc/arguments/TestG1ConcMarkStepDurationMillis.java
@@ -26,12 +26,13 @@
  * @key gc
  * @requires vm.gc.G1
  * @summary Tests argument processing for double type flag, G1ConcMarkStepDurationMillis
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.*;
 import java.util.regex.*;
 
diff --git a/hotspot/test/gc/arguments/TestG1ConcRefinementThreads.java b/hotspot/test/gc/arguments/TestG1ConcRefinementThreads.java
index fb91b9e..523994b 100644
--- a/hotspot/test/gc/arguments/TestG1ConcRefinementThreads.java
+++ b/hotspot/test/gc/arguments/TestG1ConcRefinementThreads.java
@@ -27,12 +27,13 @@
  * @bug 8047976
  * @requires vm.gc.G1
  * @summary Tests argument processing for G1ConcRefinementThreads
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.util.*;
 import java.util.regex.*;
 
diff --git a/hotspot/test/gc/arguments/TestG1HeapRegionSize.java b/hotspot/test/gc/arguments/TestG1HeapRegionSize.java
index 7dd0fc5..d69c2f06 100644
--- a/hotspot/test/gc/arguments/TestG1HeapRegionSize.java
+++ b/hotspot/test/gc/arguments/TestG1HeapRegionSize.java
@@ -29,7 +29,7 @@
  * @summary Verify that the flag G1HeapRegionSize is updated properly
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @library /testlibrary
+ * @library /test/lib
  * @run main TestG1HeapRegionSize
  */
 
@@ -39,7 +39,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestG1HeapRegionSize {
 
diff --git a/hotspot/test/gc/arguments/TestG1HeapSizeFlags.java b/hotspot/test/gc/arguments/TestG1HeapSizeFlags.java
index 0349388..73e600e 100644
--- a/hotspot/test/gc/arguments/TestG1HeapSizeFlags.java
+++ b/hotspot/test/gc/arguments/TestG1HeapSizeFlags.java
@@ -27,10 +27,10 @@
  * @bug 8006088
  * @requires vm.gc.G1
  * @summary Tests argument processing for initial and maximum heap size for the G1 collector
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestG1HeapSizeFlags TestMaxHeapSizeTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestG1HeapSizeFlags
diff --git a/hotspot/test/gc/arguments/TestG1PercentageOptions.java b/hotspot/test/gc/arguments/TestG1PercentageOptions.java
index db193ef..3314e42 100644
--- a/hotspot/test/gc/arguments/TestG1PercentageOptions.java
+++ b/hotspot/test/gc/arguments/TestG1PercentageOptions.java
@@ -27,13 +27,14 @@
  * @bug 8068942
  * @requires vm.gc.G1
  * @summary Test argument processing of various percentage options
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestG1PercentageOptions
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestG1PercentageOptions {
 
diff --git a/hotspot/test/gc/arguments/TestHeapFreeRatio.java b/hotspot/test/gc/arguments/TestHeapFreeRatio.java
index 4f97a7c..fd6df97 100644
--- a/hotspot/test/gc/arguments/TestHeapFreeRatio.java
+++ b/hotspot/test/gc/arguments/TestHeapFreeRatio.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,14 @@
  * @key gc
  * @bug 8025661
  * @summary Test parsing of -Xminf and -Xmaxf
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm TestHeapFreeRatio
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestHeapFreeRatio {
 
diff --git a/hotspot/test/gc/arguments/TestInitialTenuringThreshold.java b/hotspot/test/gc/arguments/TestInitialTenuringThreshold.java
index a25e19e..6fc2246 100644
--- a/hotspot/test/gc/arguments/TestInitialTenuringThreshold.java
+++ b/hotspot/test/gc/arguments/TestInitialTenuringThreshold.java
@@ -27,14 +27,15 @@
  * @bug 8014765
  * @requires vm.gc.Parallel
  * @summary Tests argument processing for initial tenuring threshold
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm TestInitialTenuringThreshold
  * @author thomas.schatzl@oracle.com
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestInitialTenuringThreshold {
 
diff --git a/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java b/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java
index 69bb75d..98768c0 100644
--- a/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java
+++ b/hotspot/test/gc/arguments/TestMaxHeapSizeTools.java
@@ -26,7 +26,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 class ErgoArgsPrinter {
diff --git a/hotspot/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java b/hotspot/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java
index 3d26f94..08a5b16 100644
--- a/hotspot/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java
+++ b/hotspot/test/gc/arguments/TestMaxMinHeapFreeRatioFlags.java
@@ -25,20 +25,18 @@
  * @test TestMaxMinHeapFreeRatioFlags
  * @key gc
  * @summary Verify that heap size changes according to max and min heap free ratios.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestMaxMinHeapFreeRatioFlags
  * @run driver/timeout=240 TestMaxMinHeapFreeRatioFlags
  */
 
 import java.util.LinkedList;
 import java.util.Arrays;
 import java.util.Collections;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
-import jdk.test.lib.HeapRegionUsageTool;
 import jdk.internal.misc.Unsafe;
 
 public class TestMaxMinHeapFreeRatioFlags {
diff --git a/hotspot/test/gc/arguments/TestMaxNewSize.java b/hotspot/test/gc/arguments/TestMaxNewSize.java
index 25eb279..1a5bd98 100644
--- a/hotspot/test/gc/arguments/TestMaxNewSize.java
+++ b/hotspot/test/gc/arguments/TestMaxNewSize.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -27,10 +27,9 @@
  * @bug 7057939
  * @summary Make sure that MaxNewSize always has a useful value after argument
  * processing.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestMaxNewSize
  * @run main TestMaxNewSize -XX:+UseSerialGC
  * @run main TestMaxNewSize -XX:+UseParallelGC
  * @run main TestMaxNewSize -XX:+UseConcMarkSweepGC
@@ -46,7 +45,8 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestMaxNewSize {
 
diff --git a/hotspot/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java b/hotspot/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java
index d58040b..892426a 100644
--- a/hotspot/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java
+++ b/hotspot/test/gc/arguments/TestMinAndInitialSurvivorRatioFlags.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,20 @@
  * @test TestMinAndInitialSurvivorRatioFlags
  * @key gc
  * @summary Verify that MinSurvivorRatio and InitialSurvivorRatio flags work
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestMinAndInitialSurvivorRatioFlags
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestMinAndInitialSurvivorRatioFlags
  */
 
-import jdk.test.lib.AllocationHelper;
 import java.lang.management.MemoryUsage;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
-import jdk.test.lib.HeapRegionUsageTool;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestMinInitialErgonomics.java b/hotspot/test/gc/arguments/TestMinInitialErgonomics.java
index 784860a..ca354ba 100644
--- a/hotspot/test/gc/arguments/TestMinInitialErgonomics.java
+++ b/hotspot/test/gc/arguments/TestMinInitialErgonomics.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @key gc
  * @bug 8006088
  * @summary Test ergonomics decisions related to minimum and initial heap size.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestMinInitialErgonomics TestMaxHeapSizeTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestMinInitialErgonomics
diff --git a/hotspot/test/gc/arguments/TestNewRatioFlag.java b/hotspot/test/gc/arguments/TestNewRatioFlag.java
index 1f8cfb8..d95374a 100644
--- a/hotspot/test/gc/arguments/TestNewRatioFlag.java
+++ b/hotspot/test/gc/arguments/TestNewRatioFlag.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @key gc
  * @bug 8025166
  * @summary Verify that heap devided among generations according to NewRatio
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestNewRatioFlag
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestNewRatioFlag
  */
@@ -37,9 +37,8 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
-import jdk.test.lib.HeapRegionUsageTool;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestNewSizeFlags.java b/hotspot/test/gc/arguments/TestNewSizeFlags.java
index df01656..a871361 100644
--- a/hotspot/test/gc/arguments/TestNewSizeFlags.java
+++ b/hotspot/test/gc/arguments/TestNewSizeFlags.java
@@ -26,23 +26,21 @@
  * @key gc
  * @bug 8025166
  * @summary Verify that young gen size conforms values specified by NewSize, MaxNewSize and Xmn options
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestNewSizeFlags
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver/timeout=240  TestNewSizeFlags
  */
 
-import jdk.test.lib.AllocationHelper;
 import java.io.IOException;
 import java.lang.management.MemoryUsage;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
-import jdk.test.lib.HeapRegionUsageTool;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestNewSizeThreadIncrease.java b/hotspot/test/gc/arguments/TestNewSizeThreadIncrease.java
index d10dcf6..fc487c2 100644
--- a/hotspot/test/gc/arguments/TestNewSizeThreadIncrease.java
+++ b/hotspot/test/gc/arguments/TestNewSizeThreadIncrease.java
@@ -26,14 +26,17 @@
  * @key gc
  * @bug 8144527
  * @summary Tests argument processing for NewSizeThreadIncrease
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.gc.Serial
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
 
 // Range of NewSizeThreadIncrease is 0 ~ max_uintx.
 // Total of 5 threads will be created (1 GCTest thread and 4 TestThread).
diff --git a/hotspot/test/gc/arguments/TestObjectTenuringFlags.java b/hotspot/test/gc/arguments/TestObjectTenuringFlags.java
index b30b365..ed25dd8 100644
--- a/hotspot/test/gc/arguments/TestObjectTenuringFlags.java
+++ b/hotspot/test/gc/arguments/TestObjectTenuringFlags.java
@@ -28,14 +28,14 @@
  * @requires vm.gc.Parallel
  * @summary Tests argument processing for NeverTenure, AlwaysTenure,
  * and MaxTenuringThreshold
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestObjectTenuringFlags FlagsValue
  * @run main/othervm TestObjectTenuringFlags
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.util.*;
 
diff --git a/hotspot/test/gc/arguments/TestParallelGCThreads.java b/hotspot/test/gc/arguments/TestParallelGCThreads.java
index 44d2417..f18aa43 100644
--- a/hotspot/test/gc/arguments/TestParallelGCThreads.java
+++ b/hotspot/test/gc/arguments/TestParallelGCThreads.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,15 @@
  * @key gc
  * @bug 8059527 8081382
  * @summary Tests argument processing for ParallelGCThreads
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestParallelGCThreads
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Asserts;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestParallelGCThreads {
 
diff --git a/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java b/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java
index af0b2a7..f9e4816 100644
--- a/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java
+++ b/hotspot/test/gc/arguments/TestParallelHeapSizeFlags.java
@@ -28,10 +28,10 @@
  * @summary Tests argument processing for initial and maximum heap size for the
  * parallel collectors.
  * @requires vm.gc=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestParallelHeapSizeFlags TestMaxHeapSizeTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestParallelHeapSizeFlags
diff --git a/hotspot/test/gc/arguments/TestSelectDefaultGC.java b/hotspot/test/gc/arguments/TestSelectDefaultGC.java
index 0c39a6b..de770b2 100644
--- a/hotspot/test/gc/arguments/TestSelectDefaultGC.java
+++ b/hotspot/test/gc/arguments/TestSelectDefaultGC.java
@@ -26,14 +26,17 @@
  * @summary Test selection of GC when no GC option is specified
  * @bug 8068582
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.gc=="null"
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestSelectDefaultGC
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
 import java.util.regex.*;
 
 public class TestSelectDefaultGC {
diff --git a/hotspot/test/gc/arguments/TestSerialHeapSizeFlags.java b/hotspot/test/gc/arguments/TestSerialHeapSizeFlags.java
index 3ffd729..32533af 100644
--- a/hotspot/test/gc/arguments/TestSerialHeapSizeFlags.java
+++ b/hotspot/test/gc/arguments/TestSerialHeapSizeFlags.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @key gc
  * @bug 8006088
  * @summary Tests argument processing for initial and maximum heap size for the Serial collector
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestSerialHeapSizeFlags TestMaxHeapSizeTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestSerialHeapSizeFlags
diff --git a/hotspot/test/gc/arguments/TestShrinkHeapInSteps.java b/hotspot/test/gc/arguments/TestShrinkHeapInSteps.java
index 82dd54a..de75055 100644
--- a/hotspot/test/gc/arguments/TestShrinkHeapInSteps.java
+++ b/hotspot/test/gc/arguments/TestShrinkHeapInSteps.java
@@ -25,10 +25,9 @@
  * @test TestShrinkHeapInSteps
  * @key gc
  * @summary Verify that -XX:-ShrinkHeapInSteps works properly.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestMaxMinHeapFreeRatioFlags TestShrinkHeapInSteps
  * @run driver/timeout=240 TestShrinkHeapInSteps
  */
 
diff --git a/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java b/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java
index e275e6b..332acf3 100644
--- a/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java
+++ b/hotspot/test/gc/arguments/TestSurvivorAlignmentInBytesOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,14 @@
  * questions.
  */
 
-import jdk.test.lib.ExitCode;
+import jdk.test.lib.process.ExitCode;
 import jdk.test.lib.cli.CommandLineOptionTest;
 
 /**
  * @test
  * @bug 8031323
  * @summary Verify SurvivorAlignmentInBytes option processing.
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.opt.SurvivorAlignmentInBytes == null
  *           & vm.opt.ObjectAlignmentInBytes == null
  *           & vm.opt.UnlockExperimentalVMOptions == null
diff --git a/hotspot/test/gc/arguments/TestSurvivorRatioFlag.java b/hotspot/test/gc/arguments/TestSurvivorRatioFlag.java
index b18da4b..d33d773 100644
--- a/hotspot/test/gc/arguments/TestSurvivorRatioFlag.java
+++ b/hotspot/test/gc/arguments/TestSurvivorRatioFlag.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,20 @@
  * @test TestSurvivorRatioFlag
  * @key gc
  * @summary Verify that actual survivor ratio is equal to specified SurvivorRatio value
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestSurvivorRatioFlag
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestSurvivorRatioFlag
  */
 
-import jdk.test.lib.AllocationHelper;
 import java.lang.management.MemoryUsage;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.LinkedList;
-import jdk.test.lib.HeapRegionUsageTool;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java b/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java
index dd254e0..af91d12 100644
--- a/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java
+++ b/hotspot/test/gc/arguments/TestTargetSurvivorRatioFlag.java
@@ -27,15 +27,14 @@
  * @summary Verify that option TargetSurvivorRatio affects survivor space occupancy after minor GC.
  * @requires (vm.opt.ExplicitGCInvokesConcurrent == null) | (vm.opt.ExplicitGCInvokesConcurrent == false)
  * @requires (vm.opt.UseJVMCICompiler == null) | (vm.opt.UseJVMCICompiler == false)
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestTargetSurvivorRatioFlag
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestTargetSurvivorRatioFlag
  */
 
-import jdk.test.lib.AllocationHelper;
 import java.lang.management.GarbageCollectorMXBean;
 import java.util.Arrays;
 import java.util.Collections;
@@ -43,10 +42,9 @@
 import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import jdk.test.lib.HeapRegionUsageTool;
 import jdk.internal.misc.Unsafe;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java b/hotspot/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java
index 3b33466..f10bd70 100644
--- a/hotspot/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java
+++ b/hotspot/test/gc/arguments/TestUnrecognizedVMOptionsHandling.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,14 @@
  * @key gc
  * @bug 8017611
  * @summary Tests handling unrecognized VM options
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm TestUnrecognizedVMOptionsHandling
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestUnrecognizedVMOptionsHandling {
 
diff --git a/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java b/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java
index effbfa5..218ee05 100644
--- a/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java
+++ b/hotspot/test/gc/arguments/TestUseCompressedOopsErgo.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @key gc
  * @bug 8010722
  * @summary Tests ergonomics for UseCompressedOops.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
- * @build TestUseCompressedOopsErgo TestUseCompressedOopsErgoTools
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm TestUseCompressedOopsErgo -XX:+UseG1GC
diff --git a/hotspot/test/gc/arguments/TestUseCompressedOopsErgoTools.java b/hotspot/test/gc/arguments/TestUseCompressedOopsErgoTools.java
index 0907222..d599fe3 100644
--- a/hotspot/test/gc/arguments/TestUseCompressedOopsErgoTools.java
+++ b/hotspot/test/gc/arguments/TestUseCompressedOopsErgoTools.java
@@ -29,7 +29,9 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import jdk.test.lib.*;
+import jdk.test.lib.Asserts;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.lang.management.ManagementFactory;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/arguments/TestUseNUMAInterleaving.java b/hotspot/test/gc/arguments/TestUseNUMAInterleaving.java
index 85bb1de..4eb11c5 100644
--- a/hotspot/test/gc/arguments/TestUseNUMAInterleaving.java
+++ b/hotspot/test/gc/arguments/TestUseNUMAInterleaving.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,13 @@
  * ergonomics, on all platforms when UseNUMA feature is enabled.
  * @bug 8059614
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestUseNUMAInterleaving
  */
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestUseNUMAInterleaving {
 
diff --git a/hotspot/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java b/hotspot/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java
index d092c11..db2be6d 100644
--- a/hotspot/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java
+++ b/hotspot/test/gc/arguments/TestVerifyBeforeAndAfterGCFlags.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
          output contain or doesn't contain expected patterns
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @library /testlibrary
+ * @library /test/lib
  * @run driver TestVerifyBeforeAndAfterGCFlags
  */
 
@@ -38,17 +38,17 @@
 import java.util.Collections;
 
 import jdk.test.lib.Utils;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestVerifyBeforeAndAfterGCFlags {
 
-    // VerifyBeforeGC:[Verifying threads heap tenured eden syms strs zone dict metaspace chunks hand C-heap code cache ]
+    // VerifyBeforeGC:[Verifying threads heap tenured eden syms strs zone dict metaspace chunks hand code cache ]
     public static final String VERIFY_BEFORE_GC_PATTERN = "Verifying Before GC";
     // VerifyBeforeGC: VerifyBeforeGC: VerifyBeforeGC:
     public static final String VERIFY_BEFORE_GC_CORRUPTED_PATTERN = "VerifyBeforeGC:(?!\\[Verifying[^]]+\\])";
 
-    // VerifyAfterGC:[Verifying threads heap tenured eden syms strs zone dict metaspace chunks hand C-heap code cache ]
+    // VerifyAfterGC:[Verifying threads heap tenured eden syms strs zone dict metaspace chunks hand code cache ]
     public static final String VERIFY_AFTER_GC_PATTERN = "Verifying After GC";
     // VerifyAfterGC: VerifyAfterGC: VerifyAfterGC:
     public static final String VERIFY_AFTER_GC_CORRUPTED_PATTERN = "VerifyAfterGC:(?!\\[Verifying[^]]+\\])";
diff --git a/hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java b/hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java
index 732f0a7..6b79825 100644
--- a/hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java
+++ b/hotspot/test/gc/class_unloading/TestCMSClassUnloadingEnabledHWM.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,18 +25,18 @@
  * @test
  * @key gc
  * @bug 8049831
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestCMSClassUnloadingEnabledHWM
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver TestCMSClassUnloadingEnabledHWM
  * @summary Test that -XX:-CMSClassUnloadingEnabled will trigger a Full GC when more than MetaspaceSize metadata is allocated.
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.lang.management.GarbageCollectorMXBean;
 import java.lang.management.ManagementFactory;
 import java.util.ArrayList;
diff --git a/hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java b/hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java
index 6b99caf..ad0ef23 100644
--- a/hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java
+++ b/hotspot/test/gc/class_unloading/TestG1ClassUnloadingHWM.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,18 +25,18 @@
  * @test
  * @key gc
  * @bug 8049831
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestG1ClassUnloadingHWM
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run driver TestG1ClassUnloadingHWM
  * @summary Test that -XX:-ClassUnloadingWithConcurrentMark will trigger a Full GC when more than MetaspaceSize metadata is allocated.
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.util.ArrayList;
 import java.util.Arrays;
 import sun.hotspot.WhiteBox;
diff --git a/hotspot/test/gc/cms/GuardShrinkWarning.java b/hotspot/test/gc/cms/GuardShrinkWarning.java
index 5818267..5790ba1 100644
--- a/hotspot/test/gc/cms/GuardShrinkWarning.java
+++ b/hotspot/test/gc/cms/GuardShrinkWarning.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,14 +27,15 @@
  * @bug 8012111
  * @key gc
  * @key regression
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm GuardShrinkWarning
  * @author jon.masamitsu@oracle.com
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class GuardShrinkWarning {
   public static void main(String args[]) throws Exception {
diff --git a/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java b/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
index 7b262fd..5040a93 100644
--- a/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
+++ b/hotspot/test/gc/ergonomics/TestDynamicNumberOfGCThreads.java
@@ -28,11 +28,11 @@
  * @requires vm.gc=="null"
  * @key gc
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestDynamicNumberOfGCThreads {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/ergonomics/TestInitialGCThreadLogging.java b/hotspot/test/gc/ergonomics/TestInitialGCThreadLogging.java
index 29a7602..f68e8fa 100644
--- a/hotspot/test/gc/ergonomics/TestInitialGCThreadLogging.java
+++ b/hotspot/test/gc/ergonomics/TestInitialGCThreadLogging.java
@@ -28,11 +28,11 @@
  * @requires vm.gc=="null"
  * @key gc
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestInitialGCThreadLogging {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/g1/Test2GbHeap.java b/hotspot/test/gc/g1/Test2GbHeap.java
index 66bc2c7..55e9927 100644
--- a/hotspot/test/gc/g1/Test2GbHeap.java
+++ b/hotspot/test/gc/g1/Test2GbHeap.java
@@ -30,15 +30,15 @@
  * @requires vm.bits != "32"
  * @key gc
  * @key regression
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.util.ArrayList;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class Test2GbHeap {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegions.java b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegions.java
index b29d932..71ec43d 100644
--- a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegions.java
+++ b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary Test to make sure that eager reclaim of humongous objects work. We simply try to fill
  * up the heap with humongous objects that should be eagerly reclaimable to avoid Full GC.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
@@ -36,8 +36,8 @@
 import java.util.regex.Matcher;
 import java.util.LinkedList;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Asserts;
 
 class ReclaimRegionFast {
diff --git a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java
index 3e835bb..a516e02 100644
--- a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java
+++ b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsClearMarkBits.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary Test to make sure that eager reclaim of humongous objects correctly clears
  * mark bitmaps at reclaim.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
@@ -36,8 +36,8 @@
 import java.util.LinkedList;
 import java.util.Random;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 // An object that has a few references to other instances to slow down marking.
 class ObjectWithSomeRefs {
diff --git a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java
index ecd0164..6bfa89b 100644
--- a/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java
+++ b/hotspot/test/gc/g1/TestEagerReclaimHumongousRegionsWithRefs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
  * referencing that we know is in the old gen. After changing this reference, the object
  * should still be eagerly reclaimable to avoid Full GC.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
@@ -39,8 +39,8 @@
 import java.util.regex.Matcher;
 import java.util.LinkedList;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import static jdk.test.lib.Asserts.*;
 
 class RefHolder {
diff --git a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
index 57fcf2c..2c27eb2 100644
--- a/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
+++ b/hotspot/test/gc/g1/TestG1TraceEagerReclaimHumongousObjects.java
@@ -27,13 +27,13 @@
  * @summary Ensure that the output for a G1TraceEagerReclaimHumongousObjects
  * includes the expected necessary messages.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.util.LinkedList;
 
 public class TestG1TraceEagerReclaimHumongousObjects {
diff --git a/hotspot/test/gc/g1/TestGCLogMessages.java b/hotspot/test/gc/g1/TestGCLogMessages.java
index ec9250c..776ef7d 100644
--- a/hotspot/test/gc/g1/TestGCLogMessages.java
+++ b/hotspot/test/gc/g1/TestGCLogMessages.java
@@ -27,13 +27,13 @@
  * @summary Ensure the output for a minor GC with G1
  * includes the expected necessary messages.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestGCLogMessages {
 
diff --git a/hotspot/test/gc/g1/TestHumongousAllocInitialMark.java b/hotspot/test/gc/g1/TestHumongousAllocInitialMark.java
index cd43193..c760c36 100644
--- a/hotspot/test/gc/g1/TestHumongousAllocInitialMark.java
+++ b/hotspot/test/gc/g1/TestHumongousAllocInitialMark.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test TestHumongousAllocInitialMark
  * @bug 7168848
  * @summary G1: humongous object allocations should initiate marking cycles when necessary
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestHumongousAllocInitialMark {
     // Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to
diff --git a/hotspot/test/gc/g1/TestHumongousAllocNearlyFullRegion.java b/hotspot/test/gc/g1/TestHumongousAllocNearlyFullRegion.java
index a7a3444..7c0d7a1 100644
--- a/hotspot/test/gc/g1/TestHumongousAllocNearlyFullRegion.java
+++ b/hotspot/test/gc/g1/TestHumongousAllocNearlyFullRegion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,12 @@
  * @summary G1: humongous object allocations should work even when there is
  *              not enough space in the heapRegion to fit a filler object.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run driver TestHumongousAllocNearlyFullRegion
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestHumongousAllocNearlyFullRegion {
     // Heap sizes < 224 MB are increased to 224 MB if vm_page_size == 64K to
diff --git a/hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java b/hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java
index 00950cc..955474c 100644
--- a/hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java
+++ b/hotspot/test/gc/g1/TestHumongousCodeCacheRoots.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,17 +26,18 @@
  * @key regression
  * @key gc
  * @bug 8027756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestHumongousCodeCacheRoots
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @summary Humongous objects may have references from the code cache
  * @run main TestHumongousCodeCacheRoots
 */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import sun.hotspot.WhiteBox;
 
 import java.util.ArrayList;
diff --git a/hotspot/test/gc/g1/TestHumongousShrinkHeap.java b/hotspot/test/gc/g1/TestHumongousShrinkHeap.java
index 62c452a..53bcbe0 100644
--- a/hotspot/test/gc/g1/TestHumongousShrinkHeap.java
+++ b/hotspot/test/gc/g1/TestHumongousShrinkHeap.java
@@ -27,7 +27,7 @@
  * @requires vm.gc.G1
  * @summary Verify that heap shrinks after GC in the presence of fragmentation
  * due to humongous objects
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
  * @run main/othervm -XX:-ExplicitGCInvokesConcurrent -XX:MinHeapFreeRatio=10
diff --git a/hotspot/test/gc/g1/TestLargePageUseForAuxMemory.java b/hotspot/test/gc/g1/TestLargePageUseForAuxMemory.java
index 844e152..3f173c3 100644
--- a/hotspot/test/gc/g1/TestLargePageUseForAuxMemory.java
+++ b/hotspot/test/gc/g1/TestLargePageUseForAuxMemory.java
@@ -27,10 +27,9 @@
  * @bug 8058354 8079208
  * @key gc
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @requires vm.gc.G1
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestLargePageUseForAuxMemory
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:+UseLargePages TestLargePageUseForAuxMemory
@@ -40,8 +39,10 @@
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Asserts;
+import jdk.test.lib.Platform;
 import sun.hotspot.WhiteBox;
 
 public class TestLargePageUseForAuxMemory {
diff --git a/hotspot/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java b/hotspot/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java
index 5a1eefe..d8a6e29 100644
--- a/hotspot/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java
+++ b/hotspot/test/gc/g1/TestNoEagerReclaimOfHumongousRegions.java
@@ -29,9 +29,9 @@
  *          might pass even if there are problems in the code, but it will never crash unless there is a problem.
  * @requires vm.gc.G1
  * @key gc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build TestNoEagerReclaimOfHumongousRegions
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xlog:gc,gc+humongous=debug -XX:+UseG1GC -XX:MaxTenuringThreshold=0 -XX:G1RSetSparseRegionEntries=32 -XX:G1HeapRegionSize=1m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestNoEagerReclaimOfHumongousRegions
diff --git a/hotspot/test/gc/g1/TestPLABOutput.java b/hotspot/test/gc/g1/TestPLABOutput.java
index 2f53c5c..53519fa 100644
--- a/hotspot/test/gc/g1/TestPLABOutput.java
+++ b/hotspot/test/gc/g1/TestPLABOutput.java
@@ -28,7 +28,7 @@
  * @requires vm.gc.G1
  * @key gc
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestPLABOutput
@@ -39,9 +39,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/gc/g1/TestPLABSizeBounds.java b/hotspot/test/gc/g1/TestPLABSizeBounds.java
index e4faca6..0b29eb5 100644
--- a/hotspot/test/gc/g1/TestPLABSizeBounds.java
+++ b/hotspot/test/gc/g1/TestPLABSizeBounds.java
@@ -27,16 +27,16 @@
  * @summary Regression test to ensure that G1 supports PLAB sizes of half a region size.
  * @requires vm.gc.G1
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.util.ArrayList;
 
-import jdk.test.lib.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestPLABSizeBounds {
 
diff --git a/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java b/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java
index b048208..79b797b 100644
--- a/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java
+++ b/hotspot/test/gc/g1/TestPrintRegionRememberedSetInfo.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,15 @@
  * @key gc
  * @bug 8014240
  * @summary Test output of G1PrintRegionRememberedSetInfo
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main TestPrintRegionRememberedSetInfo
  * @author thomas.schatzl@oracle.com
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.lang.Thread;
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/hotspot/test/gc/g1/TestRegionLivenessPrint.java b/hotspot/test/gc/g1/TestRegionLivenessPrint.java
index 8e79b1e..3e0f3e2 100644
--- a/hotspot/test/gc/g1/TestRegionLivenessPrint.java
+++ b/hotspot/test/gc/g1/TestRegionLivenessPrint.java
@@ -27,9 +27,9 @@
  * @requires vm.gc.G1
  * @summary Make sure that G1 does not assert when printing region liveness data on a humongous continues region.
  * @key gc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build TestRegionLivenessPrint
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC -Xmx128M -XX:G1HeapRegionSize=1m -Xlog:gc+liveness=trace TestRegionLivenessPrint
diff --git a/hotspot/test/gc/g1/TestRemsetLogging.java b/hotspot/test/gc/g1/TestRemsetLogging.java
index 146a16f..f4e8296 100644
--- a/hotspot/test/gc/g1/TestRemsetLogging.java
+++ b/hotspot/test/gc/g1/TestRemsetLogging.java
@@ -25,10 +25,10 @@
  * @test TestRemsetLogging.java
  * @requires vm.gc.G1
  * @bug 8013895 8129977 8145534
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
- * @build TestRemsetLoggingTools TestRemsetLogging
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @summary Verify output of -Xlog:gc+remset*=trace
diff --git a/hotspot/test/gc/g1/TestRemsetLoggingPerRegion.java b/hotspot/test/gc/g1/TestRemsetLoggingPerRegion.java
index e60d191..123f616 100644
--- a/hotspot/test/gc/g1/TestRemsetLoggingPerRegion.java
+++ b/hotspot/test/gc/g1/TestRemsetLoggingPerRegion.java
@@ -25,10 +25,10 @@
  * @test TestRemsetLoggingPerRegion.java
  * @requires vm.gc.G1
  * @bug 8014078 8129977 8145534
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
- * @build TestRemsetLoggingTools TestRemsetLoggingPerRegion
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @summary Verify output of -Xlog:gc+remset*=trace in regards to per-region type output
diff --git a/hotspot/test/gc/g1/TestRemsetLoggingThreads.java b/hotspot/test/gc/g1/TestRemsetLoggingThreads.java
index 2f0c712..18b1f05 100644
--- a/hotspot/test/gc/g1/TestRemsetLoggingThreads.java
+++ b/hotspot/test/gc/g1/TestRemsetLoggingThreads.java
@@ -26,7 +26,7 @@
  * @requires vm.gc.G1
  * @bug 8025441 8145534
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
  * @summary Ensure that various values of worker threads/concurrent
@@ -36,8 +36,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestRemsetLoggingThreads {
 
diff --git a/hotspot/test/gc/g1/TestRemsetLoggingTools.java b/hotspot/test/gc/g1/TestRemsetLoggingTools.java
index e58eb9e..6fdc4e5 100644
--- a/hotspot/test/gc/g1/TestRemsetLoggingTools.java
+++ b/hotspot/test/gc/g1/TestRemsetLoggingTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,8 @@
 import com.sun.management.VMOption;
 import sun.hotspot.WhiteBox;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.lang.management.ManagementFactory;
 import java.util.ArrayList;
 import java.util.Arrays;
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData.java
index 3b0907c..cb25eac 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData.java
@@ -22,9 +22,9 @@
  */
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData00.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData00.java
index baed161..9f3b580 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData00.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData00.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- *        TestShrinkAuxiliaryData TestShrinkAuxiliaryData00
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData00
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData05.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData05.java
index 846f91d..1fa2ca5 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData05.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData05.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- *        TestShrinkAuxiliaryData TestShrinkAuxiliaryData05
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData05
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData10.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData10.java
index 05b041d..694e35f 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData10.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData10.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData10
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData10
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData15.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData15.java
index ec0623b..1bfbe48 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData15.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData15.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData15
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData15
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData20.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData20.java
index a89eb28..0d037d2 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData20.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData20.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
   *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData20
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData20
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData25.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData25.java
index 50d5d91..a24111f 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData25.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData25.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData25
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData25
diff --git a/hotspot/test/gc/g1/TestShrinkAuxiliaryData30.java b/hotspot/test/gc/g1/TestShrinkAuxiliaryData30.java
index 6432cda..5572a01 100644
--- a/hotspot/test/gc/g1/TestShrinkAuxiliaryData30.java
+++ b/hotspot/test/gc/g1/TestShrinkAuxiliaryData30.java
@@ -28,11 +28,10 @@
  * G1ConcRSLogCacheSize and ObjectAlignmentInBytes options values
  * @requires vm.gc.G1
  * @requires vm.opt.AggressiveOpts=="false" | vm.opt.AggressiveOpts=="null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.* sun.hotspot.WhiteBox
- * @build TestShrinkAuxiliaryData TestShrinkAuxiliaryData30
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=720 TestShrinkAuxiliaryData30
diff --git a/hotspot/test/gc/g1/TestShrinkDefragmentedHeap.java b/hotspot/test/gc/g1/TestShrinkDefragmentedHeap.java
index 34948e9..fa3126f 100644
--- a/hotspot/test/gc/g1/TestShrinkDefragmentedHeap.java
+++ b/hotspot/test/gc/g1/TestShrinkDefragmentedHeap.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
  *        "..................................H"
  *     3. invoke gc and check that memory returned to the system (amount of committed memory got down)
  *
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
  */
@@ -40,8 +40,8 @@
 import java.util.ArrayList;
 import java.util.List;
 import static jdk.test.lib.Asserts.*;
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import com.sun.management.HotSpotDiagnosticMXBean;
 
 public class TestShrinkDefragmentedHeap {
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationAgeThreshold.java b/hotspot/test/gc/g1/TestStringDeduplicationAgeThreshold.java
index b09a32a..25e6a12 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationAgeThreshold.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationAgeThreshold.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication age threshold
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationFullGC.java b/hotspot/test/gc/g1/TestStringDeduplicationFullGC.java
index b725acb..1c2ab73 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationFullGC.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationFullGC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication during full GC
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationInterned.java b/hotspot/test/gc/g1/TestStringDeduplicationInterned.java
index 3abe32d..766c9f8 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationInterned.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationInterned.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication of interned strings
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationPrintOptions.java b/hotspot/test/gc/g1/TestStringDeduplicationPrintOptions.java
index 62146e1..4394096 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationPrintOptions.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationPrintOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication print options
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationTableRehash.java b/hotspot/test/gc/g1/TestStringDeduplicationTableRehash.java
index d7c2f12..5f466f3 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationTableRehash.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationTableRehash.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication table rehash
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationTableResize.java b/hotspot/test/gc/g1/TestStringDeduplicationTableResize.java
index 204efb5..1259869 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationTableResize.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationTableResize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication table resize
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationTools.java b/hotspot/test/gc/g1/TestStringDeduplicationTools.java
index 3e725f7..b476031 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationTools.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,8 @@
 import java.lang.reflect.*;
 import java.security.*;
 import java.util.*;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.misc.*;
 
 class TestStringDeduplicationTools {
diff --git a/hotspot/test/gc/g1/TestStringDeduplicationYoungGC.java b/hotspot/test/gc/g1/TestStringDeduplicationYoungGC.java
index 15ab52f..a65e4ab 100644
--- a/hotspot/test/gc/g1/TestStringDeduplicationYoungGC.java
+++ b/hotspot/test/gc/g1/TestStringDeduplicationYoungGC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Test string deduplication during young GC
  * @bug 8029075
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/g1/TestStringSymbolTableStats.java b/hotspot/test/gc/g1/TestStringSymbolTableStats.java
index e861879..62994fa 100644
--- a/hotspot/test/gc/g1/TestStringSymbolTableStats.java
+++ b/hotspot/test/gc/g1/TestStringSymbolTableStats.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
  * @bug 8027476 8027455
  * @summary Ensure that the G1TraceStringSymbolTableScrubbing prints the expected message.
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestStringSymbolTableStats {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/g1/humongousObjects/TestHeapCounters.java b/hotspot/test/gc/g1/humongousObjects/TestHeapCounters.java
index 28bc484..86405e1 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestHeapCounters.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestHeapCounters.java
@@ -38,12 +38,10 @@
  * @test TestHeapCounters
  * @summary Checks that heap counters work as expected after humongous allocations/deallocations
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.TestHeapCounters
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *             sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java b/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java
index 86bc2d2..1db6259 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java
@@ -41,15 +41,10 @@
  * @requires vm.gc.G1
  * @requires vm.opt.G1HeapRegionSize == "null" | vm.opt.G1HeapRegionSize == "1M"
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.G1SampleClass
- *        gc.g1.humongousObjects.ClassLoaderGenerator
- *        gc.g1.humongousObjects.TestHumongousClassLoader
- *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/TestHumongousMovement.java b/hotspot/test/gc/g1/humongousObjects/TestHumongousMovement.java
index a90c98d..755516c 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestHumongousMovement.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousMovement.java
@@ -40,12 +40,10 @@
  * @test TestHumongousMovement
  * @summary Checks that Humongous objects are not moved during GC
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.TestHumongousMovement
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *      sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
diff --git a/hotspot/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java b/hotspot/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java
index fcc9d7d..2abcf48 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousNonArrayAllocation.java
@@ -39,14 +39,10 @@
  * @summary Checks that huge class' instances (ie with huge amount of fields) are allocated successfully
  * @requires vm.gc.G1
  * @requires vm.opt.G1HeapRegionSize == "null" | vm.opt.G1HeapRegionSize == "1M"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.G1SampleClass
- *        gc.g1.humongousObjects.TestHumongousNonArrayAllocation
- *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/TestHumongousThreshold.java b/hotspot/test/gc/g1/humongousObjects/TestHumongousThreshold.java
index cc1660e..76b35ab 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestHumongousThreshold.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousThreshold.java
@@ -32,12 +32,10 @@
  * @test TestHumongousThreshold
  * @summary Checks that objects larger than half a region are allocated as humongous
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.TestHumongousThreshold
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java b/hotspot/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java
index bbd1568..893b895 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestNoAllocationsInHRegions.java
@@ -36,12 +36,9 @@
  * @test TestNoAllocationsInHRegions
  * @summary Checks that no additional allocations are made in humongous regions
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.management java.base/jdk.internal.misc
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.TestNoAllocationsInHRegions
- *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *      sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/TestObjectCollected.java b/hotspot/test/gc/g1/humongousObjects/TestObjectCollected.java
index 0cf5e2c..10ffe50 100644
--- a/hotspot/test/gc/g1/humongousObjects/TestObjectCollected.java
+++ b/hotspot/test/gc/g1/humongousObjects/TestObjectCollected.java
@@ -38,13 +38,10 @@
  * @summary checks that after different type of GCs weak/soft references to humongous object behave correspondingly to
  * actual object behavior
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.TestObjectCollected
- *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *             sun.hotspot.WhiteBox$WhiteBoxPermission
  *
diff --git a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java
index 07f7a3b..bb7f3d2 100644
--- a/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java
+++ b/hotspot/test/gc/g1/humongousObjects/objectGraphTest/TestObjectGraphAfterGC.java
@@ -24,7 +24,7 @@
 
 package gc.g1.humongousObjects.objectGraphTest;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 import java.io.File;
@@ -50,16 +50,9 @@
  * @summary Checks that objects' graph behave as expected after gc
  * @requires vm.gc.G1
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.management java.base/jdk.internal.misc
  * @build sun.hotspot.WhiteBox
- *        gc.testlibrary.Helpers
- *        gc.g1.humongousObjects.objectGraphTest.GCTokens
- *        gc.g1.humongousObjects.objectGraphTest.ReferenceInfo
- *        gc.g1.humongousObjects.objectGraphTest.GC
- *        gc.g1.humongousObjects.objectGraphTest.ObjectGraph
- *        gc.g1.humongousObjects.objectGraphTest.TestObjectGraphAfterGC
- *
  * @ignore 8156755
  *
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/gc/g1/ihop/TestIHOPErgo.java b/hotspot/test/gc/g1/ihop/TestIHOPErgo.java
index d70c926..af46c52 100644
--- a/hotspot/test/gc/g1/ihop/TestIHOPErgo.java
+++ b/hotspot/test/gc/g1/ihop/TestIHOPErgo.java
@@ -30,11 +30,9 @@
  * @requires !vm.flightRecorder
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
  * @requires vm.opt.MaxGCPauseMillis == "null"
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build gc.g1.ihop.TestIHOPErgo
- *        gc.g1.ihop.lib.IhopUtils
  * @run driver/timeout=480 gc.g1.ihop.TestIHOPErgo
  */
 package gc.g1.ihop;
@@ -44,8 +42,8 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import gc.g1.ihop.lib.IhopUtils;
 
diff --git a/hotspot/test/gc/g1/ihop/TestIHOPStatic.java b/hotspot/test/gc/g1/ihop/TestIHOPStatic.java
index 0529af8..0fcafaf 100644
--- a/hotspot/test/gc/g1/ihop/TestIHOPStatic.java
+++ b/hotspot/test/gc/g1/ihop/TestIHOPStatic.java
@@ -28,11 +28,9 @@
  * @requires vm.gc.G1
  * @requires !vm.flightRecorder
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build gc.g1.ihop.TestIHOPStatic
- *        gc.g1.ihop.lib.IhopUtils
  * @run driver/timeout=240 gc.g1.ihop.TestIHOPStatic
  */
 package gc.g1.ihop;
@@ -41,8 +39,8 @@
 import java.util.Collections;
 import java.util.List;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 
 import gc.g1.ihop.lib.IhopUtils;
diff --git a/hotspot/test/gc/g1/ihop/lib/IhopUtils.java b/hotspot/test/gc/g1/ihop/lib/IhopUtils.java
index 0ca571b..0cd25ea 100644
--- a/hotspot/test/gc/g1/ihop/lib/IhopUtils.java
+++ b/hotspot/test/gc/g1/ihop/lib/IhopUtils.java
@@ -27,7 +27,7 @@
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 /**
diff --git a/hotspot/test/gc/g1/mixedgc/TestLogging.java b/hotspot/test/gc/g1/mixedgc/TestLogging.java
index 29fd37f..d323130 100644
--- a/hotspot/test/gc/g1/mixedgc/TestLogging.java
+++ b/hotspot/test/gc/g1/mixedgc/TestLogging.java
@@ -26,18 +26,18 @@
  * @summary Check that a mixed GC is reflected in the gc logs
  * @requires vm.gc.G1
  * @requires vm.opt.MaxGCPauseMillis == "null"
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build sun.hotspot.WhiteBox gc.g1.mixedgc.TestLogging
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver gc.g1.mixedgc.TestLogging
  */
 
 package gc.g1.mixedgc;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Asserts;
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/gc/g1/plab/TestPLABEvacuationFailure.java b/hotspot/test/gc/g1/plab/TestPLABEvacuationFailure.java
index 77f43d2..09d3286 100644
--- a/hotspot/test/gc/g1/plab/TestPLABEvacuationFailure.java
+++ b/hotspot/test/gc/g1/plab/TestPLABEvacuationFailure.java
@@ -26,11 +26,9 @@
  * @bug 8148376
  * @summary Checks PLAB statistics on evacuation failure
  * @requires vm.gc.G1
- * @library /testlibrary /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build gc.g1.plab.lib.LogParser
- *        gc.g1.plab.lib.AppPLABEvacuationFailure
  * @run main gc.g1.plab.TestPLABEvacuationFailure
  */
 package gc.g1.plab;
@@ -43,8 +41,8 @@
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 
 import gc.g1.plab.lib.LogParser;
diff --git a/hotspot/test/gc/g1/plab/TestPLABPromotion.java b/hotspot/test/gc/g1/plab/TestPLABPromotion.java
index 95177e8..926ee80 100644
--- a/hotspot/test/gc/g1/plab/TestPLABPromotion.java
+++ b/hotspot/test/gc/g1/plab/TestPLABPromotion.java
@@ -27,14 +27,10 @@
  * @summary Test PLAB promotion
  * @requires vm.gc.G1
  * @requires !vm.flightRecorder
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build ClassFileInstaller
- *        sun.hotspot.WhiteBox
- *        gc.g1.plab.lib.MemoryConsumer
- *        gc.g1.plab.lib.LogParser
- *        gc.g1.plab.lib.AppPLABPromotion
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/timeout=240 gc.g1.plab.TestPLABPromotion
@@ -50,8 +46,8 @@
 import gc.g1.plab.lib.PLABUtils;
 import gc.g1.plab.lib.PlabInfo;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 /**
  * Test checks PLAB promotion of different size objects.
diff --git a/hotspot/test/gc/g1/plab/TestPLABResize.java b/hotspot/test/gc/g1/plab/TestPLABResize.java
index 7b45914..9a4cfdb 100644
--- a/hotspot/test/gc/g1/plab/TestPLABResize.java
+++ b/hotspot/test/gc/g1/plab/TestPLABResize.java
@@ -27,15 +27,10 @@
  * @summary Test for PLAB resizing
  * @requires vm.gc.G1
  * @requires !vm.flightRecorder
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build ClassFileInstaller
- *        sun.hotspot.WhiteBox
- *        gc.g1.plab.lib.LogParser
- *        gc.g1.plab.lib.MemoryConsumer
- *        gc.g1.plab.lib.PLABUtils
- *        gc.g1.plab.lib.AppPLABResize
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main gc.g1.plab.TestPLABResize
@@ -52,8 +47,8 @@
 import gc.g1.plab.lib.AppPLABResize;
 import gc.g1.plab.lib.PlabReport;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 /**
  * Test for PLAB resizing.
diff --git a/hotspot/test/gc/g1/plab/lib/PLABUtils.java b/hotspot/test/gc/g1/plab/lib/PLABUtils.java
index 096441c..0ae28ab 100644
--- a/hotspot/test/gc/g1/plab/lib/PLABUtils.java
+++ b/hotspot/test/gc/g1/plab/lib/PLABUtils.java
@@ -26,7 +26,7 @@
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 
 /**
diff --git a/hotspot/test/gc/logging/TestDeprecatedPrintFlags.java b/hotspot/test/gc/logging/TestDeprecatedPrintFlags.java
index fe2a8d7..09ed8a0 100644
--- a/hotspot/test/gc/logging/TestDeprecatedPrintFlags.java
+++ b/hotspot/test/gc/logging/TestDeprecatedPrintFlags.java
@@ -26,12 +26,13 @@
  * @bug 8145180
  * @summary Verify PrintGC, PrintGCDetails and -Xloggc
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.io.File;
 import java.nio.file.Files;
 import java.nio.file.Paths;
diff --git a/hotspot/test/gc/logging/TestGCId.java b/hotspot/test/gc/logging/TestGCId.java
index 1f89a33..c2b134e 100644
--- a/hotspot/test/gc/logging/TestGCId.java
+++ b/hotspot/test/gc/logging/TestGCId.java
@@ -27,13 +27,13 @@
  * @summary Ensure that the GCId is logged
  * @requires vm.gc=="null"
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestGCId {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/logging/TestPrintReferences.java b/hotspot/test/gc/logging/TestPrintReferences.java
index 8181e0c..1932634 100644
--- a/hotspot/test/gc/logging/TestPrintReferences.java
+++ b/hotspot/test/gc/logging/TestPrintReferences.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
  * @bug 8136991
  * @summary Validate the reference processing logging
  * @key gc
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestPrintReferences {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/logging/TestUnifiedLoggingSwitchStress.java b/hotspot/test/gc/logging/TestUnifiedLoggingSwitchStress.java
index 37fd5b2..4c7838e 100644
--- a/hotspot/test/gc/logging/TestUnifiedLoggingSwitchStress.java
+++ b/hotspot/test/gc/logging/TestUnifiedLoggingSwitchStress.java
@@ -44,7 +44,7 @@
  * @key gc
  * @key stress
  * @requires !vm.flightRecorder
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.management java.base/jdk.internal.misc
  *
  * @run main/othervm -Xmx256M -Xms256M
diff --git a/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java b/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
index ebe90ee..ea9ae05 100644
--- a/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
+++ b/hotspot/test/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,16 @@
  * @test CompressedClassSpaceSizeInJmapHeap
  * @bug 8004924
  * @summary Checks that jmap -heap contains the flag CompressedClassSpaceSize
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=50m CompressedClassSpaceSizeInJmapHeap
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolLauncher;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.nio.file.*;
 import java.io.File;
 import java.nio.charset.Charset;
diff --git a/hotspot/test/testlibrary/jdk/test/lib/InputArguments.java b/hotspot/test/gc/metaspace/InputArguments.java
similarity index 96%
rename from hotspot/test/testlibrary/jdk/test/lib/InputArguments.java
rename to hotspot/test/gc/metaspace/InputArguments.java
index 7963b0a..35edb81 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/InputArguments.java
+++ b/hotspot/test/gc/metaspace/InputArguments.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,8 +21,6 @@
  * questions.
  */
 
-package jdk.test.lib;
-
 import java.lang.management.RuntimeMXBean;
 import java.lang.management.ManagementFactory;
 import java.util.List;
diff --git a/hotspot/test/gc/metaspace/PerfCounters.java b/hotspot/test/gc/metaspace/PerfCounters.java
index 9dce3bd..c1242b1 100644
--- a/hotspot/test/gc/metaspace/PerfCounters.java
+++ b/hotspot/test/gc/metaspace/PerfCounters.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import sun.jvmstat.monitor.MonitoredHost;
 import sun.jvmstat.monitor.MonitoredVm;
 import sun.jvmstat.monitor.VmIdentifier;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 /**
  * PerfCounters can be used to get a performance counter from the currently
diff --git a/hotspot/test/gc/metaspace/TestCapacityUntilGCWrapAround.java b/hotspot/test/gc/metaspace/TestCapacityUntilGCWrapAround.java
index 827aff5..0b748a2 100644
--- a/hotspot/test/gc/metaspace/TestCapacityUntilGCWrapAround.java
+++ b/hotspot/test/gc/metaspace/TestCapacityUntilGCWrapAround.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test
  * @key gc
  * @bug 8049831
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestCapacityUntilGCWrapAround
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI TestCapacityUntilGCWrapAround
diff --git a/hotspot/test/gc/metaspace/TestMetaspaceCMSCancel.java b/hotspot/test/gc/metaspace/TestMetaspaceCMSCancel.java
index 42357ff..62e8fdf 100644
--- a/hotspot/test/gc/metaspace/TestMetaspaceCMSCancel.java
+++ b/hotspot/test/gc/metaspace/TestMetaspaceCMSCancel.java
@@ -28,9 +28,9 @@
 /* @test TestMetaspaceCMSCancel
  * @bug 8026752
  * @summary Tests cancel of CMS concurrent cycle for Metaspace after a full GC
- * @library /testlibrary /test/lib /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build TestMetaspaceCMSCancel
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm TestMetaspaceCMSCancel
  */
diff --git a/hotspot/test/gc/metaspace/TestMetaspaceInitialization.java b/hotspot/test/gc/metaspace/TestMetaspaceInitialization.java
index f6ac414..418ea3c 100644
--- a/hotspot/test/gc/metaspace/TestMetaspaceInitialization.java
+++ b/hotspot/test/gc/metaspace/TestMetaspaceInitialization.java
@@ -27,7 +27,6 @@
  * @bug 8024945
  * @summary Tests to initialize metaspace with a very low MetaspaceSize
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
  * @run main/othervm -XX:MetaspaceSize=0 TestMetaspaceInitialization
  */
 public class TestMetaspaceInitialization {
diff --git a/hotspot/test/gc/metaspace/TestMetaspaceMemoryPool.java b/hotspot/test/gc/metaspace/TestMetaspaceMemoryPool.java
index 64066ee..3705379 100644
--- a/hotspot/test/gc/metaspace/TestMetaspaceMemoryPool.java
+++ b/hotspot/test/gc/metaspace/TestMetaspaceMemoryPool.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,14 +23,16 @@
 
 import java.util.List;
 import java.lang.management.*;
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import static jdk.test.lib.Asserts.*;
 
 /* @test TestMetaspaceMemoryPool
  * @bug 8000754
  * @summary Tests that a MemoryPoolMXBeans is created for metaspace and that a
  *          MemoryManagerMXBean is created.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops TestMetaspaceMemoryPool
diff --git a/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java b/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java
index f76d457..9db2d02 100644
--- a/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java
+++ b/hotspot/test/gc/metaspace/TestMetaspacePerfCounters.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,21 +21,27 @@
  * questions.
  */
 
+import java.lang.management.GarbageCollectorMXBean;
 import java.util.List;
 import java.util.ArrayList;
 
-import jdk.test.lib.*;
+import jdk.test.lib.ByteCodeLoader;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.Platform;
+
+import sun.management.ManagementFactoryHelper;
+
 import static jdk.test.lib.Asserts.*;
 
 /* @test TestMetaspacePerfCounters
  * @bug 8014659
  * @requires vm.gc=="null"
- * @library /testlibrary
+ * @library /test/lib
  * @summary Tests that performance counters for metaspace and compressed class
  *          space exists and works.
  * @modules java.base/jdk.internal.misc
  *          java.compiler
- *          java.management
+ *          java.management/sun.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseSerialGC TestMetaspacePerfCounters
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops -XX:-UseCompressedClassPointers -XX:+UsePerfData -XX:+UseParallelGC -XX:+UseParallelOldGC TestMetaspacePerfCounters
@@ -48,6 +54,7 @@
 public class TestMetaspacePerfCounters {
     public static Class fooClass = null;
     private static final String[] counterNames = {"minCapacity", "maxCapacity", "capacity", "used"};
+    private static final List<GarbageCollectorMXBean> gcBeans = ManagementFactoryHelper.getGarbageCollectorMXBeans();
 
     public static void main(String[] args) throws Exception {
         String metaspace = "sun.gc.metaspace";
@@ -65,10 +72,27 @@
     }
 
     private static void checkPerfCounters(String ns) throws Exception {
-        long minCapacity = getMinCapacity(ns);
-        long maxCapacity = getMaxCapacity(ns);
-        long capacity = getCapacity(ns);
-        long used = getUsed(ns);
+        long gcCountBefore;
+        long gcCountAfter;
+        long minCapacity;
+        long maxCapacity;
+        long capacity;
+        long used;
+
+        // The perf counter values are updated during GC and to be able to
+        // do the assertions below we need to ensure that the values are from
+        // the same GC cycle.
+        do {
+            gcCountBefore = currentGCCount();
+
+            minCapacity = getMinCapacity(ns);
+            maxCapacity = getMaxCapacity(ns);
+            capacity = getCapacity(ns);
+            used = getUsed(ns);
+
+            gcCountAfter = currentGCCount();
+            assertGTE(gcCountAfter, gcCountBefore);
+        } while(gcCountAfter > gcCountBefore);
 
         assertGTE(minCapacity, 0L);
         assertGTE(used, minCapacity);
@@ -127,4 +151,12 @@
     private static long getUsed(String ns) throws Exception {
         return PerfCounters.findByName(ns + ".used").longValue();
     }
+
+    private static long currentGCCount() {
+        long gcCount = 0;
+        for (GarbageCollectorMXBean bean : gcBeans) {
+            gcCount += bean.getCollectionCount();
+        }
+        return gcCount;
+    }
 }
diff --git a/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java b/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java
index 639694c..b5ed60b 100644
--- a/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java
+++ b/hotspot/test/gc/metaspace/TestMetaspaceSizeFlags.java
@@ -22,15 +22,15 @@
  */
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test TestMetaspaceSizeFlags
  * @key gc
  * @bug 8024650
  * @summary Test that metaspace size flags can be set correctly
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
diff --git a/hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java b/hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java
index d42e51a..cfdc4ff 100644
--- a/hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java
+++ b/hotspot/test/gc/metaspace/TestPerfCountersAndMemoryPools.java
@@ -24,12 +24,12 @@
 import java.util.List;
 import java.lang.management.*;
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
 import static jdk.test.lib.Asserts.*;
 
 /* @test TestPerfCountersAndMemoryPools
  * @bug 8023476
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.gc.Serial
  * @summary Tests that a MemoryPoolMXBeans and PerfCounters for metaspace
  *          report the same data.
diff --git a/hotspot/test/gc/parallel/AdaptiveGCBoundary.java b/hotspot/test/gc/parallel/AdaptiveGCBoundary.java
index 91ad282..23215af 100644
--- a/hotspot/test/gc/parallel/AdaptiveGCBoundary.java
+++ b/hotspot/test/gc/parallel/AdaptiveGCBoundary.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,14 +27,15 @@
  * @bug 8014546
  * @key gc
  * @key regression
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm AdaptiveGCBoundary
  * @author jon.masamitsu@oracle.com
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class AdaptiveGCBoundary {
   public static void main(String args[]) throws Exception {
diff --git a/hotspot/test/gc/parallel/TestDynShrinkHeap.java b/hotspot/test/gc/parallel/TestDynShrinkHeap.java
index 0653432..4b6e7d2 100644
--- a/hotspot/test/gc/parallel/TestDynShrinkHeap.java
+++ b/hotspot/test/gc/parallel/TestDynShrinkHeap.java
@@ -28,7 +28,7 @@
  * @summary Verify that the heap shrinks after full GC according to the current values of the Min/MaxHeapFreeRatio flags
  * @modules java.base/jdk.internal.misc
  * @modules jdk.management
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm -XX:+UseAdaptiveSizePolicyWithSystemGC -XX:+UseParallelGC -XX:MinHeapFreeRatio=0 -XX:MaxHeapFreeRatio=100 -Xmx1g -verbose:gc TestDynShrinkHeap
  */
 import jdk.test.lib.DynamicVMOption;
diff --git a/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java b/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java
index e25e0ce..1069b41 100644
--- a/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java
+++ b/hotspot/test/gc/parallel/TestPrintGCDetailsVerbose.java
@@ -28,7 +28,6 @@
  * @key gc
  * @requires vm.gc.Parallel
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
  * @run main/othervm -Xmx50m -XX:+UseParallelGC -Xlog:gc*=trace TestPrintGCDetailsVerbose
  */
 public class TestPrintGCDetailsVerbose {
diff --git a/hotspot/test/gc/serial/HeapChangeLogging.java b/hotspot/test/gc/serial/HeapChangeLogging.java
index f3d0c01..a8ef6f6 100644
--- a/hotspot/test/gc/serial/HeapChangeLogging.java
+++ b/hotspot/test/gc/serial/HeapChangeLogging.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,9 @@
 /*
  * @test HeapChangeLogging.java
  * @bug 8027440
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build HeapChangeLogging
  * @summary Allocate to get a promotion failure and verify that that heap change logging is present.
  * @run main HeapChangeLogging
  */
@@ -35,7 +34,8 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class HeapChangeLogging {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/gc/startup_warnings/TestCMS.java b/hotspot/test/gc/startup_warnings/TestCMS.java
index 23e0c85..6ea63da 100644
--- a/hotspot/test/gc/startup_warnings/TestCMS.java
+++ b/hotspot/test/gc/startup_warnings/TestCMS.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8006398
 * @summary Test that CMS does not print a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestCMS {
diff --git a/hotspot/test/gc/startup_warnings/TestDefNewCMS.java b/hotspot/test/gc/startup_warnings/TestDefNewCMS.java
index 1821464..f6aaace 100644
--- a/hotspot/test/gc/startup_warnings/TestDefNewCMS.java
+++ b/hotspot/test/gc/startup_warnings/TestDefNewCMS.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8065972
 * @summary Test that the unsupported DefNew+CMS combination does not start
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestDefNewCMS {
 
diff --git a/hotspot/test/gc/startup_warnings/TestG1.java b/hotspot/test/gc/startup_warnings/TestG1.java
index 68bd479..253a16c 100644
--- a/hotspot/test/gc/startup_warnings/TestG1.java
+++ b/hotspot/test/gc/startup_warnings/TestG1.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8006398
 * @summary Test that the G1 collector does not print a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestG1 {
 
diff --git a/hotspot/test/gc/startup_warnings/TestParNewCMS.java b/hotspot/test/gc/startup_warnings/TestParNewCMS.java
index 7a332d9..82830ab 100644
--- a/hotspot/test/gc/startup_warnings/TestParNewCMS.java
+++ b/hotspot/test/gc/startup_warnings/TestParNewCMS.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8065972
 * @summary Test that specifying -XX:+UseParNewGC on the command line logs a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestParNewCMS {
diff --git a/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java b/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java
index 18455c7..30843bf 100644
--- a/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java
+++ b/hotspot/test/gc/startup_warnings/TestParNewSerialOld.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8065972
 * @summary Test that the unsupported ParNew+SerialOld combination does not start
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestParNewSerialOld {
diff --git a/hotspot/test/gc/startup_warnings/TestParallelGC.java b/hotspot/test/gc/startup_warnings/TestParallelGC.java
index 6af5f76..0a31ca9 100644
--- a/hotspot/test/gc/startup_warnings/TestParallelGC.java
+++ b/hotspot/test/gc/startup_warnings/TestParallelGC.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8006398
 * @summary Test that ParallelGC does not print a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestParallelGC {
diff --git a/hotspot/test/gc/startup_warnings/TestParallelScavengeSerialOld.java b/hotspot/test/gc/startup_warnings/TestParallelScavengeSerialOld.java
index e748b0e..9e404d1 100644
--- a/hotspot/test/gc/startup_warnings/TestParallelScavengeSerialOld.java
+++ b/hotspot/test/gc/startup_warnings/TestParallelScavengeSerialOld.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8006398
 * @summary Test that the ParallelScavenge+SerialOld combination does not print a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestParallelScavengeSerialOld {
diff --git a/hotspot/test/gc/startup_warnings/TestSerialGC.java b/hotspot/test/gc/startup_warnings/TestSerialGC.java
index 2010980..35f6981 100644
--- a/hotspot/test/gc/startup_warnings/TestSerialGC.java
+++ b/hotspot/test/gc/startup_warnings/TestSerialGC.java
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,13 @@
 * @key gc
 * @bug 8006398
 * @summary Test that SerialGC does not print a warning message
-* @library /testlibrary
+* @library /test/lib
 * @modules java.base/jdk.internal.misc
 *          java.management
 */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 public class TestSerialGC {
diff --git a/hotspot/test/gc/stress/TestMultiThreadStressRSet.java b/hotspot/test/gc/stress/TestMultiThreadStressRSet.java
index dcfdb6c..048762c 100644
--- a/hotspot/test/gc/stress/TestMultiThreadStressRSet.java
+++ b/hotspot/test/gc/stress/TestMultiThreadStressRSet.java
@@ -37,7 +37,7 @@
  *
  * @summary Stress G1 Remembered Set using multiple threads
  * @modules java.base/jdk.internal.misc
- * @library /test/lib /testlibrary
+ * @library /test/lib
  * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/gc/stress/TestStressRSetCoarsening.java b/hotspot/test/gc/stress/TestStressRSetCoarsening.java
index bb621bb..36f775f 100644
--- a/hotspot/test/gc/stress/TestStressRSetCoarsening.java
+++ b/hotspot/test/gc/stress/TestStressRSetCoarsening.java
@@ -34,7 +34,7 @@
  *
  * @summary Stress G1 Remembered Set by creating a lot of cross region links
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java b/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java
index 4ba5ae2..a6b1e2e 100644
--- a/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java
+++ b/hotspot/test/gc/survivorAlignment/TestAllocationInEden.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @bug 8031323
  * @summary Verify that object's alignment in eden space is not affected by
  *          SurvivorAlignmentInBytes option.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestAllocationInEden SurvivorAlignmentTestMain AlignmentHelper
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java b/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java
index 92dcacd..44eddf9 100644
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromEdenToTenured.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @bug 8031323
  * @summary Verify that objects promoted from eden space to tenured space during
  *          full GC are not aligned to SurvivorAlignmentInBytes value.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestPromotionFromEdenToTenured SurvivorAlignmentTestMain
- *        AlignmentHelper
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java
index 0fec465..5596294 100644
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterFullGC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @bug 8031323
  * @summary Verify that objects promoted from survivor space to tenured space
  *          during full GC are not aligned to SurvivorAlignmentInBytes value.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestPromotionFromSurvivorToTenuredAfterFullGC
- *        SurvivorAlignmentTestMain AlignmentHelper
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java
index 488207d..45c2282 100644
--- a/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionFromSurvivorToTenuredAfterMinorGC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,11 +27,10 @@
  * @summary Verify that objects promoted from survivor space to tenured space
  *          when their age exceeded tenuring threshold are not aligned to
  *          SurvivorAlignmentInBytes value.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestPromotionFromSurvivorToTenuredAfterMinorGC
- *        SurvivorAlignmentTestMain AlignmentHelper
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java b/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java
index f5b2dc2..5c6dd81 100644
--- a/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java
+++ b/hotspot/test/gc/survivorAlignment/TestPromotionToSurvivor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,10 @@
  * @bug 8031323
  * @summary Verify that objects promoted from eden space to survivor space after
  *          minor GC are aligned to SurvivorAlignmentInBytes.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestPromotionToSurvivor
- *        SurvivorAlignmentTestMain AlignmentHelper
+ * @build sun.hotspot.WhiteBox
  * @ignore 8129886
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
diff --git a/hotspot/test/gc/testlibrary/Helpers.java b/hotspot/test/gc/testlibrary/Helpers.java
index b28d92d..e97d4a0 100644
--- a/hotspot/test/gc/testlibrary/Helpers.java
+++ b/hotspot/test/gc/testlibrary/Helpers.java
@@ -25,7 +25,7 @@
 package gc.testlibrary;
 
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 import java.io.File;
diff --git a/hotspot/test/gc/whitebox/TestConcMarkCycleWB.java b/hotspot/test/gc/whitebox/TestConcMarkCycleWB.java
index ea3b30a..c1d4b95 100644
--- a/hotspot/test/gc/whitebox/TestConcMarkCycleWB.java
+++ b/hotspot/test/gc/whitebox/TestConcMarkCycleWB.java
@@ -25,12 +25,12 @@
  * @test TestConMarkCycleWB
  * @bug 8065579
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* sun.hotspot.WhiteBox TestConcMarkCycleWB
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UseG1GC TestConcMarkCycleWB
diff --git a/hotspot/test/gc/whitebox/TestWBGC.java b/hotspot/test/gc/whitebox/TestWBGC.java
index 56eae94..acc75c9 100644
--- a/hotspot/test/gc/whitebox/TestWBGC.java
+++ b/hotspot/test/gc/whitebox/TestWBGC.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,16 @@
  * @test TestWBGC
  * @bug 8055098
  * @summary Test verify that WB methods isObjectInOldGen and youngGC works correctly.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestWBGC
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run driver TestWBGC
  */
-import jdk.test.lib.*;
+import jdk.test.lib.Asserts;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 public class TestWBGC {
diff --git a/hotspot/test/native/GTestWrapper.java b/hotspot/test/native/GTestWrapper.java
index cedf63e..da90f81 100644
--- a/hotspot/test/native/GTestWrapper.java
+++ b/hotspot/test/native/GTestWrapper.java
@@ -24,7 +24,7 @@
 
 /* @test
  * @summary a jtreg wrapper for gtest tests
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @run main/native GTestWrapper
  */
diff --git a/hotspot/test/native/logging/logTestFixture.cpp b/hotspot/test/native/logging/logTestFixture.cpp
new file mode 100644
index 0000000..d22a6f7
--- /dev/null
+++ b/hotspot/test/native/logging/logTestFixture.cpp
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logTestFixture.hpp"
+#include "logTestUtils.inline.hpp"
+#include "logging/logConfiguration.hpp"
+#include "memory/resourceArea.hpp"
+#include "unittest.hpp"
+#include "utilities/ostream.hpp"
+
+LogTestFixture::LogTestFixture() {
+  // Set up TestLogFileName to include PID, testcase name and test name
+  int ret = jio_snprintf(_filename, sizeof(_filename), "testlog.pid%d.%s.%s.log",
+                         os::current_process_id(),
+                         ::testing::UnitTest::GetInstance()->current_test_info()->test_case_name(),
+                         ::testing::UnitTest::GetInstance()->current_test_info()->name());
+  EXPECT_GT(ret, 0) << "_filename buffer issue";
+  TestLogFileName = _filename;
+}
+
+LogTestFixture::~LogTestFixture() {
+  restore_default_log_config();
+  delete_file(TestLogFileName);
+}
+
+bool LogTestFixture::set_log_config(const char* output,
+                                    const char* what,
+                                    const char* decorators,
+                                    const char* options,
+                                    bool allow_failure) {
+  ResourceMark rm;
+  stringStream stream;
+  bool success = LogConfiguration::parse_log_arguments(output, what, decorators, options, &stream);
+  if (!allow_failure) {
+    const char* errmsg = stream.as_string();
+    EXPECT_STREQ("", errmsg) << "Unexpected error reported";
+    EXPECT_TRUE(success) << "Shouldn't cause errors";
+  }
+  return success;
+}
+
+void LogTestFixture::restore_default_log_config() {
+  LogConfiguration::disable_logging();
+  set_log_config("stdout", "all=warning");
+}
diff --git a/hotspot/test/native/logging/logTestFixture.hpp b/hotspot/test/native/logging/logTestFixture.hpp
new file mode 100644
index 0000000..d9c1c8b
--- /dev/null
+++ b/hotspot/test/native/logging/logTestFixture.hpp
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "unittest.hpp"
+#include "utilities/globalDefinitions.hpp"
+
+// A fixture base class for tests that need to change the log configuration,
+// or use a log file. After each test, the fixture will automatically restore
+// the log configuration and remove the test file (if used).
+// Provides TestLogFileName which is unique for each test, and is automatically
+// deleted after the test completes.
+class LogTestFixture : public testing::Test {
+ private:
+  char _filename[2 * K];
+
+ protected:
+  const char* TestLogFileName;
+
+  LogTestFixture();
+  ~LogTestFixture();
+
+  static bool set_log_config(const char* output,
+                             const char* what,
+                             const char* decorators = "",
+                             const char* options = "",
+                             bool allow_failure = false);
+
+  static void restore_default_log_config();
+};
+
diff --git a/hotspot/test/native/logging/logTestUtils.inline.hpp b/hotspot/test/native/logging/logTestUtils.inline.hpp
new file mode 100644
index 0000000..bf39dfd
--- /dev/null
+++ b/hotspot/test/native/logging/logTestUtils.inline.hpp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "runtime/os.hpp"
+#include "unittest.hpp"
+
+#define LOG_TEST_STRING_LITERAL "a (hopefully) unique log message for testing"
+
+static inline bool string_contains_substring(const char* haystack, const char* needle) {
+  return strstr(haystack, needle) != NULL;
+}
+
+static inline bool file_exists(const char* filename) {
+  struct stat st;
+  return os::stat(filename, &st) == 0;
+}
+
+static inline void delete_file(const char* filename) {
+  if (!file_exists(filename)) {
+    return;
+  }
+  int ret = remove(filename);
+  EXPECT_TRUE(ret == 0 || errno == ENOENT) << "failed to remove file '" << filename << "': "
+      << os::strerror(errno) << " (" << errno << ")";
+}
diff --git a/hotspot/test/native/logging/test_logConfiguration.cpp b/hotspot/test/native/logging/test_logConfiguration.cpp
new file mode 100644
index 0000000..528111e
--- /dev/null
+++ b/hotspot/test/native/logging/test_logConfiguration.cpp
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logTestFixture.hpp"
+#include "logTestUtils.inline.hpp"
+#include "logging/logConfiguration.hpp"
+#include "logging/logLevel.hpp"
+#include "logging/logOutput.hpp"
+#include "logging/logTag.hpp"
+#include "logging/logTagSet.hpp"
+#include "memory/resourceArea.hpp"
+#include "unittest.hpp"
+#include "utilities/ostream.hpp"
+
+class LogConfigurationTest : public LogTestFixture {
+ protected:
+  static char _all_decorators[256];
+
+ public:
+  static void SetUpTestCase();
+};
+
+char LogConfigurationTest::_all_decorators[256];
+
+// Prepare _all_decorators to contain the full list of decorators (comma separated)
+void LogConfigurationTest::SetUpTestCase() {
+  char *pos = _all_decorators;
+  for (size_t i = 0; i < LogDecorators::Count; i++) {
+    pos += jio_snprintf(pos, sizeof(_all_decorators) - (pos - _all_decorators), "%s%s",
+                        (i == 0 ? "" : ","),
+                        LogDecorators::name(static_cast<LogDecorators::Decorator>(i)));
+  }
+}
+
+// Check if the given text is included by LogConfiguration::describe()
+static bool is_described(const char* text) {
+  ResourceMark rm;
+  stringStream ss;
+  LogConfiguration::describe(&ss);
+  return string_contains_substring(ss.as_string(), text);
+}
+
+TEST_F(LogConfigurationTest, describe) {
+  ResourceMark rm;
+  stringStream ss;
+  LogConfiguration::describe(&ss);
+  const char* description = ss.as_string();
+
+  // Verify that stdout and stderr are listed by default
+  EXPECT_PRED2(string_contains_substring, description, LogOutput::Stdout->name());
+  EXPECT_PRED2(string_contains_substring, description, LogOutput::Stderr->name());
+
+  // Verify that each tag, level and decorator is listed
+  for (size_t i = 0; i < LogTag::Count; i++) {
+    EXPECT_PRED2(string_contains_substring, description, LogTag::name(static_cast<LogTagType>(i)));
+  }
+  for (size_t i = 0; i < LogLevel::Count; i++) {
+    EXPECT_PRED2(string_contains_substring, description, LogLevel::name(static_cast<LogLevelType>(i)));
+  }
+  for (size_t i = 0; i < LogDecorators::Count; i++) {
+    EXPECT_PRED2(string_contains_substring, description, LogDecorators::name(static_cast<LogDecorators::Decorator>(i)));
+  }
+
+  // Verify that the default configuration is printed
+  char expected_buf[256];
+  int ret = jio_snprintf(expected_buf, sizeof(expected_buf), "=%s", LogLevel::name(LogLevel::Default));
+  ASSERT_NE(-1, ret);
+  EXPECT_PRED2(string_contains_substring, description, expected_buf);
+  EXPECT_PRED2(string_contains_substring, description, "#1: stderr all=off");
+
+  // Verify default decorators are listed
+  LogDecorators default_decorators;
+  expected_buf[0] = '\0';
+  for (size_t i = 0; i < LogDecorators::Count; i++) {
+    LogDecorators::Decorator d = static_cast<LogDecorators::Decorator>(i);
+    if (default_decorators.is_decorator(d)) {
+      ASSERT_LT(strlen(expected_buf), sizeof(expected_buf));
+      ret = jio_snprintf(expected_buf + strlen(expected_buf),
+                         sizeof(expected_buf) - strlen(expected_buf),
+                         "%s%s",
+                         strlen(expected_buf) > 0 ? "," : "",
+                         LogDecorators::name(d));
+      ASSERT_NE(-1, ret);
+    }
+  }
+  EXPECT_PRED2(string_contains_substring, description, expected_buf);
+
+  // Add a new output and verify that it gets described after it has been added
+  const char* what = "all=trace";
+  EXPECT_FALSE(is_described(TestLogFileName)) << "Test output already exists!";
+  set_log_config(TestLogFileName, what);
+  EXPECT_TRUE(is_described(TestLogFileName));
+  EXPECT_TRUE(is_described("logging=trace"));
+}
+
+// Test updating an existing log output
+TEST_F(LogConfigurationTest, update_output) {
+  // Update stdout twice, first using it's name, and the second time its index #
+  const char* test_outputs[] = { "stdout", "#0" };
+  for (size_t i = 0; i < ARRAY_SIZE(test_outputs); i++) {
+    set_log_config(test_outputs[i], "all=info");
+
+    // Verify configuration using LogConfiguration::describe
+    EXPECT_TRUE(is_described("#0: stdout"));
+    EXPECT_TRUE(is_described("logging=info"));
+
+    // Verify by iterating over tagsets
+    LogOutput* o = LogOutput::Stdout;
+    for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+      EXPECT_TRUE(ts->has_output(o));
+      EXPECT_TRUE(ts->is_level(LogLevel::Info));
+      EXPECT_FALSE(ts->is_level(LogLevel::Debug));
+    }
+
+    // Now change the level and verify the change propagated
+    set_log_config(test_outputs[i], "all=debug");
+    for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+      EXPECT_TRUE(ts->has_output(o));
+      EXPECT_TRUE(ts->is_level(LogLevel::Debug));
+      EXPECT_FALSE(ts->is_level(LogLevel::Trace));
+    }
+  }
+}
+
+// Test adding a new output to the configuration
+TEST_F(LogConfigurationTest, add_new_output) {
+  const char* what = "all=trace";
+
+  ASSERT_FALSE(is_described(TestLogFileName));
+  set_log_config(TestLogFileName, what);
+
+  // Verify new output using LogConfiguration::describe
+  EXPECT_TRUE(is_described(TestLogFileName));
+  EXPECT_TRUE(is_described("logging=trace"));
+
+  // Also verify by iterating over tagsets, checking levels on tagsets
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_TRUE(ts->is_level(LogLevel::Trace));
+  }
+}
+
+TEST_F(LogConfigurationTest, disable_logging) {
+  // Add TestLogFileName as an output
+  set_log_config(TestLogFileName, "logging=info");
+
+  LogConfiguration::disable_logging();
+
+  // Verify TestLogFileName was disabled
+  EXPECT_FALSE(is_described(TestLogFileName));
+
+  // Verify that no tagset has logging enabled
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_FALSE(ts->has_output(LogOutput::Stdout));
+    EXPECT_FALSE(ts->has_output(LogOutput::Stderr));
+    EXPECT_FALSE(ts->is_level(LogLevel::Error));
+  }
+}
+
+// Test disabling a particular output
+TEST_F(LogConfigurationTest, disable_output) {
+  // Disable the default configuration for stdout
+  set_log_config("stdout", "all=off");
+
+  // Verify configuration using LogConfiguration::describe
+  EXPECT_TRUE(is_described("#0: stdout all=off"));
+
+  // Verify by iterating over tagsets
+  LogOutput* o = LogOutput::Stdout;
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_FALSE(ts->has_output(o));
+    EXPECT_FALSE(ts->is_level(LogLevel::Error));
+  }
+
+  // Add a new file output
+  const char* what = "all=debug";
+  set_log_config(TestLogFileName, what);
+  EXPECT_TRUE(is_described(TestLogFileName));
+
+  // Now disable it, verifying it is removed completely
+  set_log_config(TestLogFileName, "all=off");
+  EXPECT_FALSE(is_described(TestLogFileName));
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_FALSE(ts->is_level(LogLevel::Error));
+  }
+}
+
+// Test reconfiguration of the selected decorators for an output
+TEST_F(LogConfigurationTest, reconfigure_decorators) {
+  // Configure stderr with all decorators
+  set_log_config("stderr", "all=off", _all_decorators);
+  char buf[256];
+  int ret = jio_snprintf(buf, sizeof(buf), "#1: stderr all=off %s", _all_decorators);
+  ASSERT_NE(-1, ret);
+  EXPECT_TRUE(is_described(buf)) << "'" << buf << "' not described after reconfiguration";
+
+  // Now reconfigure logging on stderr with no decorators
+  set_log_config("stderr", "all=off", "none");
+  EXPECT_TRUE(is_described("#1: stderr all=off \n")) << "Expecting no decorators";
+}
+
+// Test that invalid options cause configuration errors
+TEST_F(LogConfigurationTest, invalid_configure_options) {
+  LogConfiguration::disable_logging();
+  const char* invalid_outputs[] = { "#2", "invalidtype=123", ":invalid/path}to*file?" };
+  for (size_t i = 0; i < ARRAY_SIZE(invalid_outputs); i++) {
+    EXPECT_FALSE(set_log_config(invalid_outputs[i], "", "", "", true))
+      << "Accepted invalid output '" << invalid_outputs[i] << "'";
+  }
+  EXPECT_FALSE(LogConfiguration::parse_command_line_arguments("all=invalid_level"));
+  EXPECT_FALSE(LogConfiguration::parse_command_line_arguments("what=invalid"));
+  EXPECT_FALSE(LogConfiguration::parse_command_line_arguments("all::invalid_decorator"));
+}
+
+// Test empty configuration options
+TEST_F(LogConfigurationTest, parse_empty_command_line_arguments) {
+  const char* empty_variations[] = { "", ":", "::", ":::", "::::" };
+  for (size_t i = 0; i < ARRAY_SIZE(empty_variations); i++) {
+    const char* cmdline = empty_variations[i];
+    bool ret = LogConfiguration::parse_command_line_arguments(cmdline);
+    EXPECT_TRUE(ret) << "Error parsing command line arguments '" << cmdline << "'";
+    for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+      EXPECT_EQ(LogLevel::Unspecified, ts->level_for(LogOutput::Stdout));
+    }
+  }
+}
+
+// Test basic command line parsing & configuration
+TEST_F(LogConfigurationTest, parse_command_line_arguments) {
+  // Prepare a command line for logging*=debug on stderr with all decorators
+  int ret;
+  char buf[256];
+  ret = jio_snprintf(buf, sizeof(buf), "logging*=debug:stderr:%s", _all_decorators);
+  ASSERT_NE(-1, ret);
+
+  bool success = LogConfiguration::parse_command_line_arguments(buf);
+  EXPECT_TRUE(success) << "Error parsing valid command line arguments '" << buf << "'";
+  // Ensure the new configuration applied
+  EXPECT_TRUE(is_described("logging=debug"));
+  EXPECT_TRUE(is_described(_all_decorators));
+
+  // Test the configuration of file outputs as well
+  ret = jio_snprintf(buf, sizeof(buf), ":%s", TestLogFileName);
+  ASSERT_NE(-1, ret);
+  EXPECT_TRUE(LogConfiguration::parse_command_line_arguments(buf));
+}
+
+// Test split up log configuration arguments
+TEST_F(LogConfigurationTest, parse_log_arguments) {
+  ResourceMark rm;
+  stringStream ss;
+  // Verify that it's possible to configure each individual tag
+  for (size_t t = 1 /* Skip _NO_TAG */; t < LogTag::Count; t++) {
+    const LogTagType tag = static_cast<LogTagType>(t);
+    EXPECT_TRUE(LogConfiguration::parse_log_arguments("stdout", LogTag::name(tag), "", "", &ss));
+  }
+  // Same for each level
+  for (size_t l = 0; l < LogLevel::Count; l++) {
+    const LogLevelType level = static_cast<LogLevelType>(l);
+    char expected_buf[256];
+    int ret = jio_snprintf(expected_buf, sizeof(expected_buf), "all=%s", LogLevel::name(level));
+    ASSERT_NE(-1, ret);
+    EXPECT_TRUE(LogConfiguration::parse_log_arguments("stderr", expected_buf, "", "", &ss));
+  }
+  // And for each decorator
+  for (size_t d = 0; d < LogDecorators::Count; d++) {
+    const LogDecorators::Decorator decorator = static_cast<LogDecorators::Decorator>(d);
+    EXPECT_TRUE(LogConfiguration::parse_log_arguments("#0", "", LogDecorators::name(decorator), "", &ss));
+  }
+  EXPECT_STREQ("", ss.as_string()) << "Error reported while parsing: " << ss.as_string();
+}
diff --git a/hotspot/test/native/logging/test_logDecorations.cpp b/hotspot/test/native/logging/test_logDecorations.cpp
new file mode 100644
index 0000000..324792b
--- /dev/null
+++ b/hotspot/test/native/logging/test_logDecorations.cpp
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logDecorations.hpp"
+#include "logging/logTagSet.hpp"
+#include "runtime/os.hpp"
+#include "unittest.hpp"
+#include "utilities/globalDefinitions.hpp"
+
+static const LogTagSet& tagset = LogTagSetMapping<LOG_TAGS(logging, safepoint)>::tagset();
+static const LogDecorators default_decorators;
+
+TEST(LogDecorations, level) {
+  for (uint l = LogLevel::First; l <= LogLevel::Last; l++) {
+    LogLevelType level = static_cast<LogLevelType>(l);
+    // Create a decorations object for the current level
+    LogDecorations decorations(level, tagset, default_decorators);
+    // Verify that the level decoration matches the specified level
+    EXPECT_STREQ(LogLevel::name(level), decorations.decoration(LogDecorators::level_decorator));
+
+    // Test changing level after object creation time
+    LogLevelType other_level;
+    if (l != LogLevel::Last) {
+      other_level = static_cast<LogLevelType>(l + 1);
+    } else {
+      other_level = static_cast<LogLevelType>(LogLevel::First);
+    }
+    decorations.set_level(other_level);
+    EXPECT_STREQ(LogLevel::name(other_level), decorations.decoration(LogDecorators::level_decorator))
+        << "Decoration reports incorrect value after changing the level";
+  }
+}
+
+TEST(LogDecorations, uptime) {
+  // Verify the format of the decoration
+  int a, b;
+  char decimal_point;
+  LogDecorations decorations(LogLevel::Info, tagset, default_decorators);
+  const char* uptime = decorations.decoration(LogDecorators::uptime_decorator);
+  int read = sscanf(uptime, "%d%c%ds", &a, &decimal_point, &b);
+  EXPECT_EQ(3, read) << "Invalid uptime decoration: " << uptime;
+  EXPECT_TRUE(decimal_point == '.' || decimal_point == ',') << "Invalid uptime decoration: " << uptime;
+
+  // Verify that uptime increases
+  double prev = 0;
+  for (int i = 0; i < 3; i++) {
+    os::naked_short_sleep(10);
+    LogDecorations d(LogLevel::Info, tagset, default_decorators);
+    double cur = strtod(d.decoration(LogDecorators::uptime_decorator), NULL);
+    ASSERT_LT(prev, cur);
+    prev = cur;
+  }
+}
+
+TEST(LogDecorations, tags) {
+  char expected_tags[1 * K];
+  tagset.label(expected_tags, sizeof(expected_tags));
+  // Verify that the expected tags are included in the tags decoration
+  LogDecorations decorations(LogLevel::Info, tagset, default_decorators);
+  EXPECT_STREQ(expected_tags, decorations.decoration(LogDecorators::tags_decorator));
+}
+
+// Test each variation of the different timestamp decorations (ms, ns, uptime ms, uptime ns)
+TEST(LogDecorations, timestamps) {
+  struct {
+    const LogDecorators::Decorator decorator;
+    const char* suffix;
+  } test_decorator[] = {
+    { LogDecorators::timemillis_decorator, "ms" },
+    { LogDecorators::uptimemillis_decorator, "ms" },
+    { LogDecorators::timenanos_decorator, "ns" },
+    { LogDecorators::uptimenanos_decorator, "ns" }
+  };
+
+  for (uint i = 0; i < ARRAY_SIZE(test_decorator); i++) {
+    LogDecorators::Decorator decorator = test_decorator[i].decorator;
+    LogDecorators decorator_selection;
+    ASSERT_TRUE(decorator_selection.parse(LogDecorators::name(decorator)));
+
+    // Create decorations with the decorator we want to test included
+    LogDecorations decorations(LogLevel::Info, tagset, decorator_selection);
+    const char* decoration = decorations.decoration(decorator);
+
+    // Verify format of timestamp
+    const char* suffix;
+    for (suffix = decoration; isdigit(*suffix); suffix++) {
+      // Skip over digits
+    }
+    EXPECT_STREQ(test_decorator[i].suffix, suffix);
+
+    // Verify timestamp values
+    julong prev = 0;
+    for (int i = 0; i < 3; i++) {
+      os::naked_short_sleep(5);
+      LogDecorations d(LogLevel::Info, tagset, decorator_selection);
+      julong val = strtoull(d.decoration(decorator), NULL, 10);
+      ASSERT_LT(prev, val);
+      prev = val;
+    }
+  }
+}
+
+// Test the time decoration
+TEST(LogDecorations, iso8601_time) {
+  LogDecorators decorator_selection;
+  ASSERT_TRUE(decorator_selection.parse("time"));
+  LogDecorations decorations(LogLevel::Info, tagset, decorator_selection);
+
+  const char *timestr = decorations.decoration(LogDecorators::time_decorator);
+  time_t expected_ts = time(NULL);
+
+  // Verify format
+  int y, M, d, h, m;
+  double s;
+  int read = sscanf(timestr, "%d-%d-%dT%d:%d:%lfZ", &y, &M, &d, &h, &m, &s);
+  ASSERT_EQ(6, read);
+
+  // Verify reported time & date
+  struct tm reported_time = {0};
+  reported_time.tm_year = y - 1900;
+  reported_time.tm_mon = M - 1;
+  reported_time.tm_mday = d;
+  reported_time.tm_hour = h;
+  reported_time.tm_min = m;
+  reported_time.tm_sec = s;
+  reported_time.tm_isdst = daylight;
+  time_t reported_ts = mktime(&reported_time);
+  expected_ts = mktime(localtime(&expected_ts));
+  time_t diff = reported_ts - expected_ts;
+  if (diff < 0) {
+    diff = -diff;
+  }
+  // Allow up to 10 seconds in difference
+  ASSERT_LE(diff, 10) << "Reported time: " << reported_ts << " (" << timestr << ")"
+      << ", expected time: " << expected_ts;
+}
+
+// Test the pid and tid decorations
+TEST(LogDecorations, identifiers) {
+  LogDecorators decorator_selection;
+  ASSERT_TRUE(decorator_selection.parse("pid,tid"));
+  LogDecorations decorations(LogLevel::Info, tagset, decorator_selection);
+
+  struct {
+      intx expected;
+      LogDecorators::Decorator decorator;
+  } ids[] = {
+      { os::current_process_id(), LogDecorators::pid_decorator },
+      { os::current_thread_id(), LogDecorators::tid_decorator },
+  };
+
+  for (uint i = 0; i < ARRAY_SIZE(ids); i++) {
+    const char* reported = decorations.decoration(ids[i].decorator);
+
+    // Verify format
+    const char* str;
+    for (str = reported; isdigit(*str); str++) {
+      // Skip over digits
+    }
+    EXPECT_EQ('\0', *str) << "Should only contain digits";
+
+    // Verify value
+    EXPECT_EQ(ids[i].expected, strtol(reported, NULL, 10));
+  }
+}
diff --git a/hotspot/test/native/logging/test_logDecorators.cpp b/hotspot/test/native/logging/test_logDecorators.cpp
new file mode 100644
index 0000000..beaa925
--- /dev/null
+++ b/hotspot/test/native/logging/test_logDecorators.cpp
@@ -0,0 +1,216 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logDecorators.hpp"
+#include "unittest.hpp"
+
+static LogDecorators::Decorator decorator_array[] = {
+#define DECORATOR(name, abbr) LogDecorators::name##_decorator,
+    DECORATOR_LIST
+#undef DECORATOR
+};
+
+static const char* decorator_name_array[] = {
+#define DECORATOR(name, abbr) #name,
+    DECORATOR_LIST
+#undef DECORATOR
+};
+
+static const char* decorator_abbr_array[] = {
+#define DECORATOR(name, abbr) #abbr,
+    DECORATOR_LIST
+#undef DECORATOR
+};
+
+// Assert that the given decorators object has the default decorators (uptime, level, tags)
+// If exclusive = true, also assert that no other decorators are selected
+static void assert_default_decorators(LogDecorators* decorators, bool exclusive = true) {
+  for (int i = 0; i < LogDecorators::Count; i++) {
+    LogDecorators::Decorator decorator = decorator_array[i];
+    if (decorator == LogDecorators::uptime_decorator ||
+        decorator == LogDecorators::level_decorator ||
+        decorator == LogDecorators::tags_decorator) {
+      EXPECT_TRUE(decorators->is_decorator(decorator));
+    } else if (exclusive) {
+      EXPECT_FALSE(decorators->is_decorator(decorator));
+    }
+  }
+}
+
+TEST(LogDecorators, defaults) {
+  LogDecorators decorators;
+  assert_default_decorators(&decorators);
+}
+
+// Test converting between name and decorator (string and enum)
+TEST(LogDecorators, from_and_to_name) {
+  EXPECT_EQ(LogDecorators::Invalid, LogDecorators::from_string("unknown"));
+  EXPECT_EQ(LogDecorators::Invalid, LogDecorators::from_string(""));
+
+  for (int i = 0; i < LogDecorators::Count; i++) {
+    LogDecorators::Decorator decorator = decorator_array[i];
+
+    const char* name = LogDecorators::name(decorator);
+    EXPECT_STREQ(decorator_name_array[i], name);
+
+    LogDecorators::Decorator decorator2 = LogDecorators::from_string(name);
+    EXPECT_EQ(decorator, decorator2);
+
+    // Test case insensitivity
+    char* name_cpy = strdup(name);
+    name_cpy[0] = toupper(name_cpy[0]);
+    decorator2 = LogDecorators::from_string(name_cpy);
+    free(name_cpy);
+    EXPECT_EQ(decorator, decorator2);
+  }
+}
+
+// Test decorator abbreviations
+TEST(LogDecorators, from_and_to_abbr) {
+  for (int i = 0; i < LogDecorators::Count; i++) {
+    LogDecorators::Decorator decorator = decorator_array[i];
+
+    const char* abbr = LogDecorators::abbreviation(decorator);
+    EXPECT_STREQ(decorator_abbr_array[i], abbr);
+
+    LogDecorators::Decorator decorator2 = LogDecorators::from_string(abbr);
+    ASSERT_EQ(decorator, decorator2);
+
+    // Test case insensitivity
+    char* abbr_cpy = strdup(abbr);
+    abbr_cpy[0] = toupper(abbr_cpy[0]);
+    decorator2 = LogDecorators::from_string(abbr_cpy);
+    free(abbr_cpy);
+    EXPECT_EQ(decorator, decorator2);
+  }
+}
+
+TEST(LogDecorators, parse_default) {
+  LogDecorators decorators;
+  decorators.parse(""); // Empty string means we should use the default decorators
+  assert_default_decorators(&decorators);
+}
+
+// Test that "none" gives no decorators at all
+TEST(LogDecorators, parse_none) {
+  LogDecorators decorators;
+  decorators.parse("none");
+  for (int i = 0; i < LogDecorators::Count; i++) {
+    EXPECT_FALSE(decorators.is_decorator(decorator_array[i]));
+  }
+}
+
+// Test a few invalid decorator selections
+TEST(LogDecorators, parse_invalid) {
+  LogDecorators decorators;
+  EXPECT_FALSE(decorators.parse("invalid"));
+  EXPECT_FALSE(decorators.parse(",invalid"));
+  EXPECT_FALSE(decorators.parse(",invalid,"));
+  assert_default_decorators(&decorators);
+}
+
+// Assert that the given decorator has all decorators between first and last
+static void assert_decorations_between(const LogDecorators* decorator, size_t first, size_t last) {
+  for (size_t i = 0; i < ARRAY_SIZE(decorator_array); i++) {
+    if (i >= first && i <= last) {
+      EXPECT_TRUE(decorator->is_decorator(decorator_array[i]));
+    } else {
+      EXPECT_FALSE(decorator->is_decorator(decorator_array[i]));
+    }
+  }
+}
+
+TEST(LogDecorators, parse) {
+  LogDecorators decorators;
+
+  // Verify a bunch of different decorator selections
+  char decstr[1 * K];
+  decstr[0] = '\0';
+  size_t written = 0;
+  for (size_t i = 0; i < ARRAY_SIZE(decorator_array); i++) {
+    for (size_t j = i; j < ARRAY_SIZE(decorator_array); j++) {
+      for (size_t k = i; k <= j; k++) {
+        ASSERT_LT(written, sizeof(decstr)) << "decstr overflow";
+        int ret = jio_snprintf(decstr + written, sizeof(decstr) - written, "%s%s",
+                               written == 0 ? "" : ",",
+                               ((k + j) % 2 == 0) ? decorator_name_array[k] : decorator_abbr_array[k]);
+        ASSERT_NE(-1, ret);
+        written += ret;
+      }
+      EXPECT_TRUE(decorators.parse(decstr)) << "Valid decorator selection did not parse: " << decstr;
+      assert_decorations_between(&decorators, i, j);
+      written = 0;
+      decstr[0] = '\0';
+    }
+  }
+}
+
+TEST(LogDecorators, combine_with) {
+  LogDecorators dec1;
+  LogDecorators dec2;
+
+  // Select first and third decorator for dec1
+  char input[64];
+  sprintf(input, "%s,%s", decorator_name_array[0], decorator_name_array[2]);
+  dec1.parse(input);
+  EXPECT_TRUE(dec1.is_decorator(decorator_array[0]));
+  EXPECT_TRUE(dec1.is_decorator(decorator_array[2]));
+
+  // Select the default decorators for dec2
+  EXPECT_FALSE(dec2.is_decorator(decorator_array[0]));
+  EXPECT_FALSE(dec2.is_decorator(decorator_array[2]));
+  assert_default_decorators(&dec2);
+
+  // Combine and verify that the combination includes first, third and default decorators
+  dec2.combine_with(dec1);
+  EXPECT_TRUE(dec2.is_decorator(decorator_array[0]));
+  EXPECT_TRUE(dec2.is_decorator(decorator_array[2]));
+  assert_default_decorators(&dec2, false);
+}
+
+TEST(LogDecorators, clear) {
+  // Start with default decorators and then clear it
+  LogDecorators dec;
+  EXPECT_FALSE(dec.is_empty());
+
+  dec.clear();
+  EXPECT_TRUE(dec.is_empty());
+  for (size_t i = 0; i < LogDecorators::Count; i++) {
+    EXPECT_FALSE(dec.is_decorator(decorator_array[i]));
+  }
+}
+
+// Test the decorator constant None
+TEST(LogDecorators, none) {
+  LogDecorators dec = LogDecorators::None;
+  for (size_t i = 0; i < LogDecorators::Count; i++) {
+    EXPECT_FALSE(dec.is_decorator(decorator_array[i]));
+  }
+}
+
+TEST(LogDecorators, is_empty) {
+  LogDecorators def, none = LogDecorators::None;
+  EXPECT_FALSE(def.is_empty());
+  EXPECT_TRUE(none.is_empty());
+}
diff --git a/hotspot/test/native/logging/test_logFileOutput.cpp b/hotspot/test/native/logging/test_logFileOutput.cpp
new file mode 100644
index 0000000..da13e53
--- /dev/null
+++ b/hotspot/test/native/logging/test_logFileOutput.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logFileOutput.hpp"
+#include "memory/resourceArea.hpp"
+#include "runtime/os.hpp"
+#include "unittest.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "utilities/ostream.hpp"
+
+static const char* name = "testlog.pid%p.%t.log";
+
+// Test parsing a bunch of valid file output options
+TEST(LogFileOutput, parse_valid) {
+  const char* valid_options[] = {
+    "", "filecount=10", "filesize=512",
+    "filecount=11,filesize=256",
+    "filesize=256,filecount=11",
+    "filesize=0", "filecount=1",
+    "filesize=1m", "filesize=1M",
+    "filesize=1k", "filesize=1G"
+  };
+
+  // Override LogOutput's vm_start time to get predictable file name
+  LogFileOutput::set_file_name_parameters(0);
+  char expected_filename[1 * K];
+  int ret = jio_snprintf(expected_filename, sizeof(expected_filename),
+                         "testlog.pid%d.1970-01-01_01-00-00.log",
+                         os::current_process_id());
+  ASSERT_GT(ret, 0) << "Buffer too small";
+
+  for (size_t i = 0; i < ARRAY_SIZE(valid_options); i++) {
+    ResourceMark rm;
+    stringStream ss;
+    {
+      LogFileOutput fo(name);
+      EXPECT_STREQ(name, fo.name());
+      EXPECT_TRUE(fo.initialize(valid_options[i], &ss))
+        << "Did not accept valid option(s) '" << valid_options[i] << "': " << ss.as_string();
+    }
+    remove(expected_filename);
+  }
+}
+
+// Test parsing a bunch of invalid file output options
+TEST(LogFileOutput, parse_invalid) {
+  const char* invalid_options[] = {
+    "invalidopt", "filecount=",
+    "filesize=,filecount=10",
+    "fileco=10", "ilesize=512",
+    "filecount=11,,filesize=256",
+    ",filesize=256,filecount=11",
+    "filesize=256,filecount=11,",
+    "filesize=-1", "filecount=0.1",
+    "filecount=-2", "filecount=2.0",
+    "filecount= 2", "filesize=2 ",
+    "filecount=ab", "filesize=0xz",
+    "filecount=1MB", "filesize=99bytes",
+    "filesize=9999999999999999999999999"
+    "filecount=9999999999999999999999999"
+  };
+
+  for (size_t i = 0; i < ARRAY_SIZE(invalid_options); i++) {
+    ResourceMark rm;
+    stringStream ss;
+    LogFileOutput fo(name);
+    EXPECT_FALSE(fo.initialize(invalid_options[i], &ss))
+      << "Accepted invalid option(s) '" << invalid_options[i] << "': " << ss.as_string();
+  }
+}
+
+// Test for overflows with filesize
+TEST(LogFileOutput, filesize_overflow) {
+  char buf[256];
+  int ret = jio_snprintf(buf, sizeof(buf), "filesize=" SIZE_FORMAT "K", SIZE_MAX);
+  ASSERT_GT(ret, 0) << "Buffer too small";
+
+  ResourceMark rm;
+  stringStream ss;
+  LogFileOutput fo(name);
+  EXPECT_FALSE(fo.initialize(buf, &ss)) << "Accepted filesize that overflows";
+}
diff --git a/hotspot/test/native/logging/test_logLevel.cpp b/hotspot/test/native/logging/test_logLevel.cpp
new file mode 100644
index 0000000..00004bb
--- /dev/null
+++ b/hotspot/test/native/logging/test_logLevel.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logLevel.hpp"
+#include "unittest.hpp"
+
+TEST(LogLevel, from_string) {
+  LogLevelType level;
+
+  // Verify each name defined in the LOG_LEVEL_LIST
+#define LOG_LEVEL(lname, lstring) \
+  level = LogLevel::from_string(#lstring); \
+  EXPECT_EQ(level, LogLevel::lname);
+  LOG_LEVEL_LIST
+#undef LOG_LEVEL
+
+  // Verify a few invalid level strings
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("bad level"));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("debugger"));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("inf"));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("info "));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("  info"));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("=info"));
+  EXPECT_EQ(LogLevel::Invalid, LogLevel::from_string("infodebugwarning"));
+}
+
+TEST(LogLevel, name) {
+  // Use names from macro as reference
+#define LOG_LEVEL(lname, lstring) \
+  EXPECT_STREQ(LogLevel::name(LogLevel::lname), #lstring);
+  LOG_LEVEL_LIST
+#undef LOG_LEVEL
+}
diff --git a/hotspot/test/native/logging/test_logOutputList.cpp b/hotspot/test/native/logging/test_logOutputList.cpp
new file mode 100644
index 0000000..d585352
--- /dev/null
+++ b/hotspot/test/native/logging/test_logOutputList.cpp
@@ -0,0 +1,255 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logLevel.hpp"
+#include "logging/logOutput.hpp"
+#include "logging/logOutputList.hpp"
+#include "runtime/os.hpp"
+#include "unittest.hpp"
+
+// Count the outputs in the given list, starting from the specified level
+static size_t output_count(LogOutputList* list, LogLevelType from = LogLevel::Error)  {
+  size_t count = 0;
+  for (LogOutputList::Iterator it = list->iterator(from); it != list->end(); it++) {
+    count++;
+  }
+  return count;
+}
+
+// Get the level for an output in the given list
+static LogLevelType find_output_level(LogOutputList* list, LogOutput* o) {
+  for (size_t levelnum = 1; levelnum < LogLevel::Count; levelnum++) {
+    LogLevelType level = static_cast<LogLevelType>(levelnum);
+    for (LogOutputList::Iterator it = list->iterator(level); it != list->end(); it++) {
+      if (*it == o) {
+        return level;
+      }
+    }
+  }
+  return LogLevel::Off;
+}
+
+// Create a dummy output pointer with the specified id.
+// This dummy pointer should not be used for anything
+// but pointer comparisons with other dummies.
+static LogOutput* dummy_output(size_t id) {
+  return reinterpret_cast<LogOutput*>(id + 1);
+}
+
+// Randomly update and verify some outputs some number of times
+TEST(LogOutputList, set_output_level_update) {
+  const size_t TestOutputCount = 10;
+  const size_t TestIterations = 10000;
+  LogOutputList list;
+  size_t outputs_on_level[LogLevel::Count];
+  LogLevelType expected_level_for_output[TestOutputCount];
+
+  os::init_random(0x4711);
+  for (size_t i = 0; i < LogLevel::Count; i++) {
+    outputs_on_level[i] = 0;
+  }
+  outputs_on_level[LogLevel::Off] = TestOutputCount;
+  for (size_t i = 0; i < TestOutputCount; i++) {
+    expected_level_for_output[i] = LogLevel::Off;
+  }
+
+  for (size_t iteration = 0; iteration < TestIterations; iteration++) {
+    size_t output_idx = os::random() % TestOutputCount;
+    size_t levelnum = os::random() % LogLevel::Count;
+    LogLevelType level = static_cast<LogLevelType>(levelnum);
+
+    // Update the expectations
+    outputs_on_level[expected_level_for_output[output_idx]]--;
+    outputs_on_level[levelnum]++;
+    expected_level_for_output[output_idx] = level;
+
+    // Update the actual list
+    list.set_output_level(dummy_output(output_idx), level);
+
+    // Verify expected levels
+    for (size_t i = 0; i < TestOutputCount; i++) {
+      ASSERT_EQ(expected_level_for_output[i], find_output_level(&list, dummy_output(i)));
+    }
+    // Verify output counts
+    size_t expected_count = 0;
+    for (size_t i = 1; i < LogLevel::Count; i++) {
+      expected_count += outputs_on_level[i];
+      ASSERT_EQ(expected_count, output_count(&list, static_cast<LogLevelType>(i)));
+    }
+    ASSERT_EQ(TestOutputCount, expected_count + outputs_on_level[LogLevel::Off]);
+  }
+}
+
+// Test removing outputs from a LogOutputList
+TEST(LogOutputList, set_output_level_remove) {
+  LogOutputList list;
+
+  // Add three dummy outputs per loglevel
+  for (size_t i = 1; i < LogLevel::Count; i++) {
+    list.set_output_level(dummy_output(i), static_cast<LogLevelType>(i));
+    list.set_output_level(dummy_output(i*10), static_cast<LogLevelType>(i));
+    list.set_output_level(dummy_output(i*100), static_cast<LogLevelType>(i));
+  }
+
+  // Verify that they have been added successfully
+  // (Count - 1 since we don't count LogLevel::Off)
+  EXPECT_EQ(3u * (LogLevel::Count - 1), output_count(&list));
+  // Now remove the second output from each loglevel
+  for (size_t i = 1; i < LogLevel::Count; i++) {
+    list.set_output_level(dummy_output(i*10), LogLevel::Off);
+  }
+  // Make sure they have been successfully removed
+  EXPECT_EQ(2u * (LogLevel::Count - 1), output_count(&list));
+
+  // Now remove the remaining outputs
+  for (size_t i = 1; i < LogLevel::Count; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Off);
+    list.set_output_level(dummy_output(i*100), LogLevel::Off);
+  }
+  EXPECT_EQ(0u, output_count(&list));
+}
+
+// Test adding to a LogOutputList
+TEST(LogOutputList, set_output_level_add) {
+  LogOutputList list;
+
+  // First add 5 outputs to Info level
+  for (size_t i = 10; i < 15; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Info);
+  }
+
+  // Verify that they have been added successfully
+  size_t count = 0;
+  for (LogOutputList::Iterator it = list.iterator(); it != list.end(); it++) {
+    ASSERT_EQ(dummy_output(10 + count++), *it);
+  }
+  ASSERT_EQ(5u, count);
+
+  // Now add more outputs, but on all different levels
+  for (size_t i = 5; i < 10; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Warning);
+  }
+  for (size_t i = 0; i < 5; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Error);
+  }
+  for (size_t i = 15; i < 20; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Debug);
+  }
+  for (size_t i = 20; i < 25; i++) {
+    list.set_output_level(dummy_output(i), LogLevel::Trace);
+  }
+
+  // Verify that that all outputs have been added, and that the order is Error, Warning, Info, Debug, Trace
+  count = 0;
+  for (LogOutputList::Iterator it = list.iterator(); it != list.end(); it++) {
+    ASSERT_EQ(dummy_output(count++), *it);
+  }
+  ASSERT_EQ(25u, count);
+}
+
+// Test is_level() on lists with a single output on different levels
+TEST(LogOutputList, is_level_single_output) {
+  for (size_t i = LogLevel::First; i < LogLevel::Count; i++) {
+    LogLevelType level = static_cast<LogLevelType>(i);
+    LogOutputList list;
+    list.set_output_level(LogOutput::Stdout, level);
+    for (size_t j = LogLevel::First; j < LogLevel::Count; j++) {
+      LogLevelType other = static_cast<LogLevelType>(j);
+      // Verify that levels finer than the current level for stdout are reported as disabled,
+      // and levels equal to or included in the current level are reported as enabled
+      if (other >= level) {
+        EXPECT_TRUE(list.is_level(other))
+          << LogLevel::name(other) << " >= " << LogLevel::name(level) << " but is_level() returns false";
+      } else {
+        EXPECT_FALSE(list.is_level(other))
+          << LogLevel::name(other) << " < " << LogLevel::name(level) << " but is_level() returns true";
+      }
+    }
+  }
+}
+
+// Test is_level() with an empty list
+TEST(LogOutputList, is_level_empty) {
+  LogOutputList emptylist;
+  for (size_t i = LogLevel::First; i < LogLevel::Count; i++) {
+    LogLevelType other = static_cast<LogLevelType>(i);
+    EXPECT_FALSE(emptylist.is_level(other)) << "is_level() returns true even though the list is empty";
+  }
+}
+
+// Test is_level() on lists with two outputs on different levels
+TEST(LogOutputList, is_level_multiple_outputs) {
+  for (size_t i = LogLevel::First; i < LogLevel::Count - 1; i++) {
+      LogOutput* dummy1 = LogOutput::Stdout;
+      LogOutput* dummy2 = LogOutput::Stderr;
+      LogLevelType first = static_cast<LogLevelType>(i);
+      LogLevelType second = static_cast<LogLevelType>(i + 1);
+      LogOutputList list;
+      list.set_output_level(dummy1, first);
+      list.set_output_level(dummy2, second);
+      for (size_t j = LogLevel::First; j < LogLevel::Count; j++) {
+        LogLevelType other = static_cast<LogLevelType>(j);
+        // The first output's level will be the finest, expect it's level to be reported by the list
+        if (other >= first) {
+          EXPECT_TRUE(list.is_level(other))
+            << LogLevel::name(other) << " >= " << LogLevel::name(first) << " but is_level() returns false";
+        } else {
+          EXPECT_FALSE(list.is_level(other))
+            << LogLevel::name(other) << " < " << LogLevel::name(first) << " but is_level() returns true";
+        }
+      }
+    }
+}
+
+TEST(LogOutputList, level_for) {
+  LogOutputList list;
+
+  // Ask the empty list about stdout, stderr
+  EXPECT_EQ(LogLevel::Off, list.level_for(LogOutput::Stdout));
+  EXPECT_EQ(LogLevel::Off, list.level_for(LogOutput::Stderr));
+
+  // Ask for level in a list with two outputs on different levels
+  list.set_output_level(LogOutput::Stdout, LogLevel::Info);
+  list.set_output_level(LogOutput::Stderr, LogLevel::Trace);
+  EXPECT_EQ(LogLevel::Info, list.level_for(LogOutput::Stdout));
+  EXPECT_EQ(LogLevel::Trace, list.level_for(LogOutput::Stderr));
+
+  // Remove and ask again
+  list.set_output_level(LogOutput::Stdout, LogLevel::Off);
+  EXPECT_EQ(LogLevel::Off, list.level_for(LogOutput::Stdout));
+  EXPECT_EQ(LogLevel::Trace, list.level_for(LogOutput::Stderr));
+
+  // Ask about an unknown output
+  LogOutput* dummy = dummy_output(4711);
+  EXPECT_EQ(LogLevel::Off, list.level_for(dummy));
+
+  for (size_t i = LogLevel::First; i <= LogLevel::Last; i++) {
+    LogLevelType level = static_cast<LogLevelType>(i);
+    list.set_output_level(dummy, level);
+    EXPECT_EQ(level, list.level_for(dummy));
+  }
+
+  // Make sure the stderr level is still the same
+  EXPECT_EQ(LogLevel::Trace, list.level_for(LogOutput::Stderr));
+}
diff --git a/hotspot/test/native/logging/test_logTag.cpp b/hotspot/test/native/logging/test_logTag.cpp
new file mode 100644
index 0000000..3017a2d
--- /dev/null
+++ b/hotspot/test/native/logging/test_logTag.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logTag.hpp"
+#include "unittest.hpp"
+
+TEST(LogTag, from_string) {
+  // Verify for all tags defined in LOG_TAG_LIST
+#define LOG_TAG(tag) \
+  EXPECT_EQ(PREFIX_LOG_TAG(tag), LogTag::from_string(#tag));
+  LOG_TAG_LIST
+#undef LOG_TAG
+
+  // Verify a couple of invalid strings parsing as invalid tags
+  const char* invalid_tag[] = {
+    "bad tag", ".^@", "**", "*", "gcc", "+gc", "gc+", "gc+safepoint",
+    "gc+safepoint=warning", "warning", "=info", "gcsafepointlogging",
+    "gc+safepointlogging", "gclogging", "+", " gc", "logging ", ","
+  };
+  for (size_t i = 0; i < sizeof(invalid_tag) / sizeof(*invalid_tag); i++) {
+    EXPECT_EQ(LogTag::__NO_TAG, LogTag::from_string(invalid_tag[i]))
+        << "'" << invalid_tag[i] << "' did not parse as an invalid tag";
+  }
+}
+
+TEST(LogTag, name) {
+  // Verify for each tag from the macro
+#define LOG_TAG(tag) \
+  EXPECT_STREQ(#tag, LogTag::name(PREFIX_LOG_TAG(tag)));
+  LOG_TAG_LIST
+#undef LOG_TAG
+}
diff --git a/hotspot/test/native/logging/test_logTagLevelExpression.cpp b/hotspot/test/native/logging/test_logTagLevelExpression.cpp
new file mode 100644
index 0000000..72bd244
--- /dev/null
+++ b/hotspot/test/native/logging/test_logTagLevelExpression.cpp
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logLevel.hpp"
+#include "logging/logTagLevelExpression.hpp"
+#include "logging/logTagSet.hpp"
+#include "unittest.hpp"
+#include "utilities/globalDefinitions.hpp"
+
+TEST(LogTagLevelExpression, parse) {
+  char buf[256];
+  const char* invalid_substr[] = {
+    "=", "+", " ", "+=", "+=*", "*+", " +", "**", "++", ".", ",", ",," ",+",
+    " *", "all+", "all*", "+all", "+all=Warning", "==Info", "=InfoWarning",
+    "BadTag+", "logging++", "logging*+", ",=", "gc+gc+gc+gc+gc+gc"
+  };
+  const char* valid_expression[] = {
+    "all", "gc", "gc,logging", "gc+logging", "logging+gc", "logging+gc,gc", "logging+gc*", "gc=trace",
+    "gc=trace,logging=info", "logging+gc=trace", "logging+gc=trace,gc+logging=warning,logging",
+    "gc,all=info", "logging*", "logging*=info", "gc+logging*=error", "logging*,gc=info"
+  };
+
+  // Verify valid expressions parse without problems
+  for (size_t i = 0; i < ARRAY_SIZE(valid_expression); i++) {
+    LogTagLevelExpression expr;
+    EXPECT_TRUE(expr.parse(valid_expression[i])) << "Valid expression '" << valid_expression[i] << "' did not parse";
+  }
+
+  // Verify we can use 'all' with each available level
+  for (uint level = LogLevel::First; level <= LogLevel::Last; level++) {
+    char buf[32];
+    int ret = jio_snprintf(buf, sizeof(buf), "all=%s", LogLevel::name(static_cast<LogLevelType>(level)));
+    ASSERT_NE(ret, -1);
+
+    LogTagLevelExpression expr;
+    EXPECT_TRUE(expr.parse(buf));
+  }
+
+  // Verify invalid expressions do not parse
+  for (size_t i = 0; i < ARRAY_SIZE(valid_expression); i++) {
+    for (size_t j = 0; j < ARRAY_SIZE(invalid_substr); j++) {
+      // Prefix with invalid substr
+      LogTagLevelExpression expr;
+      jio_snprintf(buf, sizeof(buf), "%s%s", invalid_substr[j], valid_expression[i]);
+      EXPECT_FALSE(expr.parse(buf)) << "'" << buf << "'" << " considered legal";
+
+      // Suffix with invalid substr
+      LogTagLevelExpression expr1;
+      jio_snprintf(buf, sizeof(buf), "%s%s", valid_expression[i], invalid_substr[j]);
+      EXPECT_FALSE(expr1.parse(buf)) << "'" << buf << "'" << " considered legal";
+
+      // Use only the invalid substr
+      LogTagLevelExpression expr2;
+      EXPECT_FALSE(expr2.parse(invalid_substr[j])) << "'" << invalid_substr[j] << "'" << " considered legal";
+    }
+
+    // Suffix/prefix with some unique invalid prefixes/suffixes
+    LogTagLevelExpression expr;
+    jio_snprintf(buf, sizeof(buf), "*%s", valid_expression[i]);
+    EXPECT_FALSE(expr.parse(buf)) << "'" << buf << "'" << " considered legal";
+
+    LogTagLevelExpression expr1;
+    jio_snprintf(buf, sizeof(buf), "logging*%s", valid_expression[i]);
+    EXPECT_FALSE(expr1.parse(buf)) << "'" << buf << "'" << " considered legal";
+  }
+}
+
+// Test the level_for() function for an empty expression
+TEST(LogTagLevelExpression, level_for_empty) {
+  LogTagLevelExpression emptyexpr;
+  ASSERT_TRUE(emptyexpr.parse(""));
+  // All tagsets should be unspecified since the expression doesn't involve any tagset
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_EQ(LogLevel::Unspecified, emptyexpr.level_for(*ts));
+  }
+}
+
+// Test level_for() with "all" without any specified level
+TEST(LogTagLevelExpression, level_for_all) {
+  LogTagLevelExpression allexpr;
+  ASSERT_TRUE(allexpr.parse("all"));
+  // Level will be unspecified since no level was given
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_EQ(LogLevel::Unspecified, allexpr.level_for(*ts));
+  }
+}
+
+// Test level_for() with "all=debug"
+TEST(LogTagLevelExpression, level_for_all_debug) {
+  LogTagLevelExpression alldebugexpr;
+  ASSERT_TRUE(alldebugexpr.parse("all=debug"));
+  // All tagsets should report debug level
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_EQ(LogLevel::Debug, alldebugexpr.level_for(*ts));
+  }
+}
+
+// Test level_for() with "all=off"
+TEST(LogTagLevelExpression, level_for_all_off) {
+  LogTagLevelExpression alloffexpr;
+  ASSERT_TRUE(alloffexpr.parse("all=off"));
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    EXPECT_EQ(LogLevel::Off, alloffexpr.level_for(*ts));
+  }
+}
+
+// Test level_for() with an expression that has overlap (last subexpression should be used)
+TEST(LogTagLevelExpression, level_for_overlap) {
+  LogTagLevelExpression overlapexpr;
+  // The all=warning will be overridden with gc=info and/or logging+safepoint*=trace
+  ASSERT_TRUE(overlapexpr.parse("all=warning,gc=info,logging+safepoint*=trace"));
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    if (ts->contains(PREFIX_LOG_TAG(gc)) && ts->ntags() == 1) {
+      EXPECT_EQ(LogLevel::Info, overlapexpr.level_for(*ts));
+    } else if (ts->contains(PREFIX_LOG_TAG(logging)) && ts->contains(PREFIX_LOG_TAG(safepoint))) {
+      EXPECT_EQ(LogLevel::Trace, overlapexpr.level_for(*ts));
+    } else {
+      EXPECT_EQ(LogLevel::Warning, overlapexpr.level_for(*ts));
+    }
+  }
+  EXPECT_EQ(LogLevel::Warning, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
+  EXPECT_EQ(LogLevel::Info, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
+  EXPECT_EQ(LogLevel::Trace, overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, safepoint)>::tagset()));
+  EXPECT_EQ(LogLevel::Trace,
+            overlapexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc, class, safepoint, heap)>::tagset()));
+}
+
+// Test level_for() with an expression containing two independent subexpressions
+TEST(LogTagLevelExpression, level_for_disjoint) {
+  LogTagLevelExpression reducedexpr;
+  ASSERT_TRUE(reducedexpr.parse("gc+logging=trace,class*=error"));
+  EXPECT_EQ(LogLevel::Error, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
+  EXPECT_EQ(LogLevel::Error, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint, class)>::tagset()));
+  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint)>::tagset()));
+  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
+  EXPECT_EQ(LogLevel::NotMentioned, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
+  EXPECT_EQ(LogLevel::Trace, reducedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
+}
+
+// Test level_for() with an expression that is completely overridden in the last part of the expression
+TEST(LogTagLevelExpression, level_for_override) {
+  LogTagLevelExpression overrideexpr;
+  // No matter what, everything should be set to error level because of the last part
+  ASSERT_TRUE(overrideexpr.parse("logging,gc*=trace,all=error"));
+  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(class)>::tagset()));
+  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
+  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
+  EXPECT_EQ(LogLevel::Error, overrideexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
+}
+
+// Test level_for() with a mixed expression with a bit of everything
+TEST(LogTagLevelExpression, level_for_mixed) {
+  LogTagLevelExpression mixedexpr;
+  ASSERT_TRUE(mixedexpr.parse("all=warning,gc*=debug,gc=trace,safepoint*=off"));
+  EXPECT_EQ(LogLevel::Warning, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging)>::tagset()));
+  EXPECT_EQ(LogLevel::Warning, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, class)>::tagset()));
+  EXPECT_EQ(LogLevel::Debug, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc, class)>::tagset()));
+  EXPECT_EQ(LogLevel::Off, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc, safepoint, logging)>::tagset()));
+  EXPECT_EQ(LogLevel::Off, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(safepoint)>::tagset()));
+  EXPECT_EQ(LogLevel::Debug, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset()));
+  EXPECT_EQ(LogLevel::Trace, mixedexpr.level_for(LogTagSetMapping<LOG_TAGS(gc)>::tagset()));
+}
diff --git a/hotspot/test/native/logging/test_logTagSet.cpp b/hotspot/test/native/logging/test_logTagSet.cpp
new file mode 100644
index 0000000..327a0af
--- /dev/null
+++ b/hotspot/test/native/logging/test_logTagSet.cpp
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * ac_heapanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+#include "precompiled.hpp"
+#include "logging/logLevel.hpp"
+#include "logging/logOutput.hpp"
+#include "logging/logTag.hpp"
+#include "logging/logTagSet.hpp"
+#include "unittest.hpp"
+
+// Test the default level for each tagset
+TEST(LogTagSet, defaults) {
+  for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
+    char buf[256];
+    ts->label(buf, sizeof(buf));
+    SCOPED_TRACE(buf);
+    EXPECT_TRUE(ts->is_level(LogLevel::Error));
+    EXPECT_TRUE(ts->is_level(LogLevel::Warning));
+    EXPECT_FALSE(ts->is_level(LogLevel::Info));
+    EXPECT_TRUE(ts->has_output(LogOutput::Stdout));
+    EXPECT_FALSE(ts->has_output(LogOutput::Stderr));
+  }
+}
+
+TEST(LogTagSet, has_output) {
+  LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  ts.set_output_level(LogOutput::Stderr, LogLevel::Trace);
+  EXPECT_TRUE(ts.has_output(LogOutput::Stderr));
+  EXPECT_FALSE(ts.has_output(NULL));
+  ts.set_output_level(LogOutput::Stderr, LogLevel::Off);
+  EXPECT_FALSE(ts.has_output(LogOutput::Stderr));
+}
+
+TEST(LogTagSet, ntags) {
+  const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  EXPECT_EQ(1u, ts.ntags());
+  const LogTagSet& ts2 = LogTagSetMapping<LOG_TAGS(logging, gc, class, safepoint, heap)>::tagset();
+  EXPECT_EQ(5u, ts2.ntags());
+}
+
+TEST(LogTagSet, is_level) {
+  LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  // Set info level on stdout and verify that is_level() reports correctly
+  ts.set_output_level(LogOutput::Stdout, LogLevel::Info);
+  EXPECT_TRUE(ts.is_level(LogLevel::Error));
+  EXPECT_TRUE(ts.is_level(LogLevel::Warning));
+  EXPECT_TRUE(ts.is_level(LogLevel::Info));
+  EXPECT_FALSE(ts.is_level(LogLevel::Debug));
+  EXPECT_FALSE(ts.is_level(LogLevel::Trace));
+  ts.set_output_level(LogOutput::Stdout, LogLevel::Default);
+  EXPECT_TRUE(ts.is_level(LogLevel::Default));
+}
+
+TEST(LogTagSet, level_for) {
+  LogOutput* output = LogOutput::Stdout;
+  LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  for (uint i = 0; i < LogLevel::Count; i++) {
+    LogLevelType level = static_cast<LogLevelType>(i);
+    // Set the level and verify that level_for() reports it back
+    ts.set_output_level(output, level);
+    EXPECT_EQ(level, ts.level_for(output));
+  }
+  ts.set_output_level(output, LogLevel::Default);
+}
+
+TEST(LogTagSet, contains) {
+  // Verify that contains works as intended for a few predetermined tagsets
+  const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  EXPECT_TRUE(ts.contains(PREFIX_LOG_TAG(logging)));
+  EXPECT_FALSE(ts.contains(PREFIX_LOG_TAG(gc)));
+  EXPECT_FALSE(ts.contains(PREFIX_LOG_TAG(class)));
+
+  const LogTagSet& ts2 = LogTagSetMapping<LOG_TAGS(logging, gc)>::tagset();
+  EXPECT_TRUE(ts2.contains(PREFIX_LOG_TAG(logging)));
+  EXPECT_TRUE(ts2.contains(PREFIX_LOG_TAG(gc)));
+  EXPECT_FALSE(ts2.contains(PREFIX_LOG_TAG(class)));
+
+  const LogTagSet& ts3 = LogTagSetMapping<LOG_TAGS(logging, gc, class)>::tagset();
+  EXPECT_TRUE(ts3.contains(PREFIX_LOG_TAG(logging)));
+  EXPECT_TRUE(ts3.contains(PREFIX_LOG_TAG(gc)));
+  EXPECT_TRUE(ts3.contains(PREFIX_LOG_TAG(class)));
+  EXPECT_FALSE(ts3.contains(PREFIX_LOG_TAG(safepoint)));
+
+  const LogTagSet& ts4 = LogTagSetMapping<LOG_TAGS(logging, gc, class, safepoint, heap)>::tagset();
+  EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(logging)));
+  EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(gc)));
+  EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(class)));
+  EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(safepoint)));
+  EXPECT_TRUE(ts4.contains(PREFIX_LOG_TAG(heap)));
+}
+
+TEST(LogTagSet, label) {
+  char buf[256];
+  const LogTagSet& ts = LogTagSetMapping<LOG_TAGS(logging, safepoint)>::tagset();
+  ASSERT_NE(-1, ts.label(buf, sizeof(buf)));
+  EXPECT_STREQ("logging,safepoint", buf);
+  // Verify using a custom separator
+  ASSERT_NE(-1, ts.label(buf, sizeof(buf), "++"));
+  EXPECT_STREQ("logging++safepoint", buf);
+
+  // Verify with three tags
+  const LogTagSet& ts1 = LogTagSetMapping<LOG_TAGS(logging, safepoint, jni)>::tagset();
+  ASSERT_NE(-1, ts1.label(buf, sizeof(buf)));
+  EXPECT_STREQ("logging,safepoint,jni", buf);
+
+  // Verify with a single tag
+  const LogTagSet& ts2 = LogTagSetMapping<LOG_TAGS(logging)>::tagset();
+  ASSERT_NE(-1, ts2.label(buf, sizeof(buf)));
+  EXPECT_STREQ("logging", buf);
+}
diff --git a/hotspot/test/native/utilities/test_bitMap_setops.cpp b/hotspot/test/native/utilities/test_bitMap_setops.cpp
new file mode 100644
index 0000000..45b6d79
--- /dev/null
+++ b/hotspot/test/native/utilities/test_bitMap_setops.cpp
@@ -0,0 +1,417 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "utilities/bitMap.inline.hpp"
+#include "utilities/copy.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include <stdlib.h>
+#include "unittest.hpp"
+
+typedef BitMap::idx_t idx_t;
+typedef BitMap::bm_word_t bm_word_t;
+
+class BitMapMemory {
+private:
+  idx_t _words;
+  bm_word_t* _memory;
+
+public:
+  BitMapMemory(idx_t bits) :
+    _words(BitMap::calc_size_in_words(bits)),
+    _memory(static_cast<bm_word_t*>(malloc(_words * sizeof(bm_word_t))))
+  { }
+
+  ~BitMapMemory() {
+    free(_memory);
+  }
+
+  BitMapView make_view(idx_t bits, bm_word_t value) {
+    vmassert(BitMap::calc_size_in_words(bits) <= _words, "invalid request");
+    STATIC_ASSERT(sizeof(bm_word_t) == sizeof(HeapWord));
+    Copy::fill_to_aligned_words((HeapWord*)_memory, _words, value);
+    return BitMapView(_memory, bits);
+  }
+
+  bm_word_t* memory() { return _memory; }
+};
+
+const idx_t aligned_size = 4 * BitsPerWord;
+const idx_t unaligned_size = aligned_size - (BitsPerWord / 2);
+
+static bm_word_t make_even_bits() {
+  bm_word_t result = 1;
+  while (true) {
+    bm_word_t next = (result << 2) | 1;
+    if (next == result) {
+      return result;
+    }
+    result = next;
+  }
+}
+
+const bm_word_t even_bits = make_even_bits();
+const bm_word_t odd_bits = ~even_bits;
+const bm_word_t one_bits = ~bm_word_t(0);
+const bm_word_t zero_bits = 0;
+
+// Scoped set a clear bit and restore to clear.
+class WithBitSet {
+private:
+  BitMap& _bm;
+  idx_t _index;
+
+public:
+  WithBitSet(BitMap& bm, idx_t index) : _bm(bm), _index(index) {
+    // Failure may indicate test bug; can't use ASSERT_xxx in constructor.
+    EXPECT_FALSE(_bm.at(_index));
+    bm.set_bit(_index);
+  }
+
+  ~WithBitSet() {
+    _bm.clear_bit(_index);
+  }
+};
+
+// Scoped clear a set bit and restore to set.
+class WithBitClear {
+private:
+  BitMap& _bm;
+  idx_t _index;
+
+public:
+  WithBitClear(BitMap& bm, idx_t index) : _bm(bm), _index(index) {
+    // Failure may indicate test bug; can't use ASSERT_xxx in constructor.
+    EXPECT_TRUE(_bm.at(_index));
+    bm.clear_bit(_index);
+  }
+
+  ~WithBitClear() {
+    _bm.set_bit(_index);
+  }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// bool is_same(const BitMap& bits);
+
+TEST(BitMap, is_same__aligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(aligned_size, even_bits);
+  BitMapView y = my.make_view(aligned_size, even_bits);
+  EXPECT_TRUE(x.is_same(y));
+
+  WithBitClear wbc(x, aligned_size / 2);
+  EXPECT_FALSE(x.is_same(y));
+}
+
+TEST(BitMap, is_same__unaligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(unaligned_size, even_bits);
+  BitMapView y = my.make_view(unaligned_size, even_bits);
+
+  // Check that a difference beyond the end of x/y doesn't count.
+  {
+    BitMapView aligned = BitMapView(mx.memory(), aligned_size);
+    const idx_t index = aligned_size - 2;
+    STATIC_ASSERT(unaligned_size <= index);
+
+    WithBitClear wbc(aligned, index);
+    EXPECT_TRUE(x.is_same(y));
+  }
+
+  // Check that a difference in the final partial word does count.
+  {
+    idx_t index = unaligned_size - 2;
+    ASSERT_LE(BitMap::word_align_down(unaligned_size), index);
+
+    WithBitClear wbc(y, index);
+    EXPECT_FALSE(x.is_same(y));
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// bool is_full();
+// bool is_empty();
+
+TEST(BitMap, is_full_or_empty__aligned) {
+  BitMapMemory mx(aligned_size);
+
+  {
+    BitMapView x = mx.make_view(aligned_size, even_bits);
+    EXPECT_FALSE(x.is_full());
+    EXPECT_FALSE(x.is_empty());
+  }
+
+  {
+    BitMapView x = mx.make_view(aligned_size, zero_bits);
+    EXPECT_FALSE(x.is_full());
+    EXPECT_TRUE(x.is_empty());
+  }
+
+  {
+    BitMapView x = mx.make_view(aligned_size, one_bits);
+    EXPECT_TRUE(x.is_full());
+    EXPECT_FALSE(x.is_empty());
+  }
+}
+
+TEST(BitMap, is_full__unaligned) {
+  BitMapMemory mx(aligned_size);
+
+  BitMapView x = mx.make_view(unaligned_size, one_bits);
+  EXPECT_TRUE(x.is_full());
+
+  // Check that a missing bit beyond the end doesn't count.
+  {
+    idx_t index = aligned_size - 1;
+    BitMapView aligned = BitMapView(mx.memory(), aligned_size);
+
+    WithBitClear wcb(aligned, index);
+    EXPECT_FALSE(aligned.is_full());
+    EXPECT_TRUE(x.is_full());
+  }
+
+  // Check that a missing bit in the final partial word does count.
+  {
+    WithBitClear wcb(x, unaligned_size - 1);
+    EXPECT_FALSE(x.is_full());
+  }
+}
+
+TEST(BitMap, is_empty__unaligned) {
+  BitMapMemory mx(aligned_size);
+
+  BitMapView x = mx.make_view(unaligned_size, zero_bits);
+  EXPECT_TRUE(x.is_empty());
+
+  // Check that a set bit beyond the end doesn't count.
+  {
+    idx_t index = aligned_size - 1;
+    BitMapView aligned = BitMapView(mx.memory(), aligned_size);
+
+    WithBitSet wbs(aligned, index);
+    EXPECT_FALSE(aligned.is_empty());
+    EXPECT_TRUE(x.is_empty());
+  }
+
+  // Check that a set bit in the final partial word does count.
+  {
+    WithBitSet wbs(x, unaligned_size - 1);
+    EXPECT_FALSE(x.is_empty());
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// bool contains(const BitMap& bits);
+
+TEST(BitMap, contains__aligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(aligned_size, even_bits);
+  BitMapView y = my.make_view(aligned_size, even_bits);
+  EXPECT_TRUE(x.contains(y));
+
+  WithBitClear wbc(x, aligned_size / 2);
+  EXPECT_FALSE(x.contains(y));
+}
+
+TEST(BitMap, contains__unaligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(unaligned_size, even_bits);
+  BitMapView y = my.make_view(unaligned_size, even_bits);
+
+  // Check that a missing bit beyond the end of x doesn't count.
+  {
+    BitMapView aligned = BitMapView(mx.memory(), aligned_size);
+    const idx_t index = aligned_size - 2;
+    STATIC_ASSERT(unaligned_size <= index);
+
+    WithBitClear wbc(aligned, index);
+    EXPECT_TRUE(x.contains(y));
+  }
+
+  // Check that a missing bit in the final partial word does count.
+  {
+    idx_t index = unaligned_size - 2;
+    ASSERT_LE(BitMap::word_align_down(unaligned_size), index);
+
+    WithBitClear wbc(x, index);
+    EXPECT_FALSE(x.contains(y));
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// bool intersects(const BitMap& bits);
+
+TEST(BitMap, intersects__aligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(aligned_size, even_bits);
+  BitMapView y = my.make_view(aligned_size, zero_bits);
+  EXPECT_FALSE(x.intersects(y));
+
+  ASSERT_TRUE(x.at(aligned_size / 2));
+  WithBitSet wbs(y, aligned_size / 2);
+  EXPECT_TRUE(x.intersects(y));
+}
+
+TEST(BitMap, intersects__unaligned) {
+  BitMapMemory mx(aligned_size);
+  BitMapMemory my(aligned_size);
+
+  BitMapView x = mx.make_view(unaligned_size, even_bits);
+  BitMapView y = my.make_view(unaligned_size, zero_bits);
+  EXPECT_FALSE(x.intersects(y));
+
+  // Check that adding a bit beyond the end of y doesn't count.
+  {
+    BitMapView aligned_x = BitMapView(mx.memory(), aligned_size);
+    BitMapView aligned_y = BitMapView(my.memory(), aligned_size);
+    const idx_t index = aligned_size - 2;
+    STATIC_ASSERT(unaligned_size <= index);
+    ASSERT_TRUE(aligned_x.at(index));
+
+    WithBitSet wbs(aligned_y, index);
+    EXPECT_FALSE(x.intersects(y));
+  }
+
+  // Check that adding a bit in the final partial word does count.
+  {
+    idx_t index = unaligned_size - 2;
+    ASSERT_LE(BitMap::word_align_down(unaligned_size), index);
+    ASSERT_TRUE(x.at(index));
+
+    WithBitSet wbs(y, index);
+    EXPECT_TRUE(x.intersects(y));
+  }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// void set_from(const BitMap& bits);
+// void set_union(const BitMap& bits);
+// void set_difference(const BitMap& bits);
+// void set_intersection(const BitMap& bits);
+//
+// bool set_union_with_result(const BitMap& bits);
+// bool set_difference_with_result(const BitMap& bits);
+// bool set_intersection_with_result(const BitMap& bits);
+
+static void check_tail_unmodified(BitMapMemory& mem,
+                                  idx_t bits,
+                                  bm_word_t fill_word) {
+  if (!BitMap::is_word_aligned(bits)) {
+    idx_t last_word_bit_index = BitMap::word_align_down(bits);
+    idx_t last_word_index = BitMap::calc_size_in_words(last_word_bit_index);
+    bm_word_t last_word = mem.memory()[last_word_index];
+    idx_t shift = bits - last_word_bit_index;
+    EXPECT_EQ(fill_word >> shift, last_word >> shift);
+  }
+}
+
+static void check_mod_setop(void (BitMap::*f)(const BitMap&),
+                            idx_t bits,
+                            bm_word_t wx,
+                            bm_word_t wy,
+                            bm_word_t wexp) {
+  BitMapMemory mx(bits);
+  BitMapMemory my(bits);
+  BitMapMemory mexp(bits);
+
+  BitMapView x = mx.make_view(bits, wx);
+  BitMapView y = my.make_view(bits, wy);
+  BitMapView exp = mexp.make_view(bits, wexp);
+
+  (x.*f)(y);
+
+  EXPECT_TRUE(exp.is_same(x));
+  check_tail_unmodified(mx, bits, wx);
+}
+
+static void check_mod_setop_with_result(bool (BitMap::*f)(const BitMap&),
+                                        idx_t bits,
+                                        bm_word_t wx,
+                                        bm_word_t wy,
+                                        bm_word_t wexp) {
+  BitMapMemory mx(bits);
+  BitMapMemory my(bits);
+  BitMapMemory mexp(bits);
+
+  BitMapView x = mx.make_view(bits, wx);
+  BitMapView y = my.make_view(bits, wy);
+  BitMapView exp = mexp.make_view(bits, wexp);
+
+  bool value = (x.*f)(y);
+  EXPECT_EQ(value, wx != wexp);
+
+  EXPECT_TRUE(exp.is_same(x));
+  check_tail_unmodified(mx, bits, wx);
+}
+
+#define CHECK_MOD_SETOP_AUX(checker, name, x, y, exp)   \
+  TEST(BitMap, name ## __ ## x ## _ ## y) {             \
+    checker(&BitMap::name, aligned_size,                \
+            x ## _bits, y ## _bits, exp ## _bits);      \
+    checker(&BitMap::name, unaligned_size,              \
+            x ## _bits, y ## _bits, exp ## _bits);      \
+  }
+
+#define CHECK_MOD_SETOP(name, x, y, exp) \
+  CHECK_MOD_SETOP_AUX(check_mod_setop, name, x, y, exp)
+
+#define CHECK_MOD_SETOP_WITH_RESULT(name, x, y, exp) \
+  CHECK_MOD_SETOP_AUX(check_mod_setop_with_result, name, x, y, exp)
+
+#define CHECK_MOD_SETOPS(name, x, y, exp)                       \
+  CHECK_MOD_SETOP(name, x, y, exp)                              \
+  CHECK_MOD_SETOP_WITH_RESULT(name ## _with_result, x, y, exp)
+
+CHECK_MOD_SETOP(set_from, even, even, even)
+CHECK_MOD_SETOP(set_from, even, odd, odd)
+CHECK_MOD_SETOP(set_from, even, one, one)
+CHECK_MOD_SETOP(set_from, even, zero, zero)
+
+CHECK_MOD_SETOPS(set_union, even, even, even)
+CHECK_MOD_SETOPS(set_union, even, odd, one)
+CHECK_MOD_SETOPS(set_union, even, one, one)
+CHECK_MOD_SETOPS(set_union, even, zero, even)
+
+CHECK_MOD_SETOPS(set_difference, even, even, zero)
+CHECK_MOD_SETOPS(set_difference, even, odd, even)
+CHECK_MOD_SETOPS(set_difference, even, one, zero)
+CHECK_MOD_SETOPS(set_difference, even, zero, even)
+
+CHECK_MOD_SETOPS(set_intersection, even, even, even)
+CHECK_MOD_SETOPS(set_intersection, even, odd, zero)
+CHECK_MOD_SETOPS(set_intersection, even, one, even)
+CHECK_MOD_SETOPS(set_intersection, even, zero, zero)
+
diff --git a/hotspot/test/runtime/8026365/InvokeSpecialAnonTest.java b/hotspot/test/runtime/8026365/InvokeSpecialAnonTest.java
index a9f69d6..341b2a6 100644
--- a/hotspot/test/runtime/8026365/InvokeSpecialAnonTest.java
+++ b/hotspot/test/runtime/8026365/InvokeSpecialAnonTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 8026365
  * @summary Test invokespecial of host class method from an anonymous class
  * @author  Robert Field
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  * @compile -XDignore.symbol.file InvokeSpecialAnonTest.java
diff --git a/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java b/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java
index fe77452..186b235 100644
--- a/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java
+++ b/hotspot/test/runtime/BadObjectClass/BootstrapRedefine.java
@@ -25,13 +25,15 @@
  * @test
  * @bug 6583051
  * @summary Give error if java.lang.Object has been incompatibly overridden on the bootpath
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main BootstrapRedefine
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class BootstrapRedefine {
 
diff --git a/hotspot/test/runtime/BoolReturn/NativeSmallIntCallsTest.java b/hotspot/test/runtime/BoolReturn/NativeSmallIntCallsTest.java
index 6ce8cb1..7a85ad2 100644
--- a/hotspot/test/runtime/BoolReturn/NativeSmallIntCallsTest.java
+++ b/hotspot/test/runtime/BoolReturn/NativeSmallIntCallsTest.java
@@ -25,7 +25,7 @@
  * @bug 8149170
  * @summary Test native functions return booleans as 0/1 but differently than java functions
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile BoolConstructor.java
  * @run main/native NativeSmallIntCallsTest
  */
diff --git a/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppend.java b/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppend.java
index 2837197..a463f49 100644
--- a/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppend.java
+++ b/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppend.java
@@ -25,11 +25,12 @@
  * @test
  * @bug 8087154
  * @summary Uninitialized system property jdk.boot.class.path.append causes SIGSEGV
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 // Test that system property jdk.boot.class.path.append is initialized.  Otherwise,
 // -XX:+PrintCompilation does causes a SIGSEGV.
diff --git a/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java b/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java
index 0fd7830..458b5ce 100644
--- a/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java
+++ b/hotspot/test/runtime/BootClassAppendProp/BootClassPathAppendProp.java
@@ -25,7 +25,6 @@
 
 /*
  * @test
- * @build BootClassPathAppendProp
  * @run main/othervm -Xbootclasspath/a:/usr/lib -showversion -Xbootclasspath/a:/i/dont/exist BootClassPathAppendProp
  * @run main/othervm --patch-module=no_module=/not/here -Xbootclasspath/a:/i/may/exist BootClassPathAppendProp
  * @run main/othervm -Djdk.boot.class.path.append=newdir BootClassPathAppendProp
diff --git a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
index 34a417e..5e5031c 100644
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 8003424
  * @summary Testing UseCompressedClassPointers with CDS
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main CDSCompressedKPtrs
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CDSCompressedKPtrs {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
index b9242e1..885427c 100644
--- a/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/CDSCompressedKPtrsError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 8003424
  * @summary Test that cannot use CDS if UseCompressedClassPointers is turned off.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main CDSCompressedKPtrsError
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CDSCompressedKPtrsError {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
index 9694382..425a2e5 100644
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 8005933
  * @summary Test that -Xshare:auto uses CDS when explicitly specified with -server.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main XShareAuto
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class XShareAuto {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/ClassFile/JsrRewriting.java b/hotspot/test/runtime/ClassFile/JsrRewriting.java
index 4d9a3e6..55d56c6 100644
--- a/hotspot/test/runtime/ClassFile/JsrRewriting.java
+++ b/hotspot/test/runtime/ClassFile/JsrRewriting.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,14 +33,17 @@
  * @bug 7185550
  * @bug 7149464
  * @key cte_test
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.desktop
  *          java.management
  * @run main JsrRewriting
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 
 public class JsrRewriting {
diff --git a/hotspot/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java b/hotspot/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java
index 9ab684a..a87aebb 100644
--- a/hotspot/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java
+++ b/hotspot/test/runtime/ClassFile/OomWhileParsingRepeatedJsr.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,15 +33,17 @@
  * @bug 7037122
  * @bug 7123945
  * @bug 8016029
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.desktop
  *          java.management
  * @run main OomWhileParsingRepeatedJsr
  */
 
-import jdk.test.lib.*;
-
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class OomWhileParsingRepeatedJsr {
 
diff --git a/hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java b/hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java
index c3ca467..486bba9 100644
--- a/hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java
+++ b/hotspot/test/runtime/ClassFile/UnsupportedClassFileVersion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
@@ -36,7 +36,8 @@
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class UnsupportedClassFileVersion implements Opcodes {
     public static void main(String... args) throws Exception {
diff --git a/hotspot/test/runtime/ClassUnload/KeepAliveClass.java b/hotspot/test/runtime/ClassUnload/KeepAliveClass.java
index 9c0b50c..0d1d51a 100644
--- a/hotspot/test/runtime/ClassUnload/KeepAliveClass.java
+++ b/hotspot/test/runtime/ClassUnload/KeepAliveClass.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
  * @test KeepAliveClass
  * @summary This test case uses a java.lang.Class instance to keep a class alive.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /runtime/testlibrary
+ * @library /test/lib /runtime/testlibrary
  * @library classes
- * @build KeepAliveClass test.Empty
- * @build ClassUnloadCommon
+ * @build sun.hotspot.WhiteBox test.Empty
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI KeepAliveClass
diff --git a/hotspot/test/runtime/ClassUnload/KeepAliveClassLoader.java b/hotspot/test/runtime/ClassUnload/KeepAliveClassLoader.java
index ec8fa0d..e519f67 100644
--- a/hotspot/test/runtime/ClassUnload/KeepAliveClassLoader.java
+++ b/hotspot/test/runtime/ClassUnload/KeepAliveClassLoader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
  * @test KeepAliveClassLoader
  * @summary This test case uses a java.lang.ClassLoader instance to keep a class alive.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /runtime/testlibrary
+ * @library /test/lib /runtime/testlibrary
  * @library classes
- * @build KeepAliveClassLoader test.Empty
- * @build ClassUnloadCommon
+ * @build sun.hotspot.WhiteBox test.Empty
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI KeepAliveClassLoader
diff --git a/hotspot/test/runtime/ClassUnload/KeepAliveObject.java b/hotspot/test/runtime/ClassUnload/KeepAliveObject.java
index aca13b0..2ccdab8 100644
--- a/hotspot/test/runtime/ClassUnload/KeepAliveObject.java
+++ b/hotspot/test/runtime/ClassUnload/KeepAliveObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
  * @test KeepAliveObject
  * @summary This test case uses a class instance to keep the class alive.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /runtime/testlibrary
+ * @library /test/lib /runtime/testlibrary
  * @library classes
- * @build KeepAliveObject test.Empty
- * @build ClassUnloadCommon
+ * @build sun.hotspot.WhiteBox test.Empty
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI KeepAliveObject
diff --git a/hotspot/test/runtime/ClassUnload/KeepAliveSoftReference.java b/hotspot/test/runtime/ClassUnload/KeepAliveSoftReference.java
index e6321a5..d28babb 100644
--- a/hotspot/test/runtime/ClassUnload/KeepAliveSoftReference.java
+++ b/hotspot/test/runtime/ClassUnload/KeepAliveSoftReference.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,9 @@
  * @test KeepAliveSoftReference
  * @summary This test case uses a java.lang.ref.SoftReference referencing a class instance to keep a class alive.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /runtime/testlibrary
+ * @library /test/lib /runtime/testlibrary
  * @library classes
- * @build KeepAliveSoftReference test.Empty
- * @build ClassUnloadCommon
+ * @build sun.hotspot.WhiteBox test.Empty
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI KeepAliveSoftReference
diff --git a/hotspot/test/runtime/ClassUnload/UnloadTest.java b/hotspot/test/runtime/ClassUnload/UnloadTest.java
index eada270..e995f7e 100644
--- a/hotspot/test/runtime/ClassUnload/UnloadTest.java
+++ b/hotspot/test/runtime/ClassUnload/UnloadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,9 @@
 /*
  * @test UnloadTest
  * @modules java.base/jdk.internal.misc
- * @library /runtime/testlibrary /testlibrary /test/lib
+ * @library /runtime/testlibrary /test/lib
  * @library classes
- * @build ClassUnloadCommon test.Empty
- * @build UnloadTest
+ * @build sun.hotspot.WhiteBox test.Empty
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -Xmn8m -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI UnloadTest
diff --git a/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java b/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java
index 218b014..7728db2 100644
--- a/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java
+++ b/hotspot/test/runtime/CommandLine/BooleanFlagWithInvalidValue.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8006298
  * @summary Setting an invalid value for a bool argument should result in a useful error message
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class BooleanFlagWithInvalidValue {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/CompilerConfigFileWarning.java b/hotspot/test/runtime/CommandLine/CompilerConfigFileWarning.java
index de46967..7546635 100644
--- a/hotspot/test/runtime/CommandLine/CompilerConfigFileWarning.java
+++ b/hotspot/test/runtime/CommandLine/CompilerConfigFileWarning.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 7167142
  * @summary Warn if unused .hotspot_compiler file is present
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class CompilerConfigFileWarning {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/ConfigFileParsing.java b/hotspot/test/runtime/CommandLine/ConfigFileParsing.java
index 870240a..3b08bf1 100644
--- a/hotspot/test/runtime/CommandLine/ConfigFileParsing.java
+++ b/hotspot/test/runtime/CommandLine/ConfigFileParsing.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,14 @@
  * @test ConfigFileParsing
  * @bug 7158804
  * @summary Improve config file parsing
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ConfigFileParsing {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/ConfigFileWarning.java b/hotspot/test/runtime/CommandLine/ConfigFileWarning.java
index 6fcbde3..a189b95 100644
--- a/hotspot/test/runtime/CommandLine/ConfigFileWarning.java
+++ b/hotspot/test/runtime/CommandLine/ConfigFileWarning.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 7167142
  * @summary Warn if unused .hotspot_rc file is present
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class ConfigFileWarning {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java b/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java
index 336ebaf..c7b6058 100644
--- a/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java
+++ b/hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8006298
  * @summary Setting a flag to an invalid value should print a useful error message
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class FlagWithInvalidValue {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java b/hotspot/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java
index 20766a2..9c73503 100644
--- a/hotspot/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java
+++ b/hotspot/test/runtime/CommandLine/IgnoreUnrecognizedVMOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,16 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 /*
  * @test
  * @bug 8129855
  * @summary -XX:+IgnoreUnrecognizedVMOptions should work according to the spec from JDK-8129855
  *
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main IgnoreUnrecognizedVMOptions
diff --git a/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java b/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java
index 1f0ed15..b10f021 100644
--- a/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java
+++ b/hotspot/test/runtime/CommandLine/NonBooleanFlagWithInvalidBooleanPrefix.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8006298
  * @summary Using a bool (+/-) prefix on non-bool flag should result in a useful error message
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class NonBooleanFlagWithInvalidBooleanPrefix {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java
index f2401c7..0362f0a 100644
--- a/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java
+++ b/hotspot/test/runtime/CommandLine/ObsoleteFlagErrorMessage.java
@@ -26,10 +26,11 @@
  * @bug 8060449 8073989
  * @summary Newly obsolete command line options should still give useful error messages when used improperly.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ObsoleteFlagErrorMessage {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java b/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java
index b1ff1ea..d15d536 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestJcmdOutput.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Verify jcmd error message for out-of-range value and for
  *          value which is not allowed by constraint. Also check that
  *          jcmd does not print an error message to the target process output.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *          jdk.management
@@ -35,8 +35,8 @@
 
 import jdk.test.lib.Asserts;
 import jdk.test.lib.DynamicVMOption;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 
 public class TestJcmdOutput {
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
index 890ac26..303912d 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
@@ -24,12 +24,11 @@
 /*
  * @test
  * @summary Test VM Options with ranges
- * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
+ * @library /test/lib /runtime/CommandLine/OptionsValidation/common
  * @modules java.base/jdk.internal.misc
  *          java.management
  *          jdk.attach/sun.tools.attach
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.* TestOptionsWithRanges
  * @run main/othervm/timeout=900 TestOptionsWithRanges
  */
 
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java
index 3c8453c..d5f20b5 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/TestOptionsWithRangesDynamic.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Test writeable VM Options with ranges.
- * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
+ * @library /test/lib /runtime/CommandLine/OptionsValidation/common
  * @modules java.base/jdk.internal.misc
  *          jdk.attach/sun.tools.attach
  *          java.management
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
index 031d6a2..b10ac75 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOption.java
@@ -30,8 +30,8 @@
 import java.util.List;
 import java.util.Set;
 import jdk.test.lib.DynamicVMOption;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import sun.tools.attach.HotSpotVirtualMachine;
diff --git a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
index cfde0ee..3c69456 100644
--- a/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
+++ b/hotspot/test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java
@@ -37,9 +37,9 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 import java.util.function.Predicate;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class JVMOptionsUtils {
 
diff --git a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java
index 2fd472e..d855a16 100644
--- a/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java
+++ b/hotspot/test/runtime/CommandLine/PrintTouchedMethods.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,16 @@
  * @bug 8025692
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @library /testlibrary
+ * @library /test/lib
  * @compile TestLogTouchedMethods.java PrintTouchedMethods.java
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+LogTouchedMethods PrintTouchedMethods
  */
 
 import java.io.File;
 import java.util.List;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class PrintTouchedMethods {
 
diff --git a/hotspot/test/runtime/CommandLine/TestHexArguments.java b/hotspot/test/runtime/CommandLine/TestHexArguments.java
index 43f63c8..9b22fdd 100644
--- a/hotspot/test/runtime/CommandLine/TestHexArguments.java
+++ b/hotspot/test/runtime/CommandLine/TestHexArguments.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,14 @@
  * @bug 8042885
  * @summary Make sure there is no error using hexadecimal format in vm options
  * @author Yumin Qi
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestHexArguments {
     public static void main(String args[]) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java b/hotspot/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java
index 3566e59..dfca97c 100644
--- a/hotspot/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java
+++ b/hotspot/test/runtime/CommandLine/TestLongUnrecognizedVMOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,14 @@
  * @test
  * @bug 8129786
  * @summary Verify that JVM correctly processes very long unrecognized VM option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management
  * @run main TestLongUnrecognizedVMOption
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestLongUnrecognizedVMOption {
 
diff --git a/hotspot/test/runtime/CommandLine/TestNullTerminatedFlags.java b/hotspot/test/runtime/CommandLine/TestNullTerminatedFlags.java
index f40f941..c6df7bb 100644
--- a/hotspot/test/runtime/CommandLine/TestNullTerminatedFlags.java
+++ b/hotspot/test/runtime/CommandLine/TestNullTerminatedFlags.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,13 +21,14 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test TestNullTerminatedFlags
  * @bug 6522873
  * @summary Test that the VM don't allow random junk characters at the end of valid command line flags.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestNullTerminatedFlags
diff --git a/hotspot/test/runtime/CommandLine/TestVMOptions.java b/hotspot/test/runtime/CommandLine/TestVMOptions.java
index f16e744..5fd7d88 100644
--- a/hotspot/test/runtime/CommandLine/TestVMOptions.java
+++ b/hotspot/test/runtime/CommandLine/TestVMOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,14 @@
  * @test
  * @bug 8060256
  * @summary Test various command line options
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main TestVMOptions
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 
 public class TestVMOptions {
diff --git a/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java b/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java
index bdffccb..c9d348a 100644
--- a/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java
+++ b/hotspot/test/runtime/CommandLine/TraceExceptionsTest.java
@@ -25,12 +25,13 @@
  * @test
  * @bug 8048933
  * @summary TraceExceptions output should have the exception message - useful for ClassNotFoundExceptions especially
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TraceExceptionsTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/UnrecognizedVMOption.java b/hotspot/test/runtime/CommandLine/UnrecognizedVMOption.java
index 62477aa..5f30d75 100644
--- a/hotspot/test/runtime/CommandLine/UnrecognizedVMOption.java
+++ b/hotspot/test/runtime/CommandLine/UnrecognizedVMOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8006298
  * @summary Using an unrecognized VM option should print the name of the option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class UnrecognizedVMOption {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/VMAliasOptions.java b/hotspot/test/runtime/CommandLine/VMAliasOptions.java
index ee516b9..eae3747 100644
--- a/hotspot/test/runtime/CommandLine/VMAliasOptions.java
+++ b/hotspot/test/runtime/CommandLine/VMAliasOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,8 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.*;
 
 /*
@@ -29,7 +30,7 @@
  * @bug 8061611
  * @summary Test that various alias options correctly set the target options. See aliased_jvm_flags in arguments.cpp.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 public class VMAliasOptions {
 
diff --git a/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java
index 5ea7653..06f7356 100644
--- a/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java
+++ b/hotspot/test/runtime/CommandLine/VMDeprecatedOptions.java
@@ -21,7 +21,8 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.*;
 
 /*
@@ -29,7 +30,7 @@
  * @bug 8066821
  * @summary Test that various options are deprecated. See deprecated_jvm_flags in arguments.cpp.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 public class VMDeprecatedOptions {
 
diff --git a/hotspot/test/runtime/CommandLine/VMOptionWarning.java b/hotspot/test/runtime/CommandLine/VMOptionWarning.java
index 08d762d..c9c6f21 100644
--- a/hotspot/test/runtime/CommandLine/VMOptionWarning.java
+++ b/hotspot/test/runtime/CommandLine/VMOptionWarning.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,14 @@
  * @test
  * @bug 8027314
  * @summary Warn if diagnostic or experimental vm option is used and -XX:+UnlockDiagnosticVMOptions or -XX:+UnlockExperimentalVMOptions, respectively, isn't specified. Warn if develop or notproduct vm option is used with product version of VM.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class VMOptionWarning {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java b/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java
index 0049548..865fb9b 100644
--- a/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java
+++ b/hotspot/test/runtime/CommandLine/VMOptionsFile/TestVMOptionsFile.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8061999 8135195 8136552
  * @summary Test "-XX:VMOptionsFile" VM option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules jdk.management
  * @run main TestVMOptionsFile
@@ -52,8 +52,8 @@
 import java.util.Set;
 import jdk.test.lib.Asserts;
 import jdk.test.lib.DynamicVMOption;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestVMOptionsFile {
 
diff --git a/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java b/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java
index ea0dbc2..6108400 100644
--- a/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java
+++ b/hotspot/test/runtime/CompressedOops/CompressedClassPointers.java
@@ -25,12 +25,14 @@
  * @test
  * @bug 8024927
  * @summary Testing address of compressed class pointer space as best as possible.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CompressedClassPointers {
 
diff --git a/hotspot/test/runtime/CompressedOops/CompressedClassSpaceSize.java b/hotspot/test/runtime/CompressedOops/CompressedClassSpaceSize.java
index d536720..b1d9f8b 100644
--- a/hotspot/test/runtime/CompressedOops/CompressedClassSpaceSize.java
+++ b/hotspot/test/runtime/CompressedOops/CompressedClassSpaceSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,14 @@
  * @test
  * @bug 8022865
  * @summary Tests for the -XX:CompressedClassSpaceSize command line option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main CompressedClassSpaceSize
  */
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CompressedClassSpaceSize {
 
diff --git a/hotspot/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java b/hotspot/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java
index 2ff8b27..2d2b08d 100644
--- a/hotspot/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java
+++ b/hotspot/test/runtime/CompressedOops/CompressedKlassPointerAndOops.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,12 +26,14 @@
  * @bug 8000968
  * @key regression
  * @summary NPG: UseCompressedClassPointers asserts with ObjectAlignmentInBytes=32
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CompressedKlassPointerAndOops {
 
diff --git a/hotspot/test/runtime/CompressedOops/ObjectAlignment.java b/hotspot/test/runtime/CompressedOops/ObjectAlignment.java
index 00cc071..90e0564 100644
--- a/hotspot/test/runtime/CompressedOops/ObjectAlignment.java
+++ b/hotspot/test/runtime/CompressedOops/ObjectAlignment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,15 @@
  * @test
  * @bug 8022865
  * @summary Tests for the -XX:ObjectAlignmentInBytes command line option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main ObjectAlignment
  */
-import jdk.test.lib.*;
+
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ObjectAlignment {
 
diff --git a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java
index 7c43cda..4753dc6 100644
--- a/hotspot/test/runtime/CompressedOops/UseCompressedOops.java
+++ b/hotspot/test/runtime/CompressedOops/UseCompressedOops.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8022865
  * @summary Tests for different combination of UseCompressedOops options
- * @library /testlibrary
+ * @library /test/lib
  * @ignore 8079353
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -33,7 +33,9 @@
  */
 import java.util.ArrayList;
 import java.util.Collections;
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class UseCompressedOops {
 
diff --git a/hotspot/test/runtime/ConstantPool/BadMethodHandles.java b/hotspot/test/runtime/ConstantPool/BadMethodHandles.java
index 6345166..f0eb9b1 100644
--- a/hotspot/test/runtime/ConstantPool/BadMethodHandles.java
+++ b/hotspot/test/runtime/ConstantPool/BadMethodHandles.java
@@ -25,7 +25,6 @@
  * @test
  * @bug 8087223
  * @summary Adding constantTag to keep method call consistent with it.
- * @library /testlibrary
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
diff --git a/hotspot/test/runtime/ConstantPool/IntfMethod.java b/hotspot/test/runtime/ConstantPool/IntfMethod.java
index 9602ff5..f0a1dac 100644
--- a/hotspot/test/runtime/ConstantPool/IntfMethod.java
+++ b/hotspot/test/runtime/ConstantPool/IntfMethod.java
@@ -25,7 +25,6 @@
  * @test
  * $bug 8087223
  * @summary Adding constantTag to keep method call consistent with it.
- * @library /testlibrary
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
diff --git a/hotspot/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java b/hotspot/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java
index ccd0bd4..b5d5891 100644
--- a/hotspot/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java
+++ b/hotspot/test/runtime/EnclosingMethodAttr/EnclMethodAttr.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8044738
- * @library /testlibrary
+ * @library /test/lib
  * @summary Check attribute_length of EnclosingMethod attribute
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -32,7 +32,8 @@
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class EnclMethodAttr {
 
diff --git a/hotspot/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java b/hotspot/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java
index e4f0f94..b6a7d13 100644
--- a/hotspot/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java
+++ b/hotspot/test/runtime/ErrorHandling/CreateCoredumpOnCrash.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,16 +23,18 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
  * @run driver CreateCoredumpOnCrash
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 
 public class CreateCoredumpOnCrash {
diff --git a/hotspot/test/runtime/ErrorHandling/ErrorHandler.java b/hotspot/test/runtime/ErrorHandling/ErrorHandler.java
index ba5cdbc..26882f5 100644
--- a/hotspot/test/runtime/ErrorHandling/ErrorHandler.java
+++ b/hotspot/test/runtime/ErrorHandling/ErrorHandler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,11 +28,13 @@
  * @summary Exercise HotSpot error handling code by invoking java with
  *          -XX:ErrorHandlerTest option to cause an error report. Check the results.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run driver ErrorHandler
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ErrorHandler {
 
diff --git a/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java b/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java
index 3ee548d..768ffae 100644
--- a/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java
+++ b/hotspot/test/runtime/ErrorHandling/ProblematicFrameTest.java
@@ -25,19 +25,19 @@
  * @test
  * @bug 8050167
  * @summary Test that error is not occurred during printing problematic frame
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
  * @run driver ProblematicFrameTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Utils;
 
 import jdk.internal.misc.Unsafe;
-import jdk.test.lib.Utils;
 
 public class ProblematicFrameTest {
     private static class Crasher {
diff --git a/hotspot/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java b/hotspot/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java
index c34e56a..3cfd801 100644
--- a/hotspot/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java
+++ b/hotspot/test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,16 +27,16 @@
 import java.io.InputStreamReader;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 /*
  * @test
  * @bug 8074552
  * @summary SafeFetch32 and SafeFetchN do not work in error handling
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @author Thomas Stuefe (SAP)
  */
 
diff --git a/hotspot/test/runtime/ErrorHandling/SecondaryErrorTest.java b/hotspot/test/runtime/ErrorHandling/SecondaryErrorTest.java
index d82274a..65e1b72 100644
--- a/hotspot/test/runtime/ErrorHandling/SecondaryErrorTest.java
+++ b/hotspot/test/runtime/ErrorHandling/SecondaryErrorTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8065896
  * @summary Synchronous signals during error reporting may terminate or hang VM process
- * @library /testlibrary
+ * @library /test/lib
  * @author Thomas Stuefe (SAP)
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -38,9 +38,9 @@
 import java.io.InputStreamReader;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class SecondaryErrorTest {
 
diff --git a/hotspot/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java b/hotspot/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java
index d658401..38d50e4 100644
--- a/hotspot/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java
+++ b/hotspot/test/runtime/ErrorHandling/TestCrashOnOutOfMemoryError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,13 @@
  * @test TestCrashOnOutOfMemoryError
  * @summary Test using -XX:+CrashOnOutOfMemoryError
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @run driver TestCrashOnOutOfMemoryError
  * @bug 8138745
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
diff --git a/hotspot/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java b/hotspot/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java
index 79d064f..34faa87 100644
--- a/hotspot/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java
+++ b/hotspot/test/runtime/ErrorHandling/TestExitOnOutOfMemoryError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,13 @@
  * @test TestExitOnOutOfMemoryError
  * @summary Test using -XX:ExitOnOutOfMemoryError
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @run driver TestExitOnOutOfMemoryError
  * @bug 8138745
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestExitOnOutOfMemoryError {
 
diff --git a/hotspot/test/runtime/ErrorHandling/TestOnError.java b/hotspot/test/runtime/ErrorHandling/TestOnError.java
index 4fa5c44..e1dcf38 100644
--- a/hotspot/test/runtime/ErrorHandling/TestOnError.java
+++ b/hotspot/test/runtime/ErrorHandling/TestOnError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,14 @@
  * @test TestOnError
  * @summary Test using -XX:OnError=<cmd>
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build TestOnError
+ * @library /test/lib
  * @run main TestOnError
  * @bug 8078470
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class TestOnError {
 
diff --git a/hotspot/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java b/hotspot/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java
index c81cab5..a2302e2 100644
--- a/hotspot/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java
+++ b/hotspot/test/runtime/ErrorHandling/TestOnOutOfMemoryError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,13 @@
  * @test TestOnOutOfMemoryError
  * @summary Test using -XX:OnOutOfMemoryError=<cmd>
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build TestOnOutOfMemoryError
+ * @library /test/lib
  * @run main TestOnOutOfMemoryError
  * @bug 8078470
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestOnOutOfMemoryError {
 
diff --git a/hotspot/test/runtime/Final/TestPutMain.java b/hotspot/test/runtime/Final/TestPutMain.java
index 601a6db..bfdfdda 100644
--- a/hotspot/test/runtime/Final/TestPutMain.java
+++ b/hotspot/test/runtime/Final/TestPutMain.java
@@ -26,7 +26,7 @@
  * @test
  * @bug 8160527
  * @summary The VM does not always perform checks added by 8157181 when updating final instance fields
- * @library /testlibrary
+ * @library /test/lib
  * @compile TestPutField.jasm
  * @compile TestPutStatic.jasm
  * @compile TestPutMain.java
diff --git a/hotspot/test/runtime/LoadClass/LoadClassNegative.java b/hotspot/test/runtime/LoadClass/LoadClassNegative.java
index 08bd4da..8282f6a 100644
--- a/hotspot/test/runtime/LoadClass/LoadClassNegative.java
+++ b/hotspot/test/runtime/LoadClass/LoadClassNegative.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,16 +26,16 @@
  * @key regression
  * @bug 8020675
  * @summary make sure there is no fatal error if a class is loaded from an invalid jar file which is in the bootclasspath
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @build TestForName
- * @build LoadClassNegative
  * @run main LoadClassNegative
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class LoadClassNegative {
 
diff --git a/hotspot/test/runtime/LocalVariableTable/TestLVT.java b/hotspot/test/runtime/LocalVariableTable/TestLVT.java
index 42ad0b7..7c1ff98 100644
--- a/hotspot/test/runtime/LocalVariableTable/TestLVT.java
+++ b/hotspot/test/runtime/LocalVariableTable/TestLVT.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,15 @@
  * @test
  * @bug 8049632
  * @summary Test ClassFileParser::copy_localvariable_table cases
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @compile -g -XDignore.symbol.file TestLVT.java
  * @run main TestLVT
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.*;
 
 public class TestLVT {
diff --git a/hotspot/test/runtime/Metaspace/FragmentMetaspace.java b/hotspot/test/runtime/Metaspace/FragmentMetaspace.java
index acd64cd..47282a4 100644
--- a/hotspot/test/runtime/Metaspace/FragmentMetaspace.java
+++ b/hotspot/test/runtime/Metaspace/FragmentMetaspace.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
  * @library /runtime/testlibrary
  * @modules java.base/jdk.internal.misc
  * @modules java.compiler
- * @build GeneratedClassLoader
  * @run main/othervm/timeout=200 -Xmx300m FragmentMetaspace
  */
 
diff --git a/hotspot/test/runtime/MinimalVM/CDS.java b/hotspot/test/runtime/MinimalVM/CDS.java
new file mode 100644
index 0000000..e166d96
--- /dev/null
+++ b/hotspot/test/runtime/MinimalVM/CDS.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @run driver CDS
+ */
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class CDS {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb;
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Xshare:dump");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Shared spaces are not supported in this VM")
+                .shouldHaveExitValue(1);
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Xshare:on");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Shared spaces are not supported in this VM")
+                .shouldHaveExitValue(1);
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Xshare:auto", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Shared spaces are not supported in this VM")
+                .shouldHaveExitValue(0);
+    }
+}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java b/hotspot/test/runtime/MinimalVM/CheckJNI.java
similarity index 60%
copy from hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
copy to hotspot/test/runtime/MinimalVM/CheckJNI.java
index 8737e56..1421965 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
+++ b/hotspot/test/runtime/MinimalVM/CheckJNI.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,23 @@
  * questions.
  */
 
-package jdk.test.lib.dcmd;
-
-/**
- * CommandExecutorException encapsulates exceptions thrown (on the "calling side") from the execution of Diagnostic
- * Commands
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @run driver CheckJNI
  */
-public class CommandExecutorException extends RuntimeException {
-    private static final long serialVersionUID = -7039597746579144280L;
 
-    public CommandExecutorException(String message, Throwable e) {
-        super(message, e);
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class CheckJNI {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Xcheck:jni", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Minimal VM warning: JNI CHECKING is not supported in this VM")
+                .shouldHaveExitValue(0);
     }
 }
diff --git a/hotspot/test/runtime/MinimalVM/Instrumentation.java b/hotspot/test/runtime/MinimalVM/Instrumentation.java
new file mode 100644
index 0000000..c5c56ce
--- /dev/null
+++ b/hotspot/test/runtime/MinimalVM/Instrumentation.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @library /test/lib
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ *          java.instrument
+ * @run driver Instrumentation
+ */
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class Instrumentation {
+
+    public static void main(String[] args) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                "-minimal", "-javaagent:redefineagent.jar", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Instrumentation agents are not supported in this VM")
+                .shouldHaveExitValue(1);
+    }
+}
diff --git a/hotspot/test/runtime/MinimalVM/JMX.java b/hotspot/test/runtime/MinimalVM/JMX.java
new file mode 100644
index 0000000..e57325e
--- /dev/null
+++ b/hotspot/test/runtime/MinimalVM/JMX.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @library /test/lib
+ * @run main/othervm JMX
+ */
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class JMX {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb;
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-XX:+ManagementServer", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("ManagementServer is not supported in this VM.")
+                .shouldHaveExitValue(1);
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Dcom.sun.management ", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("-Dcom.sun.management is not supported in this VM.")
+                .shouldHaveExitValue(1);
+
+        pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), Long.toString(ProcessTools.getProcessId()), "VM.print_threads"});
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Could not find any processes matching ")
+                .shouldHaveExitValue(1);
+    }
+}
diff --git a/hotspot/test/runtime/MinimalVM/JVMTI.java b/hotspot/test/runtime/MinimalVM/JVMTI.java
new file mode 100644
index 0000000..ef3f481
--- /dev/null
+++ b/hotspot/test/runtime/MinimalVM/JVMTI.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @run driver JVMTI
+ */
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class JVMTI {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
+                "-minimal",
+                "-agentlib:jdwp=server=y,transport=dt_socket,address=5000,suspend=n",
+                "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Debugging agents are not supported in this VM")
+                .shouldHaveExitValue(1);
+
+    }
+}
diff --git a/hotspot/test/runtime/MinimalVM/NMT.java b/hotspot/test/runtime/MinimalVM/NMT.java
new file mode 100644
index 0000000..815fa6d
--- /dev/null
+++ b/hotspot/test/runtime/MinimalVM/NMT.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @run driver NMT
+ */
+
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class NMT {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb;
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-XX:NativeMemoryTracking=detail", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Native Memory Tracking is not supported in this VM")
+                .shouldHaveExitValue(1);
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-XX:NativeMemoryTracking=summary", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Native Memory Tracking is not supported in this VM")
+                .shouldHaveExitValue(1);
+
+        pb = ProcessTools.createJavaProcessBuilder("-minimal", "-XX:NativeMemoryTracking=off", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Native Memory Tracking is not supported in this VM")
+                .shouldHaveExitValue(1);
+
+
+    }
+}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java b/hotspot/test/runtime/MinimalVM/Xprof.java
similarity index 61%
copy from hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
copy to hotspot/test/runtime/MinimalVM/Xprof.java
index 8737e56..dd3e337 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
+++ b/hotspot/test/runtime/MinimalVM/Xprof.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,24 @@
  * questions.
  */
 
-package jdk.test.lib.dcmd;
-
-/**
- * CommandExecutorException encapsulates exceptions thrown (on the "calling side") from the execution of Diagnostic
- * Commands
+/*
+ * @test
+ * @requires vm.flavor == "minimal"
+ * @modules java.base/jdk.internal.misc
+ * @library /test/lib
+ * @run driver Xprof
  */
-public class CommandExecutorException extends RuntimeException {
-    private static final long serialVersionUID = -7039597746579144280L;
 
-    public CommandExecutorException(String message, Throwable e) {
-        super(message, e);
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
+public class Xprof {
+
+    public static void main(String args[]) throws Exception {
+        ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-minimal", "-Xprof", "-version");
+        new OutputAnalyzer(pb.start())
+                .shouldContain("Flat profiling is not supported in this VM.")
+                .shouldHaveExitValue(1);
+
     }
 }
diff --git a/hotspot/test/runtime/NMT/AutoshutdownNMT.java b/hotspot/test/runtime/NMT/AutoshutdownNMT.java
index 90a02ff..d07103e 100644
--- a/hotspot/test/runtime/NMT/AutoshutdownNMT.java
+++ b/hotspot/test/runtime/NMT/AutoshutdownNMT.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Test for deprecated message if -XX:-AutoShutdownNMT is specified
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class AutoshutdownNMT {
 
diff --git a/hotspot/test/runtime/NMT/BaselineWithParameter.java b/hotspot/test/runtime/NMT/BaselineWithParameter.java
index b498211..cc7db56 100644
--- a/hotspot/test/runtime/NMT/BaselineWithParameter.java
+++ b/hotspot/test/runtime/NMT/BaselineWithParameter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,13 +26,15 @@
  * @bug 8004802
  * @key nmt jcmd regression
  * @summary Regression test for invoking a jcmd with baseline=false, result was that the target VM crashed
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=detail BaselineWithParameter
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class BaselineWithParameter {
 
diff --git a/hotspot/test/runtime/NMT/ChangeTrackingLevel.java b/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
index e790548..f10493a 100644
--- a/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
+++ b/hotspot/test/runtime/NMT/ChangeTrackingLevel.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,14 +27,13 @@
  * @summary Test that you can decrease NMT tracking level but not increase it.
  * @key nmt
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build ChangeTrackingLevel
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ChangeTrackingLevel
  */
 
-import jdk.test.lib.*;
 import sun.hotspot.WhiteBox;
 
 public class ChangeTrackingLevel {
diff --git a/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java b/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java
index 7936a9b..c053f66 100644
--- a/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java
+++ b/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java
@@ -25,12 +25,14 @@
  * @test
  * @key nmt
  * @summary Running with NMT detail should produce expected stack traces.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
diff --git a/hotspot/test/runtime/NMT/CommandLineDetail.java b/hotspot/test/runtime/NMT/CommandLineDetail.java
index 70d914a..9999ed6 100644
--- a/hotspot/test/runtime/NMT/CommandLineDetail.java
+++ b/hotspot/test/runtime/NMT/CommandLineDetail.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Running with NMT detail should not result in an error
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CommandLineDetail {
 
diff --git a/hotspot/test/runtime/NMT/CommandLineEmptyArgument.java b/hotspot/test/runtime/NMT/CommandLineEmptyArgument.java
index 510c002..d4cb23f 100644
--- a/hotspot/test/runtime/NMT/CommandLineEmptyArgument.java
+++ b/hotspot/test/runtime/NMT/CommandLineEmptyArgument.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Empty argument to NMT should result in an informative error message
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CommandLineEmptyArgument {
 
diff --git a/hotspot/test/runtime/NMT/CommandLineInvalidArgument.java b/hotspot/test/runtime/NMT/CommandLineInvalidArgument.java
index 985e8e4..53e751b 100644
--- a/hotspot/test/runtime/NMT/CommandLineInvalidArgument.java
+++ b/hotspot/test/runtime/NMT/CommandLineInvalidArgument.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Invalid argument to NMT should result in an informative error message
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CommandLineInvalidArgument {
 
diff --git a/hotspot/test/runtime/NMT/CommandLineSummary.java b/hotspot/test/runtime/NMT/CommandLineSummary.java
index 6719839..7017a3b 100644
--- a/hotspot/test/runtime/NMT/CommandLineSummary.java
+++ b/hotspot/test/runtime/NMT/CommandLineSummary.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Running with NMT summary should not result in an error
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CommandLineSummary {
 
diff --git a/hotspot/test/runtime/NMT/CommandLineTurnOffNMT.java b/hotspot/test/runtime/NMT/CommandLineTurnOffNMT.java
index 3389308..46b219c 100644
--- a/hotspot/test/runtime/NMT/CommandLineTurnOffNMT.java
+++ b/hotspot/test/runtime/NMT/CommandLineTurnOffNMT.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Turning off NMT should not result in an error
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CommandLineTurnOffNMT {
 
diff --git a/hotspot/test/runtime/NMT/CommitOverlappingRegions.java b/hotspot/test/runtime/NMT/CommitOverlappingRegions.java
index 773378c..8e1b6dd 100644
--- a/hotspot/test/runtime/NMT/CommitOverlappingRegions.java
+++ b/hotspot/test/runtime/NMT/CommitOverlappingRegions.java
@@ -25,16 +25,18 @@
  * @test
  * @summary Test commits of overlapping regions of memory.
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build   CommitOverlappingRegions
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail CommitOverlappingRegions
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import sun.hotspot.WhiteBox;
 
 public class CommitOverlappingRegions {
diff --git a/hotspot/test/runtime/NMT/JcmdBaselineDetail.java b/hotspot/test/runtime/NMT/JcmdBaselineDetail.java
index 1318dc3..91b033c 100644
--- a/hotspot/test/runtime/NMT/JcmdBaselineDetail.java
+++ b/hotspot/test/runtime/NMT/JcmdBaselineDetail.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Verify that jcmd correctly reports that baseline succeeds with NMT enabled with detailed tracking.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=detail JcmdBaselineDetail
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class JcmdBaselineDetail {
 
diff --git a/hotspot/test/runtime/NMT/JcmdDetailDiff.java b/hotspot/test/runtime/NMT/JcmdDetailDiff.java
index 962afd1..d149a83 100644
--- a/hotspot/test/runtime/NMT/JcmdDetailDiff.java
+++ b/hotspot/test/runtime/NMT/JcmdDetailDiff.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
  * @test
  * @summary run NMT baseline, allocate memory and verify output from detail.diff
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build JcmdDetailDiff
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail JcmdDetailDiff
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/JcmdScale.java b/hotspot/test/runtime/NMT/JcmdScale.java
index b8d8e56..c155a08e 100644
--- a/hotspot/test/runtime/NMT/JcmdScale.java
+++ b/hotspot/test/runtime/NMT/JcmdScale.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Test the NMT scale parameter
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=summary JcmdScale
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class JcmdScale {
 
diff --git a/hotspot/test/runtime/NMT/JcmdScaleDetail.java b/hotspot/test/runtime/NMT/JcmdScaleDetail.java
index 27cb8c8..77f44b2 100644
--- a/hotspot/test/runtime/NMT/JcmdScaleDetail.java
+++ b/hotspot/test/runtime/NMT/JcmdScaleDetail.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Test the NMT scale parameter with detail tracking level
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=detail JcmdScaleDetail
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class JcmdScaleDetail {
 
diff --git a/hotspot/test/runtime/NMT/JcmdSummaryDiff.java b/hotspot/test/runtime/NMT/JcmdSummaryDiff.java
index 2c0b39c..005f14d 100644
--- a/hotspot/test/runtime/NMT/JcmdSummaryDiff.java
+++ b/hotspot/test/runtime/NMT/JcmdSummaryDiff.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,15 +25,17 @@
  * @test
  * @summary run NMT baseline, allocate memory and verify output from summary.diff
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build JcmdSummaryDiff
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary JcmdSummaryDiff
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/JcmdWithNMTDisabled.java b/hotspot/test/runtime/NMT/JcmdWithNMTDisabled.java
index 4081865..8df6da8 100644
--- a/hotspot/test/runtime/NMT/JcmdWithNMTDisabled.java
+++ b/hotspot/test/runtime/NMT/JcmdWithNMTDisabled.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Verify that jcmd correctly reports that NMT is not enabled
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main JcmdWithNMTDisabled 1
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class JcmdWithNMTDisabled {
   static ProcessBuilder pb = new ProcessBuilder();
diff --git a/hotspot/test/runtime/NMT/MallocRoundingReportTest.java b/hotspot/test/runtime/NMT/MallocRoundingReportTest.java
index b5ff6dd..0dbb96f 100644
--- a/hotspot/test/runtime/NMT/MallocRoundingReportTest.java
+++ b/hotspot/test/runtime/NMT/MallocRoundingReportTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @summary Test consistency of NMT by creating allocations of the Test type with various sizes and verifying visibility with jcmd
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build MallocRoundingReportTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocRoundingReportTest
  *
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/MallocSiteHashOverflow.java b/hotspot/test/runtime/NMT/MallocSiteHashOverflow.java
index 3bb39aa..804c7b2 100644
--- a/hotspot/test/runtime/NMT/MallocSiteHashOverflow.java
+++ b/hotspot/test/runtime/NMT/MallocSiteHashOverflow.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,15 @@
  * @requires sun.arch.data.model == "32"
  * @key nmt jcmd stress
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build MallocSiteHashOverflow
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocSiteHashOverflow
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 public class MallocSiteHashOverflow {
diff --git a/hotspot/test/runtime/NMT/MallocStressTest.java b/hotspot/test/runtime/NMT/MallocStressTest.java
index 8d7061f..b63166c 100644
--- a/hotspot/test/runtime/NMT/MallocStressTest.java
+++ b/hotspot/test/runtime/NMT/MallocStressTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,10 @@
  * @test
  * @summary Stress test for malloc tracking
  * @key nmt jcmd stress
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build MallocStressTest
+ * @build sun.hotspot.WhiteBox
  * @ignore - This test is disabled since it will stress NMT and timeout during normal testing
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocStressTest
@@ -38,7 +38,10 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 public class MallocStressTest {
diff --git a/hotspot/test/runtime/NMT/MallocTestType.java b/hotspot/test/runtime/NMT/MallocTestType.java
index 3ee5e48..624ec8d 100644
--- a/hotspot/test/runtime/NMT/MallocTestType.java
+++ b/hotspot/test/runtime/NMT/MallocTestType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @summary Test consistency of NMT by leaking a few select allocations of the Test type and then verify visibility with jcmd
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build MallocTestType
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocTestType
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import sun.hotspot.WhiteBox;
 
 public class MallocTestType {
diff --git a/hotspot/test/runtime/NMT/MallocTrackingVerify.java b/hotspot/test/runtime/NMT/MallocTrackingVerify.java
index 0a77bd2..d7ffdd2 100644
--- a/hotspot/test/runtime/NMT/MallocTrackingVerify.java
+++ b/hotspot/test/runtime/NMT/MallocTrackingVerify.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,10 @@
  * @bug 8054836
  * @summary Test to verify correctness of malloc tracking
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build MallocTrackingVerify
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocTrackingVerify
  *
@@ -38,7 +38,9 @@
 import java.util.ArrayList;
 import java.util.Random;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/NMTWithCDS.java b/hotspot/test/runtime/NMT/NMTWithCDS.java
index a4a409a..2df2351 100644
--- a/hotspot/test/runtime/NMT/NMTWithCDS.java
+++ b/hotspot/test/runtime/NMT/NMTWithCDS.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8055061
  * @key nmt
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main NMTWithCDS
  */
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class NMTWithCDS {
 
diff --git a/hotspot/test/runtime/NMT/PrintNMTStatistics.java b/hotspot/test/runtime/NMT/PrintNMTStatistics.java
index 11138ec..93dfd57 100644
--- a/hotspot/test/runtime/NMT/PrintNMTStatistics.java
+++ b/hotspot/test/runtime/NMT/PrintNMTStatistics.java
@@ -27,10 +27,11 @@
  * @bug 8005936 8058606
  * @summary Verify PrintNMTStatistics on normal JVM exit for detail and summary tracking level
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class PrintNMTStatistics {
 
diff --git a/hotspot/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java b/hotspot/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java
index 311d834..727085c 100644
--- a/hotspot/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java
+++ b/hotspot/test/runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @key nmt
  * @summary Trying to enable PrintNMTStatistics should result in a warning
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class PrintNMTStatisticsWithNMTDisabled {
 
diff --git a/hotspot/test/runtime/NMT/ReleaseCommittedMemory.java b/hotspot/test/runtime/NMT/ReleaseCommittedMemory.java
index c67b622..6893c2e 100644
--- a/hotspot/test/runtime/NMT/ReleaseCommittedMemory.java
+++ b/hotspot/test/runtime/NMT/ReleaseCommittedMemory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,8 +27,8 @@
  * @summary Release committed memory and make sure NMT handles it correctly
  * @key nmt regression
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build ReleaseCommittedMemory
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ReleaseCommittedMemory
diff --git a/hotspot/test/runtime/NMT/ReleaseNoCommit.java b/hotspot/test/runtime/NMT/ReleaseNoCommit.java
index 0d35411..b5e61e1 100644
--- a/hotspot/test/runtime/NMT/ReleaseNoCommit.java
+++ b/hotspot/test/runtime/NMT/ReleaseNoCommit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,17 +25,17 @@
  * @test
  * @summary Release uncommitted memory and make sure NMT handles it correctly
  * @key nmt regression
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build ReleaseNoCommit
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary ReleaseNoCommit
  */
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/ShutdownTwice.java b/hotspot/test/runtime/NMT/ShutdownTwice.java
index d0a7c77..fe31245 100644
--- a/hotspot/test/runtime/NMT/ShutdownTwice.java
+++ b/hotspot/test/runtime/NMT/ShutdownTwice.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Run shutdown twice
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=detail ShutdownTwice
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class ShutdownTwice {
 
diff --git a/hotspot/test/runtime/NMT/SummaryAfterShutdown.java b/hotspot/test/runtime/NMT/SummaryAfterShutdown.java
index aec1a80..42d57da 100644
--- a/hotspot/test/runtime/NMT/SummaryAfterShutdown.java
+++ b/hotspot/test/runtime/NMT/SummaryAfterShutdown.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @key nmt jcmd
  * @summary Verify that jcmd correctly reports that NMT is not enabled after a shutdown
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:NativeMemoryTracking=detail SummaryAfterShutdown
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class SummaryAfterShutdown {
 
diff --git a/hotspot/test/runtime/NMT/SummarySanityCheck.java b/hotspot/test/runtime/NMT/SummarySanityCheck.java
index 511596b..174d710 100644
--- a/hotspot/test/runtime/NMT/SummarySanityCheck.java
+++ b/hotspot/test/runtime/NMT/SummarySanityCheck.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @key nmt jcmd
  * @summary Sanity check the output of NMT
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build SummarySanityCheck
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+WhiteBoxAPI SummarySanityCheck
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
diff --git a/hotspot/test/runtime/NMT/ThreadedMallocTestType.java b/hotspot/test/runtime/NMT/ThreadedMallocTestType.java
index 2fee0c7..7605020 100644
--- a/hotspot/test/runtime/NMT/ThreadedMallocTestType.java
+++ b/hotspot/test/runtime/NMT/ThreadedMallocTestType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,18 @@
 /*
  * @test
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build ThreadedMallocTestType
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ThreadedMallocTestType
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import sun.hotspot.WhiteBox;
 
 public class ThreadedMallocTestType {
diff --git a/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java b/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java
index 1611b6f..5513cdd 100644
--- a/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java
+++ b/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,18 @@
 /*
  * @test
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build ThreadedVirtualAllocTestType
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ThreadedVirtualAllocTestType
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import sun.hotspot.WhiteBox;
 
 public class ThreadedVirtualAllocTestType {
diff --git a/hotspot/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java b/hotspot/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java
index dabdcd4..f1cc442 100644
--- a/hotspot/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java
+++ b/hotspot/test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @summary Test reserve/commit/uncommit/release of virtual memory and that we track it correctly
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build VirtualAllocCommitUncommitRecommit
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail VirtualAllocCommitUncommitRecommit
  *
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/NMT/VirtualAllocTestType.java b/hotspot/test/runtime/NMT/VirtualAllocTestType.java
index da611ab..31722d3 100644
--- a/hotspot/test/runtime/NMT/VirtualAllocTestType.java
+++ b/hotspot/test/runtime/NMT/VirtualAllocTestType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @summary Test Reserve/Commit/Uncommit/Release of virtual memory and that we track it correctly
  * @key nmt jcmd
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build VirtualAllocTestType
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail VirtualAllocTestType
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import sun.hotspot.WhiteBox;
 
 public class VirtualAllocTestType {
diff --git a/hotspot/test/runtime/PerfMemDestroy/PerfMemDestroy.java b/hotspot/test/runtime/PerfMemDestroy/PerfMemDestroy.java
index 512dbc9..e136be8 100644
--- a/hotspot/test/runtime/PerfMemDestroy/PerfMemDestroy.java
+++ b/hotspot/test/runtime/PerfMemDestroy/PerfMemDestroy.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 8030955
  * @summary Allow multiple calls to PerfMemory::destroy() without asserting.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main PerfMemDestroy
@@ -33,7 +33,8 @@
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class PerfMemDestroy {
     public static void main(String args[]) throws Throwable {
diff --git a/hotspot/test/runtime/RedefineObject/TestRedefineObject.java b/hotspot/test/runtime/RedefineObject/TestRedefineObject.java
index 9ebee64..1b50e0e 100644
--- a/hotspot/test/runtime/RedefineObject/TestRedefineObject.java
+++ b/hotspot/test/runtime/RedefineObject/TestRedefineObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,10 @@
  * questions.
  */
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * Test to redefine java/lang/Object and verify that it doesn't crash on vtable
@@ -32,14 +35,14 @@
  * @test
  * @bug 8005056
  * @bug 8009728
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.instrument
  *          java.management
  * @build Agent
  * @run main ClassFileInstaller Agent
  * @run main TestRedefineObject
- * @run main/othervm -javaagent:agent.jar -XX:TraceRedefineClasses=5 Agent
+ * @run main/othervm -javaagent:agent.jar -Xlog:redefine+class+load=debug,redefine+class+timer=info Agent
  */
 public class TestRedefineObject {
     public static void main(String[] args) throws Exception  {
diff --git a/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java b/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java
new file mode 100644
index 0000000..700a8f0
--- /dev/null
+++ b/hotspot/test/runtime/RedefineTests/ModifyAnonymous.java
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @library /test/lib
+ * @summary Test that retransforming and redefining anonymous classes gets UnmodifiableClassException
+ * @modules java.base/jdk.internal.misc
+ * @modules java.instrument
+ *          jdk.jartool/sun.tools.jar
+ * @run main ModifyAnonymous buildagent
+ * @run main/othervm -javaagent:redefineagent.jar ModifyAnonymous
+ */
+
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.lang.NoSuchFieldException;
+import java.lang.NoSuchMethodException;
+import java.lang.RuntimeException;
+import java.lang.instrument.ClassDefinition;
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.lang.instrument.Instrumentation;
+import java.security.ProtectionDomain;
+import jdk.test.lib.*;
+
+public class ModifyAnonymous {
+
+    public static class LambdaTransformer implements ClassFileTransformer {
+        @Override
+        public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined,
+                                ProtectionDomain protectionDomain, byte[] classfileBuffer)
+        throws IllegalClassFormatException {
+            return null;
+        }
+    }
+
+    static Instrumentation inst = null;
+    static volatile boolean done = false;
+
+    public static void premain(String args, Instrumentation instrumentation) {
+
+        inst = instrumentation;
+        System.out.println("javaagent in da house!");
+        instrumentation.addTransformer(new LambdaTransformer());
+    }
+
+    private static void buildAgent() {
+        try {
+            ClassFileInstaller.main("ModifyAnonymous");
+        } catch (Exception e) {
+            throw new RuntimeException("Could not write agent classfile", e);
+        }
+
+        try {
+            PrintWriter pw = new PrintWriter("MANIFEST.MF");
+            pw.println("Premain-Class: ModifyAnonymous");
+            pw.println("Agent-Class: ModifyAnonymous");
+            pw.println("Can-Retransform-Classes: true");
+            pw.println("Can-Redefine-Classes: true");
+            pw.close();
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("Could not write manifest file for the agent", e);
+        }
+
+        sun.tools.jar.Main jarTool = new sun.tools.jar.Main(System.out, System.err, "jar");
+        if (!jarTool.run(new String[] { "-cmf", "MANIFEST.MF", "redefineagent.jar", "ModifyAnonymous.class" })) {
+            throw new RuntimeException("Could not write the agent jar file");
+        }
+    }
+
+    public static class InstanceMethodCallSiteApp {
+
+        public static void test() throws InterruptedException {
+            for (int i = 0; i < 2; i++) {
+                InstanceMethodCallSiteApp app = new InstanceMethodCallSiteApp();
+                Runnable r = app::doWork;   // this creates an anonymous class
+                while (!done) {
+                    r.run();
+                    Thread.sleep(10);
+                }
+            }
+        }
+
+        public void doWork() {
+            System.out.print(".");
+        }
+    }
+
+    static void runTest() {
+        while (!done) {
+            Class[] allLoadedClasses = inst.getAllLoadedClasses();
+            for (Class clazz : allLoadedClasses) {
+                final String name = clazz.getName();
+                if (name.contains("$$Lambda$") && name.contains("App")) {
+                    if (inst.isModifiableClass(clazz)) {
+                        throw new RuntimeException ("Class should not be modifiable");
+                    }
+                    // Try to modify them anyway.
+                    try {
+                        System.out.println("retransform called for " + name);
+                        inst.retransformClasses(clazz);
+                    } catch(java.lang.instrument.UnmodifiableClassException t) {
+                        System.out.println("PASSED: expecting UnmodifiableClassException");
+                        t.printStackTrace();
+                    }
+                    try {
+                        System.out.println("redefine called for " + name);
+                        String newclass = "class Dummy {}";
+                        byte[] bytecode = InMemoryJavaCompiler.compile("Dummy", newclass);
+                        ClassDefinition cld = new ClassDefinition(clazz, bytecode);
+                        inst.redefineClasses(new ClassDefinition[] { cld });
+                    } catch(java.lang.instrument.UnmodifiableClassException t) {
+                        System.out.println("PASSED: expecting UnmodifiableClassException");
+                        t.printStackTrace();
+                    } catch(java.lang.ClassNotFoundException e) {
+                        throw new RuntimeException ("ClassNotFoundException thrown");
+                    }
+                    done = true;
+                }
+            }
+        }
+    }
+
+    public static void main(String argv[]) throws InterruptedException, RuntimeException {
+        if (argv.length == 1 && argv[0].equals("buildagent")) {
+            buildAgent();
+            return;
+        }
+
+        if (inst == null) {
+            throw new RuntimeException("Instrumentation object was null");
+        }
+
+        new Thread() {
+            public void run() {
+                runTest();
+            }
+        }.start();
+
+        // Test that NCDFE is not thrown for anonymous class:
+        // ModifyAnonymous$InstanceMethodCallSiteApp$$Lambda$18
+        try {
+            ModifyAnonymous test = new ModifyAnonymous();
+            InstanceMethodCallSiteApp.test();
+        } catch (NoClassDefFoundError e) {
+            throw new RuntimeException("FAILED: NoClassDefFoundError thrown for " + e.getMessage());
+        }
+        System.out.println("PASSED: NoClassDefFound error not thrown");
+    }
+}
diff --git a/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java b/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java
index cfe4c97..cd2cf68 100644
--- a/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java
+++ b/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @summary Test that type annotations are retained after a retransform
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
diff --git a/hotspot/test/runtime/RedefineTests/RedefineFinalizer.java b/hotspot/test/runtime/RedefineTests/RedefineFinalizer.java
index de76aea..bf40e8d 100644
--- a/hotspot/test/runtime/RedefineTests/RedefineFinalizer.java
+++ b/hotspot/test/runtime/RedefineTests/RedefineFinalizer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 6904403
  * @summary Don't assert if we redefine finalize method
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.compiler
  *          java.instrument
  *          jdk.jartool/sun.tools.jar
- * @build RedefineClassHelper
  * @run main RedefineClassHelper
  * @run main/othervm -javaagent:redefineagent.jar RedefineFinalizer
  */
diff --git a/hotspot/test/runtime/RedefineTests/RedefineRunningMethods.java b/hotspot/test/runtime/RedefineTests/RedefineRunningMethods.java
index 9921afb..d1c5545 100644
--- a/hotspot/test/runtime/RedefineTests/RedefineRunningMethods.java
+++ b/hotspot/test/runtime/RedefineTests/RedefineRunningMethods.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,13 @@
  * @test
  * @bug 8055008
  * @summary Redefine EMCP and non-EMCP methods that are running in an infinite loop
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.compiler
  *          java.instrument
  *          jdk.jartool/sun.tools.jar
- * @build RedefineClassHelper
  * @run main RedefineClassHelper
- * @run main/othervm -javaagent:redefineagent.jar -XX:TraceRedefineClasses=0x600 RedefineRunningMethods
+ * @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+iklass+add=trace,redefine+class+iklass+purge=trace RedefineRunningMethods
  */
 public class RedefineRunningMethods {
 
diff --git a/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java b/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java
index 283d08d..f8e1a26 100644
--- a/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java
+++ b/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,11 @@
  * @test
  * @bug 8087315
  * @summary Get old method's stack trace elements after GC
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.compiler
  *          java.instrument
  *          jdk.jartool/sun.tools.jar
- * @build RedefineClassHelper
  * @run main RedefineClassHelper
  * @run main/othervm -javaagent:redefineagent.jar RedefineRunningMethodsWithBacktrace
  */
diff --git a/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java b/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java
index a56907a..3560e94 100644
--- a/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java
+++ b/hotspot/test/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java
@@ -25,14 +25,13 @@
  * @test
  * @bug 8076110
  * @summary Redefine running methods that have cached resolution errors
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.instrument
  *          jdk.jartool/sun.tools.jar
- * @build RedefineClassHelper
  * @run main RedefineClassHelper
- * @run main/othervm -javaagent:redefineagent.jar -XX:TraceRedefineClasses=0x600 RedefineRunningMethodsWithResolutionErrors
+ * @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+iklass+add=trace,redefine+class+iklass+purge=trace RedefineRunningMethodsWithResolutionErrors
  */
 
 import jdk.internal.org.objectweb.asm.ClassWriter;
diff --git a/hotspot/test/runtime/ReservedStack/ReservedStackTest.java b/hotspot/test/runtime/ReservedStack/ReservedStackTest.java
index a608077..6a09515 100644
--- a/hotspot/test/runtime/ReservedStack/ReservedStackTest.java
+++ b/hotspot/test/runtime/ReservedStack/ReservedStackTest.java
@@ -23,10 +23,9 @@
 
 /*
  * @test ReservedStackTest
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
- * @build jdk.test.lib.*
  * @run main/othervm -Xint ReservedStackTest
  * @run main/othervm -XX:-Inline -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest
  */
diff --git a/hotspot/test/runtime/ReservedStack/ReservedStackTestCompiler.java b/hotspot/test/runtime/ReservedStack/ReservedStackTestCompiler.java
index fa7ba47..1bc41f6 100644
--- a/hotspot/test/runtime/ReservedStack/ReservedStackTestCompiler.java
+++ b/hotspot/test/runtime/ReservedStack/ReservedStackTestCompiler.java
@@ -25,10 +25,9 @@
  * @test ReservedStackTestCompiler
  * @summary Run ReservedStackTest with dedicated compilers C1 and C2.
  * @requires vm.flavor == "server"
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.vm.annotation
- * @build jdk.test.lib.* ReservedStackTest
  * @run main/othervm -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:-Inline -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest
  * @run main/othervm -XX:-TieredCompilation                         -XX:-Inline -XX:CompileCommand=exclude,java/util/concurrent/locks/AbstractOwnableSynchronizer.setExclusiveOwnerThread ReservedStackTest
  */
diff --git a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java
index c05da6b..dd55927 100644
--- a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java
+++ b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @bug 8047290
  * @summary Ensure that a Monitor::lock_without_safepoint_check fires an assert when it incorrectly acquires a lock which must always have safepoint checks.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build AssertSafepointCheckConsistency1
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main AssertSafepointCheckConsistency1
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java
index 8fc54bd..04da67b 100644
--- a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java
+++ b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency2.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @bug 8047290
  * @summary Ensure that a Monitor::lock fires an assert when it incorrectly acquires a lock which must never have safepoint checks.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build AssertSafepointCheckConsistency2
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main AssertSafepointCheckConsistency2
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java
index f8bf497..7f681b6 100644
--- a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java
+++ b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency3.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @bug 8047290
  * @summary Ensure that Monitor::lock_without_safepoint_check does not assert when it correctly acquires a lock which must never have safepoint checks.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build AssertSafepointCheckConsistency3
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main AssertSafepointCheckConsistency3
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java
index 383174e..89ab9d4 100644
--- a/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java
+++ b/hotspot/test/runtime/Safepoint/AssertSafepointCheckConsistency4.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,16 +25,18 @@
  * @test
  * @bug 8047290
  * @summary Ensure that Monitor::lock does not assert when it correctly acquires a lock which must always have safepoint checks.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build AssertSafepointCheckConsistency4
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main AssertSafepointCheckConsistency4
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
 
diff --git a/hotspot/test/runtime/SameObject/SameObject.java b/hotspot/test/runtime/SameObject/SameObject.java
index 10bb41d..c0eecf5 100644
--- a/hotspot/test/runtime/SameObject/SameObject.java
+++ b/hotspot/test/runtime/SameObject/SameObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
  *          Fixed in JDK1.3.1_10
  *          Fixed in JDK1.4.1_07
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm/native -Xcheck:jni SameObject
  */
 public class SameObject {
diff --git a/hotspot/test/runtime/SelectionResolution/AbstractMethodErrorTest.java b/hotspot/test/runtime/SelectionResolution/AbstractMethodErrorTest.java
index 0c2d98c..02b292d 100644
--- a/hotspot/test/runtime/SelectionResolution/AbstractMethodErrorTest.java
+++ b/hotspot/test/runtime/SelectionResolution/AbstractMethodErrorTest.java
@@ -27,7 +27,6 @@
  * generate AbstractMethodErrorTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies AbstractMethodErrorTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/IllegalAccessErrorTest.java b/hotspot/test/runtime/SelectionResolution/IllegalAccessErrorTest.java
index 7bc2350..3af56c5 100644
--- a/hotspot/test/runtime/SelectionResolution/IllegalAccessErrorTest.java
+++ b/hotspot/test/runtime/SelectionResolution/IllegalAccessErrorTest.java
@@ -27,7 +27,6 @@
  * generate IllegalAccessErrorTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies IllegalAccessErrorTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeInterfaceICCE.java b/hotspot/test/runtime/SelectionResolution/InvokeInterfaceICCE.java
index b3bafc6..a775e85 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeInterfaceICCE.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeInterfaceICCE.java
@@ -27,7 +27,6 @@
  * generate IncompatibleClassChangeError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm/timeout=500 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeInterfaceICCE
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java b/hotspot/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java
index a424674..cf75021f 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java
@@ -27,7 +27,6 @@
  * generate InvokeInterfaceSuccessTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm/timeout=300 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeInterfaceSuccessTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeSpecialICCE.java b/hotspot/test/runtime/SelectionResolution/InvokeSpecialICCE.java
index 9086689..9fee011 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeSpecialICCE.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeSpecialICCE.java
@@ -27,7 +27,6 @@
  * generate IncompatibleClassChangeError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeSpecialICCE
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java b/hotspot/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java
index 71f266c..eb60df4 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeSpecialSuccessTest.java
@@ -27,7 +27,6 @@
  * generate InvokeSpecialSuccessTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeSpecialSuccessTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeStaticICCE.java b/hotspot/test/runtime/SelectionResolution/InvokeStaticICCE.java
index 54ce641..3ce93c5 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeStaticICCE.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeStaticICCE.java
@@ -27,7 +27,6 @@
  * generate IncompatibleClassChangeError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeStaticICCE
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java b/hotspot/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java
index 3678169..b105666 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeStaticSuccessTest.java
@@ -27,7 +27,6 @@
  * generate InvokeStaticSuccessTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main InvokeStaticSuccessTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeVirtualICCE.java b/hotspot/test/runtime/SelectionResolution/InvokeVirtualICCE.java
index 8dbe06e..59fe027 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeVirtualICCE.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeVirtualICCE.java
@@ -27,7 +27,6 @@
  * generate IncompatibleClassChangeError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm/timeout=1200 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeVirtualICCE
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java b/hotspot/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java
index 2b4deab..359537e 100644
--- a/hotspot/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java
+++ b/hotspot/test/runtime/SelectionResolution/InvokeVirtualSuccessTest.java
@@ -27,7 +27,6 @@
  * generate InvokeVirtualSuccessTest
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main/othervm/timeout=400 -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies InvokeVirtualSuccessTest
  */
 
diff --git a/hotspot/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java b/hotspot/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java
index ec23963..cf8055f 100644
--- a/hotspot/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java
+++ b/hotspot/test/runtime/SelectionResolution/NoSuchMethodErrorTest.java
@@ -27,7 +27,6 @@
  * generate NoSuchMethodError
  * @modules java.base/jdk.internal.org.objectweb.asm
  * @library /runtime/SelectionResolution/classes
- * @build selectionresolution.*
  * @run main NoSuchMethodErrorTest
  */
 
diff --git a/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java b/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java
index 009f8f4..728567a 100644
--- a/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java
+++ b/hotspot/test/runtime/SharedArchiveFile/ArchiveDoesNotExist.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,14 @@
  *          attempting to use CDS archive. JVM should exit gracefully
  *          when sharing mode is ON, and continue w/o sharing if sharing
  *          mode is AUTO.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main ArchiveDoesNotExist
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 
 public class ArchiveDoesNotExist {
diff --git a/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java b/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java
index b354fcb..6510e60 100644
--- a/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java
+++ b/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java
@@ -24,7 +24,7 @@
 /**
  * @test
  * @summary Testing -Xbootclasspath/a support for CDS
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
@@ -32,7 +32,7 @@
  * @compile javax/sound/sampled/MyClass.jasm
  * @compile org/omg/CORBA/Context.jasm
  * @compile nonjdk/myPackage/MyClass.java
- * @build jdk.test.lib.* LoadClass ClassFileInstaller
+ * @build LoadClass
  * @run main/othervm BootAppendTests
  */
 
@@ -44,8 +44,8 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class BootAppendTests {
     private static final String APP_CLASS = "LoadClass";
diff --git a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java
index 90422d2..51a341d 100644
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentCompactStrings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test CdsDifferentCompactStrings
  * @summary CDS (class data sharing) requires the same -XX:[+-]CompactStrings
  *          setting between archive creation time and load time.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class CdsDifferentCompactStrings {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java
index 7be3968..7a23396 100644
--- a/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsDifferentObjectAlignment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,13 +28,15 @@
  *          This is a negative test; using  object alignment for loading that
  *          is different from object alignment for creating a CDS file
  *          should fail when loading.
- * @library /testlibrary
+ * @library /test/lib
  * @bug 8025642
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class CdsDifferentObjectAlignment {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java b/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
index 6dc33f9..83b8fd1 100644
--- a/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
+++ b/hotspot/test/runtime/SharedArchiveFile/CdsSameObjectAlignment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,14 @@
  * @test CdsSameObjectAlignment
  * @summary Testing CDS (class data sharing) using varying object alignment.
  *          Using same object alignment for each dump/load pair
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class CdsSameObjectAlignment {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java b/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java
index 2fe4753..397a45f 100644
--- a/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java
+++ b/hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test DefaultUseWithClient
  * @summary Test default behavior of sharing with -client
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @ignore 8154204
@@ -32,7 +32,9 @@
  * @bug 8032224
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 import java.io.File;
 
 public class DefaultUseWithClient {
diff --git a/hotspot/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java b/hotspot/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java
index 4d24b54..83ecda8 100644
--- a/hotspot/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java
+++ b/hotspot/test/runtime/SharedArchiveFile/DumpSymbolAndStringTable.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @bug 8059510
  * @summary Test jcmd VM.symboltable and VM.stringtable options
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions DumpSymbolAndStringTable
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class DumpSymbolAndStringTable {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java b/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java
index 47304b4..c38b2e3 100644
--- a/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java
+++ b/hotspot/test/runtime/SharedArchiveFile/LimitSharedSizes.java
@@ -23,14 +23,16 @@
 
 /* @test LimitSharedSizes
  * @summary Test handling of limits on shared space size
- * @library /testlibrary /runtime/CommandLine/OptionsValidation/common
+ * @library /test/lib /runtime/CommandLine/OptionsValidation/common
  * @modules java.base/jdk.internal.misc
  *          java.management
  *          jdk.attach/sun.tools.attach
  * @run main LimitSharedSizes
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 import optionsvalidation.JVMOptionsUtils;
 
 public class LimitSharedSizes {
diff --git a/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
index 8cef6b7..1adb658 100644
--- a/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
+++ b/hotspot/test/runtime/SharedArchiveFile/MaxMetaspaceSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8067187
  * @summary Testing CDS dumping with the -XX:MaxMetaspaceSize=<size> option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class MaxMetaspaceSize {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java b/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
index 24bea75..0c49690 100644
--- a/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
+++ b/hotspot/test/runtime/SharedArchiveFile/PrintSharedArchiveAndExit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8066670
  * @summary Testing -XX:+PrintSharedArchiveAndExit option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class PrintSharedArchiveAndExit {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java
index 2ba4f6d..65cb422 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SASymbolTableTest.java
@@ -27,18 +27,21 @@
  * Started failing on 2016.06.24 due to 8160376 on MacOS X so quarantine
  * it on that platform:
  * @requires os.family != "mac"
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.hotspot.agent/sun.jvm.hotspot.oops
  *          jdk.hotspot.agent/sun.jvm.hotspot.memory
  *          jdk.hotspot.agent/sun.jvm.hotspot.runtime
  *          jdk.hotspot.agent/sun.jvm.hotspot.tools
  *          java.management
- * @build SASymbolTableTestAgent SASymbolTableTestAttachee jdk.test.lib.*
+ * @build SASymbolTableTestAgent SASymbolTableTestAttachee
  * @run main SASymbolTableTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
 
 /*
  * The purpose of this test is to validate that we can use SA to
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java b/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java
index 2b1f033..41cfb9d 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedArchiveFile.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8014138
  * @summary Testing new -XX:SharedArchiveFile=<file-name> option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class SharedArchiveFile {
   public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java b/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java
index e5fee96..b9dbf4b 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedBaseAddress.java
@@ -25,13 +25,14 @@
  * @test SharedBaseAddress
  * @summary Test variety of values for SharedBaseAddress, making sure
  *          VM handles normal values as well as edge values w/o a crash.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main SharedBaseAddress
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class SharedBaseAddress {
 
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java b/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java
index 06feba0..3c82ccb 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStrings.java
@@ -29,14 +29,15 @@
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @requires vm.gc.G1
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build SharedStringsWb SharedStrings ClassFileInstaller sun.hotspot.WhiteBox
+ * @build SharedStringsWb sun.hotspot.WhiteBox
  * @run main ClassFileInstaller -jar whitebox.jar sun.hotspot.WhiteBox
  * @run main SharedStrings
  */
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class SharedStrings {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java b/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java
index 432b36b..fe0d364 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsDedup.java
@@ -28,13 +28,14 @@
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @requires vm.gc.G1
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main SharedStringsDedup
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 
 // The main purpose is to test the interaction between shared strings
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java b/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java
index d4290fe..70467c3 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedStringsRunAuto.java
@@ -28,13 +28,14 @@
  * @requires (sun.arch.data.model != "32") & (os.family != "windows")
  * @requires (vm.opt.UseCompressedOops == null) | (vm.opt.UseCompressedOops == true)
  * @requires vm.gc.G1
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main SharedStringsRunAuto
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.io.File;
 
 public class SharedStringsRunAuto {
diff --git a/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java b/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java
index e99f218..632769d 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SharedSymbolTableBucketSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,12 +25,13 @@
  * @test
  * @bug 8059510
  * @summary Test SharedSymbolTableBucketSize option
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class SharedSymbolTableBucketSize {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java b/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java
index 665a3ae..b8371fe 100644
--- a/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java
+++ b/hotspot/test/runtime/SharedArchiveFile/SpaceUtilizationCheck.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,14 @@
 /*
  * @test SpaceUtilizationCheck
  * @summary Check if the space utilization for shared spaces is adequate
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main SpaceUtilizationCheck
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
diff --git a/hotspot/test/runtime/Thread/Fibonacci.java b/hotspot/test/runtime/Thread/Fibonacci.java
index 65ae1c3..271295a 100644
--- a/hotspot/test/runtime/Thread/Fibonacci.java
+++ b/hotspot/test/runtime/Thread/Fibonacci.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
  *     make this test inherently unstable on Windows with 32-bit VM data model.
  * @requires !(os.family == "windows" & sun.arch.data.model == "32")
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm Fibonacci 15
  */
 
diff --git a/hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java b/hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java
index 36f351d..535aedb 100644
--- a/hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java
+++ b/hotspot/test/runtime/Thread/TestThreadDumpMonitorContention.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
  * @summary Creates two threads contending for the same lock and checks
  *      whether jstack reports "locked" by more than one thread.
  *
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm TestThreadDumpMonitorContention
@@ -43,7 +43,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class TestThreadDumpMonitorContention {
     // jstack tends to be closely bound to the VM that we are running
diff --git a/hotspot/test/runtime/Thread/ThreadPriorities.java b/hotspot/test/runtime/Thread/ThreadPriorities.java
index a03d5d4..e445f2b 100644
--- a/hotspot/test/runtime/Thread/ThreadPriorities.java
+++ b/hotspot/test/runtime/Thread/ThreadPriorities.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary Creates several threads with different java priorities and checks
  *      whether jstack reports correct priorities for them.
  *
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main ThreadPriorities
@@ -38,7 +38,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 import static jdk.test.lib.Asserts.*;
 
 public class ThreadPriorities {
diff --git a/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java b/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java
index 55cee37..fc923a1 100644
--- a/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java
+++ b/hotspot/test/runtime/ThreadSignalMask/ThreadSignalMask.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  * @summary JDK 1.3.0 alters thread signal mask
  * @requires (vm.simpleArch == "sparcv9")
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile Prog.java
  * @run main/native ThreadSignalMask
  */
diff --git a/hotspot/test/runtime/Throwable/StackTraceLogging.java b/hotspot/test/runtime/Throwable/StackTraceLogging.java
index 053ab24..da2244c 100644
--- a/hotspot/test/runtime/Throwable/StackTraceLogging.java
+++ b/hotspot/test/runtime/Throwable/StackTraceLogging.java
@@ -25,18 +25,17 @@
  * @test
  * @bug 8150778
  * @summary check stacktrace logging
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @compile TestThrowable.java
  * @run driver StackTraceLogging
  */
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class StackTraceLogging {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/Throwable/TestThrowable.java b/hotspot/test/runtime/Throwable/TestThrowable.java
index 052ed46..fca76e1 100644
--- a/hotspot/test/runtime/Throwable/TestThrowable.java
+++ b/hotspot/test/runtime/Throwable/TestThrowable.java
@@ -26,7 +26,7 @@
  * @bug 8150778
  * @summary Test exception depths, and code to get stack traces
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm -XX:MaxJavaStackTraceDepth=1024 TestThrowable
  */
 
diff --git a/hotspot/test/runtime/Throwable/ThrowableIntrospectionSegfault.java b/hotspot/test/runtime/Throwable/ThrowableIntrospectionSegfault.java
index 71f1dc2..ceeca29 100644
--- a/hotspot/test/runtime/Throwable/ThrowableIntrospectionSegfault.java
+++ b/hotspot/test/runtime/Throwable/ThrowableIntrospectionSegfault.java
@@ -26,7 +26,6 @@
  * @bug 8033735
  * @summary check backtrace field introspection
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
  * @run main ThrowableIntrospectionSegfault
  */
 
diff --git a/hotspot/test/runtime/TransitiveOverrideCFV50/TransitiveOverrideCFV50.java b/hotspot/test/runtime/TransitiveOverrideCFV50/TransitiveOverrideCFV50.java
new file mode 100644
index 0000000..909b694
--- /dev/null
+++ b/hotspot/test/runtime/TransitiveOverrideCFV50/TransitiveOverrideCFV50.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test 8163808
+ * @modules java.base/jdk.internal.org.objectweb.asm
+ * @run main TransitiveOverrideCFV50
+ */
+
+import java.util.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import jdk.internal.org.objectweb.asm.ClassWriter;
+import jdk.internal.org.objectweb.asm.MethodVisitor;
+import jdk.internal.org.objectweb.asm.AnnotationVisitor;
+import jdk.internal.org.objectweb.asm.Opcodes;
+
+/*
+ * Test mixed classfile version overriding handling.
+ * Key is to generate P2/C with an older classfile version <=50
+ * Correct response is B.m:2 for older classfiles
+ * This test was added to ensure no assertions in debug
+ * note: for P2/C classfile version >=51, correct answer becomes C.m:3
+ * public class  P1.A {             public int m() { return 1; }
+ *
+ * public class  P1.B extends A {          int m() { return 2; }
+ *
+ * public class  P2.c extends P1.B { public int m() { return 3; }
+ */
+
+public class TransitiveOverrideCFV50 implements Opcodes{
+  static final String classP1A = "P1.A";
+    static final String classP1B = "P1.B";
+    static final String classP2C = "P2.C";
+
+    static final String callerName = classP2C;
+
+    public static void main(String[] args) throws Exception {
+        ClassLoader cl = new ClassLoader() {
+            public Class<?> loadClass(String name) throws ClassNotFoundException {
+                if (findLoadedClass(name) != null) {
+                    return findLoadedClass(name);
+                }
+
+                if (classP1A.equals(name)) {
+                    byte[] classFile = dumpP1A();
+                    return defineClass(classP1A, classFile, 0, classFile.length);
+                }
+                if (classP1B.equals(name)) {
+                    byte[] classFile = dumpP1B();
+                    return defineClass(classP1B, classFile, 0, classFile.length);
+                }
+                if (classP2C.equals(name)) {
+                    byte[] classFile = dumpP2C();
+                    return defineClass(classP2C, classFile, 0, classFile.length);
+                }
+
+                return super.loadClass(name);
+            }
+        };
+
+        cl.loadClass(classP1A);
+        cl.loadClass(classP1B);
+        cl.loadClass(classP2C);
+
+        //cl.loadClass(callerName).getDeclaredMethod("test");
+        cl.loadClass(callerName).newInstance();
+
+        int result = (Integer)cl.loadClass(callerName).getDeclaredMethod("test").invoke(null);
+        if (result != 2) {
+          throw new RuntimeException("expected B.m:2, got " + result);
+        }
+    }
+
+    public static byte[] dumpP1A() {
+
+        ClassWriter cw = new ClassWriter(0);
+        MethodVisitor mv;
+
+        cw.visit(V1_7, ACC_PUBLIC + ACC_SUPER, "P1/A", null, "java/lang/Object", null);
+
+        {
+            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+            mv.visitCode();
+            mv.visitVarInsn(ALOAD, 0);
+            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
+            mv.visitInsn(RETURN);
+            mv.visitMaxs(1, 1);
+            mv.visitEnd();
+        }
+        {
+            mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null);
+            mv.visitCode();
+            mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
+            mv.visitLdcInsn("A.m");
+            mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false);
+            mv.visitIntInsn(BIPUSH, 1);
+            mv.visitInsn(IRETURN);
+            mv.visitMaxs(2, 1);
+            mv.visitEnd();
+        }
+        cw.visitEnd();
+
+        return cw.toByteArray();
+    }
+    public static byte[] dumpP1B() {
+
+        ClassWriter cw = new ClassWriter(0);
+        MethodVisitor mv;
+
+        cw.visit(V1_8, ACC_PUBLIC + ACC_SUPER, "P1/B", null, "P1/A", null);
+
+        {
+            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+            mv.visitCode();
+            mv.visitVarInsn(ALOAD, 0);
+            mv.visitMethodInsn(INVOKESPECIAL, "P1/A", "<init>", "()V", false);
+            mv.visitInsn(RETURN);
+            mv.visitMaxs(1, 1);
+            mv.visitEnd();
+        }
+        {
+            mv = cw.visitMethod(0, "m", "()I", null, null);
+            mv.visitCode();
+            mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
+            mv.visitLdcInsn("B.m");
+            mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false);
+            mv.visitIntInsn(BIPUSH, 2);
+            mv.visitInsn(IRETURN);
+            mv.visitMaxs(2, 1);
+            mv.visitEnd();
+        }
+        cw.visitEnd();
+
+        return cw.toByteArray();
+    }
+    public static byte[] dumpP2C() {
+
+        ClassWriter cw = new ClassWriter(0);
+        MethodVisitor mv;
+
+        cw.visit(V1_6, ACC_PUBLIC + ACC_SUPER, "P2/C", null, "P1/B", null);
+
+        {
+            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
+            mv.visitCode();
+            mv.visitVarInsn(ALOAD, 0);
+            mv.visitMethodInsn(INVOKESPECIAL, "P1/B", "<init>", "()V", false);
+            mv.visitInsn(RETURN);
+            mv.visitMaxs(1, 1);
+            mv.visitEnd();
+        }
+        {
+            mv = cw.visitMethod(ACC_PUBLIC, "m", "()I", null, null);
+            mv.visitCode();
+            mv.visitFieldInsn(GETSTATIC, "java/lang/System", "out", "Ljava/io/PrintStream;");
+            mv.visitLdcInsn("P2/C.m");
+            mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/PrintStream", "println", "(Ljava/lang/String;)V", false);
+            mv.visitIntInsn(BIPUSH, 3);
+            mv.visitInsn(IRETURN);
+            mv.visitMaxs(2, 1);
+            mv.visitEnd();
+        }
+        {
+            mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "test", "()I", null, null);
+            mv.visitCode();
+            mv.visitTypeInsn(NEW, "P2/C");
+            mv.visitInsn(DUP);
+            mv.visitMethodInsn(INVOKESPECIAL, "P2/C", "<init>", "()V", false);
+            mv.visitMethodInsn(INVOKEVIRTUAL, "P1/A", "m", "()I", false);
+            mv.visitInsn(IRETURN);
+            mv.visitMaxs(3, 2);
+            mv.visitEnd();
+        }
+
+        cw.visitEnd();
+
+        return cw.toByteArray();
+    }
+}
diff --git a/hotspot/test/runtime/Unsafe/AllocateInstance.java b/hotspot/test/runtime/Unsafe/AllocateInstance.java
index 6b283d3..56c7f8f 100644
--- a/hotspot/test/runtime/Unsafe/AllocateInstance.java
+++ b/hotspot/test/runtime/Unsafe/AllocateInstance.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test
  * @summary Verifies the behaviour of Unsafe.allocateInstance
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main AllocateInstance
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/AllocateMemory.java b/hotspot/test/runtime/Unsafe/AllocateMemory.java
index d9f8a12..c32ef73 100644
--- a/hotspot/test/runtime/Unsafe/AllocateMemory.java
+++ b/hotspot/test/runtime/Unsafe/AllocateMemory.java
@@ -25,13 +25,13 @@
  * @test
  * @requires vm.compMode != "Xcomp"
  * @summary Verifies behaviour of Unsafe.allocateMemory
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=100m AllocateMemory
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/CopyMemory.java b/hotspot/test/runtime/Unsafe/CopyMemory.java
index e2328d3..3afe405 100644
--- a/hotspot/test/runtime/Unsafe/CopyMemory.java
+++ b/hotspot/test/runtime/Unsafe/CopyMemory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test
  * @summary Verifies behaviour of Unsafe.copyMemory
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main CopyMemory
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/DefineClass.java b/hotspot/test/runtime/Unsafe/DefineClass.java
index fa0d3b6..44f8aea 100644
--- a/hotspot/test/runtime/Unsafe/DefineClass.java
+++ b/hotspot/test/runtime/Unsafe/DefineClass.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Verifies the behaviour of Unsafe.defineClass
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
@@ -33,7 +33,8 @@
 
 import java.security.ProtectionDomain;
 import java.io.InputStream;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/FieldOffset.java b/hotspot/test/runtime/Unsafe/FieldOffset.java
index abf62fc..43bdf87 100644
--- a/hotspot/test/runtime/Unsafe/FieldOffset.java
+++ b/hotspot/test/runtime/Unsafe/FieldOffset.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verifies the behaviour of Unsafe.fieldOffset
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main FieldOffset
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import java.lang.reflect.*;
 import static jdk.test.lib.Asserts.*;
diff --git a/hotspot/test/runtime/Unsafe/GetField.java b/hotspot/test/runtime/Unsafe/GetField.java
index f01d5de..3aa5ede 100644
--- a/hotspot/test/runtime/Unsafe/GetField.java
+++ b/hotspot/test/runtime/Unsafe/GetField.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test
  * @summary Verifies behaviour of Unsafe.getField
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetField
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import java.lang.reflect.*;
 import static jdk.test.lib.Asserts.*;
diff --git a/hotspot/test/runtime/Unsafe/GetPutAddress.java b/hotspot/test/runtime/Unsafe/GetPutAddress.java
index 1dd0a18..0b18d4d 100644
--- a/hotspot/test/runtime/Unsafe/GetPutAddress.java
+++ b/hotspot/test/runtime/Unsafe/GetPutAddress.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,14 @@
 /*
  * @test
  * Verify behaviour of Unsafe.get/putAddress and Unsafe.addressSize
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutAddress
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutBoolean.java b/hotspot/test/runtime/Unsafe/GetPutBoolean.java
index 51e59cf..03bddbf 100644
--- a/hotspot/test/runtime/Unsafe/GetPutBoolean.java
+++ b/hotspot/test/runtime/Unsafe/GetPutBoolean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putBoolean
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutBoolean
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutByte.java b/hotspot/test/runtime/Unsafe/GetPutByte.java
index 48f4700..10ccbfd 100644
--- a/hotspot/test/runtime/Unsafe/GetPutByte.java
+++ b/hotspot/test/runtime/Unsafe/GetPutByte.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putByte
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutByte
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutChar.java b/hotspot/test/runtime/Unsafe/GetPutChar.java
index 86b5c80..8a05acd 100644
--- a/hotspot/test/runtime/Unsafe/GetPutChar.java
+++ b/hotspot/test/runtime/Unsafe/GetPutChar.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putChar
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutChar
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutDouble.java b/hotspot/test/runtime/Unsafe/GetPutDouble.java
index 1073c8e..f9ccd54 100644
--- a/hotspot/test/runtime/Unsafe/GetPutDouble.java
+++ b/hotspot/test/runtime/Unsafe/GetPutDouble.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putDouble
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutDouble
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutFloat.java b/hotspot/test/runtime/Unsafe/GetPutFloat.java
index f49ac75..005b230 100644
--- a/hotspot/test/runtime/Unsafe/GetPutFloat.java
+++ b/hotspot/test/runtime/Unsafe/GetPutFloat.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putFloat
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutFloat
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutInt.java b/hotspot/test/runtime/Unsafe/GetPutInt.java
index 49f82d5..a43b7e1 100644
--- a/hotspot/test/runtime/Unsafe/GetPutInt.java
+++ b/hotspot/test/runtime/Unsafe/GetPutInt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,14 +23,14 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutInt
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutLong.java b/hotspot/test/runtime/Unsafe/GetPutLong.java
index 8336c85..8feef0b 100644
--- a/hotspot/test/runtime/Unsafe/GetPutLong.java
+++ b/hotspot/test/runtime/Unsafe/GetPutLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putLong
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutLong
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutObject.java b/hotspot/test/runtime/Unsafe/GetPutObject.java
index 6607db3..aa6c75d 100644
--- a/hotspot/test/runtime/Unsafe/GetPutObject.java
+++ b/hotspot/test/runtime/Unsafe/GetPutObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putObject
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutObject
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetPutShort.java b/hotspot/test/runtime/Unsafe/GetPutShort.java
index 2ede76c..7a95ec2 100644
--- a/hotspot/test/runtime/Unsafe/GetPutShort.java
+++ b/hotspot/test/runtime/Unsafe/GetPutShort.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Verify behaviour of Unsafe.get/putShort
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main GetPutShort
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/GetUncompressedObject.java b/hotspot/test/runtime/Unsafe/GetUncompressedObject.java
index dc72a5e..f9a70e6 100644
--- a/hotspot/test/runtime/Unsafe/GetUncompressedObject.java
+++ b/hotspot/test/runtime/Unsafe/GetUncompressedObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,15 +23,14 @@
 
 /* @test
  * @bug 8022853
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
- * @build jdk.test.lib.*
  * @run main GetUncompressedObject
  */
 
 import static jdk.test.lib.Asserts.*;
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 
 public class GetUncompressedObject {
diff --git a/hotspot/test/runtime/Unsafe/NestedUnsafe.java b/hotspot/test/runtime/Unsafe/NestedUnsafe.java
index f009d6d..ea4e7e5 100644
--- a/hotspot/test/runtime/Unsafe/NestedUnsafe.java
+++ b/hotspot/test/runtime/Unsafe/NestedUnsafe.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Creates an anonymous class inside of an anonymous class.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
@@ -34,7 +34,8 @@
 import java.security.ProtectionDomain;
 import java.io.InputStream;
 import java.lang.*;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
@@ -79,7 +80,7 @@
             "            throw new RuntimeException(\"Exception: \" + ex.toString()); " +
             "        } " +
             "} } ",
-            "-XaddExports:java.base/jdk.internal.misc=ALL-UNNAMED");
+            "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED");
         Class klass2 = unsafe.defineAnonymousClass(NestedUnsafe.class, klassbuf2, new Object[0]);
         try {
             klass2.getMethod("doit").invoke(null);
diff --git a/hotspot/test/runtime/Unsafe/PageSize.java b/hotspot/test/runtime/Unsafe/PageSize.java
index 6ce5a1c..39b6c7c 100644
--- a/hotspot/test/runtime/Unsafe/PageSize.java
+++ b/hotspot/test/runtime/Unsafe/PageSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,14 @@
 /*
  * @test
  * @summary Make sure pageSize() returns a value that is a power of two
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main PageSize
  */
 
 import java.lang.reflect.Field;
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java b/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java
index f081efc..ffe9540 100644
--- a/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java
+++ b/hotspot/test/runtime/Unsafe/PrimitiveHostClass.java
@@ -31,7 +31,6 @@
  * @test PrimitiveHostClass
  * @bug 8140665
  * @summary Throws IllegalArgumentException if host class is a primitive class.
- * @library /testlibrary
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  * @compile -XDignore.symbol.file PrimitiveHostClass.java
diff --git a/hotspot/test/runtime/Unsafe/RangeCheck.java b/hotspot/test/runtime/Unsafe/RangeCheck.java
index 172af2a..76ccea3 100644
--- a/hotspot/test/runtime/Unsafe/RangeCheck.java
+++ b/hotspot/test/runtime/Unsafe/RangeCheck.java
@@ -25,12 +25,16 @@
  * @test
  * @bug 8001071
  * @summary Add simple range check into VM implemenation of Unsafe access methods
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.Utils;
+
 import jdk.internal.misc.Unsafe;
 
 public class RangeCheck {
diff --git a/hotspot/test/runtime/Unsafe/Reallocate.java b/hotspot/test/runtime/Unsafe/Reallocate.java
index b2fe5d9..5dec176 100644
--- a/hotspot/test/runtime/Unsafe/Reallocate.java
+++ b/hotspot/test/runtime/Unsafe/Reallocate.java
@@ -25,13 +25,13 @@
  * @test
  * @requires vm.compMode != "Xcomp"
  * @bug 8058897
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:MallocMaxTestWords=100m Reallocate
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/SetMemory.java b/hotspot/test/runtime/Unsafe/SetMemory.java
index 8ff36cc..a426c74 100644
--- a/hotspot/test/runtime/Unsafe/SetMemory.java
+++ b/hotspot/test/runtime/Unsafe/SetMemory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test
  * @summary Verifies that setMemory works correctly
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main SetMemory
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/Unsafe/ThrowException.java b/hotspot/test/runtime/Unsafe/ThrowException.java
index c263aa1..5056000 100644
--- a/hotspot/test/runtime/Unsafe/ThrowException.java
+++ b/hotspot/test/runtime/Unsafe/ThrowException.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test
  * @summary Verify that throwException() can throw an exception
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main ThrowException
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Utils;
 import jdk.internal.misc.Unsafe;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/XCheckJniJsig/XCheckJSig.java b/hotspot/test/runtime/XCheckJniJsig/XCheckJSig.java
index 1cc20a1..62cc409 100644
--- a/hotspot/test/runtime/XCheckJniJsig/XCheckJSig.java
+++ b/hotspot/test/runtime/XCheckJniJsig/XCheckJSig.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test
  * @bug 7051189 8023393
  * @summary Need to suppress info message if -Xcheck:jni is used with libjsig.so
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main XCheckJSig
@@ -33,7 +33,9 @@
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class XCheckJSig {
     public static void main(String args[]) throws Throwable {
diff --git a/hotspot/test/runtime/classFileParserBug/ClassFileParserBug.java b/hotspot/test/runtime/classFileParserBug/ClassFileParserBug.java
index 2415cc2..e7fba9f 100644
--- a/hotspot/test/runtime/classFileParserBug/ClassFileParserBug.java
+++ b/hotspot/test/runtime/classFileParserBug/ClassFileParserBug.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8040018
- * @library /testlibrary
+ * @library /test/lib
  * @summary Check for exception instead of assert.
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -32,7 +32,8 @@
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ClassFileParserBug {
     public static void main(String args[]) throws Throwable {
diff --git a/hotspot/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java b/hotspot/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java
index be0dc53..0100d04 100644
--- a/hotspot/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java
+++ b/hotspot/test/runtime/classFileParserBug/TestEmptyBootstrapMethodsAttr.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test TestEmptyBootstrapMethodsAttr
  * @bug 8041918
- * @library /testlibrary
+ * @library /test/lib
  * @summary Test empty bootstrap_methods table within BootstrapMethods attribute
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -33,7 +33,9 @@
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.JDKToolFinder;
 
 public class TestEmptyBootstrapMethodsAttr {
 
diff --git a/hotspot/test/runtime/contended/Options.java b/hotspot/test/runtime/contended/Options.java
index cd11d82..69892cc 100644
--- a/hotspot/test/runtime/contended/Options.java
+++ b/hotspot/test/runtime/contended/Options.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,14 +21,15 @@
  * questions.
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test
  * @bug     8006997
  * @summary ContendedPaddingWidth should be range-checked
  *
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main Options
diff --git a/hotspot/test/runtime/duplAttributes/DuplAttributesTest.java b/hotspot/test/runtime/duplAttributes/DuplAttributesTest.java
index 8d1ddab..c2b6e75 100644
--- a/hotspot/test/runtime/duplAttributes/DuplAttributesTest.java
+++ b/hotspot/test/runtime/duplAttributes/DuplAttributesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 8040292
- * @library /testlibrary
+ * @library /test/lib
  * @summary Throw exceptions when duplicate attributes are detected.
  * @modules java.base/jdk.internal.misc
  *          java.management
@@ -32,7 +32,8 @@
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class DuplAttributesTest {
 
diff --git a/hotspot/test/runtime/execstack/Testexecstack.java b/hotspot/test/runtime/execstack/Testexecstack.java
index eb0b89f..7af23d7a 100644
--- a/hotspot/test/runtime/execstack/Testexecstack.java
+++ b/hotspot/test/runtime/execstack/Testexecstack.java
@@ -28,14 +28,15 @@
  * @bug 8025519
  * @summary Stack guard pages lost after loading library with executable stack.
  * @requires (os.family == "linux")
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
+ * @modules java.base/jdk.internal.misc
  * @compile Test.java
  * @compile TestMT.java
  * @run driver Testexecstack
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class Testexecstack {
 
diff --git a/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java b/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java
index cce37fa..fb87f8f 100644
--- a/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java
+++ b/hotspot/test/runtime/getSysPackage/GetSysPkgTest.java
@@ -26,14 +26,16 @@
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.loader
  *          java.desktop
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm GetSysPkgTest
  */
 
 import java.io.File;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 // Test that JVM get_system_package() returns the module location for defined packages.
 public class GetSysPkgTest {
diff --git a/hotspot/test/runtime/interned/SanityTest.java b/hotspot/test/runtime/interned/SanityTest.java
index c0f2f72..7ce22bb 100644
--- a/hotspot/test/runtime/interned/SanityTest.java
+++ b/hotspot/test/runtime/interned/SanityTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test SanityTest
  * @summary Sanity check of String.intern() & GC
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build SanityTest
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI SanityTest
diff --git a/hotspot/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java b/hotspot/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java
index 02d4d55..e9c0fa4 100644
--- a/hotspot/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java
+++ b/hotspot/test/runtime/jni/ToStringInInterfaceTest/ToStringTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,7 @@
 
 /* @test
  * @bug 8072588
- * @build InterfaceWithToString
- * @build ImplementationOfWithToString
+ * @build InterfaceWithToString ImplementationOfWithToString
  * @run main/native ToStringTest
  */
 public final class ToStringTest {
diff --git a/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java b/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java
index 49201a7..9d744f2 100644
--- a/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java
+++ b/hotspot/test/runtime/libadimalloc.solaris.sparc/Testlibadimalloc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,7 @@
  * @summary make sure the Solaris Sparc M7 libadimalloc.so library generates SIGSEGV's on buffer overflow
  * @requires (os.family == "solaris" & os.arch == "sparcv9")
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @compile SEGVOverflow.java
  * @run driver Testlibadimalloc
  */
@@ -37,7 +36,7 @@
 import java.io.*;
 import java.nio.file.*;
 import java.util.*;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class Testlibadimalloc {
 
diff --git a/hotspot/test/runtime/logging/BiasedLockingTest.java b/hotspot/test/runtime/logging/BiasedLockingTest.java
index 365f319..75ea90b 100644
--- a/hotspot/test/runtime/logging/BiasedLockingTest.java
+++ b/hotspot/test/runtime/logging/BiasedLockingTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8149383
  * @summary -Xlog:biasedlocking should have logging from statements in the source code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver BiasedLockingTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class BiasedLockingTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/ClassInitializationTest.java b/hotspot/test/runtime/logging/ClassInitializationTest.java
index 9ffd4d2..90a5bdb 100644
--- a/hotspot/test/runtime/logging/ClassInitializationTest.java
+++ b/hotspot/test/runtime/logging/ClassInitializationTest.java
@@ -26,15 +26,14 @@
  * @test ClassInitializationTest
  * @bug 8142976
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile BadMap50.jasm
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.Platform jdk.test.lib.ProcessTools
  * @run driver ClassInitializationTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class ClassInitializationTest {
 
diff --git a/hotspot/test/runtime/logging/ClassLoadUnloadTest.java b/hotspot/test/runtime/logging/ClassLoadUnloadTest.java
index e9c5d97..1c23963 100644
--- a/hotspot/test/runtime/logging/ClassLoadUnloadTest.java
+++ b/hotspot/test/runtime/logging/ClassLoadUnloadTest.java
@@ -26,13 +26,14 @@
  * @test ClassLoadUnloadTest
  * @bug 8142506
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /runtime/testlibrary
+ * @library /test/lib /runtime/testlibrary
  * @library classes
- * @build ClassUnloadCommon test.Empty jdk.test.lib.* jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
+ * @build test.Empty
  * @run driver ClassLoadUnloadTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
diff --git a/hotspot/test/runtime/logging/ClassResolutionTest.java b/hotspot/test/runtime/logging/ClassResolutionTest.java
index ceebd4c..32f43b1 100644
--- a/hotspot/test/runtime/logging/ClassResolutionTest.java
+++ b/hotspot/test/runtime/logging/ClassResolutionTest.java
@@ -26,13 +26,12 @@
  * @test ClassResolutionTest
  * @bug 8144874
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
+ * @library /test/lib
  * @run driver ClassResolutionTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Method;
 
diff --git a/hotspot/test/runtime/logging/CompressedOopsTest.java b/hotspot/test/runtime/logging/CompressedOopsTest.java
index 2216f95..aa5bcf9 100644
--- a/hotspot/test/runtime/logging/CompressedOopsTest.java
+++ b/hotspot/test/runtime/logging/CompressedOopsTest.java
@@ -26,16 +26,15 @@
  * @bug 8149991
  * @requires (sun.arch.data.model == "64")
  * @summary -Xlog:gc+heap+coops=info should have output from the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.Platform jdk.test.lib.ProcessTools
  * @run driver CompressedOopsTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class CompressedOopsTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/DefaultMethodsTest.java b/hotspot/test/runtime/logging/DefaultMethodsTest.java
index e910bbb..3790689 100644
--- a/hotspot/test/runtime/logging/DefaultMethodsTest.java
+++ b/hotspot/test/runtime/logging/DefaultMethodsTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8139564
  * @summary defaultmethods=debug should have logging from each of the statements in the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver DefaultMethodsTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class DefaultMethodsTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/logging/ExceptionsTest.java b/hotspot/test/runtime/logging/ExceptionsTest.java
index 6d2e60f..27a12c8 100644
--- a/hotspot/test/runtime/logging/ExceptionsTest.java
+++ b/hotspot/test/runtime/logging/ExceptionsTest.java
@@ -25,17 +25,16 @@
  * @test
  * @bug 8141211 8147477
  * @summary exceptions=info output should have an exception message for interpreter methods
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver ExceptionsTest
  */
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class ExceptionsTest {
     static void updateEnvironment(ProcessBuilder pb, String environmentVariable, String value) {
diff --git a/hotspot/test/runtime/logging/ItablesTest.java b/hotspot/test/runtime/logging/ItablesTest.java
index 44fb7b4..48ed396 100644
--- a/hotspot/test/runtime/logging/ItablesTest.java
+++ b/hotspot/test/runtime/logging/ItablesTest.java
@@ -26,7 +26,7 @@
  * @bug 8141564
  * @summary itables=trace should have logging from each of the statements
  *          in the code
- * @library /testlibrary
+ * @library /test/lib
  * @compile ClassB.java
  *          ItablesVtableTest.java
  * @modules java.base/jdk.internal.misc
@@ -34,7 +34,9 @@
  * @run driver ItablesTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
 
 public class ItablesTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/logging/LoaderConstraintsTest.java b/hotspot/test/runtime/logging/LoaderConstraintsTest.java
index ea6e13b..49dc5d2 100644
--- a/hotspot/test/runtime/logging/LoaderConstraintsTest.java
+++ b/hotspot/test/runtime/logging/LoaderConstraintsTest.java
@@ -26,13 +26,12 @@
  * @test LoaderConstraintsTest
  * @bug 8149996
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /runtime/testlibrary
- * @library classes
- * @build ClassUnloadCommon test.Empty jdk.test.lib.* jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
+ * @library /test/lib /runtime/testlibrary classes
  * @run driver LoaderConstraintsTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.lang.ref.WeakReference;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
diff --git a/hotspot/test/runtime/logging/ModulesTest.java b/hotspot/test/runtime/logging/ModulesTest.java
index e1689fb..13d4ed1 100644
--- a/hotspot/test/runtime/logging/ModulesTest.java
+++ b/hotspot/test/runtime/logging/ModulesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,15 +24,14 @@
 /*
  * @test
  * @summary modules=debug should have logging from statements in the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run main ModulesTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class ModulesTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/logging/MonitorInflationTest.java b/hotspot/test/runtime/logging/MonitorInflationTest.java
index dca42b2..ab927b4 100644
--- a/hotspot/test/runtime/logging/MonitorInflationTest.java
+++ b/hotspot/test/runtime/logging/MonitorInflationTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8133885
  * @summary monitorinflation=debug should have logging from each of the statements in the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver MonitorInflationTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class MonitorInflationTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/MonitorMismatchTest.java b/hotspot/test/runtime/logging/MonitorMismatchTest.java
index 0d7c76f..f055084 100644
--- a/hotspot/test/runtime/logging/MonitorMismatchTest.java
+++ b/hotspot/test/runtime/logging/MonitorMismatchTest.java
@@ -26,14 +26,13 @@
  * @test MonitorMismatchTest
  * @bug 8150084
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile MonitorMismatchHelper.jasm
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools jdk.test.lib.Platform
  * @run driver MonitorMismatchTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Platform;
 
 public class MonitorMismatchTest {
diff --git a/hotspot/test/runtime/logging/OsCpuLoggingTest.java b/hotspot/test/runtime/logging/OsCpuLoggingTest.java
index 94aba04f..93ed049 100644
--- a/hotspot/test/runtime/logging/OsCpuLoggingTest.java
+++ b/hotspot/test/runtime/logging/OsCpuLoggingTest.java
@@ -25,16 +25,17 @@
  * @test
  * @bug 8151939
  * @summary os+cpu output should contain some os,cpu information
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver OsCpuLoggingTest
  */
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class OsCpuLoggingTest {
 
diff --git a/hotspot/test/runtime/logging/ProtectionDomainVerificationTest.java b/hotspot/test/runtime/logging/ProtectionDomainVerificationTest.java
index 919d958..1d14504 100644
--- a/hotspot/test/runtime/logging/ProtectionDomainVerificationTest.java
+++ b/hotspot/test/runtime/logging/ProtectionDomainVerificationTest.java
@@ -25,14 +25,13 @@
  * @test ProtectionDomainVerificationTest
  * @bug 8149064
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.Platform jdk.test.lib.ProcessTools
+ * @library /test/lib
  * @run driver ProtectionDomainVerificationTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class ProtectionDomainVerificationTest {
 
diff --git a/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java b/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java
index 47d61d1..a537498 100644
--- a/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java
+++ b/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java
@@ -26,11 +26,12 @@
  * @test RemovedDevelopFlagsTest
  * @bug 8146632
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
+ * @library /test/lib
  * @run driver RemovedDevelopFlagsTest
  */
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class RemovedDevelopFlagsTest {
     public static ProcessBuilder pb;
diff --git a/hotspot/test/runtime/logging/SafepointCleanupTest.java b/hotspot/test/runtime/logging/SafepointCleanupTest.java
index cbec3cb..1f52dac 100644
--- a/hotspot/test/runtime/logging/SafepointCleanupTest.java
+++ b/hotspot/test/runtime/logging/SafepointCleanupTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8149991
  * @summary safepoint+cleanup=info should have output from the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver SafepointCleanupTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class SafepointCleanupTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/SafepointTest.java b/hotspot/test/runtime/logging/SafepointTest.java
index 184706b..161302f 100644
--- a/hotspot/test/runtime/logging/SafepointTest.java
+++ b/hotspot/test/runtime/logging/SafepointTest.java
@@ -25,16 +25,15 @@
  * @test
  * @bug 8140348
  * @summary safepoint=trace should have output from each log statement in the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver SafepointTest
  */
 
 import java.lang.ref.WeakReference;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class SafepointTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/logging/StartupTimeTest.java b/hotspot/test/runtime/logging/StartupTimeTest.java
index 1c5a77e..dfd3514 100644
--- a/hotspot/test/runtime/logging/StartupTimeTest.java
+++ b/hotspot/test/runtime/logging/StartupTimeTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8148630
  * @summary -Xlog:startuptime should produce logging from the source code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver StartupTimeTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class StartupTimeTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/ThreadLoggingTest.java b/hotspot/test/runtime/logging/ThreadLoggingTest.java
index e3cc069..1f06e05 100644
--- a/hotspot/test/runtime/logging/ThreadLoggingTest.java
+++ b/hotspot/test/runtime/logging/ThreadLoggingTest.java
@@ -26,18 +26,17 @@
  * @test
  * @bug 8149036 8150619
  * @summary os+thread output should contain logging calls for thread start stop attaches detaches
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver ThreadLoggingTest
  * @author Thomas Stuefe (SAP)
  */
 
 import java.io.File;
 import java.util.Map;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class ThreadLoggingTest {
 
diff --git a/hotspot/test/runtime/logging/VMOperationTest.java b/hotspot/test/runtime/logging/VMOperationTest.java
index 9ffe863..b72410b 100644
--- a/hotspot/test/runtime/logging/VMOperationTest.java
+++ b/hotspot/test/runtime/logging/VMOperationTest.java
@@ -25,16 +25,15 @@
  * @test
  * @bug 8143157
  * @summary vmoperation=debug should have logging output
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver VMOperationTest
  */
 
 import java.lang.ref.WeakReference;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class VMOperationTest {
     public static void main(String[] args) throws Exception {
diff --git a/hotspot/test/runtime/logging/VerificationTest.java b/hotspot/test/runtime/logging/VerificationTest.java
index d49b7b3..de64713 100644
--- a/hotspot/test/runtime/logging/VerificationTest.java
+++ b/hotspot/test/runtime/logging/VerificationTest.java
@@ -25,15 +25,14 @@
  * @test
  * @bug 8150083
  * @summary verification=info output should have output from the code
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
  * @run driver VerificationTest
  */
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class VerificationTest {
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
diff --git a/hotspot/test/runtime/logging/VtablesTest.java b/hotspot/test/runtime/logging/VtablesTest.java
index b23fec0..e5bd5be 100644
--- a/hotspot/test/runtime/logging/VtablesTest.java
+++ b/hotspot/test/runtime/logging/VtablesTest.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 8141564
  * @summary vtables=trace should have logging from each of the statements in the code
- * @library /testlibrary
+ * @library /test/lib
  * @compile ClassB.java
  *          p1/A.java
  *          p2/B.jcod
@@ -36,7 +36,9 @@
  * @run driver VtablesTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class VtablesTest {
     public static void main(String[] args) throws Exception {
@@ -46,10 +48,10 @@
             output.shouldContain("copy vtable from ClassA to ClassB");
             output.shouldContain("Initializing: ClassB");
             output.shouldContain("adding ClassB.Method1()V");
-            output.shouldContain("] overriding with ClassB::ClassB.Method2()V");
+            output.shouldContain("] overriding with ClassB.Method2()V");
             output.shouldContain("invokevirtual resolved method: caller-class:ClassB");
             output.shouldContain("invokevirtual selected method: receiver-class:ClassB");
-            output.shouldContain("NOT overriding with p2.D::p2.D.nooverride()V");
+            output.shouldContain("NOT overriding with p2.D.nooverride()V");
             output.shouldHaveExitValue(0);
 
             pb = ProcessTools.createJavaProcessBuilder("-Xlog:vtables=trace", "p1/C");
diff --git a/hotspot/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java b/hotspot/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java
index 0b86e9d1..37b06f71 100644
--- a/hotspot/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java
+++ b/hotspot/test/runtime/memory/LargePages/TestLargePageSizeInBytes.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,15 +24,15 @@
 /* @test TestLargePageSizeInBytes
  * @summary Tests that the flag -XX:LargePageSizeInBytes does not cause warnings on Solaris
  * @bug 8049536
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver TestLargePageSizeInBytes
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestLargePageSizeInBytes {
     private static long M = 1024L * 1024L;
diff --git a/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java b/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java
index 2cfb5a7..9007529 100644
--- a/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java
+++ b/hotspot/test/runtime/memory/LargePages/TestLargePagesFlags.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,15 +23,15 @@
 
 /* @test TestLargePagesFlags
  * @summary Tests how large pages are choosen depending on the given large pages flag combinations.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main TestLargePagesFlags
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 import java.util.ArrayList;
 
 public class TestLargePagesFlags {
diff --git a/hotspot/test/runtime/memory/ReadFromNoaccessArea.java b/hotspot/test/runtime/memory/ReadFromNoaccessArea.java
index e47aa48..6beef36 100644
--- a/hotspot/test/runtime/memory/ReadFromNoaccessArea.java
+++ b/hotspot/test/runtime/memory/ReadFromNoaccessArea.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,18 @@
 /*
  * @test
  * @summary Test that touching noaccess area in class ReservedHeapSpace results in SIGSEGV/ACCESS_VIOLATION
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build ReadFromNoaccessArea
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ReadFromNoaccessArea
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import sun.hotspot.WhiteBox;
 
 public class ReadFromNoaccessArea {
diff --git a/hotspot/test/runtime/memory/ReadVMPageSize.java b/hotspot/test/runtime/memory/ReadVMPageSize.java
index aa83ce0..f9bf76f 100644
--- a/hotspot/test/runtime/memory/ReadVMPageSize.java
+++ b/hotspot/test/runtime/memory/ReadVMPageSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,12 @@
  * @test
  * @summary Using WhiteBox to get VM page size
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build ReadVMPageSize
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm  -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI  ReadVMPageSize
  */
 
-import jdk.test.lib.*;
 import sun.hotspot.WhiteBox;
 
 public class ReadVMPageSize {
diff --git a/hotspot/test/runtime/memory/ReserveMemory.java b/hotspot/test/runtime/memory/ReserveMemory.java
index c9d8030..2a24831 100644
--- a/hotspot/test/runtime/memory/ReserveMemory.java
+++ b/hotspot/test/runtime/memory/ReserveMemory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,16 +28,17 @@
  * @bug 8012015
  * @requires !(os.family == "aix")
  * @summary Make sure reserved (but uncommitted) memory is not accessible
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build ReserveMemory
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ReserveMemory
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
 
 import sun.hotspot.WhiteBox;
diff --git a/hotspot/test/runtime/memory/RunUnitTestsConcurrently.java b/hotspot/test/runtime/memory/RunUnitTestsConcurrently.java
index c03cf8a..d3bb7bd 100644
--- a/hotspot/test/runtime/memory/RunUnitTestsConcurrently.java
+++ b/hotspot/test/runtime/memory/RunUnitTestsConcurrently.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,16 @@
 /*
  * @test
  * @summary Test launches unit tests inside vm concurrently
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build RunUnitTestsConcurrently
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI RunUnitTestsConcurrently 30 15000
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
 import sun.hotspot.WhiteBox;
 
 public class RunUnitTestsConcurrently {
diff --git a/hotspot/test/runtime/memory/StressVirtualSpaceResize.java b/hotspot/test/runtime/memory/StressVirtualSpaceResize.java
index 4fd0534..9a1e7da 100644
--- a/hotspot/test/runtime/memory/StressVirtualSpaceResize.java
+++ b/hotspot/test/runtime/memory/StressVirtualSpaceResize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test
  * @summary Stress test that expands/shrinks VirtualSpace
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build StressVirtualSpaceResize
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI StressVirtualSpaceResize
diff --git a/hotspot/test/runtime/modules/AccModuleTest.java b/hotspot/test/runtime/modules/AccModuleTest.java
index 45d9bb3..8deac7f 100644
--- a/hotspot/test/runtime/modules/AccModuleTest.java
+++ b/hotspot/test/runtime/modules/AccModuleTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,15 +23,12 @@
 
 /*
  * @test
- * @library /testlibrary
  * @modules java.base/jdk.internal.misc
  * @compile acc_module.jcod
- * @build AccModuleTest
  * @run main AccModuleTest
  */
 
 import java.io.File;
-import jdk.test.lib.*;
 
 public class AccModuleTest {
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java
index 71435b1..986fd09 100644
--- a/hotspot/test/runtime/modules/AccessCheck/CheckRead.java
+++ b/hotspot/test/runtime/modules/AccessCheck/CheckRead.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can not read module m2, then class p1.c1
  *          in module m1 can not access p2.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build CheckRead
  * @run main/othervm -Xbootclasspath/a:. CheckRead
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java
index 3342d8f..e084f73 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_CheckRead.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can not read module m2, then class p1.c1
  *          in module m1 can not access p2.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build DiffCL_CheckRead
  * @run main/othervm -Xbootclasspath/a:. DiffCL_CheckRead
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java
index 3d2bb9e..edbca75 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualOther.java
@@ -29,11 +29,10 @@
  *          is exported specifically to module m3, then class p1.c1 in m1 can not
  *          access p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build DiffCL_ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. DiffCL_ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java
index 5854c45..3209810 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpQualToM1.java
@@ -28,11 +28,10 @@
  * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in m2.
  *          Access allowed since m1 can read m2 and package p2 is exported to m1.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build DiffCL_ExpQualToM1
  * @run main/othervm -Xbootclasspath/a:. DiffCL_ExpQualToM1
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java
index 5749076..c8d156e 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_ExpUnqual.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can read module m2, and package p2 in m2 is
  *          exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build DiffCL_ExpUnqual
  * @run main/othervm -Xbootclasspath/a:. DiffCL_ExpUnqual
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java
index 9b1bd96..afc3ec8 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_PkgNotExp.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can read module m2, but package p2 in m2 is not
  *          exported, then class p1.c1 in m1 can not read p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build DiffCL_PkgNotExp
  * @run main/othervm -Xbootclasspath/a:. DiffCL_PkgNotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java
index 09488b6..5f88ede 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_Umod.java
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.module
  * @compile myloaders/MyDiffClassLoader.java
@@ -34,7 +34,6 @@
  * @compile p1/c1.java
  * @compile p1/c1ReadEdgeDiffLoader.java
  * @compile p1/c1Loose.java
- * @build DiffCL_Umod
  * @run main/othervm -Xbootclasspath/a:. DiffCL_Umod
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java
index 3ce9842..b7bb370 100644
--- a/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java
+++ b/hotspot/test/runtime/modules/AccessCheck/DiffCL_UmodUpkg.java
@@ -28,12 +28,11 @@
  * @summary class p3.c3 defined in module m1 tries to access c4 defined in an unnamed package
  *          and an unnamed module.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile c4.java
  * @compile p3/c3.jcod
  * @compile p3/c3ReadEdgeDiffLoader.jcod
- * @build DiffCL_UmodUpkg
  * @run main/othervm -Xbootclasspath/a:. DiffCL_UmodUpkg
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java
index 5cf5132..d1c4b20 100644
--- a/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualOther.java
@@ -29,11 +29,10 @@
  *          is exported specifically to module m3, then class p1.c1 in m1 can not
  *          access p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java
index 4a7822f..035008c 100644
--- a/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java
+++ b/hotspot/test/runtime/modules/AccessCheck/ExpQualToM1.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can read module m2, AND package p2 in m2 is
  *          exported qualifiedly to m1, then class p1.c1 in m1 can read p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build ExpQualToM1
  * @run main/othervm -Xbootclasspath/a:. ExpQualToM1
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java
index 67e69ea..2c321ce 100644
--- a/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java
+++ b/hotspot/test/runtime/modules/AccessCheck/ExpUnqual.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can read module m2, AND package p2 in module2 is
  *          exported unqualifiedly, then class p1.c1 in m1 can read p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build ExpUnqual
  * @run main/othervm -Xbootclasspath/a:. ExpUnqual
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java
index 3762f13..7d5fb59 100644
--- a/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java
+++ b/hotspot/test/runtime/modules/AccessCheck/ExportAllUnnamed.java
@@ -27,13 +27,12 @@
  * @test
  * @summary Test if package p2 in module m2 is exported to all unnamed,
  *          then class p1.c1 in an unnamed module can read p2.c2 in module m2.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.module
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build ExportAllUnnamed
  * @run main/othervm -Xbootclasspath/a:. ExportAllUnnamed
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java
index 0b04497..86e26c5 100644
--- a/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/PkgNotExp.java
@@ -28,11 +28,10 @@
  * @summary Test that if module m1 can read module m2, but package p2 in m2 is not
  *          exported, then class p1.c1 in m1 can not read p2.c2 in m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build PkgNotExp
  * @run main/othervm -Xbootclasspath/a:. PkgNotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod.java b/hotspot/test/runtime/modules/AccessCheck/Umod.java
index c61bcf4..e8d0a04 100644
--- a/hotspot/test/runtime/modules/AccessCheck/Umod.java
+++ b/hotspot/test/runtime/modules/AccessCheck/Umod.java
@@ -26,7 +26,7 @@
 /*
  * @test
  * @summary class p1.c1 defined in m1 tries to access p2.c2 defined in unnamed module.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.base/jdk.internal.module
  * @compile myloaders/MySameClassLoader.java
@@ -34,7 +34,6 @@
  * @compile p1/c1.java
  * @compile p1/c1ReadEdge.java
  * @compile p1/c1Loose.java
- * @build Umod
  * @run main/othervm -Xbootclasspath/a:. Umod
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java
index cde2644..2a9db0f 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpQualOther.java
@@ -29,11 +29,10 @@
  *          Access is denied, since an unnamed module can read all modules but p2 in module
  *          m2 is exported specifically to module m1, not to all modules.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build UmodDiffCL_ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. UmodDiffCL_ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java
index 93b2f14..c83998d 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_ExpUnqual.java
@@ -29,11 +29,10 @@
  *          Access allowed, an unnamed module can read all modules and p2 in module m2
  *          which is exported unqualifiedly.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build UmodDiffCL_ExpUnqual
  * @run main/othervm -Xbootclasspath/a:. UmodDiffCL_ExpUnqual
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java
index aca576b..b4d0461 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_PkgNotExp.java
@@ -29,10 +29,9 @@
  *          Access is denied since even though unnamed module can read all modules, p2
  *          in module m2 is not exported at all.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p1/c1.java
- * @build UmodDiffCL_PkgNotExp
  * @run main/othervm -Xbootclasspath/a:. UmodDiffCL_PkgNotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java
index 6fd2679..f164908 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_Umod.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build UmodDiffCL_Umod
  * @run main/othervm -Xbootclasspath/a:. UmodDiffCL_Umod
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java
index 909ab0f..d9d0414 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodDiffCL_UmodUpkg.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
  * @compile myloaders/MyDiffClassLoader.java
  * @compile c4.java
  * @compile p3/c3.jcod
- * @build UmodDiffCL_UmodUpkg
  * @run main/othervm -Xbootclasspath/a:. UmodDiffCL_UmodUpkg
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java
index 36035e9..4ad9b24 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUPkg.java
@@ -27,12 +27,11 @@
  * @test
  * @summary class p3.c3 defined in module m1 tries to access c4 defined in unnamed module.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile c4.java
  * @compile p3/c3.jcod
  * @compile p3/c3ReadEdge.jcod
- * @build UmodUPkg
  * @run main/othervm -Xbootclasspath/a:. UmodUPkg
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java
index ed81b24..3a64481 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_ExpQualOther.java
@@ -29,11 +29,10 @@
  *          Access is denied, since an unnamed module can read all modules but p6 in module
  *          m2 is exported specifically to module m1, not to all modules.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkgDiffCL_ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. UmodUpkgDiffCL_ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java
index 11d42b7..b06cf17 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_NotExp.java
@@ -28,11 +28,10 @@
  * @summary class c5 in an unnamed module can read module m2, but package p6 in module m2 is not exported.
  *          Access denied since even though unnamed module can read all modules, p6 in module m2 is not exported at all.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkgDiffCL_NotExp
  * @run main/othervm -Xbootclasspath/a:. UmodUpkgDiffCL_NotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java
index 5973895..5411255 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkgDiffCL_Umod.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
  * @compile myloaders/MyDiffClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkgDiffCL_Umod
  * @run main/othervm -Xbootclasspath/a:. UmodUpkgDiffCL_Umod
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java
index 8ea1cdd..33f7482 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_ExpQualOther.java
@@ -28,11 +28,10 @@
  * @summary Test that if class c5 in an unnamed module can read package p6 in module m2, but package p6 in module m2 is
  *          exported qualifiedly to module m3, then class c5 in an unnamed module can not read p6.c6 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkg_ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. UmodUpkg_ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java
index ebf9b5e..f3cda29 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_NotExp.java
@@ -28,11 +28,10 @@
  * @summary Test if package p6 in module m2 is not exported, then class c5
  *          in an unnamed module can not access p6.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkg_NotExp
  * @run main/othervm -Xbootclasspath/a:. UmodUpkg_NotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java
index 7a96e5c..400c41d 100644
--- a/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java
+++ b/hotspot/test/runtime/modules/AccessCheck/UmodUpkg_Umod.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
  * @compile myloaders/MySameClassLoader.java
  * @compile p6/c6.java
  * @compile c5.java
- * @build UmodUpkg_Umod
  * @run main/othervm -Xbootclasspath/a:. UmodUpkg_Umod
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java
index 3c58cdb..74288ef 100644
--- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java
+++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpQualOther.java
@@ -28,11 +28,10 @@
  * @summary Test that if package p2 in module m2 is exported to module m3,
  *          then class p1.c1 in an unnamed module can not read p2.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build Umod_ExpQualOther
  * @run main/othervm -Xbootclasspath/a:. Umod_ExpQualOther
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java
index 6f8f83f..dd69c13 100644
--- a/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java
+++ b/hotspot/test/runtime/modules/AccessCheck/Umod_ExpUnqual.java
@@ -28,11 +28,10 @@
  * @summary Test if package p2 in module m2 is exported unqualifiedly,
  *          then class p1.c1 in an unnamed module can read p2.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build Umod_ExpUnqual
  * @run main/othervm -Xbootclasspath/a:. Umod_ExpUnqual
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java
index 90c071c..e15687e 100644
--- a/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java
+++ b/hotspot/test/runtime/modules/AccessCheck/Umod_PkgNotExp.java
@@ -28,11 +28,10 @@
  * @summary Test if package p2 in module m2 is not exported, then class p1.c1
  *          in an unnamed module can not access p2.c2 in module m2.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile myloaders/MySameClassLoader.java
  * @compile p2/c2.java
  * @compile p1/c1.java
- * @build Umod_PkgNotExp
  * @run main/othervm -Xbootclasspath/a:. Umod_PkgNotExp
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java b/hotspot/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java
index 23abc1e..7adfe52 100644
--- a/hotspot/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java
+++ b/hotspot/test/runtime/modules/AccessCheck/Umod_UmodUpkg.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
  * @compile myloaders/MySameClassLoader.java
  * @compile c4.java
  * @compile p3/c3.jcod
- * @build Umod_UmodUpkg
  * @run main/othervm -Xbootclasspath/a:. Umod_UmodUpkg
  */
 
diff --git a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java
index 8846108..7872d0d 100644
--- a/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java
+++ b/hotspot/test/runtime/modules/AccessCheckAllUnnamed.java
@@ -27,7 +27,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/AccessCheckExp.java b/hotspot/test/runtime/modules/AccessCheckExp.java
index 0adbd72..fa624b0 100644
--- a/hotspot/test/runtime/modules/AccessCheckExp.java
+++ b/hotspot/test/runtime/modules/AccessCheckExp.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/AccessCheckJavaBase.java b/hotspot/test/runtime/modules/AccessCheckJavaBase.java
index dc1b691..24f2f77 100644
--- a/hotspot/test/runtime/modules/AccessCheckJavaBase.java
+++ b/hotspot/test/runtime/modules/AccessCheckJavaBase.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
diff --git a/hotspot/test/runtime/modules/AccessCheckRead.java b/hotspot/test/runtime/modules/AccessCheckRead.java
index 320ba55..a36268a 100644
--- a/hotspot/test/runtime/modules/AccessCheckRead.java
+++ b/hotspot/test/runtime/modules/AccessCheckRead.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
@@ -34,7 +34,6 @@
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AccessCheckRead
  */
 
-import jdk.test.lib.*;
 import java.lang.reflect.Module;
 import static jdk.test.lib.Asserts.*;
 
diff --git a/hotspot/test/runtime/modules/AccessCheckSuper.java b/hotspot/test/runtime/modules/AccessCheckSuper.java
index 663679b..594c192 100644
--- a/hotspot/test/runtime/modules/AccessCheckSuper.java
+++ b/hotspot/test/runtime/modules/AccessCheckSuper.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p3/c3.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/AccessCheckUnnamed.java b/hotspot/test/runtime/modules/AccessCheckUnnamed.java
index 319ee74..4a2ab3e 100644
--- a/hotspot/test/runtime/modules/AccessCheckUnnamed.java
+++ b/hotspot/test/runtime/modules/AccessCheckUnnamed.java
@@ -27,7 +27,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/AccessCheckWorks.java b/hotspot/test/runtime/modules/AccessCheckWorks.java
index 63de8ca..48d6660 100644
--- a/hotspot/test/runtime/modules/AccessCheckWorks.java
+++ b/hotspot/test/runtime/modules/AccessCheckWorks.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/ExportTwice.java b/hotspot/test/runtime/modules/ExportTwice.java
index 93f4e68..538c659 100644
--- a/hotspot/test/runtime/modules/ExportTwice.java
+++ b/hotspot/test/runtime/modules/ExportTwice.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java
index 833182b..3714a9e 100644
--- a/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java
+++ b/hotspot/test/runtime/modules/IgnoreModulePropertiesTest.java
@@ -26,10 +26,11 @@
  * @bug 8136930
  * @summary Test that the VM ignores explicitly specified module internal properties.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 // Test that the VM ignores module related properties such as "jdk.module.addmods"
 // and jdk.module.addreads.0" that can only be set using module options.
diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java
index 8ea4f6b..7a08787 100644
--- a/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java
+++ b/hotspot/test/runtime/modules/JVMAddModuleExportToAllUnnamed.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMAddModuleExports.java b/hotspot/test/runtime/modules/JVMAddModuleExports.java
index 1f0dcae..6895236 100644
--- a/hotspot/test/runtime/modules/JVMAddModuleExports.java
+++ b/hotspot/test/runtime/modules/JVMAddModuleExports.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java
index 9f6e69f..80db658 100644
--- a/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java
+++ b/hotspot/test/runtime/modules/JVMAddModuleExportsToAll.java
@@ -27,7 +27,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @compile p1/c1.java
  * @build sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMAddModulePackage.java b/hotspot/test/runtime/modules/JVMAddModulePackage.java
index 359e3f2..502b449 100644
--- a/hotspot/test/runtime/modules/JVMAddModulePackage.java
+++ b/hotspot/test/runtime/modules/JVMAddModulePackage.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMAddReadsModule.java b/hotspot/test/runtime/modules/JVMAddReadsModule.java
index dda6282..a25bcfc 100644
--- a/hotspot/test/runtime/modules/JVMAddReadsModule.java
+++ b/hotspot/test/runtime/modules/JVMAddReadsModule.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMCanReadModule.java b/hotspot/test/runtime/modules/JVMCanReadModule.java
index daabd21..c6707d2 100644
--- a/hotspot/test/runtime/modules/JVMCanReadModule.java
+++ b/hotspot/test/runtime/modules/JVMCanReadModule.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMDefineModule.java b/hotspot/test/runtime/modules/JVMDefineModule.java
index 82f5065..f4a838a 100644
--- a/hotspot/test/runtime/modules/JVMDefineModule.java
+++ b/hotspot/test/runtime/modules/JVMDefineModule.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary  /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java
index 88ff93a..1f58193 100644
--- a/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java
+++ b/hotspot/test/runtime/modules/JVMGetModuleByPkgName.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @compile p2/c2.java
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
diff --git a/hotspot/test/runtime/modules/JVMIsExportedToModule.java b/hotspot/test/runtime/modules/JVMIsExportedToModule.java
index 2d46500..3f58cb5 100644
--- a/hotspot/test/runtime/modules/JVMIsExportedToModule.java
+++ b/hotspot/test/runtime/modules/JVMIsExportedToModule.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/LoadUnloadModuleStress.java b/hotspot/test/runtime/modules/LoadUnloadModuleStress.java
index ec30f58..1f27ba9 100644
--- a/hotspot/test/runtime/modules/LoadUnloadModuleStress.java
+++ b/hotspot/test/runtime/modules/LoadUnloadModuleStress.java
@@ -25,7 +25,7 @@
  * @test
  * @summary Ensure module information is cleaned when owning class loader unloads
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib /compiler/whitebox ..
+ * @library /test/lib ..
  * @build sun.hotspot.WhiteBox
  * @compile/module=java.base java/lang/reflect/ModuleHelper.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
diff --git a/hotspot/test/runtime/modules/ModuleOptionsTest.java b/hotspot/test/runtime/modules/ModuleOptionsTest.java
index 2efb8bc..a1dec01 100644
--- a/hotspot/test/runtime/modules/ModuleOptionsTest.java
+++ b/hotspot/test/runtime/modules/ModuleOptionsTest.java
@@ -27,10 +27,11 @@
  * @summary Test that the VM only recognizes the last specified --add-modules
  *          and --list-modules options
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 // Test that the VM behaves correctly when processing module related options.
 public class ModuleOptionsTest {
diff --git a/hotspot/test/runtime/modules/ModuleOptionsWarn.java b/hotspot/test/runtime/modules/ModuleOptionsWarn.java
index e595c55..7ad1f9b 100644
--- a/hotspot/test/runtime/modules/ModuleOptionsWarn.java
+++ b/hotspot/test/runtime/modules/ModuleOptionsWarn.java
@@ -26,10 +26,11 @@
  * @bug 8162415
  * @summary Test warnings for ignored properties.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 // Test that the VM behaves correctly when processing command line module system properties.
 public class ModuleOptionsWarn {
diff --git a/hotspot/test/runtime/modules/ModuleStress/ExportModuleStressTest.java b/hotspot/test/runtime/modules/ModuleStress/ExportModuleStressTest.java
index e170d5e..389e514 100644
--- a/hotspot/test/runtime/modules/ModuleStress/ExportModuleStressTest.java
+++ b/hotspot/test/runtime/modules/ModuleStress/ExportModuleStressTest.java
@@ -26,15 +26,15 @@
  * @bug 8156871
  * @summary package in the boot layer is repeatedly exported to unique module created in layers on top of the boot layer
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile ../CompilerUtils.java
- * @build ExportModuleStressTest
  * @run main/othervm ExportModuleStressTest
  */
 
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ExportModuleStressTest {
 
diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java
index d7791e9..2da921d 100644
--- a/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java
+++ b/hotspot/test/runtime/modules/ModuleStress/ModuleStress.java
@@ -28,16 +28,17 @@
  * @bug 8159262
  * @summary Test differing scenarios where a module's readability list and a package's exportability list should be walked
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile ../AccessCheck/ModuleLibrary.java
  * @compile ModuleSameCLMain.java
  * @compile ModuleNonBuiltinCLMain.java
  * @compile CustomSystemClassLoader.java
- * @build ModuleStress
  * @run main/othervm ModuleStress
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.InMemoryJavaCompiler;
 import java.io.File;
 
 public class ModuleStress {
diff --git a/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java b/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java
index 8ee2fb8..9db70d4 100644
--- a/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java
+++ b/hotspot/test/runtime/modules/ModuleStress/ModuleStressGC.java
@@ -26,15 +26,15 @@
  * @bug 8159262
  * @summary layers over the boot layer are repeatedly created, during this iteration, GCs are forced to verify correct walk of module and package lists.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @compile ../CompilerUtils.java
- * @build ModuleStressGC
  * @run main/othervm ModuleStressGC
  */
 
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class ModuleStressGC {
 
diff --git a/hotspot/test/runtime/modules/PatchModule/BasicJarBuilder.java b/hotspot/test/runtime/modules/PatchModule/BasicJarBuilder.java
index ab8955c..b3242ba 100644
--- a/hotspot/test/runtime/modules/PatchModule/BasicJarBuilder.java
+++ b/hotspot/test/runtime/modules/PatchModule/BasicJarBuilder.java
@@ -29,8 +29,6 @@
  *   Output: A jar containing compiled classes, placed in a test classes folder
  */
 
-import jdk.test.lib.*;
-
 import java.io.File;
 import java.util.ArrayList;
 import sun.tools.jar.Main;
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java b/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java
index 8b04db2..5af477b 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModule2Dirs.java
@@ -25,12 +25,14 @@
  * @test
  * @summary Make sure --patch-module works with multiple directories.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile PatchModule2DirsMain.java
  * @run main PatchModule2Dirs
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import java.io.File;
 
 public class PatchModule2Dirs {
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java
index 3ad5dab..a7f4784 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleCDS.java
@@ -23,13 +23,14 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @run main PatchModuleCDS
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleCDS {
 
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java
index e1d29ad..6b19f28 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupJavaBase.java
@@ -25,10 +25,11 @@
  * @test
  * @summary VM exit initialization results if java.base is specificed more than once to --patch-module.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleDupJavaBase {
   // The VM should exit initialization if java.base is specified
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java
index 2b56665..f87a582 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleDupModule.java
@@ -25,10 +25,11 @@
  * @test
  * @summary Module system initialization exception results if a module is specificed twice to --patch-module.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleDupModule {
 
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java
index c9d957f..e433257 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleJavaBase.java
@@ -26,12 +26,14 @@
  * @bug 8130399
  * @summary Make sure --patch-module works for java.base.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile PatchModuleMain.java
  * @run main PatchModuleJavaBase
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleJavaBase {
 
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java
index c85c88e..a5eb563 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTest.java
@@ -26,12 +26,14 @@
  * @bug 8130399
  * @summary Make sure --patch-module works for modules besides java.base.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile PatchModuleMain.java
  * @run main PatchModuleTest
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleTest {
 
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java
index c9ed809..c7775c0 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJar.java
@@ -24,15 +24,16 @@
 /*
  * @test
  * @summary Make sure --patch-module works when a jar file is specified for a module
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.jartool/sun.tools.jar
- * @build BasicJarBuilder
  * @compile PatchModuleMain.java
  * @run main PatchModuleTestJar
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleTestJar {
     private static String moduleJar;
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java
index 4220816..18cc259 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTestJarDir.java
@@ -24,17 +24,18 @@
 /*
  * @test
  * @summary Make sure --patch-module works when a jar file and a directory is specified for a module
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.jartool/sun.tools.jar
- * @build BasicJarBuilder
  * @compile PatchModule2DirsMain.java
  * @run main PatchModuleTestJarDir
  */
 
 import java.io.File;
 import java.nio.file.Files;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleTestJarDir {
     private static String moduleJar;
diff --git a/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java b/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java
index 0d3bdea..7dda4a5 100644
--- a/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java
+++ b/hotspot/test/runtime/modules/PatchModule/PatchModuleTraceCL.java
@@ -27,13 +27,15 @@
  * @summary Make sure -Xlog:classload=info works properly with "modules" jimage,
             --patch-module, and with -Xbootclasspath/a
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile PatchModuleMain.java
  * @run main PatchModuleTraceCL
  */
 
 import java.io.File;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleTraceCL {
 
diff --git a/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java b/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java
index 89afde3..95fbce1 100644
--- a/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java
+++ b/hotspot/test/runtime/modules/Visibility/PatchModuleVisibility.java
@@ -26,7 +26,7 @@
  * @summary Ensure that a newly introduced java.base package placed within the --patch-module
  *          directory is considered part of the boot loader's visibility boundary
  * @requires !(os.family == "windows")
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm PatchModuleVisibility
@@ -36,7 +36,9 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class PatchModuleVisibility {
 
diff --git a/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java b/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java
index 3f92fd3..5f56b257 100644
--- a/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java
+++ b/hotspot/test/runtime/modules/Visibility/XbootcpNoVisibility.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
  * @test
  * @summary Ensure that a class defined within a java.base package can not
  *          be located via -Xbootclasspath/a
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm XbootcpNoVisibility
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class XbootcpNoVisibility {
     public static void main(String args[]) throws Exception {
diff --git a/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java b/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java
index c58ff0b..1530d8b 100644
--- a/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java
+++ b/hotspot/test/runtime/modules/Visibility/XbootcpVisibility.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @summary Ensure that a package whose module has not been defined to the boot loader
  *          is correctly located with -Xbootclasspath/a
  * @requires !(os.family == "windows")
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm XbootcpVisibility
@@ -36,7 +36,9 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
 
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class XbootcpVisibility {
 
diff --git a/hotspot/test/runtime/os/AvailableProcessors.java b/hotspot/test/runtime/os/AvailableProcessors.java
index a607573..29a496c 100644
--- a/hotspot/test/runtime/os/AvailableProcessors.java
+++ b/hotspot/test/runtime/os/AvailableProcessors.java
@@ -21,8 +21,8 @@
  * questions.
  */
 import java.io.File;
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import java.util.ArrayList;
 
 /*
@@ -31,8 +31,7 @@
  * @summary Check that availableProcessors reports the correct value when running in a cpuset on linux
  * @requires os.family == "linux"
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @run driver AvailableProcessors
  */
 public class AvailableProcessors {
diff --git a/hotspot/test/runtime/verifier/OverriderMsg.java b/hotspot/test/runtime/verifier/OverriderMsg.java
index dffa438..8e484da 100644
--- a/hotspot/test/runtime/verifier/OverriderMsg.java
+++ b/hotspot/test/runtime/verifier/OverriderMsg.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,12 +26,13 @@
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test OverriderMsg
  * @bug 8026894
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
diff --git a/hotspot/test/runtime/verifier/TestANewArray.java b/hotspot/test/runtime/verifier/TestANewArray.java
index 4414e88..a94ce25 100644
--- a/hotspot/test/runtime/verifier/TestANewArray.java
+++ b/hotspot/test/runtime/verifier/TestANewArray.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,12 +28,13 @@
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test
  * @summary Test that anewarray bytecode is valid only if it specifies 255 or fewer dimensions.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
diff --git a/hotspot/test/runtime/verifier/TestMultiANewArray.java b/hotspot/test/runtime/verifier/TestMultiANewArray.java
index 96e2206..7e53ce2 100644
--- a/hotspot/test/runtime/verifier/TestMultiANewArray.java
+++ b/hotspot/test/runtime/verifier/TestMultiANewArray.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,12 +26,13 @@
 import jdk.internal.org.objectweb.asm.ClassWriter;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import static jdk.internal.org.objectweb.asm.Opcodes.*;
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /*
  * @test TestMultiANewArray
  * @bug 8038076
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.org.objectweb.asm
  *          java.base/jdk.internal.misc
  *          java.management
diff --git a/hotspot/test/runtime/verifier/TraceClassRes.java b/hotspot/test/runtime/verifier/TraceClassRes.java
index c8b5d5e..8e6ef28 100644
--- a/hotspot/test/runtime/verifier/TraceClassRes.java
+++ b/hotspot/test/runtime/verifier/TraceClassRes.java
@@ -26,10 +26,11 @@
  * @bug 8076318
  * @summary split verifier needs to add TraceClassResolution
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 // Test that the verifier outputs the classes it loads if -XX:+TraceClassResolution is specified"
 public class TraceClassRes {
diff --git a/hotspot/test/runtime/whitebox/WBStackSize.java b/hotspot/test/runtime/whitebox/WBStackSize.java
index 9bc117b..c1429bb 100644
--- a/hotspot/test/runtime/whitebox/WBStackSize.java
+++ b/hotspot/test/runtime/whitebox/WBStackSize.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test WBStackSize
  * @summary verify that whitebox functions getThreadFullStackSize() and getThreadRemainingStackSize are working
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build WBStackSize
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xss512k WBStackSize
diff --git a/hotspot/test/sanity/MismatchedWhiteBox/WhiteBox.java b/hotspot/test/sanity/MismatchedWhiteBox/WhiteBox.java
index a6f4424..fb99239 100644
--- a/hotspot/test/sanity/MismatchedWhiteBox/WhiteBox.java
+++ b/hotspot/test/sanity/MismatchedWhiteBox/WhiteBox.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary verify that whitebox can be used even if not all functions are declared in java-part
  * @author igor.ignatyev@oracle.com
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @compile WhiteBox.java
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-CheckIntrinsics sun.hotspot.WhiteBox
diff --git a/hotspot/test/sanity/WBApi.java b/hotspot/test/sanity/WBApi.java
index e24e672..bc5aa61 100644
--- a/hotspot/test/sanity/WBApi.java
+++ b/hotspot/test/sanity/WBApi.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test WBApi
  * @summary verify that whitebox functions can be linked and executed
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build WBApi
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI WBApi
diff --git a/hotspot/test/serviceability/ParserTest.java b/hotspot/test/serviceability/ParserTest.java
index 58ef23b..2fca0ec 100644
--- a/hotspot/test/serviceability/ParserTest.java
+++ b/hotspot/test/serviceability/ParserTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,8 @@
  * @test
  * @summary Test that the diagnostic command arguemnt parser works
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary /test/lib
- * @build ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.parser.*
+ * @library /test/lib
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI ParserTest
diff --git a/hotspot/test/serviceability/attach/AttachSetGetFlag.java b/hotspot/test/serviceability/attach/AttachSetGetFlag.java
index 81e3a01..3b48759 100644
--- a/hotspot/test/serviceability/attach/AttachSetGetFlag.java
+++ b/hotspot/test/serviceability/attach/AttachSetGetFlag.java
@@ -25,13 +25,12 @@
  * @test
  * @bug 8054823
  * @summary Tests the setFlag and printFlag attach command
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.attach/sun.tools.attach
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.* AttachSetGetFlag
  * @run main AttachSetGetFlag
  */
 
@@ -47,7 +46,7 @@
 
 import jdk.test.lib.Asserts;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 import com.sun.tools.attach.VirtualMachine;
 
 public class AttachSetGetFlag {
diff --git a/hotspot/test/serviceability/attach/AttachWithStalePidFile.java b/hotspot/test/serviceability/attach/AttachWithStalePidFile.java
index 5cc42ca..8be22f0 100644
--- a/hotspot/test/serviceability/attach/AttachWithStalePidFile.java
+++ b/hotspot/test/serviceability/attach/AttachWithStalePidFile.java
@@ -28,12 +28,12 @@
  * @summary Regression test for attach issue where stale pid files in /tmp lead to connection issues
  * @modules java.base/jdk.internal.misc
  * @modules jdk.attach/sun.tools.attach
- * @library /testlibrary
- * @build jdk.test.lib.* AttachWithStalePidFileTarget
+ * @library /test/lib
  * @run main AttachWithStalePidFile
  */
 
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.ProcessTools;
 import com.sun.tools.attach.VirtualMachine;
 import sun.tools.attach.HotSpotVirtualMachine;
 import java.lang.reflect.Field;
diff --git a/hotspot/test/serviceability/dcmd/compiler/CodeCacheTest.java b/hotspot/test/serviceability/dcmd/compiler/CodeCacheTest.java
index 4bbf6b1..07251f3 100644
--- a/hotspot/test/serviceability/dcmd/compiler/CodeCacheTest.java
+++ b/hotspot/test/serviceability/dcmd/compiler/CodeCacheTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,11 @@
 /*
  * @test CodeCacheTest
  * @bug 8054889
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+SegmentedCodeCache CodeCacheTest
  * @run testng/othervm -XX:-SegmentedCodeCache CodeCacheTest
  * @run testng/othervm -Xint -XX:+SegmentedCodeCache CodeCacheTest
@@ -40,7 +38,7 @@
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
diff --git a/hotspot/test/serviceability/dcmd/compiler/CodelistTest.java b/hotspot/test/serviceability/dcmd/compiler/CodelistTest.java
index 7125a57..e0bdd40 100644
--- a/hotspot/test/serviceability/dcmd/compiler/CodelistTest.java
+++ b/hotspot/test/serviceability/dcmd/compiler/CodelistTest.java
@@ -24,15 +24,12 @@
 /*
  * @test CodelistTest
  * @bug 8054889
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:-UseCodeCacheFlushing -Xmixed CodelistTest
@@ -48,7 +45,7 @@
 
 import compiler.testlibrary.CompilerUtils;
 import compiler.whitebox.CompilerWhiteBoxTest;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import org.testng.annotations.Test;
diff --git a/hotspot/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java b/hotspot/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java
index 7851431..c43dfaf 100644
--- a/hotspot/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java
+++ b/hotspot/test/serviceability/dcmd/compiler/CompilerDirectivesDCMDTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,18 +24,15 @@
 /*
  * @test CompilerDirectivesDCMDTest
  * @bug 8137167
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @run main ClassFileInstaller jdk.test.lib.Platform
  * @run testng/othervm CompilerDirectivesDCMDTest
  * @summary Test of diagnostic command
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import jdk.test.lib.Platform;
diff --git a/hotspot/test/serviceability/dcmd/compiler/CompilerQueueTest.java b/hotspot/test/serviceability/dcmd/compiler/CompilerQueueTest.java
index 217e9c2..3640bbc 100644
--- a/hotspot/test/serviceability/dcmd/compiler/CompilerQueueTest.java
+++ b/hotspot/test/serviceability/dcmd/compiler/CompilerQueueTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,16 +24,13 @@
 /*
  * @test CompilerQueueTest
  * @bug 8054889
- * @library /testlibrary /test/lib /
+ * @library /test/lib /
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
  * @summary Test of diagnostic command Compiler.queue
- * @build jdk.test.lib.*
- *        jdk.test.lib.dcmd.*
- *        sun.hotspot.WhiteBox
- *        compiler.testlibrary.CompilerUtils
+ * @build sun.hotspot.WhiteBox
  * @run driver ClassFileInstaller sun.hotspot.WhiteBox
  *                                sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run testng/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xmixed -XX:+WhiteBoxAPI CompilerQueueTest
@@ -42,7 +39,7 @@
  */
 
 import compiler.testlibrary.CompilerUtils;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import org.testng.annotations.Test;
diff --git a/hotspot/test/serviceability/dcmd/framework/HelpTest.java b/hotspot/test/serviceability/dcmd/framework/HelpTest.java
index 012bcf8..b172db8 100644
--- a/hotspot/test/serviceability/dcmd/framework/HelpTest.java
+++ b/hotspot/test/serviceability/dcmd/framework/HelpTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 import jdk.test.lib.dcmd.MainClassJcmdExecutor;
@@ -32,13 +32,11 @@
 /*
  * @test
  * @summary Test of diagnostic command help (tests all DCMD executors)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData HelpTest
  */
 public class HelpTest {
diff --git a/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java b/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java
index afd3755..be8a4d8 100644
--- a/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java
+++ b/hotspot/test/serviceability/dcmd/framework/InvalidCommandTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 import jdk.test.lib.dcmd.MainClassJcmdExecutor;
@@ -32,13 +32,11 @@
 /*
  * @test
  * @summary Test of invalid diagnostic command (tests all DCMD executors)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData InvalidCommandTest
  */
 public class InvalidCommandTest {
diff --git a/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java b/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java
index 7daa95f..dadaf31 100644
--- a/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java
+++ b/hotspot/test/serviceability/dcmd/framework/VMVersionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 import jdk.test.lib.dcmd.MainClassJcmdExecutor;
@@ -33,13 +33,11 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.version (tests all DCMD executors)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+UsePerfData VMVersionTest
  */
 public class VMVersionTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/ClassHistogramAllTest.java b/hotspot/test/serviceability/dcmd/gc/ClassHistogramAllTest.java
index 331421a..bc2f3e2 100644
--- a/hotspot/test/serviceability/dcmd/gc/ClassHistogramAllTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/ClassHistogramAllTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,11 @@
 /*
  * @test
  * @summary Test of diagnostic command GC.class_histogram -all=true
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @build ClassHistogramTest
  * @run testng ClassHistogramAllTest
  */
 public class ClassHistogramAllTest extends ClassHistogramTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/ClassHistogramTest.java b/hotspot/test/serviceability/dcmd/gc/ClassHistogramTest.java
index 996074a..5b4f017 100644
--- a/hotspot/test/serviceability/dcmd/gc/ClassHistogramTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/ClassHistogramTest.java
@@ -25,20 +25,18 @@
 
 import java.util.regex.Pattern;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
 /*
  * @test
  * @summary Test of diagnostic command GC.class_histogram
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng ClassHistogramTest
  */
 public class ClassHistogramTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java b/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java
index 05b0627..c5d27b9 100644
--- a/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/FinalizerInfoTest.java
@@ -28,19 +28,17 @@
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 
 /*
  * @test
  * @summary
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.xml
  *          java.management
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng FinalizerInfoTest
  */
 public class FinalizerInfoTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java b/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java
index ca38cbb..257acea 100644
--- a/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/HeapDumpAllTest.java
@@ -24,19 +24,11 @@
 /*
  * @test
  * @summary Test of diagnostic command GC.heap_dump -all=true
- * @library /testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @build jdk.test.lib.hprof.*
- * @build jdk.test.lib.hprof.model.*
- * @build jdk.test.lib.hprof.parser.*
- * @build jdk.test.lib.hprof.util.*
- * @build HeapDumpTest
  * @run testng HeapDumpAllTest
  */
 public class HeapDumpAllTest extends HeapDumpTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java b/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java
index 0329cb6..257a30f 100644
--- a/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/HeapDumpTest.java
@@ -33,25 +33,18 @@
 import jdk.test.lib.hprof.model.Snapshot;
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
 
 /*
  * @test
  * @summary Test of diagnostic command GC.heap_dump
- * @library /testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @build jdk.test.lib.hprof.*
- * @build jdk.test.lib.hprof.model.*
- * @build jdk.test.lib.hprof.parser.*
- * @build jdk.test.lib.hprof.util.*
  * @run testng HeapDumpTest
  */
 public class HeapDumpTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java b/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java
index 5193e6c..b229755 100644
--- a/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/HeapInfoTest.java
@@ -28,18 +28,16 @@
 
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 
 /*
  * @test
  * @summary Test of diagnostic command GC.heap_info
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.xml
  *          java.management
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng HeapInfoTest
  */
 public class HeapInfoTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java b/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java
index 9e22ada..22af05f0 100644
--- a/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/RunFinalizationTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,16 +30,12 @@
 /*
  * @test
  * @summary Test of diagnostic command GC.run_finalization
- * @library /testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @build jdk.test.lib.process.*
- * @build RunFinalizationTest FinalizationRunner
+ * @build FinalizationRunner
  * @run main RunFinalizationTest
  */
 public class RunFinalizationTest {
diff --git a/hotspot/test/serviceability/dcmd/gc/RunGCTest.java b/hotspot/test/serviceability/dcmd/gc/RunGCTest.java
index 7813605..44bd09a 100644
--- a/hotspot/test/serviceability/dcmd/gc/RunGCTest.java
+++ b/hotspot/test/serviceability/dcmd/gc/RunGCTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,20 +29,18 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
 /*
  * @test
  * @summary Test of diagnostic command GC.run
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -Xlog:gc=debug:RunGC.gclog -XX:-ExplicitGCInvokesConcurrent RunGCTest
  */
 public class RunGCTest {
diff --git a/hotspot/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java b/hotspot/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java
index b25999a..189f9a7 100644
--- a/hotspot/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java
+++ b/hotspot/test/serviceability/dcmd/jvmti/DataDumpDcmdTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import jdk.test.lib.dcmd.PidJcmdExecutor;
@@ -32,8 +32,7 @@
  * @bug 8054890
  * @summary Test of JVMTI.data_dump diagnostic command
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @run testng DataDumpDcmdTest
  */
 
diff --git a/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java b/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java
index f27bd3a..82b563b 100644
--- a/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java
+++ b/hotspot/test/serviceability/dcmd/jvmti/LoadAgentDcmdTest.java
@@ -26,7 +26,8 @@
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import java.util.jar.Manifest;
-import jdk.test.lib.*;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.*;
 import org.testng.annotations.Test;
 
@@ -35,13 +36,13 @@
  *
  * @test
  * @bug 8147388
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.instrument
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* SimpleJvmtiAgent
+ * @build SimpleJvmtiAgent
  * @ignore 8150318
  * @run main ClassFileInstaller SimpleJvmtiAgent
  * @run testng LoadAgentDcmdTest
@@ -59,7 +60,7 @@
                       "'-Dtest.jdk=/path/to/jdk'.");
         }
 
-        Path libpath = Paths.get(jdkPath, Platform.jdkLibPath(), Platform.sharedObjectName("instrument"));
+        Path libpath = Paths.get(jdkPath, jdkLibPath(), sharedObjectName("instrument"));
 
         if (!libpath.toFile().exists()) {
             throw new FileNotFoundException(
@@ -129,6 +130,32 @@
             throw new RuntimeException(e);
         }
     }
+    /**
+     * return path to library inside jdk tree
+     */
+    public static String jdkLibPath() {
+        if (Platform.isWindows()) {
+            return "bin";
+        }
+        if (Platform.isOSX()) {
+            return "lib";
+        }
+
+        return "lib/" + Platform.getOsArch();
+    }
+
+    /**
+     * Build name of shared object according to platform rules
+     */
+    public static String sharedObjectName(String name) {
+        if (Platform.isWindows()) {
+            return name + ".dll";
+        }
+        if (Platform.isOSX()) {
+            return "lib" + name + ".dylib";
+        }
+        return "lib" + name + ".so";
+    }
 
     @Test
     public void jmx() throws Throwable {
diff --git a/hotspot/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java b/hotspot/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java
index 55e0728..b931c42 100644
--- a/hotspot/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java
+++ b/hotspot/test/serviceability/dcmd/thread/PrintConcurrentLocksTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,14 +24,11 @@
 /*
  * @test
  * @summary Test of diagnostic command Thread.print -l=true
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
- * @build PrintTest
  * @run testng PrintConcurrentLocksTest
  */
 public class PrintConcurrentLocksTest extends PrintTest {
diff --git a/hotspot/test/serviceability/dcmd/thread/PrintTest.java b/hotspot/test/serviceability/dcmd/thread/PrintTest.java
index 79f9b04..77e22e1 100644
--- a/hotspot/test/serviceability/dcmd/thread/PrintTest.java
+++ b/hotspot/test/serviceability/dcmd/thread/PrintTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
@@ -37,13 +37,11 @@
 /*
  * @test
  * @summary Test of diagnostic command Thread.print
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng PrintTest
  */
 public class PrintTest {
diff --git a/hotspot/test/serviceability/dcmd/vm/ClassHierarchyTest.java b/hotspot/test/serviceability/dcmd/vm/ClassHierarchyTest.java
index 63c509d..aee55b5 100644
--- a/hotspot/test/serviceability/dcmd/vm/ClassHierarchyTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/ClassHierarchyTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,18 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.class_hierarchy
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng ClassHierarchyTest
  */
 
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
diff --git a/hotspot/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java b/hotspot/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java
index fcabb13..d2230e3 100644
--- a/hotspot/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/ClassLoaderStatsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,20 +24,18 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.classloader_stats
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng ClassLoaderStatsTest
  */
 
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
diff --git a/hotspot/test/serviceability/dcmd/vm/CommandLineTest.java b/hotspot/test/serviceability/dcmd/vm/CommandLineTest.java
index 6d8c174..ac04d02 100644
--- a/hotspot/test/serviceability/dcmd/vm/CommandLineTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/CommandLineTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import org.testng.annotations.Test;
 
 import jdk.test.lib.dcmd.CommandExecutor;
@@ -30,13 +30,11 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.command_line
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis CommandLineTest
  */
 public class CommandLineTest {
diff --git a/hotspot/test/serviceability/dcmd/vm/DynLibsTest.java b/hotspot/test/serviceability/dcmd/vm/DynLibsTest.java
index b8c2fbe..5bd7a08 100644
--- a/hotspot/test/serviceability/dcmd/vm/DynLibsTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/DynLibsTest.java
@@ -1,13 +1,13 @@
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Platform;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,13 +32,11 @@
 /*
  * @test
  * @summary Test of VM.dynlib diagnostic command via MBean
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng DynLibsTest
  */
 
diff --git a/hotspot/test/serviceability/dcmd/vm/FlagsTest.java b/hotspot/test/serviceability/dcmd/vm/FlagsTest.java
index 1ed2da1..f83ab76 100644
--- a/hotspot/test/serviceability/dcmd/vm/FlagsTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/FlagsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import org.testng.annotations.Test;
@@ -29,13 +29,11 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.flags
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng/othervm -Xmx129m -XX:+UnlockDiagnosticVMOptions -XX:+IgnoreUnrecognizedVMOptions -XX:+ThereShouldNotBeAnyVMOptionNamedLikeThis_Right -XX:-TieredCompilation FlagsTest
  */
 public class FlagsTest {
diff --git a/hotspot/test/serviceability/dcmd/vm/SetVMFlagTest.java b/hotspot/test/serviceability/dcmd/vm/SetVMFlagTest.java
index 663a7bc..3d8b029 100644
--- a/hotspot/test/serviceability/dcmd/vm/SetVMFlagTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/SetVMFlagTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 import org.testng.annotations.Test;
@@ -32,9 +32,7 @@
  * @bug 8054890
  * @summary Test of VM.set_flag diagnostic command
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
+ * @library /test/lib
  * @run testng SetVMFlagTest
  */
 
diff --git a/hotspot/test/serviceability/dcmd/vm/SystemPropertiesTest.java b/hotspot/test/serviceability/dcmd/vm/SystemPropertiesTest.java
index ae3d6ae..71ec4e1 100644
--- a/hotspot/test/serviceability/dcmd/vm/SystemPropertiesTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/SystemPropertiesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,20 +23,18 @@
 
 import org.testng.annotations.Test;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
 /*
  * @test
  * @summary Test of diagnostic command VM.system_properties
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng SystemPropertiesTest
  */
 public class SystemPropertiesTest {
diff --git a/hotspot/test/serviceability/dcmd/vm/UptimeTest.java b/hotspot/test/serviceability/dcmd/vm/UptimeTest.java
index 02783bf..a907421 100644
--- a/hotspot/test/serviceability/dcmd/vm/UptimeTest.java
+++ b/hotspot/test/serviceability/dcmd/vm/UptimeTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 import org.testng.annotations.Test;
 import org.testng.Assert;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.dcmd.CommandExecutor;
 import jdk.test.lib.dcmd.JMXExecutor;
 
@@ -34,13 +34,11 @@
 /*
  * @test
  * @summary Test of diagnostic command VM.uptime
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
- * @build jdk.test.lib.dcmd.*
  * @run testng UptimeTest
  */
 public class UptimeTest {
diff --git a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java
index 90855ba..5fa6c9e 100644
--- a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java
+++ b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java
@@ -24,7 +24,7 @@
 /**
  * @test
  * @summary Verifies the JVMTI GetAllModules API
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm -agentlib:JvmtiGetAllModulesTest JvmtiGetAllModulesTest
  *
  */
diff --git a/hotspot/test/serviceability/jvmti/GetObjectSizeClass.java b/hotspot/test/serviceability/jvmti/GetObjectSizeClass.java
index cec03f3..1030675 100644
--- a/hotspot/test/serviceability/jvmti/GetObjectSizeClass.java
+++ b/hotspot/test/serviceability/jvmti/GetObjectSizeClass.java
@@ -21,19 +21,22 @@
  * questions.
  */
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+
 
 /*
  * @test
  * @bug 8075030
  * @summary JvmtiEnv::GetObjectSize reports incorrect java.lang.Class instance size
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.instrument
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* GetObjectSizeClassAgent
+ * @build GetObjectSizeClassAgent
  * @run main ClassFileInstaller GetObjectSizeClassAgent
  * @run main GetObjectSizeClass
  */
diff --git a/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java b/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java
index 562dda8..e2a801a 100644
--- a/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java
+++ b/hotspot/test/serviceability/jvmti/GetObjectSizeOverflow.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,20 +21,23 @@
  * questions.
  */
 import java.io.PrintWriter;
-import jdk.test.lib.*;
+import jdk.test.lib.JDKToolFinder;
+import jdk.test.lib.Platform;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 /*
  * Test to verify GetObjectSize does not overflow on a 600M element int[]
  *
  * @test
  * @bug 8027230
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.instrument
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* GetObjectSizeOverflowAgent
+ * @build GetObjectSizeOverflowAgent
  * @run main ClassFileInstaller GetObjectSizeOverflowAgent
  * @run main GetObjectSizeOverflow
  */
diff --git a/hotspot/test/serviceability/jvmti/TestLambdaFormRetransformation.java b/hotspot/test/serviceability/jvmti/TestLambdaFormRetransformation.java
index aeda7a1..9d59fc6 100644
--- a/hotspot/test/serviceability/jvmti/TestLambdaFormRetransformation.java
+++ b/hotspot/test/serviceability/jvmti/TestLambdaFormRetransformation.java
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @test
  * @bug 8008678
  * @summary JSR 292: constant pool reconstitution must support pseudo strings
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.instrument
  *          java.management
@@ -46,9 +46,9 @@
 import java.security.ProtectionDomain;
 import java.util.Arrays;
 
-import jdk.test.lib.ExitCode;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ExitCode;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestLambdaFormRetransformation {
     private static String MANIFEST = String.format("Manifest-Version: 1.0\n" +
diff --git a/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java b/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java
index 8584099..4a9bb26 100644
--- a/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java
+++ b/hotspot/test/serviceability/jvmti/TestRedefineWithUnresolvedClass.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,22 +25,22 @@
  * @test
  * @summary Redefine a class with an UnresolvedClass reference in the constant pool.
  * @bug 8035150
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.instrument
  *          java.management
  *          jdk.jartool/sun.tools.jar
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.* UnresolvedClassAgent
+ * @build UnresolvedClassAgent
  * @run main TestRedefineWithUnresolvedClass
  */
 
 import java.io.File;
 import java.util.Arrays;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 public class TestRedefineWithUnresolvedClass {
 
diff --git a/hotspot/test/serviceability/logging/TestBasicLogOutput.java b/hotspot/test/serviceability/logging/TestBasicLogOutput.java
index 345e373..6c7b260 100644
--- a/hotspot/test/serviceability/logging/TestBasicLogOutput.java
+++ b/hotspot/test/serviceability/logging/TestBasicLogOutput.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test TestBasicLogOutput
  * @summary Ensure logging can be enabled and successfully prints to stdout.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestBasicLogOutput {
 
diff --git a/hotspot/test/serviceability/logging/TestDefaultLogOutput.java b/hotspot/test/serviceability/logging/TestDefaultLogOutput.java
index cd55cc6..575832b 100644
--- a/hotspot/test/serviceability/logging/TestDefaultLogOutput.java
+++ b/hotspot/test/serviceability/logging/TestDefaultLogOutput.java
@@ -25,11 +25,11 @@
  * @test TestDefaultLogOutput
  * @summary Ensure logging is default on stdout.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestDefaultLogOutput {
 
diff --git a/hotspot/test/serviceability/logging/TestLogRotation.java b/hotspot/test/serviceability/logging/TestLogRotation.java
index 3e3696b..f1eaf41 100644
--- a/hotspot/test/serviceability/logging/TestLogRotation.java
+++ b/hotspot/test/serviceability/logging/TestLogRotation.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,13 +24,13 @@
 /*
  * @test TestLogRotation.java
  * @summary test flags for log rotation
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main/othervm/timeout=600 TestLogRotation
  *
  */
-import jdk.test.lib.*;
+import jdk.test.lib.process.ProcessTools;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.util.ArrayList;
diff --git a/hotspot/test/serviceability/logging/TestMultipleXlogArgs.java b/hotspot/test/serviceability/logging/TestMultipleXlogArgs.java
index dfc62f7..6d3af8f 100644
--- a/hotspot/test/serviceability/logging/TestMultipleXlogArgs.java
+++ b/hotspot/test/serviceability/logging/TestMultipleXlogArgs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,11 +25,11 @@
  * @test TestMultipleXlogArgs
  * @summary Ensure multiple -Xlog arguments aggregate the logging options.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestMultipleXlogArgs {
 
diff --git a/hotspot/test/serviceability/logging/TestQuotedLogOutputs.java b/hotspot/test/serviceability/logging/TestQuotedLogOutputs.java
index 77b4e00..6d9d898 100644
--- a/hotspot/test/serviceability/logging/TestQuotedLogOutputs.java
+++ b/hotspot/test/serviceability/logging/TestQuotedLogOutputs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
  * @test TestQuotedLogOutputs
  * @summary Ensure proper parsing of quoted output names for -Xlog arguments.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 
 import java.io.File;
@@ -33,8 +33,8 @@
 import java.nio.file.Paths;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class TestQuotedLogOutputs {
 
diff --git a/hotspot/test/serviceability/sa/DeadlockDetectionTest.java b/hotspot/test/serviceability/sa/DeadlockDetectionTest.java
index 85e5529..415a849 100644
--- a/hotspot/test/serviceability/sa/DeadlockDetectionTest.java
+++ b/hotspot/test/serviceability/sa/DeadlockDetectionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,19 +32,15 @@
 import jdk.test.lib.Utils;
 import jdk.test.lib.Platform;
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 /*
  * @test
  * @summary Test deadlock detection
- * @library /test/lib/share/classes
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management
- * @build jdk.test.lib.*
- * @build jdk.test.lib.apps.*
- * @build DeadlockDetectionTest
  * @run main DeadlockDetectionTest
  */
 
diff --git a/hotspot/test/serviceability/sa/TestInstanceKlassSize.java b/hotspot/test/serviceability/sa/TestInstanceKlassSize.java
index 6ab0a92..db1ed0f 100644
--- a/hotspot/test/serviceability/sa/TestInstanceKlassSize.java
+++ b/hotspot/test/serviceability/sa/TestInstanceKlassSize.java
@@ -31,8 +31,8 @@
 
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.apps.LingeredApp;
 import jdk.test.lib.Asserts;
@@ -42,16 +42,16 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
- * @library /testlibrary
- * @build jdk.test.lib.*
- * @build jdk.test.lib.apps.*
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules jdk.hotspot.agent
  * @modules jdk.hotspot.agent/sun.jvm.hotspot
  * @modules jdk.hotspot.agent/sun.jvm.hotspot.utilities
  * @modules jdk.hotspot.agent/sun.jvm.hotspot.oops
- * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent TestInstanceKlassSize.java
+ * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent
+ *          -XaddExports:java.base/jdk.internal.misc=jdk.hotspot.agent
+ *          -XaddExports:java.management/java.lang.management=jdk.hotspot.agent
+ *          TestInstanceKlassSize.java
  * @run main/othervm  TestInstanceKlassSize
  */
 
diff --git a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java
index c2c0c61..0c23373 100644
--- a/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java
+++ b/hotspot/test/serviceability/sa/TestInstanceKlassSizeForInterface.java
@@ -29,23 +29,23 @@
 import jdk.test.lib.JDKToolLauncher;
 import jdk.test.lib.JDKToolFinder;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.Utils;
 import jdk.test.lib.Asserts;
 
 /*
  * @test
- * @library /test/lib/share/classes
- * @library /testlibrary
- * @build jdk.test.lib.*
- * @build jdk.test.lib.apps.*
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules jdk.hotspot.agent
  * @modules jdk.hotspot.agent/sun.jvm.hotspot
  * @modules jdk.hotspot.agent/sun.jvm.hotspot.utilities
  * @modules jdk.hotspot.agent/sun.jvm.hotspot.oops
- * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent TestInstanceKlassSizeForInterface.java
+ * @compile -XDignore.symbol.file=true -Xmodule:jdk.hotspot.agent
+ *          -XaddExports:java.base/jdk.internal.misc=jdk.hotspot.agent
+ *          -XaddExports:java.management/java.lang.management=jdk.hotspot.agent
+ *          TestInstanceKlassSizeForInterface.java
  * @run main/othervm TestInstanceKlassSizeForInterface
  */
 
diff --git a/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java b/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java
index 0328e39..6af55b5 100644
--- a/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java
+++ b/hotspot/test/serviceability/sa/jmap-hashcode/Test8028623.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,9 +22,9 @@
  */
 
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputBuffer;
+import jdk.test.lib.process.OutputBuffer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 import java.io.File;
 
@@ -32,12 +32,11 @@
  * @test
  * @bug 8028623
  * @summary Test hashing of extended characters in Serviceability Agent.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.*
  * @compile -encoding utf8 Test8028623.java
  * @run main/othervm -XX:+UsePerfData Test8028623
  */
diff --git a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
index a1b297a..3469bdf 100644
--- a/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
+++ b/hotspot/test/serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java
@@ -32,11 +32,10 @@
 import java.util.Scanner;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.JDKToolFinder;
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
 import jdk.test.lib.Platform;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 /*
  * @test
@@ -46,12 +45,12 @@
  * Started failing on 2016.06.24 due to 8160376 on MacOS X so quarantine
  * it on that platform:
  * @requires os.family != "mac"
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management/sun.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build jdk.test.lib.* JMapHProfLargeHeapProc
+ * @build JMapHProfLargeHeapProc
  * @run main JMapHProfLargeHeapTest
  */
 
diff --git a/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java b/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java
index a9cf6e5..51b1846 100644
--- a/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java
+++ b/hotspot/test/serviceability/sa/sadebugd/SADebugDTest.java
@@ -26,7 +26,7 @@
  * @summary Checks that the jshdb debugd utility sucessfully starts
  *          and tries to attach to a running process
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  *
  * @ignore 8163805
  * @run main/othervm SADebugDTest
diff --git a/hotspot/test/serviceability/threads/TestFalseDeadLock.java b/hotspot/test/serviceability/threads/TestFalseDeadLock.java
index e4654f4..d32760b 100644
--- a/hotspot/test/serviceability/threads/TestFalseDeadLock.java
+++ b/hotspot/test/serviceability/threads/TestFalseDeadLock.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
  * @bug 8016304
  * @summary Make sure no deadlock is reported for this program which has no deadlocks.
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  * @run main/othervm TestFalseDeadLock
  */
 
diff --git a/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java b/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java
index cebd2c7..23bba68 100644
--- a/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/DaemonThreadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,8 @@
  * @summary Create daemon and non-deamon threads.
  *          Check the correctness of thread's status from jstack.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- *
  * @run main/othervm -XX:+UsePerfData DaemonThreadTest
  */
 import common.ToolResults;
diff --git a/hotspot/test/serviceability/tmtools/jstack/JstackThreadTest.java b/hotspot/test/serviceability/tmtools/jstack/JstackThreadTest.java
index 2d0eb05..2de069b 100644
--- a/hotspot/test/serviceability/tmtools/jstack/JstackThreadTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/JstackThreadTest.java
@@ -23,8 +23,8 @@
 
 import java.util.Arrays;
 import jdk.test.lib.JDKToolLauncher;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import utils.Utils;
 import java.util.concurrent.CountDownLatch;
 
@@ -33,8 +33,7 @@
  * @bug 8151442
  * @summary jstack doesn't close quotation marks properly with threads' name greater than 1996 characters
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
- * @build jdk.test.lib.*
+ * @library /test/lib
  * @run main JstackThreadTest
  */
 public class JstackThreadTest {
diff --git a/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java b/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java
index 884c8d2..8f3be81 100644
--- a/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/SpreadLockTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,8 @@
  *          After checking that lock info is correct invoke another method
  *          and get the lock again. Repeat this action.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- *
  * @run main/othervm -XX:+UsePerfData SpreadLockTest
  */
 import common.ToolResults;
diff --git a/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java b/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java
index 282bfda..6402c22 100644
--- a/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/ThreadNamesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,8 @@
  * @test
  * @summary Checks that jstack correctly prints the thread names
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- *
  * @run main/othervm -XX:+UsePerfData ThreadNamesTest
  */
 import common.ToolResults;
diff --git a/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java b/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java
index 174bcdb..9a87d6b 100644
--- a/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/TraveledLockTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,8 @@
  *          After checking that lock info is correct free the lock and
  *          invoke another method. Repeat this action.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- *
  * @run main/othervm -XX:+UsePerfData TraveledLockTest
  */
 import common.ToolResults;
diff --git a/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java b/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java
index 6f87c0a..9b5a544 100644
--- a/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java
+++ b/hotspot/test/serviceability/tmtools/jstack/WaitNotifyThreadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,8 @@
  *           monitor info have to disappear from the stack.
  *           Repeats the same scenario calling interrupt() method
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- *
  * @run main/othervm -XX:+UsePerfData WaitNotifyThreadTest
  */
 import common.ToolResults;
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java
index 8e2f56e..08b72d1 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCapacityTest.java
@@ -28,11 +28,9 @@
  * @summary Test checks the consistency of the output
  * displayed with jstat -gccapacity.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @build common.*
- * @build utils.*
  * @run main/othervm -XX:+UsePerfData -Xmx128M GcCapacityTest
  */
 public class GcCapacityTest {
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java
index 688670f..60c0a60 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest01.java
@@ -29,12 +29,9 @@
  *          collection runs jstat. jstat should show that after garbage collection number of GC events and garbage
  *          collection time increase.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @build common.*
- * @build utils.*
- *
  * @run main/othervm -XX:+UsePerfData -Xmx128M GcCauseTest01
  */
 import utils.*;
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java
index 0efd59f..0e886ff 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest02.java
@@ -28,11 +28,8 @@
  *          tests forces debuggee application eat ~70% of heap and runs jstat.
  *          jstat should show that ~70% of heap (OC/OU ~= 70%).
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- * @build utils.*
- *
  * @run main/othervm -XX:+UsePerfData -Xmx128M -XX:MaxMetaspaceSize=128M GcCauseTest02
  */
 import utils.*;
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java
index a014c37..91ebd0f 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcCauseTest03.java
@@ -28,11 +28,8 @@
  *          test forces debuggee application call System.gc(), runs jstat and checks that
  *          cause of last garbage collection displayed by jstat (LGCC) is 'System.gc()'.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- * @build utils.*
- *
  * @run main/othervm -XX:+UsePerfData -Xmx128M -XX:MaxMetaspaceSize=128M GcCauseTest03
  */
 import utils.*;
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java b/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java
index 4e2fbdc..10a8e60 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcNewTest.java
@@ -30,10 +30,8 @@
  *          collection runs jstat. jstat should show that after garbage collection number of GC events and garbage
  *          collection time increase.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- * @build utils.*
  * @run main/othervm -XX:+UsePerfData -Xmx128M GcNewTest
  */
 
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcTest01.java b/hotspot/test/serviceability/tmtools/jstat/GcTest01.java
index 5738da1..cabfc9e 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcTest01.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcTest01.java
@@ -32,12 +32,9 @@
  *          number of GC events and garbage
  *          collection time increase.
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
  * @requires vm.opt.ExplicitGCInvokesConcurrent != true
- * @build common.*
- * @build utils.*
- *
  * @run main/othervm -XX:+UsePerfData -Xmx128M GcTest01
  */
 import utils.*;
diff --git a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java
index 171b87b..0c02235 100644
--- a/hotspot/test/serviceability/tmtools/jstat/GcTest02.java
+++ b/hotspot/test/serviceability/tmtools/jstat/GcTest02.java
@@ -29,10 +29,8 @@
  *          tests forces debuggee application eat ~70% of heap and runs jstat.
  *          jstat should show that ~70% of heap is utilized (OC/OU ~= 70%).
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library ../share
- * @build common.*
- * @build utils.*
  * @ignore 8155570
  * @run main/othervm -XX:+UsePerfData -Xmx128M -XX:MaxMetaspaceSize=128M GcTest02
  */
diff --git a/hotspot/test/testlibrary/jdk/test/lib/Asserts.java b/hotspot/test/testlibrary/jdk/test/lib/Asserts.java
deleted file mode 100644
index c07a3f3..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/Asserts.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-/**
- * Asserts that can be used for verifying assumptions in tests.
- *
- * An assertion will throw a {@link RuntimeException} if the assertion isn't
- * valid.  All the asserts can be imported into a test by using a static
- * import:
- *
- * <pre>
- * {@code
- * import static jdk.test.lib.Asserts.*;
- * }
- *
- * Always provide a message describing the assumption if the line number of the
- * failing assertion isn't enough to understand why the assumption failed. For
- * example, if the assertion is in a loop or in a method that is called
- * multiple times, then the line number won't provide enough context to
- * understand the failure.
- * </pre>
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
- */
-@Deprecated
-public class Asserts {
-
-    /**
-     * Shorthand for {@link #assertLessThan(T, T)}.
-     *
-     * @see #assertLessThan(T, T)
-     */
-    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs) {
-        assertLessThan(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertLessThan(T, T, String)}.
-     *
-     * @see #assertLessThan(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertLT(T lhs, T rhs, String msg) {
-        assertLessThan(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertLessThan(T, T, String)} with a default message.
-     *
-     * @see #assertLessThan(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertLessThan(T lhs, T rhs) {
-        assertLessThan(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is less than {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static <T extends Comparable<T>>void assertLessThan(T lhs, T rhs, String msg) {
-        assertTrue(compare(lhs, rhs, msg) < 0, getMessage(lhs, rhs, "<", msg));
-    }
-
-    /**
-     * Shorthand for {@link #assertLessThanOrEqual(T, T)}.
-     *
-     * @see #assertLessThanOrEqual(T, T)
-     */
-    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs) {
-        assertLessThanOrEqual(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertLessThanOrEqual(T, T, String)}.
-     *
-     * @see #assertLessThanOrEqual(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertLTE(T lhs, T rhs, String msg) {
-        assertLessThanOrEqual(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertLessThanOrEqual(T, T, String)} with a default message.
-     *
-     * @see #assertLessThanOrEqual(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs) {
-        assertLessThanOrEqual(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is less than or equal to {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static <T extends Comparable<T>> void assertLessThanOrEqual(T lhs, T rhs, String msg) {
-        assertTrue(compare(lhs, rhs, msg) <= 0, getMessage(lhs, rhs, "<=", msg));
-    }
-
-    /**
-     * Shorthand for {@link #assertEquals(T, T)}.
-     *
-     * @see #assertEquals(T, T)
-     */
-    public static void assertEQ(Object lhs, Object rhs) {
-        assertEquals(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertEquals(T, T, String)}.
-     *
-     * @see #assertEquals(T, T, String)
-     */
-    public static void assertEQ(Object lhs, Object rhs, String msg) {
-        assertEquals(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertEquals(T, T, String)} with a default message.
-     *
-     * @see #assertEquals(T, T, String)
-     */
-    public static void assertEquals(Object lhs, Object rhs) {
-        assertEquals(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is equal to {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertEquals(Object lhs, Object rhs, String msg) {
-        if (lhs == null) {
-            if (rhs != null) {
-                error(msg);
-            }
-        } else {
-            assertTrue(lhs.equals(rhs), getMessage(lhs, rhs, "==", msg));
-        }
-    }
-
-    /**
-     * Shorthand for {@link #assertGreaterThanOrEqual(T, T)}.
-     *
-     * @see #assertGreaterThanOrEqual(T, T)
-     */
-    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs) {
-        assertGreaterThanOrEqual(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertGreaterThanOrEqual(T, T, String)}.
-     *
-     * @see #assertGreaterThanOrEqual(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertGTE(T lhs, T rhs, String msg) {
-        assertGreaterThanOrEqual(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertGreaterThanOrEqual(T, T, String)} with a default message.
-     *
-     * @see #assertGreaterThanOrEqual(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs) {
-        assertGreaterThanOrEqual(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is greater than or equal to {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static <T extends Comparable<T>> void assertGreaterThanOrEqual(T lhs, T rhs, String msg) {
-        assertTrue(compare(lhs, rhs, msg) >= 0, getMessage(lhs, rhs, ">=", msg));
-    }
-
-    /**
-     * Shorthand for {@link #assertGreaterThan(T, T)}.
-     *
-     * @see #assertGreaterThan(T, T)
-     */
-    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs) {
-        assertGreaterThan(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertGreaterThan(T, T, String)}.
-     *
-     * @see #assertGreaterThan(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertGT(T lhs, T rhs, String msg) {
-        assertGreaterThan(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertGreaterThan(T, T, String)} with a default message.
-     *
-     * @see #assertGreaterThan(T, T, String)
-     */
-    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs) {
-        assertGreaterThan(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is greater than {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static <T extends Comparable<T>> void assertGreaterThan(T lhs, T rhs, String msg) {
-        assertTrue(compare(lhs, rhs, msg) > 0, getMessage(lhs, rhs, ">", msg));
-    }
-
-    /**
-     * Shorthand for {@link #assertNotEquals(T, T)}.
-     *
-     * @see #assertNotEquals(T, T)
-     */
-    public static void assertNE(Object lhs, Object rhs) {
-        assertNotEquals(lhs, rhs);
-    }
-
-    /**
-     * Shorthand for {@link #assertNotEquals(T, T, String)}.
-     *
-     * @see #assertNotEquals(T, T, String)
-     */
-    public static void assertNE(Object lhs, Object rhs, String msg) {
-        assertNotEquals(lhs, rhs, msg);
-    }
-
-    /**
-     * Calls {@link #assertNotEquals(T, T, String)} with a default message.
-     *
-     * @see #assertNotEquals(T, T, String)
-     */
-    public static void assertNotEquals(Object lhs, Object rhs) {
-        assertNotEquals(lhs, rhs, null);
-    }
-
-    /**
-     * Asserts that {@code lhs} is not equal to {@code rhs}.
-     *
-     * @param lhs The left hand side of the comparison.
-     * @param rhs The right hand side of the comparison.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertNotEquals(Object lhs, Object rhs, String msg) {
-        if (lhs == null) {
-            if (rhs == null) {
-                error(msg);
-            }
-        } else {
-            assertFalse(lhs.equals(rhs), getMessage(lhs, rhs,"!=", msg));
-        }
-    }
-
-    /**
-     * Calls {@link #assertNull(Object, String)} with a default message.
-     *
-     * @see #assertNull(Object, String)
-     */
-    public static void assertNull(Object o) {
-        assertNull(o, "Expected " + format(o) + " to be null");
-    }
-
-    /**
-     * Asserts that {@code o} is null.
-     *
-     * @param o The reference assumed to be null.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertNull(Object o, String msg) {
-        assertEquals(o, null, msg);
-    }
-
-    /**
-     * Calls {@link #assertNotNull(Object, String)} with a default message.
-     *
-     * @see #assertNotNull(Object, String)
-     */
-    public static void assertNotNull(Object o) {
-        assertNotNull(o, "Expected non null reference");
-    }
-
-    /**
-     * Asserts that {@code o} is <i>not</i> null.
-     *
-     * @param o The reference assumed <i>not</i> to be null,
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertNotNull(Object o, String msg) {
-        assertNotEquals(o, null, msg);
-    }
-
-    /**
-     * Calls {@link #assertFalse(boolean, String)} with a default message.
-     *
-     * @see #assertFalse(boolean, String)
-     */
-    public static void assertFalse(boolean value) {
-        assertFalse(value, "Expected value to be false");
-    }
-
-    /**
-     * Asserts that {@code value} is {@code false}.
-     *
-     * @param value The value assumed to be false.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertFalse(boolean value, String msg) {
-        assertTrue(!value, msg);
-    }
-
-    /**
-     * Calls {@link #assertTrue(boolean, String)} with a default message.
-     *
-     * @see #assertTrue(boolean, String)
-     */
-    public static void assertTrue(boolean value) {
-        assertTrue(value, "Expected value to be true");
-    }
-
-    /**
-     * Asserts that {@code value} is {@code true}.
-     *
-     * @param value The value assumed to be true.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if the assertion isn't valid.
-     */
-    public static void assertTrue(boolean value, String msg) {
-        if (!value) {
-            error(msg);
-        }
-    }
-
-    /**
-     * Asserts that two strings are equal.
-     *
-     * If strings are not equals, then exception message
-     * will contain {@code msg} followed by list of mismatched lines.
-     *
-     * @param str1 First string to compare.
-     * @param str2 Second string to compare.
-     * @param msg A description of the assumption.
-     * @throws RuntimeException if strings are not equal.
-     */
-    public static void assertStringsEqual(String str1, String str2,
-                                          String msg) {
-        String lineSeparator = System.getProperty("line.separator");
-        String str1Lines[] = str1.split(lineSeparator);
-        String str2Lines[] = str2.split(lineSeparator);
-
-        int minLength = Math.min(str1Lines.length, str2Lines.length);
-        String longestStringLines[] = ((str1Lines.length == minLength) ?
-                                       str2Lines : str1Lines);
-
-        boolean stringsAreDifferent = false;
-
-        StringBuilder messageBuilder = new StringBuilder(msg);
-
-        messageBuilder.append("\n");
-
-        for (int line = 0; line < minLength; line++) {
-            if (!str1Lines[line].equals(str2Lines[line])) {
-                messageBuilder.append(String.
-                                      format("[line %d] '%s' differs " +
-                                             "from '%s'\n",
-                                             line,
-                                             str1Lines[line],
-                                             str2Lines[line]));
-                stringsAreDifferent = true;
-            }
-        }
-
-        if (minLength < longestStringLines.length) {
-            String stringName = ((longestStringLines == str1Lines) ?
-                                 "first" : "second");
-            messageBuilder.append(String.format("Only %s string contains " +
-                                                "following lines:\n",
-                                                stringName));
-            stringsAreDifferent = true;
-            for(int line = minLength; line < longestStringLines.length; line++) {
-                messageBuilder.append(String.
-                                      format("[line %d] '%s'", line,
-                                             longestStringLines[line]));
-            }
-        }
-
-        if (stringsAreDifferent) {
-            error(messageBuilder.toString());
-        }
-    }
-
-    private static <T extends Comparable<T>> int compare(T lhs, T rhs, String msg) {
-        assertNotNull(lhs, msg);
-        assertNotNull(rhs, msg);
-        return lhs.compareTo(rhs);
-    }
-
-    private static String format(Object o) {
-        return o == null? "null" : o.toString();
-    }
-
-    private static void error(String msg) {
-        throw new RuntimeException(msg);
-    }
-
-    private static String getMessage(Object lhs, Object rhs, String op, String msg) {
-        return (msg == null ? "" : msg + " ") + "(assert failed: " + format(lhs) + " " + op +  " " + format(rhs) + ")";
-    }
-}
-
diff --git a/hotspot/test/testlibrary/jdk/test/lib/JDKToolFinder.java b/hotspot/test/testlibrary/jdk/test/lib/JDKToolFinder.java
deleted file mode 100644
index dc924bb..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/JDKToolFinder.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.io.FileNotFoundException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-/**
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
- */
-@Deprecated
-public final class JDKToolFinder {
-
-    private JDKToolFinder() {
-    }
-
-    /**
-     * Returns the full path to an executable in jdk/bin based on System
-     * property {@code test.jdk} or {@code compile.jdk} (both are set by the jtreg test suite)
-     *
-     * @return Full path to an executable in jdk/bin
-     */
-    public static String getJDKTool(String tool) {
-
-        // First try to find the executable in test.jdk
-        try {
-            return getTool(tool, "test.jdk");
-        } catch (FileNotFoundException e) {
-
-        }
-
-        // Now see if it's available in compile.jdk
-        try {
-            return getTool(tool, "compile.jdk");
-        } catch (FileNotFoundException e) {
-            throw new RuntimeException("Failed to find " + tool +
-                    ", looked in test.jdk (" + System.getProperty("test.jdk") +
-                    ") and compile.jdk (" + System.getProperty("compile.jdk") + ")");
-        }
-    }
-
-    /**
-     * Returns the full path to an executable in jdk/bin based on System
-     * property {@code compile.jdk}
-     *
-     * @return Full path to an executable in jdk/bin
-     */
-    public static String getCompileJDKTool(String tool) {
-        try {
-            return getTool(tool, "compile.jdk");
-        } catch (FileNotFoundException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    /**
-     * Returns the full path to an executable in jdk/bin based on System
-     * property {@code test.jdk}
-     *
-     * @return Full path to an executable in jdk/bin
-     */
-    public static String getTestJDKTool(String tool) {
-        try {
-            return getTool(tool, "test.jdk");
-        } catch (FileNotFoundException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private static String getTool(String tool, String property) throws FileNotFoundException {
-        String jdkPath = System.getProperty(property);
-
-        if (jdkPath == null) {
-            throw new RuntimeException(
-                    "System property '" + property + "' not set. This property is normally set by jtreg. "
-                    + "When running test separately, set this property using '-D" + property + "=/path/to/jdk'.");
-        }
-
-        Path toolName = Paths.get("bin", tool + (Platform.isWindows() ? ".exe" : ""));
-
-        Path jdkTool = Paths.get(jdkPath, toolName.toString());
-        if (!jdkTool.toFile().exists()) {
-            throw new FileNotFoundException("Could not find file " + jdkTool.toAbsolutePath());
-        }
-
-        return jdkTool.toAbsolutePath().toString();
-    }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/JDKToolLauncher.java b/hotspot/test/testlibrary/jdk/test/lib/JDKToolLauncher.java
deleted file mode 100644
index eba1859..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/JDKToolLauncher.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * A utility for constructing command lines for starting JDK tool processes.
- *
- * The JDKToolLauncher can in particular be combined with a
- * java.lang.ProcessBuilder to easily run a JDK tool. For example, the following
- * code run {@code jmap -heap} against a process with GC logging turned on for
- * the {@code jmap} process:
- *
- * <pre>
- * {@code
- * JDKToolLauncher jmap = JDKToolLauncher.create("jmap")
- *                                       .addVMArg("-XX:+PrintGC");
- *                                       .addVMArg("-XX:+PrintGCDetails")
- *                                       .addToolArg("-heap")
- *                                       .addToolArg(pid);
- * ProcessBuilder pb = new ProcessBuilder(jmap.getCommand());
- * Process p = pb.start();
- * }
- * </pre>
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
- */
-@Deprecated
-public class JDKToolLauncher {
-    private final String executable;
-    private final List<String> vmArgs = new ArrayList<String>();
-    private final List<String> toolArgs = new ArrayList<String>();
-
-    private JDKToolLauncher(String tool, boolean useCompilerJDK) {
-        if (useCompilerJDK) {
-            executable = JDKToolFinder.getJDKTool(tool);
-        } else {
-            executable = JDKToolFinder.getTestJDKTool(tool);
-        }
-        vmArgs.addAll(Arrays.asList(ProcessTools.getPlatformSpecificVMArgs()));
-    }
-
-    /**
-     * Creates a new JDKToolLauncher for the specified tool. Using tools path
-     * from the compiler JDK.
-     *
-     * @param tool
-     *            The name of the tool
-     * @return A new JDKToolLauncher
-     */
-    public static JDKToolLauncher create(String tool) {
-        return new JDKToolLauncher(tool, true);
-    }
-
-    /**
-     * Creates a new JDKToolLauncher for the specified tool in the Tested JDK.
-     *
-     * @param tool
-     *            The name of the tool
-     *
-     * @return A new JDKToolLauncher
-     */
-    public static JDKToolLauncher createUsingTestJDK(String tool) {
-        return new JDKToolLauncher(tool, false);
-    }
-
-    /**
-     * Adds an argument to the JVM running the tool.
-     *
-     * The JVM arguments are passed to the underlying JVM running the tool.
-     * Arguments will automatically be prepended with "-J".
-     *
-     * Any platform specific arguments required for running the tool are
-     * automatically added.
-     *
-     *
-     * @param arg
-     *            The argument to VM running the tool
-     * @return The JDKToolLauncher instance
-     */
-    public JDKToolLauncher addVMArg(String arg) {
-        vmArgs.add(arg);
-        return this;
-    }
-
-    /**
-     * Adds an argument to the tool.
-     *
-     * @param arg
-     *            The argument to the tool
-     * @return The JDKToolLauncher instance
-     */
-    public JDKToolLauncher addToolArg(String arg) {
-        toolArgs.add(arg);
-        return this;
-    }
-
-    /**
-     * Returns the command that can be used for running the tool.
-     *
-     * @return An array whose elements are the arguments of the command.
-     */
-    public String[] getCommand() {
-        List<String> command = new ArrayList<String>();
-        command.add(executable);
-        // Add -J in front of all vmArgs
-        for (String arg : vmArgs) {
-            command.add("-J" + arg);
-        }
-        command.addAll(toolArgs);
-        return command.toArray(new String[command.size()]);
-    }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/OutputBuffer.java b/hotspot/test/testlibrary/jdk/test/lib/OutputBuffer.java
deleted file mode 100644
index 31ad53b..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/OutputBuffer.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-/**
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
- */
-@Deprecated
-public class OutputBuffer {
-  private final String stdout;
-  private final String stderr;
-
-  /**
-   * Create an OutputBuffer, a class for storing and managing stdout and stderr
-   * results separately
-   *
-   * @param stdout stdout result
-   * @param stderr stderr result
-   */
-  public OutputBuffer(String stdout, String stderr) {
-    this.stdout = stdout;
-    this.stderr = stderr;
-  }
-
-  /**
-   * Returns the stdout result
-   *
-   * @return stdout result
-   */
-  public String getStdout() {
-    return stdout;
-  }
-
-  /**
-   * Returns the stderr result
-   *
-   * @return stderr result
-   */
-  public String getStderr() {
-    return stderr;
-  }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/Platform.java b/hotspot/test/testlibrary/jdk/test/lib/Platform.java
deleted file mode 100644
index d090663..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/Platform.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.util.regex.Pattern;
-
-/**
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
- */
-@Deprecated
-public class Platform {
-    public  static final String vmName      = System.getProperty("java.vm.name");
-    public  static final String vmInfo      = System.getProperty("java.vm.info");
-    private static final String osName      = System.getProperty("os.name");
-    private static final String dataModel   = System.getProperty("sun.arch.data.model");
-    private static final String vmVersion   = System.getProperty("java.vm.version");
-    private static final String jdkDebug    = System.getProperty("jdk.debug");
-    private static final String osArch      = System.getProperty("os.arch");
-    private static final String userName    = System.getProperty("user.name");
-    private static final String compiler    = System.getProperty("sun.management.compiler");
-
-    public static boolean isClient() {
-        return vmName.endsWith(" Client VM");
-    }
-
-    public static boolean isServer() {
-        return vmName.endsWith(" Server VM");
-    }
-
-    public static boolean isGraal() {
-        return vmName.endsWith(" Graal VM");
-    }
-
-    public static boolean isZero() {
-        return vmName.endsWith(" Zero VM");
-    }
-
-    public static boolean isMinimal() {
-        return vmName.endsWith(" Minimal VM");
-    }
-
-    public static boolean isTieredSupported() {
-        return compiler.contains("Tiered Compilers");
-    }
-
-    public static boolean isInt() {
-        return vmInfo.contains("interpreted");
-    }
-
-    public static boolean isMixed() {
-        return vmInfo.contains("mixed");
-    }
-
-    public static boolean isComp() {
-        return vmInfo.contains("compiled");
-    }
-
-    public static boolean is32bit() {
-        return dataModel.equals("32");
-    }
-
-    public static boolean is64bit() {
-        return dataModel.equals("64");
-    }
-
-    public static boolean isAix() {
-        return isOs("aix");
-    }
-
-    public static boolean isLinux() {
-        return isOs("linux");
-    }
-
-    public static boolean isOSX() {
-        return isOs("mac");
-    }
-
-    public static boolean isSolaris() {
-        return isOs("sunos");
-    }
-
-    public static boolean isWindows() {
-        return isOs("win");
-    }
-
-    private static boolean isOs(String osname) {
-        return osName.toLowerCase().startsWith(osname.toLowerCase());
-    }
-
-    public static String getOsName() {
-        return osName;
-    }
-
-    public static boolean isDebugBuild() {
-        return (jdkDebug.toLowerCase().contains("debug"));
-    }
-
-    public static String getVMVersion() {
-        return vmVersion;
-    }
-
-    // Returns true for sparc and sparcv9.
-    public static boolean isSparc() {
-        return isArch("sparc.*");
-    }
-
-    public static boolean isARM() {
-        return isArch("arm.*");
-    }
-
-    public static boolean isPPC() {
-        return isArch("ppc.*");
-    }
-
-    public static boolean isX86() {
-        // On Linux it's 'i386', Windows 'x86' without '_64' suffix.
-        return isArch("(i386)|(x86(?!_64))");
-    }
-
-    public static boolean isX64() {
-        // On OSX it's 'x86_64' and on other (Linux, Windows and Solaris) platforms it's 'amd64'
-        return isArch("(amd64)|(x86_64)");
-    }
-
-    public static boolean isAArch64() {
-        return isArch("aarch64");
-    }
-
-    private static boolean isArch(String archnameRE) {
-        return Pattern.compile(archnameRE, Pattern.CASE_INSENSITIVE)
-                .matcher(osArch)
-                .matches();
-    }
-
-    public static String getOsArch() {
-        return osArch;
-    }
-
-    /**
-     * Return a boolean for whether we expect to be able to attach
-     * the SA to our own processes on this system.
-     */
-    public static boolean shouldSAAttach() throws Exception {
-
-        if (isAix()) {
-            return false;   // SA not implemented.
-        } else if (isLinux()) {
-            return canPtraceAttachLinux();
-        } else if (isOSX()) {
-            return canAttachOSX();
-        } else {
-            // Other platforms expected to work:
-            return true;
-        }
-    }
-
-    /**
-     * On Linux, first check the SELinux boolean "deny_ptrace" and return false
-     * as we expect to be denied if that is "1".  Then expect permission to attach
-     * if we are root, so return true.  Then return false for an expected denial
-     * if "ptrace_scope" is 1, and true otherwise.
-     */
-    public static boolean canPtraceAttachLinux() throws Exception {
-
-        // SELinux deny_ptrace:
-        String deny_ptrace = Utils.fileAsString("/sys/fs/selinux/booleans/deny_ptrace");
-        if (deny_ptrace != null && deny_ptrace.contains("1")) {
-            // ptrace will be denied:
-            return false;
-        }
-
-        if (userName.equals("root")) {
-            return true;
-        }
-
-        // ptrace_scope:
-        String ptrace_scope = Utils.fileAsString("/proc/sys/kernel/yama/ptrace_scope");
-        if (ptrace_scope != null && ptrace_scope.contains("1")) {
-            // ptrace will be denied:
-            return false;
-        }
-
-        // Otherwise expect to be permitted:
-        return true;
-    }
-
-    /**
-     * On OSX, expect permission to attach only if we are root.
-     */
-    public static boolean canAttachOSX() throws Exception {
-        return userName.equals("root");
-    }
-
-    /**
-     * return path to library inside jdk tree
-     */
-    public static String jdkLibPath() {
-        if (isWindows()) {
-            return "bin";
-        }
-        if (isOSX()) {
-            return "lib";
-        }
-
-        return "lib/" + getOsArch();
-    }
-
-    /**
-     * Build name of shared object according to platform rules
-     */
-    public static String sharedObjectName(String name) {
-        if (isWindows()) {
-            return name + ".dll";
-        }
-        if (isOSX()) {
-            return "lib" + name + ".dylib";
-        }
-        return "lib" + name + ".so";
-    }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/ProcessTools.java b/hotspot/test/testlibrary/jdk/test/lib/ProcessTools.java
deleted file mode 100644
index 21ff415..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/ProcessTools.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
- */
-@Deprecated
-public final class ProcessTools {
-
-  private ProcessTools() {
-  }
-
-  /**
-   * Pumps stdout and stderr from running the process into a String.
-   *
-   * @param processBuilder ProcessBuilder to run.
-   * @return Output from process.
-   * @throws IOException If an I/O error occurs.
-   */
-  public static OutputBuffer getOutput(ProcessBuilder processBuilder) throws IOException {
-    return getOutput(processBuilder.start());
-  }
-
-  /**
-   * Pumps stdout and stderr the running process into a String.
-   *
-   * @param process Process to pump.
-   * @return Output from process.
-   * @throws IOException If an I/O error occurs.
-   */
-  public static OutputBuffer getOutput(Process process) throws IOException {
-    ByteArrayOutputStream stderrBuffer = new ByteArrayOutputStream();
-    ByteArrayOutputStream stdoutBuffer = new ByteArrayOutputStream();
-    StreamPumper outPumper = new StreamPumper(process.getInputStream(), stdoutBuffer);
-    StreamPumper errPumper = new StreamPumper(process.getErrorStream(), stderrBuffer);
-    Thread outPumperThread = new Thread(outPumper);
-    Thread errPumperThread = new Thread(errPumper);
-
-    outPumperThread.setDaemon(true);
-    errPumperThread.setDaemon(true);
-
-    outPumperThread.start();
-    errPumperThread.start();
-
-    try {
-      process.waitFor();
-      outPumperThread.join();
-      errPumperThread.join();
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-      return null;
-    }
-
-    return new OutputBuffer(stdoutBuffer.toString(), stderrBuffer.toString());
-  }
-
-  /**
-   * Get the process id of the current running Java process
-   *
-   * @return Process id
-   */
-  public static long getProcessId() throws Exception {
-    return ProcessHandle.current().getPid();
-  }
-
-  /**
-   * Gets the array of strings containing input arguments passed to the VM
-   *
-   * @return arguments
-   */
-  public static String[] getVmInputArgs() {
-    RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
-    List<String> args = runtime.getInputArguments();
-    return args.toArray(new String[args.size()]);
-  }
-
-  /**
-   * Get platform specific VM arguments (e.g. -d64 on 64bit Solaris)
-   *
-   * @return String[] with platform specific arguments, empty if there are none
-   */
-  public static String[] getPlatformSpecificVMArgs() {
-
-    if (Platform.is64bit() && Platform.isSolaris()) {
-      return new String[] { "-d64" };
-    }
-
-    return new String[] {};
-  }
-
-  /**
-   * Create ProcessBuilder using the java launcher from the jdk to be tested and
-   * with any platform specific arguments prepended
-   */
-  public static ProcessBuilder createJavaProcessBuilder(String... command) throws Exception {
-    return createJavaProcessBuilder(false, command);
-  }
-
-  public static ProcessBuilder createJavaProcessBuilder(boolean addTestVmAndJavaOptions, String... command) throws Exception {
-    String javapath = JDKToolFinder.getJDKTool("java");
-
-    ArrayList<String> args = new ArrayList<>();
-    args.add(javapath);
-    Collections.addAll(args, getPlatformSpecificVMArgs());
-
-    args.add("-cp");
-    args.add(System.getProperty("java.class.path"));
-
-    if (addTestVmAndJavaOptions) {
-      Collections.addAll(args, Utils.getTestJavaOpts());
-    }
-
-    Collections.addAll(args, command);
-
-    // Reporting
-    StringBuilder cmdLine = new StringBuilder();
-    for (String cmd : args) {
-      cmdLine.append(cmd).append(' ');
-    }
-    System.out.println("Command line: [" + cmdLine.toString() + "]");
-
-    return new ProcessBuilder(args.toArray(new String[args.size()]));
-  }
-
-  /**
-   * Executes a test jvm process, waits for it to finish and returns the process output.
-   * The default jvm options from jtreg, test.vm.opts and test.java.opts, are added.
-   * The java from the test.jdk is used to execute the command.
-   *
-   * The command line will be like:
-   * {test.jdk}/bin/java {test.vm.opts} {test.java.opts} cmds
-   *
-   * @param cmds User specifed arguments.
-   * @return The output from the process.
-   */
-  public static OutputAnalyzer executeTestJvm(String... cmds) throws Throwable {
-    ProcessBuilder pb = createJavaProcessBuilder(Utils.addTestJavaOpts(cmds));
-    return executeProcess(pb);
-  }
-
-  /**
-   * Executes a test jvm process, waits for it to finish and returns the process output.
-   * The default jvm options from the test's run command, jtreg, test.vm.opts and test.java.opts, are added.
-   * The java from the test.jdk is used to execute the command.
-   *
-   * The command line will be like:
-   * {test.jdk}/bin/java {test.fromRun.opts} {test.vm.opts} {test.java.opts} cmds
-   *
-   * @param cmds User specifed arguments.
-   * @return The output from the process.
-   */
-  public static OutputAnalyzer executeTestJvmAllArgs(String... cmds) throws Throwable {
-    List<String> argsList = new ArrayList<>();
-    String[] testArgs = getVmInputArgs();
-    Collections.addAll(argsList, testArgs);
-    Collections.addAll(argsList, Utils.addTestJavaOpts(cmds));
-    ProcessBuilder pb = createJavaProcessBuilder(argsList.toArray(new String[argsList.size()]));
-    return executeProcess(pb);
-  }
-
-    /**
-     * Executes a process, waits for it to finish and returns the process output.
-     * The process will have exited before this method returns.
-     * @param pb The ProcessBuilder to execute.
-     * @return The {@linkplain OutputAnalyzer} instance wrapping the process.
-     */
-    public static OutputAnalyzer executeProcess(ProcessBuilder pb) throws Exception {
-        OutputAnalyzer output = null;
-        Process p = null;
-        boolean failed = false;
-        try {
-            p = pb.start();
-            output = new OutputAnalyzer(p);
-            p.waitFor();
-
-            return output;
-        } catch (Throwable t) {
-            if (p != null) {
-                p.destroyForcibly().waitFor();
-            }
-
-            failed = true;
-            System.out.println("executeProcess() failed: " + t);
-            throw t;
-        } finally {
-            if (failed) {
-                System.err.println(getProcessLog(pb, output));
-            }
-        }
-    }
-
-  /**
-   * Executes a process, waits for it to finish and returns the process output.
-   * @param cmds The command line to execute.
-   * @return The output from the process.
-   */
-  public static OutputAnalyzer executeProcess(String... cmds) throws Throwable {
-    return executeProcess(new ProcessBuilder(cmds));
-  }
-
-  /**
-   * Used to log command line, stdout, stderr and exit code from an executed process.
-   * @param pb The executed process.
-   * @param output The output from the process.
-   */
-  public static String getProcessLog(ProcessBuilder pb, OutputAnalyzer output) {
-    String stderr = output == null ? "null" : output.getStderr();
-    String stdout = output == null ? "null" : output.getStdout();
-    String exitValue = output == null ? "null": Integer.toString(output.getExitValue());
-    StringBuilder logMsg = new StringBuilder();
-    final String nl = System.getProperty("line.separator");
-    logMsg.append("--- ProcessLog ---" + nl);
-    logMsg.append("cmd: " + getCommandLine(pb) + nl);
-    logMsg.append("exitvalue: " + exitValue + nl);
-    logMsg.append("stderr: " + stderr + nl);
-    logMsg.append("stdout: " + stdout + nl);
-    return logMsg.toString();
-  }
-
-  /**
-   * @return The full command line for the ProcessBuilder.
-   */
-  public static String getCommandLine(ProcessBuilder pb) {
-    if (pb == null) {
-      return "null";
-    }
-    StringBuilder cmd = new StringBuilder();
-    for (String s : pb.command()) {
-      cmd.append(s).append(" ");
-    }
-    return cmd.toString().trim();
-  }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/StreamPumper.java b/hotspot/test/testlibrary/jdk/test/lib/StreamPumper.java
deleted file mode 100644
index 399ecb1..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/StreamPumper.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.io.OutputStream;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
- */
-@Deprecated
-public final class StreamPumper implements Runnable {
-
-  private static final int BUF_SIZE = 256;
-
-  private final OutputStream out;
-  private final InputStream in;
-
-  /**
-   * Create a StreamPumper that reads from in and writes to out.
-   *
-   * @param in The stream to read from.
-   * @param out The stream to write to.
-   */
-  public StreamPumper(InputStream in, OutputStream out) {
-    this.in = in;
-    this.out = out;
-  }
-
-  /**
-   * Implements Thread.run(). Continuously read from <code>in</code> and write
-   * to <code>out</code> until <code>in</code> has reached end of stream. Abort
-   * on interruption. Abort on IOExceptions.
-   */
-  @Override
-  public void run() {
-    int length;
-    InputStream localIn = in;
-    OutputStream localOut = out;
-    byte[] buffer = new byte[BUF_SIZE];
-
-    try {
-      while (!Thread.interrupted() && (length = localIn.read(buffer)) > 0) {
-        localOut.write(buffer, 0, length);
-      }
-    } catch (IOException e) {
-      // Just abort if something like this happens.
-      e.printStackTrace();
-    } finally {
-      try {
-        localOut.flush();
-        in.close();
-      } catch (IOException e) {
-        e.printStackTrace();
-      }
-    }
-  }
-}
diff --git a/hotspot/test/testlibrary/jdk/test/lib/Utils.java b/hotspot/test/testlibrary/jdk/test/lib/Utils.java
deleted file mode 100644
index 6925f73..0000000
--- a/hotspot/test/testlibrary/jdk/test/lib/Utils.java
+++ /dev/null
@@ -1,648 +0,0 @@
-/*
- * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib;
-
-import java.io.File;
-import static jdk.test.lib.Asserts.assertTrue;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.ServerSocket;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.UnknownHostException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Objects;
-import java.util.Random;
-import java.util.function.BooleanSupplier;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Consumer;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import jdk.internal.misc.Unsafe;
-
-/**
- * Common library for various test helper functions.
- *
- * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
- */
-@Deprecated
-public final class Utils {
-
-    /**
-     * Returns the value of 'test.class.path' system property.
-     */
-    public static final String TEST_CLASS_PATH = System.getProperty("test.class.path", ".");
-
-    /**
-     * Returns the sequence used by operating system to separate lines.
-     */
-    public static final String NEW_LINE = System.getProperty("line.separator");
-
-    /**
-     * Returns the value of 'test.vm.opts' system property.
-     */
-    public static final String VM_OPTIONS = System.getProperty("test.vm.opts", "").trim();
-
-    /**
-     * Returns the value of 'test.java.opts' system property.
-     */
-    public static final String JAVA_OPTIONS = System.getProperty("test.java.opts", "").trim();
-
-    /**
-     * Returns the value of 'test.src' system property.
-     */
-    public static final String TEST_SRC = System.getProperty("test.src", ".").trim();
-
-    /*
-     * Returns the value of 'test.jdk' system property
-     */
-    public static final String TEST_JDK = System.getProperty("test.jdk");
-
-    /**
-     * Returns the value of 'test.classes' system property
-     */
-    public static final String TEST_CLASSES = System.getProperty("test.classes", ".");
-
-    private static Unsafe unsafe = null;
-
-    /**
-     * Defines property name for seed value.
-     */
-    public static final String SEED_PROPERTY_NAME = "jdk.test.lib.random.seed";
-
-    /* (non-javadoc)
-     * Random generator with (or without) predefined seed. Depends on
-     * "jdk.test.lib.random.seed" property value.
-     */
-    private static volatile Random RANDOM_GENERATOR;
-
-    /**
-     * Contains the seed value used for {@link java.util.Random} creation.
-     */
-    public static final long SEED = Long.getLong(SEED_PROPERTY_NAME, new Random().nextLong());
-    /**
-    * Returns the value of 'test.timeout.factor' system property
-    * converted to {@code double}.
-    */
-    public static final double TIMEOUT_FACTOR;
-    static {
-        String toFactor = System.getProperty("test.timeout.factor", "1.0");
-        TIMEOUT_FACTOR = Double.parseDouble(toFactor);
-    }
-
-    /**
-    * Returns the value of JTREG default test timeout in milliseconds
-    * converted to {@code long}.
-    */
-    public static final long DEFAULT_TEST_TIMEOUT = TimeUnit.SECONDS.toMillis(120);
-
-    private Utils() {
-        // Private constructor to prevent class instantiation
-    }
-
-    /**
-     * Returns the list of VM options.
-     *
-     * @return List of VM options
-     */
-    public static List<String> getVmOptions() {
-        return Arrays.asList(safeSplitString(VM_OPTIONS));
-    }
-
-    /**
-     * Returns the list of VM options with -J prefix.
-     *
-     * @return The list of VM options with -J prefix
-     */
-    public static List<String> getForwardVmOptions() {
-        String[] opts = safeSplitString(VM_OPTIONS);
-        for (int i = 0; i < opts.length; i++) {
-            opts[i] = "-J" + opts[i];
-        }
-        return Arrays.asList(opts);
-    }
-
-    /**
-     * Returns the default JTReg arguments for a jvm running a test.
-     * This is the combination of JTReg arguments test.vm.opts and test.java.opts.
-     * @return An array of options, or an empty array if no options.
-     */
-    public static String[] getTestJavaOpts() {
-        List<String> opts = new ArrayList<String>();
-        Collections.addAll(opts, safeSplitString(VM_OPTIONS));
-        Collections.addAll(opts, safeSplitString(JAVA_OPTIONS));
-        return opts.toArray(new String[0]);
-    }
-
-    /**
-     * Returns the default JTReg arguments for a jvm running a test without
-     * options that matches regular expressions in {@code filters}.
-     * This is the combination of JTReg arguments test.vm.opts and test.java.opts.
-     * @param filters Regular expressions used to filter out options.
-     * @return An array of options, or an empty array if no options.
-     */
-    public static String[] getFilteredTestJavaOpts(String... filters) {
-        String options[] = getTestJavaOpts();
-
-        if (filters.length == 0) {
-            return options;
-        }
-
-        List<String> filteredOptions = new ArrayList<String>(options.length);
-        Pattern patterns[] = new Pattern[filters.length];
-        for (int i = 0; i < filters.length; i++) {
-            patterns[i] = Pattern.compile(filters[i]);
-        }
-
-        for (String option : options) {
-            boolean matched = false;
-            for (int i = 0; i < patterns.length && !matched; i++) {
-                Matcher matcher = patterns[i].matcher(option);
-                matched = matcher.find();
-            }
-            if (!matched) {
-                filteredOptions.add(option);
-            }
-        }
-
-        return filteredOptions.toArray(new String[filteredOptions.size()]);
-    }
-
-    /**
-     * Combines given arguments with default JTReg arguments for a jvm running a test.
-     * This is the combination of JTReg arguments test.vm.opts and test.java.opts
-     * @return The combination of JTReg test java options and user args.
-     */
-    public static String[] addTestJavaOpts(String... userArgs) {
-        List<String> opts = new ArrayList<String>();
-        Collections.addAll(opts, getTestJavaOpts());
-        Collections.addAll(opts, userArgs);
-        return opts.toArray(new String[0]);
-    }
-
-    /**
-     * Splits a string by white space.
-     * Works like String.split(), but returns an empty array
-     * if the string is null or empty.
-     */
-    private static String[] safeSplitString(String s) {
-        if (s == null || s.trim().isEmpty()) {
-            return new String[] {};
-        }
-        return s.trim().split("\\s+");
-    }
-
-    /**
-     * @return The full command line for the ProcessBuilder.
-     */
-    public static String getCommandLine(ProcessBuilder pb) {
-        StringBuilder cmd = new StringBuilder();
-        for (String s : pb.command()) {
-            cmd.append(s).append(" ");
-        }
-        return cmd.toString();
-    }
-
-    /**
-     * Returns the free port on the local host.
-     * The function will spin until a valid port number is found.
-     *
-     * @return The port number
-     * @throws InterruptedException if any thread has interrupted the current thread
-     * @throws IOException if an I/O error occurs when opening the socket
-     */
-    public static int getFreePort() throws InterruptedException, IOException {
-        int port = -1;
-
-        while (port <= 0) {
-            Thread.sleep(100);
-
-            ServerSocket serverSocket = null;
-            try {
-                serverSocket = new ServerSocket(0);
-                port = serverSocket.getLocalPort();
-            } finally {
-                serverSocket.close();
-            }
-        }
-
-        return port;
-    }
-
-    /**
-     * Returns the name of the local host.
-     *
-     * @return The host name
-     * @throws UnknownHostException if IP address of a host could not be determined
-     */
-    public static String getHostname() throws UnknownHostException {
-        InetAddress inetAddress = InetAddress.getLocalHost();
-        String hostName = inetAddress.getHostName();
-
-        assertTrue((hostName != null && !hostName.isEmpty()),
-                "Cannot get hostname");
-
-        return hostName;
-    }
-
-    /**
-     * Uses "jcmd -l" to search for a jvm pid. This function will wait
-     * forever (until jtreg timeout) for the pid to be found.
-     * @param key Regular expression to search for
-     * @return The found pid.
-     */
-    public static int waitForJvmPid(String key) throws Throwable {
-        final long iterationSleepMillis = 250;
-        System.out.println("waitForJvmPid: Waiting for key '" + key + "'");
-        System.out.flush();
-        while (true) {
-            int pid = tryFindJvmPid(key);
-            if (pid >= 0) {
-                return pid;
-            }
-            Thread.sleep(iterationSleepMillis);
-        }
-    }
-
-    /**
-     * Searches for a jvm pid in the output from "jcmd -l".
-     *
-     * Example output from jcmd is:
-     * 12498 sun.tools.jcmd.JCmd -l
-     * 12254 /tmp/jdk8/tl/jdk/JTwork/classes/com/sun/tools/attach/Application.jar
-     *
-     * @param key A regular expression to search for.
-     * @return The found pid, or -1 if not found.
-     * @throws Exception If multiple matching jvms are found.
-     */
-    public static int tryFindJvmPid(String key) throws Throwable {
-        OutputAnalyzer output = null;
-        try {
-            JDKToolLauncher jcmdLauncher = JDKToolLauncher.create("jcmd");
-            jcmdLauncher.addToolArg("-l");
-            output = ProcessTools.executeProcess(jcmdLauncher.getCommand());
-            output.shouldHaveExitValue(0);
-
-            // Search for a line starting with numbers (pid), followed by the key.
-            Pattern pattern = Pattern.compile("^([0-9]+)\\s.*(" + key + ")", Pattern.MULTILINE);
-            Matcher matcher = pattern.matcher(output.getStdout());
-
-            int pid = -1;
-            if (matcher.find()) {
-                pid = Integer.parseInt(matcher.group(1));
-                System.out.println("findJvmPid.pid: " + pid);
-                if (matcher.find()) {
-                    throw new Exception("Found multiple JVM pids for key: " + key);
-                }
-            }
-            return pid;
-        } catch (Throwable t) {
-            System.out.println(String.format("Utils.findJvmPid(%s) failed: %s", key, t));
-            throw t;
-        }
-    }
-
-    /**
-     * Return the contents of the named file as a single String,
-     * or null if not found.
-     * @param filename name of the file to read
-     * @return String contents of file, or null if file not found.
-     * @throws  IOException
-     *          if an I/O error occurs reading from the file or a malformed or
-     *          unmappable byte sequence is read
-     */
-    public static String fileAsString(String filename) throws IOException {
-        Path filePath = Paths.get(filename);
-        if (!Files.exists(filePath)) return null;
-        return new String(Files.readAllBytes(filePath));
-    }
-
-    /**
-     * @return Unsafe instance.
-     */
-    public static synchronized Unsafe getUnsafe() {
-        if (unsafe == null) {
-            try {
-                Field f = Unsafe.class.getDeclaredField("theUnsafe");
-                f.setAccessible(true);
-                unsafe = (Unsafe) f.get(null);
-            } catch (NoSuchFieldException | IllegalAccessException e) {
-                throw new RuntimeException("Unable to get Unsafe instance.", e);
-            }
-        }
-        return unsafe;
-    }
-    private static final char[] hexArray = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-
-    /**
-     * Returns hex view of byte array
-     *
-     * @param bytes byte array to process
-     * @return Space separated hexadecimal string representation of bytes
-     */
-
-    public static String toHexString(byte[] bytes) {
-        char[] hexView = new char[bytes.length * 3];
-        int i = 0;
-        for (byte b : bytes) {
-            hexView[i++] = hexArray[(b >> 4) & 0x0F];
-            hexView[i++] = hexArray[b & 0x0F];
-            hexView[i++] = ' ';
-        }
-        return new String(hexView);
-    }
-
-    /**
-     * Returns {@link java.util.Random} generator initialized with particular seed.
-     * The seed could be provided via system property {@link Utils#SEED_PROPERTY_NAME}
-     * In case no seed is provided, the method uses a random number.
-     * The used seed printed to stdout.
-     * @return {@link java.util.Random} generator with particular seed.
-     */
-    public static Random getRandomInstance() {
-        if (RANDOM_GENERATOR == null) {
-            synchronized (Utils.class) {
-                if (RANDOM_GENERATOR == null) {
-                    RANDOM_GENERATOR = new Random(SEED);
-                    System.out.printf("For random generator using seed: %d%n", SEED);
-                    System.out.printf("To re-run test with same seed value please add \"-D%s=%d\" to command line.%n", SEED_PROPERTY_NAME, SEED);
-                }
-            }
-        }
-        return RANDOM_GENERATOR;
-    }
-
-    /**
-     * Returns random element of non empty collection
-     *
-     * @param <T> a type of collection element
-     * @param collection collection of elements
-     * @return random element of collection
-     * @throws IllegalArgumentException if collection is empty
-     */
-    public static <T> T getRandomElement(Collection<T> collection)
-            throws IllegalArgumentException {
-        if (collection.isEmpty()) {
-            throw new IllegalArgumentException("Empty collection");
-        }
-        Random random = getRandomInstance();
-        int elementIndex = 1 + random.nextInt(collection.size() - 1);
-        Iterator<T> iterator = collection.iterator();
-        while (--elementIndex != 0) {
-            iterator.next();
-        }
-        return iterator.next();
-    }
-
-    /**
-     * Returns random element of non empty array
-     *
-     * @param <T> a type of array element
-     * @param array array of elements
-     * @return random element of array
-     * @throws IllegalArgumentException if array is empty
-     */
-    public static <T> T getRandomElement(T[] array)
-            throws IllegalArgumentException {
-        if (array == null || array.length == 0) {
-            throw new IllegalArgumentException("Empty or null array");
-        }
-        Random random = getRandomInstance();
-        return array[random.nextInt(array.length)];
-    }
-
-    /**
-     * Wait for condition to be true
-     *
-     * @param condition, a condition to wait for
-     */
-    public static final void waitForCondition(BooleanSupplier condition) {
-        waitForCondition(condition, -1L, 100L);
-    }
-
-    /**
-     * Wait until timeout for condition to be true
-     *
-     * @param condition, a condition to wait for
-     * @param timeout a time in milliseconds to wait for condition to be true
-     * specifying -1 will wait forever
-     * @return condition value, to determine if wait was successful
-     */
-    public static final boolean waitForCondition(BooleanSupplier condition,
-            long timeout) {
-        return waitForCondition(condition, timeout, 100L);
-    }
-
-    /**
-     * Wait until timeout for condition to be true for specified time
-     *
-     * @param condition, a condition to wait for
-     * @param timeout a time in milliseconds to wait for condition to be true,
-     * specifying -1 will wait forever
-     * @param sleepTime a time to sleep value in milliseconds
-     * @return condition value, to determine if wait was successful
-     */
-    public static final boolean waitForCondition(BooleanSupplier condition,
-            long timeout, long sleepTime) {
-        long startTime = System.currentTimeMillis();
-        while (!(condition.getAsBoolean() || (timeout != -1L
-                && ((System.currentTimeMillis() - startTime) > timeout)))) {
-            try {
-                Thread.sleep(sleepTime);
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-                throw new Error(e);
-            }
-        }
-        return condition.getAsBoolean();
-    }
-
-    /**
-     * Adjusts the provided timeout value for the TIMEOUT_FACTOR
-     * @param tOut the timeout value to be adjusted
-     * @return The timeout value adjusted for the value of "test.timeout.factor"
-     *         system property
-     */
-    public static long adjustTimeout(long tOut) {
-        return Math.round(tOut * Utils.TIMEOUT_FACTOR);
-    }
-
-    /**
-     * Ensures a requested class is loaded
-     * @param aClass class to load
-     */
-    public static void ensureClassIsLoaded(Class<?> aClass) {
-        if (aClass == null) {
-            throw new Error("Requested null class");
-        }
-        try {
-            Class.forName(aClass.getName(), /* initialize = */ true,
-                    ClassLoader.getSystemClassLoader());
-        } catch (ClassNotFoundException e) {
-            throw new Error("Class not found", e);
-        }
-    }
-    /**
-     * @param parent a class loader to be the parent for the returned one
-     * @return an UrlClassLoader with urls made of the 'test.class.path' jtreg
-     *         property and with the given parent
-     */
-    public static URLClassLoader getTestClassPathURLClassLoader(ClassLoader parent) {
-        URL[] urls = Arrays.stream(TEST_CLASS_PATH.split(File.pathSeparator))
-                .map(Paths::get)
-                .map(Path::toUri)
-                .map(x -> {
-                    try {
-                        return x.toURL();
-                    } catch (MalformedURLException ex) {
-                        throw new Error("Test issue. JTREG property"
-                                + " 'test.class.path'"
-                                + " is not defined correctly", ex);
-                    }
-                }).toArray(URL[]::new);
-        return new URLClassLoader(urls, parent);
-    }
-
-    /**
-     * Runs runnable and checks that it throws expected exception. If exceptionException is null it means
-     * that we expect no exception to be thrown.
-     * @param runnable what we run
-     * @param expectedException expected exception
-     */
-    public static void runAndCheckException(Runnable runnable, Class<? extends Throwable> expectedException) {
-        runAndCheckException(runnable, t -> {
-            if (t == null) {
-                if (expectedException != null) {
-                    throw new AssertionError("Didn't get expected exception " + expectedException.getSimpleName());
-                }
-            } else {
-                String message = "Got unexpected exception " + t.getClass().getSimpleName();
-                if (expectedException == null) {
-                    throw new AssertionError(message, t);
-                } else if (!expectedException.isAssignableFrom(t.getClass())) {
-                    message += " instead of " + expectedException.getSimpleName();
-                    throw new AssertionError(message, t);
-                }
-            }
-        });
-    }
-
-    /**
-     * Runs runnable and makes some checks to ensure that it throws expected exception.
-     * @param runnable what we run
-     * @param checkException a consumer which checks that we got expected exception and raises a new exception otherwise
-     */
-    public static void runAndCheckException(Runnable runnable, Consumer<Throwable> checkException) {
-        try {
-            runnable.run();
-            checkException.accept(null);
-        } catch (Throwable t) {
-            checkException.accept(t);
-        }
-    }
-
-    /**
-     * Converts to VM type signature
-     *
-     * @param type Java type to convert
-     * @return string representation of VM type
-     */
-    public static String toJVMTypeSignature(Class<?> type) {
-        if (type.isPrimitive()) {
-            if (type == boolean.class) {
-                return "Z";
-            } else if (type == byte.class) {
-                return "B";
-            } else if (type == char.class) {
-                return "C";
-            } else if (type == double.class) {
-                return "D";
-            } else if (type == float.class) {
-                return "F";
-            } else if (type == int.class) {
-                return "I";
-            } else if (type == long.class) {
-                return "J";
-            } else if (type == short.class) {
-                return "S";
-            } else if (type == void.class) {
-                return "V";
-            } else {
-                throw new Error("Unsupported type: " + type);
-            }
-        }
-        String result = type.getName().replaceAll("\\.", "/");
-        if (!type.isArray()) {
-            return "L" + result + ";";
-        }
-        return result;
-    }
-
-    public static Object[] getNullValues(Class<?>... types) {
-        Object[] result = new Object[types.length];
-        int i = 0;
-        for (Class<?> type : types) {
-            result[i++] = NULL_VALUES.get(type);
-        }
-        return result;
-    }
-    private static Map<Class<?>, Object> NULL_VALUES = new HashMap<>();
-    static {
-        NULL_VALUES.put(boolean.class, false);
-        NULL_VALUES.put(byte.class, (byte) 0);
-        NULL_VALUES.put(short.class, (short) 0);
-        NULL_VALUES.put(char.class, '\0');
-        NULL_VALUES.put(int.class, 0);
-        NULL_VALUES.put(long.class, 0L);
-        NULL_VALUES.put(float.class, 0.0f);
-        NULL_VALUES.put(double.class, 0.0d);
-    }
-
-    /**
-     * Returns mandatory property value
-     * @param propName is a name of property to request
-     * @return a String with requested property value
-     */
-    public static String getMandatoryProperty(String propName) {
-        Objects.requireNonNull(propName, "Requested null property");
-        String prop = System.getProperty(propName);
-        Objects.requireNonNull(prop,
-                String.format("A mandatory property '%s' isn't set", propName));
-        return prop;
-    }
-}
-
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java
index 334911c..866c485 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/Automatic.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.factories.IRNodeBuilder;
 import jdk.test.lib.jittester.types.TypeKlass;
 import jdk.test.lib.jittester.utils.FixedTrees;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java
index 719a179..2db4018 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/AssignmentOperatorImplFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java
index a6d12a8..2d2dc81 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryArithmeticOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BuiltInType;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java
index 3925db1..183995c 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryBitwiseOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java
index d7250bd..3787ac3 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryComparisonOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java
index 2ad1735..19bf912 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryEqualityOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java
index cb6477f..9bbe91a 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryLogicOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java
index 73f0e41..613d5f8 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java
index 5f18500..66e1370 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryShiftOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java
index b7a5808..55045ba 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/BinaryStringPlusFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.OperatorKind;
 import jdk.test.lib.jittester.ProductionFailedException;
 import jdk.test.lib.jittester.Type;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java
index f8e0058..16f835a 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundArithmeticAssignmentOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java
index f87b495..73fabc7 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundBitwiseAssignmentOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java
index f534df8..07cfacd 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/factories/CompoundShiftAssignmentOperatorFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.jittester.factories;
 
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.IRNode;
 import jdk.test.lib.jittester.OperatorKind;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java
index 72613da..651f673 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/jtreg/JitTesterDriver.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,8 @@
 package jdk.test.lib.jittester.jtreg;
 
 import jdk.test.lib.Asserts;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 import java.io.IOException;
 import java.nio.file.Files;
diff --git a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java
index 8d5b11d..a333f62 100644
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/visitors/ByteCodeVisitor.java
@@ -39,7 +39,7 @@
 import jdk.internal.org.objectweb.asm.Label;
 import jdk.internal.org.objectweb.asm.MethodVisitor;
 import jdk.internal.org.objectweb.asm.Opcodes;
-import jdk.test.lib.Pair;
+import jdk.test.lib.util.Pair;
 import jdk.test.lib.jittester.BinaryOperator;
 import jdk.test.lib.jittester.Block;
 import jdk.test.lib.jittester.BuiltInType;
diff --git a/hotspot/test/testlibrary_tests/AssertsTest.java b/hotspot/test/testlibrary_tests/AssertsTest.java
index 449126c..fd0ca96 100644
--- a/hotspot/test/testlibrary_tests/AssertsTest.java
+++ b/hotspot/test/testlibrary_tests/AssertsTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 /* @test
  * @summary Tests the different assertions in the Assert class
  * @modules java.base/jdk.internal.misc
- * @library /testlibrary
+ * @library /test/lib
  */
 public class AssertsTest {
     private static class Foo implements Comparable<Foo> {
diff --git a/hotspot/test/testlibrary_tests/OutputAnalyzerReportingTest.java b/hotspot/test/testlibrary_tests/OutputAnalyzerReportingTest.java
index d708ebb..c8abc6f 100644
--- a/hotspot/test/testlibrary_tests/OutputAnalyzerReportingTest.java
+++ b/hotspot/test/testlibrary_tests/OutputAnalyzerReportingTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
  * @summary Test the OutputAnalyzer reporting functionality,
  *     such as printing additional diagnostic info
  *     (exit code, stdout, stderr, command line, etc.)
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
@@ -35,8 +35,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 
 public class OutputAnalyzerReportingTest {
diff --git a/hotspot/test/testlibrary_tests/OutputAnalyzerTest.java b/hotspot/test/testlibrary_tests/OutputAnalyzerTest.java
index 7f64529..6faedf4 100644
--- a/hotspot/test/testlibrary_tests/OutputAnalyzerTest.java
+++ b/hotspot/test/testlibrary_tests/OutputAnalyzerTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,12 @@
 /*
  * @test
  * @summary Test the OutputAnalyzer utility class
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class OutputAnalyzerTest {
 
diff --git a/hotspot/test/testlibrary_tests/RandomGeneratorTest.java b/hotspot/test/testlibrary_tests/RandomGeneratorTest.java
index f242d2f..9f4ea33 100644
--- a/hotspot/test/testlibrary_tests/RandomGeneratorTest.java
+++ b/hotspot/test/testlibrary_tests/RandomGeneratorTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Verify correctnes of the random generator from Utility.java
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run driver RandomGeneratorTest SAME_SEED
@@ -38,8 +38,8 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import jdk.test.lib.Utils;
 
 /**
diff --git a/hotspot/test/testlibrary_tests/RedefineClassTest.java b/hotspot/test/testlibrary_tests/RedefineClassTest.java
index 739352a..63f3005 100644
--- a/hotspot/test/testlibrary_tests/RedefineClassTest.java
+++ b/hotspot/test/testlibrary_tests/RedefineClassTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,19 +23,17 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @summary Proof of concept test for RedefineClassHelper
  * @modules java.base/jdk.internal.misc
  * @modules java.compiler
  *          java.instrument
  *          jdk.jartool/sun.tools.jar
- * @build RedefineClassHelper
  * @run main RedefineClassHelper
  * @run main/othervm -javaagent:redefineagent.jar RedefineClassTest
  */
 
 import static jdk.test.lib.Asserts.*;
-import jdk.test.lib.*;
 
 /*
  * Proof of concept test for the test utility class RedefineClassHelper
diff --git a/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java b/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java
index d81d6d0..0da025a 100644
--- a/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java
+++ b/hotspot/test/testlibrary_tests/SimpleClassFileLoadHookTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /testlibrary
+ * @library /test/lib
  * @requires vm.flavor != "minimal"
  * @run main/othervm/native -agentlib:SimpleClassFileLoadHook=Foo,XXX,YYY
  *      SimpleClassFileLoadHookTest
diff --git a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
index 98cf13b..3995359 100644
--- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
+++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
@@ -38,7 +38,7 @@
  * @summary Verify that for each group of mutually exclusive predicates defined
  *          in jdk.test.lib.Platform one and only one predicate
  *          evaluates to true.
- * @library /testlibrary
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
  * @run main TestMutuallyExclusivePlatformPredicates
@@ -48,7 +48,7 @@
         ARCH("isARM", "isPPC", "isSparc", "isX86", "isX64", "isAArch64"),
         BITNESS("is32bit", "is64bit"),
         OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
-        VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero"),
+        VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero", "isEmbedded"),
         MODE("isInt", "isMixed", "isComp"),
         IGNORED("isDebugBuild", "shouldSAAttach",
                 "canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
diff --git a/hotspot/test/testlibrary_tests/TestPlatformIsTieredSupported.java b/hotspot/test/testlibrary_tests/TestPlatformIsTieredSupported.java
index c9a5bea..b517268 100644
--- a/hotspot/test/testlibrary_tests/TestPlatformIsTieredSupported.java
+++ b/hotspot/test/testlibrary_tests/TestPlatformIsTieredSupported.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,10 @@
 /**
  * @test
  * @summary Verifies that Platform::isTieredSupported returns correct value.
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management
- * @build TestPlatformIsTieredSupported
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions
diff --git a/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java b/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java
index eb29c5b..31f2408 100644
--- a/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java
+++ b/hotspot/test/testlibrary_tests/ctw/ClassesDirTest.java
@@ -24,12 +24,12 @@
 /*
  * @test
  * @bug 8012447
- * @library /testlibrary /test/lib /testlibrary/ctw/src
+ * @library /test/lib /testlibrary/ctw/src
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
  *          java.management
- * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
+ * @build sun.hotspot.WhiteBox Foo Bar
  * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassesDirTest prepare
diff --git a/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java b/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java
index 873180c..c2823de 100644
--- a/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java
+++ b/hotspot/test/testlibrary_tests/ctw/ClassesListTest.java
@@ -24,12 +24,12 @@
 /*
  * @test
  * @bug 8012447
- * @library /testlibrary /test/lib /testlibrary/ctw/src
+ * @library /test/lib /testlibrary/ctw/src
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
  *          java.management
- * @build ClassFileInstaller sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
+ * @build sun.hotspot.WhiteBox Foo Bar
  * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main ClassesListTest prepare
diff --git a/hotspot/test/testlibrary_tests/ctw/CtwTest.java b/hotspot/test/testlibrary_tests/ctw/CtwTest.java
index 3e62a05..06b16b6 100644
--- a/hotspot/test/testlibrary_tests/ctw/CtwTest.java
+++ b/hotspot/test/testlibrary_tests/ctw/CtwTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 import java.nio.charset.Charset;
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public abstract class CtwTest {
     protected final String[] shouldContain;
diff --git a/hotspot/test/testlibrary_tests/ctw/JarDirTest.java b/hotspot/test/testlibrary_tests/ctw/JarDirTest.java
index 57f12a6..a784bda 100644
--- a/hotspot/test/testlibrary_tests/ctw/JarDirTest.java
+++ b/hotspot/test/testlibrary_tests/ctw/JarDirTest.java
@@ -24,14 +24,14 @@
 /*
  * @test
  * @bug 8012447
- * @library /testlibrary /test/lib /testlibrary/ctw/src
+ * @library /test/lib /testlibrary/ctw/src
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
+ * @build sun.hotspot.WhiteBox Foo Bar
  * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main JarDirTest prepare
@@ -45,7 +45,7 @@
 import java.nio.file.Files;
 import java.nio.file.Paths;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class JarDirTest extends CtwTest {
     private static final String[] SHOULD_CONTAIN
diff --git a/hotspot/test/testlibrary_tests/ctw/JarsTest.java b/hotspot/test/testlibrary_tests/ctw/JarsTest.java
index e9bc05c..16af163 100644
--- a/hotspot/test/testlibrary_tests/ctw/JarsTest.java
+++ b/hotspot/test/testlibrary_tests/ctw/JarsTest.java
@@ -24,14 +24,14 @@
 /*
  * @test
  * @bug 8012447
- * @library /testlibrary /test/lib /testlibrary/ctw/src
+ * @library /test/lib /testlibrary/ctw/src
  * @modules java.base/jdk.internal.jimage
  *          java.base/jdk.internal.misc
  *          java.base/jdk.internal.reflect
  *          java.compiler
  *          java.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build ClassFileInstaller jdk.test.lib.* sun.hotspot.tools.ctw.CompileTheWorld sun.hotspot.WhiteBox Foo Bar
+ * @build sun.hotspot.WhiteBox Foo Bar
  * @run main ClassFileInstaller sun.hotspot.WhiteBox Foo Bar
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main JarsTest prepare
@@ -41,7 +41,7 @@
  * @author igor.ignatyev@oracle.com
  */
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 public class JarsTest extends CtwTest {
     private static final String[] SHOULD_CONTAIN
diff --git a/hotspot/test/testlibrary_tests/whitebox/BlobSanityTest.java b/hotspot/test/testlibrary_tests/whitebox/BlobSanityTest.java
index 3146339..3236963 100644
--- a/hotspot/test/testlibrary_tests/whitebox/BlobSanityTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/BlobSanityTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test BlobSanityTest
  * @bug 8132980
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build BlobSanityTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI BlobSanityTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java
index 23e6afd02..302f77c 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/BooleanTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,12 +24,12 @@
 /*
  * @test BooleanTest
  * @bug 8028756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.compiler
  *          java.management/sun.management
  *          jdk.jvmstat/sun.jvmstat.monitor
- * @build BooleanTest ClassFileInstaller sun.hotspot.WhiteBox jdk.test.lib.*
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI BooleanTest
@@ -38,7 +38,8 @@
  */
 
 import sun.hotspot.WhiteBox;
-import jdk.test.lib.*;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 import sun.management.*;
 import com.sun.management.*;
 
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java
index 2694ba7..350f1f4 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/DoubleTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test DoubleTest
  * @bug 8028756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build DoubleTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI DoubleTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java
index 56ffc53..16e9eba 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/IntxTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test IntxTest
  * @bug 8038756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build IntxTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xint -XX:-ProfileInterpreter IntxTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java
index 2288680..2d52d88 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/SizeTTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test SizeTTest
  * @bug 8054823
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
- * @build SizeTTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions SizeTTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/StringTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/StringTest.java
index f8b98fa..8bf9cab 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/StringTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/StringTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test StringTest
  * @bug 8028756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build StringTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI StringTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java
index 015c02e..c2d34f1 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/Uint64Test.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test Uint64Test
  * @bug 8028756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @modules java.management/sun.management
- * @build Uint64Test
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI Uint64Test
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java
index 97149af..18e8021 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/UintxTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,10 +24,10 @@
 /*
  * @test UintxTest
  * @bug 8028756
- * @library /testlibrary /test/lib
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          java.management/sun.management
- * @build UintxTest
+ * @build sun.hotspot.WhiteBox
  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  *                              sun.hotspot.WhiteBox$WhiteBoxPermission
  * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI UintxTest
diff --git a/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java b/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java
index f1ce343..35d2ffa 100644
--- a/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java
+++ b/hotspot/test/testlibrary_tests/whitebox/vm_flags/VmFlagTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import sun.hotspot.WhiteBox;
 import sun.management.*;
 import com.sun.management.*;
-import jdk.test.lib.*;
+import jdk.test.lib.Asserts;
 import java.lang.management.ManagementFactory;
 
 public final class VmFlagTest<T> {
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index e81f208..25362b9 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -376,3 +376,4 @@
 874082a9b565a7092a40bfa934a6e3e3c3455a60 jdk-9+131
 907445d85e680ea410fe2c83c0ec64b5508e4f3e jdk-9+132
 9490ba2e5e41685c858a0ca2a6ec87611eb011c6 jdk-9+133
+1c6c21d87aa459d82425e1fddc9ce8647aebde34 jdk-9+134
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java
index 5336a8c..6630424 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogImpl.java
@@ -31,6 +31,7 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.NoSuchElementException;
@@ -72,9 +73,6 @@
     //System Id for this catalog
     String systemId;
 
-    //The parent
-    CatalogImpl parent = null;
-
     /*
      A list of catalog entry files from the input, excluding the current catalog.
      Paths in the List are normalized.
@@ -107,7 +105,7 @@
      * catalog file.
      */
     public CatalogImpl(CatalogImpl parent, CatalogFeatures f, String... file) throws CatalogException {
-        super(CatalogEntryType.CATALOG);
+        super(CatalogEntryType.CATALOG, parent);
         if (f == null) {
             throw new NullPointerException(
                     formatMessage(CatalogMessages.ERR_NULL_ARGUMENT, new Object[]{"CatalogFeatures"}));
@@ -117,7 +115,7 @@
             CatalogMessages.reportNPEOnNull("The path to the catalog file", file[0]);
         }
 
-        init(parent, f);
+        init(f);
 
         //Path of catalog files
         String[] catalogFile = file;
@@ -159,19 +157,34 @@
                     }
                 }
             }
-
-            if (systemId != null) {
-                parse(systemId);
-            }
         }
     }
 
-    private void init(CatalogImpl parent, CatalogFeatures f) {
-        this.parent = parent;
+    /**
+     * Loads the catalog
+     */
+    void load() {
+        if (systemId != null) {
+            parse(systemId);
+        }
+
+        //save this catalog before loading the next
+        loadedCatalogs.put(systemId, this);
+
+        //Load delegate and alternative catalogs if defer is false.
+        if (!isDeferred()) {
+           loadDelegateCatalogs();
+           loadNextCatalogs();
+        }
+    }
+
+    private void init(CatalogFeatures f) {
         if (parent == null) {
             level = 0;
         } else {
             level = parent.level + 1;
+            this.loadedCatalogs = parent.loadedCatalogs;
+            this.catalogsSearched = parent.catalogsSearched;
         }
         if (f == null) {
             this.features = CatalogFeatures.defaults();
@@ -196,11 +209,6 @@
         entries.stream().filter((entry) -> (entry.type == CatalogEntryType.GROUP)).forEach((entry) -> {
             ((GroupEntry) entry).reset();
         });
-
-        if (parent != null) {
-            this.loadedCatalogs = parent.loadedCatalogs;
-            this.catalogsSearched = parent.catalogsSearched;
-        }
     }
 
     /**
@@ -421,16 +429,16 @@
     void loadNextCatalogs() {
         //loads catalogs specified in nextCatalogs
         if (nextCatalogs != null) {
-            for (NextCatalog next : nextCatalogs) {
+            nextCatalogs.stream().forEach((next) -> {
                 getCatalog(next.getCatalogURI());
-            }
+            });
         }
 
         //loads catalogs from the input list
         if (inputFiles != null) {
-            for (String file : inputFiles) {
+            inputFiles.stream().forEach((file) -> {
                 getCatalog(getSystemId(file));
-            }
+            });
         }
     }
 
@@ -445,14 +453,14 @@
             return null;
         }
 
-        Catalog c = null;
+        CatalogImpl c = null;
         String path = uri.toASCIIString();
 
         if (verifyCatalogFile(uri)) {
             c = getLoadedCatalog(path);
             if (c == null) {
                 c = new CatalogImpl(this, features, path);
-                saveLoadedCatalog(path, c);
+                c.load();
             }
         }
         return c;
@@ -464,7 +472,7 @@
      * @param catalogId the catalogId associated with the Catalog object
      * @param c the Catalog to be saved
      */
-    void saveLoadedCatalog(String catalogId, Catalog c) {
+    void saveLoadedCatalog(String catalogId, CatalogImpl c) {
         loadedCatalogs.put(catalogId, c);
     }
 
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogManager.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogManager.java
index bc85186..7dd1e9c 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogManager.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogManager.java
@@ -62,7 +62,9 @@
      * @throws CatalogException If an error occurs while parsing the catalog
      */
     public static Catalog catalog(CatalogFeatures features, String... paths) {
-        return new CatalogImpl(features, paths);
+        CatalogImpl catalog = new CatalogImpl(features, paths);
+        catalog.load();
+        return catalog;
     }
 
     /**
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogReader.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogReader.java
index bf4e95b..5f08c54 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogReader.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogReader.java
@@ -259,15 +259,6 @@
         CatalogEntryType type = CatalogEntryType.getType(localName);
         if (type == CatalogEntryType.GROUP) {
             inGroup = false;
-        } else if (type == CatalogEntryType.CATALOGENTRY) {
-            /*
-             Done reading the catalog file.
-             Load delegate and alternative catalogs if defer is false.
-             */
-            if (!catalog.isDeferred()) {
-                catalog.loadDelegateCatalogs();
-                catalog.loadNextCatalogs();
-            }
         }
     }
 
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogResolverImpl.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogResolverImpl.java
index 9bf8b35..fe6223d9 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogResolverImpl.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/CatalogResolverImpl.java
@@ -119,6 +119,10 @@
         String result = null;
         CatalogImpl c = (CatalogImpl)catalog;
         String uri = Normalizer.normalizeURI(href);
+        if (uri == null) {
+            return null;
+        }
+
         //check whether uri is an urn
         if (uri != null && uri.startsWith(Util.URN)) {
             String publicId = Normalizer.decodeURN(uri);
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java b/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java
index 2c1a59c..e04f8cd 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/catalog/GroupEntry.java
@@ -48,6 +48,9 @@
     //Value of the prefer attribute
     boolean isPreferPublic = true;
 
+    //The parent of the catalog instance
+    CatalogImpl parent = null;
+
     //The catalog instance this group belongs to
     CatalogImpl catalog;
 
@@ -55,10 +58,10 @@
     List<BaseEntry> entries = new ArrayList<>();
 
     //loaded delegated catalog by system id
-    Map<String, Catalog> delegateCatalogs = new HashMap<>();
+    Map<String, CatalogImpl> delegateCatalogs = new HashMap<>();
 
     //A list of all loaded Catalogs, including this, and next catalogs
-    Map<String, Catalog> loadedCatalogs = new HashMap<>();
+    Map<String, CatalogImpl> loadedCatalogs = new HashMap<>();
 
     /*
      A list of Catalog Ids that have already been searched in a matching
@@ -136,8 +139,9 @@
      *
      * @param type The type of the entry
      */
-    public GroupEntry(CatalogEntryType type) {
+    public GroupEntry(CatalogEntryType type, CatalogImpl parent) {
         super(type);
+        this.parent = parent;
     }
 
     /**
@@ -163,7 +167,7 @@
     }
     /**
      * Constructs a group entry.
-     * @param catalog The parent catalog
+     * @param catalog The catalog this GroupEntry belongs
      * @param base The baseURI attribute
      * @param attributes The attributes
      */
@@ -445,13 +449,14 @@
      * @param catalogId the catalog Id
      */
     Catalog loadCatalog(URI catalogURI) {
-        Catalog delegateCatalog = null;
+        CatalogImpl delegateCatalog = null;
         if (catalogURI != null) {
             String catalogId = catalogURI.toASCIIString();
             delegateCatalog = getLoadedCatalog(catalogId);
             if (delegateCatalog == null) {
                 if (verifyCatalogFile(catalogURI)) {
                     delegateCatalog = new CatalogImpl(catalog, features, catalogId);
+                    delegateCatalog.load();
                     delegateCatalogs.put(catalogId, delegateCatalog);
                 }
             }
@@ -467,8 +472,8 @@
      * @return a Catalog object previously loaded, or null if none in the saved
      * list
      */
-    Catalog getLoadedCatalog(String catalogId) {
-        Catalog c = null;
+    CatalogImpl getLoadedCatalog(String catalogId) {
+        CatalogImpl c = null;
 
         //checl delegate Catalogs
         c = delegateCatalogs.get(catalogId);
@@ -504,7 +509,7 @@
         }
 
         String catalogId = catalogURI.toASCIIString();
-        if (catalogsSearched.contains(catalogId)) {
+        if (catalogsSearched.contains(catalogId) || isCircular(catalogId)) {
             CatalogMessages.reportRunTimeError(CatalogMessages.ERR_CIRCULAR_REFERENCE,
                     new Object[]{CatalogMessages.sanitize(catalogId)});
         }
@@ -512,4 +517,20 @@
         return true;
     }
 
+    /**
+     * Checks whether the catalog is circularly referenced
+     * @param systemId the system identifier of the catalog to be loaded
+     * @return true if is circular, false otherwise
+     */
+    boolean isCircular(String systemId) {
+        if (parent == null) {
+            return false;
+        }
+
+        if (parent.systemId.equals(systemId)) {
+            return true;
+        }
+
+        return parent.isCircular(systemId);
+    }
 }
diff --git a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java
index 868ad21..240c386 100644
--- a/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java
+++ b/jaxp/src/java.xml/share/classes/jdk/xml/internal/JdkXmlFeatures.java
@@ -42,6 +42,9 @@
             ORACLE_JAXP_PROPERTY_PREFIX + "enableExtensionFunctions";
     public static final String SP_ENABLE_EXTENSION_FUNCTION =
             "javax.xml.enableExtensionFunctions";
+    // This is the correct name by the spec
+    public static final String SP_ENABLE_EXTENSION_FUNCTION_SPEC =
+            "jdk.xml.enableExtensionFunctions";
     public static final String CATALOG_FEATURES = "javax.xml.catalog.catalogFeatures";
 
     public final static String PROPERTY_USE_CATALOG = XMLConstants.USE_CATALOG;
@@ -49,11 +52,11 @@
     public static enum XmlFeature {
         /**
          * Feature enableExtensionFunctions
-         * FSP: extension function is enforced by FSP. When FSP is on, entension
+         * FSP: extension function is enforced by FSP. When FSP is on, extension
          * function is disabled.
          */
         ENABLE_EXTENSION_FUNCTION(ORACLE_ENABLE_EXTENSION_FUNCTION,
-                SP_ENABLE_EXTENSION_FUNCTION, true, false, true, true),
+                SP_ENABLE_EXTENSION_FUNCTION_SPEC, true, false, true, true),
         /**
          * The {@link javax.xml.XMLConstants.USE_CATALOG} feature.
          * FSP: USE_CATALOG is not enforced by FSP.
@@ -149,6 +152,30 @@
     }
 
     /**
+     * Maps old property names with the new ones. This map is used to keep track of
+     * name changes so that old or incorrect names continue to be supported for compatibility.
+     */
+    public static enum NameMap {
+
+        ENABLE_EXTENSION_FUNCTION(SP_ENABLE_EXTENSION_FUNCTION_SPEC, SP_ENABLE_EXTENSION_FUNCTION);
+
+        final String newName;
+        final String oldName;
+
+        NameMap(String newName, String oldName) {
+            this.newName = newName;
+            this.oldName = oldName;
+        }
+
+        String getOldName(String newName) {
+            if (newName.equals(this.newName)) {
+                return oldName;
+            }
+            return null;
+        }
+    }
+
+    /**
      * States of the settings of a property, in the order: default value, value
      * set by FEATURE_SECURE_PROCESSING, jaxp.properties file, jaxp system
      * properties, and jaxp api properties
@@ -316,6 +343,15 @@
     private void readSystemProperties() {
         for (XmlFeature feature : XmlFeature.values()) {
             getSystemProperty(feature, feature.systemProperty());
+            if (!getSystemProperty(feature, feature.systemProperty())) {
+                //if system property is not found, try the older form if any
+                for (NameMap nameMap : NameMap.values()) {
+                    String oldName = nameMap.getOldName(feature.systemProperty());
+                    if (oldName != null) {
+                        getSystemProperty(feature, oldName);
+                    }
+                }
+            }
         }
     }
 
diff --git a/jaxp/test/ProblemList.txt b/jaxp/test/ProblemList.txt
index 27337ae..ce63d06 100644
--- a/jaxp/test/ProblemList.txt
+++ b/jaxp/test/ProblemList.txt
@@ -24,7 +24,3 @@
 ###########################################################################
 
 javax/xml/jaxp/isolatedjdk/catalog/PropertiesTest.sh            8147431 generic-all
-
-javax/xml/jaxp/unittest/common/TransformationWarningsTest.java	8150145 generic-all
-
-javax/xml/jaxp/unittest/common/ValidationWarningsTest.java      8150145 generic-all
diff --git a/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java b/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java
index 626943a..b536815 100644
--- a/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java
+++ b/jaxp/test/javax/xml/jaxp/functional/catalog/DeferFeatureTest.java
@@ -64,12 +64,12 @@
     public Object[][] data() {
         return new Object[][]{
             // By default, alternative catalogs are not loaded.
-            {createCatalog(CatalogFeatures.defaults()), 0},
+            {createCatalog(CatalogFeatures.defaults()), 1},
             // Alternative catalogs are not loaded when DEFER is set to true.
-            {createCatalog(createDeferFeature(DEFER_TRUE)), 0},
-            // The 3 alternative catalogs are not pre-loaded
+            {createCatalog(createDeferFeature(DEFER_TRUE)), 1},
+            // The 3 alternative catalogs are pre-loaded along with the parent
             //when DEFER is set to false.
-            {createCatalog(createDeferFeature(DEFER_FALSE)), 3}};
+            {createCatalog(createDeferFeature(DEFER_FALSE)), 4}};
     }
 
     private CatalogFeatures createDeferFeature(String defer) {
diff --git a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/BasicModularXMLParserTest.java b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/BasicModularXMLParserTest.java
index c2bf928..72fd20c 100644
--- a/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/BasicModularXMLParserTest.java
+++ b/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/BasicModularXMLParserTest.java
@@ -93,7 +93,7 @@
      */
     public void testWithOneProvider() throws Exception {
         int exitValue
-            = executeTestJava("-mp", MOD_DIR1.toString(),
+            = executeTestJava("--module-path", MOD_DIR1.toString(),
                               "-cp", CLASSES_DIR.toString(),
                               "Main", "xmlprovider1")
                 .outputTo(System.out)
@@ -108,7 +108,7 @@
      */
     public void testWithTwoProvider() throws Exception {
         int exitValue
-            = executeTestJava("-mp", MOD_DIR1.toString() + File.pathSeparator + MOD_DIR2.toString(),
+            = executeTestJava("--module-path", MOD_DIR1.toString() + File.pathSeparator + MOD_DIR2.toString(),
                               "-cp", CLASSES_DIR.toString(),
                               "Main", "xmlprovider1", "xmlprovider2")
                 .outputTo(System.out)
diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java
index 6f622f9..4b9ea77 100644
--- a/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/CatalogTest.java
@@ -92,6 +92,34 @@
         super.setUp();
     }
 
+    /*
+     * @bug 8162431
+     * Verifies that circular references are caught and
+     * CatalogException is thrown.
+     */
+    @Test(dataProvider = "getFeatures", expectedExceptions = CatalogException.class)
+    public void testCircularRef(CatalogFeatures cf, String xml) {
+        CatalogResolver catalogResolver = CatalogManager.catalogResolver(
+                cf,
+                getClass().getResource(xml).getFile());
+        catalogResolver.resolve("anyuri", "");
+    }
+
+    /*
+       DataProvider: used to verify circular reference
+        Data columns: CatalogFeatures, catalog
+     */
+    @DataProvider(name = "getFeatures")
+    public Object[][] getFeatures() {
+
+        return new Object[][]{
+            {CatalogFeatures.builder().with(CatalogFeatures.Feature.DEFER, "false").build(),
+                "catalogReferCircle-itself.xml"},
+            {CatalogFeatures.defaults(), "catalogReferCircle-itself.xml"},
+            {CatalogFeatures.builder().with(CatalogFeatures.Feature.DEFER, "false").build(),
+                "catalogReferCircle-left.xml"},
+            {CatalogFeatures.defaults(), "catalogReferCircle-left.xml"},};
+    }
 
     /*
      * @bug 8163232
diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml
new file mode 100644
index 0000000..c3cfaa6
--- /dev/null
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-itself.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+    <nextCatalog catalog="catalogReferCircle-itself.xml" />
+</catalog>
+
diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml
new file mode 100644
index 0000000..852b1a5
--- /dev/null
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-left.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+    <nextCatalog catalog="catalogReferCircle-right.xml" />
+</catalog>
+
diff --git a/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml
new file mode 100644
index 0000000..0c556a4
--- /dev/null
+++ b/jaxp/test/javax/xml/jaxp/unittest/catalog/catalogReferCircle-right.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+    <nextCatalog catalog="catalogReferCircle-left.xml" />
+</catalog>
+
diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java
index 310d1a4..bffaa4a 100644
--- a/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java
@@ -42,12 +42,13 @@
  * @test
  * @bug 8144593
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
+ * @compile -XDignore.symbol.file TestSAXDriver.java
  * @run testng/othervm -DrunSecMngr=true common.TransformationWarningsTest
  * @run testng/othervm common.TransformationWarningsTest
  * @summary Check that warnings about unsupported properties from parsers
  * are suppressed during the transformation process.
  */
-@Listeners({jaxp.library.BasePolicy.class})
+@Listeners({jaxp.library.BasePolicy.class, jaxp.library.InternalAPIPolicy.class})
 public class TransformationWarningsTest extends WarningsTestBase {
 
     @BeforeClass
@@ -80,7 +81,12 @@
         Source xslsrc = new StreamSource(new StringReader(xsl));
 
         // Create factory and transformer
-        TransformerFactory tf = TransformerFactory.newInstance();
+        TransformerFactory tf;
+        // newTransformer() method doc states that different transformer
+        // factories can be used concurrently by different Threads.
+        synchronized (TransformerFactory.class) {
+            tf = TransformerFactory.newInstance();
+        }
         Transformer t = tf.newTransformer(xslsrc);
 
         // Set URI Resolver to return the newly constructed xml
diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java b/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java
index 3b4a945..c1f4989 100644
--- a/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/ValidationWarningsTest.java
@@ -46,6 +46,7 @@
  * @bug 8144593
  * @key intermittent
  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
+ * @compile -XDignore.symbol.file TestSAXDriver.java
  * @run testng/othervm -DrunSecMngr=true common.ValidationWarningsTest
  * @run testng/othervm common.ValidationWarningsTest
  * @summary Check that warnings about unsupported properties from SAX
diff --git a/jaxp/test/javax/xml/jaxp/unittest/common/WarningsTestBase.java b/jaxp/test/javax/xml/jaxp/unittest/common/WarningsTestBase.java
index 9a7ce2d..3fde8d1 100644
--- a/jaxp/test/javax/xml/jaxp/unittest/common/WarningsTestBase.java
+++ b/jaxp/test/javax/xml/jaxp/unittest/common/WarningsTestBase.java
@@ -23,11 +23,15 @@
 
 package common;
 
+import static jaxp.library.JAXPTestUtilities.runWithAllPerm;
+
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
+import java.lang.Thread.UncaughtExceptionHandler;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -58,25 +62,27 @@
         PrintStream defStdErr = System.err;
         //Set new byte array stream as standard error stream
         ByteArrayOutputStream byteStream = new ByteArrayOutputStream(5000);
-        System.setErr(new PrintStream(byteStream));
+        runWithAllPerm(() -> System.setErr(new PrintStream(byteStream)));
         //Execute multiple TestWorker tasks
         for (int id = 0; id < THREADS_COUNT; id++) {
             EXECUTOR.execute(new TestWorker(id));
         }
         //Initiate shutdown of previously submitted task
-        EXECUTOR.shutdown();
+        runWithAllPerm(EXECUTOR::shutdown);
         //Wait for termination of submitted tasks
         if (!EXECUTOR.awaitTermination(THREADS_COUNT, TimeUnit.SECONDS)) {
             //If not all tasks terminates during the time out force them to shutdown
-            EXECUTOR.shutdownNow();
+            runWithAllPerm(EXECUTOR::shutdownNow);
         }
         //Restore default standard error stream
-        System.setErr(defStdErr);
+        runWithAllPerm(() -> System.setErr(defStdErr));
         //Print tasks stderr output
         String errContent = byteStream.toString();
         System.out.println("Standard error output content:");
         System.out.println(errContent);
-        //Check tasks stderr output for quatity of warning messages
+        //Check if uncaught exceptions were observed by one or more threads
+        Assert.assertFalse(uncaughtExceptions);
+        //Check tasks stderr output for quantity of warning messages
         Assert.assertTrue(warningPrintedOnce(XMLConstants.ACCESS_EXTERNAL_DTD, errContent));
         Assert.assertTrue(warningPrintedOnce(ENT_EXP_PROPERTY, errContent));
         Assert.assertTrue(warningPrintedOnce(XMLConstants.FEATURE_SECURE_PROCESSING, errContent));
@@ -123,6 +129,25 @@
         }
     }
 
+    // Thread factory that handles uncaughtExceptions and prints them
+    // to stdout instead of stderr.
+    private static class TestThreadFactory implements ThreadFactory {
+
+        public Thread newThread(final Runnable r) {
+            Thread t = Executors.defaultThreadFactory().newThread(r);
+            t.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
+                @Override
+                public void uncaughtException(Thread t, Throwable thr) {
+                    thr.printStackTrace(System.out);
+                    uncaughtExceptions = true;
+                }
+            });
+            return t;
+        }
+    }
+
+    //Flag that indicates if one or more threads from thread pool caught unhandled exception
+    private static boolean uncaughtExceptions = false;
     //Entity expansion limit property name
     private static final String ENT_EXP_PROPERTY = "http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit";
     //Number of simultaneous test threads
@@ -130,7 +155,7 @@
     //Number of iterations per one thread
     private static final int ITERATIONS_PER_THREAD = 4;
     //Test thread pool
-    private static final ExecutorService EXECUTOR = Executors.newCachedThreadPool();
-    //Cyclic barrier for threads startup synchronisation
+    private static final ExecutorService EXECUTOR = Executors.newCachedThreadPool(new TestThreadFactory());
+    //Cyclic barrier for threads startup synchronization
     private static final CyclicBarrier BARRIER = new CyclicBarrier(THREADS_COUNT);
 }
diff --git a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java
index 51df591..354acce 100644
--- a/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java
+++ b/jaxp/test/javax/xml/jaxp/unittest/transform/XSLTFunctionsTest.java
@@ -34,11 +34,16 @@
 import javax.xml.transform.stream.StreamResult;
 import javax.xml.transform.stream.StreamSource;
 
+import org.testng.Assert;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Listeners;
 import org.testng.annotations.Test;
 
 import static org.testng.Assert.assertEquals;
+import static jaxp.library.JAXPTestUtilities.runWithAllPerm;
+import static jaxp.library.JAXPTestUtilities.clearSystemProperty;
+import static jaxp.library.JAXPTestUtilities.setSystemProperty;
+import static jaxp.library.JAXPTestUtilities.getSystemProperty;
 
 /*
  * @test
@@ -49,10 +54,66 @@
  * @summary This class contains tests for XSLT functions.
  */
 
-//@Listeners({jaxp.library.BasePolicy.class}) //uncomment this line after 8161454 is resolved
+@Listeners({jaxp.library.BasePolicy.class})
 public class XSLTFunctionsTest {
 
     /**
+     * @bug 8161454
+     * Verifies that the new / correct name is supported, as is the old / incorrect
+     * one for compatibility
+     */
+    @Test
+    public void testNameChange() {
+
+        boolean feature;
+        TransformerFactory tf = TransformerFactory.newInstance();
+        feature = tf.getFeature(ORACLE_ENABLE_EXTENSION_FUNCTION);
+        System.out.println("Default setting: " + feature);
+        // The default: true if no SecurityManager, false otherwise
+        Assert.assertTrue(feature == getDefault());
+
+        setSystemProperty(SP_ENABLE_EXTENSION_FUNCTION, getDefaultOpposite());
+        tf = TransformerFactory.newInstance();
+        feature = tf.getFeature(ORACLE_ENABLE_EXTENSION_FUNCTION);
+        System.out.println("After setting " + SP_ENABLE_EXTENSION_FUNCTION + ": " + feature);
+        clearSystemProperty(SP_ENABLE_EXTENSION_FUNCTION);
+        // old/incorrect name is still supported
+        Assert.assertTrue(feature != getDefault());
+
+        setSystemProperty(SP_ENABLE_EXTENSION_FUNCTION_SPEC, getDefaultOpposite());
+        tf = TransformerFactory.newInstance();
+        feature = tf.getFeature(ORACLE_ENABLE_EXTENSION_FUNCTION);
+        System.out.println("After setting " + SP_ENABLE_EXTENSION_FUNCTION_SPEC + ": " + feature);
+        clearSystemProperty(SP_ENABLE_EXTENSION_FUNCTION_SPEC);
+        // new/correct name is effective
+        Assert.assertTrue(feature != getDefault());
+    }
+
+    final boolean isSecure;
+    {
+        String runSecMngr = getSystemProperty("runSecMngr");
+        isSecure = runSecMngr != null && runSecMngr.equals("true");
+    }
+
+    // The default: true if no SecurityManager, false otherwise
+    private boolean getDefault() {
+        if (isSecure) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    // Gets a String value that is opposite to the default value
+    private String getDefaultOpposite() {
+        if (isSecure) {
+            return "true";
+        } else {
+            return "false";
+        }
+    }
+
+    /**
      * @bug 8062518 8153082
      * Verifies that a reference to the DTM created by XSLT document function is
      * actually read from the DTM by an extension function.
@@ -72,7 +133,9 @@
 
         // Create factory and transformer
         TransformerFactory tf = TransformerFactory.newInstance();
-        tf.setFeature("http://www.oracle.com/xml/jaxp/properties/enableExtensionFunctions", true);
+        tf.setFeature(ORACLE_ENABLE_EXTENSION_FUNCTION, true);
+        tf.setAttribute(EXTENSION_CLASS_LOADER,
+                runWithAllPerm(() -> Thread.currentThread().getContextClassLoader()));
         Transformer t = tf.newTransformer( xslsrc );
         t.setErrorListener(tf.getErrorListener());
 
@@ -133,5 +196,16 @@
 
     static final String documentTesteExpectedResult = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                                                     + "<root>[Test:Doc][Test:External Doc]</root>";
-}
 
+    public static final String ORACLE_JAXP_PROPERTY_PREFIX =
+        "http://www.oracle.com/xml/jaxp/properties/";
+    /**
+     * Feature enableExtensionFunctions
+     */
+    public static final String ORACLE_ENABLE_EXTENSION_FUNCTION =
+            ORACLE_JAXP_PROPERTY_PREFIX + "enableExtensionFunctions";
+    static final String SP_ENABLE_EXTENSION_FUNCTION = "javax.xml.enableExtensionFunctions";
+    // This is the correct name by the spec
+    static final String SP_ENABLE_EXTENSION_FUNCTION_SPEC = "jdk.xml.enableExtensionFunctions";
+    private static final String EXTENSION_CLASS_LOADER = "jdk.xml.transform.extensionClassLoader";
+}
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 136f72f..19675fb 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -379,3 +379,4 @@
 783e7e2c587f2c7e1b9998a46d90ec196ab2a195 jdk-9+131
 9fff2477a4cadf2a9618a76f1f4fe0f20bb5ff3b jdk-9+132
 05e99eefda2b58d1ed176e411302d9d6b35dca16 jdk-9+133
+ab1d78d395d4cb8be426ff181211da1a4085cf01 jdk-9+134
diff --git a/jdk/.hgtags b/jdk/.hgtags
index 4639f93..5a179a2 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -376,3 +376,4 @@
 8c57f4c293bbc5609928308a6d91ba765760b5f9 jdk-9+131
 d5c70818cd8a82e76632c8c815bdb4f75f53aeaf jdk-9+132
 3cdae27c90b5e41afe75eab904fda19fac076330 jdk-9+133
+803adcd526d74ae0b64948d1f8260c2dbe514779 jdk-9+134
diff --git a/jdk/make/GenerateClasslist.gmk b/jdk/make/GenerateClasslist.gmk
index 279cf9d..3863a57 100644
--- a/jdk/make/GenerateClasslist.gmk
+++ b/jdk/make/GenerateClasslist.gmk
@@ -50,6 +50,8 @@
 
 CLASSLIST_FILE := $(SUPPORT_OUTPUTDIR)/classlist/classlist
 
+JLI_TRACE_FILE := $(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
+
 # If an external buildjdk has been supplied, we don't build a separate interim
 # image, so just use the external build jdk instead.
 ifeq ($(EXTERNAL_BUILDJDK), true)
@@ -59,13 +61,11 @@
 $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
 	$(call MakeDir, $(@D))
 	$(call LogInfo, Generating lib/classlist)
-	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.tmp \
-	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
-	    build.tools.classlist.HelloClasslist $(LOG_DEBUG) 2>&1
-        # Filter out generated classes, remove after JDK-8149977
 	$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@ \
-	    -Xshare:dump -XX:SharedClassListFile=$@.tmp $(LOG_DEBUG) 2>&1
-	$(RM) $@.tmp
+	    -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
+	    -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
+	    build.tools.classlist.HelloClasslist \
+	    $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
 
 TARGETS += $(CLASSLIST_FILE)
 
diff --git a/jdk/make/gensrc/GensrcVarHandles.gmk b/jdk/make/gensrc/GensrcVarHandles.gmk
index 3ad7e63..b4a2bab 100644
--- a/jdk/make/gensrc/GensrcVarHandles.gmk
+++ b/jdk/make/gensrc/GensrcVarHandles.gmk
@@ -44,6 +44,10 @@
     $1_ARGS += -KAtomicAdd
   endif
 
+  ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char Int Long), )
+    $1_ARGS += -KBitwise
+  endif
+
   ifneq ($$(findstring $$($1_Type), Byte Short Char), )
     $1_ARGS += -KShorterThanInt
   endif
@@ -101,6 +105,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Long)
@@ -113,6 +118,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Float)
diff --git a/jdk/make/mapfiles/libawt/mapfile-mawt-vers b/jdk/make/mapfiles/libawt/mapfile-mawt-vers
index 247e296..0200c49 100644
--- a/jdk/make/mapfiles/libawt/mapfile-mawt-vers
+++ b/jdk/make/mapfiles/libawt/mapfile-mawt-vers
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -22,259 +22,261 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #
-#		Java_java_awt_KeyboardFocusManager_getGlobalHeavyweightFocusOwner;
 
 # Define public interface.
 # These are the libmawt exports. See mapfile-vers for the libawt exports
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_sun_awt_UNIXToolkit_check_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1gtk;
-                Java_sun_awt_UNIXToolkit_unload_1gtk;
-                Java_sun_awt_UNIXToolkit_load_1stock_1icon;
-                Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
-		Java_sun_awt_UNIXToolkit_nativeSync;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-		Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-		Java_sun_awt_X11GraphicsConfig_swapBuffers;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-                Java_sun_awt_X11GraphicsEnvironment_initGLX;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-                Java_sun_awt_X11GraphicsDevice_getConfigColormap;
-                Java_sun_awt_X11GraphicsDevice_getConfigDepth;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_sun_awt_UNIXToolkit_check_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1gtk;
+        Java_sun_awt_UNIXToolkit_unload_1gtk;
+        Java_sun_awt_UNIXToolkit_load_1stock_1icon;
+        Java_sun_awt_UNIXToolkit_load_1gtk_1icon;
+        Java_sun_awt_UNIXToolkit_nativeSync;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_createBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_initGLX;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11GraphicsDevice_getConfigColormap;
+        Java_sun_awt_X11GraphicsDevice_getConfigDepth;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-                Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initOps;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-		Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-		Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initOps;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-		Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-		Java_sun_java2d_x11_XSurfaceData_XResetClip;
-		Java_sun_java2d_x11_XSurfaceData_XSetClip;
-		Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
-		Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
-		Java_sun_java2d_xr_XRSurfaceData_initIDs;
-		Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-		Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-		Java_sun_java2d_xr_XRBackendNative_initIDs;
-		Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
-		Java_sun_java2d_xr_XRBackendNative_freeGC;
-		Java_sun_java2d_xr_XRBackendNative_createGC;
-		Java_sun_java2d_xr_XRBackendNative_createPixmap;
-		Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-		Java_sun_java2d_xr_XRBackendNative_freePicture;
-		Java_sun_java2d_xr_XRBackendNative_freePixmap;
-		Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-		Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-		Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-		Java_sun_java2d_xr_XRBackendNative_copyArea;
-		Java_sun_java2d_xr_XRBackendNative_renderComposite;
-		Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-		Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-		Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-		Java_sun_java2d_xr_XRBackendNative_setFilter;
-		Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-		Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-		Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-		Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-		Java_sun_java2d_xr_XRBackendNative_setGCMode;
-		Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-		Java_sun_java2d_xr_XRUtils_initFormatPtrs;
-		Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
-		XRT_DrawGlyphList;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
+        Java_sun_java2d_xr_XRSurfaceData_initIDs;
+        Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRUtils_initFormatPtrs;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        XRT_DrawGlyphList;
 
-                Java_sun_java2d_opengl_OGLContext_getOGLIdString;
-                Java_sun_java2d_opengl_OGLMaskFill_maskFill;
-                Java_sun_java2d_opengl_OGLRenderer_drawPoly;
-                Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
-                Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
-                Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
-                Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
-                Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
-                Java_sun_java2d_opengl_GLXSurfaceData_initOps;
+        Java_sun_java2d_opengl_OGLContext_getOGLIdString;
+        Java_sun_java2d_opengl_OGLMaskFill_maskFill;
+        Java_sun_java2d_opengl_OGLRenderer_drawPoly;
+        Java_sun_java2d_opengl_OGLRenderQueue_flushBuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_initTexture;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFBObject;
+        Java_sun_java2d_opengl_OGLSurfaceData_initFlipBackbuffer;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureID;
+        Java_sun_java2d_opengl_OGLSurfaceData_getTextureTarget;
+        Java_sun_java2d_opengl_OGLTextRenderer_drawGlyphList;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getGLXConfigInfo;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_initConfig;
+        Java_sun_java2d_opengl_GLXGraphicsConfig_getOGLCapabilities;
+        Java_sun_java2d_opengl_GLXSurfaceData_initOps;
 
-                Java_sun_print_CUPSPrinter_initIDs;
-                Java_sun_print_CUPSPrinter_getCupsServer;
-                Java_sun_print_CUPSPrinter_getCupsPort;
-                Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-                Java_sun_print_CUPSPrinter_canConnect;
-                Java_sun_print_CUPSPrinter_getMedia;
-                Java_sun_print_CUPSPrinter_getPageSizes;
-                Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
-                Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
-                Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box_1gap;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1check;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1expander;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1extension;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1flat_1box;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1focus;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1handle;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1hline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1option;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1shadow;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1slider;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1vline;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1background;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeStartPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1switch_1theme;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1get_1gtk_1setting;
+        Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeSetRangeValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetXThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetYThickness;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetColorForState;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetClassValue;
+        Java_com_sun_java_swing_plaf_gtk_GTKStyle_nativeGetPangoFontName;
 
-		awt_display;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        awt_display;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+            Java_sun_font_FontConfigManager_getFontConfig;
+            Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-	local:
-		*;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libawt/mapfile-vers b/jdk/make/mapfiles/libawt/mapfile-vers
index 4624977..9d8a34d 100644
--- a/jdk/make/mapfiles/libawt/mapfile-vers
+++ b/jdk/make/mapfiles/libawt/mapfile-vers
@@ -27,163 +27,163 @@
 # These are the libawt exports, mapfile-mawt-vers contains the libmawt exports.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-                Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_BufferedMaskBlit_enqueueTile;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-                Java_sun_java2d_loops_DrawPath_DrawPath;
-                Java_sun_java2d_loops_FillPath_FillPath;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawPath_DrawPath;
+        Java_sun_java2d_loops_FillPath_FillPath;
 
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
-		Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-		Java_sun_java2d_loops_TransformHelper_Transform;
-		Java_sun_java2d_pipe_Region_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_FillParallelogram_FillParallelogram;
+        Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_loops_TransformHelper_Transform;
+        Java_sun_java2d_pipe_Region_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                SurfaceData_IntersectBlitBounds;
-                SurfaceData_IntersectBoundsXYXY;
-		Region_GetBounds;
-		Region_GetInfo;
-		Region_StartIteration;
-		Region_CountIterationRects;
-		Region_NextIteration;
-		Region_EndIteration;
-		RegionToYXBandedRectangles;
-		GrPrim_CompGetXorInfo;
-		GrPrim_CompGetAlphaInfo;
-                J2dTraceImpl;
-                J2dTraceInit;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        SurfaceData_IntersectBlitBounds;
+        SurfaceData_IntersectBoundsXYXY;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        RegionToYXBandedRectangles;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        J2dTraceImpl;
+        J2dTraceInit;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                mul8table;
-                div8table;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        mul8table;
+        div8table;
+        jvm;
 
-                # ProcessPath entry points and data
-                doDrawPath;
-                doFillPath;
-                path2DNumTypesID;
-                path2DTypesID;
-                path2DWindingRuleID;
-                path2DFloatCoordsID;
-                sg2dStrokeHintID;
-                sunHints_INTVAL_STROKE_PURE;
+        # ProcessPath entry points and data
+        doDrawPath;
+        doFillPath;
+        path2DNumTypesID;
+        path2DTypesID;
+        path2DWindingRuleID;
+        path2DFloatCoordsID;
+        sg2dStrokeHintID;
+        sunHints_INTVAL_STROKE_PURE;
 
-		# CDE private entry points
-                # These are in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
-		Java_sun_awt_motif_XsessionWMcommand_New;
+        # CDE private entry points
+        # These are in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
+        Java_sun_awt_motif_XsessionWMcommand_New;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-	local:
-		*;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libawt/mapfile-vers-linux b/jdk/make/mapfiles/libawt/mapfile-vers-linux
index 5645cbd..90e12f0 100644
--- a/jdk/make/mapfiles/libawt/mapfile-vers-linux
+++ b/jdk/make/mapfiles/libawt/mapfile-vers-linux
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,277 +27,278 @@
 # Linux port does not use mawt, all public symbols are in libawt.so
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_java_awt_CheckboxMenuItem_initIDs;
-		Java_java_awt_Color_initIDs;
-		Java_java_awt_FontMetrics_initIDs;
-		Java_java_awt_image_BufferedImage_initIDs;
-		Java_sun_awt_image_DataBufferNative_getElem;
-		Java_sun_awt_image_DataBufferNative_setElem;
-		Java_java_awt_image_ColorModel_initIDs;
-		Java_java_awt_image_IndexColorModel_initIDs;
-		Java_java_awt_image_Kernel_initIDs;
-		Java_java_awt_image_Raster_initIDs;
-		Java_java_awt_image_SampleModel_initIDs;
-		Java_java_awt_Label_initIDs;
-		Java_java_awt_MenuBar_initIDs;
-		Java_java_awt_ScrollPaneAdjustable_initIDs;
-		Java_java_awt_Toolkit_initIDs;
-		Java_java_awt_TrayIcon_initIDs;
-                Java_sun_awt_DebugSettings_setCTracingOn__Z;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
-                Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
-		Java_sun_awt_image_ByteComponentRaster_initIDs;
-		Java_sun_awt_image_GifImageDecoder_initIDs;
-		Java_sun_awt_image_GifImageDecoder_parseImage;
-		Java_sun_awt_image_Image_initIDs;
-		Java_sun_awt_image_ImageRepresentation_initIDs;
-		Java_sun_awt_image_ImageRepresentation_setDiffICM;
-		Java_sun_awt_image_ImageRepresentation_setICMpixels;
-		Java_sun_awt_image_ImagingLib_convolveBI;
-		Java_sun_awt_image_ImagingLib_convolveRaster;
-		Java_sun_awt_image_ImagingLib_init;
-		Java_sun_awt_image_ImagingLib_transformBI;
-		Java_sun_awt_image_ImagingLib_transformRaster;
-		Java_sun_awt_image_IntegerComponentRaster_initIDs;
-		Java_sun_awt_image_ShortComponentRaster_initIDs;
-		Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
-		Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
-                Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
-                Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
-                Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
-                Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
-                Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
-                Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
-                Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
-                Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
-                Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
-                Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
-                Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
+        Java_java_awt_CheckboxMenuItem_initIDs;
+        Java_java_awt_Color_initIDs;
+        Java_java_awt_FontMetrics_initIDs;
+        Java_java_awt_image_BufferedImage_initIDs;
+        Java_sun_awt_image_DataBufferNative_getElem;
+        Java_sun_awt_image_DataBufferNative_setElem;
+        Java_java_awt_image_ColorModel_initIDs;
+        Java_java_awt_image_IndexColorModel_initIDs;
+        Java_java_awt_image_Kernel_initIDs;
+        Java_java_awt_image_Raster_initIDs;
+        Java_java_awt_image_SampleModel_initIDs;
+        Java_java_awt_Label_initIDs;
+        Java_java_awt_MenuBar_initIDs;
+        Java_java_awt_ScrollPaneAdjustable_initIDs;
+        Java_java_awt_Toolkit_initIDs;
+        Java_java_awt_TrayIcon_initIDs;
+        Java_sun_awt_DebugSettings_setCTracingOn__Z;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2;
+        Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I;
+        Java_sun_awt_image_ByteComponentRaster_initIDs;
+        Java_sun_awt_image_GifImageDecoder_initIDs;
+        Java_sun_awt_image_GifImageDecoder_parseImage;
+        Java_sun_awt_image_Image_initIDs;
+        Java_sun_awt_image_ImageRepresentation_initIDs;
+        Java_sun_awt_image_ImageRepresentation_setDiffICM;
+        Java_sun_awt_image_ImageRepresentation_setICMpixels;
+        Java_sun_awt_image_ImagingLib_convolveBI;
+        Java_sun_awt_image_ImagingLib_convolveRaster;
+        Java_sun_awt_image_ImagingLib_init;
+        Java_sun_awt_image_ImagingLib_transformBI;
+        Java_sun_awt_image_ImagingLib_transformRaster;
+        Java_sun_awt_image_IntegerComponentRaster_initIDs;
+        Java_sun_awt_image_ShortComponentRaster_initIDs;
+        Java_sun_java2d_pipe_SpanClipRenderer_eraseTile;
+        Java_sun_java2d_pipe_SpanClipRenderer_fillTile;
+        Java_sun_java2d_pipe_ShapeSpanIterator_addSegment;
+        Java_sun_java2d_pipe_ShapeSpanIterator_moveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_lineTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_quadTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_curveTo;
+        Java_sun_java2d_pipe_ShapeSpanIterator_closePath;
+        Java_sun_java2d_pipe_ShapeSpanIterator_pathDone;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer;
+        Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly;
+        Java_sun_java2d_pipe_ShapeSpanIterator_dispose;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator;
+        Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_initIDs;
+        Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox;
+        Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY;
+        Java_sun_java2d_pipe_ShapeSpanIterator_setRule;
+        Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo;
 
-		Java_java_awt_Choice_initIDs;
-		Java_java_awt_Dimension_initIDs;
-		Java_java_awt_event_MouseEvent_initIDs;
-		Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
-		Java_java_awt_Rectangle_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
-		Java_sun_awt_image_BufImgSurfaceData_initIDs;
-		Java_sun_awt_image_BufImgSurfaceData_initRaster;
-		Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
-                Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
-		Java_sun_awt_image_BytePackedRaster_initIDs;
-		Java_sun_awt_image_ImagingLib_lookupByteBI;
-		Java_sun_awt_image_ImagingLib_lookupByteRaster;
-		Java_sun_java2d_SurfaceData_initIDs;
-		Java_sun_java2d_SurfaceData_isOpaqueGray;
-		Java_sun_java2d_Disposer_initIDs;
-		Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
-		Java_sun_java2d_loops_BlitBg_BlitBg;
-		Java_sun_java2d_loops_Blit_Blit;
-		Java_sun_java2d_loops_ScaledBlit_Scale;
-		Java_sun_java2d_loops_DrawLine_DrawLine;
-		Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
-		Java_sun_java2d_loops_DrawRect_DrawRect;
-		Java_sun_java2d_loops_FillRect_FillRect;
-		Java_sun_java2d_loops_FillSpans_FillSpans;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
-		Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
-		Java_sun_java2d_loops_MaskBlit_MaskBlit;
-		Java_sun_java2d_loops_MaskFill_MaskFill;
-		Java_sun_java2d_loops_MaskFill_FillAAPgram;
-		Java_sun_java2d_loops_MaskFill_DrawAAPgram;
-                Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
-		Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
-		sun_awt_image_GifImageDecoder_initIDs;
+        Java_java_awt_Choice_initIDs;
+        Java_java_awt_Dimension_initIDs;
+        Java_java_awt_event_MouseEvent_initIDs;
+        Java_java_awt_image_SinglePixelPackedSampleModel_initIDs;
+        Java_java_awt_Rectangle_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_getSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_initIDs;
+        Java_sun_awt_image_BufImgSurfaceData_initRaster;
+        Java_sun_awt_image_BufImgSurfaceData_setSurfaceData;
+        Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData;
+        Java_sun_awt_image_BytePackedRaster_initIDs;
+        Java_sun_awt_image_ImagingLib_lookupByteBI;
+        Java_sun_awt_image_ImagingLib_lookupByteRaster;
+        Java_sun_java2d_SurfaceData_initIDs;
+        Java_sun_java2d_SurfaceData_isOpaqueGray;
+        Java_sun_java2d_Disposer_initIDs;
+        Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose;
+        Java_sun_java2d_loops_BlitBg_BlitBg;
+        Java_sun_java2d_loops_Blit_Blit;
+        Java_sun_java2d_loops_ScaledBlit_Scale;
+        Java_sun_java2d_loops_DrawLine_DrawLine;
+        Java_sun_java2d_loops_DrawPolygons_DrawPolygons;
+        Java_sun_java2d_loops_DrawRect_DrawRect;
+        Java_sun_java2d_loops_FillRect_FillRect;
+        Java_sun_java2d_loops_FillSpans_FillSpans;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs;
+        Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops;
+        Java_sun_java2d_loops_MaskBlit_MaskBlit;
+        Java_sun_java2d_loops_MaskFill_MaskFill;
+        Java_sun_java2d_loops_MaskFill_FillAAPgram;
+        Java_sun_java2d_loops_MaskFill_DrawAAPgram;
+        Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans;
+        Java_sun_java2d_pipe_SpanClipRenderer_initIDs;
+        sun_awt_image_GifImageDecoder_initIDs;
 
-		# libmawt entry points
-		SurfaceData_InitOps;
-		SurfaceData_ThrowInvalidPipeException;
-                Region_GetBounds;
-                Region_GetInfo;
-                Region_StartIteration;
-                Region_CountIterationRects;
-                Region_NextIteration;
-                Region_EndIteration;
-                GrPrim_CompGetXorInfo;
-                GrPrim_CompGetAlphaInfo;
-		img_makePalette;
-		initInverseGrayLut;
-		make_dither_arrays;
-		make_uns_ordered_dither_array;
+        # libmawt entry points
+        SurfaceData_InitOps;
+        SurfaceData_ThrowInvalidPipeException;
+        Region_GetBounds;
+        Region_GetInfo;
+        Region_StartIteration;
+        Region_CountIterationRects;
+        Region_NextIteration;
+        Region_EndIteration;
+        GrPrim_CompGetXorInfo;
+        GrPrim_CompGetAlphaInfo;
+        img_makePalette;
+        initInverseGrayLut;
+        make_dither_arrays;
+        make_uns_ordered_dither_array;
 
-		# variables exported to libmawt
-		std_img_oda_red;
-		std_img_oda_blue;
-		std_img_oda_green;
-		std_odas_computed;
-		g_CMpDataID;
-		colorValueID;
-                jvm;
+        # variables exported to libmawt
+        std_img_oda_red;
+        std_img_oda_blue;
+        std_img_oda_green;
+        std_odas_computed;
+        g_CMpDataID;
+        colorValueID;
+        jvm;
 
-		# CDE private entry point
-                # This is in awt_LoadLibrary.c and falls through to libmawt.
-                # Evidently CDE needs this for backward compatability.
-		Java_sun_awt_motif_XsessionWMcommand;
+        # CDE private entry point
+        # This is in awt_LoadLibrary.c and falls through to libmawt.
+        # Evidently CDE needs this for backward compatability.
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		GrPrim_Sg2dGetCompInfo;
-		GrPrim_Sg2dGetClip;
-		GetNativePrim;
-		SurfaceData_IntersectBounds;
-		SurfaceData_GetOps;
-		Disposer_AddRecord;
-		GrPrim_Sg2dGetEaRGB;
-		GrPrim_Sg2dGetPixel;
-		GrPrim_Sg2dGetLCDTextContrast;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        GrPrim_Sg2dGetCompInfo;
+        GrPrim_Sg2dGetClip;
+        GetNativePrim;
+        SurfaceData_IntersectBounds;
+        SurfaceData_GetOps;
+        Disposer_AddRecord;
+        GrPrim_Sg2dGetEaRGB;
+        GrPrim_Sg2dGetPixel;
+        GrPrim_Sg2dGetLCDTextContrast;
 
-		Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
-		Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
-		Java_java_awt_AWTEvent_nativeSetSource;
-		Java_java_awt_Checkbox_initIDs;
-		Java_java_awt_Component_initIDs;
-		Java_java_awt_Dialog_initIDs;
-		Java_java_awt_Font_initIDs;
-		Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
-                Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
-                Java_java_awt_KeyboardFocusManager_initIDs;
-		Java_java_awt_Menu_initIDs;
-		Java_java_awt_MenuComponent_initIDs;
-		Java_java_awt_MenuItem_initIDs;
-		Java_java_awt_Scrollbar_initIDs;
-		Java_java_awt_ScrollPane_initIDs;
-		Java_java_awt_TextArea_initIDs;
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_X11InputMethod_disposeXIC;
-		Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_resetXIC;
-		Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
-		Java_sun_awt_X11InputMethod_turnoffStatusWindow;
-		Java_sun_awt_SunToolkit_closeSplashScreen;
-		Java_sun_awt_PlatformFont_initIDs;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_dispose;
-		Java_sun_awt_X11GraphicsConfig_pGetBounds;
-		Java_sun_awt_X11GraphicsConfig_getNumColors;
-		Java_sun_awt_X11GraphicsConfig_getXResolution;
-		Java_sun_awt_X11GraphicsConfig_getYResolution;
-                Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
-		Java_sun_awt_X11GraphicsDevice_isDBESupported;
-		Java_sun_awt_X11GraphicsDevice_getDisplay;
-		Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
-		Java_sun_awt_X11GraphicsDevice_getNumConfigs;
-		Java_sun_awt_X11GraphicsDevice_initIDs;
-                Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
-                Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
-                Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
-                Java_sun_awt_X11GraphicsDevice_configDisplayMode;
-                Java_sun_awt_X11GraphicsDevice_resetNativeData;
-                Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
-		Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
-		Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
-		Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-		Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
-		Java_sun_awt_X11GraphicsEnvironment_initDisplay;
-		Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
-		Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
-		Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords;
+        Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse;
+        Java_java_awt_AWTEvent_nativeSetSource;
+        Java_java_awt_Checkbox_initIDs;
+        Java_java_awt_Component_initIDs;
+        Java_java_awt_Dialog_initIDs;
+        Java_java_awt_Font_initIDs;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner;
+        Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow;
+        Java_java_awt_KeyboardFocusManager_initIDs;
+        Java_java_awt_Menu_initIDs;
+        Java_java_awt_MenuComponent_initIDs;
+        Java_java_awt_MenuItem_initIDs;
+        Java_java_awt_Scrollbar_initIDs;
+        Java_java_awt_ScrollPane_initIDs;
+        Java_java_awt_TextArea_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_X11InputMethod_disposeXIC;
+        Java_sun_awt_X11InputMethod_isCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_resetXIC;
+        Java_sun_awt_X11InputMethod_setCompositionEnabledNative;
+        Java_sun_awt_X11InputMethod_turnoffStatusWindow;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_dispose;
+        Java_sun_awt_X11GraphicsConfig_pGetBounds;
+        Java_sun_awt_X11GraphicsConfig_getNumColors;
+        Java_sun_awt_X11GraphicsConfig_getXResolution;
+        Java_sun_awt_X11GraphicsConfig_getYResolution;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsDevice_isDBESupported;
+        Java_sun_awt_X11GraphicsDevice_getDisplay;
+        Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals;
+        Java_sun_awt_X11GraphicsDevice_getNumConfigs;
+        Java_sun_awt_X11GraphicsDevice_initIDs;
+        Java_sun_awt_X11GraphicsDevice_initXrandrExtension;
+        Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive;
+        Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_enumDisplayModes;
+        Java_sun_awt_X11GraphicsDevice_configDisplayMode;
+        Java_sun_awt_X11GraphicsDevice_resetNativeData;
+        Java_sun_awt_X11GraphicsDevice_getNativeScaleFactor;
+        Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
+        Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
+        Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
+        Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
+        Java_sun_awt_X11GraphicsEnvironment_initDisplay;
+        Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
+        Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
 
+        Java_java_awt_AWTEvent_initIDs;
+        Java_java_awt_Button_initIDs;
+        Java_java_awt_Container_initIDs;
+        Java_java_awt_Cursor_finalizeImpl;
+        Java_java_awt_Cursor_initIDs;
+        Java_java_awt_Event_initIDs;
+        Java_java_awt_event_InputEvent_initIDs;
+        Java_java_awt_event_KeyEvent_initIDs;
+        Java_java_awt_FileDialog_initIDs;
+        Java_java_awt_Frame_initIDs;
+        Java_java_awt_Insets_initIDs;
+        Java_java_awt_TextField_initIDs;
+        Java_java_awt_Window_initIDs;
+        Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
+        Java_sun_awt_X11GraphicsConfig_init;
+        Java_sun_awt_X11GraphicsConfig_initIDs;
+        Java_sun_awt_X11GraphicsConfig_makeColorModel;
+        Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
+        Java_sun_awt_X11PMBlitLoops_Blit;
+        Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_awt_X11Renderer_devFillSpans;
+        Java_sun_awt_X11Renderer_doDrawArc;
+        Java_sun_awt_X11Renderer_doDrawLine;
+        Java_sun_awt_X11Renderer_doDrawOval;
+        Java_sun_awt_X11Renderer_doDrawPoly;
+        Java_sun_awt_X11Renderer_doDrawRect;
+        Java_sun_awt_X11Renderer_doDrawRoundRect;
+        Java_sun_awt_X11Renderer_doFillArc;
+        Java_sun_awt_X11Renderer_doFillOval;
+        Java_sun_awt_X11Renderer_doFillPoly;
+        Java_sun_awt_X11Renderer_doFillRect;
+        Java_sun_awt_X11Renderer_doFillRoundRect;
+        Java_sun_awt_X11Renderer_devCopyArea;
+        Java_sun_awt_X11SurfaceData_initIDs;
+        Java_sun_awt_X11SurfaceData_initOps;
+        Java_sun_awt_X11SurfaceData_initSurface;
+        Java_sun_awt_X11SurfaceData_isDgaAvailable;
+        Java_sun_awt_X11SurfaceData_setInvalid;
+        Java_sun_awt_X11SurfaceData_flushNativeSurface;
+        awt_display;
+        awt_lock;
+        awt_Lock;
+        awt_Unlock;
+        awt_GetDrawingSurface;
+        awt_FreeDrawingSurface;
+        awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
+        X11SurfaceData_GetOps;
+        getDefaultConfig;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_font_SunFontManager_populateFontFileNameMap;
 
-		Java_java_awt_AWTEvent_initIDs;
-		Java_java_awt_Button_initIDs;
-		Java_java_awt_Container_initIDs;
-		Java_java_awt_Cursor_finalizeImpl;
-		Java_java_awt_Cursor_initIDs;
-		Java_java_awt_Event_initIDs;
-		Java_java_awt_event_InputEvent_initIDs;
-		Java_java_awt_event_KeyEvent_initIDs;
-		Java_java_awt_FileDialog_initIDs;
-		Java_java_awt_Frame_initIDs;
-		Java_java_awt_Insets_initIDs;
-		Java_java_awt_TextField_initIDs;
-		Java_java_awt_Window_initIDs;
-		Java_sun_awt_motif_X11OffScreenImage_updateBitmask;
-		Java_sun_awt_X11GraphicsConfig_init;
-		Java_sun_awt_X11GraphicsConfig_initIDs;
-		Java_sun_awt_X11GraphicsConfig_makeColorModel;
-		Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
-		Java_sun_awt_X11PMBlitLoops_Blit;
-		Java_sun_awt_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_awt_X11Renderer_devFillSpans;
-		Java_sun_awt_X11Renderer_doDrawArc;
-		Java_sun_awt_X11Renderer_doDrawLine;
-		Java_sun_awt_X11Renderer_doDrawOval;
-		Java_sun_awt_X11Renderer_doDrawPoly;
-		Java_sun_awt_X11Renderer_doDrawRect;
-		Java_sun_awt_X11Renderer_doDrawRoundRect;
-		Java_sun_awt_X11Renderer_doFillArc;
-		Java_sun_awt_X11Renderer_doFillOval;
-		Java_sun_awt_X11Renderer_doFillPoly;
-		Java_sun_awt_X11Renderer_doFillRect;
-		Java_sun_awt_X11Renderer_doFillRoundRect;
-		Java_sun_awt_X11Renderer_devCopyArea;
-		Java_sun_awt_X11SurfaceData_initIDs;
-		Java_sun_awt_X11SurfaceData_initOps;
-		Java_sun_awt_X11SurfaceData_initSurface;
-		Java_sun_awt_X11SurfaceData_isDgaAvailable;
-		Java_sun_awt_X11SurfaceData_setInvalid;
-		Java_sun_awt_X11SurfaceData_flushNativeSurface;
-		awt_display;
-		awt_lock;
-		awt_Lock;
-		awt_Unlock;
-	        awt_GetDrawingSurface;
-	        awt_FreeDrawingSurface;
-	        awt_GetComponent;
+        # CDE private entry point
+        Java_sun_awt_motif_XsessionWMcommand;
 
-		X11SurfaceData_GetOps;
-		getDefaultConfig;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-		Java_sun_awt_FcFontManager_getFontPathNative;
-		Java_sun_font_SunFontManager_populateFontFileNameMap;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-		# CDE private entry point
-		Java_sun_awt_motif_XsessionWMcommand;
-
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
-
-	local:
-		*;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libawt_headless/mapfile-vers b/jdk/make/mapfiles/libawt_headless/mapfile-vers
index ac51010..4ec723f 100644
--- a/jdk/make/mapfiles/libawt_headless/mapfile-vers
+++ b/jdk/make/mapfiles/libawt_headless/mapfile-vers
@@ -26,85 +26,84 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-                Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
-		Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
-		Java_sun_java2d_x11_X11Renderer_XFillSpans;
-		Java_sun_java2d_x11_X11Renderer_XDrawArc;
-		Java_sun_java2d_x11_X11Renderer_XDrawLine;
-		Java_sun_java2d_x11_X11Renderer_XDrawOval;
-		Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-		Java_sun_java2d_x11_X11Renderer_XDrawRect;
-		Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
-                Java_sun_java2d_x11_X11Renderer_XDoPath;
-		Java_sun_java2d_x11_X11Renderer_XFillArc;
-		Java_sun_java2d_x11_X11Renderer_XFillOval;
-		Java_sun_java2d_x11_X11Renderer_XFillPoly;
-		Java_sun_java2d_x11_X11Renderer_XFillRect;
-		Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
-		Java_sun_java2d_x11_X11Renderer_devCopyArea;
-		Java_sun_java2d_x11_X11SurfaceData_initIDs;
-		Java_sun_java2d_x11_X11SurfaceData_initSurface;
-                Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
-                Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
+        Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
+        Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XDoPath;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_devCopyArea;
+        Java_sun_java2d_x11_X11SurfaceData_initIDs;
+        Java_sun_java2d_x11_X11SurfaceData_initSurface;
+        Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
+        Java_sun_java2d_x11_X11SurfaceData_XSetForeground;
 
-		Java_sun_java2d_x11_XSurfaceData_initOps;
-                Java_sun_java2d_x11_XSurfaceData_XCreateGC;
-                Java_sun_java2d_x11_XSurfaceData_XResetClip;
-                Java_sun_java2d_x11_XSurfaceData_XSetClip;
-                Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-		Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
-		Java_sun_java2d_x11_XSurfaceData_setInvalid;
-		Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
+        Java_sun_java2d_x11_XSurfaceData_initOps;
+        Java_sun_java2d_x11_XSurfaceData_XCreateGC;
+        Java_sun_java2d_x11_XSurfaceData_XResetClip;
+        Java_sun_java2d_x11_XSurfaceData_XSetClip;
+        Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_setInvalid;
+        Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
 
-		X11SurfaceData_GetOps;
-		Java_java_awt_Font_initIDs;
-                Java_sun_font_FontConfigManager_getFontConfig;
-                Java_sun_font_FontConfigManager_getFontConfigAASettings;
-                Java_sun_font_FontConfigManager_getFontConfigVersion;
-                Java_sun_awt_FcFontManager_getFontPathNative;
+        X11SurfaceData_GetOps;
+        Java_java_awt_Font_initIDs;
+        Java_sun_font_FontConfigManager_getFontConfig;
+        Java_sun_font_FontConfigManager_getFontConfigAASettings;
+        Java_sun_font_FontConfigManager_getFontConfigVersion;
+        Java_sun_awt_FcFontManager_getFontPathNative;
 
-		Java_sun_awt_FontDescriptor_initIDs;
-		Java_sun_awt_PlatformFont_initIDs;
+        Java_sun_awt_FontDescriptor_initIDs;
+        Java_sun_awt_PlatformFont_initIDs;
 
-		Java_sun_print_CUPSPrinter_initIDs;
-		Java_sun_print_CUPSPrinter_getCupsServer;
-		Java_sun_print_CUPSPrinter_getCupsPort;
-		Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-		Java_sun_print_CUPSPrinter_canConnect;
-		Java_sun_print_CUPSPrinter_getMedia;
-		Java_sun_print_CUPSPrinter_getPageSizes;
-		Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
-		# libfontmanager entry points
-		AWTIsHeadless;
-		AWTCountFonts;
-                AWTLoadFont;
-                AWTFreeFont;
-                AWTFontAscent;
-                AWTFontDescent;
-                AWTFontMinByte1;
-                AWTFontMaxByte1;
-                AWTFontMinCharOrByte2;
-                AWTFontMaxCharOrByte2;
-                AWTFontDefaultChar;
-                AWTFontPerChar;
-                AWTFontMaxBounds;
-                AWTFontTextExtents16;
-                AWTFreeChar;
-                AWTFontGenerateImage;
-                AWTCharAdvance;
-                AWTCharLBearing;
-                AWTCharRBearing;
-                AWTCharAscent;
-                AWTCharDescent;
-                AWTDrawGlyphList;
-                AccelGlyphCache_RemoveAllCellInfos;
+        # libfontmanager entry points
+        AWTIsHeadless;
+        AWTCountFonts;
+        AWTLoadFont;
+        AWTFreeFont;
+        AWTFontAscent;
+        AWTFontDescent;
+        AWTFontMinByte1;
+        AWTFontMaxByte1;
+        AWTFontMinCharOrByte2;
+        AWTFontMaxCharOrByte2;
+        AWTFontDefaultChar;
+        AWTFontPerChar;
+        AWTFontMaxBounds;
+        AWTFontTextExtents16;
+        AWTFreeChar;
+        AWTFontGenerateImage;
+        AWTCharAdvance;
+        AWTCharLBearing;
+        AWTCharRBearing;
+        AWTCharAscent;
+        AWTCharDescent;
+        AWTDrawGlyphList;
+        AccelGlyphCache_RemoveAllCellInfos;
 
-
-	local:
-		*;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libawt_xawt/mapfile-vers b/jdk/make/mapfiles/libawt_xawt/mapfile-vers
index 461c1ba..b56b47b 100644
--- a/jdk/make/mapfiles/libawt_xawt/mapfile-vers
+++ b/jdk/make/mapfiles/libawt_xawt/mapfile-vers
@@ -26,7 +26,7 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-        global:
+    global:
         JNI_OnLoad;
         Java_sun_awt_X11_XlibWrapper_copyIntArray;
         Java_sun_awt_X11_XlibWrapper_copyLongArray;
@@ -58,8 +58,8 @@
         Java_sun_awt_X11_XlibWrapper_XSetLocaleModifiers;
         Java_sun_awt_X11_XlibWrapper_XPeekEvent;
         Java_sun_awt_X11_XlibWrapper_DefaultScreen;
-	Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
-	Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
+        Java_sun_awt_X11_XlibWrapper_ScreenOfDisplay;
+        Java_sun_awt_X11_XlibWrapper_DoesBackingStore;
         Java_sun_awt_X11_XlibWrapper_RootWindow;
         Java_sun_awt_X11_XlibWrapper_DisplayHeight;
         Java_sun_awt_X11_XlibWrapper_DisplayWidthMM;
@@ -172,7 +172,7 @@
         Java_java_awt_Scrollbar_initIDs;
         Java_java_awt_Window_initIDs;
         Java_java_awt_Frame_initIDs;
-	Java_sun_awt_SunToolkit_closeSplashScreen;
+        Java_sun_awt_SunToolkit_closeSplashScreen;
         Java_sun_awt_UNIXToolkit_check_1gtk;
         Java_sun_awt_UNIXToolkit_load_1gtk;
         Java_sun_awt_UNIXToolkit_unload_1gtk;
@@ -196,17 +196,16 @@
         Java_sun_font_FontConfigManager_getFontConfig;
         Java_sun_font_FontConfigManager_getFontConfigAASettings;
         Java_sun_font_FontConfigManager_getFontConfigVersion;
-	Java_sun_awt_FcFontManager_getFontPathNative;
+        Java_sun_awt_FcFontManager_getFontPathNative;
         Java_sun_awt_X11GraphicsEnvironment_initDisplay;
         Java_sun_awt_X11GraphicsEnvironment_initGLX;
-	Java_sun_awt_X11GraphicsEnvironment_initXRender;
+        Java_sun_awt_X11GraphicsEnvironment_initXRender;
         Java_sun_awt_X11GraphicsEnvironment_checkShmExt;
         Java_sun_awt_X11GraphicsEnvironment_getNumScreens;
         Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum;
         Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama;
         Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint;
         Java_sun_awt_X11GraphicsEnvironment_getDisplayString;
-#        Java_sun_awt_X11GraphicsEnvironment_getNativeFonts;
         Java_sun_awt_X11GraphicsDevice_initIDs;
         Java_sun_awt_X11GraphicsDevice_getConfigVisualId;
         Java_sun_awt_X11GraphicsDevice_getConfigDepth;
@@ -231,16 +230,16 @@
         Java_sun_awt_X11GraphicsConfig_makeColorModel;
         Java_sun_awt_X11GraphicsConfig_pGetBounds;
         Java_sun_awt_X11GraphicsConfig_createBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
-	Java_sun_awt_X11GraphicsConfig_swapBuffers;
-	Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
+        Java_sun_awt_X11GraphicsConfig_destroyBackBuffer;
+        Java_sun_awt_X11GraphicsConfig_swapBuffers;
+        Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable;
         Java_sun_awt_X11_XToolkit_getTrayIconDisplayTimeout;
         Java_java_awt_Insets_initIDs;
         Java_java_awt_KeyboardFocusManager_initIDs;
         Java_java_awt_Font_initIDs;
         # libfontmanager entry points
         AWTIsHeadless;
-	AWTCountFonts;
+        AWTCountFonts;
         AWTLoadFont;
         AWTFreeFont;
         AWTFontAscent;
@@ -303,7 +302,7 @@
         Java_sun_awt_X11_XlibWrapper_XGetIconSizes;
         Java_sun_awt_X11_XlibWrapper_XKeycodeToKeysym;
         Java_sun_awt_X11_XlibWrapper_XKeysymToKeycode;
-	Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
+        Java_sun_awt_X11_XlibWrapper_XQueryKeymap;
         Java_sun_awt_X11_XlibWrapper_XkbGetEffectiveGroup;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEvents;
         Java_sun_awt_X11_XlibWrapper_XkbSelectEventDetails;
@@ -350,23 +349,23 @@
         Java_sun_java2d_x11_X11PMBlitBgLoops_nativeBlitBg;
         Java_sun_java2d_x11_X11PMBlitLoops_nativeBlit;
         Java_sun_java2d_x11_X11PMBlitLoops_updateBitmask;
-	Java_sun_java2d_x11_X11Renderer_XFillSpans;
-	Java_sun_java2d_x11_X11Renderer_XDrawArc;
-	Java_sun_java2d_x11_X11Renderer_XDrawLine;
-	Java_sun_java2d_x11_X11Renderer_XDrawOval;
-	Java_sun_java2d_x11_X11Renderer_XDrawPoly;
-	Java_sun_java2d_x11_X11Renderer_XDrawRect;
-	Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillSpans;
+        Java_sun_java2d_x11_X11Renderer_XDrawArc;
+        Java_sun_java2d_x11_X11Renderer_XDrawLine;
+        Java_sun_java2d_x11_X11Renderer_XDrawOval;
+        Java_sun_java2d_x11_X11Renderer_XDrawPoly;
+        Java_sun_java2d_x11_X11Renderer_XDrawRect;
+        Java_sun_java2d_x11_X11Renderer_XDrawRoundRect;
         Java_sun_java2d_x11_X11Renderer_XDoPath;
-	Java_sun_java2d_x11_X11Renderer_XFillArc;
-	Java_sun_java2d_x11_X11Renderer_XFillOval;
-	Java_sun_java2d_x11_X11Renderer_XFillPoly;
-	Java_sun_java2d_x11_X11Renderer_XFillRect;
-	Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
+        Java_sun_java2d_x11_X11Renderer_XFillArc;
+        Java_sun_java2d_x11_X11Renderer_XFillOval;
+        Java_sun_java2d_x11_X11Renderer_XFillPoly;
+        Java_sun_java2d_x11_X11Renderer_XFillRect;
+        Java_sun_java2d_x11_X11Renderer_XFillRoundRect;
         Java_sun_java2d_x11_X11Renderer_devCopyArea;
         Java_sun_java2d_x11_X11SurfaceData_initIDs;
         Java_sun_java2d_x11_X11SurfaceData_isDgaAvailable;
-	Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
+        Java_sun_java2d_x11_X11SurfaceData_isShmPMAvailable;
         Java_sun_java2d_x11_X11SurfaceData_initSurface;
         Java_sun_java2d_x11_X11SurfaceData_XSetCopyMode;
         Java_sun_java2d_x11_X11SurfaceData_XSetXorMode;
@@ -377,40 +376,40 @@
         Java_sun_java2d_x11_XSurfaceData_XResetClip;
         Java_sun_java2d_x11_XSurfaceData_XSetClip;
         Java_sun_java2d_x11_XSurfaceData_flushNativeSurface;
-	Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
+        Java_sun_java2d_x11_XSurfaceData_isDrawableValid;
         Java_sun_java2d_x11_XSurfaceData_setInvalid;
         Java_sun_java2d_x11_XSurfaceData_XSetGraphicsExposures;
         Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
         Java_sun_java2d_xr_XRSurfaceData_initIDs;
         Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
-	Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
-	Java_sun_java2d_xr_XRBackendNative_initIDs;
-	Java_sun_java2d_xr_XRBackendNative_freeGC;
-	Java_sun_java2d_xr_XRBackendNative_createGC;
-	Java_sun_java2d_xr_XRBackendNative_createPixmap;
-	Java_sun_java2d_xr_XRBackendNative_createPictureNative;
-	Java_sun_java2d_xr_XRBackendNative_freePicture;
-	Java_sun_java2d_xr_XRBackendNative_freePixmap;
-	Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
-	Java_sun_java2d_xr_XRBackendNative_setGCExposures;
-	Java_sun_java2d_xr_XRBackendNative_setGCForeground;
-	Java_sun_java2d_xr_XRBackendNative_copyArea;
-	Java_sun_java2d_xr_XRBackendNative_renderComposite;
-	Java_sun_java2d_xr_XRBackendNative_renderRectangle;
-	Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
-	Java_sun_java2d_xr_XRBackendNative_setFilter;
-	Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
-	Java_sun_java2d_xr_XRBackendNative_putMaskNative;
-	Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
-	Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
-	Java_sun_java2d_xr_XRBackendNative_setGCMode;
-	Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
-	Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
+        Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
+        Java_sun_java2d_xr_XRBackendNative_initIDs;
+        Java_sun_java2d_xr_XRBackendNative_freeGC;
+        Java_sun_java2d_xr_XRBackendNative_createGC;
+        Java_sun_java2d_xr_XRBackendNative_createPixmap;
+        Java_sun_java2d_xr_XRBackendNative_createPictureNative;
+        Java_sun_java2d_xr_XRBackendNative_freePicture;
+        Java_sun_java2d_xr_XRBackendNative_freePixmap;
+        Java_sun_java2d_xr_XRBackendNative_setPictureRepeat;
+        Java_sun_java2d_xr_XRBackendNative_setGCExposures;
+        Java_sun_java2d_xr_XRBackendNative_setGCForeground;
+        Java_sun_java2d_xr_XRBackendNative_copyArea;
+        Java_sun_java2d_xr_XRBackendNative_renderComposite;
+        Java_sun_java2d_xr_XRBackendNative_renderRectangle;
+        Java_sun_java2d_xr_XRBackendNative_XRenderRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_XRSetTransformNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateLinearGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_XRCreateRadialGradientPaintNative;
+        Java_sun_java2d_xr_XRBackendNative_setFilter;
+        Java_sun_java2d_xr_XRBackendNative_XRSetClipNative;
+        Java_sun_java2d_xr_XRBackendNative_putMaskNative;
+        Java_sun_java2d_xr_XRBackendNative_XRAddGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRFreeGlyphsNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCreateGlyphSetNative;
+        Java_sun_java2d_xr_XRBackendNative_XRenderCompositeTextNative;
+        Java_sun_java2d_xr_XRBackendNative_setGCMode;
+        Java_sun_java2d_xr_XRBackendNative_GCRectanglesNative;
+        Java_sun_java2d_xr_XRBackendNative_renderCompositeTrapezoidsNative;
 
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1arrow;
         Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box;
@@ -444,25 +443,28 @@
         Java_sun_awt_X11_GtkFileDialogPeer_toFront;
         Java_sun_awt_X11_GtkFileDialogPeer_setBounds;
 
-	Java_sun_print_CUPSPrinter_initIDs;
-	Java_sun_print_CUPSPrinter_getCupsServer;
-	Java_sun_print_CUPSPrinter_getCupsPort;
-	Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
-	Java_sun_print_CUPSPrinter_canConnect;
-	Java_sun_print_CUPSPrinter_getMedia;
-	Java_sun_print_CUPSPrinter_getPageSizes;
-	Java_sun_print_CUPSPrinter_getResolutions;
+        Java_sun_print_CUPSPrinter_initIDs;
+        Java_sun_print_CUPSPrinter_getCupsServer;
+        Java_sun_print_CUPSPrinter_getCupsPort;
+        Java_sun_print_CUPSPrinter_getCupsDefaultPrinter;
+        Java_sun_print_CUPSPrinter_canConnect;
+        Java_sun_print_CUPSPrinter_getMedia;
+        Java_sun_print_CUPSPrinter_getPageSizes;
+        Java_sun_print_CUPSPrinter_getResolutions;
 
         awt_GetDrawingSurface;
         awt_FreeDrawingSurface;
         awt_Unlock;
         awt_Lock;
         awt_GetComponent;
+        awt_CreateEmbeddedFrame;
+        awt_SetBounds;
+        awt_SynthesizeWindowActivation;
 
         #XAWT entry point for CDE
         Java_sun_awt_motif_XsessionWMcommand;
         Java_sun_awt_motif_XsessionWMcommand_New;
 
-        local:
-                *;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libjawt/mapfile-vers b/jdk/make/mapfiles/libjawt/mapfile-vers
index 1a79df0..ee0ef42 100644
--- a/jdk/make/mapfiles/libjawt/mapfile-vers
+++ b/jdk/make/mapfiles/libjawt/mapfile-vers
@@ -26,8 +26,8 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-	    JAWT_GetAWT;
-	local:
-	    *;
+    global:
+        JAWT_GetAWT;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libjpeg/mapfile-vers b/jdk/make/mapfiles/libjpeg/mapfile-vers
index 4534fa0..b82e757 100644
--- a/jdk/make/mapfiles/libjpeg/mapfile-vers
+++ b/jdk/make/mapfiles/libjpeg/mapfile-vers
@@ -26,30 +26,30 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		JNI_OnLoad;
+    global:
+        JNI_OnLoad;
 
-		Java_sun_awt_image_JPEGImageDecoder_initIDs;
-		Java_sun_awt_image_JPEGImageDecoder_readImage;
+        Java_sun_awt_image_JPEGImageDecoder_initIDs;
+        Java_sun_awt_image_JPEGImageDecoder_readImage;
 
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
-                Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
-	local:
-		*;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initJPEGImageReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setOutColorSpace;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_abortRead;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_disposeReader;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_resetLibraryState;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initJPEGImageWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_abortWrite;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_resetWriter;
+        Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_disposeWriter;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libjsound/mapfile-vers b/jdk/make/mapfiles/libjsound/mapfile-vers
index b8ebf0d..4cd03a7 100644
--- a/jdk/make/mapfiles/libjsound/mapfile-vers
+++ b/jdk/make/mapfiles/libjsound/mapfile-vers
@@ -26,60 +26,60 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_Platform_nGetExtraLibraries;
-            Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
-            Java_com_sun_media_sound_Platform_nIsBigEndian;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-	local:
-	    *;
+    global:
+		Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+		Java_com_sun_media_sound_DirectAudioDevice_nClose;
+		Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+		Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+		Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+		Java_com_sun_media_sound_DirectAudioDevice_nRead;
+		Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+		Java_com_sun_media_sound_DirectAudioDevice_nService;
+		Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+		Java_com_sun_media_sound_DirectAudioDevice_nStart;
+		Java_com_sun_media_sound_DirectAudioDevice_nStop;
+		Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+		Java_com_sun_media_sound_MidiInDevice_nClose;
+		Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+		Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiInDevice_nOpen;
+		Java_com_sun_media_sound_MidiInDevice_nStart;
+		Java_com_sun_media_sound_MidiInDevice_nStop;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_MidiOutDevice_nClose;
+		Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+		Java_com_sun_media_sound_MidiOutDevice_nOpen;
+		Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+		Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+		Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+		Java_com_sun_media_sound_Platform_nGetExtraLibraries;
+		Java_com_sun_media_sound_Platform_nGetLibraryForFeature;
+		Java_com_sun_media_sound_Platform_nIsBigEndian;
+		Java_com_sun_media_sound_PortMixer_nClose;
+		Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+		Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+		Java_com_sun_media_sound_PortMixer_nGetControls;
+		Java_com_sun_media_sound_PortMixer_nGetPortCount;
+		Java_com_sun_media_sound_PortMixer_nGetPortName;
+		Java_com_sun_media_sound_PortMixer_nGetPortType;
+		Java_com_sun_media_sound_PortMixer_nOpen;
+		Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+		Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libjsoundalsa/mapfile-vers b/jdk/make/mapfiles/libjsoundalsa/mapfile-vers
index 1b1c8f7..6228f8a 100644
--- a/jdk/make/mapfiles/libjsoundalsa/mapfile-vers
+++ b/jdk/make/mapfiles/libjsoundalsa/mapfile-vers
@@ -26,57 +26,57 @@
 # Define library interface.
 
 SUNWprivate_1.1 {
-	global:
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
-            Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
-            Java_com_sun_media_sound_DirectAudioDevice_nClose;
-            Java_com_sun_media_sound_DirectAudioDevice_nFlush;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
-            Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
-            Java_com_sun_media_sound_DirectAudioDevice_nOpen;
-            Java_com_sun_media_sound_DirectAudioDevice_nRead;
-            Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
-            Java_com_sun_media_sound_DirectAudioDevice_nService;
-            Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
-            Java_com_sun_media_sound_DirectAudioDevice_nStart;
-            Java_com_sun_media_sound_DirectAudioDevice_nStop;
-            Java_com_sun_media_sound_DirectAudioDevice_nWrite;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiInDevice_nClose;
-            Java_com_sun_media_sound_MidiInDevice_nGetMessages;
-            Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiInDevice_nOpen;
-            Java_com_sun_media_sound_MidiInDevice_nStart;
-            Java_com_sun_media_sound_MidiInDevice_nStop;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
-            Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
-            Java_com_sun_media_sound_MidiOutDevice_nClose;
-            Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
-            Java_com_sun_media_sound_MidiOutDevice_nOpen;
-            Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
-            Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
-            Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
-            Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
-            Java_com_sun_media_sound_PortMixer_nClose;
-            Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
-            Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
-            Java_com_sun_media_sound_PortMixer_nGetControls;
-            Java_com_sun_media_sound_PortMixer_nGetPortCount;
-            Java_com_sun_media_sound_PortMixer_nGetPortName;
-            Java_com_sun_media_sound_PortMixer_nGetPortType;
-            Java_com_sun_media_sound_PortMixer_nOpen;
-	local:
-	    *;
+    global:
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_DirectAudioDeviceProvider_nNewDirectAudioDeviceInfo;
+        Java_com_sun_media_sound_DirectAudioDevice_nAvailable;
+        Java_com_sun_media_sound_DirectAudioDevice_nClose;
+        Java_com_sun_media_sound_DirectAudioDevice_nFlush;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBufferSize;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nGetFormats;
+        Java_com_sun_media_sound_DirectAudioDevice_nIsStillDraining;
+        Java_com_sun_media_sound_DirectAudioDevice_nOpen;
+        Java_com_sun_media_sound_DirectAudioDevice_nRead;
+        Java_com_sun_media_sound_DirectAudioDevice_nRequiresServicing;
+        Java_com_sun_media_sound_DirectAudioDevice_nService;
+        Java_com_sun_media_sound_DirectAudioDevice_nSetBytePosition;
+        Java_com_sun_media_sound_DirectAudioDevice_nStart;
+        Java_com_sun_media_sound_DirectAudioDevice_nStop;
+        Java_com_sun_media_sound_DirectAudioDevice_nWrite;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiInDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiInDevice_nClose;
+        Java_com_sun_media_sound_MidiInDevice_nGetMessages;
+        Java_com_sun_media_sound_MidiInDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiInDevice_nOpen;
+        Java_com_sun_media_sound_MidiInDevice_nStart;
+        Java_com_sun_media_sound_MidiInDevice_nStop;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetDescription;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetName;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetNumDevices;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVendor;
+        Java_com_sun_media_sound_MidiOutDeviceProvider_nGetVersion;
+        Java_com_sun_media_sound_MidiOutDevice_nClose;
+        Java_com_sun_media_sound_MidiOutDevice_nGetTimeStamp;
+        Java_com_sun_media_sound_MidiOutDevice_nOpen;
+        Java_com_sun_media_sound_MidiOutDevice_nSendLongMessage;
+        Java_com_sun_media_sound_MidiOutDevice_nSendShortMessage;
+        Java_com_sun_media_sound_PortMixerProvider_nGetNumDevices;
+        Java_com_sun_media_sound_PortMixerProvider_nNewPortMixerInfo;
+        Java_com_sun_media_sound_PortMixer_nClose;
+        Java_com_sun_media_sound_PortMixer_nControlGetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlGetIntValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetFloatValue;
+        Java_com_sun_media_sound_PortMixer_nControlSetIntValue;
+        Java_com_sun_media_sound_PortMixer_nGetControls;
+        Java_com_sun_media_sound_PortMixer_nGetPortCount;
+        Java_com_sun_media_sound_PortMixer_nGetPortName;
+        Java_com_sun_media_sound_PortMixer_nGetPortType;
+        Java_com_sun_media_sound_PortMixer_nOpen;
+    local:
+        *;
 };
diff --git a/jdk/make/mapfiles/libsplashscreen/mapfile-vers b/jdk/make/mapfiles/libsplashscreen/mapfile-vers
index fec7b03..b948ef4 100644
--- a/jdk/make/mapfiles/libsplashscreen/mapfile-vers
+++ b/jdk/make/mapfiles/libsplashscreen/mapfile-vers
@@ -26,24 +26,24 @@
 # Define public interface.
 
 SUNWprivate_1.1 {
-	global:
-		Java_java_awt_SplashScreen__1update;
-		Java_java_awt_SplashScreen__1isVisible;
-		Java_java_awt_SplashScreen__1getBounds;
-		Java_java_awt_SplashScreen__1getInstance;
-		Java_java_awt_SplashScreen__1close;
-                Java_java_awt_SplashScreen__1getImageFileName;
-                Java_java_awt_SplashScreen__1getImageJarName;
-                Java_java_awt_SplashScreen__1setImageData;
-                Java_java_awt_SplashScreen__1getScaleFactor;
+    global:
+        Java_java_awt_SplashScreen__1update;
+        Java_java_awt_SplashScreen__1isVisible;
+        Java_java_awt_SplashScreen__1getBounds;
+        Java_java_awt_SplashScreen__1getInstance;
+        Java_java_awt_SplashScreen__1close;
+        Java_java_awt_SplashScreen__1getImageFileName;
+        Java_java_awt_SplashScreen__1getImageJarName;
+        Java_java_awt_SplashScreen__1setImageData;
+        Java_java_awt_SplashScreen__1getScaleFactor;
 
-		SplashLoadMemory;
-		SplashLoadFile;
-		SplashInit;
-		SplashClose;
-                SplashSetFileJarName;
-                SplashSetScaleFactor;
-                SplashGetScaledImageName;
-	local:
-		*;
+        SplashLoadMemory;
+        SplashLoadFile;
+        SplashInit;
+        SplashClose;
+        SplashSetFileJarName;
+        SplashSetScaleFactor;
+        SplashGetScaledImageName;
+    local:
+        *;
 };
diff --git a/jdk/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c b/jdk/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c
index 8fd8434..059d9a7 100644
--- a/jdk/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c
+++ b/jdk/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -123,7 +123,6 @@
     kevent(kq, changes, 2, errors, 2, &dontBlock);
 }
 
-
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_KQueueArrayWrapper_kevent0(JNIEnv *env, jobject this, jint kq,
                                            jlong kevAddr, jint kevCount,
@@ -138,6 +137,15 @@
     // Java timeout == -1 : wait forever : timespec timeout of NULL
     // Java timeout == 0  : return immediately : timespec timeout of zero
     if (timeout >= 0) {
+        // For some indeterminate reason kevent(2) has been found to fail with
+        // an EINVAL error for timeout values greater than or equal to
+        // 100000001000L. To avoid this problem, clamp the timeout arbitrarily
+        // to the maximum value of a 32-bit signed integer which is
+        // approximately 25 days in milliseconds.
+        const jlong timeoutMax = 0x7fffffff; // java.lang.Integer.MAX_VALUE
+        if (timeout > timeoutMax) {
+            timeout = timeoutMax;
+        }
         ts.tv_sec = timeout / 1000;
         ts.tv_nsec = (timeout % 1000) * 1000000; //nanosec = 1 million millisec
         tsp = &ts;
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
index a02e2f1..cec799e 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandles.java
@@ -1207,11 +1207,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1326,11 +1331,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double}, then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1631,11 +1641,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -2353,9 +2368,13 @@
      * the following conditions:
      * <ul>
      * <li>if the component type is anything other than {@code byte},
-     *     {@code short}, {@code char}, {@code int} or {@code long},
+     *     {@code short}, {@code char}, {@code int}, {@code long},
      *     {@code float}, or {@code double} then numeric atomic update access
      *     modes are unsupported.
+     * <li>if the field type is anything other than {@code boolean},
+     *     {@code byte}, {@code short}, {@code char}, {@code int} or
+     *     {@code long} then bitwise atomic update access modes are
+     *     unsupported.
      * </ul>
      * <p>
      * If the component type is {@code float} or {@code double} then numeric
@@ -2426,7 +2445,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2434,6 +2455,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
@@ -2508,7 +2532,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2516,6 +2542,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java
index 5e71204..50e8191 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/VarHandle.java
@@ -134,21 +134,39 @@
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #compareAndSet compareAndSet},
+ * {@link #weakCompareAndSetPlain weakCompareAndSetPlain},
  * {@link #weakCompareAndSet weakCompareAndSet},
- * {@link #weakCompareAndSetVolatile weakCompareAndSetVolatile},
  * {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire},
  * {@link #weakCompareAndSetRelease weakCompareAndSetRelease},
  * {@link #compareAndExchangeAcquire compareAndExchangeAcquire},
  * {@link #compareAndExchange compareAndExchange},
  * {@link #compareAndExchangeRelease compareAndExchangeRelease},
- * {@link #getAndSet getAndSet}.
+ * {@link #getAndSet getAndSet},
+ * {@link #getAndSetAcquire getAndSetAcquire},
+ * {@link #getAndSetRelease getAndSetRelease}.
  * <li>numeric atomic update access modes that, for example, atomically get and
  * set with addition the value of a variable under specified memory ordering
  * effects.
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #getAndAdd getAndAdd},
+ * {@link #getAndAddAcquire getAndAddAcquire},
+ * {@link #getAndAddRelease getAndAddRelease},
  * {@link #addAndGet addAndGet}.
+ * <li>bitwise atomic update access modes that, for example, atomically get and
+ * bitwise OR the value of a variable under specified memory ordering
+ * effects.
+ * The set of corresponding access mode methods belonging to this group
+ * consists of the methods
+ * {@link #getAndBitwiseOr getAndBitwiseOr},
+ * {@link #getAndBitwiseOrAcquire getAndBitwiseOrAcquire},
+ * {@link #getAndBitwiseOrRelease getAndBitwiseOrRelease},
+ * {@link #getAndBitwiseAnd getAndBitwiseAnd},
+ * {@link #getAndBitwiseAndAcquire getAndBitwiseAndAcquire},
+ * {@link #getAndBitwiseAndRelease getAndBitwiseAndRelease},
+ * {@link #getAndBitwiseXor getAndBitwiseXor},
+ * {@link #getAndBitwiseXorAcquire getAndBitwiseXorAcquire},
+ * {@link #getAndBitwiseXorRelease getAndBitwiseXorRelease}.
  * </ul>
  *
  * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup
@@ -163,8 +181,8 @@
  * VarHandle instances and the corresponding method never throws
  * {@code UnsupportedOperationException}.
  * If a VarHandle references a read-only variable (for example a {@code final}
- * field) then write, atomic update and numeric atomic update access modes are
- * not supported and corresponding methods throw
+ * field) then write, atomic update, numeric atomic update, and bitwise atomic
+ * update access modes are not supported and corresponding methods throw
  * {@code UnsupportedOperationException}.
  * Read/write access modes (if supported), with the exception of
  * {@code get} and {@code set}, provide atomic access for
@@ -816,8 +834,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSet} must match the access mode type that is the result of
-     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
+     * weakCompareAndSetPlain} must match the access mode type that is the result of
+     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -838,7 +856,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSet(Object... args);
+    boolean weakCompareAndSetPlain(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -853,8 +871,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSetVolatile} must match the access mode type that is the
-     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE)}
+     * weakCompareAndSet} must match the access mode type that is the
+     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -875,7 +893,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSetVolatile(Object... args);
+    boolean weakCompareAndSet(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -986,6 +1004,71 @@
     @HotSpotIntrinsicCandidate
     Object getAndSet(Object... args);
 
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #set} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #setRelease} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetRelease(Object... args);
 
     // Primitive adders
     // Throw UnsupportedOperationException for refs
@@ -1025,21 +1108,21 @@
 
     /**
      * Atomically adds the {@code value} to the current value of a variable with
-     * the memory semantics of {@link #setVolatile}, and returns the variable's
-     * current (updated) value, as accessed with the memory semantics of
-     * {@link #getVolatile}.
+     * the memory semantics of {@link #set}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
      *
      * <p>The method signature is of the form {@code (CT, T value)T}.
      *
-     * <p>The symbolic type descriptor at the call site of {@code addAndGet}
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire}
      * must match the access mode type that is the result of calling
-     * {@code accessModeType(VarHandle.AccessMode.ADD_AND_GET)} on this
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE)} on this
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
      * {@code (CT, T value)}
      * , statically represented using varargs.
-     * @return the signature-polymorphic result that is the current value of
+     * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
@@ -1054,7 +1137,378 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    Object addAndGet(Object... args);
+    Object getAndAddAcquire(Object... args);
+
+    /**
+     * Atomically adds the {@code value} to the current value of a variable with
+     * the memory semantics of {@link #setRelease}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T value)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T value)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndAddRelease(Object... args);
+
+
+    // Bitwise operations
+    // Throw UnsupportedOperationException for refs
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOr(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAnd(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXor(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorRelease(Object... args);
+
 
     enum AccessType {
         GET(Object.class),
@@ -1204,15 +1658,15 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
+         * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain}
          */
-        WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
+        WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SWAP),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#weakCompareAndSetVolatile VarHandle.weakCompareAndSetVolatile}
+         * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
          */
-        WEAK_COMPARE_AND_SET_VOLATILE("weakCompareAndSetVolatile", AccessType.COMPARE_AND_SWAP),
+        WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
         /**
          * The access mode whose access is specified by the corresponding
          * method
@@ -1234,15 +1688,87 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#getAndSetAcquire VarHandle.getAndSetAcquire}
+         */
+        GET_AND_SET_ACQUIRE("getAndSetAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndSetRelease VarHandle.getAndSetRelease}
+         */
+        GET_AND_SET_RELEASE("getAndSetRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#getAndAdd VarHandle.getAndAdd}
          */
         GET_AND_ADD("getAndAdd", AccessType.GET_AND_UPDATE),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#addAndGet VarHandle.addAndGet}
+         * {@link VarHandle#getAndAddAcquire VarHandle.getAndAddAcquire}
          */
-        ADD_AND_GET("addAndGet", AccessType.GET_AND_UPDATE),
+        GET_AND_ADD_ACQUIRE("getAndAddAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndAddRelease VarHandle.getAndAddRelease}
+         */
+        GET_AND_ADD_RELEASE("getAndAddRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOr VarHandle.getAndBitwiseOr}
+         */
+        GET_AND_BITWISE_OR("getAndBitwiseOr", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrRelease VarHandle.getAndBitwiseOrRelease}
+         */
+        GET_AND_BITWISE_OR_RELEASE("getAndBitwiseOrRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrAcquire VarHandle.getAndBitwiseOrAcquire}
+         */
+        GET_AND_BITWISE_OR_ACQUIRE("getAndBitwiseOrAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAnd VarHandle.getAndBitwiseAnd}
+         */
+        GET_AND_BITWISE_AND("getAndBitwiseAnd", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndRelease VarHandle.getAndBitwiseAndRelease}
+         */
+        GET_AND_BITWISE_AND_RELEASE("getAndBitwiseAndRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndAcquire VarHandle.getAndBitwiseAndAcquire}
+         */
+        GET_AND_BITWISE_AND_ACQUIRE("getAndBitwiseAndAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXor VarHandle.getAndBitwiseXor}
+         */
+        GET_AND_BITWISE_XOR("getAndBitwiseXor", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorRelease VarHandle.getAndBitwiseXorRelease}
+         */
+        GET_AND_BITWISE_XOR_RELEASE("getAndBitwiseXorRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorAcquire VarHandle.getAndBitwiseXorAcquire}
+         */
+        GET_AND_BITWISE_XOR_ACQUIRE("getAndBitwiseXorAcquire", AccessType.GET_AND_UPDATE),
         ;
 
         static final Map<String, AccessMode> methodNameToAccessMode;
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
index d6f5aaa..634d64d 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template
@@ -156,7 +156,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -164,7 +164,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -193,6 +193,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -204,12 +218,85 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldInstanceReadWrite handle, Object holder, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+        static $type$ getAndAddAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
         }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, $type$.class);
     }
@@ -337,7 +424,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -345,7 +432,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -374,6 +461,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -385,12 +486,84 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldStaticReadWrite handle, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(handle.base,
+        static $type$ getAndAddAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(handle.base,
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, $type$.class);
     }
@@ -562,7 +735,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -575,7 +748,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -624,33 +797,131 @@
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(value):value});
         }
-#end[CAS]
-#if[AtomicAdd]
 
         @ForceInline
-        static $type$ getAndAdd(Array handle, Object oarray, int index, $type$ value) {
+        static $type$ getAndSetAcquire(Array handle, Object oarray, int index, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
             $type$[] array = ($type$[]) oarray;
 #end[Object]
+            return UNSAFE.getAndSet$Type$Acquire(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
+#end[CAS]
+#if[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndAdd(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
             return UNSAFE.getAndAdd$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     value);
         }
 
         @ForceInline
-        static $type$ addAndGet(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
+        static $type$ getAndAddAcquire(Array handle, Object oarray, int index, $type$ value) {
             $type$[] array = ($type$[]) oarray;
-#end[Object]
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(array,
+            return UNSAFE.getAndAdd$Type$Acquire(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
-                    value) + value);
+                    value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndAdd$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(Array.class, {#if[Object]?Object[].class:$type$[].class}, {#if[Object]?Object.class:$type$.class}, int.class);
     }
diff --git a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
index bb2f7f0..da57311 100644
--- a/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template
@@ -223,7 +223,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     ba,
@@ -232,7 +232,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     ba,
@@ -267,6 +267,26 @@
                                       address(ba, index(ba, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -284,6 +304,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(byte[] ba, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             long offset = address(ba, index(ba, index));
@@ -294,12 +340,162 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ArrayHandle handle, Object oba, int index, $type$ delta) {
-            return getAndAdd(handle, oba, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ArrayHandle.class, byte[].class, $type$.class, int.class);
     }
@@ -466,7 +662,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -475,7 +671,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -510,6 +706,26 @@
                                       address(bb, indexRO(bb, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -527,6 +743,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
@@ -538,12 +780,166 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
-            return getAndAdd(handle, obb, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+        
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ByteBufferHandle.class, ByteBuffer.class, $type$.class, int.class);
     }
diff --git a/jdk/src/java.base/share/classes/java/net/ServerSocket.java b/jdk/src/java.base/share/classes/java/net/ServerSocket.java
index a86fca6..256c9a6 100644
--- a/jdk/src/java.base/share/classes/java/net/ServerSocket.java
+++ b/jdk/src/java.base/share/classes/java/net/ServerSocket.java
@@ -25,8 +25,13 @@
 
 package java.net;
 
+import jdk.internal.misc.JavaNetSocketAccess;
+import jdk.internal.misc.SharedSecrets;
+
 import java.io.FileDescriptor;
 import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
 import java.nio.channels.ServerSocketChannel;
 import java.security.AccessController;
 import java.security.PrivilegedExceptionAction;
@@ -1011,4 +1016,27 @@
             return options;
         }
     }
+
+    static {
+        SharedSecrets.setJavaNetSocketAccess(
+            new JavaNetSocketAccess() {
+                @Override
+                public ServerSocket newServerSocket(SocketImpl impl) {
+                    return new ServerSocket(impl);
+                }
+
+                @Override
+                public SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass) {
+                    try {
+                        Constructor<? extends SocketImpl> ctor =
+                            implClass.getDeclaredConstructor();
+                        return ctor.newInstance();
+                    } catch (NoSuchMethodException | InstantiationException |
+                             IllegalAccessException | InvocationTargetException e) {
+                        throw new AssertionError(e);
+                    }
+                }
+            }
+        );
+    }
 }
diff --git a/jdk/src/java.base/share/classes/java/util/Base64.java b/jdk/src/java.base/share/classes/java/util/Base64.java
index 9a34f27..99f5dc0 100644
--- a/jdk/src/java.base/share/classes/java/util/Base64.java
+++ b/jdk/src/java.base/share/classes/java/util/Base64.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -788,7 +788,7 @@
         public void write(byte[] b, int off, int len) throws IOException {
             if (closed)
                 throw new IOException("Stream is closed");
-            if (off < 0 || len < 0 || off + len > b.length)
+            if (off < 0 || len < 0 || len > b.length - off)
                 throw new ArrayIndexOutOfBoundsException();
             if (len == 0)
                 return;
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java
index fd116b5..ea2ab9c 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java
@@ -521,7 +521,7 @@
                 else
                     break;
             }
-            else if (STACK.weakCompareAndSetVolatile(this, p, (p = p.next)))
+            else if (STACK.weakCompareAndSet(this, p, (p = p.next)))
                 unlinked = true;
             else
                 p = stack;
@@ -532,7 +532,7 @@
             if (q.isLive()) {
                 p = q;
                 q = s;
-            } else if (NEXT.weakCompareAndSetVolatile(p, q, s))
+            } else if (NEXT.weakCompareAndSet(p, q, s))
                 break;
             else
                 q = p.next;
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
index e8193a0..5c1c706 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java
@@ -330,7 +330,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != h) // hop two nodes at a time; failure is OK
-                            HEAD.weakCompareAndSetVolatile(this, h, newNode);
+                            HEAD.weakCompareAndSet(this, h, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read prev
@@ -362,7 +362,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != t) // hop two nodes at a time; failure is OK
-                            TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                            TAIL.weakCompareAndSet(this, t, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read next
@@ -1153,12 +1153,12 @@
                     if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                         // Successful CAS is the linearization point
                         // for all elements to be added to this deque.
-                        if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                        if (!TAIL.weakCompareAndSet(this, t, last)) {
                             // Try a little harder to update tail,
                             // since we may be adding many elements.
                             t = tail;
                             if (last.next == null)
-                                TAIL.weakCompareAndSetVolatile(this, t, last);
+                                TAIL.weakCompareAndSet(this, t, last);
                         }
                         return true;
                     }
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
index 1e3f1aa..56ccb33 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java
@@ -308,7 +308,7 @@
                     // for e to become an element of this queue,
                     // and for newNode to become "live".
                     if (p != t) // hop two nodes at a time; failure is OK
-                        TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                        TAIL.weakCompareAndSet(this, t, newNode);
                     return true;
                 }
                 // Lost CAS race to another thread; re-read next
@@ -477,7 +477,7 @@
 
                 next = succ(p);
                 if (pred != null && next != null) // unlink
-                    NEXT.weakCompareAndSetVolatile(pred, p, next);
+                    NEXT.weakCompareAndSet(pred, p, next);
                 if (removed)
                     return true;
             }
@@ -524,12 +524,12 @@
                 if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                     // Successful CAS is the linearization point
                     // for all elements to be added to this queue.
-                    if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                    if (!TAIL.weakCompareAndSet(this, t, last)) {
                         // Try a little harder to update tail,
                         // since we may be adding many elements.
                         t = tail;
                         if (last.next == null)
-                            TAIL.weakCompareAndSetVolatile(this, t, last);
+                            TAIL.weakCompareAndSet(this, t, last);
                     }
                     return true;
                 }
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java
index a61762b..1218c75 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java
@@ -551,7 +551,7 @@
     public final int decrementPendingCountUnlessZero() {
         int c;
         do {} while ((c = pending) != 0 &&
-                     !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
+                     !PENDING.weakCompareAndSet(this, c, c - 1));
         return c;
     }
 
@@ -584,7 +584,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -607,7 +607,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -652,7 +652,7 @@
         for (int c;;) {
             if ((c = pending) == 0)
                 return this;
-            else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
+            else if (PENDING.weakCompareAndSet(this, c, c - 1))
                 return null;
         }
     }
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
index 9cc3aef..4169ec3 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
@@ -42,15 +42,10 @@
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Predicate;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinWorkerThread;
 import java.util.concurrent.locks.LockSupport;
 
 /**
@@ -1413,7 +1408,7 @@
         }
         if (phase != QUIET) {                         // else pre-adjusted
             long c;                                   // decrement counts
-            do {} while (!CTL.weakCompareAndSetVolatile
+            do {} while (!CTL.weakCompareAndSet
                          (this, c = ctl, ((RC_MASK & (c - RC_UNIT)) |
                                           (TC_MASK & (c - TC_UNIT)) |
                                           (SP_MASK & c))));
@@ -1608,7 +1603,7 @@
                     do {
                         w.stackPred = (int)(c = ctl);
                         nc = ((c - RC_UNIT) & UC_MASK) | (SP_MASK & np);
-                    } while (!CTL.weakCompareAndSetVolatile(this, c, nc));
+                    } while (!CTL.weakCompareAndSet(this, c, nc));
                 }
                 else {                                  // already queued
                     int pred = w.stackPred;
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java
index 82e773c..ec90f23 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/FutureTask.java
@@ -361,7 +361,7 @@
     private void finishCompletion() {
         // assert state > COMPLETING;
         for (WaitNode q; (q = waiters) != null;) {
-            if (WAITERS.weakCompareAndSetVolatile(this, q, null)) {
+            if (WAITERS.weakCompareAndSet(this, q, null)) {
                 for (;;) {
                     Thread t = q.thread;
                     if (t != null) {
@@ -423,7 +423,7 @@
                 q = new WaitNode();
             }
             else if (!queued)
-                queued = WAITERS.weakCompareAndSetVolatile(this, q.next = waiters, q);
+                queued = WAITERS.weakCompareAndSet(this, q.next = waiters, q);
             else if (timed) {
                 final long parkNanos;
                 if (startTime == 0L) { // first time
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java
index c0e6fba..043c0b2 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/Phaser.java
@@ -456,7 +456,7 @@
                         // finish registration whenever parent registration
                         // succeeded, even when racing with termination,
                         // since these are part of the same "transaction".
-                        while (!STATE.weakCompareAndSetVolatile
+                        while (!STATE.weakCompareAndSet
                                (this, s,
                                 ((long)phase << PHASE_SHIFT) | adjust)) {
                             s = state;
@@ -488,7 +488,7 @@
             // CAS to root phase with current parties, tripping unarrived
             while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
                    (int)(s >>> PHASE_SHIFT) &&
-                   !STATE.weakCompareAndSetVolatile
+                   !STATE.weakCompareAndSet
                    (this, s,
                     s = (((long)phase << PHASE_SHIFT) |
                          ((phase < 0) ? (s & COUNTS_MASK) :
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java
index 8ba78b3..b59887d4 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java
@@ -1203,7 +1203,7 @@
                     } catch (RuntimeException | Error ex) { // back out
                         do {} while (((c = ctl) & DISABLED) == 0 &&
                                      (c & ACTIVE) != 0 &&
-                                     !CTL.weakCompareAndSetVolatile
+                                     !CTL.weakCompareAndSet
                                      (this, c, c & ~ACTIVE));
                         throw ex;
                     }
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java
index 44b9e5a..9410db9 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java
@@ -106,16 +106,16 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSet(this,
-                                       (expectedValue ? 1 : 0),
-                                       (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSetPlain(this,
+                                            (expectedValue ? 1 : 0),
+                                            (newValue ? 1 : 0));
     }
 
     /**
@@ -285,7 +285,7 @@
      * Possibly atomically sets the value to {@code newValue} if the current
      * value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -293,9 +293,9 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSetVolatile(this,
-                                               (expectedValue ? 1 : 0),
-                                               (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSet(this,
+                                       (expectedValue ? 1 : 0),
+                                       (newValue ? 1 : 0));
     }
 
     /**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java
index fa7af45..c7fa1c6 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java
@@ -146,7 +146,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -217,7 +217,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -490,7 +490,7 @@
      * Possibly atomically sets the value to {@code newValue} if
      * the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java
index 301aa4a..8bce29b 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final int incrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, 1);
+        return (int)AA.getAndAdd(array, i, 1) + 1;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final int decrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, -1);
+        return (int)AA.getAndAdd(array, i, -1) - 1;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public final int addAndGet(int i, int delta) {
-        return (int)AA.addAndGet(array, i, delta);
+        return (int)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java
index 726e7a3..5ee7104 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java
@@ -162,7 +162,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -209,7 +209,7 @@
 
     /**
      * Atomically increments the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(1)}.
      *
@@ -221,7 +221,7 @@
 
     /**
      * Atomically decrements the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(-1)}.
      *
@@ -233,7 +233,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -504,7 +504,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
index 3d584cf..84182c4 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final long incrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, 1L);
+        return (long)AA.getAndAdd(array, i, 1L) + 1L;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final long decrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, -1L);
+        return (long)AA.getAndAdd(array, i, -1L) - 1L;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public long addAndGet(int i, long delta) {
-        return (long)AA.addAndGet(array, i, delta);
+        return (long)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java
index d8bd6e4..0098d31 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java
@@ -125,14 +125,14 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
     }
 
     /**
@@ -370,7 +370,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -378,7 +378,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSetVolatile(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
     }
 
     /**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java
index 34bb0f1..998f167 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java
@@ -155,7 +155,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -163,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -451,7 +451,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -460,7 +460,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
diff --git a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java
index 24be8fb..8b9d401 100644
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java
+++ b/jdk/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java
@@ -1123,14 +1123,14 @@
             }
             else if ((p = wtail) == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
                 node = new WNode(WMODE, p);
             else if (node.prev != p)
                 node.prev = p;
-            else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+            else if (WTAIL.weakCompareAndSet(this, p, node)) {
                 p.next = node;
                 break;
             }
@@ -1162,7 +1162,7 @@
             else if (h != null) { // help release stale waiters
                 WNode c; Thread w;
                 while ((c = h.cowait) != null) {
-                    if (WCOWAIT.weakCompareAndSetVolatile(h, c, c.cowait) &&
+                    if (WCOWAIT.weakCompareAndSet(h, c, c.cowait) &&
                         (w = c.thread) != null)
                         LockSupport.unpark(w);
                 }
@@ -1247,7 +1247,7 @@
             }
             if (p == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
@@ -1255,7 +1255,7 @@
             else if (h == p || p.mode != RMODE) {
                 if (node.prev != p)
                     node.prev = p;
-                else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+                else if (WTAIL.weakCompareAndSet(this, p, node)) {
                     p.next = node;
                     break;
                 }
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java
similarity index 66%
copy from test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java
copy to jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java
index 4b2e7d2..39dd153 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/JavaNetSocketAccess.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,32 +23,19 @@
  * questions.
  */
 
+package jdk.internal.misc;
 
-/*
- * The Original Code is HAT. The Initial Developer of the
- * Original Code is Bill Foote, with contributions from others
- * at JavaSoft/Sun.
- */
+import java.net.ServerSocket;
+import java.net.SocketImpl;
 
-package jdk.test.lib.hprof.model;
+public interface JavaNetSocketAccess {
+    /**
+     * Creates a ServerSocket associated with the given SocketImpl.
+     */
+    ServerSocket newServerSocket(SocketImpl impl);
 
-/**
- * Represents an integer (i.e. an int field in an instance).
- *
- * @author      Bill Foote
- */
-
-
-public class JavaInt extends JavaValue {
-
-    int value;
-
-    public JavaInt(int value) {
-        this.value = value;
-    }
-
-    public String toString() {
-        return "" + value;
-    }
-
+    /*
+     * Constructs a SocketImpl instance of the given class.
+     */
+    SocketImpl newSocketImpl(Class<? extends SocketImpl> implClass);
 }
diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
index fed1b69..052d111 100644
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/SharedSecrets.java
@@ -55,6 +55,7 @@
     private static JavaNetAccess javaNetAccess;
     private static JavaNetInetAddressAccess javaNetInetAddressAccess;
     private static JavaNetHttpCookieAccess javaNetHttpCookieAccess;
+    private static JavaNetSocketAccess javaNetSocketAccess;
     private static JavaNioAccess javaNioAccess;
     private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess;
     private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess;
@@ -161,6 +162,16 @@
         return javaNetHttpCookieAccess;
     }
 
+    public static void setJavaNetSocketAccess(JavaNetSocketAccess jnsa) {
+        javaNetSocketAccess = jnsa;
+    }
+
+    public static JavaNetSocketAccess getJavaNetSocketAccess() {
+        if (javaNetSocketAccess == null)
+            unsafe.ensureClassInitialized(java.net.ServerSocket.class);
+        return javaNetSocketAccess;
+    }
+
     public static void setJavaNioAccess(JavaNioAccess jna) {
         javaNioAccess = jna;
     }
diff --git a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java
index d37b3e7..f86f5ab 100644
--- a/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java
+++ b/jdk/src/java.base/share/classes/jdk/internal/misc/Unsafe.java
@@ -2278,6 +2278,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndAddIntRelease(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndAddIntAcquire(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     /**
      * Atomically adds the given value to the current value of a field
      * or array element within the given object {@code o}
@@ -2298,6 +2316,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndAddLongRelease(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndAddLongAcquire(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndAddByte(Object o, long offset, byte delta) {
         byte v;
@@ -2307,6 +2343,24 @@
         return v;
     }
 
+    @ForceInline
+    public final byte getAndAddByteRelease(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndAddByteAcquire(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndAddShort(Object o, long offset, short delta) {
         short v;
@@ -2317,11 +2371,39 @@
     }
 
     @ForceInline
+    public final short getAndAddShortRelease(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndAddShortAcquire(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndAddChar(Object o, long offset, char delta) {
         return (char) getAndAddShort(o, offset, (short) delta);
     }
 
     @ForceInline
+    public final char getAndAddCharRelease(Object o, long offset, char delta) {
+        return (char) getAndAddShortRelease(o, offset, (short) delta);
+    }
+
+    @ForceInline
+    public final char getAndAddCharAcquire(Object o, long offset, char delta) {
+        return (char) getAndAddShortAcquire(o, offset, (short) delta);
+    }
+
+    @ForceInline
     public final float getAndAddFloat(Object o, long offset, float delta) {
         int expectedBits;
         float v;
@@ -2337,6 +2419,36 @@
     }
 
     @ForceInline
+    public final float getAndAddFloatRelease(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getInt(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final float getAndAddFloatAcquire(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getIntAcquire(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final double getAndAddDouble(Object o, long offset, double delta) {
         long expectedBits;
         double v;
@@ -2351,6 +2463,36 @@
         return v;
     }
 
+    @ForceInline
+    public final double getAndAddDoubleRelease(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLong(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final double getAndAddDoubleAcquire(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLongAcquire(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2371,6 +2513,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndSetIntRelease(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndSetIntAcquire(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2391,6 +2551,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndSetLongRelease(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndSetLongAcquire(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given reference value with the current
      * reference value of a field or array element within the given
@@ -2411,6 +2589,24 @@
         return v;
     }
 
+    @ForceInline
+    public final Object getAndSetObjectRelease(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObject(o, offset);
+        } while (!weakCompareAndSwapObjectRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final Object getAndSetObjectAcquire(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObjectAcquire(o, offset);
+        } while (!weakCompareAndSwapObjectAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndSetByte(Object o, long offset, byte newValue) {
         byte v;
@@ -2421,10 +2617,38 @@
     }
 
     @ForceInline
+    public final byte getAndSetByteRelease(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndSetByteAcquire(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final boolean getAndSetBoolean(Object o, long offset, boolean newValue) {
         return byte2bool(getAndSetByte(o, offset, bool2byte(newValue)));
     }
 
+    @ForceInline
+    public final boolean getAndSetBooleanRelease(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteRelease(o, offset, bool2byte(newValue)));
+    }
+
+    @ForceInline
+    public final boolean getAndSetBooleanAcquire(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteAcquire(o, offset, bool2byte(newValue)));
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndSetShort(Object o, long offset, short newValue) {
         short v;
@@ -2435,22 +2659,558 @@
     }
 
     @ForceInline
+    public final short getAndSetShortRelease(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndSetShortAcquire(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndSetChar(Object o, long offset, char newValue) {
         return s2c(getAndSetShort(o, offset, c2s(newValue)));
     }
 
     @ForceInline
+    public final char getAndSetCharRelease(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortRelease(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
+    public final char getAndSetCharAcquire(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortAcquire(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
     public final float getAndSetFloat(Object o, long offset, float newValue) {
         int v = getAndSetInt(o, offset, Float.floatToRawIntBits(newValue));
         return Float.intBitsToFloat(v);
     }
 
     @ForceInline
+    public final float getAndSetFloatRelease(Object o, long offset, float newValue) {
+        int v = getAndSetIntRelease(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
+    public final float getAndSetFloatAcquire(Object o, long offset, float newValue) {
+        int v = getAndSetIntAcquire(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
     public final double getAndSetDouble(Object o, long offset, double newValue) {
         long v = getAndSetLong(o, offset, Double.doubleToRawLongBits(newValue));
         return Double.longBitsToDouble(v);
     }
 
+    @ForceInline
+    public final double getAndSetDoubleRelease(Object o, long offset, double newValue) {
+        long v = getAndSetLongRelease(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+    @ForceInline
+    public final double getAndSetDoubleAcquire(Object o, long offset, double newValue) {
+        long v = getAndSetLongAcquire(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+
+    // The following contain CAS-based Java implementations used on
+    // platforms not supporting native instructions
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+
+    @ForceInline
+    public final byte getAndBitwiseOrByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final char getAndBitwiseOrChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortAcquire(o, offset, c2s(mask)));
+    }
+
+
+    @ForceInline
+    public final short getAndBitwiseOrShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final int getAndBitwiseOrInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    /**
+     * Atomically replaces the current value of a field or array element within
+     * the given object with the result of bitwise AND between the current value
+     * and mask.
+     *
+     * @param o object/array to update the field/element in
+     * @param offset field/element offset
+     * @param mask the mask value
+     * @return the previous value
+     * @since 1.9
+     */
+    @ForceInline
+    public final int getAndBitwiseAndInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+    @ForceInline
+    public final long getAndBitwiseOrLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+
     /**
      * Ensures that loads before the fence will not be reordered with loads and
      * stores after the fence; a "LoadLoad plus LoadStore barrier".
diff --git a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
index 923fbe4..35a3fa5 100644
--- a/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
+++ b/jdk/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
@@ -1074,7 +1074,7 @@
              * 1) if (instProxy != null)
              *        connect to instProxy; raise exception if failed
              * 2) else use system default ProxySelector
-             * 3) is 2) fails, make direct connection
+             * 3) else make a direct connection if ProxySelector is not present
              */
 
             if (instProxy == null) { // no instance Proxy is set
@@ -1117,10 +1117,7 @@
                             if (p != Proxy.NO_PROXY) {
                                 sel.connectFailed(uri, p.address(), ioex);
                                 if (!it.hasNext()) {
-                                    // fallback to direct connection
-                                    http = getNewHttpClient(url, null, connectTimeout, false);
-                                    http.setReadTimeout(readTimeout);
-                                    break;
+                                    throw ioex;
                                 }
                             } else {
                                 throw ioex;
diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java
index 764f04c..86727b9 100644
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java
@@ -1496,7 +1496,7 @@
             }
         } catch (CertPathValidatorException cpve) {
             throw new CertificateException(
-                "Certificates does not conform to algorithm constraints");
+                "Certificates do not conform to algorithm constraints", cpve);
         }
     }
 }
diff --git a/jdk/src/java.base/share/native/libjli/java.c b/jdk/src/java.base/share/native/libjli/java.c
index 12ca2b2..6dc9674 100644
--- a/jdk/src/java.base/share/native/libjli/java.c
+++ b/jdk/src/java.base/share/native/libjli/java.c
@@ -556,20 +556,6 @@
            JLI_StrCmp(name, "--list-modules") == 0;
 }
 
-#ifndef OLD_MODULE_OPTIONS
-/*
- * Old module options for transition
- */
-static jboolean
-IsOldModuleOption(const char* name) {
-    return JLI_StrCmp(name, "-modulepath") == 0 ||
-    JLI_StrCmp(name, "-mp") == 0 ||
-    JLI_StrCmp(name, "-upgrademodulepath") == 0 ||
-    JLI_StrCmp(name, "-addmods") == 0 ||
-    JLI_StrCmp(name, "-limitmods") == 0;
-}
-#endif
-
 /*
  * Test if the given name is a module-system white-space option that
  * will be passed to the VM with its corresponding long-form option
@@ -584,8 +570,7 @@
            JLI_StrCmp(name, "--limit-modules") == 0 ||
            JLI_StrCmp(name, "--add-exports") == 0 ||
            JLI_StrCmp(name, "--add-reads") == 0 ||
-           JLI_StrCmp(name, "--patch-module") == 0 ||
-           IsOldModuleOption(name);
+           JLI_StrCmp(name, "--patch-module") == 0;
 }
 
 /*
@@ -1224,32 +1209,6 @@
         }
     }
 
-#ifndef OLD_MODULE_OPTIONS
-    // for transition to support both old and new syntax
-    if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-        JLI_StrCmp(arg, "-mp") == 0) {
-        option = "--module-path";
-    } else if (JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-        option = "--upgrade-module-path";
-    } else if (JLI_StrCmp(arg, "-addmods") == 0) {
-        option = "--add-modules";
-    } else if (JLI_StrCmp(arg, "-limitmods") == 0) {
-        option = "--limit-modules";
-    } else if (JLI_StrCCmp(arg, "-XaddExports:") == 0) {
-        option = "--add-exports";
-        value = arg + 13;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-XaddReads:") == 0) {
-        option = "--add-reads";
-        value = arg + 11;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    } else if (JLI_StrCCmp(arg, "-Xpatch:") == 0) {
-        option = "--patch-module";
-        value = arg + 8;
-        kind = VM_LONG_OPTION_WITH_ARGUMENT;
-    }
-#endif
-
     *pargc = argc;
     *pargv = argv;
     *poption = option;
@@ -1340,16 +1299,6 @@
                        JLI_StrCmp(arg, "--patch-module") == 0) {
                 REPORT_ERROR (has_arg, ARG_ERROR6, arg);
             }
-#ifndef OLD_MODULE_OPTIONS
-            else if (JLI_StrCmp(arg, "-modulepath") == 0 ||
-                     JLI_StrCmp(arg, "-mp") == 0 ||
-                     JLI_StrCmp(arg, "-upgrademodulepath") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR4, arg);
-            } else if (JLI_StrCmp(arg, "-addmods") == 0 ||
-                       JLI_StrCmp(arg, "-limitmods") == 0) {
-                REPORT_ERROR (has_arg, ARG_ERROR6, arg);
-            }
-#endif
 /*
  * The following cases will cause the argument parsing to stop
  */
@@ -1548,6 +1497,7 @@
 
     NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
     NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
+    CHECK_EXCEPTION_RETURN_VALUE(0);
     for (i = 0; i < strc; i++) {
         jstring str = NewPlatformString(env, *strv++);
         NULL_CHECK0(str);
diff --git a/jdk/src/java.base/share/native/libjli/java.h b/jdk/src/java.base/share/native/libjli/java.h
index c18c66e..41a2327 100644
--- a/jdk/src/java.base/share/native/libjli/java.h
+++ b/jdk/src/java.base/share/native/libjli/java.h
@@ -253,6 +253,13 @@
 #define NULL_CHECK(NC_check_pointer) \
     NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
 
+#define CHECK_EXCEPTION_RETURN_VALUE(CER_value) \
+    do { \
+        if ((*env)->ExceptionOccurred(env)) { \
+            return CER_value; \
+        } \
+    } while (JNI_FALSE)
+
 #define CHECK_EXCEPTION_RETURN() \
     do { \
         if ((*env)->ExceptionOccurred(env)) { \
diff --git a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
index 4b4441a..f26b010 100644
--- a/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
+++ b/jdk/src/java.base/unix/classes/java/lang/ProcessImpl.java
@@ -630,6 +630,19 @@
         return !hasExited;
     }
 
+    /**
+     * The {@code toString} method returns a string consisting of
+     * the native process ID of the process and the exit value of the process.
+     *
+     * @return a string representation of the object.
+     */
+    @Override
+    public String toString() {
+        return new StringBuilder("Process[pid=").append(pid)
+                .append(", exitValue=").append(hasExited ? exitcode : "\"not exited\"")
+                .append("]").toString();
+    }
+
     private static native void init();
 
     static {
diff --git a/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c b/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c
index 3408bdd..2723085 100644
--- a/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c
+++ b/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c
@@ -349,6 +349,8 @@
 __attribute_noinline__
 #endif
 
+/* vfork(2) is deprecated on Solaris */
+#ifndef __solaris__
 static pid_t
 vforkChild(ChildStuff *c) {
     volatile pid_t resultPid;
@@ -367,6 +369,7 @@
     assert(resultPid != 0);  /* childProcess never returns */
     return resultPid;
 }
+#endif
 
 static pid_t
 forkChild(ChildStuff *c) {
@@ -479,8 +482,11 @@
 static pid_t
 startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
     switch (c->mode) {
+/* vfork(2) is deprecated on Solaris */
+#ifndef __solaris__
       case MODE_VFORK:
         return vforkChild(c);
+#endif
       case MODE_FORK:
         return forkChild(c);
 #if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
diff --git a/jdk/src/java.base/unix/native/libnet/NetworkInterface.c b/jdk/src/java.base/unix/native/libnet/NetworkInterface.c
index 3efde95..d5b1824 100644
--- a/jdk/src/java.base/unix/native/libnet/NetworkInterface.c
+++ b/jdk/src/java.base/unix/native/libnet/NetworkInterface.c
@@ -80,6 +80,12 @@
     #define DEV_PREFIX "/dev/"
 #endif
 
+#ifdef LIFNAMSIZ
+    #define IFNAMESIZE LIFNAMSIZ
+#else
+    #define IFNAMESIZE IFNAMSIZ
+#endif
+
 #define CHECKED_MALLOC3(_pointer, _type, _size) \
     do { \
         _pointer = (_type)malloc(_size); \
@@ -158,7 +164,7 @@
 
 static int     getIndex(int sock, const char *ifname);
 static int     getFlags(int sock, const char *ifname, int *flags);
-static int     getMacAddress(JNIEnv *env, int sock, const char *ifname,
+static int     getMacAddress(JNIEnv *env, const char *ifname,
                              const struct in_addr *addr, unsigned char *buf);
 static int     getMTU(JNIEnv *env, int sock, const char *ifname);
 
@@ -237,20 +243,25 @@
     const char* name_utf;
     jobject obj = NULL;
 
+    if (name != NULL) {
+        name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+    } else {
+        JNU_ThrowNullPointerException(env, "network interface name is NULL");
+        return NULL;
+    }
+
+    if (name_utf == NULL) {
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return NULL;
+    }
+
     ifs = enumInterfaces(env);
     if (ifs == NULL) {
         return NULL;
     }
 
-    name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-    if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       freeif(ifs);
-       return NULL;
-    }
-
-    // Search the list of interface based on name
+    // search the list of interfaces based on name
     curr = ifs;
     while (curr != NULL) {
         if (strcmp(name_utf, curr->name) == 0) {
@@ -285,12 +296,13 @@
     if (index <= 0) {
         return NULL;
     }
+
     ifs = enumInterfaces(env);
     if (ifs == NULL) {
         return NULL;
     }
 
-    // Search the list of interface based on index
+    // search the list of interfaces based on index
     curr = ifs;
     while (curr != NULL) {
         if (index == curr->index) {
@@ -304,7 +316,9 @@
         obj = createNetworkInterface(env, curr);
     }
 
+    // release the interface list
     freeif(ifs);
+
     return obj;
 }
 
@@ -317,13 +331,11 @@
   (JNIEnv *env, jclass cls, jobject iaObj)
 {
     netif *ifs, *curr;
-
 #if defined(AF_INET6)
     int family = (getInetAddress_family(env, iaObj) == IPv4) ? AF_INET : AF_INET6;
 #else
     int family =  AF_INET;
 #endif
-
     jobject obj = NULL;
     jboolean match = JNI_FALSE;
 
@@ -342,7 +354,7 @@
             if (family == addrP->family) {
                 if (family == AF_INET) {
                     int address1 = htonl(
-                        ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr);
+                        ((struct sockaddr_in *)addrP->addr)->sin_addr.s_addr);
                     int address2 = getInetAddress_addr(env, iaObj);
 
                     if (address1 == address2) {
@@ -350,7 +362,6 @@
                         break;
                     }
                 }
-
 #if defined(AF_INET6)
                 if (family == AF_INET6) {
                     jbyte *bytes = (jbyte *)&(
@@ -390,7 +401,9 @@
         obj = createNetworkInterface(env, curr);
     }
 
+    // release the interface list
     freeif(ifs);
+
     return obj;
 }
 
@@ -411,7 +424,7 @@
         return NULL;
     }
 
-    // count the interface
+    // count the interfaces
     ifCount = 0;
     curr = ifs;
     while (curr != NULL) {
@@ -426,8 +439,8 @@
         return NULL;
     }
 
-    // Iterate through the interfaces, create a NetworkInterface instance
-    // for each array element and populate the object.
+    // iterate through the interfaces, create a NetworkInterface instance
+    // for each array element and populate the object
     curr = ifs;
     arr_index = 0;
     while (curr != NULL) {
@@ -445,7 +458,9 @@
         curr = curr->next;
     }
 
+    // release the interface list
     freeif(ifs);
+
     return netIFArr;
 }
 
@@ -511,46 +526,45 @@
     jbyteArray ret = NULL;
     unsigned char mac[16];
     int len;
-    int sock;
     jboolean isCopy;
-    const char* name_utf;
+    const char *name_utf;
 
-    name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-    if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return NULL;
+    if (name != NULL) {
+        name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+    } else {
+        JNU_ThrowNullPointerException(env, "network interface name is NULL");
+        return NULL;
     }
-    if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
-       (*env)->ReleaseStringUTFChars(env, name, name_utf);
-       return NULL;
+
+    if (name_utf == NULL) {
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return NULL;
     }
 
     if (!IS_NULL(addrArray)) {
-       (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
-       addr = ((caddr[0]<<24) & 0xff000000);
-       addr |= ((caddr[1] <<16) & 0xff0000);
-       addr |= ((caddr[2] <<8) & 0xff00);
-       addr |= (caddr[3] & 0xff);
-       iaddr.s_addr = htonl(addr);
-       len = getMacAddress(env, sock, name_utf, &iaddr, mac);
+        (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
+        addr = ((caddr[0]<<24) & 0xff000000);
+        addr |= ((caddr[1] <<16) & 0xff0000);
+        addr |= ((caddr[2] <<8) & 0xff00);
+        addr |= (caddr[3] & 0xff);
+        iaddr.s_addr = htonl(addr);
+        len = getMacAddress(env, name_utf, &iaddr, mac);
     } else {
-       len = getMacAddress(env, sock, name_utf, NULL, mac);
+        len = getMacAddress(env, name_utf, NULL, mac);
     }
-    if (len > 0) {
-       ret = (*env)->NewByteArray(env, len);
-       if (IS_NULL(ret)) {
-          /* we may have memory to free at the end of this */
-          goto fexit;
-       }
-       (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *)(mac));
-    }
- fexit:
-   // release the UTF string and interface list
-   (*env)->ReleaseStringUTFChars(env, name, name_utf);
 
-   close(sock);
-   return ret;
+    if (len > 0) {
+        ret = (*env)->NewByteArray(env, len);
+        if (!IS_NULL(ret)) {
+            (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *)(mac));
+        }
+    }
+
+    // release the UTF string and interface list
+    (*env)->ReleaseStringUTFChars(env, name, name_utf);
+
+    return ret;
 }
 
 /*
@@ -562,8 +576,7 @@
   (JNIEnv *env, jclass cls, jstring name, jint index)
 {
     jboolean isCopy;
-    int ret = -1;
-    int sock;
+    int sock, ret = -1;
     const char* name_utf = NULL;
 
     if (name != NULL) {
@@ -572,15 +585,16 @@
         JNU_ThrowNullPointerException(env, "network interface name is NULL");
         return ret;
     }
+
     if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return ret;
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return ret;
     }
 
     if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
-       (*env)->ReleaseStringUTFChars(env, name, name_utf);
-       return JNI_FALSE;
+        (*env)->ReleaseStringUTFChars(env, name, name_utf);
+        return JNI_FALSE;
     }
 
     ret = getMTU(env, sock, name_utf);
@@ -595,9 +609,8 @@
 
 static int getFlags0(JNIEnv *env, jstring name) {
     jboolean isCopy;
-    int ret, sock;
-    const char* name_utf;
-    int flags = 0;
+    int ret, sock, flags = 0;
+    const char *name_utf;
 
     if (name != NULL) {
         name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
@@ -607,9 +620,9 @@
     }
 
     if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return -1;
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return -1;
     }
     if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
         (*env)->ReleaseStringUTFChars(env, name, name_utf);
@@ -648,7 +661,7 @@
     netif *childP;
     jobject tmp;
 
-    // Create a NetworkInterface object and populate it
+    // create a NetworkInterface object and populate it
     netifObj = (*env)->NewObject(env, ni_class, ni_ctrID);
     CHECK_NULL_RETURN(netifObj, NULL);
     name = (*env)->NewStringUTF(env, ifs->name);
@@ -659,7 +672,7 @@
     (*env)->SetBooleanField(env, netifObj, ni_virutalID,
                             ifs->virtual ? JNI_TRUE : JNI_FALSE);
 
-    //Count the number of address on this interface
+    // count the number of addresses on this interface
     addr_count = 0;
     addrP = ifs->addr;
     while (addrP != NULL) {
@@ -667,7 +680,7 @@
         addrP = addrP->next;
     }
 
-    // Create the array of InetAddresses
+    // create the array of InetAddresses
     addrArr = (*env)->NewObjectArray(env, addr_count, ia_class, NULL);
     if (addrArr == NULL) {
         return NULL;
@@ -687,32 +700,31 @@
         if (addrP->family == AF_INET) {
             iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID);
             if (iaObj) {
-                 setInetAddress_addr(env, iaObj, htonl(
-                     ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
+                setInetAddress_addr(env, iaObj, htonl(
+                    ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
             } else {
                 return NULL;
             }
             ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
             if (ibObj) {
-                 (*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj);
-                 if (addrP->brdcast) {
+                (*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj);
+                if (addrP->brdcast) {
                     jobject ia2Obj = NULL;
                     ia2Obj = (*env)->NewObject(env, ia4_class, ia4_ctrID);
                     if (ia2Obj) {
-                       setInetAddress_addr(env, ia2Obj, htonl(
-                           ((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
-                       (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
+                        setInetAddress_addr(env, ia2Obj, htonl(
+                            ((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
+                        (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
                     } else {
                         return NULL;
                     }
-                 }
-                 (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
-                 (*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
+                }
+                (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
+                (*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
             } else {
                 return NULL;
             }
         }
-
 #if defined(AF_INET6)
         if (addrP->family == AF_INET6) {
             int scope=0;
@@ -748,7 +760,7 @@
         addrP = addrP->next;
     }
 
-    // See if there is any virtual interface attached to this one.
+    // see if there is any virtual interface attached to this one.
     child_count = 0;
     childP = ifs->childs;
     while (childP) {
@@ -761,17 +773,17 @@
         return NULL;
     }
 
-    // Create the NetworkInterface instances for the sub-interfaces as well.
+    // create the NetworkInterface instances for the sub-interfaces as well
     child_index = 0;
     childP = ifs->childs;
     while(childP) {
-      tmp = createNetworkInterface(env, childP);
-      if (tmp == NULL) {
-         return NULL;
-      }
-      (*env)->SetObjectField(env, tmp, ni_parentID, netifObj);
-      (*env)->SetObjectArrayElement(env, childArr, child_index++, tmp);
-      childP = childP->next;
+        tmp = createNetworkInterface(env, childP);
+        if (tmp == NULL) {
+            return NULL;
+        }
+        (*env)->SetObjectField(env, tmp, ni_parentID, netifObj);
+        (*env)->SetObjectArrayElement(env, childArr, child_index++, tmp);
+        childP = childP->next;
     }
     (*env)->SetObjectField(env, netifObj, ni_addrsID, addrArr);
     (*env)->SetObjectField(env, netifObj, ni_bindsID, bindArr);
@@ -785,46 +797,42 @@
  * Enumerates all interfaces
  */
 static netif *enumInterfaces(JNIEnv *env) {
-    netif *ifs;
+    netif *ifs = NULL;
     int sock;
 
-    // Enumerate IPv4 addresses
     sock = openSocket(env, AF_INET);
     if (sock < 0 && (*env)->ExceptionOccurred(env)) {
         return NULL;
     }
 
+    // enumerate IPv4 addresses
     ifs = enumIPv4Interfaces(env, sock, NULL);
     close(sock);
 
+    // return partial list if an exception occurs in the middle of process ???
     if (ifs == NULL && (*env)->ExceptionOccurred(env)) {
         return NULL;
     }
 
-    // return partial list if an exception occurs in the middle of process ???
-
     // If IPv6 is available then enumerate IPv6 addresses.
 #if defined(AF_INET6)
-
         // User can disable ipv6 explicitly by -Djava.net.preferIPv4Stack=true,
         // so we have to call ipv6_available()
         if (ipv6_available()) {
+            sock = openSocket(env, AF_INET6);
+            if (sock < 0 && (*env)->ExceptionOccurred(env)) {
+                freeif(ifs);
+                return NULL;
+            }
 
-           sock = openSocket(env, AF_INET6);
-           if (sock < 0 && (*env)->ExceptionOccurred(env)) {
-               freeif(ifs);
-               return NULL;
-           }
+            ifs = enumIPv6Interfaces(env, sock, ifs);
+            close(sock);
 
-           ifs = enumIPv6Interfaces(env, sock, ifs);
-           close(sock);
-
-           if ((*env)->ExceptionOccurred(env)) {
-              freeif(ifs);
-              return NULL;
-           }
-
-       }
+            if ((*env)->ExceptionOccurred(env)) {
+                freeif(ifs);
+                return NULL;
+            }
+        }
 #endif
 
     return ifs;
@@ -845,7 +853,7 @@
             addrP = next;
         }
 
-        // Don't forget to free the sub-interfaces.
+        // don't forget to free the sub-interfaces
         if (currif->childs != NULL) {
             freeif(currif->childs);
         }
@@ -863,26 +871,17 @@
 {
     netif *currif = ifs, *parent;
     netaddr *addrP;
-
-#ifdef LIFNAMSIZ
-    int ifnam_size = LIFNAMSIZ;
-    char name[LIFNAMSIZ], vname[LIFNAMSIZ];
-#else
-    int ifnam_size = IFNAMSIZ;
-    char name[IFNAMSIZ], vname[IFNAMSIZ];
-#endif
-
+    char name[IFNAMESIZE], vname[IFNAMESIZE];
     char *name_colonP;
     int isVirtual = 0;
     int addr_size;
-    int flags = 0;
 
     // If the interface name is a logical interface then we remove the unit
     // number so that we have the physical interface (eg: hme0:1 -> hme0).
     // NetworkInterface currently doesn't have any concept of physical vs.
     // logical interfaces.
-    strncpy(name, if_name, ifnam_size);
-    name[ifnam_size - 1] = '\0';
+    strncpy(name, if_name, IFNAMESIZE);
+    name[IFNAMESIZE - 1] = '\0';
     *vname = 0;
 
     // Create and populate the netaddr node. If allocation fails
@@ -917,20 +916,21 @@
     // Deal with virtual interface with colon notation e.g. eth0:1
     name_colonP = strchr(name, ':');
     if (name_colonP != NULL) {
+        int flags = 0;
         // This is a virtual interface. If we are able to access the parent
         // we need to create a new entry if it doesn't exist yet *and* update
         // the 'parent' interface with the new records.
         *name_colonP = 0;
         if (getFlags(sock, name, &flags) < 0 || flags < 0) {
-             // failed to access parent interface do not create parent.
-             // We are a virtual interface with no parent.
-             isVirtual = 1;
-             *name_colonP = ':';
+            // failed to access parent interface do not create parent.
+            // We are a virtual interface with no parent.
+            isVirtual = 1;
+            *name_colonP = ':';
         } else {
-             // Got access to parent, so create it if necessary.
-             // Save original name to vname and truncate name by ':'
-             memcpy(vname, name, sizeof(vname) );
-             vname[name_colonP - name] = ':';
+            // Got access to parent, so create it if necessary.
+            // Save original name to vname and truncate name by ':'
+            memcpy(vname, name, sizeof(vname));
+            vname[name_colonP - name] = ':';
         }
     }
 
@@ -943,12 +943,12 @@
         currif = currif->next;
     }
 
-    // If "new" then create an netif structure and insert it into the list.
+    // If "new" then create a netif structure and insert it into the list.
     if (currif == NULL) {
-         CHECKED_MALLOC3(currif, netif *, sizeof(netif) + ifnam_size);
+         CHECKED_MALLOC3(currif, netif *, sizeof(netif) + IFNAMESIZE);
          currif->name = (char *)currif + sizeof(netif);
-         strncpy(currif->name, name, ifnam_size);
-         currif->name[ifnam_size - 1] = '\0';
+         strncpy(currif->name, name, IFNAMESIZE);
+         currif->name[IFNAMESIZE - 1] = '\0';
          currif->index = getIndex(sock, name);
          currif->addr = NULL;
          currif->childs = NULL;
@@ -977,13 +977,12 @@
         }
 
         if (currif == NULL) {
-            CHECKED_MALLOC3(currif, netif *, sizeof(netif) + ifnam_size);
+            CHECKED_MALLOC3(currif, netif *, sizeof(netif) + IFNAMESIZE);
             currif->name = (char *)currif + sizeof(netif);
-            strncpy(currif->name, vname, ifnam_size);
-            currif->name[ifnam_size - 1] = '\0';
+            strncpy(currif->name, vname, IFNAMESIZE);
+            currif->name[IFNAMESIZE - 1] = '\0';
             currif->index = getIndex(sock, vname);
-            currif->addr = NULL;
-            // Need to duplicate the addr entry?
+            currif->addr = NULL; // Need to duplicate the addr entry?
             currif->virtual = 1;
             currif->childs = NULL;
             currif->next = parent->childs;
@@ -1150,7 +1149,7 @@
         struct sockaddr addr, broadaddr, *broadaddrP = NULL;
         short prefix = 0;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET) {
             continue;
         }
@@ -1264,19 +1263,26 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     static struct ifreq ifr;
-    int i;
+    int i, sock;
+
+    if ((sock = openSocketWithFallback(env, ifname)) < 0) {
+        return -1;
+    }
+
     memset((char *)&ifr, 0, sizeof(ifr));
     strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1);
     if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0) {
         JNU_ThrowByNameWithMessageAndLastError
             (env, JNU_JAVANETPKG "SocketException", "ioctl(SIOCGIFHWADDR) failed");
+        close(sock);
         return -1;
     }
 
+    close(sock);
     memcpy(buf, &ifr.ifr_hwaddr.sa_data, IFHWADDRLEN);
 
     // all bytes to 0 means no hardware address
@@ -1388,7 +1394,7 @@
         struct sockaddr addr, broadaddr, *broadaddrP = NULL;
         short prefix = 0;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET) {
             continue;
         }
@@ -1444,7 +1450,7 @@
 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
     struct ifconf ifc;
     struct ifreq *ifreqP;
-    char *buf;
+    char *buf, *cp, *cplimit;
 
     // call SIOCGSIZIFCONF to get size for SIOCGIFCONF buffer
     if (ioctl(sock, SIOCGSIZIFCONF, &(ifc.ifc_len)) < 0) {
@@ -1464,8 +1470,9 @@
     }
 
     // iterate through each interface
-    char *cp = (char *)ifc.ifc_req;
-    char *cplimit = cp + ifc.ifc_len;
+    ifreqP = ifc.ifc_req;
+    cp = (char *)ifc.ifc_req;
+    cplimit = cp + ifc.ifc_len;
 
     for (; cp < cplimit;
          cp += (sizeof(ifreqP->ifr_name) +
@@ -1474,7 +1481,7 @@
         ifreqP = (struct ifreq *)cp;
         short prefix = 0;
 
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET6) {
             continue;
         }
@@ -1527,7 +1534,7 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     int size;
@@ -1586,20 +1593,20 @@
 }
 
 static int getFlags(int sock, const char *ifname, int *flags) {
-  struct ifreq if2;
-  memset((char *)&if2, 0, sizeof(if2));
-  strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
+    struct ifreq if2;
+    memset((char *)&if2, 0, sizeof(if2));
+    strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
 
-  if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) {
-      return -1;
-  }
+    if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) {
+        return -1;
+    }
 
-  if (sizeof(if2.ifr_flags) == sizeof(short)) {
-      *flags = (if2.ifr_flags & 0xffff);
-  } else {
-      *flags = if2.ifr_flags;
-  }
-  return 0;
+    if (sizeof(if2.ifr_flags) == sizeof(short)) {
+        *flags = (if2.ifr_flags & 0xffff);
+    } else {
+        *flags = if2.ifr_flags;
+    }
+    return 0;
 }
 
 #endif /* _AIX */
@@ -1668,7 +1675,7 @@
     char *buf = NULL;
     unsigned i;
 
-    // call SIOCGLIFNUM to get the size of SIOCGIFCONF buffer
+    // call SIOCGLIFNUM to get the interface count
     numifs.lifn_family = AF_INET;
     numifs.lifn_flags = 0;
     if (ioctl(sock, SIOCGLIFNUM, (char *)&numifs) < 0) {
@@ -1695,7 +1702,7 @@
     for (i = 0; i < numifs.lifn_count; i++, ifreqP++) {
         struct sockaddr addr, *broadaddrP = NULL;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->lifr_addr.ss_family != AF_INET) {
             continue;
         }
@@ -1744,7 +1751,7 @@
     char *buf = NULL;
     unsigned i;
 
-    // call SIOCGLIFNUM to get the size of SIOCGLIFCONF buffer
+    // call SIOCGLIFNUM to get the interface count
     numifs.lifn_family = AF_INET6;
     numifs.lifn_flags = 0;
     if (ioctl(sock, SIOCGLIFNUM, (char *)&numifs) < 0) {
@@ -1770,7 +1777,7 @@
     ifreqP = ifc.lifc_req;
     for (i = 0; i < numifs.lifn_count; i++, ifreqP++) {
 
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifreqP->lifr_addr.ss_family != AF_INET6) {
             continue;
         }
@@ -1789,7 +1796,7 @@
             free(buf);
             return ifs;
         }
-   }
+    }
 
     // free buffer
     free(buf);
@@ -1834,9 +1841,9 @@
     strcpy(style1dev, DEV_PREFIX);
     strcat(style1dev, ifname);
     if ((fd = open(style1dev, O_RDWR)) < 0) {
-         // Can't open it. We probably are missing the privilege.
-         // We'll have to try something else
-         return 0;
+        // Can't open it. We probably are missing the privilege.
+        // We'll have to try something else
+        return 0;
     }
 
     dlpareq.dl_primitive = DL_PHYS_ADDR_REQ;
@@ -1878,11 +1885,15 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     struct lifreq if2;
-    int len, i;
+    int len, i, sock;
+
+    if ((sock = openSocketWithFallback(env, ifname)) < 0) {
+        return -1;
+    }
 
     // First, try the new (S11) SIOCGLIFHWADDR ioctl(). If that fails
     // try the old way.
@@ -1893,40 +1904,36 @@
         struct sockaddr_dl *sp;
         sp = (struct sockaddr_dl *)&if2.lifr_addr;
         memcpy(buf, &sp->sdl_data[0], sp->sdl_alen);
+        close(sock);
         return sp->sdl_alen;
     }
 
     // On Solaris we have to use DLPI, but it will only work if we have
     // privileged access (i.e. root). If that fails, we try a lookup
     // in the ARP table, which requires an IPv4 address.
-    if ((len = getMacFromDevice(env, ifname, buf))  == 0) {
-        // DLPI failed - trying to do arp lookup
-
+    if (((len = getMacFromDevice(env, ifname, buf)) == 0) && (addr != NULL)) {
         struct arpreq arpreq;
         struct sockaddr_in *sin;
         struct sockaddr_in ipAddr;
 
-        if (addr == NULL) {
-             // No IPv4 address for that interface, so can't do an ARP lookup.
-             return -1;
-         }
+        len = 6; //???
 
-         len = 6; //???
+        sin = (struct sockaddr_in *)&arpreq.arp_pa;
+        memset((char *)&arpreq, 0, sizeof(struct arpreq));
+        ipAddr.sin_port = 0;
+        ipAddr.sin_family = AF_INET;
+        memcpy(&ipAddr.sin_addr, addr, sizeof(struct in_addr));
+        memcpy(&arpreq.arp_pa, &ipAddr, sizeof(struct sockaddr_in));
+        arpreq.arp_flags= ATF_PUBL;
 
-         sin = (struct sockaddr_in *)&arpreq.arp_pa;
-         memset((char *)&arpreq, 0, sizeof(struct arpreq));
-         ipAddr.sin_port = 0;
-         ipAddr.sin_family = AF_INET;
-         memcpy(&ipAddr.sin_addr, addr, sizeof(struct in_addr));
-         memcpy(&arpreq.arp_pa, &ipAddr, sizeof(struct sockaddr_in));
-         arpreq.arp_flags= ATF_PUBL;
+        if (ioctl(sock, SIOCGARP, &arpreq) < 0) {
+            close(sock);
+            return -1;
+        }
 
-         if (ioctl(sock, SIOCGARP, &arpreq) < 0) {
-             return -1;
-         }
-
-         memcpy(buf, &arpreq.arp_ha.sa_data[0], len);
+        memcpy(buf, &arpreq.arp_ha.sa_data[0], len);
     }
+    close(sock);
 
     // all bytes to 0 means no hardware address
     for (i = 0; i < len; i++) {
@@ -2014,7 +2021,7 @@
     for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) {
         struct sockaddr *broadaddrP = NULL;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET)
             continue;
 
@@ -2058,7 +2065,7 @@
     }
 
     for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) {
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET6)
             continue;
 
@@ -2113,22 +2120,22 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     struct ifaddrs *ifa0, *ifa;
     struct sockaddr *saddr;
     int i;
 
-    // Grab the interface list
+    // grab the interface list
     if (!getifaddrs(&ifa0)) {
-        // Cycle through the interfaces
+        // cycle through the interfaces
         for (i = 0, ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next, i++) {
             saddr = ifa->ifa_addr;
-            // Link layer contains the MAC address
+            // link layer contains the MAC address
             if (saddr->sa_family == AF_LINK && !strcmp(ifname, ifa->ifa_name)) {
                 struct sockaddr_dl *sadl = (struct sockaddr_dl *) saddr;
-                // Check the address is the correct length
+                // check the address has the correct length
                 if (sadl->sdl_alen == ETHER_ADDR_LEN) {
                     memcpy(buf, (sadl->sdl_data + sadl->sdl_nlen), ETHER_ADDR_LEN);
                     freeifaddrs(ifa0);
diff --git a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
index a59eba9..988234d 100644
--- a/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
+++ b/jdk/src/java.base/windows/classes/java/lang/ProcessImpl.java
@@ -564,6 +564,20 @@
     private static native boolean isProcessAlive(long handle);
 
     /**
+     * The {@code toString} method returns a string consisting of
+     * the native process ID of the process and the exit value of the process.
+     *
+     * @return a string representation of the object.
+     */
+    @Override
+    public String toString() {
+        int exitCode = getExitCodeProcess(handle);
+        return new StringBuilder("Process[pid=").append(getPid())
+                .append(", exitValue=").append(exitCode == STILL_ACTIVE ? "\"not exited\"" : exitCode)
+                .append("]").toString();
+    }
+
+    /**
      * Create a process using the win32 function CreateProcess.
      * The method is synchronized due to MS kb315939 problem.
      * All native handles should restore the inherit flag at the end of call.
diff --git a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java
index 272b1f1..8e10513 100644
--- a/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java
+++ b/jdk/src/java.desktop/macosx/classes/apple/laf/JRSUIConstants.java
@@ -25,7 +25,6 @@
 
 package apple.laf;
 
-import java.lang.reflect.Field;
 import java.nio.ByteBuffer;
 
 import java.lang.annotation.Native;
@@ -70,6 +69,21 @@
             throw new RuntimeException("Constant not implemented in native: " + this);
         }
 
+        private String getConstantName(Key hit) {
+            if (hit == VALUE) {
+                return "VALUE";
+            } else if (hit == THUMB_PROPORTION) {
+                return "THUMB_PROPORTION";
+            } else if (hit == THUMB_START) {
+                return "THUMB_START";
+            } else if (hit == WINDOW_TITLE_BAR_HEIGHT) {
+                return "WINDOW_TITLE_BAR_HEIGHT";
+            } else if (hit == THUMB_START) {
+                return "ANIMATION_FRAME";
+            }
+            return getClass().getSimpleName();
+        }
+
         public String toString() {
             return getConstantName(this) + (ptr == 0 ? "(unlinked)" : "");
         }
@@ -138,7 +152,7 @@
         }
 
         public String toString() {
-            return getConstantName(this);
+            return getClass().getSimpleName();
         }
     }
 
@@ -779,6 +793,17 @@
             return hit > 0;
         }
 
+        private String getConstantName(Hit hit) {
+            if (hit == UNKNOWN) {
+                return "UNKNOWN";
+            } else if (hit == NONE) {
+                return "NONE";
+            } else if (hit == HIT) {
+                return "HIT";
+            }
+            return getClass().getSimpleName();
+        }
+
         public String toString() {
             return getConstantName(this);
         }
@@ -829,16 +854,4 @@
         }
         return Hit.UNKNOWN;
     }
-
-    static String getConstantName(final Object object) {
-        final Class<? extends Object> clazz = object.getClass();
-        try {
-            for (final Field field : clazz.getFields()) {
-                if (field.get(null) == object) {
-                    return field.getName();
-                }
-            }
-        } catch (final Exception e) {}
-        return clazz.getSimpleName();
-    }
 }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
index eab1efb..c9c0c9b 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppDockIconHandler.java
@@ -72,7 +72,7 @@
 
     public void setDockIconImage(final Image image) {
         try {
-            final CImage cImage = getCImageCreator().createFromImage(image);
+            final CImage cImage = CImage.createFromImage(image);
             final long nsImagePtr = getNSImagePtrFrom(cImage);
             nativeSetDockIconImage(nsImagePtr);
         } catch (final Throwable e) {
@@ -84,7 +84,11 @@
         try {
             final long dockNSImage = nativeGetDockIconImage();
             if (dockNSImage == 0) return null;
-            return getCImageCreator().createImageUsingNativeSize(dockNSImage);
+            final Method getCreatorMethod = CImage.class.getDeclaredMethod(
+                    "getCreator", new Class<?>[]{});
+            getCreatorMethod.setAccessible(true);
+            Creator imageCreator = (Creator) getCreatorMethod.invoke(null, new Object[]{});
+            return imageCreator.createImageUsingNativeSize(dockNSImage);
         } catch (final Throwable e) {
             throw new RuntimeException(e);
         }
@@ -98,16 +102,6 @@
         nativeSetDockIconProgress(value);
     }
 
-    static Creator getCImageCreator() {
-        try {
-            final Method getCreatorMethod = CImage.class.getDeclaredMethod("getCreator", new Class<?>[] {});
-            getCreatorMethod.setAccessible(true);
-            return (Creator)getCreatorMethod.invoke(null, new Object[] {});
-        } catch (final Throwable e) {
-            throw new RuntimeException(e);
-        }
-    }
-
     static long getNSImagePtrFrom(final CImage cImage) {
         if (cImage == null) return 0;
 
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java
index a417f69..e64e9b1 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppEventHandler.java
@@ -171,7 +171,8 @@
         currentQuitResponse = null;
 
         try {
-            if (defaultQuitAction == QuitStrategy.NORMAL_EXIT) System.exit(0);
+            if (defaultQuitAction == QuitStrategy.NORMAL_EXIT
+                    || _AppMiscHandlers.isSuddenTerminationEnbaled()) System.exit(0);
 
             if (defaultQuitAction != QuitStrategy.CLOSE_ALL_WINDOWS) {
                 throw new RuntimeException("Unknown quit action");
@@ -422,6 +423,10 @@
         }
 
         void performUsing(final QuitHandler handler, final _NativeEvent event) {
+            if (_AppMiscHandlers.isSuddenTerminationEnbaled()) {
+                performDefaultAction(event);
+                return;
+            }
             final MacQuitResponse response = obtainQuitResponse(); // obtains the "current" quit response
             handler.handleQuitRequestWith(new QuitEvent(), response);
         }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java
index 6f892ca..1851e2a 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/eawt/_AppMiscHandlers.java
@@ -26,6 +26,8 @@
 package com.apple.eawt;
 
 class _AppMiscHandlers {
+    private static boolean isSuddenTerminationEnabled;
+
     private static native void nativeOpenHelpViewer();
 
     private static native void nativeRequestActivation(final boolean allWindows);
@@ -47,10 +49,16 @@
     }
 
     static void enableSuddenTermination() {
+        isSuddenTerminationEnabled = true;
         nativeEnableSuddenTermination();
     }
 
     static void disableSuddenTermination() {
+        isSuddenTerminationEnabled = false;
         nativeDisableSuddenTermination();
     }
+
+    public static boolean isSuddenTerminationEnbaled() {
+        return isSuddenTerminationEnabled;
+    }
 }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java
index b4bc1e6..936fe56 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaIcon.java
@@ -37,6 +37,7 @@
 
 import com.apple.laf.AquaUtilControlSize.*;
 import com.apple.laf.AquaUtils.RecyclableSingleton;
+import sun.lwawt.macosx.CImage;
 
 public class AquaIcon {
     interface InvertableIcon extends Icon {
@@ -226,7 +227,7 @@
         }
 
         Image createImage() {
-            return AquaUtils.getCImageCreator().createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight());
+            return CImage.createImageOfFile(file.getAbsolutePath(), getIconWidth(), getIconHeight());
         }
     }
 
@@ -299,7 +300,7 @@
         }
 
         Image createImage() {
-            return AquaUtils.getCImageCreator().createSystemImageFromSelector(
+            return CImage.createSystemImageFromSelector(
                     selector, getIconWidth(), getIconHeight());
         }
     }
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java
index c26bcae..5d43a41 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java
@@ -46,8 +46,8 @@
 import com.apple.laf.AquaIcon.SystemIcon;
 import com.apple.laf.AquaUtils.RecyclableObject;
 import com.apple.laf.AquaUtils.RecyclableSingleton;
-import java.awt.image.MultiResolutionImage;
 import sun.awt.image.MultiResolutionCachedImage;
+import sun.lwawt.macosx.CImage;
 
 public class AquaImageFactory {
     public static IconUIResource getConfirmImageIcon() {
@@ -73,7 +73,7 @@
     public static IconUIResource getLockImageIcon() {
         // public, because UIDefaults.ProxyLazyValue uses reflection to get this value
         if (JRSUIUtils.Images.shouldUseLegacySecurityUIPath()) {
-            final Image lockIcon = AquaUtils.getCImageCreator().createImageFromFile("/System/Library/CoreServices/SecurityAgent.app/Contents/Resources/Security.icns", kAlertIconSize, kAlertIconSize);
+            final Image lockIcon = CImage.createImageFromFile("/System/Library/CoreServices/SecurityAgent.app/Contents/Resources/Security.icns", kAlertIconSize, kAlertIconSize);
             return getAppIconCompositedOn(lockIcon);
         }
 
diff --git a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java
index 67520fc..5e7d160 100644
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaUtils.java
@@ -41,8 +41,6 @@
 
 import sun.awt.AppContext;
 
-import sun.lwawt.macosx.CImage;
-import sun.lwawt.macosx.CImage.Creator;
 import sun.lwawt.macosx.CPlatformWindow;
 import sun.reflect.misc.ReflectUtil;
 import sun.security.action.GetPropertyAction;
@@ -50,6 +48,7 @@
 
 import com.apple.laf.AquaImageFactory.SlicedImageControl;
 import sun.awt.image.MultiResolutionCachedImage;
+import sun.swing.SwingAccessor;
 
 final class AquaUtils {
 
@@ -78,65 +77,45 @@
         }
     }
 
-    private static Creator getCImageCreatorInternal() {
-        return AccessController.doPrivileged(new PrivilegedAction<Creator>() {
-            @Override
-            public Creator run() {
-                try {
-                    final Method getCreatorMethod = CImage.class.getDeclaredMethod(
-                                "getCreator", new Class<?>[] {});
-                    getCreatorMethod.setAccessible(true);
-                    return (Creator)getCreatorMethod.invoke(null, new Object[] {});
-                } catch (final Exception ignored) {
-                    return null;
-                }
-            }
-        });
-    }
-
-    private static final RecyclableSingleton<Creator> cImageCreator = new RecyclableSingleton<Creator>() {
-        @Override
-        protected Creator getInstance() {
-            return getCImageCreatorInternal();
-        }
-    };
-    static Creator getCImageCreator() {
-        return cImageCreator.get();
-    }
-
     static Image generateSelectedDarkImage(final Image image) {
-        final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+        final ImageFilter filter =  new IconImageFilter() {
             @Override
             int getGreyFor(final int gray) {
                 return gray * 75 / 100;
             }
-        });
-        return Toolkit.getDefaultToolkit().createImage(prod);
+        };
+        return map(image, filter);
     }
 
     static Image generateDisabledImage(final Image image) {
-        final ImageProducer prod = new FilteredImageSource(image.getSource(), new IconImageFilter() {
+        final ImageFilter filter = new IconImageFilter() {
             @Override
             int getGreyFor(final int gray) {
                 return 255 - ((255 - gray) * 65 / 100);
             }
-        });
-        return Toolkit.getDefaultToolkit().createImage(prod);
+        };
+        return map(image, filter);
     }
 
     static Image generateLightenedImage(final Image image, final int percent) {
         final GrayFilter filter = new GrayFilter(true, percent);
-        return (image instanceof MultiResolutionCachedImage)
-                ? ((MultiResolutionCachedImage) image).map(
-                        rv -> generateLightenedImage(rv, filter))
-                : generateLightenedImage(image, filter);
+        return map(image, filter);
     }
 
-    static Image generateLightenedImage(Image image, ImageFilter filter) {
+    static Image generateFilteredImage(Image image, ImageFilter filter) {
         final ImageProducer prod = new FilteredImageSource(image.getSource(), filter);
         return Toolkit.getDefaultToolkit().createImage(prod);
     }
 
+    private static Image map(Image image, ImageFilter filter) {
+        if (image instanceof MultiResolutionImage) {
+            return MultiResolutionCachedImage
+                    .map((MultiResolutionImage) image,
+                         (img) -> generateFilteredImage(img, filter));
+        }
+        return generateFilteredImage(image, filter);
+    }
+
     private abstract static class IconImageFilter extends RGBImageFilter {
         IconImageFilter() {
             super();
@@ -399,15 +378,9 @@
         }
     };
 
-    private static final Integer OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
+    private static final int OPAQUE_SET_FLAG = 24; // private int JComponent.OPAQUE_SET
     static boolean hasOpaqueBeenExplicitlySet(final JComponent c) {
-        final Method method = getJComponentGetFlagMethod.get();
-        if (method == null) return false;
-        try {
-            return Boolean.TRUE.equals(method.invoke(c, OPAQUE_SET_FLAG));
-        } catch (final Throwable ignored) {
-            return false;
-        }
+        return SwingAccessor.getJComponentAccessor().getFlag(c, OPAQUE_SET_FLAG);
     }
 
     private static boolean isWindowTextured(final Component c) {
diff --git a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java
index dcc4b57..049dbb5 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/font/CFont.java
@@ -278,6 +278,18 @@
         return getStrike(font, DEFAULT_FRC);
     }
 
+    public boolean equals(Object o) {
+         if (!super.equals(o)) {
+             return false;
+         }
+
+         return ((Font2D)o).getStyle() == this.getStyle();
+    }
+
+    public int hashCode() {
+        return super.hashCode() ^ this.getStyle();
+    }
+
     public String toString() {
         return "CFont { fullName: " + fullName +
             ",  familyName: " + familyName + ", style: " + style +
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java
index 00cb527..3307e5b 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibility.java
@@ -37,6 +37,7 @@
 
 import javax.accessibility.*;
 import javax.swing.*;
+import sun.awt.AWTAccessor;
 
 class CAccessibility implements PropertyChangeListener {
     private static Set<String> ignoredRoles;
@@ -205,33 +206,12 @@
         }, c);
     }
 
-    static Field getAccessibleBundleKeyFieldWithReflection() {
-        try {
-            final Field fieldKey = AccessibleBundle.class.getDeclaredField("key");
-            fieldKey.setAccessible(true);
-            return fieldKey;
-        } catch (final SecurityException e) {
-            e.printStackTrace();
-        } catch (final NoSuchFieldException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-    private static final Field FIELD_KEY = getAccessibleBundleKeyFieldWithReflection();
-
     static String getAccessibleRoleFor(final Accessible a) {
         final AccessibleContext ac = a.getAccessibleContext();
         if (ac == null) return null;
 
         final AccessibleRole role = ac.getAccessibleRole();
-        try {
-            return (String)FIELD_KEY.get(role);
-        } catch (final IllegalArgumentException e) {
-            e.printStackTrace();
-        } catch (final IllegalAccessException e) {
-            e.printStackTrace();
-        }
-        return null;
+        return AWTAccessor.getAccessibleBundleAccessor().getKey(role);
     }
 
     public static String getAccessibleRole(final Accessible a, final Component c) {
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
index 6ac0a07..d3d3dca 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java
@@ -28,7 +28,6 @@
 import java.awt.Component;
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
-import java.lang.reflect.Field;
 
 import javax.accessibility.Accessible;
 import javax.accessibility.AccessibleContext;
@@ -41,36 +40,23 @@
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_CARET_PROPERTY;
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY;
 import static javax.accessibility.AccessibleContext.ACCESSIBLE_TEXT_PROPERTY;
+import sun.awt.AWTAccessor;
 
 
 class CAccessible extends CFRetainedResource implements Accessible {
-    static Field getNativeAXResourceField() {
-        try {
-            final Field field = AccessibleContext.class.getDeclaredField("nativeAXResource");
-            field.setAccessible(true);
-            return field;
-        } catch (final Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    private static Field nativeAXResourceField = getNativeAXResourceField();
 
     public static CAccessible getCAccessible(final Accessible a) {
         if (a == null) return null;
         AccessibleContext context = a.getAccessibleContext();
-        try {
-            final CAccessible cachedCAX = (CAccessible) nativeAXResourceField.get(context);
-            if (cachedCAX != null) return cachedCAX;
-
-            final CAccessible newCAX = new CAccessible(a);
-            nativeAXResourceField.set(context, newCAX);
-            return newCAX;
-        }  catch (final Exception e) {
-            e.printStackTrace();
-            return null;
+        AWTAccessor.AccessibleContextAccessor accessor
+                = AWTAccessor.getAccessibleContextAccessor();
+        final CAccessible cachedCAX = (CAccessible) accessor.getNativeAXResource(context);
+        if (cachedCAX != null) {
+            return cachedCAX;
         }
+        final CAccessible newCAX = new CAccessible(a);
+        accessor.setNativeAXResource(context, newCAX);
+        return newCAX;
     }
 
     private static native void unregisterFromCocoaAXSystem(long ptr);
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java
index 3f05185..150c6e9 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDataTransferer.java
@@ -36,7 +36,7 @@
 import java.text.Normalizer;
 import java.text.Normalizer.Form;
 import java.util.*;
-
+import java.util.regex.*;
 import java.awt.datatransfer.*;
 import sun.awt.datatransfer.*;
 
@@ -129,12 +129,21 @@
                                  long format, Transferable transferable) throws IOException {
 
         if (format == CF_URL && URL.class.equals(flavor.getRepresentationClass())) {
-            String[] strings = dragQueryFile(bytes);
-            if(strings == null || strings.length == 0) {
-                return null;
+            String charset = Charset.defaultCharset().name();
+            if (transferable != null && transferable.isDataFlavorSupported(javaTextEncodingFlavor)) {
+                try {
+                    charset = new String((byte[]) transferable.getTransferData(javaTextEncodingFlavor), "UTF-8");
+                } catch (UnsupportedFlavorException cannotHappen) {
+                }
             }
-            return new URL(strings[0]);
-        } else if(isUriListFlavor(flavor)) {
+
+            String xml = new String(bytes, charset);
+            // macosx pasteboard returns a property list that consists of one URL
+            // let's extract it.
+            return new URL(extractURL(xml));
+        }
+
+        if(isUriListFlavor(flavor) && format == CF_FILE) {
             // dragQueryFile works fine with files and url,
             // it parses and extracts values from property list.
             // maxosx always returns property list for
@@ -156,6 +165,16 @@
         return super.translateBytes(bytes, flavor, format, transferable);
     }
 
+    private String extractURL(String xml) {
+       Pattern urlExtractorPattern = Pattern.compile("<string>(.*)</string>");
+        Matcher matcher = urlExtractorPattern.matcher(xml);
+        if (matcher.find()) {
+            return matcher.group(1);
+        } else {
+            return null;
+        }
+    }
+
     @Override
     protected synchronized Long getFormatForNativeAsLong(String str) {
         Long format = predefinedClipboardNameMap.get(str);
diff --git a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java
index a5504cb..61f41a2 100644
--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/macosx/CImage.java
@@ -56,6 +56,25 @@
         return creator;
     }
 
+    // This is used to create a CImage that represents the icon of the given file.
+    public static Image createImageOfFile(String file, int width, int height) {
+        return getCreator().createImageOfFile(file, width, height);
+    }
+
+    public static Image createSystemImageFromSelector(String iconSelector,
+            int width, int height) {
+        return getCreator().createSystemImageFromSelector(iconSelector, width, height);
+    }
+
+    public static Image createImageFromFile(String file, double width, double height) {
+        return getCreator().createImageFromFile(file, width, height);
+    }
+
+    // This is used to create a CImage from a Image
+    public static CImage createFromImage(final Image image) {
+        return getCreator().createFromImage(image);
+    }
+
     public static class Creator {
         Creator() { }
 
diff --git a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m
index f444bc9..fb2cb86 100644
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/awt_DrawingSurface.m
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 
 #import "AWTSurfaceLayers.h"
 
+#import "jni_util.h"
+
 JNIEXPORT JAWT_DrawingSurfaceInfo* JNICALL awt_DrawingSurface_GetDrawingSurfaceInfo
 (JAWT_DrawingSurface* ds)
 {
@@ -130,3 +132,47 @@
     // TODO: implement
     return NULL;
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/lwawt/macosx/CViewEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = (*env)->GetMethodID(env, cls, "<init>", "(J)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return (*env)->NewObject(env, cls, mid, platformInfo);
+}
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, doActivate);
+}
diff --git a/jdk/src/java.desktop/macosx/native/libjawt/jawt.m b/jdk/src/java.desktop/macosx/native/libjawt/jawt.m
index cd9f52a..773c648 100644
--- a/jdk/src/java.desktop/macosx/native/libjawt/jawt.m
+++ b/jdk/src/java.desktop/macosx/native/libjawt/jawt.m
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,8 +46,9 @@
         return JNI_FALSE;
     }
 
-    if (awt->version != (JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER) &&
-        awt->version != JAWT_VERSION_1_7)
+    if (awt->version != (JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER)
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9)
     {
         return JNI_FALSE;
     }
@@ -58,6 +59,11 @@
         awt->Lock = awt_Lock;
         awt->Unlock = awt_Unlock;
         awt->GetComponent = awt_GetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
diff --git a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java
index 028efff..ead39be 100644
--- a/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java
+++ b/jdk/src/java.desktop/share/classes/com/sun/media/sound/ModelByteBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -200,11 +200,13 @@
 
     public void writeTo(OutputStream out) throws IOException {
         if (root.file != null && root.buffer == null) {
-            InputStream is = getInputStream();
-            byte[] buff = new byte[1024];
-            int ret;
-            while ((ret = is.read(buff)) != -1)
-                out.write(buff, 0, ret);
+            try (InputStream is = getInputStream()) {
+                byte[] buff = new byte[1024];
+                int ret;
+                while ((ret = is.read(buff)) != -1) {
+                    out.write(buff, 0, ret);
+                }
+            }
         } else
             out.write(array(), (int) arrayOffset(), (int) capacity());
     }
diff --git a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
index 1c723ae..9250597 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/AWTEvent.java
@@ -284,35 +284,6 @@
             });
     }
 
-    private static synchronized Field get_InputEvent_CanAccessSystemClipboard() {
-        if (inputEvent_CanAccessSystemClipboard_Field == null) {
-            inputEvent_CanAccessSystemClipboard_Field =
-                java.security.AccessController.doPrivileged(
-                    new java.security.PrivilegedAction<Field>() {
-                            public Field run() {
-                                Field field = null;
-                                try {
-                                    field = InputEvent.class.
-                                        getDeclaredField("canAccessSystemClipboard");
-                                    field.setAccessible(true);
-                                    return field;
-                                } catch (SecurityException e) {
-                                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
-                                    }
-                                } catch (NoSuchFieldException e) {
-                                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                                        log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
-                                    }
-                                }
-                                return null;
-                            }
-                        });
-        }
-
-        return inputEvent_CanAccessSystemClipboard_Field;
-    }
-
     /**
      * Initialize JNI field and method IDs for fields that may be
      * accessed from C.
@@ -593,33 +564,20 @@
         that.bdata = this.bdata;
         // Copy canAccessSystemClipboard value from this into that.
         if (this instanceof InputEvent && that instanceof InputEvent) {
-            Field field = get_InputEvent_CanAccessSystemClipboard();
-            if (field != null) {
-                try {
-                    boolean b = field.getBoolean(this);
-                    field.setBoolean(that, b);
-                } catch(IllegalAccessException e) {
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
-                    }
-                }
-            }
+
+            AWTAccessor.InputEventAccessor accessor
+                    = AWTAccessor.getInputEventAccessor();
+
+            boolean b = accessor.canAccessSystemClipboard((InputEvent) this);
+            accessor.setCanAccessSystemClipboard((InputEvent) that, b);
         }
         that.isSystemGenerated = this.isSystemGenerated;
     }
 
     void dispatched() {
         if (this instanceof InputEvent) {
-            Field field = get_InputEvent_CanAccessSystemClipboard();
-            if (field != null) {
-                try {
-                    field.setBoolean(this, false);
-                } catch(IllegalAccessException e) {
-                    if (log.isLoggable(PlatformLogger.Level.FINE)) {
-                        log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
-                    }
-                }
-            }
+            AWTAccessor.getInputEventAccessor().
+                    setCanAccessSystemClipboard((InputEvent) this, false);
         }
     }
 } // class AWTEvent
diff --git a/jdk/src/java.desktop/share/classes/java/awt/Component.java b/jdk/src/java.desktop/share/classes/java/awt/Component.java
index c2a021f..25c6ee2 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/Component.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/Component.java
@@ -53,13 +53,11 @@
 import java.awt.im.InputContext;
 import java.awt.im.InputMethodRequests;
 import java.awt.dnd.DropTarget;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.security.AccessControlContext;
 import javax.accessibility.*;
 import java.applet.Applet;
+import javax.swing.JComponent;
 
 import sun.awt.ComponentFactory;
 import sun.security.action.GetPropertyAction;
@@ -81,6 +79,7 @@
 import static sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType.*;
 import sun.awt.RequestFocusController;
 import sun.java2d.SunGraphicsEnvironment;
+import sun.swing.SwingAccessor;
 import sun.util.logging.PlatformLogger;
 
 /**
@@ -8695,6 +8694,9 @@
      * the Swing package private method {@code compWriteObjectNotify}.
      */
     private void doSwingSerialization() {
+        if (!(this instanceof JComponent)) {
+            return;
+        }
         @SuppressWarnings("deprecation")
         Package swingPackage = Package.getPackage("javax.swing");
         // For Swing serialization to correctly work Swing needs to
@@ -8707,36 +8709,10 @@
                    klass = klass.getSuperclass()) {
             if (klass.getPackage() == swingPackage &&
                       klass.getClassLoader() == null) {
-                final Class<?> swingClass = klass;
-                // Find the first override of the compWriteObjectNotify method
-                Method[] methods = AccessController.doPrivileged(
-                                                                 new PrivilegedAction<Method[]>() {
-                                                                     public Method[] run() {
-                                                                         return swingClass.getDeclaredMethods();
-                                                                     }
-                                                                 });
-                for (int counter = methods.length - 1; counter >= 0;
-                     counter--) {
-                    final Method method = methods[counter];
-                    if (method.getName().equals("compWriteObjectNotify")){
-                        // We found it, use doPrivileged to make it accessible
-                        // to use.
-                        AccessController.doPrivileged(new PrivilegedAction<Void>() {
-                                public Void run() {
-                                    method.setAccessible(true);
-                                    return null;
-                                }
-                            });
-                        // Invoke the method
-                        try {
-                            method.invoke(this, (Object[]) null);
-                        } catch (IllegalAccessException iae) {
-                        } catch (InvocationTargetException ite) {
-                        }
-                        // We're done, bail.
-                        return;
-                    }
-                }
+
+                SwingAccessor.getJComponentAccessor()
+                        .compWriteObjectNotify((JComponent) this);
+                return;
             }
         }
     }
diff --git a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
index aa9d643..1e9e2f4 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java
@@ -40,8 +40,6 @@
 
 import java.lang.ref.WeakReference;
 
-import java.lang.reflect.Field;
-
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 
@@ -140,6 +138,10 @@
                 public void removeLastFocusRequest(Component heavyweight) {
                     KeyboardFocusManager.removeLastFocusRequest(heavyweight);
                 }
+                @Override
+                public Component getMostRecentFocusOwner(Window window) {
+                    return KeyboardFocusManager.getMostRecentFocusOwner(window);
+                }
                 public void setMostRecentFocusOwner(Window window, Component component) {
                     KeyboardFocusManager.setMostRecentFocusOwner(window, component);
                 }
@@ -3053,32 +3055,9 @@
         }
     }
 
-    static Field proxyActive;
     // Accessor to private field isProxyActive of KeyEvent
     private static boolean isProxyActiveImpl(KeyEvent e) {
-        if (proxyActive == null) {
-            proxyActive =  AccessController.doPrivileged(new PrivilegedAction<Field>() {
-                    public Field run() {
-                        Field field = null;
-                        try {
-                            field = KeyEvent.class.getDeclaredField("isProxyActive");
-                            if (field != null) {
-                                field.setAccessible(true);
-                            }
-                        } catch (NoSuchFieldException nsf) {
-                            assert(false);
-                        }
-                        return field;
-                    }
-                });
-        }
-
-        try {
-            return proxyActive.getBoolean(e);
-        } catch (IllegalAccessException iae) {
-            assert(false);
-        }
-        return false;
+        return AWTAccessor.getKeyEventAccessor().isProxyActive(e);
     }
 
     // Returns the value of this KeyEvent's field isProxyActive
diff --git a/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java b/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java
index 678067a..394686a 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/SequencedEvent.java
@@ -63,6 +63,10 @@
             public boolean isSequencedEvent(AWTEvent event) {
                 return event instanceof SequencedEvent;
             }
+
+            public AWTEvent create(AWTEvent event) {
+                return new SequencedEvent(event);
+            }
         });
     }
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
index d332d2d..ec9bd0b 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/InputEvent.java
@@ -302,6 +302,12 @@
                 public boolean canAccessSystemClipboard(InputEvent event) {
                     return event.canAccessSystemClipboard;
                 }
+
+                @Override
+                public void setCanAccessSystemClipboard(InputEvent event,
+                        boolean canAccessSystemClipboard) {
+                    event.canAccessSystemClipboard = canAccessSystemClipboard;
+                }
             });
     }
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
index f103d52..0ca378d 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/event/KeyEvent.java
@@ -1091,6 +1091,11 @@
                 public Component getOriginalSource( KeyEvent ev ) {
                     return ev.originalSource;
                 }
+
+                @Override
+                public boolean isProxyActive(KeyEvent ev) {
+                    return ev.isProxyActive;
+                }
             });
     }
 
diff --git a/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java b/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java
index cd4c9fd..738cd6c 100644
--- a/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java
+++ b/jdk/src/java.desktop/share/classes/java/awt/font/JavaAWTFontAccessImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 
 package java.awt.font;
 
-import java.lang.reflect.Field;
 import jdk.internal.misc.JavaAWTFontAccess;
 
 class JavaAWTFontAccessImpl implements JavaAWTFontAccess {
@@ -33,19 +32,17 @@
     // java.awt.font.TextAttribute constants
     public Object getTextAttributeConstant(String name) {
         switch (name) {
-        case "RUN_DIRECTION":
-        case "NUMERIC_SHAPING":
-        case "BIDI_EMBEDDING":
-        case "RUN_DIRECTION_LTR":
-            try {
-                Field f = TextAttribute.class.getField(name);
-                return f.get(null);
-            } catch (NoSuchFieldException | IllegalAccessException x) {
-                throw new AssertionError(x);
-            }
+            case "RUN_DIRECTION":
+                return TextAttribute.RUN_DIRECTION;
+            case "NUMERIC_SHAPING":
+                return TextAttribute.NUMERIC_SHAPING;
+            case "BIDI_EMBEDDING":
+                return TextAttribute.BIDI_EMBEDDING;
+            case "RUN_DIRECTION_LTR":
+                return TextAttribute.RUN_DIRECTION_LTR;
+            default:
+                throw new AssertionError("Constant name is not recognized");
         }
-
-        throw new AssertionError("Constant name is not recognized");
     }
 
     // java.awt.font.NumericShaper
diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java
index 936322a..5e2d97b 100644
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleBundle.java
@@ -31,6 +31,7 @@
 import java.util.Locale;
 import java.util.MissingResourceException;
 import java.util.ResourceBundle;
+import sun.awt.AWTAccessor;
 
 /**
  * <p>Base class used to maintain a strongly typed enumeration.  This is
@@ -53,6 +54,17 @@
     private final String defaultResourceBundleName
         = "com.sun.accessibility.internal.resources.accessibility";
 
+    static {
+        AWTAccessor.setAccessibleBundleAccessor(
+                new AWTAccessor.AccessibleBundleAccessor() {
+
+                    @Override
+                    public String getKey(AccessibleBundle accessibleBundle) {
+                        return accessibleBundle.key;
+                    }
+                });
+    }
+
     /**
      * Construct an {@code AccessibleBundle}.
      */
diff --git a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java
index 65a163f..c3a30f3 100644
--- a/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java
+++ b/jdk/src/java.desktop/share/classes/javax/accessibility/AccessibleContext.java
@@ -99,6 +99,16 @@
             public AppContext getAppContext(AccessibleContext accessibleContext) {
                 return accessibleContext.targetAppContext;
             }
+
+            @Override
+            public Object getNativeAXResource(AccessibleContext accessibleContext) {
+                return accessibleContext.nativeAXResource;
+            }
+
+            @Override
+            public void setNativeAXResource(AccessibleContext accessibleContext, Object value) {
+                accessibleContext.nativeAXResource = value;
+            }
         });
     }
 
diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/ImageIO.java b/jdk/src/java.desktop/share/classes/javax/imageio/ImageIO.java
index 7af7b77..523a857 100644
--- a/jdk/src/java.desktop/share/classes/javax/imageio/ImageIO.java
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/ImageIO.java
@@ -462,10 +462,13 @@
             return new String[0];
         }
 
-        HashSet<String> s = new HashSet<String>();
+        HashSet<String> s = new HashSet<>();
         while (iter.hasNext()) {
             ImageReaderWriterSpi spi = iter.next();
-            Collections.addAll(s, spiInfo.info(spi));
+            String[] info = spiInfo.info(spi);
+            if (info != null) {
+                Collections.addAll(s, info);
+            }
         }
 
         return s.toArray(new String[s.size()]);
diff --git a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
index edcb086..da9ade0 100644
--- a/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
+++ b/jdk/src/java.desktop/share/classes/javax/imageio/plugins/tiff/TIFFField.java
@@ -412,7 +412,7 @@
 
     /**
      * Creates a {@code TIFFField} from a TIFF native image
-     * metadata node. If the value of the <tt>"number"</tt> attribute
+     * metadata node. If the value of the {@code "number"} attribute
      * of the node is not found in {@code tagSet} then a new
      * {@code TIFFTag} with name {@code TIFFTag.UNKNOWN_TAG_NAME}
      * will be created and assigned to the field.
@@ -420,20 +420,22 @@
      * @param tagSet The {@code TIFFTagSet} to which the
      * {@code TIFFTag} of the field belongs.
      * @param node A native TIFF image metadata {@code TIFFField} node.
-     * @throws NullPointerException if {@code node} is
-     * {@code null}.
-     * @throws IllegalArgumentException if the name of the node is not
-     * {@code "TIFFField"}.
-     * @throws NullPointerException if the node does not contain any data.
-     * @throws IllegalArgumentException if the combination of node attributes
-     * and data is not legal per the {@link #TIFFField(TIFFTag,int,int,Object)}
-     * constructor specification.
+     * @throws IllegalArgumentException If the {@code Node} parameter content
+     * does not adhere to the {@code TIFFField} element structure defined by
+     * the <a href="../../metadata/doc-files/tiff_metadata.html#ImageMetadata">
+     * TIFF native image metadata format specification</a>, or if the
+     * combination of node attributes and data is not legal per the
+     * {@link #TIFFField(TIFFTag,int,int,Object)} constructor specification.
+     * Note that a cause might be set on such an exception.
      * @return A new {@code TIFFField}.
      */
     public static TIFFField createFromMetadataNode(TIFFTagSet tagSet,
                                                    Node node) {
         if (node == null) {
-            throw new NullPointerException("node == null!");
+            // This method is specified to throw only IllegalArgumentExceptions
+            // so we create an IAE with a NullPointerException as its cause.
+            throw new IllegalArgumentException(new NullPointerException
+                ("node == null!"));
         }
         String name = node.getNodeName();
         if (!name.equals("TIFFField")) {
@@ -487,7 +489,17 @@
             tag = new TIFFTag(TIFFTag.UNKNOWN_TAG_NAME, tagNumber, 1 << type);
         }
 
-        return new TIFFField(tag, type, count, data);
+        TIFFField field;
+        try {
+            field = new TIFFField(tag, type, count, data);
+        } catch (NullPointerException npe) {
+            // This method is specified to throw only IllegalArgumentExceptions
+            // so we catch the NullPointerException and set it as the cause of
+            // the IAE which is thrown.
+            throw new IllegalArgumentException(npe);
+        }
+
+        return field;
     }
 
     /**
diff --git a/jdk/src/java.desktop/share/classes/javax/print/ServiceUI.java b/jdk/src/java.desktop/share/classes/javax/print/ServiceUI.java
index 82566e9..615de40 100644
--- a/jdk/src/java.desktop/share/classes/javax/print/ServiceUI.java
+++ b/jdk/src/java.desktop/share/classes/javax/print/ServiceUI.java
@@ -40,6 +40,7 @@
 import javax.print.attribute.PrintRequestAttributeSet;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.Fidelity;
+import sun.print.DialogOwner;
 
 import sun.print.ServiceDialog;
 import sun.print.SunAlternateMedia;
@@ -187,9 +188,8 @@
             defaultIndex = 0;
         }
 
-        // For now we set owner to null. In the future, it may be passed
-        // as an argument.
-        Window owner = null;
+        DialogOwner dlgOwner = (DialogOwner)attributes.get(DialogOwner.class);
+        Window owner = (dlgOwner != null) ? dlgOwner.getOwner() : null;
 
         Rectangle gcBounds = (gc == null) ?  GraphicsEnvironment.
             getLocalGraphicsEnvironment().getDefaultScreenDevice().
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/GrayFilter.java b/jdk/src/java.desktop/share/classes/javax/swing/GrayFilter.java
index af5947e..65fddf3 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/GrayFilter.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/GrayFilter.java
@@ -26,6 +26,7 @@
 
 import java.awt.*;
 import java.awt.image.*;
+import sun.awt.image.MultiResolutionCachedImage;
 
 /**
  * An image filter that "disables" an image by turning
@@ -48,7 +49,16 @@
      * @param i  an {@code Image} to be created as disabled
      * @return  the new grayscale image created from {@code i}
      */
-    public static Image createDisabledImage (Image i) {
+    public static Image createDisabledImage(Image i) {
+        if (i instanceof MultiResolutionImage) {
+            return MultiResolutionCachedImage
+                    .map((MultiResolutionImage) i,
+                         (img) -> createDisabledImageImpl(img));
+        }
+        return createDisabledImageImpl(i);
+    }
+
+    private static Image createDisabledImageImpl(Image i) {
         GrayFilter filter = new GrayFilter(true, 50);
         ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
         Image grayImage = Toolkit.getDefaultToolkit().createImage(prod);
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java b/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java
index 8a63fe7..e12241f 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/ImageIcon.java
@@ -40,8 +40,8 @@
 import javax.accessibility.*;
 
 import sun.awt.AppContext;
-import java.lang.reflect.Field;
 import java.security.*;
+import sun.awt.AWTAccessor;
 
 /**
  * An implementation of the Icon interface that paints Icons
@@ -106,11 +106,8 @@
                     final Component component = createNoPermsComponent();
 
                     // 6482575 - clear the appContext field so as not to leak it
-                    Field appContextField =
-
-                            Component.class.getDeclaredField("appContext");
-                    appContextField.setAccessible(true);
-                    appContextField.set(component, null);
+                    AWTAccessor.getComponentAccessor().
+                            setAppContext(component, null);
 
                     return component;
                 } catch (Throwable e) {
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
index 3d60254..74abca7 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/JComponent.java
@@ -55,6 +55,7 @@
 
 import sun.awt.AWTAccessor;
 import sun.awt.SunToolkit;
+import sun.swing.SwingAccessor;
 import sun.swing.SwingUtilities2;
 
 /**
@@ -376,6 +377,21 @@
     private transient Object aaHint;
     private transient Object lcdRenderingHint;
 
+    static {
+        SwingAccessor.setJComponentAccessor(new SwingAccessor.JComponentAccessor() {
+
+            @Override
+            public boolean getFlag(JComponent comp, int aFlag) {
+                return comp.getFlag(aFlag);
+            }
+
+            @Override
+            public void compWriteObjectNotify(JComponent comp) {
+                comp.compWriteObjectNotify();
+            }
+        });
+    }
+
     static Graphics safelyGetGraphics(Component c) {
         return safelyGetGraphics(c, SwingUtilities.getRoot(c));
     }
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java
index 2698c90..894f3fa 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/GlyphView.java
@@ -261,23 +261,7 @@
         if (painter == null) {
             if (defaultPainter == null) {
                 // the classname should probably come from a property file.
-                String classname = "javax.swing.text.GlyphPainter1";
-                try {
-                    Class<?> c;
-                    ClassLoader loader = getClass().getClassLoader();
-                    if (loader != null) {
-                        c = loader.loadClass(classname);
-                    } else {
-                        c = Class.forName(classname);
-                    }
-                    Object o = c.newInstance();
-                    if (o instanceof GlyphPainter) {
-                        defaultPainter = (GlyphPainter) o;
-                    }
-                } catch (Throwable e) {
-                    throw new StateInvariantError("GlyphView: Can't load glyph painter: "
-                                                  + classname);
-                }
+                defaultPainter = new GlyphPainter1();
             }
             setGlyphPainter(defaultPainter.getPainter(this, getStartOffset(),
                                                       getEndOffset()));
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java
index 154db5c..fc96021 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/ParagraphView.java
@@ -61,20 +61,8 @@
         Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty);
         if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) {
             try {
-                if (i18nStrategy == null) {
-                    // the classname should probably come from a property file.
-                    String classname = "javax.swing.text.TextLayoutStrategy";
-                    ClassLoader loader = getClass().getClassLoader();
-                    if (loader != null) {
-                        i18nStrategy = loader.loadClass(classname);
-                    } else {
-                        i18nStrategy = Class.forName(classname);
-                    }
-                }
-                Object o = i18nStrategy.newInstance();
-                if (o instanceof FlowStrategy) {
-                    strategy = (FlowStrategy) o;
-                }
+                // the classname should probably come from a property file.
+                strategy = new TextLayoutStrategy();
             } catch (Throwable e) {
                 throw new StateInvariantError("ParagraphView: Can't create i18n strategy: "
                                               + e.getMessage());
diff --git a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java
index 7815746..57beae1 100644
--- a/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java
+++ b/jdk/src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java
@@ -40,6 +40,7 @@
 import java.lang.ref.*;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
+import javax.swing.text.html.parser.ParserDelegator;
 
 /**
  * The Swing JEditorPane text component supports different kinds
@@ -610,11 +611,7 @@
      */
     protected Parser getParser() {
         if (defaultParser == null) {
-            try {
-                Class<?> c = Class.forName("javax.swing.text.html.parser.ParserDelegator");
-                defaultParser = (Parser) c.newInstance();
-            } catch (Throwable e) {
-            }
+            defaultParser = new ParserDelegator();
         }
         return defaultParser;
     }
diff --git a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java
index 4041318..d03e5be 100644
--- a/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java
+++ b/jdk/src/java.desktop/share/classes/sun/applet/AppletPanel.java
@@ -616,34 +616,8 @@
      * calls KeyboardFocusManager directly.
      */
     private Component getMostRecentFocusOwnerForWindow(Window w) {
-        Method meth = AccessController.doPrivileged(
-            new PrivilegedAction<Method>() {
-                @Override
-                public Method run() {
-                    Method meth = null;
-                    try {
-                        meth = KeyboardFocusManager.class.getDeclaredMethod(
-                                "getMostRecentFocusOwner",
-                                new Class<?>[]{Window.class});
-                        meth.setAccessible(true);
-                    } catch (Exception e) {
-                        // Must never happen
-                        e.printStackTrace();
-                    }
-                    return meth;
-                }
-            });
-        if (meth != null) {
-            // Meth refers static method
-            try {
-                return (Component)meth.invoke(null, new Object[] {w});
-            } catch (Exception e) {
-                // Must never happen
-                e.printStackTrace();
-            }
-        }
-        // Will get here if exception was thrown or meth is null
-        return w.getMostRecentFocusOwner();
+        return AWTAccessor.getKeyboardFocusManagerAccessor()
+                .getMostRecentFocusOwner(w);
     }
 
     /*
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java
index 796b7ab..f59f064c 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/AWTAccessor.java
@@ -34,6 +34,7 @@
 import java.awt.dnd.DropTargetContext;
 import java.awt.dnd.peer.DragSourceContextPeer;
 import java.awt.dnd.peer.DropTargetContextPeer;
+import java.awt.event.AWTEventListener;
 import java.awt.event.InputEvent;
 import java.awt.event.InvocationEvent;
 import java.awt.event.KeyEvent;
@@ -48,6 +49,7 @@
 import java.io.File;
 import java.util.ResourceBundle;
 import java.util.Vector;
+import javax.accessibility.AccessibleBundle;
 
 /**
  * The AWTAccessor utility class.
@@ -406,6 +408,8 @@
          * Accessor for InputEvent.canAccessSystemClipboard field
          */
         boolean canAccessSystemClipboard(InputEvent event);
+        void setCanAccessSystemClipboard(InputEvent event,
+                boolean canAccessSystemClipboard);
     }
 
     /*
@@ -455,6 +459,11 @@
         void removeLastFocusRequest(Component heavyweight);
 
         /**
+         * Gets the most recent focus owner in the window.
+         */
+        Component getMostRecentFocusOwner(Window window);
+
+        /**
          * Sets the most recent focus owner in the window.
          */
         void setMostRecentFocusOwner(Window window, Component component);
@@ -708,6 +717,11 @@
          * Gets original source for KeyEvent
          */
         Component getOriginalSource(KeyEvent ev);
+
+        /**
+         * Gets isProxyActive field for KeyEvent
+         */
+        boolean isProxyActive(KeyEvent ev);
     }
 
     /**
@@ -758,6 +772,11 @@
          * Returns true if the event is an instances of SequencedEvent.
          */
         boolean isSequencedEvent(AWTEvent event);
+
+        /*
+         * Creates SequencedEvent with the given nested event
+         */
+        AWTEvent create(AWTEvent event);
     }
 
     /*
@@ -787,6 +806,15 @@
     public interface AccessibleContextAccessor {
         void setAppContext(AccessibleContext accessibleContext, AppContext appContext);
         AppContext getAppContext(AccessibleContext accessibleContext);
+        Object getNativeAXResource(AccessibleContext accessibleContext);
+        void setNativeAXResource(AccessibleContext accessibleContext, Object value);
+    }
+
+    /*
+     * An accessor object for the AccessibleContext class
+     */
+    public interface AccessibleBundleAccessor {
+        String getKey(AccessibleBundle accessibleBundle);
     }
 
     /*
@@ -845,6 +873,7 @@
     private static InvocationEventAccessor invocationEventAccessor;
     private static SystemColorAccessor systemColorAccessor;
     private static AccessibleContextAccessor accessibleContextAccessor;
+    private static AccessibleBundleAccessor accessibleBundleAccessor;
     private static DragSourceContextAccessor dragSourceContextAccessor;
     private static DropTargetContextAccessor dropTargetContextAccessor;
 
@@ -1235,9 +1264,13 @@
      * Get the accessor object for the java.awt.SequencedEvent class.
      */
     public static SequencedEventAccessor getSequencedEventAccessor() {
-        // The class is not public. So we can't ensure it's initialized.
-        // Null returned value means it's not initialized
-        // (so not a single instance of the event has been created).
+        if (sequencedEventAccessor == null) {
+            try {
+                unsafe.ensureClassInitialized(
+                        Class.forName("java.awt.SequencedEvent"));
+            } catch (ClassNotFoundException ignore) {
+            }
+        }
         return sequencedEventAccessor;
     }
 
@@ -1302,6 +1335,23 @@
     }
 
    /*
+    * Set the accessor object for the javax.accessibility.AccessibleBundle class.
+    */
+    public static void setAccessibleBundleAccessor(AccessibleBundleAccessor accessor) {
+        AWTAccessor.accessibleBundleAccessor = accessor;
+    }
+
+    /*
+     * Get the accessor object for the javax.accessibility.AccessibleBundle class.
+     */
+    public static AccessibleBundleAccessor getAccessibleBundleAccessor() {
+        if (accessibleBundleAccessor == null) {
+            unsafe.ensureClassInitialized(AccessibleBundle.class);
+        }
+        return accessibleBundleAccessor;
+    }
+
+   /*
     * Set the accessor object for the javax.accessibility.AccessibleContext class.
     */
     public static void setAccessibleContextAccessor(AccessibleContextAccessor accessor) {
@@ -1342,4 +1392,4 @@
         AWTAccessor.dropTargetContextAccessor = accessor;
     }
 
-}
+}
\ No newline at end of file
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
index 8461974..c017454 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
@@ -372,26 +372,6 @@
         cont.setFocusTraversalPolicy(defaultPolicy);
     }
 
-    private static FocusTraversalPolicy createLayoutPolicy() {
-        FocusTraversalPolicy policy = null;
-        try {
-            Class<?> layoutPolicyClass =
-                Class.forName("javax.swing.LayoutFocusTraversalPolicy");
-            policy = (FocusTraversalPolicy)layoutPolicyClass.newInstance();
-        }
-        catch (ClassNotFoundException e) {
-            assert false;
-        }
-        catch (InstantiationException e) {
-            assert false;
-        }
-        catch (IllegalAccessException e) {
-            assert false;
-        }
-
-        return policy;
-    }
-
     /*
      * Insert a mapping from target to AppContext, for later retrieval
      * via targetToAppContext() above.
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java
index 8d8acdc..76bbfcf 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionCachedImage.java
@@ -33,6 +33,7 @@
 import java.util.function.Function;
 import java.util.function.BiFunction;
 import java.util.stream.Collectors;
+import java.awt.image.MultiResolutionImage;
 import java.awt.image.AbstractMultiResolutionImage;
 
 public class MultiResolutionCachedImage extends AbstractMultiResolutionImage {
@@ -44,17 +45,30 @@
     private int availableInfo;
 
     public MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
-            BiFunction<Integer, Integer, Image> mapper) {
-        this(baseImageWidth, baseImageHeight, new Dimension[]{new Dimension(
-            baseImageWidth, baseImageHeight)
+                                      BiFunction<Integer, Integer, Image> mapper)
+    {
+        this(baseImageWidth, baseImageHeight,
+             new Dimension[]{new Dimension( baseImageWidth, baseImageHeight)
         }, mapper);
     }
 
     public MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
-            Dimension2D[] sizes, BiFunction<Integer, Integer, Image> mapper) {
+                                      Dimension2D[] sizes,
+                                      BiFunction<Integer, Integer, Image> mapper)
+    {
+        this(baseImageWidth, baseImageHeight, sizes, mapper, true);
+    }
+
+    private MultiResolutionCachedImage(int baseImageWidth, int baseImageHeight,
+                                       Dimension2D[] sizes,
+                                       BiFunction<Integer, Integer, Image> mapper,
+                                       boolean copySizes)
+    {
         this.baseImageWidth = baseImageWidth;
         this.baseImageHeight = baseImageHeight;
-        this.sizes = (sizes == null) ? null : Arrays.copyOf(sizes, sizes.length);
+        this.sizes = (copySizes && sizes != null)
+                                ? Arrays.copyOf(sizes, sizes.length)
+                                : sizes;
         this.mapper = mapper;
     }
 
@@ -99,6 +113,35 @@
                         mapper.apply(getResolutionVariant(width, height)));
     }
 
+    public static Image map(MultiResolutionImage mrImage,
+                            Function<Image, Image> mapper) {
+
+        if (mrImage instanceof MultiResolutionToolkitImage) {
+            MultiResolutionToolkitImage mrtImage =
+                    (MultiResolutionToolkitImage) mrImage;
+            return MultiResolutionToolkitImage.map(mrtImage, mapper);
+        }
+
+        BiFunction<Integer, Integer, Image> sizeMapper
+                = (w, h) -> mapper.apply(mrImage.getResolutionVariant(w, h));
+
+        if (mrImage instanceof MultiResolutionCachedImage) {
+            MultiResolutionCachedImage mrcImage
+                    = (MultiResolutionCachedImage) mrImage;
+
+            return new MultiResolutionCachedImage(mrcImage.baseImageWidth,
+                                                  mrcImage.baseImageHeight,
+                                                  mrcImage.sizes,
+                                                  sizeMapper,
+                                                  false);
+        }
+
+        Image image = (Image) mrImage;
+        int width = image.getWidth(null);
+        int height = image.getHeight(null);
+        return new MultiResolutionCachedImage(width, height, sizeMapper);
+    }
+
     @Override
     public int getWidth(ImageObserver observer) {
         updateInfo(observer, ImageObserver.WIDTH);
diff --git a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java
index 26a8691..dfe0873 100644
--- a/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java
+++ b/jdk/src/java.desktop/share/classes/sun/awt/image/MultiResolutionToolkitImage.java
@@ -29,6 +29,7 @@
 import java.awt.image.MultiResolutionImage;
 import java.util.Arrays;
 import java.util.List;
+import java.util.function.Function;
 import sun.awt.SoftCache;
 
 public class MultiResolutionToolkitImage extends ToolkitImage implements MultiResolutionImage {
@@ -47,6 +48,13 @@
                 ? this : resolutionVariant;
     }
 
+    public static Image map(MultiResolutionToolkitImage mrImage,
+                            Function<Image, Image> mapper) {
+        Image baseImage = mapper.apply(mrImage);
+        Image rvImage = mapper.apply(mrImage.resolutionVariant);
+        return new MultiResolutionToolkitImage(baseImage, rvImage);
+    }
+
     private static void checkSize(double width, double height) {
         if (width <= 0 || height <= 0) {
             throw new IllegalArgumentException(String.format(
diff --git a/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java b/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java
index abe8bd9..f80e10c 100644
--- a/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java
+++ b/jdk/src/java.desktop/share/classes/sun/print/PSPrinterJob.java
@@ -33,11 +33,8 @@
 import java.awt.Graphics;
 import java.awt.Graphics2D;
 import java.awt.HeadlessException;
-import java.awt.Rectangle;
 import java.awt.Shape;
 
-import java.awt.image.BufferedImage;
-
 import java.awt.font.FontRenderContext;
 
 import java.awt.geom.AffineTransform;
@@ -46,7 +43,6 @@
 
 import java.awt.image.BufferedImage;
 
-import java.awt.peer.FontPeer;
 import java.awt.print.Pageable;
 import java.awt.print.PageFormat;
 import java.awt.print.Paper;
@@ -55,14 +51,12 @@
 import java.awt.print.PrinterIOException;
 import java.awt.print.PrinterJob;
 
-import javax.print.DocFlavor;
 import javax.print.PrintService;
 import javax.print.StreamPrintService;
 import javax.print.attribute.HashPrintRequestAttributeSet;
 import javax.print.attribute.PrintRequestAttributeSet;
 import javax.print.attribute.PrintServiceAttributeSet;
 import javax.print.attribute.standard.PrinterName;
-import javax.print.attribute.standard.Chromaticity;
 import javax.print.attribute.standard.Copies;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.DialogTypeSelection;
@@ -72,7 +66,6 @@
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
-import java.io.CharConversionException;
 import java.io.File;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -85,17 +78,14 @@
 import java.io.StringWriter;
 
 import java.util.ArrayList;
-import java.util.Enumeration;
 import java.util.Locale;
 import java.util.Properties;
 
 import sun.awt.CharsetString;
 import sun.awt.FontConfiguration;
-import sun.awt.FontDescriptor;
 import sun.awt.PlatformFont;
 import sun.awt.SunToolkit;
 import sun.font.FontAccess;
-import sun.font.FontManagerFactory;
 import sun.font.FontUtilities;
 
 import java.nio.charset.*;
@@ -105,7 +95,9 @@
 
 //REMIND: Remove use of this class when IPPPrintService is moved to share directory.
 import java.lang.reflect.Method;
+import javax.print.attribute.Attribute;
 import javax.print.attribute.standard.JobSheets;
+import javax.print.attribute.standard.Media;
 
 /**
  * A class which initiates and executes a PostScript printer job.
@@ -489,6 +481,23 @@
         return doPrint;
     }
 
+    @Override
+    protected void setAttributes(PrintRequestAttributeSet attributes)
+                                 throws PrinterException {
+        super.setAttributes(attributes);
+        if (attributes == null) {
+            return; // now always use attributes, so this shouldn't happen.
+        }
+        Attribute attr = attributes.get(Media.class);
+        if (attr instanceof CustomMediaTray) {
+            CustomMediaTray customTray = (CustomMediaTray)attr;
+            String choice = customTray.getChoiceName();
+            if (choice != null) {
+                mOptions = " InputSlot="+ choice;
+            }
+        }
+    }
+
     /**
      * Invoked by the RasterPrinterJob super class
      * this method is called to mark the start of a
@@ -1629,7 +1638,7 @@
                 execCmd[n++] = "-o job-sheets=standard";
             }
             if ((pFlags & OPTIONS) != 0) {
-                execCmd[n++] = new String(options);
+                execCmd[n++] = "-o" + options;
             }
         } else {
             ncomps+=1; //add 1 arg for lp
diff --git a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java
index 5979750..5dd2b4d 100644
--- a/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java
+++ b/jdk/src/java.desktop/share/classes/sun/print/ServiceDialog.java
@@ -944,6 +944,10 @@
                  } catch (MalformedURLException ex) {
                      dstSupported = true;
                  }
+            } else {
+                if (psCurrent.isAttributeCategorySupported(dstCategory)) {
+                    dstSupported = true;
+                }
             }
             cbPrintToFile.setEnabled(dstSupported && dstAllowed);
             cbPrintToFile.setSelected(dstSelected && dstAllowed
diff --git a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java
index 66d20f2..76a9f63 100644
--- a/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java
+++ b/jdk/src/java.desktop/share/classes/sun/swing/SwingAccessor.java
@@ -51,6 +51,16 @@
     }
 
     /**
+     * An accessor for the JComponent class.
+     */
+    public interface JComponentAccessor {
+
+        boolean getFlag(JComponent comp, int aFlag);
+
+        void compWriteObjectNotify(JComponent comp);
+    }
+
+    /**
      * An accessor for the JTextComponent class.
      * Note that we intentionally introduce the JTextComponentAccessor,
      * and not the JComponentAccessor because the needed methods
@@ -106,6 +116,29 @@
     }
 
     /**
+     * The javax.swing.JComponent class accessor object.
+     */
+    private static JComponentAccessor jComponentAccessor;
+
+    /**
+     * Set an accessor object for the javax.swing.JComponent class.
+     */
+    public static void setJComponentAccessor(JComponentAccessor jCompAccessor) {
+        jComponentAccessor = jCompAccessor;
+    }
+
+    /**
+     * Retrieve the accessor object for the javax.swing.JComponent class.
+     */
+    public static JComponentAccessor getJComponentAccessor() {
+        if (jComponentAccessor == null) {
+            unsafe.ensureClassInitialized(JComponent.class);
+        }
+
+        return jComponentAccessor;
+    }
+
+    /**
      * The javax.swing.text.JTextComponent class accessor object.
      */
     private static JTextComponentAccessor jtextComponentAccessor;
diff --git a/jdk/src/java.desktop/share/native/include/jawt.h b/jdk/src/java.desktop/share/native/include/jawt.h
index e0f682f..8cb2cb8 100644
--- a/jdk/src/java.desktop/share/native/include/jawt.h
+++ b/jdk/src/java.desktop/share/native/include/jawt.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,7 @@
 #endif
 
 /*
- * AWT native interface (new in JDK 1.3)
+ * AWT native interface.
  *
  * The AWT native interface allows a native C or C++ application a means
  * by which to access native structures in AWT.  This is to facilitate moving
@@ -279,6 +279,50 @@
      */
     jobject (JNICALL *GetComponent)(JNIEnv* env, void* platformInfo);
 
+    /**
+     * Since 9
+     * Creates a java.awt.Frame placed in a native container. Container is
+     * referenced by the native platform handle. For example on Windows this
+     * corresponds to an HWND. For other platforms, see the appropriate
+     * machine-dependent header file for a description. The reference returned
+     * by this function is a local reference that is only valid in this
+     * environment. This function returns a NULL reference if no frame could be
+     * created with matching platform information.
+     */
+    jobject (JNICALL *CreateEmbeddedFrame) (JNIEnv *env, void* platformInfo);
+
+    /**
+     * Since 9
+     * Moves and resizes the embedded frame. The new location of the top-left
+     * corner is specified by x and y parameters relative to the native parent
+     * component. The new size is specified by width and height.
+     *
+     * The embedded frame should be created by CreateEmbeddedFrame() method, or
+     * this function will not have any effect.
+     *
+     * java.awt.Component.setLocation() and java.awt.Component.setBounds() for
+     * EmbeddedFrame really don't move it within the native parent. These
+     * methods always locate the embedded frame at (0, 0) for backward
+     * compatibility. To allow moving embedded frames this method was
+     * introduced, and it works just the same way as setLocation() and
+     * setBounds() for usual, non-embedded components.
+     *
+     * Using usual get/setLocation() and get/setBounds() together with this new
+     * method is not recommended.
+     */
+    void (JNICALL *SetBounds) (JNIEnv *env, jobject embeddedFrame,
+            jint x, jint y, jint w, jint h);
+    /**
+     * Since 9
+     * Synthesize a native message to activate or deactivate an EmbeddedFrame
+     * window depending on the value of parameter doActivate, if "true"
+     * activates the window; otherwise, deactivates the window.
+     *
+     * The embedded frame should be created by CreateEmbeddedFrame() method, or
+     * this function will not have any effect.
+     */
+    void (JNICALL *SynthesizeWindowActivation) (JNIEnv *env,
+            jobject embeddedFrame, jboolean doActivate);
 } JAWT;
 
 /*
@@ -291,6 +335,7 @@
 #define JAWT_VERSION_1_3 0x00010003
 #define JAWT_VERSION_1_4 0x00010004
 #define JAWT_VERSION_1_7 0x00010007
+#define JAWT_VERSION_9 0x00090000
 
 #ifdef __cplusplus
 } /* extern "C" */
diff --git a/jdk/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c b/jdk/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c
index 472b5ee..15c705a 100644
--- a/jdk/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c
+++ b/jdk/src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -772,6 +772,7 @@
     mlib_image *src;
     mlib_image *dst;
     int i;
+    int j = 0;
     int retStatus = 1;
     mlib_status status;
     double *matrix;
@@ -824,6 +825,15 @@
         return 0;
     }
 
+    /* Check for invalid double value in transformation matrix */
+    for (j = 0; j < 6; j++) {
+
+        if (!(IS_FINITE(matrix[j]))) {
+            (*env)->ReleasePrimitiveArrayCritical(env, jmatrix, matrix, JNI_ABORT);
+            return 0;
+        }
+    }
+
     if (s_printIt) {
         printf("matrix is %g %g %g %g %g %g\n", matrix[0], matrix[1],
                matrix[2], matrix[3], matrix[4], matrix[5]);
@@ -980,6 +990,7 @@
     mlib_image *src;
     mlib_image *dst;
     int i;
+    int j = 0;
     int retStatus = 1;
     mlib_status status;
     double *matrix;
@@ -1044,6 +1055,18 @@
         return 0;
     }
 
+    /* Check for invalid double value in transformation matrix */
+    for (j = 0; j < 6; j++) {
+
+        if (!(IS_FINITE(matrix[j]))) {
+            (*env)->ReleasePrimitiveArrayCritical(env, jmatrix, matrix, JNI_ABORT);
+            free(srcRasterP);
+            free(dstRasterP);
+
+            return 0;
+        }
+    }
+
     if (s_printIt) {
         printf("matrix is %g %g %g %g %g %g\n", matrix[0], matrix[1],
                matrix[2], matrix[3], matrix[4], matrix[5]);
diff --git a/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c b/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c
index 485c42a..d8de3e3 100644
--- a/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c
+++ b/jdk/src/java.desktop/share/native/libfontmanager/HBShaper.c
@@ -72,12 +72,13 @@
 int storeGVData(JNIEnv* env,
                jobject gvdata, jint slot, jint baseIndex, jobject startPt,
                int glyphCount, hb_glyph_info_t *glyphInfo,
-               hb_glyph_position_t *glyphPos, hb_direction_t direction) {
+               hb_glyph_position_t *glyphPos, hb_direction_t direction,
+               float devScale) {
 
     int i;
     float x=0, y=0;
     float startX, startY;
-    float scale = 1.0f/64.0f;
+    float scale = 1.0f/64.0f/devScale;
     unsigned int* glyphs;
     float* positions;
     int initialCount, glyphArrayLen, posArrayLen, maxGlyphs, storeadv;
@@ -216,7 +217,11 @@
     fi->ptSize = ptSize;
     fi->xPtSize = euclidianDistance(fi->matrix[0], fi->matrix[1]);
     fi->yPtSize = euclidianDistance(fi->matrix[2], fi->matrix[3]);
-
+    if (!aat && (getenv("HB_NODEVTX") != NULL)) {
+        fi->devScale = fi->xPtSize / fi->ptSize;
+    } else {
+        fi->devScale = 1.0f;
+    }
     return fi;
 }
 
@@ -309,7 +314,8 @@
      // by calling code.
 
      storeGVData(env, gvdata, slot, baseIndex, startPt,
-                 glyphCount, glyphInfo, glyphPos, direction);
+                 glyphCount, glyphInfo, glyphPos, direction,
+                 jdkFontInfo->devScale);
 
      hb_buffer_destroy (buffer);
      hb_font_destroy(hbfont);
diff --git a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
index 1727bb8..93ac190 100644
--- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
+++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk-font.cc
@@ -81,6 +81,7 @@
         return 0;
     }
     fadv = env->GetFloatField(pt, sunFontIDs.xFID);
+    fadv *= jdkFontInfo->devScale;
     env->DeleteLocalRef(pt);
 
     return FloatToF26Dot6(fadv); // should this round ?
@@ -324,8 +325,8 @@
                        _hb_jdk_get_font_funcs (),
                        jdkFontInfo, (hb_destroy_func_t) _do_nothing);
     hb_font_set_scale (font,
-                      FloatToF26Dot6(jdkFontInfo->xPtSize),
-                      FloatToF26Dot6(jdkFontInfo->yPtSize));
+                      FloatToF26Dot6(jdkFontInfo->ptSize*jdkFontInfo->devScale),
+                      FloatToF26Dot6(jdkFontInfo->ptSize*jdkFontInfo->devScale));
   return font;
 }
 
diff --git a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h
index c17ea12..1cd8d5b 100644
--- a/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h
+++ b/jdk/src/java.desktop/share/native/libfontmanager/hb-jdk.h
@@ -43,6 +43,7 @@
     float ptSize;
     float xPtSize;
     float yPtSize;
+    float devScale; // How much applying the full glyph tx scales x distance.
     jboolean aat;
 } JDKFontInfo;
 
diff --git a/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c b/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c
index 34c2171..e151de7 100644
--- a/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c
+++ b/jdk/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,8 @@
 #include "mlib_image.h"
 #include "mlib_SysMath.h"
 #include "mlib_ImageAffine.h"
+#include "safe_math.h"
+
 
 /***************************************************************/
 mlib_status mlib_AffineEdges(mlib_affine_param *param,
@@ -83,6 +85,12 @@
   dstYStride = mlib_ImageGetStride(dst);
   paddings = mlib_ImageGetPaddings(src);
 
+  /* All the transformation matrix parameters should be finite. if not, return failure */
+  if (!(IS_FINITE(a) && IS_FINITE(b) && IS_FINITE(c) && IS_FINITE(d) &&
+        IS_FINITE(tx) && IS_FINITE(ty))) {
+    return MLIB_FAILURE;
+  }
+
   if (srcWidth >= (1 << 15) || srcHeight >= (1 << 15)) {
     return MLIB_FAILURE;
   }
@@ -288,6 +296,10 @@
     if (dY1 == dY2)
       continue;
 
+    if (!(IS_FINITE(slope))) {
+      continue;
+    }
+
     if (dY1 < 0.0)
       y1 = 0;
     else {
@@ -328,6 +340,10 @@
     if (dY1 == dY2)
       continue;
 
+    if (!(IS_FINITE(slope))) {
+      continue;
+    }
+
     if (dY1 < 0.0)
       y1 = 0;
     else {
diff --git a/jdk/src/java.desktop/share/native/libmlib_image/safe_math.h b/jdk/src/java.desktop/share/native/libmlib_image/safe_math.h
index 34c1fc5..a87eba1 100644
--- a/jdk/src/java.desktop/share/native/libmlib_image/safe_math.h
+++ b/jdk/src/java.desktop/share/native/libmlib_image/safe_math.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,10 +26,15 @@
 #ifndef __SAFE_MATH_H__
 #define __SAFE_MATH_H__
 
+#include "mlib_types.h"
+
 #define SAFE_TO_MULT(a, b) \
     (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b)))
 
 #define SAFE_TO_ADD(a, b) \
     (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b)))
 
+#define IS_FINITE(a) \
+    (((a) >= MLIB_D64_MIN) && ((a) <= MLIB_D64_MAX))
+
 #endif // __SAFE_MATH_H__
diff --git a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
index 2d3d882..1c1b217 100644
--- a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c
@@ -114,7 +114,7 @@
     GifFile->SavedImages = NULL;
     GifFile->SColorMap = NULL;
 
-    Private = (GifFilePrivateType *)malloc(sizeof(GifFilePrivateType));
+    Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
     if (Private == NULL) {
         if (Error != NULL)
             *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
@@ -122,6 +122,9 @@
         free((char *)GifFile);
         return NULL;
     }
+
+    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
+
 #ifdef _WIN32
     _setmode(FileHandle, O_BINARY);    /* Make sure it is in binary mode. */
 #endif /* _WIN32 */
@@ -197,13 +200,14 @@
     GifFile->SavedImages = NULL;
     GifFile->SColorMap = NULL;
 
-    Private = (GifFilePrivateType *)malloc(sizeof(GifFilePrivateType));
+    Private = (GifFilePrivateType *)calloc(1, sizeof(GifFilePrivateType));
     if (!Private) {
         if (Error != NULL)
             *Error = D_GIF_ERR_NOT_ENOUGH_MEM;
         free((char *)GifFile);
         return NULL;
     }
+    /*@i1@*/memset(Private, '\0', sizeof(GifFilePrivateType));
 
     GifFile->Private = (void *)Private;
     Private->FileHandle = 0;
@@ -417,8 +421,8 @@
 
     if (GifFile->SavedImages) {
         SavedImage* new_saved_images =
-            (SavedImage *)realloc(GifFile->SavedImages,
-                            sizeof(SavedImage) * (GifFile->ImageCount + 1));
+            (SavedImage *)reallocarray(GifFile->SavedImages,
+                            (GifFile->ImageCount + 1), sizeof(SavedImage));
         if (new_saved_images == NULL) {
             GifFile->Error = D_GIF_ERR_NOT_ENOUGH_MEM;
             return GIF_ERROR;
@@ -788,6 +792,12 @@
     }
     BitsPerPixel = CodeSize;
 
+    /* this can only happen on a severely malformed GIF */
+    if (BitsPerPixel > 8) {
+        GifFile->Error = D_GIF_ERR_READ_FAILED;    /* somewhat bogus error code */
+        return GIF_ERROR;    /* Failed to read Code size. */
+    }
+
     Private->Buf[0] = 0;    /* Input Buffer empty. */
     Private->BitsPerPixel = BitsPerPixel;
     Private->ClearCode = (1 << BitsPerPixel);
@@ -1123,7 +1133,7 @@
               if (ImageSize > (SIZE_MAX / sizeof(GifPixelType))) {
                   return GIF_ERROR;
               }
-              sp->RasterBits = (unsigned char *)malloc(ImageSize *
+              sp->RasterBits = (unsigned char *)reallocarray(NULL, ImageSize,
                       sizeof(GifPixelType));
 
               if (sp->RasterBits == NULL) {
diff --git a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
index aa35636..e8d7090 100644
--- a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h
@@ -37,7 +37,7 @@
 
 #define GIFLIB_MAJOR 5
 #define GIFLIB_MINOR 1
-#define GIFLIB_RELEASE 1
+#define GIFLIB_RELEASE 4
 
 #define GIF_ERROR   0
 #define GIF_OK      1
@@ -274,6 +274,9 @@
                                      GifPixelType ColorTransIn2[]);
 extern int GifBitSize(int n);
 
+extern void * reallocarray(void *optr, size_t nmemb, size_t size);
+
+
 /******************************************************************************
  Support for the in-core structures allocation (slurp mode).
 ******************************************************************************/
diff --git a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
index f7a6a3d..cc784d1 100644
--- a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c
@@ -212,8 +212,8 @@
 
         /* perhaps we can shrink the map? */
         if (RoundUpTo < ColorUnion->ColorCount) {
-            GifColorType *new_map = (GifColorType *)realloc(Map,
-                                 sizeof(GifColorType) * RoundUpTo);
+            GifColorType *new_map = (GifColorType *)reallocarray(Map,
+                                 RoundUpTo, sizeof(GifColorType));
             if( new_map == NULL ) {
                 GifFreeMapObject(ColorUnion);
                 return ((ColorMapObject *) NULL);
@@ -256,9 +256,9 @@
     if (*ExtensionBlocks == NULL)
         *ExtensionBlocks=(ExtensionBlock *)malloc(sizeof(ExtensionBlock));
     else {
-        ExtensionBlock* ep_new = (ExtensionBlock *)realloc(*ExtensionBlocks,
-                                      sizeof(ExtensionBlock) *
-                                      (*ExtensionBlockCount + 1));
+        ExtensionBlock* ep_new = (ExtensionBlock *)reallocarray
+                                      (*ExtensionBlocks, (*ExtensionBlockCount + 1),
+                                      sizeof(ExtensionBlock));
         if( ep_new == NULL )
             return (GIF_ERROR);
         *ExtensionBlocks = ep_new;
@@ -349,8 +349,8 @@
     if (GifFile->SavedImages == NULL)
         GifFile->SavedImages = (SavedImage *)malloc(sizeof(SavedImage));
     else
-        GifFile->SavedImages = (SavedImage *)realloc(GifFile->SavedImages,
-                               sizeof(SavedImage) * (GifFile->ImageCount + 1));
+        GifFile->SavedImages = (SavedImage *)reallocarray(GifFile->SavedImages,
+                               (GifFile->ImageCount + 1), sizeof(SavedImage));
 
     if (GifFile->SavedImages == NULL)
         return ((SavedImage *)NULL);
@@ -379,9 +379,10 @@
             }
 
             /* next, the raster */
-            sp->RasterBits = (unsigned char *)malloc(sizeof(GifPixelType) *
-                                                   CopyFrom->ImageDesc.Height *
-                                                   CopyFrom->ImageDesc.Width);
+            sp->RasterBits = (unsigned char *)reallocarray(NULL,
+                                                  (CopyFrom->ImageDesc.Height *
+                                                  CopyFrom->ImageDesc.Width),
+                                                  sizeof(GifPixelType));
             if (sp->RasterBits == NULL) {
                 FreeLastSavedImage(GifFile);
                 return (SavedImage *)(NULL);
@@ -392,9 +393,9 @@
 
             /* finally, the extension blocks */
             if (sp->ExtensionBlocks != NULL) {
-                sp->ExtensionBlocks = (ExtensionBlock *)malloc(
-                                      sizeof(ExtensionBlock) *
-                                      CopyFrom->ExtensionBlockCount);
+                sp->ExtensionBlocks = (ExtensionBlock *)reallocarray(NULL,
+                                      CopyFrom->ExtensionBlockCount,
+                                      sizeof(ExtensionBlock));
                 if (sp->ExtensionBlocks == NULL) {
                     FreeLastSavedImage(GifFile);
                     return (SavedImage *)(NULL);
diff --git a/jdk/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c
new file mode 100644
index 0000000..1087671
--- /dev/null
+++ b/jdk/src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+/*    $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $    */
+/*
+ * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/types.h>
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/*
+ * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
+ * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
+ */
+#define MUL_NO_OVERFLOW    ((size_t)1 << (sizeof(size_t) * 4))
+
+void *
+reallocarray(void *optr, size_t nmemb, size_t size)
+{
+    if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) &&
+        nmemb > 0 && SIZE_MAX / nmemb < size) {
+        errno = ENOMEM;
+        return NULL;
+    }
+    /*
+     * Head off variations in realloc behavior on different
+     * platforms (reported by MarkR <mrogers6@users.sf.net>)
+     *
+     * The behaviour of reallocarray is implementation-defined if
+     * nmemb or size is zero. It can return NULL or non-NULL
+     * depending on the platform.
+     * https://www.securecoding.cert.org/confluence/display/c/MEM04-C.Beware+of+zero-lengthallocations
+     *
+     * Here are some extracts from realloc man pages on different platforms.
+     *
+     * void realloc( void memblock, size_t size );
+     *
+     * Windows:
+     *
+     * If there is not enough available memory to expand the block
+     * to the given size, the original block is left unchanged,
+     * and NULL is returned.  If size is zero, then the block
+     * pointed to by memblock is freed; the return value is NULL,
+     * and memblock is left pointing at a freed block.
+     *
+     * OpenBSD:
+     *
+     * If size or nmemb is equal to 0, a unique pointer to an
+     * access protected, zero sized object is returned. Access via
+     * this pointer will generate a SIGSEGV exception.
+     *
+     * Linux:
+     *
+     * If size was equal to 0, either NULL or a pointer suitable
+     * to be passed to free() is returned.
+     *
+     * OS X:
+     *
+     * If size is zero and ptr is not NULL, a new, minimum sized
+     * object is allocated and the original object is freed.
+     *
+     * It looks like images with zero width or height can trigger
+     * this, and fuzzing behaviour will differ by platform, so
+     * fuzzing on one platform may not detect zero-size allocation
+     * problems on other platforms.
+     */
+    if (size == 0 || nmemb == 0)
+        return NULL;
+    return realloc(optr, size * nmemb);
+}
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java
index c65a7c7..846e06b 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XComponentPeer.java
@@ -57,8 +57,6 @@
 import java.awt.image.VolatileImage;
 import java.awt.peer.ComponentPeer;
 import java.awt.peer.ContainerPeer;
-import java.lang.reflect.*;
-import java.security.*;
 import java.util.Collection;
 import java.util.Objects;
 import java.util.Set;
@@ -241,46 +239,8 @@
         return false;
     }
 
-    private static Class<?> seClass;
-    private static Constructor<?> seCtor;
-
     static final AWTEvent wrapInSequenced(AWTEvent event) {
-        try {
-            if (seClass == null) {
-                seClass = Class.forName("java.awt.SequencedEvent");
-            }
-
-            if (seCtor == null) {
-                seCtor = AccessController.doPrivileged(new
-                    PrivilegedExceptionAction<Constructor<?>>() {
-                        public Constructor<?> run() throws Exception {
-                            Constructor<?> ctor = seClass.getConstructor(
-                                new Class<?>[] { AWTEvent.class });
-                            ctor.setAccessible(true);
-                            return ctor;
-                        }
-                    });
-            }
-
-            return (AWTEvent) seCtor.newInstance(new Object[] { event });
-        }
-        catch (ClassNotFoundException e) {
-            throw new NoClassDefFoundError("java.awt.SequencedEvent.");
-        }
-        catch (PrivilegedActionException ex) {
-            throw new NoClassDefFoundError("java.awt.SequencedEvent.");
-        }
-        catch (InstantiationException e) {
-            assert false;
-        }
-        catch (IllegalAccessException e) {
-            assert false;
-        }
-        catch (InvocationTargetException e) {
-            assert false;
-        }
-
-        return null;
+        return AWTAccessor.getSequencedEventAccessor().create(event);
     }
 
     // TODO: consider moving it to KeyboardFocusManagerPeerImpl
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java
index 4422e7a..e457c43 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XMouseDragGestureRecognizer.java
@@ -36,10 +36,6 @@
 
 import java.awt.event.InputEvent;
 import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-import java.awt.event.MouseMotionListener;
-
-import java.lang.reflect.*;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
 
diff --git a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
index 907446a..0c5cc36 100644
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11/XWindow.java
@@ -32,8 +32,6 @@
 
 import java.lang.ref.WeakReference;
 
-import java.lang.reflect.Method;
-
 import sun.awt.AWTAccessor.ComponentAccessor;
 import sun.util.logging.PlatformLogger;
 
@@ -395,7 +393,6 @@
         return false;
     }
 
-    static Method m_sendMessage;
     static void sendEvent(final AWTEvent e) {
         // The uses of this method imply that the incoming event is system-generated
         SunToolkit.setSystemGenerated(e);
diff --git a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java
index 7d79243..06b086e 100644
--- a/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java
+++ b/jdk/src/java.desktop/unix/classes/sun/print/UnixPrintJob.java
@@ -41,14 +41,12 @@
 import java.io.PrintWriter;
 import java.io.Reader;
 import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
 import java.nio.file.Files;
 import java.util.Vector;
 
 import javax.print.CancelablePrintJob;
 import javax.print.Doc;
 import javax.print.DocFlavor;
-import javax.print.DocPrintJob;
 import javax.print.PrintService;
 import javax.print.PrintException;
 import javax.print.event.PrintJobEvent;
@@ -56,7 +54,6 @@
 import javax.print.event.PrintJobAttributeListener;
 
 import javax.print.attribute.Attribute;
-import javax.print.attribute.AttributeSet;
 import javax.print.attribute.AttributeSetUtilities;
 import javax.print.attribute.DocAttributeSet;
 import javax.print.attribute.HashPrintJobAttributeSet;
@@ -65,7 +62,6 @@
 import javax.print.attribute.PrintJobAttributeSet;
 import javax.print.attribute.PrintRequestAttribute;
 import javax.print.attribute.PrintRequestAttributeSet;
-import javax.print.attribute.PrintServiceAttributeSet;
 import javax.print.attribute.standard.Copies;
 import javax.print.attribute.standard.Destination;
 import javax.print.attribute.standard.DocumentName;
@@ -77,13 +73,17 @@
 import javax.print.attribute.standard.MediaSize;
 import javax.print.attribute.standard.MediaSizeName;
 import javax.print.attribute.standard.OrientationRequested;
-import javax.print.attribute.standard.PrinterName;
 import javax.print.attribute.standard.RequestingUserName;
 import javax.print.attribute.standard.NumberUp;
 import javax.print.attribute.standard.Sides;
 import javax.print.attribute.standard.PrinterIsAcceptingJobs;
 
-import java.awt.print.*;
+import java.awt.print.PageFormat;
+import java.awt.print.PrinterJob;
+import java.awt.print.Pageable;
+import java.awt.print.Paper;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
 
 
 
@@ -370,7 +370,7 @@
                  customTray instanceof CustomMediaTray) {
                  String choice = customTray.getChoiceName();
                  if (choice != null) {
-                     mOptions += " media="+choice;
+                     mOptions += " InputSlot="+choice;
                  }
              }
 
diff --git a/jdk/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h b/jdk/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h
index bb59b46..bdc9830 100644
--- a/jdk/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h
+++ b/jdk/src/java.desktop/unix/native/common/awt/awt_DrawingSurface.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
 
 #include <jawt.h>
 #include <jni.h>
-#include <jni_util.h>
 
 _JNI_IMPORT_OR_EXPORT_ JAWT_DrawingSurface* JNICALL
     awt_GetDrawingSurface(JNIEnv* env, jobject target);
@@ -45,4 +44,14 @@
 _JNI_IMPORT_OR_EXPORT_ jobject JNICALL
     awt_GetComponent(JNIEnv* env, void* platformInfo);
 
+_JNI_IMPORT_OR_EXPORT_ jobject JNICALL
+    awt_CreateEmbeddedFrame(JNIEnv* env, void* platformInfo);
+
+_JNI_IMPORT_OR_EXPORT_ void JNICALL
+    awt_SetBounds(JNIEnv *env, jobject embeddedFrame, jint x, jint y,
+                  jint w, jint h);
+
+_JNI_IMPORT_OR_EXPORT_ void JNICALL
+    awt_SynthesizeWindowActivation(JNIEnv *env, jobject embeddedFrame,
+                                   jboolean doActivate);
 #endif /* !_AWT_DRAWING_SURFACE_H_ */
diff --git a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c
index de7e848..1cc09c9 100644
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_DrawingSurface.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -383,3 +383,48 @@
 
     return target;
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/awt/X11/XEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = (*env)->GetMethodID(env, cls, "<init>", "(JZ)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return (*env)->NewObject(env, cls, mid, platformInfo, JNI_TRUE);
+}
+
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = (*env)->FindClass(env, embeddedClassName);
+        CHECK_NULL(cls);
+        mid = (*env)->GetMethodID(env, cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    (*env)->CallVoidMethod(env, embeddedFrame, mid, doActivate);
+}
diff --git a/jdk/src/java.desktop/unix/native/libjawt/jawt.c b/jdk/src/java.desktop/unix/native/libjawt/jawt.c
index b6a5240..59e9a55 100644
--- a/jdk/src/java.desktop/unix/native/libjawt/jawt.c
+++ b/jdk/src/java.desktop/unix/native/libjawt/jawt.c
@@ -45,7 +45,8 @@
 
     if (awt->version != JAWT_VERSION_1_3
         && awt->version != JAWT_VERSION_1_4
-        && awt->version != JAWT_VERSION_1_7) {
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9) {
         return JNI_FALSE;
     }
 
@@ -55,6 +56,11 @@
         awt->Lock = awt_Lock;
         awt->Unlock = awt_Unlock;
         awt->GetComponent = awt_GetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp
index 0554967..019295a 100644
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -272,3 +272,47 @@
 {
     // Do nothing on Windows
 }
+
+// EmbeddedFrame support
+
+static char *const embeddedClassName = "sun/awt/windows/WEmbeddedFrame";
+
+JNIEXPORT jobject JNICALL awt_CreateEmbeddedFrame
+(JNIEnv* env, void* platformInfo)
+{
+    static jmethodID mid = NULL;
+    static jclass cls;
+    if (mid == NULL) {
+        cls = env->FindClass(embeddedClassName);
+        CHECK_NULL_RETURN(cls, NULL);
+        mid = env->GetMethodID(cls, "<init>", "(J)V");
+        CHECK_NULL_RETURN(mid, NULL);
+    }
+    return env->NewObject(cls, mid, platformInfo);
+}
+
+JNIEXPORT void JNICALL awt_SetBounds
+(JNIEnv *env, jobject embeddedFrame, jint x, jint y, jint w, jint h)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = env->FindClass(embeddedClassName);
+        CHECK_NULL(cls);
+        mid = env->GetMethodID(cls, "setBoundsPrivate", "(IIII)V");
+        CHECK_NULL(mid);
+    }
+    env->CallVoidMethod(embeddedFrame, mid, x, y, w, h);
+}
+
+JNIEXPORT void JNICALL awt_SynthesizeWindowActivation
+(JNIEnv *env, jobject embeddedFrame, jboolean doActivate)
+{
+    static jmethodID mid = NULL;
+    if (mid == NULL) {
+        jclass cls = env->FindClass(embeddedClassName);
+        CHECK_NULL(cls);
+        mid = env->GetMethodID(cls, "synthesizeWindowActivation", "(Z)V");
+        CHECK_NULL(mid);
+    }
+    env->CallVoidMethod(embeddedFrame, mid, doActivate);
+}
diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h b/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h
index cd135b9..a2a5107 100644
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_DrawingSurface.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -162,6 +162,16 @@
     jobject JNICALL DSGetComponent(
         JNIEnv* env, void* platformInfo);
 
+    _JNI_IMPORT_OR_EXPORT_ jobject JNICALL
+        awt_CreateEmbeddedFrame(JNIEnv* env, void* platformInfo);
+
+    _JNI_IMPORT_OR_EXPORT_ void JNICALL
+        awt_SetBounds(JNIEnv *env, jobject embeddedFrame, jint x,
+                      jint y, jint w, jint h);
+
+    _JNI_IMPORT_OR_EXPORT_ void JNICALL
+        awt_SynthesizeWindowActivation(JNIEnv *env, jobject embeddedFrame,
+                                       jboolean doActivate);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
diff --git a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
index 6c36d17..6f75291 100644
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_PrintControl.cpp
@@ -1132,7 +1132,7 @@
 
     if (dwRet != IDOK)  {
         /* if failure, cleanup and return failure */
-        GlobalFree(pDevMode);
+        GlobalFree(*pDevMode);
         *pDevMode = NULL;
         return FALSE;
     }
diff --git a/jdk/src/java.desktop/windows/native/libjawt/jawt.cpp b/jdk/src/java.desktop/windows/native/libjawt/jawt.cpp
index 218b7dd..1393dfc 100644
--- a/jdk/src/java.desktop/windows/native/libjawt/jawt.cpp
+++ b/jdk/src/java.desktop/windows/native/libjawt/jawt.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,9 @@
     }
 
     if (awt->version != JAWT_VERSION_1_3
-        && awt->version != JAWT_VERSION_1_4) {
+        && awt->version != JAWT_VERSION_1_4
+        && awt->version != JAWT_VERSION_1_7
+        && awt->version != JAWT_VERSION_9) {
         return JNI_FALSE;
     }
 
@@ -56,6 +58,11 @@
         awt->Lock = DSLockAWT;
         awt->Unlock = DSUnlockAWT;
         awt->GetComponent = DSGetComponent;
+        if (awt->version >= JAWT_VERSION_9) {
+            awt->CreateEmbeddedFrame = awt_CreateEmbeddedFrame;
+            awt->SetBounds = awt_SetBounds;
+            awt->SynthesizeWindowActivation = awt_SynthesizeWindowActivation;
+        }
     }
 
     return JNI_TRUE;
diff --git a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java
index cbf32ee..93a5c7c 100644
--- a/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java
+++ b/jdk/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,7 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.WeakHashMap;
 import java.util.stream.Collectors;
@@ -1851,8 +1852,11 @@
     private static final class ObjectInputStreamWithLoader
             extends ObjectInputStream {
         ObjectInputStreamWithLoader(InputStream in, ClassLoader cl)
-        throws IOException {
+        throws IOException, IllegalArgumentException {
             super(in);
+            if (cl == null ) {
+              throw new IllegalArgumentException("class loader is null");
+            }
             this.loader = cl;
         }
 
@@ -1861,7 +1865,7 @@
                 throws IOException, ClassNotFoundException {
             String name = classDesc.getName();
             ReflectUtil.checkPackageAccess(name);
-            return Class.forName(name, false, loader);
+            return Class.forName(name, false, Objects.requireNonNull(loader));
         }
 
         private final ClassLoader loader;
diff --git a/jdk/src/java.management/share/classes/module-info.java b/jdk/src/java.management/share/classes/module-info.java
index 6772da9..54ccb16 100644
--- a/jdk/src/java.management/share/classes/module-info.java
+++ b/jdk/src/java.management/share/classes/module-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,6 +50,7 @@
     uses javax.management.remote.JMXConnectorProvider;
     uses javax.management.remote.JMXConnectorServerProvider;
     uses sun.management.spi.PlatformMBeanProvider;
+    uses sun.management.spi.AgentProvider;
 
     provides javax.security.auth.spi.LoginModule
         with com.sun.jmx.remote.security.FileLoginModule;
diff --git a/jdk/src/java.management/share/classes/sun/management/Agent.java b/jdk/src/java.management/share/classes/sun/management/Agent.java
index be68601..fbc8043 100644
--- a/jdk/src/java.management/share/classes/sun/management/Agent.java
+++ b/jdk/src/java.management/share/classes/sun/management/Agent.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,17 +31,19 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.management.ManagementFactory;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.MalformedURLException;
 import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.Properties;
 import java.util.ResourceBundle;
+import java.util.ServiceLoader;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
@@ -53,6 +55,7 @@
 import sun.management.jdp.JdpController;
 import sun.management.jdp.JdpException;
 import jdk.internal.vm.VMSupport;
+import sun.management.spi.AgentProvider;
 
 /**
  * This Agent is started by the VM when -Dcom.sun.management.snmp or
@@ -248,8 +251,8 @@
             "com.sun.management.enableThreadContentionMonitoring";
     private static final String LOCAL_CONNECTOR_ADDRESS_PROP =
             "com.sun.management.jmxremote.localConnectorAddress";
-    private static final String SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME =
-            "sun.management.snmp.AdaptorBootstrap";
+    private static final String SNMP_AGENT_NAME =
+            "SnmpAgent";
 
     private static final String JDP_DEFAULT_ADDRESS = "224.0.23.178";
     private static final int JDP_DEFAULT_PORT = 7095;
@@ -429,7 +432,7 @@
 
         try {
             if (snmpPort != null) {
-                loadSnmpAgent(snmpPort, props);
+                loadSnmpAgent(props);
             }
 
             /*
@@ -554,28 +557,24 @@
         return mgmtProps;
     }
 
-    private static void loadSnmpAgent(String snmpPort, Properties props) {
-        try {
-            // invoke the following through reflection:
-            //     AdaptorBootstrap.initialize(snmpPort, props);
-            final Class<?> adaptorClass =
-                    Class.forName(SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME, true, null);
-            final Method initializeMethod =
-                    adaptorClass.getMethod("initialize",
-                    String.class, Properties.class);
-            initializeMethod.invoke(null, snmpPort, props);
-        } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException x) {
-            // snmp runtime doesn't exist - initialization fails
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT, x);
-        } catch (InvocationTargetException x) {
-            final Throwable cause = x.getCause();
-            if (cause instanceof RuntimeException) {
-                throw (RuntimeException) cause;
-            } else if (cause instanceof Error) {
-                throw (Error) cause;
-            }
-            // should not happen...
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT, cause);
+    private static void loadSnmpAgent(Properties props) {
+        /*
+         * Load the jdk.snmp service
+         */
+        AgentProvider provider = AccessController.doPrivileged(
+            (PrivilegedAction<AgentProvider>) () -> {
+                for(AgentProvider aProvider : ServiceLoader.loadInstalled(AgentProvider.class)) {
+                    if(aProvider.getName().equals(SNMP_AGENT_NAME))
+                        return aProvider;
+                }
+                return null;
+            },  null
+        );
+
+        if (provider != null) {
+            provider.startAgent(props);
+         } else { // snmp runtime doesn't exist - initialization fails
+            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT);
         }
     }
 
diff --git a/jdk/src/java.management/share/classes/sun/management/spi/AgentProvider.java b/jdk/src/java.management/share/classes/sun/management/spi/AgentProvider.java
new file mode 100644
index 0000000..f68343a
--- /dev/null
+++ b/jdk/src/java.management/share/classes/sun/management/spi/AgentProvider.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package sun.management.spi;
+
+import java.util.Properties;
+
+/**
+ * Service interface for management agent
+ */
+public abstract class AgentProvider {
+
+    /**
+     * Instantiates a new AgentProvider.
+     *
+     * @throws SecurityException if the subclass (and calling code) does not
+     * have
+     * {@code RuntimePermission("sun.management.spi.AgentProvider.subclass")}
+     */
+    protected AgentProvider() {
+        this(checkSubclassPermission());
+    }
+
+    private AgentProvider(Void unused) {
+    }
+
+    private static Void checkSubclassPermission() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new RuntimePermission(AgentProvider.class.getName() + ".subclass"));
+        }
+        return null;
+    }
+
+    /**
+     * Gets the name of the agent provider.
+     *
+     * @return name of agent provider
+     */
+    public abstract String getName();
+
+    /**
+     * Initializes and starts the agent.
+     *
+     * @throws IllegalStateException if this agent has already been started.
+     */
+    public abstract void startAgent();
+
+    /**
+     * Initializes and starts the agent at given port and with given properties
+     *
+     * @param props environment variables for agent
+     *
+     * @throws IllegalStateException if this agent has already been started.
+     */
+    public abstract void startAgent(Properties props);
+
+    /**
+     * Checks if agent is started and not terminated.
+     *
+     * @return true if agent is running, false otherwise.
+     */
+    public abstract boolean isActive();
+
+    /**
+     * Stops this agent.
+     *
+     * @throws IllegalStateException if this agent is not started.
+     */
+    public abstract void stopAgent();
+}
diff --git a/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java b/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java
index de1410f..604fac3 100644
--- a/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java
+++ b/jdk/src/java.smartcardio/share/classes/sun/security/smartcardio/TerminalImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -75,10 +75,10 @@
             }
         }
         try {
-            card =  new CardImpl(this, protocol);
+            card = new CardImpl(this, protocol);
             return card;
         } catch (PCSCException e) {
-            if (e.code == SCARD_W_REMOVED_CARD) {
+            if (e.code == SCARD_W_REMOVED_CARD || e.code == SCARD_E_NO_SMARTCARD) {
                 throw new CardNotPresentException("No card present", e);
             } else {
                 throw new CardException("connect() failed", e);
diff --git a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java
index 0981b9c..8054ca8 100644
--- a/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java
+++ b/jdk/src/jdk.attach/aix/classes/sun/tools/attach/VirtualMachineImpl.java
@@ -76,20 +76,29 @@
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
diff --git a/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java
index 2bf3e74..5cc81e9 100644
--- a/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java
+++ b/jdk/src/jdk.attach/linux/classes/sun/tools/attach/VirtualMachineImpl.java
@@ -44,9 +44,6 @@
     // Any changes to this needs to be synchronized with HotSpot.
     private static final String tmpdir = "/tmp";
 
-    // Indicates if this machine uses the old LinuxThreads
-    static boolean isLinuxThreads;
-
     // The patch to the socket file created by the target VM
     String path;
 
@@ -73,44 +70,37 @@
         if (path == null) {
             File f = createAttachFile(pid);
             try {
-                // On LinuxThreads each thread is a process and we don't have the
-                // pid of the VMThread which has SIGQUIT unblocked. To workaround
-                // this we get the pid of the "manager thread" that is created
-                // by the first call to pthread_create. This is parent of all
-                // threads (except the initial thread).
-                if (isLinuxThreads) {
-                    int mpid;
-                    try {
-                        mpid = getLinuxThreadsManager(pid);
-                    } catch (IOException x) {
-                        throw new AttachNotSupportedException(x.getMessage());
-                    }
-                    assert(mpid >= 1);
-                    sendQuitToChildrenOf(mpid);
-                } else {
-                    sendQuitTo(pid);
-                }
+                sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
             }
-        }
+      }
 
         // Check that the file owner/permission to avoid attaching to
         // bogus process
@@ -340,6 +330,5 @@
 
     static {
         System.loadLibrary("attach");
-        isLinuxThreads = isLinuxThreads();
     }
 }
diff --git a/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java
index 0e304d0..9ed1633 100644
--- a/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java
+++ b/jdk/src/jdk.attach/macosx/classes/sun/tools/attach/VirtualMachineImpl.java
@@ -70,26 +70,34 @@
         // Then we attempt to find the socket file again.
         path = findSocketFile(pid);
         if (path == null) {
-            File f = new File(tmpdir, ".attach_pid" + pid);
-            createAttachFile(f.getPath());
+            File f = createAttachFile(pid);
             try {
                 sendQuitTo(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     path = findSocketFile(pid);
-                    i++;
-                } while (i <= retries && path == null);
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && path == null) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sendQuitTo(pid);
+                    }
+                } while (time_spend <= timeout && path == null);
                 if (path == null) {
                     throw new AttachNotSupportedException(
-                        "Unable to open socket file: target process not responding " +
-                        "or HotSpot VM not loaded");
+                        String.format("Unable to open socket file %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
@@ -282,6 +290,12 @@
         write(fd, b, 0, 1);
     }
 
+    private File createAttachFile(int pid) throws IOException {
+        String fn = ".attach_pid" + pid;
+        File f = new File(tmpdir, fn);
+        createAttachFile0(f.getPath());
+        return f;
+    }
 
     //-- native methods
 
@@ -299,7 +313,7 @@
 
     static native void write(int fd, byte buf[], int off, int bufLen) throws IOException;
 
-    static native void createAttachFile(String path);
+    static native void createAttachFile0(String path);
 
     static native String getTempDir();
 
diff --git a/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c b/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c
index 0f75dfe..42c4a25 100644
--- a/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c
+++ b/jdk/src/jdk.attach/macosx/native/libattach/VirtualMachineImpl.c
@@ -270,7 +270,7 @@
  * Method:    createAttachFile
  * Signature: (Ljava.lang.String;)V
  */
-JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile(JNIEnv *env, jclass cls, jstring path)
+JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_createAttachFile0(JNIEnv *env, jclass cls, jstring path)
 {
     const char* _path;
     jboolean isCopy;
diff --git a/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java b/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java
index a5e965e..98d0ddc 100644
--- a/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java
+++ b/jdk/src/jdk.attach/share/classes/sun/tools/attach/HotSpotVirtualMachine.java
@@ -319,7 +319,7 @@
 
     // -- attach timeout support
 
-    private static long defaultAttachTimeout = 5000;
+    private static long defaultAttachTimeout = 10000;
     private volatile long attachTimeout;
 
     /*
diff --git a/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java b/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java
index b93f745..4d0a3bc 100644
--- a/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java
+++ b/jdk/src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java
@@ -71,27 +71,36 @@
         } catch (FileNotFoundException fnf1) {
             File f = createAttachFile(pid);
             try {
-                // kill -QUIT will tickle target VM to check for the
-                // attach file.
                 sigquit(pid);
 
                 // give the target VM time to start the attach mechanism
-                int i = 0;
-                long delay = 200;
-                int retries = (int)(attachTimeout() / delay);
+                final int delay_step = 100;
+                final long timeout = attachTimeout();
+                long time_spend = 0;
+                long delay = 0;
                 do {
+                    // Increase timeout on each attempt to reduce polling
+                    delay += delay_step;
                     try {
                         Thread.sleep(delay);
                     } catch (InterruptedException x) { }
                     try {
                         fd = openDoor(pid);
-                    } catch (FileNotFoundException fnf2) { }
-                    i++;
-                } while (i <= retries && fd == -1);
-                if (fd == -1) {
+                    } catch (FileNotFoundException fnf2) {
+                        // pass
+                    }
+
+                    time_spend += delay;
+                    if (time_spend > timeout/2 && fd == -1) {
+                        // Send QUIT again to give target VM the last chance to react
+                        sigquit(pid);
+                    }
+                } while (time_spend <= timeout && fd == -1);
+                if (fd  == -1) {
                     throw new AttachNotSupportedException(
-                        "Unable to open door: target process not responding or " +
-                        "HotSpot VM not loaded");
+                        String.format("Unable to open door %s: " +
+                          "target process %d doesn't respond within %dms " +
+                          "or HotSpot VM not loaded", f.getPath(), pid, time_spend));
                 }
             } finally {
                 f.delete();
diff --git a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java
index 9b7edac..84341e1 100644
--- a/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java
+++ b/jdk/src/jdk.internal.le/share/classes/jdk/internal/jline/console/ConsoleReader.java
@@ -39,6 +39,7 @@
 //import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.Stack;
+import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import jdk.internal.jline.Terminal;
@@ -2336,6 +2337,33 @@
                 out.flush();
             }
 
+            Stack<Character> pushBackChar = new Stack<Character>();
+
+            if (terminal.isAnsiSupported()) {
+                //detect the prompt length by reading the cursor position from the terminal
+                //the real prompt length could differ from the simple prompt length due to
+                //use of escape sequences:
+                out.write("\033[6n");
+                out.flush();
+                StringBuilder input = new StringBuilder();
+                while (true) {
+                    int read;
+                    while ((read = in.read()) != 'R') {
+                        input.appendCodePoint(read);
+                    }
+                    input.appendCodePoint(read);
+                    Matcher m = CURSOR_COLUMN_PATTERN.matcher(input);
+                    if (m.matches()) {
+                        promptLen = Integer.parseInt(m.group("column")) - 1;
+                        String prefix = m.group("prefix");
+                        for (int i = prefix.length() - 1; i >= 0; i--) {
+                            pushBackChar.push(prefix.charAt(i));
+                        }
+                        break;
+                    }
+                }
+            }
+
             // if the terminal is unsupported, just use plain-java reading
             if (!terminal.isSupported()) {
                 return readLineSimple();
@@ -2352,7 +2380,6 @@
             boolean success = true;
 
             StringBuilder sb = new StringBuilder();
-            Stack<Character> pushBackChar = new Stack<Character>();
             while (true) {
                 int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop ();
                 if (c == -1) {
@@ -3193,6 +3220,9 @@
             }
         }
     }
+    //where:
+        private Pattern CURSOR_COLUMN_PATTERN =
+                Pattern.compile("(?<prefix>.*)\033\\[[0-9]+;(?<column>[0-9]+)R");
 
     /**
      * Read a line for unsupported terminals.
diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java
index df82485..549b6ab 100644
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java
@@ -99,9 +99,13 @@
      * e.g.: /java.base/native/amd64/server/libjvm.so
      * /java.base/native/server/libjvm.dylib
      */
-    private List<ResourcePoolEntry> getVMs(ResourcePoolModule javaBase, String jvmlib) {
+    private List<ResourcePoolEntry> getVMs(ResourcePoolModule javaBase, String[] jvmlibs) {
         List<ResourcePoolEntry> ret = javaBase.entries().filter((t) -> {
-            return t.path().endsWith("/" + jvmlib);
+            String path = t.path();
+            for (String jvmlib : jvmlibs) {
+                return t.path().endsWith("/" + jvmlib);
+            }
+            return false;
         }).collect(Collectors.toList());
         return ret;
     }
@@ -109,18 +113,21 @@
     @Override
     public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) {
         ResourcePoolModule javaBase = in.moduleView().findModule("java.base").get();
-        String jvmlib = jvmlib(javaBase.descriptor().osName().get());
+        String[] jvmlibs = jvmlibs(javaBase.descriptor().osName().get());
         TreeSet<Jvm> existing = new TreeSet<>(new JvmComparator());
         TreeSet<Jvm> removed = new TreeSet<>(new JvmComparator());
         if (!keepAll) {
             // First retrieve all available VM names and removed VM
-            List<ResourcePoolEntry> jvms = getVMs(javaBase, jvmlib);
+            List<ResourcePoolEntry> jvms = getVMs(javaBase, jvmlibs);
             for (Jvm jvm : Jvm.values()) {
                 for (ResourcePoolEntry md : jvms) {
-                    if (md.path().endsWith("/" + jvm.getName() + "/" + jvmlib)) {
-                        existing.add(jvm);
-                        if (isRemoved(md)) {
-                            removed.add(jvm);
+                    String mdPath = md.path();
+                    for (String jvmlib : jvmlibs) {
+                        if (mdPath.endsWith("/" + jvm.getName() + "/" + jvmlib)) {
+                            existing.add(jvm);
+                            if (isRemoved(md)) {
+                                removed.add(jvm);
+                            }
                         }
                     }
                 }
@@ -248,14 +255,14 @@
         return orig.copyWithContent(content);
     }
 
-    private static String jvmlib(String osName) {
-        String lib = "libjvm.so";
+    private static String[] jvmlibs(String osName) {
         if (isWindows(osName)) {
-            lib = "jvm.dll";
+            return new String[] { "jvm.dll" };
         } else if (isMac(osName)) {
-            lib = "libjvm.dylib";
+            return new String[] { "libjvm.dylib", "libjvm.a" };
+        } else {
+            return new String[] { "libjvm.so", "libjvm.a" };
         }
-        return lib;
     }
 
     private static boolean isWindows(String osName) {
diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java
index a60a1e9..1150209 100644
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/GenerateJLIClassesPlugin.java
@@ -29,12 +29,12 @@
 import java.lang.invoke.MethodType;
 import java.nio.file.Files;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import jdk.internal.misc.SharedSecrets;
@@ -69,11 +69,11 @@
     private static final JavaLangInvokeAccess JLIA
             = SharedSecrets.getJavaLangInvokeAccess();
 
-    List<String> speciesTypes;
+    Set<String> speciesTypes;
 
-    List<String> invokerTypes;
+    Set<String> invokerTypes;
 
-    Map<String, List<String>> dmhMethods;
+    Map<String, Set<String>> dmhMethods;
 
     public GenerateJLIClassesPlugin() {
     }
@@ -110,8 +110,8 @@
      * A better long-term solution is to define and run a set of quick
      * generators and extracting this list as a step in the build process.
      */
-    public static List<String> defaultSpecies() {
-        return List.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
+    public static Set<String> defaultSpecies() {
+        return Set.of("LL", "L3", "L4", "L5", "L6", "L7", "L7I",
                 "L7II", "L7IIL", "L8", "L9", "L10", "L10I", "L10II", "L10IIL",
                 "L11", "L12", "L13", "LI", "D", "L3I", "LIL", "LLI", "LLIL",
                 "LILL", "I", "LLILL");
@@ -120,23 +120,23 @@
     /**
      * @return the default invoker forms to generate.
      */
-    private static List<String> defaultInvokers() {
-        return List.of("LL_L", "LL_I", "LILL_I", "L6_L");
+    private static Set<String> defaultInvokers() {
+        return Set.of("LL_L", "LL_I", "LILL_I", "L6_L");
     }
 
     /**
      * @return the list of default DirectMethodHandle methods to generate.
      */
-    private static Map<String, List<String>> defaultDMHMethods() {
+    private static Map<String, Set<String>> defaultDMHMethods() {
         return Map.of(
-            DMH_INVOKE_VIRTUAL, List.of("L_L", "LL_L", "LLI_I", "L3_V"),
-            DMH_INVOKE_SPECIAL, List.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
+            DMH_INVOKE_VIRTUAL, Set.of("L_L", "LL_L", "LLI_I", "L3_V"),
+            DMH_INVOKE_SPECIAL, Set.of("LL_I", "LL_L", "LLF_L", "LLD_L", "L3_L",
                 "L4_L", "L5_L", "L6_L", "L7_L", "L8_L", "LLI_I", "LLI_L",
                 "LLIL_I", "LLII_I", "LLII_L", "L3I_L", "L3I_I", "LLILI_I",
                 "LLIIL_L", "LLIILL_L", "LLIILL_I", "LLIIL_I", "LLILIL_I",
                 "LLILILL_I", "LLILII_I", "LLI3_I", "LLI3L_I", "LLI3LL_I",
                 "LLI3_L", "LLI4_I"),
-            DMH_INVOKE_STATIC, List.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
+            DMH_INVOKE_STATIC, Set.of("LII_I", "LIL_I", "LILIL_I", "LILII_I",
                 "L_I", "L_L", "L_V", "LD_L", "LF_L", "LI_I", "LII_L", "LLI_L",
                 "LL_V", "LL_L", "L3_L", "L4_L", "L5_L", "L6_L", "L7_L",
                 "L8_L", "L9_L", "L10_L", "L10I_L", "L10II_L", "L10IIL_L",
@@ -159,15 +159,48 @@
     public void configure(Map<String, String> config) {
         String mainArgument = config.get(NAME);
 
-        if (mainArgument != null && mainArgument.startsWith("@")) {
+        if ("none".equals(mainArgument)) {
+            speciesTypes = Set.of();
+            invokerTypes = Set.of();
+            dmhMethods = Map.of();
+            return;
+        }
+
+        // Start with the default configuration
+        Set<String> defaultBMHSpecies = defaultSpecies();
+        // Expand BMH species signatures
+        defaultBMHSpecies = defaultBMHSpecies.stream()
+                .map(type -> expandSignature(type))
+                .collect(Collectors.toSet());
+
+        Set<String> defaultInvokerTypes = defaultInvokers();
+        validateMethodTypes(defaultInvokerTypes);
+
+        Map<String, Set<String>> defaultDmhMethods = defaultDMHMethods();
+        for (Set<String> dmhMethodTypes : defaultDmhMethods.values()) {
+            validateMethodTypes(dmhMethodTypes);
+        }
+
+        // Extend the default configuration with the contents in the supplied
+        // input file
+        if (mainArgument == null || !mainArgument.startsWith("@")) {
+            speciesTypes = defaultBMHSpecies;
+            invokerTypes = defaultInvokerTypes;
+            dmhMethods = defaultDmhMethods;
+        } else {
             File file = new File(mainArgument.substring(1));
             if (file.exists()) {
-                speciesTypes = new ArrayList<>();
-                invokerTypes = new ArrayList<>();
-                dmhMethods = new HashMap<>();
-                Stream<String> lines = fileLines(file);
-
-                lines.map(line -> line.split(" "))
+                // Use TreeSet/TreeMap to keep things sorted in a deterministic
+                // order to avoid scrambling the layout on small changes and to
+                // ease finding methods in the generated code
+                speciesTypes = new TreeSet<>(defaultBMHSpecies);
+                invokerTypes = new TreeSet<>(defaultInvokerTypes);
+                dmhMethods = new TreeMap<>();
+                for (Map.Entry<String, Set<String>> entry : defaultDmhMethods.entrySet()) {
+                    dmhMethods.put(entry.getKey(), new TreeSet<>(entry.getValue()));
+                }
+                fileLines(file)
+                    .map(line -> line.split(" "))
                     .forEach(parts -> {
                         switch (parts[0]) {
                             case "[BMH_RESOLVE]":
@@ -191,28 +224,14 @@
                         }
                 });
             }
-        } else {
-            List<String> bmhSpecies = defaultSpecies();
-            // Expand BMH species signatures
-            speciesTypes = bmhSpecies.stream()
-                    .map(type -> expandSignature(type))
-                    .collect(Collectors.toList());
-
-            invokerTypes = defaultInvokers();
-            validateMethodTypes(invokerTypes);
-
-            dmhMethods = defaultDMHMethods();
-            for (List<String> dmhMethodTypes : dmhMethods.values()) {
-                validateMethodTypes(dmhMethodTypes);
-            }
         }
     }
 
     private void addDMHMethodType(String dmh, String methodType) {
         validateMethodType(methodType);
-        List<String> methodTypes = dmhMethods.get(dmh);
+        Set<String> methodTypes = dmhMethods.get(dmh);
         if (methodTypes == null) {
-            methodTypes = new ArrayList<>();
+            methodTypes = new TreeSet<>();
             dmhMethods.put(dmh, methodTypes);
         }
         methodTypes.add(methodType);
@@ -226,7 +245,7 @@
         }
     }
 
-    private void validateMethodTypes(List<String> dmhMethodTypes) {
+    private void validateMethodTypes(Set<String> dmhMethodTypes) {
         for (String type : dmhMethodTypes) {
             validateMethodType(type);
         }
@@ -291,13 +310,13 @@
 
     private void generateHolderClasses(ResourcePoolBuilder out) {
         int count = 0;
-        for (List<String> entry : dmhMethods.values()) {
+        for (Set<String> entry : dmhMethods.values()) {
             count += entry.size();
         }
         MethodType[] directMethodTypes = new MethodType[count];
         int[] dmhTypes = new int[count];
         int index = 0;
-        for (Map.Entry<String, List<String>> entry : dmhMethods.entrySet()) {
+        for (Map.Entry<String, Set<String>> entry : dmhMethods.entrySet()) {
             String dmhType = entry.getKey();
             for (String type : entry.getValue()) {
                 // The DMH type to actually ask for is retrieved by removing
@@ -314,10 +333,11 @@
             }
         }
         MethodType[] invokerMethodTypes = new MethodType[this.invokerTypes.size()];
-        for (int i = 0; i < invokerTypes.size(); i++) {
+        int i = 0;
+        for (String invokerType : invokerTypes) {
             // The invoker type to ask for is retrieved by removing the first
             // and the last argument, which needs to be of Object.class
-            MethodType mt = asMethodType(invokerTypes.get(i));
+            MethodType mt = asMethodType(invokerType);
             final int lastParam = mt.parameterCount() - 1;
             if (mt.parameterCount() < 2 ||
                     mt.parameterType(0) != Object.class ||
@@ -327,6 +347,7 @@
             }
             mt = mt.dropParameterTypes(lastParam, lastParam + 1);
             invokerMethodTypes[i] = mt.dropParameterTypes(0, 1);
+            i++;
         }
         try {
             byte[] bytes = JLIA.generateDirectMethodHandleHolderClassBytes(
diff --git a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties
index 67c4090..1303d57 100644
--- a/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties
+++ b/jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties
@@ -68,12 +68,12 @@
 exclude-resources.description=\
 Specify resources to exclude. e.g.: **.jcov,glob:**/META-INF/**
 
-generate-jli-classes.argument=<@filename>
+generate-jli-classes.argument=<none|@filename>
 
 generate-jli-classes.description=\
 Takes a file hinting to jlink what java.lang.invoke classes to pre-generate. If\n\
-this flag is not specified a default set of classes will be generated, so to \n\
-disable pre-generation supply the name of an empty or non-existing file
+this flag is not specified a default set of classes will be generated. To \n\
+disable pre-generation specify none as the argument
 
 installed-modules.description=Fast loading of module descriptors (always enabled)
 
@@ -139,7 +139,8 @@
 \  --plugin-module-path <modulepath> Custom plugin module path
 
 plugin.opt.c=\
-\  -c, --compress=2                  Enable compression of resources (level 2)
+\  -c, --compress=<0|1|2>            Enable compression of resources\
+\n                                    More details in --list-plugins option
 
 plugin.opt.G=\
 \  -G, --strip-debug                 Strip debug information
diff --git a/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c b/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c
index 8fb337b..b457950 100644
--- a/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c
+++ b/jdk/src/jdk.management/share/native/libmanagement_ext/GcInfoBuilder.c
@@ -87,9 +87,32 @@
     for (i = 0; i < num_attributes; i++) {
         nativeTypes[i] = ext_att_info[i].type;
         attName = (*env)->NewStringUTF(env, ext_att_info[i].name);
-        desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
         (*env)->SetObjectArrayElement(env, attributeNames, i, attName);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
+        desc = (*env)->NewStringUTF(env, ext_att_info[i].description);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
+
         (*env)->SetObjectArrayElement(env, descriptions, i, desc);
+        if ((*env)->ExceptionCheck(env)) {
+           free(ext_att_info);
+           free(nativeTypes);
+           return;
+        }
     }
     (*env)->SetCharArrayRegion(env, types, 0, num_attributes, nativeTypes);
 
diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt
index 2165bef..38f2392 100644
--- a/jdk/test/ProblemList.txt
+++ b/jdk/test/ProblemList.txt
@@ -213,8 +213,6 @@
 
 sun/security/pkcs11/ec/TestKeyFactory.java                      8026976 generic-all
 
-sun/security/krb5/auto/Unreachable.java                         7164518 macosx-all
-
 sun/security/tools/keytool/ListKeychainStore.sh                 8156889 macosx-all
 
 sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java      8026393 generic-all
diff --git a/jdk/test/TEST.groups b/jdk/test/TEST.groups
index be15406..d24280a 100644
--- a/jdk/test/TEST.groups
+++ b/jdk/test/TEST.groups
@@ -189,7 +189,6 @@
     -sun/security/krb5 \
     -sun/security/jgss \
     javax/net \
-    sun/net/www/protocol/https \
     com/sun/net/ssl \
     lib/security
 
diff --git a/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java b/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java
index e062996..b1eacad 100644
--- a/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java
+++ b/jdk/test/com/sun/jdi/SunBootClassPathEmptyTest.java
@@ -32,7 +32,7 @@
  * @summary Verifies that PathSearchingVirtualMachine.bootClassPath()
  *          returns an empty list in case no bootclass path specified
  *          regardless of sun.boot.class.path option, which is now obsolete
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @compile TestClass.java
  * @compile SunBootClassPathEmptyTest.java
  * @run main/othervm SunBootClassPathEmptyTest
diff --git a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java
index 8a2c224..ac8e4f9 100644
--- a/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java
+++ b/jdk/test/com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
  * @bug 6455258
  * @summary Sanity test for com.sun.management.HotSpotDiagnosticMXBean.dumpHeap method
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
diff --git a/jdk/test/java/awt/PrintJob/TestPrintJobFrameAssociation.java b/jdk/test/java/awt/PrintJob/TestPrintJobFrameAssociation.java
new file mode 100644
index 0000000..1dd861c
--- /dev/null
+++ b/jdk/test/java/awt/PrintJob/TestPrintJobFrameAssociation.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 8154218
+ * @summary  Verifies if owner Frame is associated with print dialog
+ * @run main/manual TestPrintJobFrameAssociation
+ */
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.FlowLayout;
+import java.awt.Frame;
+import java.awt.Label;
+import java.awt.Panel;
+import java.awt.JobAttributes;
+import java.awt.PrintJob;
+import java.awt.Toolkit;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
+public class TestPrintJobFrameAssociation {
+    private static Thread mainThread;
+    private static boolean testPassed;
+    private static boolean testGeneratedInterrupt;
+    private static Button print;
+    private static Label dialogName;
+    private static Frame frame;
+    private static boolean start;
+    private static Thread t;
+
+    public static void main(String args[]) throws Exception {
+        SwingUtilities.invokeAndWait(() -> {
+            doTest(TestPrintJobFrameAssociation::frameTest);
+        });
+        mainThread = Thread.currentThread();
+        try {
+            Thread.sleep(60000);
+        } catch (InterruptedException e) {
+            if (!testPassed && testGeneratedInterrupt) {
+                throw new RuntimeException("Print dialog not disposed."
+                        + " Print dialog is not associated with owner Frame`");
+            }
+        }
+        if (!testGeneratedInterrupt) {
+            throw new RuntimeException("user has not executed the test");
+        }
+    }
+
+    private static void frameTest() {
+        Panel panel =new Panel();
+
+        print = new Button("Print");
+        print.setActionCommand("Print");
+        print.addActionListener((e) -> {
+            JobAttributes ja = new JobAttributes();
+            ja.setDialog(JobAttributes.DialogType.COMMON);
+
+            t.start();
+            start = true;
+            PrintJob pjob = Toolkit.getDefaultToolkit().getPrintJob(frame,
+                                                         "Printing Test",
+                                                         ja,null);
+        });
+
+        panel.add(print);
+
+        frame = new Frame("Test Frame");
+        frame.setLayout (new BorderLayout ());
+        frame.add(panel,"South");
+        frame.pack();
+        frame.setVisible(true);
+
+        t = new Thread (() -> {
+            if (start) {
+                try {
+                    Thread.sleep(5000);
+                } catch (InterruptedException ex) {}
+                frame.dispose();
+            }
+        });
+    }
+
+    public static synchronized void pass() {
+        testPassed = true;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    public static synchronized void fail() {
+        testPassed = false;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    private static void doTest(Runnable action) {
+        String description
+                = " A Frame with Print Button is shown. Press Print.\n"
+                + " A cross-platform print dialog will be shown. After 5 secs\n"
+                + " the frame along with this print dialog will be disposed.\n"
+                + " If the print dialog is not disposed, press FAIL else press PASS";
+
+        final JDialog dialog = new JDialog();
+        dialog.setTitle("printSelectionTest");
+        JTextArea textArea = new JTextArea(description);
+        textArea.setEditable(false);
+        final JButton testButton = new JButton("Start Test");
+        final JButton passButton = new JButton("PASS");
+        passButton.setEnabled(false);
+        passButton.addActionListener((e) -> {
+            dialog.dispose();
+            pass();
+        });
+        final JButton failButton = new JButton("FAIL");
+        failButton.setEnabled(false);
+        failButton.addActionListener((e) -> {
+            dialog.dispose();
+            fail();
+        });
+        testButton.addActionListener((e) -> {
+            testButton.setEnabled(false);
+            action.run();
+            passButton.setEnabled(true);
+            failButton.setEnabled(true);
+        });
+        JPanel mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(textArea, BorderLayout.CENTER);
+        JPanel buttonPanel = new JPanel(new FlowLayout());
+        buttonPanel.add(testButton);
+        buttonPanel.add(passButton);
+        buttonPanel.add(failButton);
+        mainPanel.add(buttonPanel, BorderLayout.SOUTH);
+        dialog.add(mainPanel);
+        dialog.pack();
+        dialog.setVisible(true);
+        dialog.addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowClosing(WindowEvent e) {
+                System.out.println("main dialog closing");
+                testGeneratedInterrupt = false;
+                mainThread.interrupt();
+            }
+        });
+
+    }
+}
diff --git a/jdk/test/java/awt/Window/8159168/SetShapeTest.java b/jdk/test/java/awt/Window/8159168/SetShapeTest.java
index 19670a5..9baaea1 100644
--- a/jdk/test/java/awt/Window/8159168/SetShapeTest.java
+++ b/jdk/test/java/awt/Window/8159168/SetShapeTest.java
@@ -1,29 +1,30 @@
 /*
-* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
-* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
-* This code is free software; you can redistribute it and/or modify it
-* under the terms of the GNU General Public License version 2 only, as
-* published by the Free Software Foundation.
-*
-* This code is distributed in the hope that it will be useful, but WITHOUT
-* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-* version 2 for more details (a copy is included in the LICENSE file that
-* accompanied this code).
-*
-* You should have received a copy of the GNU General Public License version
-* 2 along with this work; if not, write to the Free Software Foundation,
-* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-*
-* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-* or visit www.oracle.com if you need additional information or have any
-* questions.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
  */
 
 /**
  * @test
- * @bug 8159168
+ * @key headful
+ * @bug 8159168 8161913
  * @summary [hidpi] Window.setShape() works incorrectly on HiDPI
  * @run main/othervm -Dsun.java2d.uiScale=2 SetShapeTest
  */
@@ -50,6 +51,7 @@
         Rectangle rect = window.getBounds();
         rect.x += rect.width - 10;
         rect.y += rect.height - 10;
+        robot.delay(1000);
         Color c = robot.getPixelColor(rect.x, rect.y);
         try {
             if (!c.equals(Color.RED)) {
diff --git a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java
index 0b6da11..81fdd4b 100644
--- a/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java
+++ b/jdk/test/java/awt/Window/OwnedWindowsLeak/OwnedWindowsLeak.java
@@ -27,16 +27,14 @@
   @bug 6758673
   @summary Tests that windows are removed from owner's child windows list
   @author art: area=awt.toplevel
-  @run main OwnedWindowsLeak
+  @run main/othervm -mx128m OwnedWindowsLeak
 */
 
-import java.awt.*;
-import java.awt.event.*;
-
-import java.lang.ref.*;
-import java.lang.reflect.*;
-
-import java.util.*;
+import java.awt.Frame;
+import java.awt.Window;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
+import java.util.Vector;
 
 public class OwnedWindowsLeak
 {
diff --git a/jdk/test/java/awt/dnd/URLDragTest/DragLinkFromBrowser.java b/jdk/test/java/awt/dnd/URLDragTest/DragLinkFromBrowser.java
new file mode 100644
index 0000000..6eacad3
--- /dev/null
+++ b/jdk/test/java/awt/dnd/URLDragTest/DragLinkFromBrowser.java
@@ -0,0 +1,232 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+ @test
+ @bug 8156099
+ @summary Drag and drop of link from web browser, DataFlavor types
+    application/x-java-url and text/uri-list, getTransferData returns null
+ @run main/manual DragLinkFromBrowser
+ */
+
+import java.awt.Frame;
+import java.awt.Button;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.Color;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.TransferHandler;
+import javax.swing.SwingUtilities;
+import javax.swing.JOptionPane;
+
+public class DragLinkFromBrowser implements ActionListener {
+
+    private static GridBagLayout layout;
+    private static Panel mainControlPanel;
+    private static Panel resultButtonPanel;
+    private static TextArea instructionTextArea;
+    private static Button passButton;
+    private static Button failButton;
+    private static Frame mainFrame;
+    private static Thread mainThread = null;
+    private static volatile boolean testPassed = false;
+    private static volatile boolean isInterrupted = false;
+    private static volatile String failMessage;
+    private static final int testTimeOut = 300000;
+    private static JFrame urlFrame;
+    private static JPanel urlPanel;
+
+    public static void dragLinkFromWebBrowser() {
+
+        SwingUtilities.invokeLater(new Runnable() {
+            @Override
+            public void run() {
+
+                urlFrame = new JFrame();
+                urlPanel = new JPanel();
+                failMessage = "Dragging link from web browser Failed. "
+                            + "getTransferData returns null";
+                urlFrame.getContentPane().add(urlPanel);
+                urlPanel.setTransferHandler(new TransferHandler() {
+                    @Override
+                    public boolean canImport(final TransferSupport support) {
+                        return true;
+                    }
+
+                    @Override
+                    public boolean importData(final TransferSupport support) {
+                        final Transferable transferable =
+                            support.getTransferable();
+                        final DataFlavor[] flavors
+                                = transferable.getTransferDataFlavors();
+
+                        for (final DataFlavor flavor : flavors) {
+                            try {
+                                final Object transferData
+                                        = transferable.getTransferData(flavor);
+
+                                if (transferData == null) {
+                                    JOptionPane.showMessageDialog(urlPanel,
+                                                                failMessage);
+                                    break;
+                                } else {
+                                    String flavorMessage = flavor.toString();
+                                    String transferDataMessage =
+                                        transferData.toString();
+                                    if (flavorMessage.contains("error")
+                                        || transferDataMessage.contains("null")) {
+                                        JOptionPane.showMessageDialog(urlPanel,
+                                                                    failMessage);
+                                        break;
+                                    }
+                                }
+                            } catch (UnsupportedFlavorException e) {
+                                testFailed("UnsupportedFlavorException - "
+                                    + "test Failed");
+                            } catch (IOException e) {
+                                testFailed("IOException - test Failed");
+                            }
+                        }
+
+                        return true;
+                    }
+                });
+
+                urlFrame.setBounds(500, 10, 200, 200);
+                urlFrame.setVisible(true);
+            }
+        });
+    }
+
+    private void createInstructionUI() {
+        mainFrame = new Frame("Drag and drop link from web browser");
+        layout = new GridBagLayout();
+        mainControlPanel = new Panel(layout);
+        resultButtonPanel = new Panel(layout);
+
+        GridBagConstraints gbc = new GridBagConstraints();
+        String instructions
+                = "INSTRUCTIONS:"
+                + "\n   1. Open any browser."
+                + "\n   2. Select and drag URL from the browser page and "
+                + "drop it on the panel"
+                + "\n   3. If test fails, then a popup message will be displayed,"
+                + " click Ok and \n       click Fail button."
+                + "\n   5. Otherwise test passed. Click Pass button.";
+
+        instructionTextArea = new TextArea();
+        instructionTextArea.setText(instructions);
+        instructionTextArea.setEnabled(false);
+        instructionTextArea.setBackground(Color.white);
+
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        gbc.fill = GridBagConstraints.HORIZONTAL;
+        mainControlPanel.add(instructionTextArea, gbc);
+
+        passButton = new Button("Pass");
+        passButton.setName("Pass");
+        passButton.addActionListener(this);
+
+        failButton = new Button("Fail");
+        failButton.setName("Fail");
+        failButton.addActionListener(this);
+
+        gbc.gridx = 0;
+        gbc.gridy = 0;
+        resultButtonPanel.add(passButton, gbc);
+        gbc.gridx = 1;
+        gbc.gridy = 0;
+        resultButtonPanel.add(failButton, gbc);
+        gbc.gridx = 0;
+        gbc.gridy = 1;
+        mainControlPanel.add(resultButtonPanel, gbc);
+
+        mainFrame.add(mainControlPanel);
+        mainFrame.pack();
+        mainFrame.setVisible(true);
+    }
+
+    @Override
+    public void actionPerformed(ActionEvent ae) {
+        if (ae.getSource() instanceof Button) {
+            Button btn = (Button) ae.getSource();
+            switch (btn.getName()) {
+                case "Pass":
+                    testPassed = true;
+                    isInterrupted = true;
+                    mainThread.interrupt();
+                    break;
+
+                case "Fail":
+                    testFailed("Dragging link from web browser Failed");
+                    break;
+            }
+        }
+    }
+
+    public static void cleanUp() {
+        urlFrame.dispose();
+        mainFrame.dispose();
+    }
+
+    public static void testFailed(String message) {
+        testPassed = false;
+        isInterrupted = true;
+        failMessage = message;
+        mainThread.interrupt();
+    }
+
+    public static void main(final String[] args) throws Exception {
+
+        DragLinkFromBrowser linkFromBrowser = new DragLinkFromBrowser();
+        linkFromBrowser.createInstructionUI();
+        linkFromBrowser.dragLinkFromWebBrowser();
+
+        mainThread = Thread.currentThread();
+        try {
+            mainThread.sleep(testTimeOut);
+        } catch (InterruptedException ex) {
+            if (!testPassed) {
+                throw new RuntimeException(failMessage);
+            }
+        } finally {
+            cleanUp();
+        }
+
+        if (!isInterrupted) {
+            throw new RuntimeException("Test Timed out after "
+                    + testTimeOut / 1000 + " seconds");
+        }
+    }
+}
+
diff --git a/jdk/test/java/awt/font/TextLayout/StyledFontLayoutTest.java b/jdk/test/java/awt/font/TextLayout/StyledFontLayoutTest.java
new file mode 100644
index 0000000..8063814
--- /dev/null
+++ b/jdk/test/java/awt/font/TextLayout/StyledFontLayoutTest.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8139176
+ * @summary Test layout uses correct styled font.
+ * @run main StyledFontLayoutTest
+ */
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.font.FontRenderContext;
+import java.awt.font.GlyphVector;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import javax.swing.WindowConstants;
+
+public class StyledFontLayoutTest extends JPanel {
+
+    static final int W=600, H=400;
+    static boolean interactive;
+    static BufferedImage im;
+    public static void main(String[] args) {
+
+        interactive = args.length > 0;
+
+        runTest();
+
+        if (!interactive) {
+            return;
+        }
+        SwingUtilities.invokeLater(() -> {
+            JFrame frame = new JFrame("Styled Font Layout Test");
+            frame.add(new StyledFontLayoutTest());
+            frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+            frame.setSize(W, H);
+            frame.setLocationRelativeTo(null);
+            frame.setVisible(true);
+        });
+    }
+
+    @Override
+    protected void paintComponent(Graphics g) {
+        g.drawImage(im, 0, 0, null);
+    }
+
+    private static void runTest() {
+        im = new BufferedImage(W, H, BufferedImage.TYPE_INT_RGB);
+        Graphics2D g2d = im.createGraphics();
+        g2d.setColor(Color.white);
+        g2d.fillRect(0, 0, W, H);
+        g2d.setColor(Color.black);
+        g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+                             RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
+        char[] chs = "Sample Text.".toCharArray();
+        int len = chs.length;
+
+        int x = 50, y = 100;
+
+        FontRenderContext frc = g2d.getFontRenderContext();
+        Font plain = new Font("Serif", Font.PLAIN, 48);
+        GlyphVector pgv = plain.layoutGlyphVector(frc, chs, 0, len, 0);
+        g2d.setFont(plain);
+        g2d.drawChars(chs, 0, len, x, y); y +=50;
+
+        g2d.drawGlyphVector(pgv, x, y); y += 50;
+        Rectangle2D plainStrBounds = plain.getStringBounds(chs, 0, len, frc);
+        Rectangle2D plainGVBounds = pgv.getLogicalBounds();
+        Font bold = new Font("Serif", Font.BOLD, 48);
+        GlyphVector bgv = bold.layoutGlyphVector(frc, chs, 0, len, 0);
+        Rectangle2D boldStrBounds = bold.getStringBounds(chs, 0, len, frc);
+        Rectangle2D boldGVBounds = bgv.getLogicalBounds();
+        g2d.setFont(bold);
+        g2d.drawChars(chs, 0, len, x, y); y +=50;
+        g2d.drawGlyphVector(bgv, x, y);
+        System.out.println("Plain String Bounds = " + plainStrBounds);
+        System.out.println("Bold String Bounds = " + boldStrBounds);
+        System.out.println("Plain GlyphVector Bounds = " + plainGVBounds);
+        System.out.println("Bold GlyphVector Bounds = " + boldGVBounds);
+        if (!plainStrBounds.equals(boldStrBounds) &&
+             plainGVBounds.equals(boldGVBounds))
+        {
+            System.out.println("Test failed: Plain GV bounds same as Bold");
+            if (!interactive) {
+                throw new RuntimeException("Plain GV bounds same as Bold");
+            }
+        }
+
+    };
+}
diff --git a/jdk/test/java/awt/geom/AffineTransform/InvalidTransformParameterTest.java b/jdk/test/java/awt/geom/AffineTransform/InvalidTransformParameterTest.java
new file mode 100644
index 0000000..f8c36ec
--- /dev/null
+++ b/jdk/test/java/awt/geom/AffineTransform/InvalidTransformParameterTest.java
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 8158356
+ * @summary Test AffineTransform transformations do not result in SIGSEGV
+ * if NaN or infinity parameter is passed as argument.
+ * @run main InvalidTransformParameterTest
+ */
+
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.awt.image.ImagingOpException;
+import java.awt.Point;
+import java.awt.image.DataBuffer;
+import java.awt.image.DataBufferByte;
+import java.awt.image.PixelInterleavedSampleModel;
+import java.awt.image.Raster;
+import java.awt.image.WritableRaster;
+import java.awt.image.RasterOp;
+import java.awt.image.SampleModel;
+
+public class InvalidTransformParameterTest {
+
+    public static void main(String[] args) {
+        int count = 0;
+        final int testScenarios = 12;
+        double NaNArg = 0.0 / 0.0;
+        double positiveInfArg = 1.0 / 0.0;
+        double negativeInfArg = -1.0 / 0.0;
+
+        BufferedImage img = new BufferedImage(5, 5, BufferedImage.TYPE_INT_ARGB);
+
+        AffineTransform[] inputTransforms = new AffineTransform[testScenarios];
+
+        for (int i = 0; i < inputTransforms.length; i++) {
+            inputTransforms[i] = new AffineTransform();
+        }
+
+        inputTransforms[0].rotate(NaNArg, img.getWidth()/2, img.getHeight()/2);
+        inputTransforms[1].translate(NaNArg, NaNArg);
+        inputTransforms[2].scale(NaNArg, NaNArg);
+        inputTransforms[3].shear(NaNArg, NaNArg);
+
+        inputTransforms[4].rotate(positiveInfArg, img.getWidth()/2, img.getHeight()/2);
+        inputTransforms[5].translate(positiveInfArg, positiveInfArg);
+        inputTransforms[6].scale(positiveInfArg, positiveInfArg);
+        inputTransforms[7].shear(positiveInfArg, positiveInfArg);
+
+        inputTransforms[8].rotate(negativeInfArg, img.getWidth()/2, img.getHeight()/2);
+        inputTransforms[9].translate(negativeInfArg, negativeInfArg);
+        inputTransforms[10].scale(negativeInfArg, negativeInfArg);
+        inputTransforms[11].shear(negativeInfArg, negativeInfArg);
+
+        // Test BufferedImage AffineTransform ---------------------------------
+
+        for (int i = 0; i < inputTransforms.length; i++) {
+            try {
+                testImageTransform(img, inputTransforms[i]);
+            } catch (ImagingOpException ex) {
+                count++;
+            }
+        }
+
+        if (count != testScenarios) {
+            throw new RuntimeException("Test failed. All test scenarios did not"
+                                       + " result in exception as expected.");
+        }
+
+        // Test Raster AffineTransform ---------------------------------
+
+        count = 0;
+        int[] bandOffsets = {0};
+        Point location = new Point(0, 0);
+        DataBuffer db = new DataBufferByte(10 * 10);
+        SampleModel sm = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE,
+                                                         10, 10, 1, 10,
+                                                         bandOffsets);
+
+        Raster src = Raster.createRaster(sm, db, location);
+        WritableRaster dst = Raster.createWritableRaster(sm, db, location);
+
+        for (int i = 0; i < inputTransforms.length; i++) {
+            try {
+                testRasterTransform(src, dst, inputTransforms[i]);
+            } catch (ImagingOpException ex) {
+                count++;
+            }
+        }
+
+        if (count != testScenarios) {
+            throw new RuntimeException("Test failed. All test scenarios did not"
+                                       + " result in exception as expected.");
+        }
+    }
+
+    public static BufferedImage testImageTransform(BufferedImage image,
+                                                   AffineTransform transform) {
+        AffineTransformOp op =
+                new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+        BufferedImage transformedImage = new BufferedImage(image.getWidth(),
+                                                           image.getHeight(),
+                                                           image.getType());
+
+        return op.filter(image, transformedImage);
+    }
+
+    public static Raster testRasterTransform(Raster src, WritableRaster dst,
+                                             AffineTransform transform) {
+        AffineTransformOp op =
+                new AffineTransformOp(transform, AffineTransformOp.TYPE_BILINEAR);
+
+        return op.filter(src, dst);
+    }
+}
+
diff --git a/jdk/test/java/awt/image/MultiResolutionImage/MultiResolutionDisabledImageTest.java b/jdk/test/java/awt/image/MultiResolutionImage/MultiResolutionDisabledImageTest.java
new file mode 100644
index 0000000..ce5c44d
--- /dev/null
+++ b/jdk/test/java/awt/image/MultiResolutionImage/MultiResolutionDisabledImageTest.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.Color;
+import java.awt.Frame;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.MediaTracker;
+import java.awt.Toolkit;
+import java.awt.image.BaseMultiResolutionImage;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import javax.imageio.ImageIO;
+import javax.swing.GrayFilter;
+import java.awt.image.MultiResolutionImage;
+import javax.swing.JLabel;
+
+/**
+ * @test
+ * @bug 8156182
+ * @summary [macosx] HiDPI/Retina icons do not work for disabled
+ * JButton/JMenuItem etc.
+ * @run main/othervm -Dsun.java2d.uiScale=2 MultiResolutionDisabledImageTest
+ */
+public class MultiResolutionDisabledImageTest {
+
+    private static final String IMAGE_NAME_1X = "image.png";
+    private static final String IMAGE_NAME_2X = "image@2x.png";
+    private static final int IMAGE_SIZE = 100;
+    private static final Color COLOR_1X = Color.GREEN;
+    private static final Color COLOR_2X = Color.BLUE;
+
+    public static void main(String[] args) throws Exception {
+
+        Image baseMRImage = new BaseMultiResolutionImage(createImage(1),
+                                                         createImage(2));
+        testMRDisabledImage(baseMRImage);
+
+        saveImages();
+        Image toolkitMRImage = Toolkit.getDefaultToolkit().getImage(IMAGE_NAME_1X);
+
+        if (toolkitMRImage instanceof MultiResolutionImage) {
+            testMRDisabledImage(toolkitMRImage);
+        }
+    }
+
+    private static void testMRDisabledImage(Image image) throws Exception {
+
+        Image disabledImage = GrayFilter.createDisabledImage(image);
+        MediaTracker mediaTracker = new MediaTracker(new JLabel());
+        mediaTracker.addImage(disabledImage, 0);
+        mediaTracker.waitForID(0);
+
+        BufferedImage buffImage = new BufferedImage(IMAGE_SIZE,
+                                                    IMAGE_SIZE,
+                                                    BufferedImage.TYPE_INT_RGB);
+
+        int x = IMAGE_SIZE / 2;
+        int y = IMAGE_SIZE / 2;
+
+        Graphics2D g = buffImage.createGraphics();
+
+        g.scale(1, 1);
+        g.drawImage(disabledImage, 0, 0, null);
+        int rgb1x = buffImage.getRGB(x, y);
+
+        g.scale(2, 2);
+        g.drawImage(disabledImage, 0, 0, null);
+        int rgb2x = buffImage.getRGB(x, y);
+
+        g.dispose();
+
+        if (rgb1x == rgb2x) {
+            throw new RuntimeException("Disabled image is the same for the base"
+                    + "image and the resolution variant");
+        }
+
+    }
+
+    private static BufferedImage createImage(int scale) throws Exception {
+        BufferedImage image = new BufferedImage(scale * 200, scale * 300,
+                                                BufferedImage.TYPE_INT_RGB);
+        Graphics g = image.createGraphics();
+        g.setColor(scale == 1 ? COLOR_1X : COLOR_2X);
+        g.fillRect(0, 0, scale * 200, scale * 300);
+        g.dispose();
+        return image;
+    }
+
+    private static void saveImages() throws Exception {
+        saveImage(createImage(1), IMAGE_NAME_1X);
+        saveImage(createImage(2), IMAGE_NAME_2X);
+    }
+
+    private static void saveImage(BufferedImage image, String name) throws Exception {
+        ImageIO.write(image, "png", new File(name));
+    }
+}
diff --git a/jdk/test/java/awt/image/VolatileImage/TransparentVImage.java b/jdk/test/java/awt/image/VolatileImage/TransparentVImage.java
new file mode 100644
index 0000000..525099e
--- /dev/null
+++ b/jdk/test/java/awt/image/VolatileImage/TransparentVImage.java
@@ -0,0 +1,260 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 4881082 4916294 5002129 8158524
+ * @summary The test verifies whether the rendering operations on transparent
+ *          and translucent VolatileImage objects generate identical output
+ *          as generated with transparent and translucent BufferedImages.
+ * @key headful
+ * @run main/othervm -Dsun.java2d.uiScale=1 TransparentVImage
+ * @run main/othervm -Dsun.java2d.uiScale=1 -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=false TransparentVImage
+ * @run main/othervm -Dsun.java2d.uiScale=1 -Dsun.java2d.opengl=True -Dsun.java2d.opengl.fbobject=true TransparentVImage
+ */
+import java.awt.GraphicsConfiguration;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Transparency;
+import java.awt.image.BufferedImage;
+import java.awt.image.VolatileImage;
+import java.awt.Color;
+import javax.swing.JFrame;
+import javax.swing.JComponent;
+import javax.swing.ImageIcon;
+import javax.swing.SwingUtilities;
+
+/*
+ * This test draws the same contents to 4 images: 2 BufferedImages that are
+ * transparent and translucent and 2 VolatileImages that are transparent and
+ * translucent. It compares the results pixel-by-pixel and fails if the
+ * results are not the same.
+ */
+public class TransparentVImage
+    extends JComponent {
+
+    BufferedImage cImgTransparent, cImgTranslucent;
+    VolatileImage vImgTransparent, vImgTranslucent;
+    Image sprite;
+    static final int IMAGE_SIZE = 250;
+    static final int WINDOW_SIZE = 600;
+    static boolean doneComparing = false;
+    static JFrame testFrame = null;
+
+    @Override
+    public void paint(Graphics g) {
+        if (cImgTransparent == null) {
+            GraphicsConfiguration gc = getGraphicsConfiguration();
+            // doesn't exist yet: create it (and the other images)
+            cImgTransparent = (BufferedImage)
+                gc.createCompatibleImage(IMAGE_SIZE, IMAGE_SIZE,
+                                         Transparency.BITMASK);
+            cImgTranslucent = (BufferedImage)
+                gc.createCompatibleImage(IMAGE_SIZE, IMAGE_SIZE,
+                                         Transparency.TRANSLUCENT);
+            vImgTransparent = gc.createCompatibleVolatileImage(IMAGE_SIZE,
+                IMAGE_SIZE, Transparency.BITMASK);
+            vImgTranslucent = gc.createCompatibleVolatileImage(IMAGE_SIZE,
+                IMAGE_SIZE, Transparency.TRANSLUCENT);
+
+            String fileName = "duke.gif";
+            String separator = System.getProperty("file.separator");
+            String dirPath = System.getProperty("test.src", ".");
+            String filePath = dirPath + separator + fileName;
+            sprite = new ImageIcon(filePath).getImage();
+
+            // Now they exist; render to them
+            Graphics gImg[] = new Graphics[4];
+            gImg[0] = cImgTransparent.getGraphics();
+            gImg[1] = cImgTranslucent.getGraphics();
+            gImg[2] = vImgTransparent.getGraphics();
+            gImg[3] = vImgTranslucent.getGraphics();
+
+            for (int i = 0; i < gImg.length; ++i) {
+                /*
+                 * VolatileImage utilizes the power of accelerated rendering
+                 * using GPU. The GPU drivers for D3d and OpenGL are supplied
+                 * by OEM vendors and are external to graphics subsystem. Thus
+                 * one cannot guarentee that the drivers will render the
+                 * primitives using exactly the same algorithms as those used
+                 * by BufferedImage. This could result in minor differences in
+                 * pixel values between BufferedImage and VolatileImage.
+                 *
+                 * The pipelines for D3d and OpenGL adjust the rendering with
+                 * fudge factors to align output of GPU rendering with that of
+                 * CPU rendering. Some of the draw calls in this paint method
+                 * are commented indicating a need to fine tune the fudge
+                 * factors in the future. Once they are found to work on all
+                 * hardware, the draw calls will be enabled.
+                 */
+                // rectangular fill
+                gImg[i].setColor(Color.blue);
+                gImg[i].fillRect(0, 0, IMAGE_SIZE, IMAGE_SIZE);
+
+                /*
+                 * Image copy. Copy it 3 times to get any image management
+                 * acceleration going
+                 */
+                int spriteW = sprite.getWidth(null);
+                gImg[i].drawImage(sprite, 0, 0, null);
+                gImg[i].drawImage(sprite, spriteW, 0, null);
+                gImg[i].drawImage(sprite, 2 * spriteW, 0, null);
+
+                // horizontal/vertical/diagonal lines
+                gImg[i].setColor(Color.red);
+                gImg[i].drawLine(0, 0,
+                                 IMAGE_SIZE - 1, IMAGE_SIZE - 1);
+                gImg[i].drawLine(IMAGE_SIZE / 2, 0,
+                                 IMAGE_SIZE / 2, IMAGE_SIZE - 1);
+                //gImg[i].drawLine(IMAGE_SIZE, 0,
+                //                 0, IMAGE_SIZE - 1);
+                gImg[i].drawLine(0, IMAGE_SIZE / 2,
+                                 IMAGE_SIZE - 1, IMAGE_SIZE / 2);
+
+                // filled circle
+                //gImg[i].setColor(Color.yellow);
+                //gImg[i].fillOval(IMAGE_SIZE / 2 - 20, IMAGE_SIZE / 2 - 20,
+                //                 40, 40);
+            }
+
+            /*
+             * Now everything is drawn: let's compare pixels
+             * First, grab the pixel arrays
+             */
+            int cRgbTransparent[] = new int[IMAGE_SIZE * IMAGE_SIZE];
+            int cRgbTranslucent[] = new int[IMAGE_SIZE * IMAGE_SIZE];
+            int vRgbTransparent[] = new int[IMAGE_SIZE * IMAGE_SIZE];
+            int vRgbTranslucent[] = new int[IMAGE_SIZE * IMAGE_SIZE];
+            cImgTransparent.getRGB(0, 0, IMAGE_SIZE, IMAGE_SIZE,
+                                   cRgbTransparent, 0, IMAGE_SIZE);
+            cImgTranslucent.getRGB(0, 0, IMAGE_SIZE, IMAGE_SIZE,
+                                   cRgbTranslucent, 0, IMAGE_SIZE);
+            BufferedImage bImgTransparent = vImgTransparent.getSnapshot();
+            bImgTransparent.getRGB(0, 0, IMAGE_SIZE, IMAGE_SIZE,
+                                   vRgbTransparent, 0, IMAGE_SIZE);
+            BufferedImage bImgTranslucent = vImgTranslucent.getSnapshot();
+            bImgTranslucent.getRGB(0, 0, IMAGE_SIZE, IMAGE_SIZE,
+                                   vRgbTranslucent, 0, IMAGE_SIZE);
+
+            boolean failed = false;
+            for (int pixel = 0; pixel < cRgbTransparent.length; ++pixel) {
+                if (cRgbTransparent[pixel] != vRgbTransparent[pixel]) {
+                    failed = true;
+                    System.out.println("Error in transparent image: " +
+                        "BI[" + pixel + "] = " +
+                        Integer.toHexString(cRgbTransparent[pixel]) +
+                        "VI[" + pixel + "] = " +
+                        Integer.toHexString(vRgbTransparent[pixel]));
+                    break;
+                }
+                if (cRgbTranslucent[pixel] != vRgbTranslucent[pixel]) {
+                    failed = true;
+                    System.out.println("Error in translucent image: " +
+                        "BI[" + pixel + "] = " +
+                        Integer.toHexString(cRgbTranslucent[pixel]) +
+                        "VI[" + pixel + "] = " +
+                        Integer.toHexString(vRgbTranslucent[pixel]));
+                    break;
+                }
+            }
+            if (failed) {
+                throw new RuntimeException("Failed: Pixel mis-match observed");
+            }
+            else {
+                System.out.println("Passed");
+            }
+            doneComparing = true;
+        }
+
+        g.drawImage(cImgTransparent, 0, 0, null);
+        g.drawImage(cImgTranslucent, getWidth() - IMAGE_SIZE, 0, null);
+        g.drawImage(vImgTransparent, 0, getHeight() - IMAGE_SIZE, null);
+        g.drawImage(vImgTranslucent, getWidth() - IMAGE_SIZE,
+                    getHeight() - IMAGE_SIZE, null);
+    }
+
+    private static void constructTestUI() {
+        testFrame = new JFrame();
+        testFrame.setSize(600, 600);
+        testFrame.setResizable(false);
+        testFrame.getContentPane().add(new TransparentVImage());
+
+        testFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        testFrame.setLocationRelativeTo(null);
+        testFrame.setVisible(true);
+    }
+
+    private static void destroyTestUI() {
+        testFrame.dispose();
+    }
+
+    public static void main(String args[]) throws Exception {
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    // Construct the test interface
+                    constructTestUI();
+                } catch (Exception ex) {
+                    // Throw an exception indicating error while creating UI
+                    throw new RuntimeException("Test Failed: Error while" +
+                        " creating the test interface.");
+                }
+            }
+        });
+
+        /*
+         * Wait until the image comparison between VolatileImage and
+         * BufferedImage is complete.
+         */
+        while (!doneComparing) {
+            try {
+                Thread.sleep(100);
+            }
+            catch (Exception e) {}
+        }
+
+        /*
+         * Now sleep just a little longer to let the user see the resulting
+         * images in the frame
+         */
+        try {
+            Thread.sleep(5000);
+        }
+        catch (Exception e) {}
+
+        SwingUtilities.invokeAndWait(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    // Destroy the test interface
+                    destroyTestUI();
+                } catch (Exception ex) {
+                    // Throw an exception indicating error while deleting UI
+                    throw new RuntimeException("Test Failed: Error while" +
+                        " deleting the test interface.");
+                }
+            }
+        });
+    }
+}
diff --git a/jdk/test/java/awt/image/VolatileImage/duke.gif b/jdk/test/java/awt/image/VolatileImage/duke.gif
new file mode 100644
index 0000000..ed32e0f
--- /dev/null
+++ b/jdk/test/java/awt/image/VolatileImage/duke.gif
Binary files differ
diff --git a/jdk/test/java/awt/image/multiresolution/MultiResolutionIcon/IconTest.java b/jdk/test/java/awt/image/multiresolution/MultiResolutionIcon/IconTest.java
index 985041f..6083366 100644
--- a/jdk/test/java/awt/image/multiresolution/MultiResolutionIcon/IconTest.java
+++ b/jdk/test/java/awt/image/multiresolution/MultiResolutionIcon/IconTest.java
@@ -23,10 +23,10 @@
 
 /**
  * @test
- * @bug 8147648
+ * @bug 8147648 8163160
  * @summary [hidpi] multiresolution image: wrong resolution variant is used as
  * icon in the Unity panel
- * @run main/othervm -Dsun.java2d.uiScale=2 IconTest
+ * @run main/manual/othervm -Dsun.java2d.uiScale=2 IconTest
  */
 import java.awt.Color;
 import java.awt.Graphics;
@@ -67,7 +67,7 @@
             if (g != null) {
                 g.setColor(c);
                 g.fillRect(0, 0, x, x);
-                g.setColor(Color.YELLOW);
+                g.setColor(Color.GREEN);
                 g.drawRect(0, 0, x-1, x-1);
             }
         } finally {
@@ -91,7 +91,8 @@
                 GridBagConstraints gbc = new GridBagConstraints();
                 String instructions
                         = "<html>INSTRUCTIONS:<br>"
-                        + "Check if test button and unity icons are both blue with yellow border.<br><br>"
+                        + "Check if test button icon and unity icon are both "
+                        + "blue with green border.<br><br>"
                         + "If Icon color is blue press pass"
                         + " else press fail.<br><br></html>";
 
diff --git a/jdk/test/java/awt/print/PrinterJob/TestMediaTraySelection.java b/jdk/test/java/awt/print/PrinterJob/TestMediaTraySelection.java
new file mode 100644
index 0000000..374928a
--- /dev/null
+++ b/jdk/test/java/awt/print/PrinterJob/TestMediaTraySelection.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 6357887
+ * @summary  Verifies if selected printertray is used
+ * @requires (os.family == "linux" | os.family == "solaris")
+ * @run main/manual TestMediaTraySelection
+ */
+
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.Graphics;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.awt.print.PageFormat;
+import java.awt.print.Printable;
+import java.awt.print.PrinterException;
+import java.awt.print.PrinterJob;
+import javax.print.DocFlavor;
+import javax.print.PrintService;
+import javax.print.PrintServiceLookup;
+import javax.print.attribute.HashPrintRequestAttributeSet;
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.standard.Media;
+import javax.print.attribute.standard.MediaTray;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+import javax.swing.JTextArea;
+import javax.swing.SwingUtilities;
+
+public class TestMediaTraySelection implements Printable {
+
+    private static Thread mainThread;
+    private static boolean testPassed;
+    private static boolean testGeneratedInterrupt;
+    private static PrintService prservices;
+
+    public static void main(String[] args)  throws Exception {
+        prservices = PrintServiceLookup.lookupDefaultPrintService();
+        if (prservices == null) {
+            System.out.println("No print service found");
+            return;
+        }
+        System.out.println(" Print service " + prservices);
+        SwingUtilities.invokeAndWait(() -> {
+            doTest(TestMediaTraySelection::printTest);
+        });
+        mainThread = Thread.currentThread();
+        try {
+            Thread.sleep(90000);
+        } catch (InterruptedException e) {
+            if (!testPassed && testGeneratedInterrupt) {
+                throw new RuntimeException("Banner page did not print");
+            }
+        }
+        if (!testGeneratedInterrupt) {
+            throw new RuntimeException("user has not executed the test");
+        }
+    }
+
+    private static void printTest() {
+
+        MediaTray tray = null;
+        //tray = getMediaTray( prservices, "Bypass Tray" );
+        tray = getMediaTray( prservices, "Tray 4" );
+        PrintRequestAttributeSet atrset = new HashPrintRequestAttributeSet();
+        //atrset.add( MediaSizeName.ISO_A4 );
+        atrset.add(tray);
+        PrinterJob pjob = PrinterJob.getPrinterJob();
+        pjob.setPrintable(new TestMediaTraySelection());
+        try {
+            pjob.print(atrset);
+        } catch (PrinterException e) {
+            e.printStackTrace();
+            fail();
+        }
+    }
+
+    static MediaTray getMediaTray( PrintService ps, String name) {
+         Media[] media  = (Media[])ps.getSupportedAttributeValues( Media.class,
+                 DocFlavor.SERVICE_FORMATTED.PAGEABLE, null);
+
+        for (Media m : media) {
+            if ( m instanceof MediaTray) {
+                System.out.println("MediaTray=" + m.toString() );
+                if ( m.toString().trim().indexOf( name ) > -1 ) {
+                    return (MediaTray)m;
+                }
+            }
+        }
+        return null;
+    }
+
+    public static synchronized void pass() {
+        testPassed = true;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    public static synchronized void fail() {
+        testPassed = false;
+        testGeneratedInterrupt = true;
+        mainThread.interrupt();
+    }
+
+    private static void doTest(Runnable action) {
+        String description
+                = " Please verify the \"Tray 4\" of printer is used for printout\n"
+                + " and not standard/auto tray. If yes, press PASS else press FAIL";
+
+        final JDialog dialog = new JDialog();
+        dialog.setTitle("printBannerTest");
+        JTextArea textArea = new JTextArea(description);
+        textArea.setEditable(false);
+        final JButton testButton = new JButton("Start Test");
+        final JButton passButton = new JButton("PASS");
+        passButton.setEnabled(false);
+        passButton.addActionListener((e) -> {
+            dialog.dispose();
+            pass();
+        });
+        final JButton failButton = new JButton("FAIL");
+        failButton.setEnabled(false);
+        failButton.addActionListener((e) -> {
+            dialog.dispose();
+            fail();
+        });
+        testButton.addActionListener((e) -> {
+            testButton.setEnabled(false);
+            action.run();
+            passButton.setEnabled(true);
+            failButton.setEnabled(true);
+        });
+        JPanel mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(textArea, BorderLayout.CENTER);
+        JPanel buttonPanel = new JPanel(new FlowLayout());
+        buttonPanel.add(testButton);
+        buttonPanel.add(passButton);
+        buttonPanel.add(failButton);
+        mainPanel.add(buttonPanel, BorderLayout.SOUTH);
+        dialog.add(mainPanel);
+        dialog.pack();
+        dialog.setVisible(true);
+        dialog.addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowClosing(WindowEvent e) {
+                System.out.println("main dialog closing");
+                testGeneratedInterrupt = false;
+                mainThread.interrupt();
+            }
+        });
+    }
+
+    @Override
+    public int print(Graphics g, PageFormat pf, int pi) {
+        System.out.println("pi = " + pi);
+        if (pi > 0) {
+            return NO_SUCH_PAGE;
+        }
+        g.drawString("Testing : " , 200, 200);
+        return PAGE_EXISTS;
+    }
+}
diff --git a/jdk/test/java/beans/Introspector/Test8027905.java b/jdk/test/java/beans/Introspector/Test8027905.java
index 6c91694..60318f3 100644
--- a/jdk/test/java/beans/Introspector/Test8027905.java
+++ b/jdk/test/java/beans/Introspector/Test8027905.java
@@ -28,6 +28,7 @@
  * @bug 8027905
  * @summary Tests that GC does not affect a property type
  * @author Sergey Malenkov
+ * @run main/othervm -mx16m Test8027905
  */
 
 public class Test8027905 {
diff --git a/jdk/test/java/lang/Class/GetModuleTest.java b/jdk/test/java/lang/Class/GetModuleTest.java
index 918e4dd..359f7ca 100644
--- a/jdk/test/java/lang/Class/GetModuleTest.java
+++ b/jdk/test/java/lang/Class/GetModuleTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/jdk/test/java/lang/Class/GetPackageTest.java b/jdk/test/java/lang/Class/GetPackageTest.java
index f9cb5fb..5f6c96f 100644
--- a/jdk/test/java/lang/Class/GetPackageTest.java
+++ b/jdk/test/java/lang/Class/GetPackageTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/jdk/test/java/lang/ClassLoader/GetSystemPackage.java b/jdk/test/java/lang/ClassLoader/GetSystemPackage.java
index fba5648..56152b5 100644
--- a/jdk/test/java/lang/ClassLoader/GetSystemPackage.java
+++ b/jdk/test/java/lang/ClassLoader/GetSystemPackage.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java b/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java
index 26fbe3d..691c509 100644
--- a/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java
+++ b/jdk/test/java/lang/ClassLoader/deadlock/GetResource.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/ProcessBuilder/Basic.java b/jdk/test/java/lang/ProcessBuilder/Basic.java
index 9a1d976..e17e288 100644
--- a/jdk/test/java/lang/ProcessBuilder/Basic.java
+++ b/jdk/test/java/lang/ProcessBuilder/Basic.java
@@ -2226,6 +2226,33 @@
                     reader.join();
                 }
             }
+
+            //----------------------------------------------------------------
+            // Check the Process toString() method
+            //----------------------------------------------------------------
+            {
+                List<String> childArgs = new ArrayList<String>(javaChildArgs);
+                childArgs.add("testIO");
+                ProcessBuilder pb = new ProcessBuilder(childArgs);
+                pb.redirectInput(Redirect.PIPE);
+                pb.redirectOutput(DISCARD);
+                pb.redirectError(DISCARD);
+                final Process p = pb.start();
+                // Child process waits until it gets input
+                String s = p.toString();
+                check(s.contains("not exited"));
+                check(s.contains("pid=" + p.getPid() + ","));
+
+                new PrintStream(p.getOutputStream()).print("standard input");
+                p.getOutputStream().close();
+
+                // Check the toString after it exits
+                int exitValue = p.waitFor();
+                s = p.toString();
+                check(s.contains("pid=" + p.getPid() + ","));
+                check(s.contains("exitValue=" + exitValue) &&
+                        !s.contains("not exited"));
+            }
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
diff --git a/jdk/test/java/lang/ProcessBuilder/CloseRace.java b/jdk/test/java/lang/ProcessBuilder/CloseRace.java
index a9afbd2..1fa6d8d 100644
--- a/jdk/test/java/lang/ProcessBuilder/CloseRace.java
+++ b/jdk/test/java/lang/ProcessBuilder/CloseRace.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/ProcessBuilder/PipelineTest.java b/jdk/test/java/lang/ProcessBuilder/PipelineTest.java
index 9f6ec99f..90b277a 100644
--- a/jdk/test/java/lang/ProcessBuilder/PipelineTest.java
+++ b/jdk/test/java/lang/ProcessBuilder/PipelineTest.java
@@ -19,7 +19,6 @@
  * 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.File;
diff --git a/jdk/test/java/lang/ProcessBuilder/Zombies.java b/jdk/test/java/lang/ProcessBuilder/Zombies.java
index 30f296c..10c804e 100644
--- a/jdk/test/java/lang/ProcessBuilder/Zombies.java
+++ b/jdk/test/java/lang/ProcessBuilder/Zombies.java
@@ -25,7 +25,6 @@
  * @test
  * @run main/othervm Zombies
  * @bug 6474073 6180151
- * @key intermittent
  * @summary Make sure zombies don't get created on Unix
  * @author Martin Buchholz
  */
diff --git a/jdk/test/java/lang/ProcessHandle/Basic.java b/jdk/test/java/lang/ProcessHandle/Basic.java
index b759e9c..c34bcab 100644
--- a/jdk/test/java/lang/ProcessHandle/Basic.java
+++ b/jdk/test/java/lang/ProcessHandle/Basic.java
@@ -36,7 +36,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @run testng Basic
diff --git a/jdk/test/java/lang/ProcessHandle/InfoTest.java b/jdk/test/java/lang/ProcessHandle/InfoTest.java
index 7d8867d..fbd855d 100644
--- a/jdk/test/java/lang/ProcessHandle/InfoTest.java
+++ b/jdk/test/java/lang/ProcessHandle/InfoTest.java
@@ -48,7 +48,7 @@
 /*
  * @test
  * @bug 8077350 8081566 8081567 8098852 8136597
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
diff --git a/jdk/test/java/lang/ProcessHandle/OnExitTest.java b/jdk/test/java/lang/ProcessHandle/OnExitTest.java
index c797f4a..ff9f4c2 100644
--- a/jdk/test/java/lang/ProcessHandle/OnExitTest.java
+++ b/jdk/test/java/lang/ProcessHandle/OnExitTest.java
@@ -38,7 +38,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
diff --git a/jdk/test/java/lang/ProcessHandle/TreeTest.java b/jdk/test/java/lang/ProcessHandle/TreeTest.java
index bb62d06..a1493b6 100644
--- a/jdk/test/java/lang/ProcessHandle/TreeTest.java
+++ b/jdk/test/java/lang/ProcessHandle/TreeTest.java
@@ -44,7 +44,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  *          jdk.management
  * @build jdk.test.lib.Utils
diff --git a/jdk/test/java/lang/StackWalker/CountLocalSlots.java b/jdk/test/java/lang/StackWalker/CountLocalSlots.java
index c78a4cb..066055b 100644
--- a/jdk/test/java/lang/StackWalker/CountLocalSlots.java
+++ b/jdk/test/java/lang/StackWalker/CountLocalSlots.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/StackWalker/LocalsAndOperands.java b/jdk/test/java/lang/StackWalker/LocalsAndOperands.java
index b253ab2..f4f6465 100644
--- a/jdk/test/java/lang/StackWalker/LocalsAndOperands.java
+++ b/jdk/test/java/lang/StackWalker/LocalsAndOperands.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/StackWalker/LocalsCrash.java b/jdk/test/java/lang/StackWalker/LocalsCrash.java
index b50dd26..87415e4 100644
--- a/jdk/test/java/lang/StackWalker/LocalsCrash.java
+++ b/jdk/test/java/lang/StackWalker/LocalsCrash.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java b/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java
index 6f566c3..5669bce 100644
--- a/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java
+++ b/jdk/test/java/lang/String/concat/CompactStringsInitialCoder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java b/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java
index 31b29cd..7ee0d98 100644
--- a/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java
+++ b/jdk/test/java/lang/String/concat/StringConcatFactoryEmptyMethods.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/String/concat/WithSecurityManager.java b/jdk/test/java/lang/String/concat/WithSecurityManager.java
index 9359d29..2835a38 100644
--- a/jdk/test/java/lang/String/concat/WithSecurityManager.java
+++ b/jdk/test/java/lang/String/concat/WithSecurityManager.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/Thread/ThreadStateController.java b/jdk/test/java/lang/Thread/ThreadStateController.java
index 728a115..c426d1b 100644
--- a/jdk/test/java/lang/Thread/ThreadStateController.java
+++ b/jdk/test/java/lang/Thread/ThreadStateController.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java
index e960808..084ed56 100644
--- a/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java
+++ b/jdk/test/java/lang/annotation/typeAnnotations/GetAnnotatedReceiverType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/instrument/NMTHelper.java b/jdk/test/java/lang/instrument/NMTHelper.java
index 09e60e4..07ee25b 100644
--- a/jdk/test/java/lang/instrument/NMTHelper.java
+++ b/jdk/test/java/lang/instrument/NMTHelper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java b/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java
index 4522d8b..4709016 100644
--- a/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java
+++ b/jdk/test/java/lang/instrument/NativeMethodPrefixAgent.java
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 6263319
+ * @requires ((vm.opt.StartFlightRecording == null) | (vm.opt.StartFlightRecording == false)) & ((vm.opt.FlightRecorder == null) | (vm.opt.FlightRecorder == false))
  * @summary test setNativeMethodPrefix
  * @author Robert Field, Sun Microsystems
  *
diff --git a/jdk/test/java/lang/instrument/RedefineBigClass.sh b/jdk/test/java/lang/instrument/RedefineBigClass.sh
index 60fb081..4f625a7 100644
--- a/jdk/test/java/lang/instrument/RedefineBigClass.sh
+++ b/jdk/test/java/lang/instrument/RedefineBigClass.sh
@@ -70,7 +70,7 @@
 fi
 
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 ${NMT} \
+    -Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
     -javaagent:RedefineBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RedefineBigClassApp \
     > output.log 2>&1 
diff --git a/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh b/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
index 357e244..e583c9d 100644
--- a/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
+++ b/jdk/test/java/lang/instrument/RedefineSubclassWithTwoInterfaces.sh
@@ -87,23 +87,8 @@
 
 echo "INFO: launching RedefineSubclassWithTwoInterfacesApp"
 
-# TraceRedefineClasses options:
-#
-#    0x00000001 |          1 - name each target class before loading, after
-#                              loading and after redefinition is completed
-#    0x00000002 |          2 - print info if parsing, linking or
-#                              verification throws an exception
-#    0x00000004 |          4 - print timer info for the VM operation
-#    0x00001000 |       4096 - detect calls to obsolete methods
-#    0x00002000 |       8192 - fail a guarantee() in addition to detection
-#    0x00004000 |      16384 - detect old/obsolete methods in metadata
-#    0x00100000 |    1048576 - impl details: vtable updates
-#    0x00200000 |    2097152 - impl details: itable updates
-#
-#    1+2+4+4096+8192+16384+1048576+2097152 == 3174407
-
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3174407 \
+    -Xlog:redefine+class+load=trace,redefine+class+load+exceptions=trace,redefine+class+timer=trace,redefine+class+obsolete=trace,redefine+class+obsolete+metadata=trace,redefine+class+constantpool=trace \
     -javaagent:RedefineSubclassWithTwoInterfacesAgent.jar \
     -classpath "${TESTCLASSES}" \
     RedefineSubclassWithTwoInterfacesApp > output.log 2>&1
diff --git a/jdk/test/java/lang/instrument/RetransformBigClass.sh b/jdk/test/java/lang/instrument/RetransformBigClass.sh
index 7144689..455f42a 100644
--- a/jdk/test/java/lang/instrument/RetransformBigClass.sh
+++ b/jdk/test/java/lang/instrument/RetransformBigClass.sh
@@ -70,7 +70,7 @@
 fi
 
 "${JAVA}" ${TESTVMOPTS} \
-    -XX:TraceRedefineClasses=3 ${NMT} \
+    -Xlog:redefine+class+load=debug,redefine+class+load+exceptions=info ${NMT} \
     -javaagent:RetransformBigClassAgent.jar=BigClass.class \
     -classpath "${TESTCLASSES}" RetransformBigClassApp \
     > output.log 2>&1
diff --git a/jdk/test/java/lang/invoke/6987555/Test6987555.java b/jdk/test/java/lang/invoke/6987555/Test6987555.java
index 7a2f45c..eb93900 100644
--- a/jdk/test/java/lang/invoke/6987555/Test6987555.java
+++ b/jdk/test/java/lang/invoke/6987555/Test6987555.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/6991596/Test6991596.java b/jdk/test/java/lang/invoke/6991596/Test6991596.java
index a7083bd..193009d 100644
--- a/jdk/test/java/lang/invoke/6991596/Test6991596.java
+++ b/jdk/test/java/lang/invoke/6991596/Test6991596.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/6998541/Test6998541.java b/jdk/test/java/lang/invoke/6998541/Test6998541.java
index 1edf14f..983c23b 100644
--- a/jdk/test/java/lang/invoke/6998541/Test6998541.java
+++ b/jdk/test/java/lang/invoke/6998541/Test6998541.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/7087570/Test7087570.java b/jdk/test/java/lang/invoke/7087570/Test7087570.java
index 732467b..165968c 100644
--- a/jdk/test/java/lang/invoke/7087570/Test7087570.java
+++ b/jdk/test/java/lang/invoke/7087570/Test7087570.java
@@ -19,7 +19,6 @@
  * 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
diff --git a/jdk/test/java/lang/invoke/7157574/Test7157574.java b/jdk/test/java/lang/invoke/7157574/Test7157574.java
index acf9ef4..d2a91d9 100644
--- a/jdk/test/java/lang/invoke/7157574/Test7157574.java
+++ b/jdk/test/java/lang/invoke/7157574/Test7157574.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /*
diff --git a/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java b/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java
index 4730efa..e0797f0 100644
--- a/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java
+++ b/jdk/test/java/lang/invoke/7196190/ClassForNameTest.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java b/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java
index 24a9512..57a06d1 100644
--- a/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java
+++ b/jdk/test/java/lang/invoke/7196190/GetUnsafeTest.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/8009222/Test8009222.java b/jdk/test/java/lang/invoke/8009222/Test8009222.java
index 7119693..62ee09c 100644
--- a/jdk/test/java/lang/invoke/8009222/Test8009222.java
+++ b/jdk/test/java/lang/invoke/8009222/Test8009222.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/8022701/BogoLoader.java b/jdk/test/java/lang/invoke/8022701/BogoLoader.java
index e77be6f..e8c579a 100644
--- a/jdk/test/java/lang/invoke/8022701/BogoLoader.java
+++ b/jdk/test/java/lang/invoke/8022701/BogoLoader.java
@@ -19,7 +19,6 @@
  * 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.BufferedInputStream;
diff --git a/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java b/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java
index 5c1f64b..011ae7f 100644
--- a/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java
+++ b/jdk/test/java/lang/invoke/8022701/InvokeSeveralWays.java
@@ -19,7 +19,6 @@
  * 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.reflect.InvocationTargetException;
diff --git a/jdk/test/java/lang/invoke/8022701/Invoker.java b/jdk/test/java/lang/invoke/8022701/Invoker.java
index a97159e..62015fa 100644
--- a/jdk/test/java/lang/invoke/8022701/Invoker.java
+++ b/jdk/test/java/lang/invoke/8022701/Invoker.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 public class Invoker {
diff --git a/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java b/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java
index badc1a8..18d4a4c 100644
--- a/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java
+++ b/jdk/test/java/lang/invoke/8022701/MHIllegalAccess.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/8022701/MethodSupplier.java b/jdk/test/java/lang/invoke/8022701/MethodSupplier.java
index 4699a52..5ef4d20 100644
--- a/jdk/test/java/lang/invoke/8022701/MethodSupplier.java
+++ b/jdk/test/java/lang/invoke/8022701/MethodSupplier.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /*
diff --git a/jdk/test/java/lang/invoke/CallSiteTest.java b/jdk/test/java/lang/invoke/CallSiteTest.java
index 48b0d7b..bf0fe2e 100644
--- a/jdk/test/java/lang/invoke/CallSiteTest.java
+++ b/jdk/test/java/lang/invoke/CallSiteTest.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/CallStaticInitOrder.java b/jdk/test/java/lang/invoke/CallStaticInitOrder.java
index 83808f8..4090e8f 100644
--- a/jdk/test/java/lang/invoke/CallStaticInitOrder.java
+++ b/jdk/test/java/lang/invoke/CallStaticInitOrder.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java
index edfe52a..7356b29 100644
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/Test.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java
index 154109c..771e87f6 100644
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p1/T2.java
@@ -19,8 +19,8 @@
  * 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 p1;
 
 import p2.T3;
diff --git a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java
index 9f4d7ce..0deba76 100644
--- a/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java
+++ b/jdk/test/java/lang/invoke/ProtectedMemberDifferentPackage/p2/T3.java
@@ -19,8 +19,8 @@
  * 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;
 
 import p1.T2;
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java
index ed3160b..aa66b2f 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java
@@ -132,7 +132,8 @@
         COMPARE_AND_SET,
         COMPARE_AND_EXCHANGE,
         GET_AND_SET,
-        GET_AND_ADD;
+        GET_AND_ADD,
+        GET_AND_BITWISE;
     }
 
     enum TestAccessMode {
@@ -148,13 +149,26 @@
         COMPARE_AND_EXCHANGE(TestAccessType.COMPARE_AND_EXCHANGE),
         COMPARE_AND_EXCHANGE_ACQUIRE(TestAccessType.COMPARE_AND_EXCHANGE),
         COMPARE_AND_EXCHANGE_RELEASE(TestAccessType.COMPARE_AND_EXCHANGE),
+        WEAK_COMPARE_AND_SET_PLAIN(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET(TestAccessType.COMPARE_AND_SET),
-        WEAK_COMPARE_AND_SET_VOLATILE(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET_ACQUIRE(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET_RELEASE(TestAccessType.COMPARE_AND_SET),
         GET_AND_SET(TestAccessType.GET_AND_SET),
+        GET_AND_SET_ACQUIRE(TestAccessType.GET_AND_SET),
+        GET_AND_SET_RELEASE(TestAccessType.GET_AND_SET),
         GET_AND_ADD(TestAccessType.GET_AND_ADD),
-        ADD_AND_GET(TestAccessType.GET_AND_ADD),;
+        GET_AND_ADD_ACQUIRE(TestAccessType.GET_AND_ADD),
+        GET_AND_ADD_RELEASE(TestAccessType.GET_AND_ADD),
+        GET_AND_BITWISE_OR(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_OR_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_OR_RELEASE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND_RELEASE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR_RELEASE(TestAccessType.GET_AND_BITWISE),
+        ;
 
         final TestAccessType at;
         final boolean isPolyMorphicInReturnType;
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java
index ae23346..a4d5463 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -266,8 +279,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(recv, true);
+            boolean o = (boolean) vh.getAndAddAcquire(recv, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(recv, true);
+        });
+
     }
 
 
@@ -321,8 +339,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(true);
+            boolean o = (boolean) vh.getAndAddAcquire(true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(true);
+        });
+
     }
 
 
@@ -418,11 +441,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, true, false);
+                success = vh.weakCompareAndSetPlain(recv, true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) vh.get(recv);
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -448,21 +471,125 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, false, true);
+                success = vh.weakCompareAndSet(recv, false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) vh.get(recv);
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean value");
+            assertEquals(x, true, "weakCompareAndSet boolean value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, true);
+
             boolean o = (boolean) vh.getAndSet(recv, false);
             assertEquals(o, true, "getAndSet boolean");
             boolean x = (boolean) vh.get(recv);
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndSetAcquire(recv, false);
+            assertEquals(o, true, "getAndSetAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, false, "getAndSetAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndSetRelease(recv, false);
+            assertEquals(o, true, "getAndSetRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, false, "getAndSetRelease boolean value");
+        }
+
+
+        // get and bitwise or
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOr(recv, false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAnd(recv, false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXor(recv, false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessBoolean recv, VarHandle vh) {
@@ -472,8 +599,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(recv, true);
+            boolean o = (boolean) vh.getAndAddAcquire(recv, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(recv, true);
+        });
+
     }
 
 
@@ -569,11 +701,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(true, false);
+                success = vh.weakCompareAndSetPlain(true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) vh.get();
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -599,21 +731,125 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(false, true);
+                success = vh.weakCompareAndSet(false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) vh.get();
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(x, true, "weakCompareAndSet boolean");
         }
 
         // Compare set and get
         {
+            vh.set(true);
+
             boolean o = (boolean) vh.getAndSet(false);
             assertEquals(o, true, "getAndSet boolean");
             boolean x = (boolean) vh.get();
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndSetAcquire(false);
+            assertEquals(o, true, "getAndSetAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, false, "getAndSetAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndSetRelease(false);
+            assertEquals(o, true, "getAndSetRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, false, "getAndSetRelease boolean value");
+        }
+
+
+        // get and bitwise or
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOr(false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrAcquire(false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrRelease(false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAnd(false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndAcquire(false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndRelease(false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXor(false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorAcquire(false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorRelease(false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
@@ -623,8 +859,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(true);
+            boolean o = (boolean) vh.getAndAddAcquire(true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(true);
+        });
+
     }
 
 
@@ -723,11 +964,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, true, false);
+                    success = vh.weakCompareAndSetPlain(array, i, true, false);
                 }
-                assertEquals(success, true, "weakCompareAndSet boolean");
+                assertEquals(success, true, "weakCompareAndSetPlain boolean");
                 boolean x = (boolean) vh.get(array, i);
-                assertEquals(x, false, "weakCompareAndSet boolean value");
+                assertEquals(x, false, "weakCompareAndSetPlain boolean value");
             }
 
             {
@@ -753,21 +994,125 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, false, true);
+                    success = vh.weakCompareAndSet(array, i, false, true);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(success, true, "weakCompareAndSet boolean");
                 boolean x = (boolean) vh.get(array, i);
-                assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(x, true, "weakCompareAndSet boolean");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, true);
+
                 boolean o = (boolean) vh.getAndSet(array, i, false);
                 assertEquals(o, true, "getAndSet boolean");
                 boolean x = (boolean) vh.get(array, i);
                 assertEquals(x, false, "getAndSet boolean value");
             }
 
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndSetAcquire(array, i, false);
+                assertEquals(o, true, "getAndSetAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, false, "getAndSetAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndSetRelease(array, i, false);
+                assertEquals(o, true, "getAndSetRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, false, "getAndSetRelease boolean value");
+            }
+
+
+            // get and bitwise or
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOr(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOr boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOrAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOrRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAnd(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAnd boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAndAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAndRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXor(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXor boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXorAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXorRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+            }
         }
     }
 
@@ -781,8 +1126,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(array, i, true);
+            boolean o = (boolean) vh.getAndAddAcquire(array, i, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(array, i, true);
+        });
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -840,11 +1190,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, true, false);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, true, false);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, true, false);
+                boolean r = vh.weakCompareAndSet(array, ci, true, false);
             });
 
             checkIOOBE(() -> {
@@ -859,6 +1209,50 @@
                 boolean o = (boolean) vh.getAndSet(array, ci, true);
             });
 
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndSetAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndSetRelease(array, ci, true);
+            });
+
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOr(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOrAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOrRelease(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAnd(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAndAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAndRelease(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXor(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXorAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXorRelease(array, ci, true);
+            });
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java
index 754f490..be79776 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, (byte)0x01, (byte)0x23);
+                success = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) vh.get(recv);
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, (byte)0x23, (byte)0x01);
+                success = vh.weakCompareAndSet(recv, (byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) vh.get(recv);
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte value");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, (byte)0x01);
+
             byte o = (byte) vh.getAndSet(recv, (byte)0x23);
             assertEquals(o, (byte)0x01, "getAndSet byte");
             byte x = (byte) vh.get(recv);
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        vh.set(recv, (byte)0x01);
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndSetAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndSetRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+        }
 
         // get and add, add and get
         {
-            byte o = (byte) vh.getAndAdd(recv, (byte)0x45);
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAdd(recv, (byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) vh.addAndGet(recv, (byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAddAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAddRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOr(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAnd(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXor(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessByte recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet((byte)0x01, (byte)0x23);
+                success = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) vh.get();
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease((byte)0x23, (byte)0x01);
+                success = vh.weakCompareAndSet((byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) vh.get();
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
         }
 
         // Compare set and get
         {
+            vh.set((byte)0x01);
+
             byte o = (byte) vh.getAndSet((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndSet byte");
             byte x = (byte) vh.get();
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        vh.set((byte)0x01);
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndSetAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndSetRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+        }
 
         // get and add, add and get
         {
-            byte o = (byte) vh.getAndAdd( (byte)0x45);
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAdd((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) vh.addAndGet((byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAddAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAddRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOr((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAnd((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXor((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, (byte)0x01, (byte)0x23);
+                    success = vh.weakCompareAndSetPlain(array, i, (byte)0x01, (byte)0x23);
                 }
-                assertEquals(success, true, "weakCompareAndSet byte");
+                assertEquals(success, true, "weakCompareAndSetPlain byte");
                 byte x = (byte) vh.get(array, i);
-                assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+                assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, (byte)0x23, (byte)0x01);
+                    success = vh.weakCompareAndSet(array, i, (byte)0x23, (byte)0x01);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile byte");
+                assertEquals(success, true, "weakCompareAndSet byte");
                 byte x = (byte) vh.get(array, i);
-                assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+                assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, (byte)0x01);
+
                 byte o = (byte) vh.getAndSet(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndSet byte");
                 byte x = (byte) vh.get(array, i);
                 assertEquals(x, (byte)0x23, "getAndSet byte value");
             }
 
-            vh.set(array, i, (byte)0x01);
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndSetAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndSetRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+            }
 
             // get and add, add and get
             {
-                byte o = (byte) vh.getAndAdd(array, i, (byte)0x45);
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAdd(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndAdd byte");
-                byte c = (byte) vh.addAndGet(array, i, (byte)0x45);
-                assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAddAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAddRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOr(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOrAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOrRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAnd(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAndAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAndRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXor(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXorAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXorRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, (byte)0x01, (byte)0x23);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, (byte)0x01, (byte)0x23);
+                boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                byte o = (byte) vh.getAndAdd(array, ci, (byte)0x45);
+                byte o = (byte) vh.getAndSetAcquire(array, ci, (byte)0x01);
             });
 
             checkIOOBE(() -> {
-                byte o = (byte) vh.addAndGet(array, ci, (byte)0x45);
+                byte o = (byte) vh.getAndSetRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAdd(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAddAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAddRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOr(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOrAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOrRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAnd(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAndAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAndRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXor(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXorAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXorRelease(array, ci, (byte)0x01);
             });
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java
index 9a0af41..6e2f42c 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, '\u0123', '\u4567');
+                success = vh.weakCompareAndSetPlain(recv, '\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) vh.get(recv);
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, '\u4567', '\u0123');
+                success = vh.weakCompareAndSet(recv, '\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) vh.get(recv);
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char value");
+            assertEquals(x, '\u0123', "weakCompareAndSet char value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, '\u0123');
+
             char o = (char) vh.getAndSet(recv, '\u4567');
             assertEquals(o, '\u0123', "getAndSet char");
             char x = (char) vh.get(recv);
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        vh.set(recv, '\u0123');
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndSetAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndSetAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, '\u4567', "getAndSetAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndSetRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndSetRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, '\u4567', "getAndSetRelease char value");
+        }
 
         // get and add, add and get
         {
-            char o = (char) vh.getAndAdd(recv, '\u89AB');
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAdd(recv, '\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) vh.addAndGet(recv, '\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAddAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAddRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddReleasechar");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOr(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOrAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOrRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAnd(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAndAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAndRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXor(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXorAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXorRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessChar recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet('\u0123', '\u4567');
+                success = vh.weakCompareAndSetPlain('\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) vh.get();
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease('\u4567', '\u0123');
+                success = vh.weakCompareAndSet('\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) vh.get();
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+            assertEquals(x, '\u0123', "weakCompareAndSet char");
         }
 
         // Compare set and get
         {
+            vh.set('\u0123');
+
             char o = (char) vh.getAndSet('\u4567');
             assertEquals(o, '\u0123', "getAndSet char");
             char x = (char) vh.get();
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        vh.set('\u0123');
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndSetAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndSetAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, '\u4567', "getAndSetAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndSetRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndSetRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, '\u4567', "getAndSetRelease char value");
+        }
 
         // get and add, add and get
         {
-            char o = (char) vh.getAndAdd( '\u89AB');
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAdd('\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) vh.addAndGet('\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAddAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAddRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndAddReleasechar");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOr('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOrAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOrRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAnd('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAndAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAndRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXor('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXorAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXorRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, '\u0123', '\u4567');
+                    success = vh.weakCompareAndSetPlain(array, i, '\u0123', '\u4567');
                 }
-                assertEquals(success, true, "weakCompareAndSet char");
+                assertEquals(success, true, "weakCompareAndSetPlain char");
                 char x = (char) vh.get(array, i);
-                assertEquals(x, '\u4567', "weakCompareAndSet char value");
+                assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, '\u4567', '\u0123');
+                    success = vh.weakCompareAndSet(array, i, '\u4567', '\u0123');
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile char");
+                assertEquals(success, true, "weakCompareAndSet char");
                 char x = (char) vh.get(array, i);
-                assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+                assertEquals(x, '\u0123', "weakCompareAndSet char");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, '\u0123');
+
                 char o = (char) vh.getAndSet(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndSet char");
                 char x = (char) vh.get(array, i);
                 assertEquals(x, '\u4567', "getAndSet char value");
             }
 
-            vh.set(array, i, '\u0123');
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndSetAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, '\u4567', "getAndSetAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndSetRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, '\u4567', "getAndSetRelease char value");
+            }
 
             // get and add, add and get
             {
-                char o = (char) vh.getAndAdd(array, i, '\u89AB');
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAdd(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndAdd char");
-                char c = (char) vh.addAndGet(array, i, '\u89AB');
-                assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAddAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAddRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddReleasechar");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOr(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOr char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOrAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOrRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAnd(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAndAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAndRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXor(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXor char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXorAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXorRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
+                boolean r = vh.weakCompareAndSetPlain(array, ci, '\u0123', '\u4567');
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, '\u0123', '\u4567');
+                boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                char o = (char) vh.getAndAdd(array, ci, '\u89AB');
+                char o = (char) vh.getAndSetAcquire(array, ci, '\u0123');
             });
 
             checkIOOBE(() -> {
-                char o = (char) vh.addAndGet(array, ci, '\u89AB');
+                char o = (char) vh.getAndSetRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAdd(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAddAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAddRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOr(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOrAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOrRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAnd(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAndAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAndRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXor(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXorAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXorRelease(array, ci, '\u0123');
             });
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java
index 710aae8..e0564d5 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(recv, 1.0d);
+        });
     }
 
 
@@ -309,6 +358,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(1.0d);
+        });
     }
 
 
@@ -404,11 +489,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 1.0d, 2.0d);
+                success = vh.weakCompareAndSetPlain(recv, 1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) vh.get(recv);
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -434,34 +519,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 2.0d, 1.0d);
+                success = vh.weakCompareAndSet(recv, 2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) vh.get(recv);
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double value");
+            assertEquals(x, 1.0d, "weakCompareAndSet double value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 1.0d);
+
             double o = (double) vh.getAndSet(recv, 2.0d);
             assertEquals(o, 1.0d, "getAndSet double");
             double x = (double) vh.get(recv);
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        vh.set(recv, 1.0d);
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndSetAcquire(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndSetAcquire double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, 2.0d, "getAndSetAcquire double value");
+        }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndSetRelease(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndSetRelease double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, 2.0d, "getAndSetRelease double value");
+        }
 
         // get and add, add and get
         {
-            double o = (double) vh.getAndAdd(recv, 3.0d);
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAdd(recv, 2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) vh.addAndGet(recv, 3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAddAcquire(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAddRelease(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddReleasedouble");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessDouble recv, VarHandle vh) {
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(recv, 1.0d);
+        });
     }
 
 
@@ -557,11 +717,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(1.0d, 2.0d);
+                success = vh.weakCompareAndSetPlain(1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) vh.get();
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -587,34 +747,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(2.0d, 1.0d);
+                success = vh.weakCompareAndSet(2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) vh.get();
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+            assertEquals(x, 1.0d, "weakCompareAndSet double");
         }
 
         // Compare set and get
         {
+            vh.set(1.0d);
+
             double o = (double) vh.getAndSet(2.0d);
             assertEquals(o, 1.0d, "getAndSet double");
             double x = (double) vh.get();
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        vh.set(1.0d);
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndSetAcquire(2.0d);
+            assertEquals(o, 1.0d, "getAndSetAcquire double");
+            double x = (double) vh.get();
+            assertEquals(x, 2.0d, "getAndSetAcquire double value");
+        }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndSetRelease(2.0d);
+            assertEquals(o, 1.0d, "getAndSetRelease double");
+            double x = (double) vh.get();
+            assertEquals(x, 2.0d, "getAndSetRelease double value");
+        }
 
         // get and add, add and get
         {
-            double o = (double) vh.getAndAdd( 3.0d);
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAdd(2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) vh.addAndGet(3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAddAcquire(2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAddRelease(2.0d);
+            assertEquals(o, 1.0d, "getAndAddReleasedouble");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(1.0d);
+        });
     }
 
 
@@ -713,11 +948,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 1.0d, 2.0d);
+                    success = vh.weakCompareAndSetPlain(array, i, 1.0d, 2.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSet double");
+                assertEquals(success, true, "weakCompareAndSetPlain double");
                 double x = (double) vh.get(array, i);
-                assertEquals(x, 2.0d, "weakCompareAndSet double value");
+                assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
             }
 
             {
@@ -743,30 +978,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 2.0d, 1.0d);
+                    success = vh.weakCompareAndSet(array, i, 2.0d, 1.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile double");
+                assertEquals(success, true, "weakCompareAndSet double");
                 double x = (double) vh.get(array, i);
-                assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+                assertEquals(x, 1.0d, "weakCompareAndSet double");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 1.0d);
+
                 double o = (double) vh.getAndSet(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndSet double");
                 double x = (double) vh.get(array, i);
                 assertEquals(x, 2.0d, "getAndSet double value");
             }
 
-            vh.set(array, i, 1.0d);
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndSetAcquire(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetAcquire double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, 2.0d, "getAndSetAcquire double value");
+            }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndSetRelease(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetRelease double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, 2.0d, "getAndSetRelease double value");
+            }
 
             // get and add, add and get
             {
-                double o = (double) vh.getAndAdd(array, i, 3.0d);
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAdd(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndAdd double");
-                double c = (double) vh.addAndGet(array, i, 3.0d);
-                assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
             }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAddAcquire(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddAcquire double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+            }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAddRelease(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddReleasedouble");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+            }
+
         }
     }
 
@@ -775,6 +1049,42 @@
 
         int i = 0;
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(array, i, 1.0d);
+        });
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1142,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0d, 2.0d);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0d, 2.0d);
+                boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
             });
 
             checkIOOBE(() -> {
@@ -852,12 +1162,25 @@
             });
 
             checkIOOBE(() -> {
-                double o = (double) vh.getAndAdd(array, ci, 3.0d);
+                double o = (double) vh.getAndSetAcquire(array, ci, 1.0d);
             });
 
             checkIOOBE(() -> {
-                double o = (double) vh.addAndGet(array, ci, 3.0d);
+                double o = (double) vh.getAndSetRelease(array, ci, 1.0d);
             });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAdd(array, ci, 1.0d);
+            });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAddAcquire(array, ci, 1.0d);
+            });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAddRelease(array, ci, 1.0d);
+            });
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java
index 4a2306b..4fa6b41 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(recv, 1.0f);
+        });
     }
 
 
@@ -309,6 +358,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(1.0f);
+        });
     }
 
 
@@ -404,11 +489,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 1.0f, 2.0f);
+                success = vh.weakCompareAndSetPlain(recv, 1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) vh.get(recv);
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -434,34 +519,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 2.0f, 1.0f);
+                success = vh.weakCompareAndSet(recv, 2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) vh.get(recv);
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float value");
+            assertEquals(x, 1.0f, "weakCompareAndSet float value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 1.0f);
+
             float o = (float) vh.getAndSet(recv, 2.0f);
             assertEquals(o, 1.0f, "getAndSet float");
             float x = (float) vh.get(recv);
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        vh.set(recv, 1.0f);
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndSetAcquire(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndSetAcquire float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, 2.0f, "getAndSetAcquire float value");
+        }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndSetRelease(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndSetRelease float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, 2.0f, "getAndSetRelease float value");
+        }
 
         // get and add, add and get
         {
-            float o = (float) vh.getAndAdd(recv, 3.0f);
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAdd(recv, 2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) vh.addAndGet(recv, 3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAddAcquire(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAddRelease(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddReleasefloat");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessFloat recv, VarHandle vh) {
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(recv, 1.0f);
+        });
     }
 
 
@@ -557,11 +717,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(1.0f, 2.0f);
+                success = vh.weakCompareAndSetPlain(1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) vh.get();
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -587,34 +747,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(2.0f, 1.0f);
+                success = vh.weakCompareAndSet(2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) vh.get();
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+            assertEquals(x, 1.0f, "weakCompareAndSet float");
         }
 
         // Compare set and get
         {
+            vh.set(1.0f);
+
             float o = (float) vh.getAndSet(2.0f);
             assertEquals(o, 1.0f, "getAndSet float");
             float x = (float) vh.get();
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        vh.set(1.0f);
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndSetAcquire(2.0f);
+            assertEquals(o, 1.0f, "getAndSetAcquire float");
+            float x = (float) vh.get();
+            assertEquals(x, 2.0f, "getAndSetAcquire float value");
+        }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndSetRelease(2.0f);
+            assertEquals(o, 1.0f, "getAndSetRelease float");
+            float x = (float) vh.get();
+            assertEquals(x, 2.0f, "getAndSetRelease float value");
+        }
 
         // get and add, add and get
         {
-            float o = (float) vh.getAndAdd( 3.0f);
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAdd(2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) vh.addAndGet(3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAddAcquire(2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAddRelease(2.0f);
+            assertEquals(o, 1.0f, "getAndAddReleasefloat");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(1.0f);
+        });
     }
 
 
@@ -713,11 +948,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 1.0f, 2.0f);
+                    success = vh.weakCompareAndSetPlain(array, i, 1.0f, 2.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSet float");
+                assertEquals(success, true, "weakCompareAndSetPlain float");
                 float x = (float) vh.get(array, i);
-                assertEquals(x, 2.0f, "weakCompareAndSet float value");
+                assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
             }
 
             {
@@ -743,30 +978,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 2.0f, 1.0f);
+                    success = vh.weakCompareAndSet(array, i, 2.0f, 1.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile float");
+                assertEquals(success, true, "weakCompareAndSet float");
                 float x = (float) vh.get(array, i);
-                assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+                assertEquals(x, 1.0f, "weakCompareAndSet float");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 1.0f);
+
                 float o = (float) vh.getAndSet(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndSet float");
                 float x = (float) vh.get(array, i);
                 assertEquals(x, 2.0f, "getAndSet float value");
             }
 
-            vh.set(array, i, 1.0f);
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndSetAcquire(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetAcquire float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, 2.0f, "getAndSetAcquire float value");
+            }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndSetRelease(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetRelease float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, 2.0f, "getAndSetRelease float value");
+            }
 
             // get and add, add and get
             {
-                float o = (float) vh.getAndAdd(array, i, 3.0f);
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAdd(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndAdd float");
-                float c = (float) vh.addAndGet(array, i, 3.0f);
-                assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
             }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAddAcquire(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddAcquire float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+            }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAddRelease(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddReleasefloat");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+            }
+
         }
     }
 
@@ -775,6 +1049,42 @@
 
         int i = 0;
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(array, i, 1.0f);
+        });
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1142,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0f, 2.0f);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0f, 2.0f);
+                boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
             });
 
             checkIOOBE(() -> {
@@ -852,12 +1162,25 @@
             });
 
             checkIOOBE(() -> {
-                float o = (float) vh.getAndAdd(array, ci, 3.0f);
+                float o = (float) vh.getAndSetAcquire(array, ci, 1.0f);
             });
 
             checkIOOBE(() -> {
-                float o = (float) vh.addAndGet(array, ci, 3.0f);
+                float o = (float) vh.getAndSetRelease(array, ci, 1.0f);
             });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAdd(array, ci, 1.0f);
+            });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAddAcquire(array, ci, 1.0f);
+            });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAddRelease(array, ci, 1.0f);
+            });
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java
index 930ba12..2fbcc9c 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 0x01234567, 0x89ABCDEF);
+                success = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) vh.get(recv);
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 0x89ABCDEF, 0x01234567);
+                success = vh.weakCompareAndSet(recv, 0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) vh.get(recv);
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int value");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 0x01234567);
+
             int o = (int) vh.getAndSet(recv, 0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndSet int");
             int x = (int) vh.get(recv);
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        vh.set(recv, 0x01234567);
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndSetAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndSetRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+        }
 
         // get and add, add and get
         {
-            int o = (int) vh.getAndAdd(recv, 0xCAFEBABE);
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAdd(recv, 0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) vh.addAndGet(recv, 0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAddAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAddRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddReleaseint");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOr(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAnd(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXor(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessInt recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(0x01234567, 0x89ABCDEF);
+                success = vh.weakCompareAndSetPlain(0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) vh.get();
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(0x89ABCDEF, 0x01234567);
+                success = vh.weakCompareAndSet(0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) vh.get();
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int");
         }
 
         // Compare set and get
         {
+            vh.set(0x01234567);
+
             int o = (int) vh.getAndSet(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndSet int");
             int x = (int) vh.get();
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        vh.set(0x01234567);
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndSetAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndSetRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+        }
 
         // get and add, add and get
         {
-            int o = (int) vh.getAndAdd( 0xCAFEBABE);
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAdd(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) vh.addAndGet(0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAddAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAddRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddReleaseint");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOr(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAnd(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXor(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 0x01234567, 0x89ABCDEF);
+                    success = vh.weakCompareAndSetPlain(array, i, 0x01234567, 0x89ABCDEF);
                 }
-                assertEquals(success, true, "weakCompareAndSet int");
+                assertEquals(success, true, "weakCompareAndSetPlain int");
                 int x = (int) vh.get(array, i);
-                assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+                assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 0x89ABCDEF, 0x01234567);
+                    success = vh.weakCompareAndSet(array, i, 0x89ABCDEF, 0x01234567);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile int");
+                assertEquals(success, true, "weakCompareAndSet int");
                 int x = (int) vh.get(array, i);
-                assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+                assertEquals(x, 0x01234567, "weakCompareAndSet int");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 0x01234567);
+
                 int o = (int) vh.getAndSet(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndSet int");
                 int x = (int) vh.get(array, i);
                 assertEquals(x, 0x89ABCDEF, "getAndSet int value");
             }
 
-            vh.set(array, i, 0x01234567);
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndSetAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndSetRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetRelease int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+            }
 
             // get and add, add and get
             {
-                int o = (int) vh.getAndAdd(array, i, 0xCAFEBABE);
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAdd(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndAdd int");
-                int c = (int) vh.addAndGet(array, i, 0xCAFEBABE);
-                assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAddAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndAddAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAddRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndAddReleaseint");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseOr(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseOrAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseOrRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseAnd(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseAndAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseAndRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseXor(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseXorAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndBitwiseXorRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 0x01234567, 0x89ABCDEF);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 0x01234567, 0x89ABCDEF);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 0x01234567, 0x89ABCDEF);
+                boolean r = vh.weakCompareAndSet(array, ci, 0x01234567, 0x89ABCDEF);
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                int o = (int) vh.getAndAdd(array, ci, 0xCAFEBABE);
+                int o = (int) vh.getAndSetAcquire(array, ci, 0x01234567);
             });
 
             checkIOOBE(() -> {
-                int o = (int) vh.addAndGet(array, ci, 0xCAFEBABE);
+                int o = (int) vh.getAndSetRelease(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndAdd(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndAddAcquire(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndAddRelease(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOr(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOrAcquire(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOrRelease(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAnd(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAndAcquire(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAndRelease(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXor(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXorAcquire(array, ci, 0x01234567);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXorRelease(array, ci, 0x01234567);
             });
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java
index 257e56b..d94cdc1 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessLong.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                success = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             }
-            assertEquals(success, true, "weakCompareAndSet long");
+            assertEquals(success, true, "weakCompareAndSetPlain long");
             long x = (long) vh.get(recv);
-            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                success = vh.weakCompareAndSet(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile long");
+            assertEquals(success, true, "weakCompareAndSet long");
             long x = (long) vh.get(recv);
-            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long value");
+            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
             long o = (long) vh.getAndSet(recv, 0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndSet long");
             long x = (long) vh.get(recv);
             assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
         }
 
-        vh.set(recv, 0x0123456789ABCDEFL);
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndSetAcquire(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetAcquire long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetAcquire long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndSetRelease(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetRelease long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetRelease long value");
+        }
 
         // get and add, add and get
         {
-            long o = (long) vh.getAndAdd(recv, 0xDEADBEEFDEADBEEFL);
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAdd(recv, 0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-            long c = (long) vh.addAndGet(recv, 0xDEADBEEFDEADBEEFL);
-            assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAddAcquire(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAddRelease(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddReleaselong");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOr(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOrAcquire(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOrRelease(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAnd(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAndAcquire(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAndRelease(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXor(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXorAcquire(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+        }
+
+        {
+            vh.set(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXorRelease(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+            long x = (long) vh.get(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessLong recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                success = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             }
-            assertEquals(success, true, "weakCompareAndSet long");
+            assertEquals(success, true, "weakCompareAndSetPlain long");
             long x = (long) vh.get();
-            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                success = vh.weakCompareAndSet(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile long");
+            assertEquals(success, true, "weakCompareAndSet long");
             long x = (long) vh.get();
-            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
         }
 
         // Compare set and get
         {
+            vh.set(0x0123456789ABCDEFL);
+
             long o = (long) vh.getAndSet(0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndSet long");
             long x = (long) vh.get();
             assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
         }
 
-        vh.set(0x0123456789ABCDEFL);
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndSetAcquire(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetAcquire long");
+            long x = (long) vh.get();
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetAcquire long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndSetRelease(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetRelease long");
+            long x = (long) vh.get();
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetRelease long value");
+        }
 
         // get and add, add and get
         {
-            long o = (long) vh.getAndAdd( 0xDEADBEEFDEADBEEFL);
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAdd(0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-            long c = (long) vh.addAndGet(0xDEADBEEFDEADBEEFL);
-            assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAddAcquire(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndAddRelease(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddReleaselong");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOr(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOrAcquire(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseOrRelease(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAnd(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAndAcquire(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseAndRelease(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXor(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXorAcquire(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+        }
+
+        {
+            vh.set(0x0123456789ABCDEFL);
+
+            long o = (long) vh.getAndBitwiseXorRelease(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+            long x = (long) vh.get();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                    success = vh.weakCompareAndSetPlain(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
                 }
-                assertEquals(success, true, "weakCompareAndSet long");
+                assertEquals(success, true, "weakCompareAndSetPlain long");
                 long x = (long) vh.get(array, i);
-                assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                    success = vh.weakCompareAndSet(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile long");
+                assertEquals(success, true, "weakCompareAndSet long");
                 long x = (long) vh.get(array, i);
-                assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+                assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
                 long o = (long) vh.getAndSet(array, i, 0xCAFEBABECAFEBABEL);
                 assertEquals(o, 0x0123456789ABCDEFL, "getAndSet long");
                 long x = (long) vh.get(array, i);
                 assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
             }
 
-            vh.set(array, i, 0x0123456789ABCDEFL);
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndSetAcquire(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndSetAcquire long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetAcquire long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndSetRelease(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndSetRelease long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetRelease long value");
+            }
 
             // get and add, add and get
             {
-                long o = (long) vh.getAndAdd(array, i, 0xDEADBEEFDEADBEEFL);
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndAdd(array, i, 0xCAFEBABECAFEBABEL);
                 assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-                long c = (long) vh.addAndGet(array, i, 0xDEADBEEFDEADBEEFL);
-                assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndAddAcquire(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndAddRelease(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndAddReleaselong");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseOr(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseOrAcquire(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseOrRelease(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseAnd(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseAndAcquire(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseAndRelease(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseXor(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseXorAcquire(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+            }
+
+            {
+                vh.set(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) vh.getAndBitwiseXorRelease(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+                long x = (long) vh.get(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                boolean r = vh.weakCompareAndSet(array, ci, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                long o = (long) vh.getAndAdd(array, ci, 0xDEADBEEFDEADBEEFL);
+                long o = (long) vh.getAndSetAcquire(array, ci, 0x0123456789ABCDEFL);
             });
 
             checkIOOBE(() -> {
-                long o = (long) vh.addAndGet(array, ci, 0xDEADBEEFDEADBEEFL);
+                long o = (long) vh.getAndSetRelease(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndAdd(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndAddAcquire(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndAddRelease(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOr(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOrAcquire(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOrRelease(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAnd(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAndAcquire(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAndRelease(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXor(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXorAcquire(array, ci, 0x0123456789ABCDEFL);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXorRelease(array, ci, 0x0123456789ABCDEFL);
             });
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java
index 53535de..7ff96eb 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessShort.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, (short)0x0123, (short)0x4567);
+                success = vh.weakCompareAndSetPlain(recv, (short)0x0123, (short)0x4567);
             }
-            assertEquals(success, true, "weakCompareAndSet short");
+            assertEquals(success, true, "weakCompareAndSetPlain short");
             short x = (short) vh.get(recv);
-            assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+            assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, (short)0x4567, (short)0x0123);
+                success = vh.weakCompareAndSet(recv, (short)0x4567, (short)0x0123);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile short");
+            assertEquals(success, true, "weakCompareAndSet short");
             short x = (short) vh.get(recv);
-            assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short value");
+            assertEquals(x, (short)0x0123, "weakCompareAndSet short value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, (short)0x0123);
+
             short o = (short) vh.getAndSet(recv, (short)0x4567);
             assertEquals(o, (short)0x0123, "getAndSet short");
             short x = (short) vh.get(recv);
             assertEquals(x, (short)0x4567, "getAndSet short value");
         }
 
-        vh.set(recv, (short)0x0123);
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndSetAcquire(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetAcquire short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)0x4567, "getAndSetAcquire short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndSetRelease(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetRelease short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)0x4567, "getAndSetRelease short value");
+        }
 
         // get and add, add and get
         {
-            short o = (short) vh.getAndAdd(recv, (short)0x89AB);
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndAdd(recv, (short)0x4567);
             assertEquals(o, (short)0x0123, "getAndAdd short");
-            short c = (short) vh.addAndGet(recv, (short)0x89AB);
-            assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndAddAcquire(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndAddRelease(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddReleaseshort");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOr(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOrAcquire(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOrRelease(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAnd(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAndAcquire(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAndRelease(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXor(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXorAcquire(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+        }
+
+        {
+            vh.set(recv, (short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXorRelease(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+            short x = (short) vh.get(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessShort recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet((short)0x0123, (short)0x4567);
+                success = vh.weakCompareAndSetPlain((short)0x0123, (short)0x4567);
             }
-            assertEquals(success, true, "weakCompareAndSet short");
+            assertEquals(success, true, "weakCompareAndSetPlain short");
             short x = (short) vh.get();
-            assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+            assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease((short)0x4567, (short)0x0123);
+                success = vh.weakCompareAndSet((short)0x4567, (short)0x0123);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile short");
+            assertEquals(success, true, "weakCompareAndSet short");
             short x = (short) vh.get();
-            assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+            assertEquals(x, (short)0x0123, "weakCompareAndSet short");
         }
 
         // Compare set and get
         {
+            vh.set((short)0x0123);
+
             short o = (short) vh.getAndSet((short)0x4567);
             assertEquals(o, (short)0x0123, "getAndSet short");
             short x = (short) vh.get();
             assertEquals(x, (short)0x4567, "getAndSet short value");
         }
 
-        vh.set((short)0x0123);
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndSetAcquire((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetAcquire short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)0x4567, "getAndSetAcquire short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndSetRelease((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetRelease short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)0x4567, "getAndSetRelease short value");
+        }
 
         // get and add, add and get
         {
-            short o = (short) vh.getAndAdd( (short)0x89AB);
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndAdd((short)0x4567);
             assertEquals(o, (short)0x0123, "getAndAdd short");
-            short c = (short) vh.addAndGet((short)0x89AB);
-            assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndAddAcquire((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndAddRelease((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddReleaseshort");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOr((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOrAcquire((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseOrRelease((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAnd((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAndAcquire((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseAndRelease((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXor((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXorAcquire((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+        }
+
+        {
+            vh.set((short)0x0123);
+
+            short o = (short) vh.getAndBitwiseXorRelease((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+            short x = (short) vh.get();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, (short)0x0123, (short)0x4567);
+                    success = vh.weakCompareAndSetPlain(array, i, (short)0x0123, (short)0x4567);
                 }
-                assertEquals(success, true, "weakCompareAndSet short");
+                assertEquals(success, true, "weakCompareAndSetPlain short");
                 short x = (short) vh.get(array, i);
-                assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+                assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, (short)0x4567, (short)0x0123);
+                    success = vh.weakCompareAndSet(array, i, (short)0x4567, (short)0x0123);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile short");
+                assertEquals(success, true, "weakCompareAndSet short");
                 short x = (short) vh.get(array, i);
-                assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+                assertEquals(x, (short)0x0123, "weakCompareAndSet short");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, (short)0x0123);
+
                 short o = (short) vh.getAndSet(array, i, (short)0x4567);
                 assertEquals(o, (short)0x0123, "getAndSet short");
                 short x = (short) vh.get(array, i);
                 assertEquals(x, (short)0x4567, "getAndSet short value");
             }
 
-            vh.set(array, i, (short)0x0123);
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndSetAcquire(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndSetAcquire short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)0x4567, "getAndSetAcquire short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndSetRelease(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndSetRelease short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)0x4567, "getAndSetRelease short value");
+            }
 
             // get and add, add and get
             {
-                short o = (short) vh.getAndAdd(array, i, (short)0x89AB);
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndAdd(array, i, (short)0x4567);
                 assertEquals(o, (short)0x0123, "getAndAdd short");
-                short c = (short) vh.addAndGet(array, i, (short)0x89AB);
-                assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndAddAcquire(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndAddRelease(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndAddReleaseshort");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseOr(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseOrAcquire(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseOrRelease(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseAnd(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseAndAcquire(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseAndRelease(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseXor(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseXorAcquire(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+            }
+
+            {
+                vh.set(array, i, (short)0x0123);
+
+                short o = (short) vh.getAndBitwiseXorRelease(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+                short x = (short) vh.get(array, i);
+                assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, (short)0x0123, (short)0x4567);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, (short)0x0123, (short)0x4567);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, (short)0x0123, (short)0x4567);
+                boolean r = vh.weakCompareAndSet(array, ci, (short)0x0123, (short)0x4567);
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                short o = (short) vh.getAndAdd(array, ci, (short)0x89AB);
+                short o = (short) vh.getAndSetAcquire(array, ci, (short)0x0123);
             });
 
             checkIOOBE(() -> {
-                short o = (short) vh.addAndGet(array, ci, (short)0x89AB);
+                short o = (short) vh.getAndSetRelease(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndAdd(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndAddAcquire(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndAddRelease(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseOr(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseOrAcquire(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseOrRelease(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseAnd(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseAndAcquire(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseAndRelease(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseXor(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseXorAcquire(array, ci, (short)0x0123);
+            });
+
+            checkIOOBE(() -> {
+                short o = (short) vh.getAndBitwiseXorRelease(array, ci, (short)0x0123);
             });
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java
index 0ac329d..0904505 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestAccessString.java
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -266,7 +279,47 @@
         });
 
         checkUOE(() -> {
-            String o = (String) vh.addAndGet(recv, "foo");
+            String o = (String) vh.getAndAddAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndAddRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOr(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAnd(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXor(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorRelease(recv, "foo");
         });
     }
 
@@ -321,7 +374,47 @@
         });
 
         checkUOE(() -> {
-            String o = (String) vh.addAndGet("foo");
+            String o = (String) vh.getAndAddAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndAddRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOr("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAnd("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXor("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorRelease("foo");
         });
     }
 
@@ -418,11 +511,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, "foo", "bar");
+                success = vh.weakCompareAndSetPlain(recv, "foo", "bar");
             }
-            assertEquals(success, true, "weakCompareAndSet String");
+            assertEquals(success, true, "weakCompareAndSetPlain String");
             String x = (String) vh.get(recv);
-            assertEquals(x, "bar", "weakCompareAndSet String value");
+            assertEquals(x, "bar", "weakCompareAndSetPlain String value");
         }
 
         {
@@ -448,21 +541,42 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, "bar", "foo");
+                success = vh.weakCompareAndSet(recv, "bar", "foo");
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile String");
+            assertEquals(success, true, "weakCompareAndSet String");
             String x = (String) vh.get(recv);
-            assertEquals(x, "foo", "weakCompareAndSetVolatile String value");
+            assertEquals(x, "foo", "weakCompareAndSet String value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, "foo");
+
             String o = (String) vh.getAndSet(recv, "bar");
             assertEquals(o, "foo", "getAndSet String");
             String x = (String) vh.get(recv);
             assertEquals(x, "bar", "getAndSet String value");
         }
 
+        {
+            vh.set(recv, "foo");
+
+            String o = (String) vh.getAndSetAcquire(recv, "bar");
+            assertEquals(o, "foo", "getAndSetAcquire String");
+            String x = (String) vh.get(recv);
+            assertEquals(x, "bar", "getAndSetAcquire String value");
+        }
+
+        {
+            vh.set(recv, "foo");
+
+            String o = (String) vh.getAndSetRelease(recv, "bar");
+            assertEquals(o, "foo", "getAndSetRelease String");
+            String x = (String) vh.get(recv);
+            assertEquals(x, "bar", "getAndSetRelease String value");
+        }
+
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessString recv, VarHandle vh) {
@@ -472,7 +586,47 @@
         });
 
         checkUOE(() -> {
-            String o = (String) vh.addAndGet(recv, "foo");
+            String o = (String) vh.getAndAddAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndAddRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOr(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAnd(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndRelease(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXor(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorAcquire(recv, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorRelease(recv, "foo");
         });
     }
 
@@ -569,11 +723,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet("foo", "bar");
+                success = vh.weakCompareAndSetPlain("foo", "bar");
             }
-            assertEquals(success, true, "weakCompareAndSet String");
+            assertEquals(success, true, "weakCompareAndSetPlain String");
             String x = (String) vh.get();
-            assertEquals(x, "bar", "weakCompareAndSet String value");
+            assertEquals(x, "bar", "weakCompareAndSetPlain String value");
         }
 
         {
@@ -599,21 +753,42 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease("bar", "foo");
+                success = vh.weakCompareAndSet("bar", "foo");
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile String");
+            assertEquals(success, true, "weakCompareAndSet String");
             String x = (String) vh.get();
-            assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+            assertEquals(x, "foo", "weakCompareAndSet String");
         }
 
         // Compare set and get
         {
+            vh.set("foo");
+
             String o = (String) vh.getAndSet("bar");
             assertEquals(o, "foo", "getAndSet String");
             String x = (String) vh.get();
             assertEquals(x, "bar", "getAndSet String value");
         }
 
+        {
+            vh.set("foo");
+
+            String o = (String) vh.getAndSetAcquire("bar");
+            assertEquals(o, "foo", "getAndSetAcquire String");
+            String x = (String) vh.get();
+            assertEquals(x, "bar", "getAndSetAcquire String value");
+        }
+
+        {
+            vh.set("foo");
+
+            String o = (String) vh.getAndSetRelease("bar");
+            assertEquals(o, "foo", "getAndSetRelease String");
+            String x = (String) vh.get();
+            assertEquals(x, "bar", "getAndSetRelease String value");
+        }
+
+
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
@@ -623,7 +798,47 @@
         });
 
         checkUOE(() -> {
-            String o = (String) vh.addAndGet("foo");
+            String o = (String) vh.getAndAddAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndAddRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOr("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAnd("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndRelease("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXor("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorAcquire("foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorRelease("foo");
         });
     }
 
@@ -723,11 +938,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, "foo", "bar");
+                    success = vh.weakCompareAndSetPlain(array, i, "foo", "bar");
                 }
-                assertEquals(success, true, "weakCompareAndSet String");
+                assertEquals(success, true, "weakCompareAndSetPlain String");
                 String x = (String) vh.get(array, i);
-                assertEquals(x, "bar", "weakCompareAndSet String value");
+                assertEquals(x, "bar", "weakCompareAndSetPlain String value");
             }
 
             {
@@ -753,21 +968,42 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, "bar", "foo");
+                    success = vh.weakCompareAndSet(array, i, "bar", "foo");
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile String");
+                assertEquals(success, true, "weakCompareAndSet String");
                 String x = (String) vh.get(array, i);
-                assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+                assertEquals(x, "foo", "weakCompareAndSet String");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, "foo");
+
                 String o = (String) vh.getAndSet(array, i, "bar");
                 assertEquals(o, "foo", "getAndSet String");
                 String x = (String) vh.get(array, i);
                 assertEquals(x, "bar", "getAndSet String value");
             }
 
+            {
+                vh.set(array, i, "foo");
+
+                String o = (String) vh.getAndSetAcquire(array, i, "bar");
+                assertEquals(o, "foo", "getAndSetAcquire String");
+                String x = (String) vh.get(array, i);
+                assertEquals(x, "bar", "getAndSetAcquire String value");
+            }
+
+            {
+                vh.set(array, i, "foo");
+
+                String o = (String) vh.getAndSetRelease(array, i, "bar");
+                assertEquals(o, "foo", "getAndSetRelease String");
+                String x = (String) vh.get(array, i);
+                assertEquals(x, "bar", "getAndSetRelease String value");
+            }
+
+
         }
     }
 
@@ -781,7 +1017,47 @@
         });
 
         checkUOE(() -> {
-            String o = (String) vh.addAndGet(array, i, "foo");
+            String o = (String) vh.getAndAddAcquire(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndAddRelease(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOr(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrAcquire(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseOrRelease(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAnd(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndAcquire(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseAndRelease(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXor(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorAcquire(array, i, "foo");
+        });
+
+        checkUOE(() -> {
+            String o = (String) vh.getAndBitwiseXorRelease(array, i, "foo");
         });
     }
 
@@ -840,11 +1116,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, "foo", "bar");
+                boolean r = vh.weakCompareAndSetPlain(array, ci, "foo", "bar");
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, "foo", "bar");
+                boolean r = vh.weakCompareAndSet(array, ci, "foo", "bar");
             });
 
             checkIOOBE(() -> {
@@ -859,6 +1135,15 @@
                 String o = (String) vh.getAndSet(array, ci, "foo");
             });
 
+            checkIOOBE(() -> {
+                String o = (String) vh.getAndSetAcquire(array, ci, "foo");
+            });
+
+            checkIOOBE(() -> {
+                String o = (String) vh.getAndSetRelease(array, ci, "foo");
+            });
+
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java
index dc9db6f..89d2269 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java
@@ -92,14 +92,27 @@
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -201,11 +214,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
@@ -221,11 +234,59 @@
         });
 
         checkUOE(() -> {
+            char o = (char) vh.getAndSetAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndSetRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
             char o = (char) vh.getAndAdd(array, ci, VALUE_1);
         });
 
         checkUOE(() -> {
-            char o = (char) vh.addAndGet(array, ci, VALUE_1);
+            char o = (char) vh.getAndAddAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndAddRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseOr(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseXor(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            char o = (char) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
         });
     }
 
@@ -270,11 +331,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -290,11 +351,59 @@
             });
 
             checkUOE(() -> {
+                char o = (char) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
                 char o = (char) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                char o = (char) vh.addAndGet(array, ci, VALUE_1);
+                char o = (char) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -315,11 +424,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -333,12 +442,59 @@
             checkUOE(() -> {
                 char o = (char) vh.getAndSet(array, ci, VALUE_1);
             });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
             checkUOE(() -> {
                 char o = (char) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                char o = (char) vh.addAndGet(array, ci, VALUE_1);
+                char o = (char) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                char o = (char) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
     }
@@ -385,6 +541,7 @@
             });
 
 
+
         }
     }
 
@@ -434,6 +591,7 @@
                 });
 
 
+
             }
         }
     }
@@ -518,6 +676,7 @@
                     });
 
 
+
                 }
             }
         }
@@ -564,6 +723,7 @@
                     assertEquals(x, VALUE_2, "setOpaque char value");
                 }
 
+
             }
         }
     }
@@ -609,6 +769,7 @@
                     assertEquals(x, VALUE_2, "setOpaque char value");
                 }
 
+
             }
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java
index a713e91..5757d19 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsDouble.java
@@ -92,14 +92,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -190,7 +203,47 @@
         });
 
         checkUOE(() -> {
-            double o = (double) vh.addAndGet(array, ci, VALUE_1);
+            double o = (double) vh.getAndAddAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndAddRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
         });
     }
 
@@ -236,11 +289,11 @@
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
@@ -255,13 +308,61 @@
                 double o = (double) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkROBE(() -> {
+                double o = (double) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                double o = (double) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
 
             checkUOE(() -> {
                 double o = (double) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                double o = (double) vh.addAndGet(array, ci, VALUE_1);
+                double o = (double) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -270,7 +371,46 @@
             });
 
             checkUOE(() -> {
-                double o = (double) vh.addAndGet(array, ci, VALUE_1);
+                double o = (double) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                double o = (double) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
     }
@@ -333,11 +473,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
@@ -352,6 +492,15 @@
                 double o = (double) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+
 
         }
     }
@@ -418,11 +567,11 @@
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
@@ -437,6 +586,15 @@
                     double o = (double) vh.getAndSet(array, ci, VALUE_1);
                 });
 
+                checkIOOBE(() -> {
+                    double o = (double) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    double o = (double) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+
             }
         }
     }
@@ -494,11 +652,11 @@
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
@@ -513,6 +671,14 @@
                     double o = (double) vh.getAndSet(array, ci, VALUE_1);
                 });
 
+                checkISE(() -> {
+                    double o = (double) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    double o = (double) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
 
             }
         }
@@ -573,11 +739,11 @@
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
@@ -592,6 +758,15 @@
                         double o = (double) vh.getAndSet(array, ci, VALUE_1);
                     });
 
+                    checkISE(() -> {
+                        double o = (double) vh.getAndSetAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        double o = (double) vh.getAndSetRelease(array, ci, VALUE_1);
+                    });
+
+
                 }
             }
         }
@@ -700,11 +875,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet double");
+                    assertEquals(success, true, "weakCompareAndSetPlain double");
                     double x = (double) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet double value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain double value");
                 }
 
                 {
@@ -728,20 +903,44 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile double");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet double");
                     double x = (double) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile double value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet double");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     double o = (double) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet double");
                     double x = (double) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet double value");
                 }
 
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    double o = (double) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire double");
+                    double x = (double) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire double value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    double o = (double) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease double");
+                    double x = (double) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease double value");
+                }
+
+
             }
         }
     }
@@ -849,11 +1048,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet double");
+                    assertEquals(success, true, "weakCompareAndSetPlain double");
                     double x = (double) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet double value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain double value");
                 }
 
                 {
@@ -877,20 +1076,44 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile double");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet double");
                     double x = (double) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile double value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet double");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     double o = (double) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet double");
                     double x = (double) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet double value");
                 }
 
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    double o = (double) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire double");
+                    double x = (double) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire double value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    double o = (double) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease double");
+                    double x = (double) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease double value");
+                }
+
+
             }
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java
index 3e964dc..89d8fe9 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsFloat.java
@@ -92,14 +92,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -190,7 +203,47 @@
         });
 
         checkUOE(() -> {
-            float o = (float) vh.addAndGet(array, ci, VALUE_1);
+            float o = (float) vh.getAndAddAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndAddRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
         });
     }
 
@@ -236,11 +289,11 @@
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
@@ -255,13 +308,61 @@
                 float o = (float) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkROBE(() -> {
+                float o = (float) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                float o = (float) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
 
             checkUOE(() -> {
                 float o = (float) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                float o = (float) vh.addAndGet(array, ci, VALUE_1);
+                float o = (float) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -270,7 +371,46 @@
             });
 
             checkUOE(() -> {
-                float o = (float) vh.addAndGet(array, ci, VALUE_1);
+                float o = (float) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                float o = (float) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
     }
@@ -333,11 +473,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
@@ -352,6 +492,15 @@
                 float o = (float) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+
 
         }
     }
@@ -418,11 +567,11 @@
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
@@ -437,6 +586,15 @@
                     float o = (float) vh.getAndSet(array, ci, VALUE_1);
                 });
 
+                checkIOOBE(() -> {
+                    float o = (float) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    float o = (float) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+
             }
         }
     }
@@ -494,11 +652,11 @@
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
@@ -513,6 +671,14 @@
                     float o = (float) vh.getAndSet(array, ci, VALUE_1);
                 });
 
+                checkISE(() -> {
+                    float o = (float) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    float o = (float) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
 
             }
         }
@@ -573,11 +739,11 @@
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
@@ -592,6 +758,15 @@
                         float o = (float) vh.getAndSet(array, ci, VALUE_1);
                     });
 
+                    checkISE(() -> {
+                        float o = (float) vh.getAndSetAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        float o = (float) vh.getAndSetRelease(array, ci, VALUE_1);
+                    });
+
+
                 }
             }
         }
@@ -700,11 +875,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet float");
+                    assertEquals(success, true, "weakCompareAndSetPlain float");
                     float x = (float) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet float value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain float value");
                 }
 
                 {
@@ -728,20 +903,44 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile float");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet float");
                     float x = (float) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile float value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet float");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     float o = (float) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet float");
                     float x = (float) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet float value");
                 }
 
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    float o = (float) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire float");
+                    float x = (float) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire float value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    float o = (float) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease float");
+                    float x = (float) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease float value");
+                }
+
+
             }
         }
     }
@@ -849,11 +1048,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet float");
+                    assertEquals(success, true, "weakCompareAndSetPlain float");
                     float x = (float) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet float value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain float value");
                 }
 
                 {
@@ -877,20 +1076,44 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile float");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet float");
                     float x = (float) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile float value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet float");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     float o = (float) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet float");
                     float x = (float) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet float value");
                 }
 
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    float o = (float) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire float");
+                    float x = (float) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire float value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    float o = (float) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease float");
+                    float x = (float) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease float value");
+                }
+
+
             }
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java
index bbda8c0..79e9dab 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java
@@ -92,14 +92,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -185,6 +198,7 @@
         int ci = 1;
 
 
+
     }
 
     static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) {
@@ -229,11 +243,11 @@
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
@@ -248,13 +262,61 @@
                 int o = (int) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkROBE(() -> {
+                int o = (int) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
 
             checkROBE(() -> {
                 int o = (int) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkROBE(() -> {
-                int o = (int) vh.addAndGet(array, ci, VALUE_1);
+                int o = (int) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                int o = (int) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -319,11 +381,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
@@ -339,11 +401,59 @@
             });
 
             checkIOOBE(() -> {
+                int o = (int) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
                 int o = (int) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkIOOBE(() -> {
-                int o = (int) vh.addAndGet(array, ci, VALUE_1);
+                int o = (int) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                int o = (int) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
 
         }
@@ -411,11 +521,11 @@
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
@@ -431,11 +541,59 @@
                 });
 
                 checkIOOBE(() -> {
+                    int o = (int) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
                     int o = (int) vh.getAndAdd(array, ci, VALUE_1);
                 });
 
                 checkIOOBE(() -> {
-                    int o = (int) vh.addAndGet(array, ci, VALUE_1);
+                    int o = (int) vh.getAndAddAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndAddRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    int o = (int) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
                 });
             }
         }
@@ -494,11 +652,11 @@
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
@@ -514,13 +672,60 @@
                 });
 
                 checkISE(() -> {
+                    int o = (int) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
                     int o = (int) vh.getAndAdd(array, ci, VALUE_1);
                 });
 
                 checkISE(() -> {
-                    int o = (int) vh.addAndGet(array, ci, VALUE_1);
+                    int o = (int) vh.getAndAddAcquire(array, ci, VALUE_1);
                 });
 
+                checkISE(() -> {
+                    int o = (int) vh.getAndAddRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    int o = (int) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+                });
             }
         }
     }
@@ -580,11 +785,11 @@
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
@@ -600,11 +805,59 @@
                     });
 
                     checkISE(() -> {
+                        int o = (int) vh.getAndSetAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndSetRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
                         int o = (int) vh.getAndAdd(array, ci, VALUE_1);
                     });
 
                     checkISE(() -> {
-                        int o = (int) vh.addAndGet(array, ci, VALUE_1);
+                        int o = (int) vh.getAndAddAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndAddRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        int o = (int) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
                     });
                 }
             }
@@ -714,11 +967,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet int");
+                    assertEquals(success, true, "weakCompareAndSetPlain int");
                     int x = (int) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet int value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain int value");
                 }
 
                 {
@@ -742,28 +995,153 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile int");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet int");
                     int x = (int) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile int value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet int");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     int o = (int) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet int");
                     int x = (int) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet int value");
                 }
 
-                vh.set(array, i, VALUE_1);
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease int value");
+                }
 
                 // get and add, add and get
                 {
-                    int o = (int) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd int");
-                    int c = (int) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd int value");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease int value");
+                }
+
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease int value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease int value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease int value");
                 }
             }
         }
@@ -872,11 +1250,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet int");
+                    assertEquals(success, true, "weakCompareAndSetPlain int");
                     int x = (int) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet int value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain int value");
                 }
 
                 {
@@ -900,28 +1278,153 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile int");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet int");
                     int x = (int) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile int value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet int");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     int o = (int) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet int");
                     int x = (int) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet int value");
                 }
 
-                vh.set(array, i, VALUE_1);
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease int value");
+                }
 
                 // get and add, add and get
                 {
-                    int o = (int) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd int");
-                    int c = (int) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd int value");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease int value");
+                }
+
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease int value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease int value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire int value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    int o = (int) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease int");
+                    int x = (int) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease int value");
                 }
             }
         }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java
index e203f8e..01cdfce 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsLong.java
@@ -92,14 +92,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -185,6 +198,7 @@
         int ci = 1;
 
 
+
     }
 
     static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) {
@@ -229,11 +243,11 @@
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
@@ -248,13 +262,61 @@
                 long o = (long) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkROBE(() -> {
+                long o = (long) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
 
             checkROBE(() -> {
                 long o = (long) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkROBE(() -> {
-                long o = (long) vh.addAndGet(array, ci, VALUE_1);
+                long o = (long) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                long o = (long) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -319,11 +381,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
@@ -339,11 +401,59 @@
             });
 
             checkIOOBE(() -> {
+                long o = (long) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
                 long o = (long) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkIOOBE(() -> {
-                long o = (long) vh.addAndGet(array, ci, VALUE_1);
+                long o = (long) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                long o = (long) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
 
         }
@@ -411,11 +521,11 @@
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
@@ -431,11 +541,59 @@
                 });
 
                 checkIOOBE(() -> {
+                    long o = (long) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
                     long o = (long) vh.getAndAdd(array, ci, VALUE_1);
                 });
 
                 checkIOOBE(() -> {
-                    long o = (long) vh.addAndGet(array, ci, VALUE_1);
+                    long o = (long) vh.getAndAddAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndAddRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    long o = (long) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
                 });
             }
         }
@@ -494,11 +652,11 @@
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
@@ -514,13 +672,60 @@
                 });
 
                 checkISE(() -> {
+                    long o = (long) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
                     long o = (long) vh.getAndAdd(array, ci, VALUE_1);
                 });
 
                 checkISE(() -> {
-                    long o = (long) vh.addAndGet(array, ci, VALUE_1);
+                    long o = (long) vh.getAndAddAcquire(array, ci, VALUE_1);
                 });
 
+                checkISE(() -> {
+                    long o = (long) vh.getAndAddRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    long o = (long) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+                });
             }
         }
     }
@@ -580,11 +785,11 @@
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
@@ -600,11 +805,59 @@
                     });
 
                     checkISE(() -> {
+                        long o = (long) vh.getAndSetAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndSetRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
                         long o = (long) vh.getAndAdd(array, ci, VALUE_1);
                     });
 
                     checkISE(() -> {
-                        long o = (long) vh.addAndGet(array, ci, VALUE_1);
+                        long o = (long) vh.getAndAddAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndAddRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        long o = (long) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
                     });
                 }
             }
@@ -714,11 +967,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet long");
+                    assertEquals(success, true, "weakCompareAndSetPlain long");
                     long x = (long) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet long value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain long value");
                 }
 
                 {
@@ -742,28 +995,153 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile long");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet long");
                     long x = (long) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile long value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet long");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     long o = (long) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet long");
                     long x = (long) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet long value");
                 }
 
-                vh.set(array, i, VALUE_1);
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease long value");
+                }
 
                 // get and add, add and get
                 {
-                    long o = (long) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd long");
-                    long c = (long) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd long value");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease long value");
+                }
+
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease long value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease long value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease long value");
                 }
             }
         }
@@ -872,11 +1250,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet long");
+                    assertEquals(success, true, "weakCompareAndSetPlain long");
                     long x = (long) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet long value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain long value");
                 }
 
                 {
@@ -900,28 +1278,153 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile long");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet long");
                     long x = (long) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile long value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet long");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     long o = (long) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet long");
                     long x = (long) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet long value");
                 }
 
-                vh.set(array, i, VALUE_1);
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease long value");
+                }
 
                 // get and add, add and get
                 {
-                    long o = (long) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd long");
-                    long c = (long) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd long value");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease long value");
+                }
+
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease long value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease long value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire long value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    long o = (long) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease long");
+                    long x = (long) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease long value");
                 }
             }
         }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java
index d96715e..29e45a0 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java
@@ -92,14 +92,27 @@
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
     @Test(dataProvider = "typesProvider")
@@ -201,11 +214,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
@@ -221,11 +234,59 @@
         });
 
         checkUOE(() -> {
+            short o = (short) vh.getAndSetAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndSetRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
             short o = (short) vh.getAndAdd(array, ci, VALUE_1);
         });
 
         checkUOE(() -> {
-            short o = (short) vh.addAndGet(array, ci, VALUE_1);
+            short o = (short) vh.getAndAddAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndAddRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseOr(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseXor(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            short o = (short) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
         });
     }
 
@@ -270,11 +331,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -290,11 +351,59 @@
             });
 
             checkUOE(() -> {
+                short o = (short) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
                 short o = (short) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                short o = (short) vh.addAndGet(array, ci, VALUE_1);
+                short o = (short) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
         else {
@@ -315,11 +424,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -333,12 +442,59 @@
             checkUOE(() -> {
                 short o = (short) vh.getAndSet(array, ci, VALUE_1);
             });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
             checkUOE(() -> {
                 short o = (short) vh.getAndAdd(array, ci, VALUE_1);
             });
 
             checkUOE(() -> {
-                short o = (short) vh.addAndGet(array, ci, VALUE_1);
+                short o = (short) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndAddRelease(array, ci, VALUE_1);
+            });
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                short o = (short) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
             });
         }
     }
@@ -385,6 +541,7 @@
             });
 
 
+
         }
     }
 
@@ -434,6 +591,7 @@
                 });
 
 
+
             }
         }
     }
@@ -518,6 +676,7 @@
                     });
 
 
+
                 }
             }
         }
@@ -564,6 +723,7 @@
                     assertEquals(x, VALUE_2, "setOpaque short value");
                 }
 
+
             }
         }
     }
@@ -609,6 +769,7 @@
                     assertEquals(x, VALUE_2, "setOpaque short value");
                 }
 
+
             }
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java
index 544fcb3..99904d3 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessBoolean.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, true, false);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, false, true);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(x, true, "weakCompareAndSet boolean");
         }
 
         // Compare set and get
@@ -255,6 +255,90 @@
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessBoolean recv, Handles hs) throws Throwable {
@@ -264,6 +348,7 @@
                 boolean r = (boolean) hs.get(am).invokeExact(recv, true);
             });
         }
+
     }
 
 
@@ -359,11 +444,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(true, false);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -389,21 +474,127 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(false, true);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(x, true, "weakCompareAndSet boolean");
         }
 
         // Compare set and get
         {
-            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET).invokeExact( false);
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET).invokeExact(false);
             assertEquals(o, true, "getAndSet boolean");
             boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(false);
+            assertEquals(o, true, "getAndSetAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, false, "getAndSetAcquire boolean value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(false);
+            assertEquals(o, true, "getAndSetRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, false, "getAndSetRelease boolean value");
+        }
+
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
@@ -413,6 +604,7 @@
                 boolean r = (boolean) hs.get(am).invokeExact(true);
             });
         }
+
     }
 
 
@@ -511,11 +703,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, true, false);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, true, false);
                 }
-                assertEquals(success, true, "weakCompareAndSet boolean");
+                assertEquals(success, true, "weakCompareAndSetPlain boolean");
                 boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, false, "weakCompareAndSet boolean value");
+                assertEquals(x, false, "weakCompareAndSetPlain boolean value");
             }
 
             {
@@ -541,21 +733,125 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, false, true);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, false, true);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(success, true, "weakCompareAndSet boolean");
                 boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(x, true, "weakCompareAndSet boolean");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
                 boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, false);
                 assertEquals(o, true, "getAndSet boolean");
                 boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, false, "getAndSet boolean value");
             }
 
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+                boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, false);
+                assertEquals(o, true, "getAndSetAcquire boolean");
+                boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, false, "getAndSetAcquire boolean value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+                boolean o = (boolean) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, false);
+                assertEquals(o, true, "getAndSetRelease boolean");
+                boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, false, "getAndSetRelease boolean value");
+            }
+
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, true);
+
+            boolean o = (boolean) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
         }
     }
 
@@ -569,6 +865,7 @@
                 boolean o = (boolean) hs.get(am).invokeExact(array, i, true);
             });
         }
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -607,6 +904,12 @@
                 });
             }
 
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    boolean o = (boolean) hs.get(am).invokeExact(array, ci, false);
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java
index 21e09b8..7ab3b99 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessByte.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (byte)0x01, (byte)0x23);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, (byte)0x23, (byte)0x01);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
         }
 
         // Compare set and get
@@ -255,19 +255,122 @@
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
-
         // get and add, add and get
         {
-            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, (byte)0x45);
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, (byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, (byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessByte recv, Handles hs) throws Throwable {
 
+
     }
 
 
@@ -363,11 +466,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((byte)0x01, (byte)0x23);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -393,34 +496,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact((byte)0x23, (byte)0x01);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
         }
 
         // Compare set and get
         {
-            byte o = (byte) hs.get(TestAccessMode.GET_AND_SET).invokeExact( (byte)0x23);
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_SET).invokeExact((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndSet byte");
             byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+        }
 
         // get and add, add and get
         {
-            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( (byte)0x45);
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) hs.get(TestAccessMode.ADD_AND_GET).invokeExact((byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
     }
 
 
@@ -519,11 +747,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (byte)0x01, (byte)0x23);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (byte)0x01, (byte)0x23);
                 }
-                assertEquals(success, true, "weakCompareAndSet byte");
+                assertEquals(success, true, "weakCompareAndSetPlain byte");
                 byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+                assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
             }
 
             {
@@ -549,30 +777,152 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, (byte)0x23, (byte)0x01);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (byte)0x23, (byte)0x01);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile byte");
+                assertEquals(success, true, "weakCompareAndSet byte");
                 byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+                assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
                 byte o = (byte) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndSet byte");
                 byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, (byte)0x23, "getAndSet byte value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+                byte o = (byte) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+                byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+                byte o = (byte) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+                byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+            }
 
             // get and add, add and get
             {
-                byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, (byte)0x45);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+                byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndAdd byte");
-                byte c = (byte) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, (byte)0x45);
-                assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+                byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+                byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+                byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+                byte o = (byte) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddRelease byte");
+                byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+            }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (byte)0x01);
+
+            byte o = (byte) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
+        }
         }
     }
 
@@ -581,6 +931,7 @@
 
         final int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +975,12 @@
                     byte o = (byte) hs.get(am).invokeExact(array, ci, (byte)0x45);
                 });
             }
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    byte o = (byte) hs.get(am).invokeExact(array, ci, (byte)0x45);
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java
index 1f2e5ee..762134b 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessChar.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, '\u0123', '\u4567');
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, '\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, '\u4567', '\u0123');
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, '\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+            assertEquals(x, '\u0123', "weakCompareAndSet char");
         }
 
         // Compare set and get
@@ -255,19 +255,122 @@
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
-
         // get and add, add and get
         {
-            char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, '\u89AB');
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, '\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, '\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessChar recv, Handles hs) throws Throwable {
 
+
     }
 
 
@@ -363,11 +466,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact('\u0123', '\u4567');
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact('\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -393,34 +496,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact('\u4567', '\u0123');
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact('\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+            assertEquals(x, '\u0123', "weakCompareAndSet char");
         }
 
         // Compare set and get
         {
-            char o = (char) hs.get(TestAccessMode.GET_AND_SET).invokeExact( '\u4567');
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_SET).invokeExact('\u4567');
             assertEquals(o, '\u0123', "getAndSet char");
             char x = (char) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact('\u0123');
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndSetAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, '\u4567', "getAndSetAcquire char value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndSetRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, '\u4567', "getAndSetRelease char value");
+        }
 
         // get and add, add and get
         {
-            char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( '\u89AB');
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact('\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) hs.get(TestAccessMode.ADD_AND_GET).invokeExact('\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndAddRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact('\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
     }
 
 
@@ -519,11 +747,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, '\u0123', '\u4567');
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, '\u0123', '\u4567');
                 }
-                assertEquals(success, true, "weakCompareAndSet char");
+                assertEquals(success, true, "weakCompareAndSetPlain char");
                 char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, '\u4567', "weakCompareAndSet char value");
+                assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
             }
 
             {
@@ -549,30 +777,152 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, '\u4567', '\u0123');
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, '\u4567', '\u0123');
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile char");
+                assertEquals(success, true, "weakCompareAndSet char");
                 char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+                assertEquals(x, '\u0123', "weakCompareAndSet char");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
                 char o = (char) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndSet char");
                 char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, '\u4567', "getAndSet char value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+                char o = (char) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetAcquire char");
+                char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, '\u4567', "getAndSetAcquire char value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+                char o = (char) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetRelease char");
+                char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, '\u4567', "getAndSetRelease char value");
+            }
 
             // get and add, add and get
             {
-                char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, '\u89AB');
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+                char o = (char) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndAdd char");
-                char c = (char) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, '\u89AB');
-                assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+                char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+                char o = (char) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddAcquire char");
+                char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+                char o = (char) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddRelease char");
+                char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+            }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, '\u0123');
+
+            char o = (char) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
+        }
         }
     }
 
@@ -581,6 +931,7 @@
 
         final int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +975,12 @@
                     char o = (char) hs.get(am).invokeExact(array, ci, '\u89AB');
                 });
             }
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    char o = (char) hs.get(am).invokeExact(array, ci, '\u89AB');
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java
index 26cb426..409d700 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessDouble.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 1.0d, 2.0d);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 2.0d, 1.0d);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+            assertEquals(x, 1.0d, "weakCompareAndSet double");
         }
 
         // Compare set and get
@@ -255,19 +255,44 @@
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, 1.0d);
-
         // get and add, add and get
         {
-            double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 3.0d);
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, 3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddRelease double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessDouble recv, Handles hs) throws Throwable {
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                double r = (double) hs.get(am).invokeExact(recv, 1.0d);
+            });
+        }
     }
 
 
@@ -363,11 +388,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(1.0d, 2.0d);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -393,34 +418,81 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(2.0d, 1.0d);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+            assertEquals(x, 1.0d, "weakCompareAndSet double");
         }
 
         // Compare set and get
         {
-            double o = (double) hs.get(TestAccessMode.GET_AND_SET).invokeExact( 2.0d);
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_SET).invokeExact(2.0d);
             assertEquals(o, 1.0d, "getAndSet double");
             double x = (double) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(1.0d);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(2.0d);
+            assertEquals(o, 1.0d, "getAndSetAcquire double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 2.0d, "getAndSetAcquire double value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(2.0d);
+            assertEquals(o, 1.0d, "getAndSetRelease double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 2.0d, "getAndSetRelease double value");
+        }
 
         // get and add, add and get
         {
-            double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( 3.0d);
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0d);
+
+            double o = (double) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(2.0d);
+            assertEquals(o, 1.0d, "getAndAddRelease double");
+            double x = (double) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                double r = (double) hs.get(am).invokeExact(1.0d);
+            });
+        }
     }
 
 
@@ -519,11 +591,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 1.0d, 2.0d);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0d, 2.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSet double");
+                assertEquals(success, true, "weakCompareAndSetPlain double");
                 double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 2.0d, "weakCompareAndSet double value");
+                assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
             }
 
             {
@@ -549,30 +621,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 2.0d, 1.0d);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0d, 1.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile double");
+                assertEquals(success, true, "weakCompareAndSet double");
                 double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+                assertEquals(x, 1.0d, "weakCompareAndSet double");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
                 double o = (double) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndSet double");
                 double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, 2.0d, "getAndSet double value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
+                double o = (double) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetAcquire double");
+                double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 2.0d, "getAndSetAcquire double value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
+                double o = (double) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetRelease double");
+                double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 2.0d, "getAndSetRelease double value");
+            }
 
             // get and add, add and get
             {
-                double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 3.0d);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
+                double o = (double) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndAdd double");
-                double c = (double) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, 3.0d);
-                assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+                double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
+                double o = (double) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddAcquire double");
+                double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0d);
+
+                double o = (double) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddRelease double");
+                double x = (double) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+            }
+
         }
     }
 
@@ -581,6 +692,12 @@
 
         final int i = 0;
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                double o = (double) hs.get(am).invokeExact(array, i, 1.0d);
+            });
+        }
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +741,7 @@
                     double o = (double) hs.get(am).invokeExact(array, ci, 3.0d);
                 });
             }
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java
index d28e2f4..b826e18 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessFloat.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 1.0f, 2.0f);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 2.0f, 1.0f);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+            assertEquals(x, 1.0f, "weakCompareAndSet float");
         }
 
         // Compare set and get
@@ -255,19 +255,44 @@
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, 1.0f);
-
         // get and add, add and get
         {
-            float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 3.0f);
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, 3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddRelease float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessFloat recv, Handles hs) throws Throwable {
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                float r = (float) hs.get(am).invokeExact(recv, 1.0f);
+            });
+        }
     }
 
 
@@ -363,11 +388,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(1.0f, 2.0f);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -393,34 +418,81 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(2.0f, 1.0f);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+            assertEquals(x, 1.0f, "weakCompareAndSet float");
         }
 
         // Compare set and get
         {
-            float o = (float) hs.get(TestAccessMode.GET_AND_SET).invokeExact( 2.0f);
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_SET).invokeExact(2.0f);
             assertEquals(o, 1.0f, "getAndSet float");
             float x = (float) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(1.0f);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(2.0f);
+            assertEquals(o, 1.0f, "getAndSetAcquire float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 2.0f, "getAndSetAcquire float value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(2.0f);
+            assertEquals(o, 1.0f, "getAndSetRelease float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 2.0f, "getAndSetRelease float value");
+        }
 
         // get and add, add and get
         {
-            float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( 3.0f);
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(1.0f);
+
+            float o = (float) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(2.0f);
+            assertEquals(o, 1.0f, "getAndAddRelease float");
+            float x = (float) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                float r = (float) hs.get(am).invokeExact(1.0f);
+            });
+        }
     }
 
 
@@ -519,11 +591,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 1.0f, 2.0f);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 1.0f, 2.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSet float");
+                assertEquals(success, true, "weakCompareAndSetPlain float");
                 float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 2.0f, "weakCompareAndSet float value");
+                assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
             }
 
             {
@@ -549,30 +621,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 2.0f, 1.0f);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 2.0f, 1.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile float");
+                assertEquals(success, true, "weakCompareAndSet float");
                 float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+                assertEquals(x, 1.0f, "weakCompareAndSet float");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
                 float o = (float) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndSet float");
                 float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, 2.0f, "getAndSet float value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
+                float o = (float) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetAcquire float");
+                float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 2.0f, "getAndSetAcquire float value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
+                float o = (float) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetRelease float");
+                float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 2.0f, "getAndSetRelease float value");
+            }
 
             // get and add, add and get
             {
-                float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 3.0f);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
+                float o = (float) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndAdd float");
-                float c = (float) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, 3.0f);
-                assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+                float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
+                float o = (float) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddAcquire float");
+                float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 1.0f);
+
+                float o = (float) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddRelease float");
+                float x = (float) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+            }
+
         }
     }
 
@@ -581,6 +692,12 @@
 
         final int i = 0;
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                float o = (float) hs.get(am).invokeExact(array, i, 1.0f);
+            });
+        }
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +741,7 @@
                     float o = (float) hs.get(am).invokeExact(array, ci, 3.0f);
                 });
             }
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java
index 5695423..da0c63f 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessInt.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x01234567, 0x89ABCDEF);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 0x89ABCDEF, 0x01234567);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int");
         }
 
         // Compare set and get
@@ -255,19 +255,122 @@
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
-
         // get and add, add and get
         {
-            int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 0xCAFEBABE);
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, 0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessInt recv, Handles hs) throws Throwable {
 
+
     }
 
 
@@ -363,11 +466,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x01234567, 0x89ABCDEF);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -393,34 +496,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(0x89ABCDEF, 0x01234567);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int");
         }
 
         // Compare set and get
         {
-            int o = (int) hs.get(TestAccessMode.GET_AND_SET).invokeExact( 0x89ABCDEF);
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_SET).invokeExact(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndSet int");
             int x = (int) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+        }
 
         // get and add, add and get
         {
-            int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( 0xCAFEBABE);
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
     }
 
 
@@ -519,11 +747,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x01234567, 0x89ABCDEF);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x01234567, 0x89ABCDEF);
                 }
-                assertEquals(success, true, "weakCompareAndSet int");
+                assertEquals(success, true, "weakCompareAndSetPlain int");
                 int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+                assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
             }
 
             {
@@ -549,30 +777,152 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 0x89ABCDEF, 0x01234567);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x89ABCDEF, 0x01234567);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile int");
+                assertEquals(success, true, "weakCompareAndSet int");
                 int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+                assertEquals(x, 0x01234567, "weakCompareAndSet int");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
                 int o = (int) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndSet int");
                 int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, 0x89ABCDEF, "getAndSet int value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+                int o = (int) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetAcquire int");
+                int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+                int o = (int) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetRelease int");
+                int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+            }
 
             // get and add, add and get
             {
-                int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 0xCAFEBABE);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+                int o = (int) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndAdd int");
-                int c = (int) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, 0xCAFEBABE);
-                assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+                int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+                int o = (int) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndAddAcquire int");
+                int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+                int o = (int) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndAddRelease int");
+                int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+            }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x01234567);
+
+            int o = (int) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
+        }
         }
     }
 
@@ -581,6 +931,7 @@
 
         final int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +975,12 @@
                     int o = (int) hs.get(am).invokeExact(array, ci, 0xCAFEBABE);
                 });
             }
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    int o = (int) hs.get(am).invokeExact(array, ci, 0xCAFEBABE);
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java
index 848da74..6e16e7c 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessLong.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             }
-            assertEquals(success, true, "weakCompareAndSet long");
+            assertEquals(success, true, "weakCompareAndSetPlain long");
             long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile long");
+            assertEquals(success, true, "weakCompareAndSet long");
             long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
         }
 
         // Compare set and get
@@ -255,19 +255,122 @@
             assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
-
         // get and add, add and get
         {
-            long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 0xDEADBEEFDEADBEEFL);
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, 0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-            long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, 0xDEADBEEFDEADBEEFL);
-            assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessLong recv, Handles hs) throws Throwable {
 
+
     }
 
 
@@ -363,11 +466,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
             }
-            assertEquals(success, true, "weakCompareAndSet long");
+            assertEquals(success, true, "weakCompareAndSetPlain long");
             long x = (long) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
         }
 
         {
@@ -393,34 +496,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile long");
+            assertEquals(success, true, "weakCompareAndSet long");
             long x = (long) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+            assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
         }
 
         // Compare set and get
         {
-            long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact( 0xCAFEBABECAFEBABEL);
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact(0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndSet long");
             long x = (long) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetAcquire long value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndSetRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetRelease long value");
+        }
 
         // get and add, add and get
         {
-            long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( 0xDEADBEEFDEADBEEFL);
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(0xCAFEBABECAFEBABEL);
             assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-            long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(0xDEADBEEFDEADBEEFL);
-            assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndAddRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
         }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
     }
 
 
@@ -519,11 +747,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, 0x0123456789ABCDEFL, 0xCAFEBABECAFEBABEL);
                 }
-                assertEquals(success, true, "weakCompareAndSet long");
+                assertEquals(success, true, "weakCompareAndSetPlain long");
                 long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSet long value");
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "weakCompareAndSetPlain long value");
             }
 
             {
@@ -549,30 +777,152 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, 0xCAFEBABECAFEBABEL, 0x0123456789ABCDEFL);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile long");
+                assertEquals(success, true, "weakCompareAndSet long");
                 long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSetVolatile long");
+                assertEquals(x, 0x0123456789ABCDEFL, "weakCompareAndSet long");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
                 long o = (long) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
                 assertEquals(o, 0x0123456789ABCDEFL, "getAndSet long");
                 long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSet long value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndSetAcquire long");
+                long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetAcquire long value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndSetRelease long");
+                long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, 0xCAFEBABECAFEBABEL, "getAndSetRelease long value");
+            }
 
             // get and add, add and get
             {
-                long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 0xDEADBEEFDEADBEEFL);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
                 assertEquals(o, 0x0123456789ABCDEFL, "getAndAdd long");
-                long c = (long) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, 0xDEADBEEFDEADBEEFL);
-                assertEquals(c, (long)(0x0123456789ABCDEFL + 0xDEADBEEFDEADBEEFL + 0xDEADBEEFDEADBEEFL), "getAndAdd long value");
+                long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAdd long value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndAddAcquire long");
+                long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddAcquire long value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+                long o = (long) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+                assertEquals(o, 0x0123456789ABCDEFL, "getAndAddRelease long");
+                long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (long)(0x0123456789ABCDEFL + 0xCAFEBABECAFEBABEL), "getAndAddRelease long value");
+            }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOr long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOr long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseOrRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL | 0xCAFEBABECAFEBABEL), "getAndBitwiseOrRelease long value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAnd long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAnd long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseAndRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL & 0xCAFEBABECAFEBABEL), "getAndBitwiseAndRelease long value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXor long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXor long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorAcquire long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorAcquire long value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, 0x0123456789ABCDEFL);
+
+            long o = (long) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, 0xCAFEBABECAFEBABEL);
+            assertEquals(o, 0x0123456789ABCDEFL, "getAndBitwiseXorRelease long");
+            long x = (long) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (long)(0x0123456789ABCDEFL ^ 0xCAFEBABECAFEBABEL), "getAndBitwiseXorRelease long value");
+        }
         }
     }
 
@@ -581,6 +931,7 @@
 
         final int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +975,12 @@
                     long o = (long) hs.get(am).invokeExact(array, ci, 0xDEADBEEFDEADBEEFL);
                 });
             }
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    long o = (long) hs.get(am).invokeExact(array, ci, 0xDEADBEEFDEADBEEFL);
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java
index ca4121e..5b6b8ad 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessShort.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (short)0x0123, (short)0x4567);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, (short)0x0123, (short)0x4567);
             }
-            assertEquals(success, true, "weakCompareAndSet short");
+            assertEquals(success, true, "weakCompareAndSetPlain short");
             short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+            assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, (short)0x4567, (short)0x0123);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, (short)0x4567, (short)0x0123);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile short");
+            assertEquals(success, true, "weakCompareAndSet short");
             short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+            assertEquals(x, (short)0x0123, "weakCompareAndSet short");
         }
 
         // Compare set and get
@@ -255,19 +255,122 @@
             assertEquals(x, (short)0x4567, "getAndSet short value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
-
         // get and add, add and get
         {
-            short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, (short)0x89AB);
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, (short)0x4567);
             assertEquals(o, (short)0x0123, "getAndAdd short");
-            short c = (short) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, (short)0x89AB);
-            assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessShort recv, Handles hs) throws Throwable {
 
+
     }
 
 
@@ -363,11 +466,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((short)0x0123, (short)0x4567);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact((short)0x0123, (short)0x4567);
             }
-            assertEquals(success, true, "weakCompareAndSet short");
+            assertEquals(success, true, "weakCompareAndSetPlain short");
             short x = (short) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+            assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
         }
 
         {
@@ -393,34 +496,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact((short)0x4567, (short)0x0123);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact((short)0x4567, (short)0x0123);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile short");
+            assertEquals(success, true, "weakCompareAndSet short");
             short x = (short) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+            assertEquals(x, (short)0x0123, "weakCompareAndSet short");
         }
 
         // Compare set and get
         {
-            short o = (short) hs.get(TestAccessMode.GET_AND_SET).invokeExact( (short)0x4567);
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_SET).invokeExact((short)0x4567);
             assertEquals(o, (short)0x0123, "getAndSet short");
             short x = (short) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, (short)0x4567, "getAndSet short value");
         }
 
-        hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)0x4567, "getAndSetAcquire short value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndSetRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)0x4567, "getAndSetRelease short value");
+        }
 
         // get and add, add and get
         {
-            short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( (short)0x89AB);
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact((short)0x4567);
             assertEquals(o, (short)0x0123, "getAndAdd short");
-            short c = (short) hs.get(TestAccessMode.ADD_AND_GET).invokeExact((short)0x89AB);
-            assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndAddRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+        }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact((short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact((short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
         }
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
 
+
     }
 
 
@@ -519,11 +747,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (short)0x0123, (short)0x4567);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, (short)0x0123, (short)0x4567);
                 }
-                assertEquals(success, true, "weakCompareAndSet short");
+                assertEquals(success, true, "weakCompareAndSetPlain short");
                 short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, (short)0x4567, "weakCompareAndSet short value");
+                assertEquals(x, (short)0x4567, "weakCompareAndSetPlain short value");
             }
 
             {
@@ -549,30 +777,152 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, (short)0x4567, (short)0x0123);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, (short)0x4567, (short)0x0123);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile short");
+                assertEquals(success, true, "weakCompareAndSet short");
                 short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, (short)0x0123, "weakCompareAndSetVolatile short");
+                assertEquals(x, (short)0x0123, "weakCompareAndSet short");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
                 short o = (short) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, (short)0x4567);
                 assertEquals(o, (short)0x0123, "getAndSet short");
                 short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, (short)0x4567, "getAndSet short value");
             }
 
-            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+                short o = (short) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndSetAcquire short");
+                short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (short)0x4567, "getAndSetAcquire short value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+                short o = (short) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndSetRelease short");
+                short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (short)0x4567, "getAndSetRelease short value");
+            }
 
             // get and add, add and get
             {
-                short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, (short)0x89AB);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+                short o = (short) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, (short)0x4567);
                 assertEquals(o, (short)0x0123, "getAndAdd short");
-                short c = (short) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, (short)0x89AB);
-                assertEquals(c, (short)((short)0x0123 + (short)0x89AB + (short)0x89AB), "getAndAdd short value");
+                short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAdd short value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+                short o = (short) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndAddAcquire short");
+                short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddAcquire short value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+                short o = (short) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, (short)0x4567);
+                assertEquals(o, (short)0x0123, "getAndAddRelease short");
+                short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, (short)((short)0x0123 + (short)0x4567), "getAndAddRelease short value");
+            }
+
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOr short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOr short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseOrRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 | (short)0x4567), "getAndBitwiseOrRelease short value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAnd short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAnd short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseAndRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 & (short)0x4567), "getAndBitwiseAndRelease short value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXor short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXor short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorAcquire short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorAcquire short value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, (short)0x0123);
+
+            short o = (short) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, (short)0x4567);
+            assertEquals(o, (short)0x0123, "getAndBitwiseXorRelease short");
+            short x = (short) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, (short)((short)0x0123 ^ (short)0x4567), "getAndBitwiseXorRelease short value");
+        }
         }
     }
 
@@ -581,6 +931,7 @@
 
         final int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -624,6 +975,12 @@
                     short o = (short) hs.get(am).invokeExact(array, ci, (short)0x89AB);
                 });
             }
+
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    short o = (short) hs.get(am).invokeExact(array, ci, (short)0x89AB);
+                });
+            }
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java
index 079d805..0eb9785 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodHandleAccessString.java
@@ -210,11 +210,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, "foo", "bar");
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, "foo", "bar");
             }
-            assertEquals(success, true, "weakCompareAndSet String");
+            assertEquals(success, true, "weakCompareAndSetPlain String");
             String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, "bar", "weakCompareAndSet String value");
+            assertEquals(x, "bar", "weakCompareAndSetPlain String value");
         }
 
         {
@@ -240,11 +240,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, "bar", "foo");
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, "bar", "foo");
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile String");
+            assertEquals(success, true, "weakCompareAndSet String");
             String x = (String) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+            assertEquals(x, "foo", "weakCompareAndSet String");
         }
 
         // Compare set and get
@@ -255,6 +255,7 @@
             assertEquals(x, "bar", "getAndSet String value");
         }
 
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccessString recv, Handles hs) throws Throwable {
@@ -264,6 +265,12 @@
                 String r = (String) hs.get(am).invokeExact(recv, "foo");
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                String r = (String) hs.get(am).invokeExact(recv, "foo");
+            });
+        }
     }
 
 
@@ -359,11 +366,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact("foo", "bar");
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact("foo", "bar");
             }
-            assertEquals(success, true, "weakCompareAndSet String");
+            assertEquals(success, true, "weakCompareAndSetPlain String");
             String x = (String) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, "bar", "weakCompareAndSet String value");
+            assertEquals(x, "bar", "weakCompareAndSetPlain String value");
         }
 
         {
@@ -389,21 +396,44 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact("bar", "foo");
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact("bar", "foo");
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile String");
+            assertEquals(success, true, "weakCompareAndSet String");
             String x = (String) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+            assertEquals(x, "foo", "weakCompareAndSet String");
         }
 
         // Compare set and get
         {
-            String o = (String) hs.get(TestAccessMode.GET_AND_SET).invokeExact( "bar");
+            hs.get(TestAccessMode.SET).invokeExact("foo");
+
+            String o = (String) hs.get(TestAccessMode.GET_AND_SET).invokeExact("bar");
             assertEquals(o, "foo", "getAndSet String");
             String x = (String) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, "bar", "getAndSet String value");
         }
 
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact("foo");
+
+            String o = (String) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact("bar");
+            assertEquals(o, "foo", "getAndSetAcquire String");
+            String x = (String) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, "bar", "getAndSetAcquire String value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact("foo");
+
+            String o = (String) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact("bar");
+            assertEquals(o, "foo", "getAndSetRelease String");
+            String x = (String) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, "bar", "getAndSetRelease String value");
+        }
+
+
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
@@ -413,6 +443,12 @@
                 String r = (String) hs.get(am).invokeExact("foo");
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                String r = (String) hs.get(am).invokeExact("foo");
+            });
+        }
     }
 
 
@@ -511,11 +547,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, "foo", "bar");
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, "foo", "bar");
                 }
-                assertEquals(success, true, "weakCompareAndSet String");
+                assertEquals(success, true, "weakCompareAndSetPlain String");
                 String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, "bar", "weakCompareAndSet String value");
+                assertEquals(x, "bar", "weakCompareAndSetPlain String value");
             }
 
             {
@@ -541,21 +577,42 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, "bar", "foo");
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, "bar", "foo");
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile String");
+                assertEquals(success, true, "weakCompareAndSet String");
                 String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, "foo", "weakCompareAndSetVolatile String");
+                assertEquals(x, "foo", "weakCompareAndSet String");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, "foo");
+
                 String o = (String) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, "bar");
                 assertEquals(o, "foo", "getAndSet String");
                 String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, "bar", "getAndSet String value");
             }
 
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, "foo");
+
+                String o = (String) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, "bar");
+                assertEquals(o, "foo", "getAndSetAcquire String");
+                String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, "bar", "getAndSetAcquire String value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, "foo");
+
+                String o = (String) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, "bar");
+                assertEquals(o, "foo", "getAndSetRelease String");
+                String x = (String) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, "bar", "getAndSetRelease String value");
+            }
+
+
         }
     }
 
@@ -569,6 +626,12 @@
                 String o = (String) hs.get(am).invokeExact(array, i, "foo");
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                String o = (String) hs.get(am).invokeExact(array, i, "foo");
+            });
+        }
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -607,6 +670,7 @@
                 });
             }
 
+
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java
index 624f98a..858913f 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeBoolean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, true, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, true, true);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, true);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, true, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, true, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, true, true, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, true, true);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, true, true);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, true, true);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, true);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, true, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, true, true);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, true, true, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,333 @@
             boolean x = (boolean) vh.getAndSet(recv, true, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndSetAcquire(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndSetAcquire(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetAcquire(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetAcquire(recv, true, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndSetRelease(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndSetRelease(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndSetRelease(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetRelease(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetRelease(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseOr(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOr(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOrAcquire(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOr(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseAnd(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAnd(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAndAcquire(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAnd(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseXor(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXor(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXorAcquire(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(null, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(Void.class, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(0, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXor(recv, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, true, Void.class);
+        });
     }
 
     static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeBoolean recv, Handles hs) throws Throwable {
@@ -759,6 +1086,43 @@
             });
         }
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                    invokeExact((VarHandleTestMethodTypeBoolean) null, true);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, boolean.class)).
+                    invokeExact(Void.class, true);
+            });
+            checkWMTE(() -> { // value reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, boolean.class)).
+                    invokeExact(0, true);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                    invokeExact(recv, true);
+            });
+            checkWMTE(() -> { // primitive class
+                int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                    invokeExact(recv, true);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeBoolean.class, boolean.class)).
+                    invokeExact(recv, true, Void.class);
+            });
+        }
     }
 
 
@@ -892,6 +1256,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, true);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(true, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(true, true, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, true);
         });
         checkWMTE(() -> { // actual reference class
@@ -906,23 +1287,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, true);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(true, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(true, true, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1049,6 +1413,236 @@
             boolean x = (boolean) vh.getAndSet(true, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetAcquire(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetAcquire(true, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetRelease(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetRelease(true, Void.class);
+        });
+
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOr(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOr(true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOrAcquire(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOrRelease(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(true, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAnd(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAnd(true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAndAcquire(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAndRelease(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(true, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXor(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXor(true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXorAcquire(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXorRelease(true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(true, Void.class);
+        });
     }
 
     static void testStaticFieldWrongMethodType(Handles hs) throws Throwable {
@@ -1163,6 +1757,32 @@
             });
         }
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, boolean.class)).
+                    invokeExact(true);
+            });
+            checkWMTE(() -> { // primitive class
+                int x = (int) hs.get(am, methodType(int.class, boolean.class)).
+                    invokeExact(true);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean.class, Class.class)).
+                    invokeExact(true, Void.class);
+            });
+        }
     }
 
 
@@ -1426,6 +2046,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, true, true);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, true, true);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, true);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, true, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, true, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, true, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, true, true, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, true, true);
         });
         checkCCE(() -> { // receiver reference class
@@ -1452,35 +2101,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, true, true);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, true, true);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, true);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, true, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, true, true);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, true, true);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, true, true, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1679,6 +2299,368 @@
             boolean x = (boolean) vh.getAndSet(array, 0, true, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndSetAcquire(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndSetAcquire(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndSetAcquire(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetAcquire(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, true, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndSetRelease(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndSetRelease(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            boolean x = (boolean) vh.getAndSetRelease(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndSetRelease(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndSetRelease(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseOr(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOr(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOrAcquire(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseOrRelease(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseAnd(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAnd(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAndAcquire(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseAndRelease(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseXor(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXor(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXorAcquire(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, true, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(null, 0, true);
+        });
+        checkCCE(() -> { // array reference class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(Void.class, 0, true);
+        });
+        checkWMTE(() -> { // value reference class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(0, 0, true);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, Void.class, true);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, true);
+        });
+        checkWMTE(() -> { // primitive class
+            int x = (int) vh.getAndBitwiseXorRelease(array, 0, true);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean x = (boolean) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, true, Void.class);
+        });
     }
 
     static void testArrayWrongMethodType(Handles hs) throws Throwable {
@@ -1880,6 +2862,48 @@
             });
         }
 
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class)).
+                    invokeExact((boolean[]) null, 0, true);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, Class.class, int.class, boolean.class)).
+                    invokeExact(Void.class, 0, true);
+            });
+            checkWMTE(() -> { // value reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class, int.class, boolean.class)).
+                    invokeExact(0, 0, true);
+            });
+            checkWMTE(() -> { // index reference class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, Class.class, boolean.class)).
+                    invokeExact(array, Void.class, true);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, boolean[].class, int.class, boolean.class)).
+                    invokeExact(array, 0, true);
+            });
+            checkWMTE(() -> { // primitive class
+                int x = (int) hs.get(am, methodType(int.class, boolean[].class, int.class, boolean.class)).
+                    invokeExact(array, 0, true);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                boolean x = (boolean) hs.get(am, methodType(boolean.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, boolean[].class, int.class, boolean.class, Class.class)).
+                    invokeExact(array, 0, true, Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java
index 692d667..0f9097a 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeByte.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, (byte)0x01, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, (byte)0x01, (byte)0x01);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, (byte)0x01, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, (byte)0x01, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x01, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, (byte)0x01, (byte)0x01);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, (byte)0x01, (byte)0x01);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, (byte)0x01, (byte)0x01);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, (byte)0x01);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, (byte)0x01, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, (byte)0x01, (byte)0x01);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, (byte)0x01, (byte)0x01, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             byte x = (byte) vh.getAndSet(recv, (byte)0x01, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndSetAcquire(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndSetAcquire(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndSetAcquire(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetAcquire(recv, (byte)0x01, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndSetRelease(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndSetRelease(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndSetRelease(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetRelease(recv, (byte)0x01, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,34 +669,331 @@
             byte x = (byte) vh.getAndAdd(recv, (byte)0x01, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            byte x = (byte) vh.addAndGet(null, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(null, (byte)0x01);
         });
         checkCCE(() -> { // receiver reference class
-            byte x = (byte) vh.addAndGet(Void.class, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(Void.class, (byte)0x01);
         });
         checkWMTE(() -> { // value reference class
-            byte x = (byte) vh.addAndGet(recv, Void.class);
+            byte x = (byte) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            byte x = (byte) vh.addAndGet(0, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(0, (byte)0x01);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, (byte)0x01);
+            Void r = (Void) vh.getAndAddAcquire(recv, (byte)0x01);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, (byte)0x01);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, (byte)0x01);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            byte x = (byte) vh.addAndGet();
+            byte x = (byte) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            byte x = (byte) vh.addAndGet(recv, (byte)0x01, Void.class);
+            byte x = (byte) vh.getAndAddAcquire(recv, (byte)0x01, Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndAddRelease(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndAddRelease(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndAddRelease(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndAddRelease(recv, (byte)0x01, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseOr(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseOr(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseOr(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOr(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseOrAcquire(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOrAcquire(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseOrRelease(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseOr(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseOr(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOr(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseAnd(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseAnd(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseAnd(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAnd(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseAndAcquire(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAndAcquire(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseAndRelease(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseAnd(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseAnd(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAnd(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseXor(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseXor(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseXor(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXor(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseXorAcquire(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXorAcquire(recv, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            byte x = (byte) vh.getAndBitwiseXorRelease(null, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            byte x = (byte) vh.getAndBitwiseXor(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            byte x = (byte) vh.getAndBitwiseXor(0, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXor(recv, (byte)0x01, Void.class);
         });
     }
 
@@ -853,6 +1208,43 @@
                     invokeExact(recv, (byte)0x01, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                byte x = (byte) hs.get(am, methodType(byte.class, VarHandleTestMethodTypeByte.class, byte.class)).
+                    invokeExact((VarHandleTestMethodTypeByte) null, (byte)0x01);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, Class.class, byte.class)).
+                    invokeExact(Void.class, (byte)0x01);
+            });
+            checkWMTE(() -> { // value reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, VarHandleTestMethodTypeByte.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                byte x = (byte) hs.get(am, methodType(byte.class, int.class, byte.class)).
+                    invokeExact(0, (byte)0x01);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeByte.class, byte.class)).
+                    invokeExact(recv, (byte)0x01);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeByte.class, byte.class)).
+                    invokeExact(recv, (byte)0x01);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                byte x = (byte) hs.get(am, methodType(byte.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                byte x = (byte) hs.get(am, methodType(byte.class, VarHandleTestMethodTypeByte.class, byte.class)).
+                    invokeExact(recv, (byte)0x01, Void.class);
+            });
+        }
     }
 
 
@@ -986,6 +1378,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain((byte)0x01, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x01, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, (byte)0x01);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1409,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, (byte)0x01);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile((byte)0x01, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile((byte)0x01, (byte)0x01, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1535,48 @@
             byte x = (byte) vh.getAndSet((byte)0x01, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetAcquire((byte)0x01, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetRelease((byte)0x01, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,24 +1598,233 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            byte x = (byte) vh.addAndGet(Void.class);
+            byte x = (byte) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet((byte)0x01);
+            Void r = (Void) vh.getAndAddAcquire((byte)0x01);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet((byte)0x01);
+            boolean x = (boolean) vh.getAndAddAcquire((byte)0x01);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            byte x = (byte) vh.addAndGet();
+            byte x = (byte) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            byte x = (byte) vh.addAndGet((byte)0x01, Void.class);
+            byte x = (byte) vh.getAndAddAcquire((byte)0x01, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndAddRelease((byte)0x01, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOr((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOrAcquire((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOrRelease((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAnd((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAndAcquire((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAndRelease((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXor((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXorAcquire((byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease((byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease((byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXorRelease((byte)0x01, Void.class);
         });
     }
 
@@ -1322,6 +1965,32 @@
                     invokeExact((byte)0x01, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, byte.class)).
+                    invokeExact((byte)0x01);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, byte.class)).
+                    invokeExact((byte)0x01);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                byte x = (byte) hs.get(am, methodType(byte.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                byte x = (byte) hs.get(am, methodType(byte.class, byte.class, Class.class)).
+                    invokeExact((byte)0x01, Void.class);
+            });
+        }
     }
 
 
@@ -1585,6 +2254,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, (byte)0x01, (byte)0x01);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, (byte)0x01, (byte)0x01);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, (byte)0x01);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, (byte)0x01, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, (byte)0x01, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, (byte)0x01, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, (byte)0x01, (byte)0x01, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, (byte)0x01, (byte)0x01);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +2309,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, (byte)0x01, (byte)0x01);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, (byte)0x01, (byte)0x01);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, (byte)0x01);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, (byte)0x01, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, (byte)0x01, (byte)0x01);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, (byte)0x01, (byte)0x01);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, (byte)0x01, (byte)0x01, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +2507,72 @@
             byte x = (byte) vh.getAndSet(array, 0, (byte)0x01, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndSetAcquire(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndSetAcquire(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            byte x = (byte) vh.getAndSetAcquire(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndSetAcquire(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetAcquire(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndSetRelease(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndSetRelease(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            byte x = (byte) vh.getAndSetRelease(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndSetRelease(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndSetRelease(array, 0, (byte)0x01, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,36 +2606,365 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            byte x = (byte) vh.addAndGet(null, 0, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(null, 0, (byte)0x01);
         });
         checkCCE(() -> { // array reference class
-            byte x = (byte) vh.addAndGet(Void.class, 0, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(Void.class, 0, (byte)0x01);
         });
         checkWMTE(() -> { // value reference class
-            byte x = (byte) vh.addAndGet(array, 0, Void.class);
+            byte x = (byte) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            byte x = (byte) vh.addAndGet(0, 0, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(0, 0, (byte)0x01);
         });
         checkWMTE(() -> { // index reference class
-            byte x = (byte) vh.addAndGet(array, Void.class, (byte)0x01);
+            byte x = (byte) vh.getAndAddAcquire(array, Void.class, (byte)0x01);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, (byte)0x01);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, (byte)0x01);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, (byte)0x01);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, (byte)0x01);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            byte x = (byte) vh.addAndGet();
+            byte x = (byte) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            byte x = (byte) vh.addAndGet(array, 0, (byte)0x01, Void.class);
+            byte x = (byte) vh.getAndAddAcquire(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndAddRelease(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndAddRelease(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndAddRelease(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndAddRelease(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndAddRelease(array, 0, (byte)0x01, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseOr(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseOr(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseOr(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseOr(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOr(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseOrAcquire(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseOrAcquire(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOrAcquire(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseOrRelease(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseOrRelease(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseOrRelease(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseOrRelease(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseOrRelease(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseAnd(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseAnd(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseAnd(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseAnd(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAnd(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseAndAcquire(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseAndAcquire(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAndAcquire(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseAndRelease(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseAndRelease(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseAndRelease(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseAndRelease(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseAndRelease(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseXor(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseXor(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseXor(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseXor(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXor(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseXorAcquire(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseXorAcquire(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXorAcquire(array, 0, (byte)0x01, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            byte x = (byte) vh.getAndBitwiseXorRelease(null, 0, (byte)0x01);
+        });
+        checkCCE(() -> { // array reference class
+            byte x = (byte) vh.getAndBitwiseXorRelease(Void.class, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // value reference class
+            byte x = (byte) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            byte x = (byte) vh.getAndBitwiseXorRelease(0, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // index reference class
+            byte x = (byte) vh.getAndBitwiseXorRelease(array, Void.class, (byte)0x01);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, (byte)0x01);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, (byte)0x01);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            byte x = (byte) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            byte x = (byte) vh.getAndBitwiseXorRelease(array, 0, (byte)0x01, Void.class);
         });
     }
 
@@ -2144,6 +3208,48 @@
                     invokeExact(array, 0, (byte)0x01, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                byte x = (byte) hs.get(am, methodType(byte.class, byte[].class, int.class, byte.class)).
+                    invokeExact((byte[]) null, 0, (byte)0x01);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, Class.class, int.class, byte.class)).
+                    invokeExact(Void.class, 0, (byte)0x01);
+            });
+            checkWMTE(() -> { // value reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, byte[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                byte x = (byte) hs.get(am, methodType(byte.class, int.class, int.class, byte.class)).
+                    invokeExact(0, 0, (byte)0x01);
+            });
+            checkWMTE(() -> { // index reference class
+                byte x = (byte) hs.get(am, methodType(byte.class, byte[].class, Class.class, byte.class)).
+                    invokeExact(array, Void.class, (byte)0x01);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, byte[].class, int.class, byte.class)).
+                    invokeExact(array, 0, (byte)0x01);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, byte[].class, int.class, byte.class)).
+                    invokeExact(array, 0, (byte)0x01);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                byte x = (byte) hs.get(am, methodType(byte.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                byte x = (byte) hs.get(am, methodType(byte.class, byte[].class, int.class, byte.class, Class.class)).
+                    invokeExact(array, 0, (byte)0x01, Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java
index 268e521..46ffc0f 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeChar.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, '\u0123', '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, '\u0123', '\u0123');
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, '\u0123', Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, '\u0123', '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, '\u0123', '\u0123', Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, '\u0123', '\u0123');
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, '\u0123', '\u0123');
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, '\u0123', '\u0123');
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, '\u0123');
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, '\u0123', Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, '\u0123', '\u0123');
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, '\u0123', '\u0123', Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             char x = (char) vh.getAndSet(recv, '\u0123', Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndSetAcquire(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndSetAcquire(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndSetAcquire(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetAcquire(recv, '\u0123', Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndSetRelease(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndSetRelease(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndSetRelease(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetRelease(recv, '\u0123', Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,34 +669,331 @@
             char x = (char) vh.getAndAdd(recv, '\u0123', Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            char x = (char) vh.addAndGet(null, '\u0123');
+            char x = (char) vh.getAndAddAcquire(null, '\u0123');
         });
         checkCCE(() -> { // receiver reference class
-            char x = (char) vh.addAndGet(Void.class, '\u0123');
+            char x = (char) vh.getAndAddAcquire(Void.class, '\u0123');
         });
         checkWMTE(() -> { // value reference class
-            char x = (char) vh.addAndGet(recv, Void.class);
+            char x = (char) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            char x = (char) vh.addAndGet(0, '\u0123');
+            char x = (char) vh.getAndAddAcquire(0, '\u0123');
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, '\u0123');
+            Void r = (Void) vh.getAndAddAcquire(recv, '\u0123');
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, '\u0123');
+            boolean x = (boolean) vh.getAndAddAcquire(recv, '\u0123');
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            char x = (char) vh.addAndGet();
+            char x = (char) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            char x = (char) vh.addAndGet(recv, '\u0123', Void.class);
+            char x = (char) vh.getAndAddAcquire(recv, '\u0123', Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndAddRelease(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndAddRelease(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndAddRelease(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndAddRelease(recv, '\u0123', Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseOr(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseOr(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseOr(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOr(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseOrAcquire(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseOrAcquire(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOrAcquire(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseOrRelease(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseOr(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseOr(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOr(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseAnd(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseAnd(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseAnd(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAnd(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseAndAcquire(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseAndAcquire(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAndAcquire(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseAndRelease(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseAnd(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseAnd(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAnd(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseXor(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseXor(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseXor(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXor(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseXorAcquire(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseXorAcquire(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXorAcquire(recv, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            char x = (char) vh.getAndBitwiseXorRelease(null, '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            char x = (char) vh.getAndBitwiseXor(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            char x = (char) vh.getAndBitwiseXor(0, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXor(recv, '\u0123', Void.class);
         });
     }
 
@@ -853,6 +1208,43 @@
                     invokeExact(recv, '\u0123', Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                char x = (char) hs.get(am, methodType(char.class, VarHandleTestMethodTypeChar.class, char.class)).
+                    invokeExact((VarHandleTestMethodTypeChar) null, '\u0123');
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                char x = (char) hs.get(am, methodType(char.class, Class.class, char.class)).
+                    invokeExact(Void.class, '\u0123');
+            });
+            checkWMTE(() -> { // value reference class
+                char x = (char) hs.get(am, methodType(char.class, VarHandleTestMethodTypeChar.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                char x = (char) hs.get(am, methodType(char.class, int.class, char.class)).
+                    invokeExact(0, '\u0123');
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeChar.class, char.class)).
+                    invokeExact(recv, '\u0123');
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeChar.class, char.class)).
+                    invokeExact(recv, '\u0123');
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                char x = (char) hs.get(am, methodType(char.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                char x = (char) hs.get(am, methodType(char.class, VarHandleTestMethodTypeChar.class, char.class)).
+                    invokeExact(recv, '\u0123', Void.class);
+            });
+        }
     }
 
 
@@ -986,6 +1378,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain('\u0123', Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain('\u0123', '\u0123', Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, '\u0123');
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1409,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, '\u0123');
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile('\u0123', Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile('\u0123', '\u0123', Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1535,48 @@
             char x = (char) vh.getAndSet('\u0123', Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetAcquire('\u0123', Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetRelease('\u0123', Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,24 +1598,233 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            char x = (char) vh.addAndGet(Void.class);
+            char x = (char) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet('\u0123');
+            Void r = (Void) vh.getAndAddAcquire('\u0123');
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet('\u0123');
+            boolean x = (boolean) vh.getAndAddAcquire('\u0123');
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            char x = (char) vh.addAndGet();
+            char x = (char) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            char x = (char) vh.addAndGet('\u0123', Void.class);
+            char x = (char) vh.getAndAddAcquire('\u0123', Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndAddRelease('\u0123', Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOr('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOrAcquire('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOrRelease('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAnd('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAndAcquire('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAndRelease('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXor('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXorAcquire('\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease('\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease('\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXorRelease('\u0123', Void.class);
         });
     }
 
@@ -1322,6 +1965,32 @@
                     invokeExact('\u0123', Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                char x = (char) hs.get(am, methodType(char.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, char.class)).
+                    invokeExact('\u0123');
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, char.class)).
+                    invokeExact('\u0123');
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                char x = (char) hs.get(am, methodType(char.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                char x = (char) hs.get(am, methodType(char.class, char.class, Class.class)).
+                    invokeExact('\u0123', Void.class);
+            });
+        }
     }
 
 
@@ -1585,6 +2254,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, '\u0123', '\u0123');
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, '\u0123', '\u0123');
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, '\u0123');
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, '\u0123', Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, '\u0123', '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, '\u0123', '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, '\u0123', '\u0123', Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, '\u0123', '\u0123');
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +2309,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, '\u0123', '\u0123');
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, '\u0123', '\u0123');
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, '\u0123');
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, '\u0123', Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, '\u0123', '\u0123');
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, '\u0123', '\u0123');
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, '\u0123', '\u0123', Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +2507,72 @@
             char x = (char) vh.getAndSet(array, 0, '\u0123', Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndSetAcquire(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndSetAcquire(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            char x = (char) vh.getAndSetAcquire(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndSetAcquire(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetAcquire(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndSetRelease(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndSetRelease(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            char x = (char) vh.getAndSetRelease(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndSetRelease(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndSetRelease(array, 0, '\u0123', Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,36 +2606,365 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            char x = (char) vh.addAndGet(null, 0, '\u0123');
+            char x = (char) vh.getAndAddAcquire(null, 0, '\u0123');
         });
         checkCCE(() -> { // array reference class
-            char x = (char) vh.addAndGet(Void.class, 0, '\u0123');
+            char x = (char) vh.getAndAddAcquire(Void.class, 0, '\u0123');
         });
         checkWMTE(() -> { // value reference class
-            char x = (char) vh.addAndGet(array, 0, Void.class);
+            char x = (char) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            char x = (char) vh.addAndGet(0, 0, '\u0123');
+            char x = (char) vh.getAndAddAcquire(0, 0, '\u0123');
         });
         checkWMTE(() -> { // index reference class
-            char x = (char) vh.addAndGet(array, Void.class, '\u0123');
+            char x = (char) vh.getAndAddAcquire(array, Void.class, '\u0123');
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, '\u0123');
+            Void r = (Void) vh.getAndAddAcquire(array, 0, '\u0123');
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, '\u0123');
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, '\u0123');
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            char x = (char) vh.addAndGet();
+            char x = (char) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            char x = (char) vh.addAndGet(array, 0, '\u0123', Void.class);
+            char x = (char) vh.getAndAddAcquire(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndAddRelease(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndAddRelease(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndAddRelease(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndAddRelease(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndAddRelease(array, 0, '\u0123', Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseOr(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseOr(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseOr(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseOr(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOr(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseOrAcquire(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseOrAcquire(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseOrAcquire(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOrAcquire(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseOrRelease(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseOrRelease(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseOrRelease(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseOrRelease(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseOrRelease(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseAnd(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseAnd(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseAnd(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseAnd(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAnd(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseAndAcquire(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseAndAcquire(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseAndAcquire(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAndAcquire(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseAndRelease(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseAndRelease(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseAndRelease(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseAndRelease(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseAndRelease(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseXor(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseXor(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseXor(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseXor(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXor(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseXorAcquire(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseXorAcquire(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseXorAcquire(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXorAcquire(array, 0, '\u0123', Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            char x = (char) vh.getAndBitwiseXorRelease(null, 0, '\u0123');
+        });
+        checkCCE(() -> { // array reference class
+            char x = (char) vh.getAndBitwiseXorRelease(Void.class, 0, '\u0123');
+        });
+        checkWMTE(() -> { // value reference class
+            char x = (char) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            char x = (char) vh.getAndBitwiseXorRelease(0, 0, '\u0123');
+        });
+        checkWMTE(() -> { // index reference class
+            char x = (char) vh.getAndBitwiseXorRelease(array, Void.class, '\u0123');
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, '\u0123');
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, '\u0123');
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            char x = (char) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            char x = (char) vh.getAndBitwiseXorRelease(array, 0, '\u0123', Void.class);
         });
     }
 
@@ -2144,6 +3208,48 @@
                     invokeExact(array, 0, '\u0123', Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                char x = (char) hs.get(am, methodType(char.class, char[].class, int.class, char.class)).
+                    invokeExact((char[]) null, 0, '\u0123');
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                char x = (char) hs.get(am, methodType(char.class, Class.class, int.class, char.class)).
+                    invokeExact(Void.class, 0, '\u0123');
+            });
+            checkWMTE(() -> { // value reference class
+                char x = (char) hs.get(am, methodType(char.class, char[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                char x = (char) hs.get(am, methodType(char.class, int.class, int.class, char.class)).
+                    invokeExact(0, 0, '\u0123');
+            });
+            checkWMTE(() -> { // index reference class
+                char x = (char) hs.get(am, methodType(char.class, char[].class, Class.class, char.class)).
+                    invokeExact(array, Void.class, '\u0123');
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, char[].class, int.class, char.class)).
+                    invokeExact(array, 0, '\u0123');
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, char[].class, int.class, char.class)).
+                    invokeExact(array, 0, '\u0123');
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                char x = (char) hs.get(am, methodType(char.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                char x = (char) hs.get(am, methodType(char.class, char[].class, int.class, char.class, Class.class)).
+                    invokeExact(array, 0, '\u0123', Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java
index e3bf836..af37433 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeDouble.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 1.0d, 1.0d);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0d, 1.0d);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, 1.0d, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 1.0d, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, 1.0d, 1.0d, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 1.0d, 1.0d);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 1.0d, 1.0d);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0d, 1.0d);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 1.0d);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, 1.0d, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 1.0d, 1.0d);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, 1.0d, 1.0d, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             double x = (double) vh.getAndSet(recv, 1.0d, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            double x = (double) vh.getAndSetAcquire(null, 1.0d);
+        });
+        checkCCE(() -> { // receiver reference class
+            double x = (double) vh.getAndSetAcquire(Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            double x = (double) vh.getAndSetAcquire(0, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetAcquire(recv, 1.0d, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            double x = (double) vh.getAndSetRelease(null, 1.0d);
+        });
+        checkCCE(() -> { // receiver reference class
+            double x = (double) vh.getAndSetRelease(Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            double x = (double) vh.getAndSetRelease(0, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetRelease(recv, 1.0d, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,35 +669,64 @@
             double x = (double) vh.getAndAdd(recv, 1.0d, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            double x = (double) vh.addAndGet(null, 1.0d);
+            double x = (double) vh.getAndAddAcquire(null, 1.0d);
         });
         checkCCE(() -> { // receiver reference class
-            double x = (double) vh.addAndGet(Void.class, 1.0d);
+            double x = (double) vh.getAndAddAcquire(Void.class, 1.0d);
         });
         checkWMTE(() -> { // value reference class
-            double x = (double) vh.addAndGet(recv, Void.class);
+            double x = (double) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            double x = (double) vh.addAndGet(0, 1.0d);
+            double x = (double) vh.getAndAddAcquire(0, 1.0d);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, 1.0d);
+            Void r = (Void) vh.getAndAddAcquire(recv, 1.0d);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, 1.0d);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, 1.0d);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            double x = (double) vh.addAndGet();
+            double x = (double) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            double x = (double) vh.addAndGet(recv, 1.0d, Void.class);
+            double x = (double) vh.getAndAddAcquire(recv, 1.0d, Void.class);
         });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            double x = (double) vh.getAndAddRelease(null, 1.0d);
+        });
+        checkCCE(() -> { // receiver reference class
+            double x = (double) vh.getAndAddRelease(Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            double x = (double) vh.getAndAddRelease(0, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndAddRelease(recv, 1.0d, Void.class);
+        });
+
     }
 
     static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeDouble recv, Handles hs) throws Throwable {
@@ -853,6 +940,7 @@
                     invokeExact(recv, 1.0d, Void.class);
             });
         }
+
     }
 
 
@@ -986,6 +1074,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(1.0d, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(1.0d, 1.0d, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, 1.0d);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1105,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0d);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(1.0d, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(1.0d, 1.0d, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1231,48 @@
             double x = (double) vh.getAndSet(1.0d, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetAcquire(1.0d, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetRelease(1.0d, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,25 +1294,47 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            double x = (double) vh.addAndGet(Void.class);
+            double x = (double) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(1.0d);
+            Void r = (Void) vh.getAndAddAcquire(1.0d);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(1.0d);
+            boolean x = (boolean) vh.getAndAddAcquire(1.0d);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            double x = (double) vh.addAndGet();
+            double x = (double) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            double x = (double) vh.addAndGet(1.0d, Void.class);
+            double x = (double) vh.getAndAddAcquire(1.0d, Void.class);
         });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndAddRelease(1.0d, Void.class);
+        });
+
     }
 
     static void testStaticFieldWrongMethodType(Handles hs) throws Throwable {
@@ -1322,6 +1474,7 @@
                     invokeExact(1.0d, Void.class);
             });
         }
+
     }
 
 
@@ -1585,6 +1738,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, 1.0d, 1.0d);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 1.0d, 1.0d);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 1.0d);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0d, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, 1.0d, 1.0d);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, 1.0d, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0d, 1.0d, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, 1.0d, 1.0d);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +1793,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, 1.0d, 1.0d);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 1.0d, 1.0d);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 1.0d);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0d, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, 1.0d, 1.0d);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 1.0d, 1.0d);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0d, 1.0d, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +1991,72 @@
             double x = (double) vh.getAndSet(array, 0, 1.0d, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            double x = (double) vh.getAndSetAcquire(null, 0, 1.0d);
+        });
+        checkCCE(() -> { // array reference class
+            double x = (double) vh.getAndSetAcquire(Void.class, 0, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            double x = (double) vh.getAndSetAcquire(0, 0, 1.0d);
+        });
+        checkWMTE(() -> { // index reference class
+            double x = (double) vh.getAndSetAcquire(array, Void.class, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetAcquire(array, 0, 1.0d, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            double x = (double) vh.getAndSetRelease(null, 0, 1.0d);
+        });
+        checkCCE(() -> { // array reference class
+            double x = (double) vh.getAndSetRelease(Void.class, 0, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            double x = (double) vh.getAndSetRelease(0, 0, 1.0d);
+        });
+        checkWMTE(() -> { // index reference class
+            double x = (double) vh.getAndSetRelease(array, Void.class, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndSetRelease(array, 0, 1.0d, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,37 +2090,71 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            double x = (double) vh.addAndGet(null, 0, 1.0d);
+            double x = (double) vh.getAndAddAcquire(null, 0, 1.0d);
         });
         checkCCE(() -> { // array reference class
-            double x = (double) vh.addAndGet(Void.class, 0, 1.0d);
+            double x = (double) vh.getAndAddAcquire(Void.class, 0, 1.0d);
         });
         checkWMTE(() -> { // value reference class
-            double x = (double) vh.addAndGet(array, 0, Void.class);
+            double x = (double) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            double x = (double) vh.addAndGet(0, 0, 1.0d);
+            double x = (double) vh.getAndAddAcquire(0, 0, 1.0d);
         });
         checkWMTE(() -> { // index reference class
-            double x = (double) vh.addAndGet(array, Void.class, 1.0d);
+            double x = (double) vh.getAndAddAcquire(array, Void.class, 1.0d);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, 1.0d);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, 1.0d);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, 1.0d);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, 1.0d);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            double x = (double) vh.addAndGet();
+            double x = (double) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            double x = (double) vh.addAndGet(array, 0, 1.0d, Void.class);
+            double x = (double) vh.getAndAddAcquire(array, 0, 1.0d, Void.class);
         });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            double x = (double) vh.getAndAddRelease(null, 0, 1.0d);
+        });
+        checkCCE(() -> { // array reference class
+            double x = (double) vh.getAndAddRelease(Void.class, 0, 1.0d);
+        });
+        checkWMTE(() -> { // value reference class
+            double x = (double) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            double x = (double) vh.getAndAddRelease(0, 0, 1.0d);
+        });
+        checkWMTE(() -> { // index reference class
+            double x = (double) vh.getAndAddRelease(array, Void.class, 1.0d);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, 1.0d);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, 1.0d);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            double x = (double) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            double x = (double) vh.getAndAddRelease(array, 0, 1.0d, Void.class);
+        });
+
     }
 
     static void testArrayWrongMethodType(Handles hs) throws Throwable {
@@ -2144,6 +2397,7 @@
                     invokeExact(array, 0, 1.0d, Void.class);
             });
         }
+
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java
index 34617e2..b5d6711 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeFloat.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 1.0f, 1.0f);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0f, 1.0f);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, 1.0f, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 1.0f, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, 1.0f, 1.0f, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 1.0f, 1.0f);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 1.0f, 1.0f);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f, 1.0f);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 1.0f);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 1.0f, 1.0f);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, 1.0f, 1.0f, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             float x = (float) vh.getAndSet(recv, 1.0f, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            float x = (float) vh.getAndSetAcquire(null, 1.0f);
+        });
+        checkCCE(() -> { // receiver reference class
+            float x = (float) vh.getAndSetAcquire(Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            float x = (float) vh.getAndSetAcquire(0, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetAcquire(recv, 1.0f, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            float x = (float) vh.getAndSetRelease(null, 1.0f);
+        });
+        checkCCE(() -> { // receiver reference class
+            float x = (float) vh.getAndSetRelease(Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            float x = (float) vh.getAndSetRelease(0, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetRelease(recv, 1.0f, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,35 +669,64 @@
             float x = (float) vh.getAndAdd(recv, 1.0f, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            float x = (float) vh.addAndGet(null, 1.0f);
+            float x = (float) vh.getAndAddAcquire(null, 1.0f);
         });
         checkCCE(() -> { // receiver reference class
-            float x = (float) vh.addAndGet(Void.class, 1.0f);
+            float x = (float) vh.getAndAddAcquire(Void.class, 1.0f);
         });
         checkWMTE(() -> { // value reference class
-            float x = (float) vh.addAndGet(recv, Void.class);
+            float x = (float) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            float x = (float) vh.addAndGet(0, 1.0f);
+            float x = (float) vh.getAndAddAcquire(0, 1.0f);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, 1.0f);
+            Void r = (Void) vh.getAndAddAcquire(recv, 1.0f);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, 1.0f);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, 1.0f);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            float x = (float) vh.addAndGet();
+            float x = (float) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            float x = (float) vh.addAndGet(recv, 1.0f, Void.class);
+            float x = (float) vh.getAndAddAcquire(recv, 1.0f, Void.class);
         });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            float x = (float) vh.getAndAddRelease(null, 1.0f);
+        });
+        checkCCE(() -> { // receiver reference class
+            float x = (float) vh.getAndAddRelease(Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            float x = (float) vh.getAndAddRelease(0, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndAddRelease(recv, 1.0f, Void.class);
+        });
+
     }
 
     static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeFloat recv, Handles hs) throws Throwable {
@@ -853,6 +940,7 @@
                     invokeExact(recv, 1.0f, Void.class);
             });
         }
+
     }
 
 
@@ -986,6 +1074,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(1.0f, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(1.0f, 1.0f, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, 1.0f);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1105,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 1.0f);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(1.0f, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(1.0f, 1.0f, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1231,48 @@
             float x = (float) vh.getAndSet(1.0f, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetAcquire(1.0f, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetRelease(1.0f, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,25 +1294,47 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            float x = (float) vh.addAndGet(Void.class);
+            float x = (float) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(1.0f);
+            Void r = (Void) vh.getAndAddAcquire(1.0f);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(1.0f);
+            boolean x = (boolean) vh.getAndAddAcquire(1.0f);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            float x = (float) vh.addAndGet();
+            float x = (float) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            float x = (float) vh.addAndGet(1.0f, Void.class);
+            float x = (float) vh.getAndAddAcquire(1.0f, Void.class);
         });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndAddRelease(1.0f, Void.class);
+        });
+
     }
 
     static void testStaticFieldWrongMethodType(Handles hs) throws Throwable {
@@ -1322,6 +1474,7 @@
                     invokeExact(1.0f, Void.class);
             });
         }
+
     }
 
 
@@ -1585,6 +1738,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, 1.0f, 1.0f);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 1.0f, 1.0f);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 1.0f);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0f, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, 1.0f, 1.0f);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, 1.0f, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 1.0f, 1.0f, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, 1.0f, 1.0f);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +1793,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, 1.0f, 1.0f);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 1.0f, 1.0f);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 1.0f);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, 1.0f, 1.0f);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 1.0f, 1.0f);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 1.0f, 1.0f, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +1991,72 @@
             float x = (float) vh.getAndSet(array, 0, 1.0f, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            float x = (float) vh.getAndSetAcquire(null, 0, 1.0f);
+        });
+        checkCCE(() -> { // array reference class
+            float x = (float) vh.getAndSetAcquire(Void.class, 0, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            float x = (float) vh.getAndSetAcquire(0, 0, 1.0f);
+        });
+        checkWMTE(() -> { // index reference class
+            float x = (float) vh.getAndSetAcquire(array, Void.class, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetAcquire(array, 0, 1.0f, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            float x = (float) vh.getAndSetRelease(null, 0, 1.0f);
+        });
+        checkCCE(() -> { // array reference class
+            float x = (float) vh.getAndSetRelease(Void.class, 0, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            float x = (float) vh.getAndSetRelease(0, 0, 1.0f);
+        });
+        checkWMTE(() -> { // index reference class
+            float x = (float) vh.getAndSetRelease(array, Void.class, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndSetRelease(array, 0, 1.0f, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,37 +2090,71 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            float x = (float) vh.addAndGet(null, 0, 1.0f);
+            float x = (float) vh.getAndAddAcquire(null, 0, 1.0f);
         });
         checkCCE(() -> { // array reference class
-            float x = (float) vh.addAndGet(Void.class, 0, 1.0f);
+            float x = (float) vh.getAndAddAcquire(Void.class, 0, 1.0f);
         });
         checkWMTE(() -> { // value reference class
-            float x = (float) vh.addAndGet(array, 0, Void.class);
+            float x = (float) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            float x = (float) vh.addAndGet(0, 0, 1.0f);
+            float x = (float) vh.getAndAddAcquire(0, 0, 1.0f);
         });
         checkWMTE(() -> { // index reference class
-            float x = (float) vh.addAndGet(array, Void.class, 1.0f);
+            float x = (float) vh.getAndAddAcquire(array, Void.class, 1.0f);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, 1.0f);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, 1.0f);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, 1.0f);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, 1.0f);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            float x = (float) vh.addAndGet();
+            float x = (float) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            float x = (float) vh.addAndGet(array, 0, 1.0f, Void.class);
+            float x = (float) vh.getAndAddAcquire(array, 0, 1.0f, Void.class);
         });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            float x = (float) vh.getAndAddRelease(null, 0, 1.0f);
+        });
+        checkCCE(() -> { // array reference class
+            float x = (float) vh.getAndAddRelease(Void.class, 0, 1.0f);
+        });
+        checkWMTE(() -> { // value reference class
+            float x = (float) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            float x = (float) vh.getAndAddRelease(0, 0, 1.0f);
+        });
+        checkWMTE(() -> { // index reference class
+            float x = (float) vh.getAndAddRelease(array, Void.class, 1.0f);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, 1.0f);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, 1.0f);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            float x = (float) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            float x = (float) vh.getAndAddRelease(array, 0, 1.0f, Void.class);
+        });
+
     }
 
     static void testArrayWrongMethodType(Handles hs) throws Throwable {
@@ -2144,6 +2397,7 @@
                     invokeExact(array, 0, 1.0f, Void.class);
             });
         }
+
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java
index 33b3397..9f0b995 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeInt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0x01234567, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0x01234567, 0x01234567);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, 0x01234567, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0x01234567, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x01234567, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0x01234567, 0x01234567);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0x01234567, 0x01234567);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x01234567, 0x01234567);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 0x01234567);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, 0x01234567, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0x01234567, 0x01234567);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, 0x01234567, 0x01234567, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             int x = (int) vh.getAndSet(recv, 0x01234567, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndSetAcquire(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndSetAcquire(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndSetAcquire(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetAcquire(recv, 0x01234567, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndSetRelease(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndSetRelease(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndSetRelease(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetRelease(recv, 0x01234567, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,34 +669,331 @@
             int x = (int) vh.getAndAdd(recv, 0x01234567, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            int x = (int) vh.addAndGet(null, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(null, 0x01234567);
         });
         checkCCE(() -> { // receiver reference class
-            int x = (int) vh.addAndGet(Void.class, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(Void.class, 0x01234567);
         });
         checkWMTE(() -> { // value reference class
-            int x = (int) vh.addAndGet(recv, Void.class);
+            int x = (int) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            int x = (int) vh.addAndGet(0, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(0, 0x01234567);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, 0x01234567);
+            Void r = (Void) vh.getAndAddAcquire(recv, 0x01234567);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, 0x01234567);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, 0x01234567);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            int x = (int) vh.addAndGet();
+            int x = (int) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            int x = (int) vh.addAndGet(recv, 0x01234567, Void.class);
+            int x = (int) vh.getAndAddAcquire(recv, 0x01234567, Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndAddRelease(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndAddRelease(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndAddRelease(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndAddRelease(recv, 0x01234567, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseOr(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseOr(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseOr(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOr(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseOrAcquire(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseOrAcquire(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOrAcquire(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseOrRelease(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseOr(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseOr(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOr(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseAnd(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseAnd(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseAnd(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAnd(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseAndAcquire(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseAndAcquire(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAndAcquire(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseAndRelease(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseAnd(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseAnd(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAnd(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseXor(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseXor(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseXor(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXor(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseXorAcquire(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseXorAcquire(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXorAcquire(recv, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            int x = (int) vh.getAndBitwiseXorRelease(null, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            int x = (int) vh.getAndBitwiseXor(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            int x = (int) vh.getAndBitwiseXor(0, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXor(recv, 0x01234567, Void.class);
         });
     }
 
@@ -853,6 +1208,43 @@
                     invokeExact(recv, 0x01234567, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeInt.class, int.class)).
+                    invokeExact((VarHandleTestMethodTypeInt) null, 0x01234567);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                int x = (int) hs.get(am, methodType(int.class, Class.class, int.class)).
+                    invokeExact(Void.class, 0x01234567);
+            });
+            checkWMTE(() -> { // value reference class
+                int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeInt.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                int x = (int) hs.get(am, methodType(int.class, int.class, int.class)).
+                    invokeExact(0, 0x01234567);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeInt.class, int.class)).
+                    invokeExact(recv, 0x01234567);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeInt.class, int.class)).
+                    invokeExact(recv, 0x01234567);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                int x = (int) hs.get(am, methodType(int.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                int x = (int) hs.get(am, methodType(int.class, VarHandleTestMethodTypeInt.class, int.class)).
+                    invokeExact(recv, 0x01234567, Void.class);
+            });
+        }
     }
 
 
@@ -986,6 +1378,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(0x01234567, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(0x01234567, 0x01234567, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, 0x01234567);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1409,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x01234567);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(0x01234567, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(0x01234567, 0x01234567, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1535,48 @@
             int x = (int) vh.getAndSet(0x01234567, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetAcquire(0x01234567, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetRelease(0x01234567, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,24 +1598,233 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            int x = (int) vh.addAndGet(Void.class);
+            int x = (int) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(0x01234567);
+            Void r = (Void) vh.getAndAddAcquire(0x01234567);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(0x01234567);
+            boolean x = (boolean) vh.getAndAddAcquire(0x01234567);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            int x = (int) vh.addAndGet();
+            int x = (int) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            int x = (int) vh.addAndGet(0x01234567, Void.class);
+            int x = (int) vh.getAndAddAcquire(0x01234567, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndAddRelease(0x01234567, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOr(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOrAcquire(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOrRelease(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAnd(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAndAcquire(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAndRelease(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXor(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXorAcquire(0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXorRelease(0x01234567, Void.class);
         });
     }
 
@@ -1322,6 +1965,32 @@
                     invokeExact(0x01234567, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                int x = (int) hs.get(am, methodType(int.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, int.class)).
+                    invokeExact(0x01234567);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, int.class)).
+                    invokeExact(0x01234567);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                int x = (int) hs.get(am, methodType(int.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                int x = (int) hs.get(am, methodType(int.class, int.class, Class.class)).
+                    invokeExact(0x01234567, Void.class);
+            });
+        }
     }
 
 
@@ -1585,6 +2254,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, 0x01234567, 0x01234567);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 0x01234567, 0x01234567);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 0x01234567);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 0x01234567, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, 0x01234567, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, 0x01234567, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 0x01234567, 0x01234567, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, 0x01234567, 0x01234567);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +2309,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, 0x01234567, 0x01234567);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 0x01234567, 0x01234567);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 0x01234567);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x01234567, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, 0x01234567, 0x01234567);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 0x01234567, 0x01234567);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x01234567, 0x01234567, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +2507,72 @@
             int x = (int) vh.getAndSet(array, 0, 0x01234567, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndSetAcquire(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndSetAcquire(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            int x = (int) vh.getAndSetAcquire(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndSetAcquire(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetAcquire(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndSetRelease(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndSetRelease(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            int x = (int) vh.getAndSetRelease(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndSetRelease(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndSetRelease(array, 0, 0x01234567, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,36 +2606,365 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            int x = (int) vh.addAndGet(null, 0, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(null, 0, 0x01234567);
         });
         checkCCE(() -> { // array reference class
-            int x = (int) vh.addAndGet(Void.class, 0, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(Void.class, 0, 0x01234567);
         });
         checkWMTE(() -> { // value reference class
-            int x = (int) vh.addAndGet(array, 0, Void.class);
+            int x = (int) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            int x = (int) vh.addAndGet(0, 0, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(0, 0, 0x01234567);
         });
         checkWMTE(() -> { // index reference class
-            int x = (int) vh.addAndGet(array, Void.class, 0x01234567);
+            int x = (int) vh.getAndAddAcquire(array, Void.class, 0x01234567);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, 0x01234567);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, 0x01234567);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, 0x01234567);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, 0x01234567);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            int x = (int) vh.addAndGet();
+            int x = (int) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            int x = (int) vh.addAndGet(array, 0, 0x01234567, Void.class);
+            int x = (int) vh.getAndAddAcquire(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndAddRelease(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndAddRelease(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndAddRelease(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndAddRelease(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndAddRelease(array, 0, 0x01234567, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseOr(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseOr(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseOr(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseOr(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOr(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseOrAcquire(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseOrAcquire(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseOrAcquire(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOrAcquire(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseOrRelease(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseOrRelease(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseOrRelease(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseOrRelease(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseOrRelease(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseAnd(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseAnd(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseAnd(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseAnd(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAnd(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseAndAcquire(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseAndAcquire(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseAndAcquire(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAndAcquire(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseAndRelease(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseAndRelease(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseAndRelease(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseAndRelease(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseAndRelease(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseXor(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseXor(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseXor(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseXor(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXor(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseXorAcquire(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseXorAcquire(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseXorAcquire(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXorAcquire(array, 0, 0x01234567, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            int x = (int) vh.getAndBitwiseXorRelease(null, 0, 0x01234567);
+        });
+        checkCCE(() -> { // array reference class
+            int x = (int) vh.getAndBitwiseXorRelease(Void.class, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // value reference class
+            int x = (int) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            int x = (int) vh.getAndBitwiseXorRelease(0, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // index reference class
+            int x = (int) vh.getAndBitwiseXorRelease(array, Void.class, 0x01234567);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, 0x01234567);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, 0x01234567);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            int x = (int) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            int x = (int) vh.getAndBitwiseXorRelease(array, 0, 0x01234567, Void.class);
         });
     }
 
@@ -2144,6 +3208,48 @@
                     invokeExact(array, 0, 0x01234567, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                int x = (int) hs.get(am, methodType(int.class, int[].class, int.class, int.class)).
+                    invokeExact((int[]) null, 0, 0x01234567);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                int x = (int) hs.get(am, methodType(int.class, Class.class, int.class, int.class)).
+                    invokeExact(Void.class, 0, 0x01234567);
+            });
+            checkWMTE(() -> { // value reference class
+                int x = (int) hs.get(am, methodType(int.class, int[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                int x = (int) hs.get(am, methodType(int.class, int.class, int.class, int.class)).
+                    invokeExact(0, 0, 0x01234567);
+            });
+            checkWMTE(() -> { // index reference class
+                int x = (int) hs.get(am, methodType(int.class, int[].class, Class.class, int.class)).
+                    invokeExact(array, Void.class, 0x01234567);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, int[].class, int.class, int.class)).
+                    invokeExact(array, 0, 0x01234567);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, int[].class, int.class, int.class)).
+                    invokeExact(array, 0, 0x01234567);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                int x = (int) hs.get(am, methodType(int.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                int x = (int) hs.get(am, methodType(int.class, int[].class, int.class, int.class, Class.class)).
+                    invokeExact(array, 0, 0x01234567, Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java
index 6546193..576d5a1 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, 0x0123456789ABCDEFL, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             long x = (long) vh.getAndSet(recv, 0x0123456789ABCDEFL, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndSetAcquire(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndSetAcquire(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndSetAcquire(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetAcquire(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndSetRelease(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndSetRelease(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndSetRelease(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetRelease(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,34 +669,331 @@
             long x = (long) vh.getAndAdd(recv, 0x0123456789ABCDEFL, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            long x = (long) vh.addAndGet(null, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(null, 0x0123456789ABCDEFL);
         });
         checkCCE(() -> { // receiver reference class
-            long x = (long) vh.addAndGet(Void.class, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(Void.class, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // value reference class
-            long x = (long) vh.addAndGet(recv, Void.class);
+            long x = (long) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            long x = (long) vh.addAndGet(0, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(0, 0x0123456789ABCDEFL);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, 0x0123456789ABCDEFL);
+            Void r = (Void) vh.getAndAddAcquire(recv, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, 0x0123456789ABCDEFL);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, 0x0123456789ABCDEFL);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            long x = (long) vh.addAndGet();
+            long x = (long) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            long x = (long) vh.addAndGet(recv, 0x0123456789ABCDEFL, Void.class);
+            long x = (long) vh.getAndAddAcquire(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndAddRelease(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndAddRelease(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndAddRelease(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndAddRelease(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseOr(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseOr(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseOr(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseOrAcquire(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseOrAcquire(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOrAcquire(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseOrRelease(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseOr(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseOr(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOr(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseAnd(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseAnd(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseAnd(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseAndAcquire(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseAndAcquire(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAndAcquire(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseAndRelease(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseAnd(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseAnd(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAnd(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseXor(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseXor(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseXor(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseXorAcquire(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseXorAcquire(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXorAcquire(recv, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            long x = (long) vh.getAndBitwiseXorRelease(null, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            long x = (long) vh.getAndBitwiseXor(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            long x = (long) vh.getAndBitwiseXor(0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXor(recv, 0x0123456789ABCDEFL, Void.class);
         });
     }
 
@@ -853,6 +1208,43 @@
                     invokeExact(recv, 0x0123456789ABCDEFL, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                long x = (long) hs.get(am, methodType(long.class, VarHandleTestMethodTypeLong.class, long.class)).
+                    invokeExact((VarHandleTestMethodTypeLong) null, 0x0123456789ABCDEFL);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                long x = (long) hs.get(am, methodType(long.class, Class.class, long.class)).
+                    invokeExact(Void.class, 0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // value reference class
+                long x = (long) hs.get(am, methodType(long.class, VarHandleTestMethodTypeLong.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                long x = (long) hs.get(am, methodType(long.class, int.class, long.class)).
+                    invokeExact(0, 0x0123456789ABCDEFL);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeLong.class, long.class)).
+                    invokeExact(recv, 0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeLong.class, long.class)).
+                    invokeExact(recv, 0x0123456789ABCDEFL);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                long x = (long) hs.get(am, methodType(long.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                long x = (long) hs.get(am, methodType(long.class, VarHandleTestMethodTypeLong.class, long.class)).
+                    invokeExact(recv, 0x0123456789ABCDEFL, Void.class);
+            });
+        }
     }
 
 
@@ -986,6 +1378,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1409,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(0x0123456789ABCDEFL, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1535,48 @@
             long x = (long) vh.getAndSet(0x0123456789ABCDEFL, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetAcquire(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetRelease(0x0123456789ABCDEFL, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,24 +1598,233 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            long x = (long) vh.addAndGet(Void.class);
+            long x = (long) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(0x0123456789ABCDEFL);
+            Void r = (Void) vh.getAndAddAcquire(0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(0x0123456789ABCDEFL);
+            boolean x = (boolean) vh.getAndAddAcquire(0x0123456789ABCDEFL);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            long x = (long) vh.addAndGet();
+            long x = (long) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            long x = (long) vh.addAndGet(0x0123456789ABCDEFL, Void.class);
+            long x = (long) vh.getAndAddAcquire(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndAddRelease(0x0123456789ABCDEFL, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOr(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOrAcquire(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOrRelease(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAnd(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAndAcquire(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAndRelease(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXor(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXorAcquire(0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXorRelease(0x0123456789ABCDEFL, Void.class);
         });
     }
 
@@ -1322,6 +1965,32 @@
                     invokeExact(0x0123456789ABCDEFL, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                long x = (long) hs.get(am, methodType(long.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, long.class)).
+                    invokeExact(0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, long.class)).
+                    invokeExact(0x0123456789ABCDEFL);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                long x = (long) hs.get(am, methodType(long.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                long x = (long) hs.get(am, methodType(long.class, long.class, Class.class)).
+                    invokeExact(0x0123456789ABCDEFL, Void.class);
+            });
+        }
     }
 
 
@@ -1585,6 +2254,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +2309,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x0123456789ABCDEFL, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, 0x0123456789ABCDEFL, 0x0123456789ABCDEFL, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +2507,72 @@
             long x = (long) vh.getAndSet(array, 0, 0x0123456789ABCDEFL, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndSetAcquire(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndSetAcquire(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            long x = (long) vh.getAndSetAcquire(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndSetAcquire(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetAcquire(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndSetRelease(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndSetRelease(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            long x = (long) vh.getAndSetRelease(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndSetRelease(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndSetRelease(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,36 +2606,365 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            long x = (long) vh.addAndGet(null, 0, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(null, 0, 0x0123456789ABCDEFL);
         });
         checkCCE(() -> { // array reference class
-            long x = (long) vh.addAndGet(Void.class, 0, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(Void.class, 0, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // value reference class
-            long x = (long) vh.addAndGet(array, 0, Void.class);
+            long x = (long) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            long x = (long) vh.addAndGet(0, 0, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(0, 0, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // index reference class
-            long x = (long) vh.addAndGet(array, Void.class, 0x0123456789ABCDEFL);
+            long x = (long) vh.getAndAddAcquire(array, Void.class, 0x0123456789ABCDEFL);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, 0x0123456789ABCDEFL);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, 0x0123456789ABCDEFL);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, 0x0123456789ABCDEFL);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, 0x0123456789ABCDEFL);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            long x = (long) vh.addAndGet();
+            long x = (long) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            long x = (long) vh.addAndGet(array, 0, 0x0123456789ABCDEFL, Void.class);
+            long x = (long) vh.getAndAddAcquire(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndAddRelease(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndAddRelease(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndAddRelease(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndAddRelease(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndAddRelease(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseOr(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseOr(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseOr(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseOr(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOr(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseOrAcquire(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseOrAcquire(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseOrAcquire(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOrAcquire(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseOrRelease(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseOrRelease(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseOrRelease(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseOrRelease(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseOrRelease(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseAnd(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseAnd(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseAnd(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseAnd(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAnd(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseAndAcquire(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseAndAcquire(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseAndAcquire(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAndAcquire(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseAndRelease(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseAndRelease(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseAndRelease(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseAndRelease(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseAndRelease(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseXor(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseXor(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseXor(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseXor(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXor(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseXorAcquire(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseXorAcquire(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseXorAcquire(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXorAcquire(array, 0, 0x0123456789ABCDEFL, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            long x = (long) vh.getAndBitwiseXorRelease(null, 0, 0x0123456789ABCDEFL);
+        });
+        checkCCE(() -> { // array reference class
+            long x = (long) vh.getAndBitwiseXorRelease(Void.class, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // value reference class
+            long x = (long) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            long x = (long) vh.getAndBitwiseXorRelease(0, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // index reference class
+            long x = (long) vh.getAndBitwiseXorRelease(array, Void.class, 0x0123456789ABCDEFL);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, 0x0123456789ABCDEFL);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            long x = (long) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            long x = (long) vh.getAndBitwiseXorRelease(array, 0, 0x0123456789ABCDEFL, Void.class);
         });
     }
 
@@ -2144,6 +3208,48 @@
                     invokeExact(array, 0, 0x0123456789ABCDEFL, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                long x = (long) hs.get(am, methodType(long.class, long[].class, int.class, long.class)).
+                    invokeExact((long[]) null, 0, 0x0123456789ABCDEFL);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                long x = (long) hs.get(am, methodType(long.class, Class.class, int.class, long.class)).
+                    invokeExact(Void.class, 0, 0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // value reference class
+                long x = (long) hs.get(am, methodType(long.class, long[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                long x = (long) hs.get(am, methodType(long.class, int.class, int.class, long.class)).
+                    invokeExact(0, 0, 0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // index reference class
+                long x = (long) hs.get(am, methodType(long.class, long[].class, Class.class, long.class)).
+                    invokeExact(array, Void.class, 0x0123456789ABCDEFL);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, long[].class, int.class, long.class)).
+                    invokeExact(array, 0, 0x0123456789ABCDEFL);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, long[].class, int.class, long.class)).
+                    invokeExact(array, 0, 0x0123456789ABCDEFL);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                long x = (long) hs.get(am, methodType(long.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                long x = (long) hs.get(am, methodType(long.class, long[].class, int.class, long.class, Class.class)).
+                    invokeExact(array, 0, 0x0123456789ABCDEFL, Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java
index 82b6f3c..b3f5261 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeShort.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, (short)0x0123, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, (short)0x0123, (short)0x0123);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, (short)0x0123, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, (short)0x0123, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, (short)0x0123, (short)0x0123, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, (short)0x0123, (short)0x0123);
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, (short)0x0123, (short)0x0123);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, (short)0x0123, (short)0x0123);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, (short)0x0123);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, (short)0x0123, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, (short)0x0123, (short)0x0123);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, (short)0x0123, (short)0x0123, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
             short x = (short) vh.getAndSet(recv, (short)0x0123, Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndSetAcquire(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndSetAcquire(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndSetAcquire(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetAcquire(recv, (short)0x0123, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndSetRelease(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndSetRelease(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndSetRelease(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetRelease(recv, (short)0x0123, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -611,34 +669,331 @@
             short x = (short) vh.getAndAdd(recv, (short)0x0123, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            short x = (short) vh.addAndGet(null, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(null, (short)0x0123);
         });
         checkCCE(() -> { // receiver reference class
-            short x = (short) vh.addAndGet(Void.class, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(Void.class, (short)0x0123);
         });
         checkWMTE(() -> { // value reference class
-            short x = (short) vh.addAndGet(recv, Void.class);
+            short x = (short) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            short x = (short) vh.addAndGet(0, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(0, (short)0x0123);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, (short)0x0123);
+            Void r = (Void) vh.getAndAddAcquire(recv, (short)0x0123);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(recv, (short)0x0123);
+            boolean x = (boolean) vh.getAndAddAcquire(recv, (short)0x0123);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            short x = (short) vh.addAndGet();
+            short x = (short) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            short x = (short) vh.addAndGet(recv, (short)0x0123, Void.class);
+            short x = (short) vh.getAndAddAcquire(recv, (short)0x0123, Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndAddRelease(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndAddRelease(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndAddRelease(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndAddRelease(recv, (short)0x0123, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseOr(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseOr(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseOr(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOr(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseOrAcquire(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseOrAcquire(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOrAcquire(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseOrRelease(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseOr(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseOr(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOr(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseAnd(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseAnd(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseAnd(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAnd(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseAndAcquire(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseAndAcquire(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAndAcquire(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseAndRelease(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseAnd(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseAnd(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAnd(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseXor(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseXor(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseXor(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXor(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseXorAcquire(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseXorAcquire(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXorAcquire(recv, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            short x = (short) vh.getAndBitwiseXorRelease(null, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            short x = (short) vh.getAndBitwiseXor(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            short x = (short) vh.getAndBitwiseXor(0, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(recv, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXor(recv, (short)0x0123, Void.class);
         });
     }
 
@@ -853,6 +1208,43 @@
                     invokeExact(recv, (short)0x0123, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                short x = (short) hs.get(am, methodType(short.class, VarHandleTestMethodTypeShort.class, short.class)).
+                    invokeExact((VarHandleTestMethodTypeShort) null, (short)0x0123);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                short x = (short) hs.get(am, methodType(short.class, Class.class, short.class)).
+                    invokeExact(Void.class, (short)0x0123);
+            });
+            checkWMTE(() -> { // value reference class
+                short x = (short) hs.get(am, methodType(short.class, VarHandleTestMethodTypeShort.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                short x = (short) hs.get(am, methodType(short.class, int.class, short.class)).
+                    invokeExact(0, (short)0x0123);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodTypeShort.class, short.class)).
+                    invokeExact(recv, (short)0x0123);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, VarHandleTestMethodTypeShort.class, short.class)).
+                    invokeExact(recv, (short)0x0123);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                short x = (short) hs.get(am, methodType(short.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                short x = (short) hs.get(am, methodType(short.class, VarHandleTestMethodTypeShort.class, short.class)).
+                    invokeExact(recv, (short)0x0123, Void.class);
+            });
+        }
     }
 
 
@@ -986,6 +1378,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain((short)0x0123, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain((short)0x0123, (short)0x0123, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkWMTE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, (short)0x0123);
         });
         checkWMTE(() -> { // actual reference class
@@ -1000,23 +1409,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, (short)0x0123);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile((short)0x0123, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile((short)0x0123, (short)0x0123, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkWMTE(() -> { // expected reference class
@@ -1143,6 +1535,48 @@
             short x = (short) vh.getAndSet((short)0x0123, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetAcquire((short)0x0123, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetRelease((short)0x0123, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
@@ -1164,24 +1598,233 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkWMTE(() -> { // value reference class
-            short x = (short) vh.addAndGet(Void.class);
+            short x = (short) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet((short)0x0123);
+            Void r = (Void) vh.getAndAddAcquire((short)0x0123);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet((short)0x0123);
+            boolean x = (boolean) vh.getAndAddAcquire((short)0x0123);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            short x = (short) vh.addAndGet();
+            short x = (short) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            short x = (short) vh.addAndGet((short)0x0123, Void.class);
+            short x = (short) vh.getAndAddAcquire((short)0x0123, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndAddRelease((short)0x0123, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOr((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOrAcquire((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOrRelease((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAnd((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAndAcquire((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAndRelease((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXor((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXorAcquire((short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease((short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease((short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXorRelease((short)0x0123, Void.class);
         });
     }
 
@@ -1322,6 +1965,32 @@
                     invokeExact((short)0x0123, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkWMTE(() -> { // value reference class
+                short x = (short) hs.get(am, methodType(short.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, short.class)).
+                    invokeExact((short)0x0123);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, short.class)).
+                    invokeExact((short)0x0123);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                short x = (short) hs.get(am, methodType(short.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                short x = (short) hs.get(am, methodType(short.class, short.class, Class.class)).
+                    invokeExact((short)0x0123, Void.class);
+            });
+        }
     }
 
 
@@ -1585,6 +2254,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, (short)0x0123, (short)0x0123);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, (short)0x0123, (short)0x0123);
+        });
+        checkWMTE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, (short)0x0123);
+        });
+        checkWMTE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, (short)0x0123, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, (short)0x0123, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, (short)0x0123, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, (short)0x0123, (short)0x0123, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, (short)0x0123, (short)0x0123);
         });
         checkCCE(() -> { // receiver reference class
@@ -1611,35 +2309,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, (short)0x0123, (short)0x0123);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, (short)0x0123, (short)0x0123);
-        });
-        checkWMTE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, (short)0x0123);
-        });
-        checkWMTE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, (short)0x0123, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, (short)0x0123, (short)0x0123);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, (short)0x0123, (short)0x0123);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, (short)0x0123, (short)0x0123, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1838,6 +2507,72 @@
             short x = (short) vh.getAndSet(array, 0, (short)0x0123, Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndSetAcquire(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndSetAcquire(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            short x = (short) vh.getAndSetAcquire(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndSetAcquire(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetAcquire(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndSetRelease(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndSetRelease(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            short x = (short) vh.getAndSetRelease(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndSetRelease(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndSetRelease(array, 0, (short)0x0123, Void.class);
+        });
+
         // GetAndAdd
         // Incorrect argument types
         checkNPE(() -> { // null array
@@ -1871,36 +2606,365 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            short x = (short) vh.addAndGet(null, 0, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(null, 0, (short)0x0123);
         });
         checkCCE(() -> { // array reference class
-            short x = (short) vh.addAndGet(Void.class, 0, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(Void.class, 0, (short)0x0123);
         });
         checkWMTE(() -> { // value reference class
-            short x = (short) vh.addAndGet(array, 0, Void.class);
+            short x = (short) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            short x = (short) vh.addAndGet(0, 0, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(0, 0, (short)0x0123);
         });
         checkWMTE(() -> { // index reference class
-            short x = (short) vh.addAndGet(array, Void.class, (short)0x0123);
+            short x = (short) vh.getAndAddAcquire(array, Void.class, (short)0x0123);
         });
         // Incorrect return type
         checkWMTE(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, (short)0x0123);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, (short)0x0123);
         });
         checkWMTE(() -> { // primitive class
-            boolean x = (boolean) vh.addAndGet(array, 0, (short)0x0123);
+            boolean x = (boolean) vh.getAndAddAcquire(array, 0, (short)0x0123);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            short x = (short) vh.addAndGet();
+            short x = (short) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            short x = (short) vh.addAndGet(array, 0, (short)0x0123, Void.class);
+            short x = (short) vh.getAndAddAcquire(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndAddRelease(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndAddRelease(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndAddRelease(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndAddRelease(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndAddRelease(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndAddRelease(array, 0, (short)0x0123, Void.class);
+        });
+
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseOr(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseOr(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseOr(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseOr(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOr(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOr(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseOrAcquire(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseOrAcquire(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseOrAcquire(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrAcquire(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOrAcquire(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseOrRelease(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseOrRelease(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseOrRelease(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseOrRelease(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseOrRelease(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseOrRelease(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseAnd(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseAnd(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseAnd(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseAnd(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAnd(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAnd(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseAndAcquire(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseAndAcquire(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseAndAcquire(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndAcquire(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAndAcquire(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseAndRelease(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseAndRelease(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseAndRelease(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseAndRelease(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseAndRelease(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseAndRelease(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseXor(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseXor(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseXor(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseXor(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXor(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXor(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseXorAcquire(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseXorAcquire(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseXorAcquire(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorAcquire(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXorAcquire(array, 0, (short)0x0123, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            short x = (short) vh.getAndBitwiseXorRelease(null, 0, (short)0x0123);
+        });
+        checkCCE(() -> { // array reference class
+            short x = (short) vh.getAndBitwiseXorRelease(Void.class, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // value reference class
+            short x = (short) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            short x = (short) vh.getAndBitwiseXorRelease(0, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // index reference class
+            short x = (short) vh.getAndBitwiseXorRelease(array, Void.class, (short)0x0123);
+        });
+        // Incorrect return type
+        checkWMTE(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, (short)0x0123);
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndBitwiseXorRelease(array, 0, (short)0x0123);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            short x = (short) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            short x = (short) vh.getAndBitwiseXorRelease(array, 0, (short)0x0123, Void.class);
         });
     }
 
@@ -2144,6 +3208,48 @@
                     invokeExact(array, 0, (short)0x0123, Void.class);
             });
         }
+
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                short x = (short) hs.get(am, methodType(short.class, short[].class, int.class, short.class)).
+                    invokeExact((short[]) null, 0, (short)0x0123);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                short x = (short) hs.get(am, methodType(short.class, Class.class, int.class, short.class)).
+                    invokeExact(Void.class, 0, (short)0x0123);
+            });
+            checkWMTE(() -> { // value reference class
+                short x = (short) hs.get(am, methodType(short.class, short[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                short x = (short) hs.get(am, methodType(short.class, int.class, int.class, short.class)).
+                    invokeExact(0, 0, (short)0x0123);
+            });
+            checkWMTE(() -> { // index reference class
+                short x = (short) hs.get(am, methodType(short.class, short[].class, Class.class, short.class)).
+                    invokeExact(array, Void.class, (short)0x0123);
+            });
+            // Incorrect return type
+            checkWMTE(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, short[].class, int.class, short.class)).
+                    invokeExact(array, 0, (short)0x0123);
+            });
+            checkWMTE(() -> { // primitive class
+                boolean x = (boolean) hs.get(am, methodType(boolean.class, short[].class, int.class, short.class)).
+                    invokeExact(array, 0, (short)0x0123);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                short x = (short) hs.get(am, methodType(short.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                short x = (short) hs.get(am, methodType(short.class, short[].class, int.class, short.class, Class.class)).
+                    invokeExact(array, 0, (short)0x0123, Void.class);
+            });
+        }
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java
index 41d0e6b..9e2debe 100644
--- a/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java
+++ b/jdk/test/java/lang/invoke/VarHandles/VarHandleTestMethodTypeString.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -353,6 +353,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, "foo", "foo");
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, "foo", "foo");
+        });
+        checkCCE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, "foo");
+        });
+        checkCCE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, "foo", Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, "foo", "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, "foo", "foo", Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, "foo", "foo");
         });
         checkCCE(() -> { // receiver reference class
@@ -376,32 +402,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, "foo", "foo");
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, "foo", "foo");
-        });
-        checkCCE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, "foo");
-        });
-        checkCCE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, "foo", Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, "foo", "foo");
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, "foo", "foo", Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,65 @@
             String x = (String) vh.getAndSet(recv, "foo", Void.class);
         });
 
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            String x = (String) vh.getAndSetAcquire(null, "foo");
+        });
+        checkCCE(() -> { // receiver reference class
+            String x = (String) vh.getAndSetAcquire(Void.class, "foo");
+        });
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            String x = (String) vh.getAndSetAcquire(0, "foo");
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, "foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(recv, "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetAcquire(recv, "foo", Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            String x = (String) vh.getAndSetRelease(null, "foo");
+        });
+        checkCCE(() -> { // receiver reference class
+            String x = (String) vh.getAndSetRelease(Void.class, "foo");
+        });
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            String x = (String) vh.getAndSetRelease(0, "foo");
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, "foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(recv, "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetRelease(recv, "foo", Void.class);
+        });
+
+
     }
 
     static void testInstanceFieldWrongMethodType(VarHandleTestMethodTypeString recv, Handles hs) throws Throwable {
@@ -759,6 +818,7 @@
             });
         }
 
+
     }
 
 
@@ -892,6 +952,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkCCE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, "foo");
+        });
+        checkCCE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain("foo", Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain("foo", "foo", Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkCCE(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, "foo");
         });
         checkCCE(() -> { // actual reference class
@@ -906,23 +983,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkCCE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, "foo");
-        });
-        checkCCE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile("foo", Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile("foo", "foo", Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkCCE(() -> { // expected reference class
@@ -1049,6 +1109,49 @@
             String x = (String) vh.getAndSet("foo", Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire("foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire("foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetAcquire("foo", Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease("foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease("foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetRelease("foo", Void.class);
+        });
+
+
     }
 
     static void testStaticFieldWrongMethodType(Handles hs) throws Throwable {
@@ -1163,6 +1266,7 @@
             });
         }
 
+
     }
 
 
@@ -1426,6 +1530,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, "foo", "foo");
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, "foo", "foo");
+        });
+        checkCCE(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, "foo");
+        });
+        checkCCE(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, "foo", Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, "foo", "foo");
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, "foo", "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, "foo", "foo", Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, "foo", "foo");
         });
         checkCCE(() -> { // receiver reference class
@@ -1452,35 +1585,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, "foo", "foo");
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, "foo", "foo");
-        });
-        checkCCE(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, "foo");
-        });
-        checkCCE(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, "foo", Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, "foo", "foo");
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, "foo", "foo");
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, "foo", "foo", Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1679,6 +1783,73 @@
             String x = (String) vh.getAndSet(array, 0, "foo", Void.class);
         });
 
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            String x = (String) vh.getAndSetAcquire(null, 0, "foo");
+        });
+        checkCCE(() -> { // array reference class
+            String x = (String) vh.getAndSetAcquire(Void.class, 0, "foo");
+        });
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            String x = (String) vh.getAndSetAcquire(0, 0, "foo");
+        });
+        checkWMTE(() -> { // index reference class
+            String x = (String) vh.getAndSetAcquire(array, Void.class, "foo");
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, "foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetAcquire(array, 0, "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetAcquire(array, 0, "foo", Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            String x = (String) vh.getAndSetRelease(null, 0, "foo");
+        });
+        checkCCE(() -> { // array reference class
+            String x = (String) vh.getAndSetRelease(Void.class, 0, "foo");
+        });
+        checkCCE(() -> { // value reference class
+            String x = (String) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            String x = (String) vh.getAndSetRelease(0, 0, "foo");
+        });
+        checkWMTE(() -> { // index reference class
+            String x = (String) vh.getAndSetRelease(array, Void.class, "foo");
+        });
+        // Incorrect return type
+        checkCCE(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, "foo");
+        });
+        checkWMTE(() -> { // primitive class
+            boolean x = (boolean) vh.getAndSetRelease(array, 0, "foo");
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            String x = (String) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            String x = (String) vh.getAndSetRelease(array, 0, "foo", Void.class);
+        });
+
+
     }
 
     static void testArrayWrongMethodType(Handles hs) throws Throwable {
@@ -1880,6 +2051,7 @@
             });
         }
 
+
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template
index a0b48a9..3d36bd3 100644
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestAccess.java.template
@@ -104,30 +104,58 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 #else[CAS]
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_SET));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 #end[CAS]
 
 #if[AtomicAdd]
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
 #else[AtomicAdd]
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
 #end[AtomicAdd]
+
+#if[Bitwise]
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
+#else[Bitwise]
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
+#end[Bitwise]
     }
 
 
@@ -295,11 +323,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
         });
 
         checkUOE(() -> {
@@ -313,6 +341,14 @@
         checkUOE(() -> {
             $type$ r = ($type$) vh.getAndSet(recv, $value1$);
         });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetRelease(recv, $value1$);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -321,9 +357,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet(recv, $value1$);
+            $type$ o = ($type$) vh.getAndAddAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease(recv, $value1$);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease(recv, $value1$);
+        });
+#end[Bitwise]
     }
 
 
@@ -389,11 +467,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet($value1$, $value2$);
+            boolean r = vh.weakCompareAndSetPlain($value1$, $value2$);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile($value1$, $value2$);
+            boolean r = vh.weakCompareAndSet($value1$, $value2$);
         });
 
         checkUOE(() -> {
@@ -407,6 +485,14 @@
         checkUOE(() -> {
             $type$ r = ($type$) vh.getAndSet($value1$);
         });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetRelease($value1$);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -415,9 +501,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet($value1$);
+            $type$ o = ($type$) vh.getAndAddAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease($value1$);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease($value1$);
+        });
+#end[Bitwise]
     }
 
 
@@ -514,11 +642,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, $value1$, $value2$);
+                success = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
             }
-            assertEquals(success, true, "weakCompareAndSet $type$");
+            assertEquals(success, true, "weakCompareAndSetPlain $type$");
             $type$ x = ($type$) vh.get(recv);
-            assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+            assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
         }
 
         {
@@ -544,33 +672,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, $value2$, $value1$);
+                success = vh.weakCompareAndSet(recv, $value2$, $value1$);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+            assertEquals(success, true, "weakCompareAndSet $type$");
             $type$ x = ($type$) vh.get(recv);
-            assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$ value");
+            assertEquals(x, $value1$, "weakCompareAndSet $type$ value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, $value1$);
+
             $type$ o = ($type$) vh.getAndSet(recv, $value2$);
             assertEquals(o, $value1$, "getAndSet $type$");
             $type$ x = ($type$) vh.get(recv);
             assertEquals(x, $value2$, "getAndSet $type$ value");
         }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndSetAcquire(recv, $value2$);
+            assertEquals(o, $value1$, "getAndSetAcquire $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, $value2$, "getAndSetAcquire $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndSetRelease(recv, $value2$);
+            assertEquals(o, $value1$, "getAndSetRelease $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, $value2$, "getAndSetRelease $type$ value");
+        }
 #end[CAS]
 
 #if[AtomicAdd]
-        vh.set(recv, $value1$);
-
         // get and add, add and get
         {
-            $type$ o = ($type$) vh.getAndAdd(recv, $value3$);
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndAdd(recv, $value2$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) vh.addAndGet(recv, $value3$);
-            assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndAddAcquire(recv, $value2$);
+            assertEquals(o, $value1$, "getAndAddAcquire $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndAddRelease(recv, $value2$);
+            assertEquals(o, $value1$, "getAndAddRelease$type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // get and bitwise or
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOr(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAnd(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXor(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+        }
+
+        {
+            vh.set(recv, $value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+            $type$ x = ($type$) vh.get(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+        }
+#end[Bitwise]
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccess$Type$ recv, VarHandle vh) {
@@ -592,11 +844,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value2$);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSet(recv, $value1$, $value2$);
         });
 
         checkUOE(() -> {
@@ -610,6 +862,14 @@
         checkUOE(() -> {
             $type$ r = ($type$) vh.getAndSet(recv, $value1$);
         });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetRelease(recv, $value1$);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -618,9 +878,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet(recv, $value1$);
+            $type$ o = ($type$) vh.getAndAddAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease(recv, $value1$);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire(recv, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease(recv, $value1$);
+        });
+#end[Bitwise]
     }
 
 
@@ -717,11 +1019,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet($value1$, $value2$);
+                success = vh.weakCompareAndSetPlain($value1$, $value2$);
             }
-            assertEquals(success, true, "weakCompareAndSet $type$");
+            assertEquals(success, true, "weakCompareAndSetPlain $type$");
             $type$ x = ($type$) vh.get();
-            assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+            assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
         }
 
         {
@@ -747,33 +1049,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease($value2$, $value1$);
+                success = vh.weakCompareAndSet($value2$, $value1$);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+            assertEquals(success, true, "weakCompareAndSet $type$");
             $type$ x = ($type$) vh.get();
-            assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+            assertEquals(x, $value1$, "weakCompareAndSet $type$");
         }
 
         // Compare set and get
         {
+            vh.set($value1$);
+
             $type$ o = ($type$) vh.getAndSet($value2$);
             assertEquals(o, $value1$, "getAndSet $type$");
             $type$ x = ($type$) vh.get();
             assertEquals(x, $value2$, "getAndSet $type$ value");
         }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndSetAcquire($value2$);
+            assertEquals(o, $value1$, "getAndSetAcquire $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, $value2$, "getAndSetAcquire $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndSetRelease($value2$);
+            assertEquals(o, $value1$, "getAndSetRelease $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, $value2$, "getAndSetRelease $type$ value");
+        }
 #end[CAS]
 
 #if[AtomicAdd]
-        vh.set($value1$);
-
         // get and add, add and get
         {
-            $type$ o = ($type$) vh.getAndAdd( $value3$);
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndAdd($value2$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) vh.addAndGet($value3$);
-            assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndAddAcquire($value2$);
+            assertEquals(o, $value1$, "getAndAddAcquire $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndAddRelease($value2$);
+            assertEquals(o, $value1$, "getAndAddRelease$type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // get and bitwise or
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOr($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAnd($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXor($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+        }
+
+        {
+            vh.set($value1$);
+
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+            $type$ x = ($type$) vh.get();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+        }
+#end[Bitwise]
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
@@ -795,11 +1221,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet($value1$, $value2$);
+            boolean r = vh.weakCompareAndSetPlain($value1$, $value2$);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile($value1$, $value2$);
+            boolean r = vh.weakCompareAndSet($value1$, $value2$);
         });
 
         checkUOE(() -> {
@@ -813,6 +1239,14 @@
         checkUOE(() -> {
             $type$ r = ($type$) vh.getAndSet($value1$);
         });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetRelease($value1$);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -821,9 +1255,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet($value1$);
+            $type$ o = ($type$) vh.getAndAddAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease($value1$);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire($value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease($value1$);
+        });
+#end[Bitwise]
     }
 
 
@@ -923,11 +1399,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, $value1$, $value2$);
+                    success = vh.weakCompareAndSetPlain(array, i, $value1$, $value2$);
                 }
-                assertEquals(success, true, "weakCompareAndSet $type$");
+                assertEquals(success, true, "weakCompareAndSetPlain $type$");
                 $type$ x = ($type$) vh.get(array, i);
-                assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+                assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
             }
 
             {
@@ -953,33 +1429,157 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, $value2$, $value1$);
+                    success = vh.weakCompareAndSet(array, i, $value2$, $value1$);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+                assertEquals(success, true, "weakCompareAndSet $type$");
                 $type$ x = ($type$) vh.get(array, i);
-                assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+                assertEquals(x, $value1$, "weakCompareAndSet $type$");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, $value1$);
+
                 $type$ o = ($type$) vh.getAndSet(array, i, $value2$);
                 assertEquals(o, $value1$, "getAndSet $type$");
                 $type$ x = ($type$) vh.get(array, i);
                 assertEquals(x, $value2$, "getAndSet $type$ value");
             }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndSetAcquire(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndSetAcquire $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, $value2$, "getAndSetAcquire $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndSetRelease(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndSetRelease $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, $value2$, "getAndSetRelease $type$ value");
+            }
 #end[CAS]
 
 #if[AtomicAdd]
-            vh.set(array, i, $value1$);
-
             // get and add, add and get
             {
-                $type$ o = ($type$) vh.getAndAdd(array, i, $value3$);
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndAdd(array, i, $value2$);
                 assertEquals(o, $value1$, "getAndAdd $type$");
-                $type$ c = ($type$) vh.addAndGet(array, i, $value3$);
-                assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndAddAcquire(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndAddAcquire $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndAddRelease(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndAddRelease$type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
             }
 #end[AtomicAdd]
+
+#if[Bitwise]
+            // get and bitwise or
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+            }
+
+            {
+                vh.set(array, i, $value1$);
+
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+                $type$ x = ($type$) vh.get(array, i);
+                assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+            }
+#end[Bitwise]
         }
     }
 
@@ -1005,11 +1605,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(array, i, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSetPlain(array, i, $value1$, $value2$);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(array, i, $value1$, $value2$);
+            boolean r = vh.weakCompareAndSet(array, i, $value1$, $value2$);
         });
 
         checkUOE(() -> {
@@ -1023,6 +1623,14 @@
         checkUOE(() -> {
             $type$ r = ($type$) vh.getAndSet(array, i, $value1$);
         });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetAcquire(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ r = ($type$) vh.getAndSetRelease(array, i, $value1$);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -1031,9 +1639,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet(array, i, $value1$);
+            $type$ o = ($type$) vh.getAndAddAcquire(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease(array, i, $value1$);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, i, $value1$);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, i, $value1$);
+        });
+#end[Bitwise]
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -1092,11 +1742,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, $value1$, $value2$);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, $value1$, $value2$);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, $value1$, $value2$);
+                boolean r = vh.weakCompareAndSet(array, ci, $value1$, $value2$);
             });
 
             checkIOOBE(() -> {
@@ -1110,17 +1760,67 @@
             checkIOOBE(() -> {
                 $type$ o = ($type$) vh.getAndSet(array, ci, $value1$);
             });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndSetAcquire(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndSetRelease(array, ci, $value1$);
+            });
 #end[CAS]
 
 #if[AtomicAdd]
             checkIOOBE(() -> {
-                $type$ o = ($type$) vh.getAndAdd(array, ci, $value3$);
+                $type$ o = ($type$) vh.getAndAdd(array, ci, $value1$);
             });
 
             checkIOOBE(() -> {
-                $type$ o = ($type$) vh.addAndGet(array, ci, $value3$);
+                $type$ o = ($type$) vh.getAndAddAcquire(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndAddRelease(array, ci, $value1$);
             });
 #end[AtomicAdd]
+
+#if[Bitwise]
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, $value1$);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, $value1$);
+            });
+#end[Bitwise]
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template
index a7aef2b..caf18e0 100644
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestByteArrayView.java.template
@@ -93,30 +93,58 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 #else[CAS]
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_SET));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 #end[CAS]
 
 #if[AtomicAdd]
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
 #else[AtomicAdd]
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
 #end[AtomicAdd]
+
+#if[Bitwise]
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
+#else[Bitwise]
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
+#end[Bitwise]
     }
 
     @Test(dataProvider = "typesProvider")
@@ -219,11 +247,11 @@
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
-            boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+            boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
         });
 
         checkUOE(() -> {
@@ -237,6 +265,14 @@
         checkUOE(() -> {
             $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
         });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+        });
 #end[CAS]
 
 #if[!AtomicAdd]
@@ -245,9 +281,51 @@
         });
 
         checkUOE(() -> {
-            $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+            $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
         });
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+        });
+
+        checkUOE(() -> {
+            $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+        });
+#end[Bitwise]
     }
 
     static void testArrayUnsupported(ByteBufferSource bs, VarHandleSource vhs) {
@@ -293,11 +371,11 @@
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkROBE(() -> {
@@ -312,6 +390,14 @@
                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
             });
 
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
+
 #else[CAS]
             checkUOE(() -> {
                 boolean r = vh.compareAndSet(array, ci, VALUE_1, VALUE_2);
@@ -330,11 +416,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -348,6 +434,14 @@
             checkUOE(() -> {
                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
             });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -356,7 +450,11 @@
             });
 
             checkROBE(() -> {
-                $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
             });
 #else[AtomicAdd]
             checkUOE(() -> {
@@ -364,9 +462,87 @@
             });
 
             checkUOE(() -> {
-                $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
             });
 #end[AtomicAdd]
+
+#if[Bitwise]
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkROBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+            });
+#else[Bitwise]
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+            });
+#end[Bitwise]
         }
         else {
 #if[!CAS]
@@ -387,11 +563,11 @@
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkUOE(() -> {
@@ -405,6 +581,14 @@
             checkUOE(() -> {
                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
             });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
 #end[CAS]
 #if[!AtomicAdd]
             checkUOE(() -> {
@@ -412,9 +596,50 @@
             });
 
             checkUOE(() -> {
-                $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
             });
 #end[AtomicAdd]
+#if[!Bitwise]
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkUOE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+            });
+#end[Bitwise]
         }
     }
 
@@ -477,11 +702,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
             });
 
             checkIOOBE(() -> {
@@ -495,6 +720,14 @@
             checkIOOBE(() -> {
                 $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
             });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+            });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -503,10 +736,52 @@
             });
 
             checkIOOBE(() -> {
-                $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
             });
 #end[AtomicAdd]
 
+#if[Bitwise]
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+            });
+
+            checkIOOBE(() -> {
+                $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+            });
+#end[Bitwise]
+
         }
     }
 
@@ -573,11 +848,11 @@
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkIOOBE(() -> {
@@ -591,6 +866,14 @@
                 checkIOOBE(() -> {
                     $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
                 });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -599,9 +882,51 @@
                 });
 
                 checkIOOBE(() -> {
-                    $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                    $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
                 });
 #end[AtomicAdd]
+
+#if[Bitwise]
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkIOOBE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+                });
+#end[Bitwise]
             }
         }
     }
@@ -660,11 +985,11 @@
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
-                    boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                    boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                 });
 
                 checkISE(() -> {
@@ -678,6 +1003,14 @@
                 checkISE(() -> {
                     $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
                 });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+                });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -686,10 +1019,51 @@
                 });
 
                 checkISE(() -> {
-                    $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                    $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
                 });
 #end[AtomicAdd]
 
+#if[Bitwise]
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                });
+
+                checkISE(() -> {
+                    $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+                });
+#end[Bitwise]
             }
         }
     }
@@ -750,11 +1124,11 @@
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSetPlain(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
-                        boolean r = vh.weakCompareAndSetVolatile(array, ci, VALUE_1, VALUE_2);
+                        boolean r = vh.weakCompareAndSet(array, ci, VALUE_1, VALUE_2);
                     });
 
                     checkISE(() -> {
@@ -768,6 +1142,14 @@
                     checkISE(() -> {
                         $type$ o = ($type$) vh.getAndSet(array, ci, VALUE_1);
                     });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndSetAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndSetRelease(array, ci, VALUE_1);
+                    });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -776,9 +1158,51 @@
                     });
 
                     checkISE(() -> {
-                        $type$ o = ($type$) vh.addAndGet(array, ci, VALUE_1);
+                        $type$ o = ($type$) vh.getAndAddAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndAddRelease(array, ci, VALUE_1);
                     });
 #end[AtomicAdd]
+
+#if[Bitwise]
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseOr(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseAnd(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseXor(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, ci, VALUE_1);
+                    });
+
+                    checkISE(() -> {
+                        $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, ci, VALUE_1);
+                    });
+#end[Bitwise]
                 }
             }
         }
@@ -888,11 +1312,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet $type$");
+                    assertEquals(success, true, "weakCompareAndSetPlain $type$");
                     $type$ x = ($type$) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet $type$ value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain $type$ value");
                 }
 
                 {
@@ -916,32 +1340,159 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile $type$");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet $type$");
                     $type$ x = ($type$) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile $type$ value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet $type$");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     $type$ o = ($type$) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet $type$");
                     $type$ x = ($type$) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet $type$ value");
                 }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease $type$ value");
+                }
 #end[CAS]
 
 #if[AtomicAdd]
-                vh.set(array, i, VALUE_1);
-
                 // get and add, add and get
                 {
-                    $type$ o = ($type$) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd $type$");
-                    $type$ c = ($type$) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd $type$ value");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease $type$ value");
                 }
 #end[AtomicAdd]
+
+#if[Bitwise]
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease $type$ value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease $type$ value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease $type$ value");
+                }
+#end[Bitwise]
             }
         }
     }
@@ -1050,11 +1601,11 @@
                 {
                     boolean success = false;
                     for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                        success = vh.weakCompareAndSet(array, i, VALUE_1, VALUE_2);
+                        success = vh.weakCompareAndSetPlain(array, i, VALUE_1, VALUE_2);
                     }
-                    assertEquals(success, true, "weakCompareAndSet $type$");
+                    assertEquals(success, true, "weakCompareAndSetPlain $type$");
                     $type$ x = ($type$) vh.get(array, i);
-                    assertEquals(x, VALUE_2, "weakCompareAndSet $type$ value");
+                    assertEquals(x, VALUE_2, "weakCompareAndSetPlain $type$ value");
                 }
 
                 {
@@ -1078,32 +1629,159 @@
                 }
 
                 {
-                    boolean r = vh.weakCompareAndSetVolatile(array, i, VALUE_2, VALUE_1);
-                    assertEquals(r, true, "weakCompareAndSetVolatile $type$");
+                    boolean success = false;
+                    for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
+                        success = vh.weakCompareAndSet(array, i, VALUE_2, VALUE_1);
+                    }
+                    assertEquals(success, true, "weakCompareAndSet $type$");
                     $type$ x = ($type$) vh.get(array, i);
-                    assertEquals(x, VALUE_1, "weakCompareAndSetVolatile $type$ value");
+                    assertEquals(x, VALUE_1, "weakCompareAndSet $type$");
                 }
 
                 // Compare set and get
                 {
+                    vh.set(array, i, VALUE_1);
+
                     $type$ o = ($type$) vh.getAndSet(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndSet $type$");
                     $type$ x = ($type$) vh.get(array, i);
                     assertEquals(x, VALUE_2, "getAndSet $type$ value");
                 }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndSetAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndSetRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndSetRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_2, "getAndSetRelease $type$ value");
+                }
 #end[CAS]
 
 #if[AtomicAdd]
-                vh.set(array, i, VALUE_1);
-
                 // get and add, add and get
                 {
-                    $type$ o = ($type$) vh.getAndAdd(array, i, VALUE_3);
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAdd(array, i, VALUE_2);
                     assertEquals(o, VALUE_1, "getAndAdd $type$");
-                    $type$ c = ($type$) vh.addAndGet(array, i, VALUE_3);
-                    assertEquals(c, VALUE_1 + VALUE_3 + VALUE_3, "getAndAdd $type$ value");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAdd $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAddAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndAddRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndAddRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 + VALUE_2, "getAndAddRelease $type$ value");
                 }
 #end[AtomicAdd]
+
+#if[Bitwise]
+                // get and bitwise or
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOr(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOr $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOr $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOrAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseOrRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseOrRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 | VALUE_2, "getAndBitwiseOrRelease $type$ value");
+                }
+
+                // get and bitwise and
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAnd(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAnd $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAnd $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAndAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseAndRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseAndRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 & VALUE_2, "getAndBitwiseAndRelease $type$ value");
+                }
+
+                // get and bitwise xor
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXor(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXor $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXor $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXorAcquire(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorAcquire $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorAcquire $type$ value");
+                }
+
+                {
+                    vh.set(array, i, VALUE_1);
+
+                    $type$ o = ($type$) vh.getAndBitwiseXorRelease(array, i, VALUE_2);
+                    assertEquals(o, VALUE_1, "getAndBitwiseXorRelease $type$");
+                    $type$ x = ($type$) vh.get(array, i);
+                    assertEquals(x, VALUE_1 ^ VALUE_2, "getAndBitwiseXorRelease $type$ value");
+                }
+#end[Bitwise]
             }
         }
     }
diff --git a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template
index 6df8b20..c82d533 100644
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodHandleAccess.java.template
@@ -211,11 +211,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value1$, $value2$);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(recv, $value1$, $value2$);
             }
-            assertEquals(success, true, "weakCompareAndSet $type$");
+            assertEquals(success, true, "weakCompareAndSetPlain $type$");
             $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+            assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
         }
 
         {
@@ -241,11 +241,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(recv, $value2$, $value1$);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(recv, $value2$, $value1$);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+            assertEquals(success, true, "weakCompareAndSet $type$");
             $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
-            assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+            assertEquals(x, $value1$, "weakCompareAndSet $type$");
         }
 
         // Compare set and get
@@ -258,16 +258,120 @@
 #end[CAS]
 
 #if[AtomicAdd]
-        hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
-
         // get and add, add and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, $value3$);
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(recv, $value2$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(recv, $value3$);
-            assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndAddAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndAddRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(recv, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(recv, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(recv);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+        }
+#end[Bitwise]
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestMethodHandleAccess$Type$ recv, Handles hs) throws Throwable {
@@ -298,6 +402,14 @@
             });
         }
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                $type$ r = ($type$) hs.get(am).invokeExact(recv, $value1$);
+            });
+        }
+#end[Bitwise]
     }
 
 
@@ -394,11 +506,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value1$, $value2$);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact($value1$, $value2$);
             }
-            assertEquals(success, true, "weakCompareAndSet $type$");
+            assertEquals(success, true, "weakCompareAndSetPlain $type$");
             $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+            assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
         }
 
         {
@@ -424,33 +536,159 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact($value2$, $value1$);
+                success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact($value2$, $value1$);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+            assertEquals(success, true, "weakCompareAndSet $type$");
             $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
-            assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+            assertEquals(x, $value1$, "weakCompareAndSet $type$");
         }
 
         // Compare set and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact( $value2$);
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact($value2$);
             assertEquals(o, $value1$, "getAndSet $type$");
             $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
             assertEquals(x, $value2$, "getAndSet $type$ value");
         }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndSetAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, $value2$, "getAndSetAcquire $type$ value");
+        }
+
+        // Compare set and get
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndSetRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, $value2$, "getAndSetRelease $type$ value");
+        }
 #end[CAS]
 
 #if[AtomicAdd]
-        hs.get(TestAccessMode.SET).invokeExact($value1$);
-
         // get and add, add and get
         {
-            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact( $value3$);
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact($value2$);
             assertEquals(o, $value1$, "getAndAdd $type$");
-            $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact($value3$);
-            assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndAddAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndAddRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact($value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact($value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact();
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+        }
+#end[Bitwise]
     }
 
     static void testStaticFieldUnsupported(Handles hs) throws Throwable {
@@ -481,6 +719,14 @@
             });
         }
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                $type$ r = ($type$) hs.get(am).invokeExact($value1$);
+            });
+        }
+#end[Bitwise]
     }
 
 
@@ -580,11 +826,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value1$, $value2$);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_PLAIN).invokeExact(array, i, $value1$, $value2$);
                 }
-                assertEquals(success, true, "weakCompareAndSet $type$");
+                assertEquals(success, true, "weakCompareAndSetPlain $type$");
                 $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, $value2$, "weakCompareAndSet $type$ value");
+                assertEquals(x, $value2$, "weakCompareAndSetPlain $type$ value");
             }
 
             {
@@ -610,33 +856,157 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET_VOLATILE).invokeExact(array, i, $value2$, $value1$);
+                    success = (boolean) hs.get(TestAccessMode.WEAK_COMPARE_AND_SET).invokeExact(array, i, $value2$, $value1$);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile $type$");
+                assertEquals(success, true, "weakCompareAndSet $type$");
                 $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
-                assertEquals(x, $value1$, "weakCompareAndSetVolatile $type$");
+                assertEquals(x, $value1$, "weakCompareAndSet $type$");
             }
 
             // Compare set and get
             {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
                 $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET).invokeExact(array, i, $value2$);
                 assertEquals(o, $value1$, "getAndSet $type$");
                 $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
                 assertEquals(x, $value2$, "getAndSet $type$ value");
             }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET_ACQUIRE).invokeExact(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndSetAcquire $type$");
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, $value2$, "getAndSetAcquire $type$ value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_SET_RELEASE).invokeExact(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndSetRelease $type$");
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, $value2$, "getAndSetRelease $type$ value");
+            }
 #end[CAS]
 
 #if[AtomicAdd]
-            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
-
             // get and add, add and get
             {
-                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, $value3$);
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD).invokeExact(array, i, $value2$);
                 assertEquals(o, $value1$, "getAndAdd $type$");
-                $type$ c = ($type$) hs.get(TestAccessMode.ADD_AND_GET).invokeExact(array, i, $value3$);
-                assertEquals(c, ($type$)($value1$ + $value3$ + $value3$), "getAndAdd $type$ value");
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAdd $type$ value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_ACQUIRE).invokeExact(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndAddAcquire $type$");
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddAcquire $type$ value");
+            }
+
+            {
+                hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+                $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_ADD_RELEASE).invokeExact(array, i, $value2$);
+                assertEquals(o, $value1$, "getAndAddRelease $type$");
+                $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+                assertEquals(x, ($type$)($value1$ + $value2$), "getAndAddRelease $type$ value");
             }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // get and bitwise or
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOr $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOr $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_ACQUIRE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_OR_RELEASE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseOrRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ | $value2$), "getAndBitwiseOrRelease $type$ value");
+        }
+
+        // get and bitwise and
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAnd $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAnd $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_ACQUIRE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_AND_RELEASE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseAndRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ & $value2$), "getAndBitwiseAndRelease $type$ value");
+        }
+
+        // get and bitwise xor
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXor $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXor $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_ACQUIRE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorAcquire $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorAcquire $type$ value");
+        }
+
+        {
+            hs.get(TestAccessMode.SET).invokeExact(array, i, $value1$);
+
+            $type$ o = ($type$) hs.get(TestAccessMode.GET_AND_BITWISE_XOR_RELEASE).invokeExact(array, i, $value2$);
+            assertEquals(o, $value1$, "getAndBitwiseXorRelease $type$");
+            $type$ x = ($type$) hs.get(TestAccessMode.GET).invokeExact(array, i);
+            assertEquals(x, ($type$)($value1$ ^ $value2$), "getAndBitwiseXorRelease $type$ value");
+        }
+#end[Bitwise]
         }
     }
 
@@ -671,6 +1041,14 @@
             });
         }
 #end[AtomicAdd]
+
+#if[!Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkUOE(am, () -> {
+                $type$ o = ($type$) hs.get(am).invokeExact(array, i, $value1$);
+            });
+        }
+#end[Bitwise]
     }
 
     static void testArrayIndexOutOfBounds(Handles hs) throws Throwable {
@@ -718,6 +1096,14 @@
                 });
             }
 #end[AtomicAdd]
+
+#if[Bitwise]
+            for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+                checkIOOBE(am, () -> {
+                    $type$ o = ($type$) hs.get(am).invokeExact(array, ci, $value3$);
+                });
+            }
+#end[Bitwise]
         }
     }
 }
diff --git a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template
index 15c4610..0116e5d 100644
--- a/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template
+++ b/jdk/test/java/lang/invoke/VarHandles/X-VarHandleTestMethodType.java.template
@@ -354,6 +354,32 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, $value1$, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, $value1$, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(recv, $value1$, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, $value1$, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(recv, $value1$, $value1$, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, $value1$, $value1$);
         });
         checkCCE(() -> { // receiver reference class
@@ -377,32 +403,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, $value1$, $value1$);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, $value1$, $value1$);
-        });
-        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, Void.class, $value1$);
-        });
-        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, $value1$, $value1$);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(recv, $value1$, $value1$, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -582,6 +582,64 @@
         checkWMTE(() -> { // >
             $type$ x = ($type$) vh.getAndSet(recv, $value1$, Void.class);
         });
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndSetAcquire(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndSetAcquire(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetAcquire(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetAcquire(recv, $value1$, Void.class);
+        });
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndSetRelease(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndSetRelease(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndSetRelease(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetRelease(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetRelease(recv, $value1$, Void.class);
+        });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -614,36 +672,335 @@
             $type$ x = ($type$) vh.getAndAdd(recv, $value1$, Void.class);
         });
 
-
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
-            $type$ x = ($type$) vh.addAndGet(null, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(null, $value1$);
         });
         checkCCE(() -> { // receiver reference class
-            $type$ x = ($type$) vh.addAndGet(Void.class, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(Void.class, $value1$);
         });
         check{#if[String]?CCE:WMTE}(() -> { // value reference class
-            $type$ x = ($type$) vh.addAndGet(recv, Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire(recv, Void.class);
         });
         checkWMTE(() -> { // reciever primitive class
-            $type$ x = ($type$) vh.addAndGet(0, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(0, $value1$);
         });
         // Incorrect return type
         check{#if[String]?CCE:WMTE}(() -> { // reference class
-            Void r = (Void) vh.addAndGet(recv, $value1$);
+            Void r = (Void) vh.getAndAddAcquire(recv, $value1$);
         });
         checkWMTE(() -> { // primitive class
-            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.addAndGet(recv, $value1$);
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddAcquire(recv, $value1$);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            $type$ x = ($type$) vh.addAndGet();
+            $type$ x = ($type$) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            $type$ x = ($type$) vh.addAndGet(recv, $value1$, Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire(recv, $value1$, Void.class);
+        });
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndAddRelease(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndAddRelease(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndAddRelease(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndAddRelease(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddRelease(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndAddRelease(recv, $value1$, Void.class);
         });
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseOr(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOr(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOr(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOr(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOrAcquire(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOr(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOr(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOr(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseAnd(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAnd(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAndAcquire(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAnd(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAnd(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseXor(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXor(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXor(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXor(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXorAcquire(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(recv, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(null, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(recv, Void.class);
+        });
+        checkWMTE(() -> { // reciever primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXor(0, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(recv, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXor(recv, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXor(recv, $value1$, Void.class);
+        });
+#end[Bitwise]
     }
 
     static void testInstanceFieldWrongMethodType(VarHandleTestMethodType$Type$ recv, Handles hs) throws Throwable {
@@ -861,6 +1218,45 @@
             });
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            checkNPE(() -> { // null receiver
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, VarHandleTestMethodType$Type$.class, $type$.class)).
+                    invokeExact((VarHandleTestMethodType$Type$) null, $value1$);
+            });
+            hs.checkWMTEOrCCE(() -> { // receiver reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, Class.class, $type$.class)).
+                    invokeExact(Void.class, $value1$);
+            });
+            {#if[String]?hs.checkWMTEOrCCE:checkWMTE}(() -> { // value reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, VarHandleTestMethodType$Type$.class, Class.class)).
+                    invokeExact(recv, Void.class);
+            });
+            checkWMTE(() -> { // reciever primitive class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, int.class, $type$.class)).
+                    invokeExact(0, $value1$);
+            });
+            // Incorrect return type
+            {#if[String]?hs.checkWMTEOrCCE:checkWMTE}(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, VarHandleTestMethodType$Type$.class, $type$.class)).
+                    invokeExact(recv, $value1$);
+            });
+            checkWMTE(() -> { // primitive class
+                $wrong_primitive_type$ x = ($wrong_primitive_type$) hs.get(am, methodType($wrong_primitive_type$.class, VarHandleTestMethodType$Type$.class, $type$.class)).
+                    invokeExact(recv, $value1$);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                $type$ x = ($type$) hs.get(am, methodType($type$.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, VarHandleTestMethodType$Type$.class, $type$.class)).
+                    invokeExact(recv, $value1$, Void.class);
+            });
+        }
+#end[Bitwise]
     }
 
 
@@ -995,6 +1391,23 @@
         // WeakCompareAndSet
         // Incorrect argument types
         check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain($value1$, Void.class);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain($value1$, $value1$, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
             boolean r = vh.weakCompareAndSet(Void.class, $value1$);
         });
         check{#if[String]?CCE:WMTE}(() -> { // actual reference class
@@ -1009,23 +1422,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, $value1$);
-        });
-        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile($value1$, Void.class);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile($value1$, $value1$, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         check{#if[String]?CCE:WMTE}(() -> { // expected reference class
@@ -1151,6 +1547,48 @@
         checkWMTE(() -> { // >
             $type$ x = ($type$) vh.getAndSet($value1$, Void.class);
         });
+
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetAcquire($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetAcquire($value1$, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetRelease(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetRelease($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetRelease($value1$, Void.class);
+        });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -1175,26 +1613,237 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         check{#if[String]?CCE:WMTE}(() -> { // value reference class
-            $type$ x = ($type$) vh.addAndGet(Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire(Void.class);
         });
         // Incorrect return type
         check{#if[String]?CCE:WMTE}(() -> { // reference class
-            Void r = (Void) vh.addAndGet($value1$);
+            Void r = (Void) vh.getAndAddAcquire($value1$);
         });
         checkWMTE(() -> { // primitive class
-            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.addAndGet($value1$);
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddAcquire($value1$);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            $type$ x = ($type$) vh.addAndGet();
+            $type$ x = ($type$) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            $type$ x = ($type$) vh.addAndGet($value1$, Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire($value1$, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndAddRelease(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddRelease($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndAddRelease($value1$, Void.class);
         });
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOr($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOr($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOrAcquire($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrReleaseRelease
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOrRelease($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAnd($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAnd($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAndAcquire($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndReleaseRelease
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAndRelease($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXor($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXor($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXorAcquire($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire($value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorReleaseRelease
+        // Incorrect argument types
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(Void.class);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease($value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXorRelease($value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease($value1$, Void.class);
+        });
+#end[Bitwise]
     }
 
     static void testStaticFieldWrongMethodType(Handles hs) throws Throwable {
@@ -1338,6 +1987,34 @@
             });
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            check{#if[String]?CCE:WMTE}(() -> { // value reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, Class.class)).
+                    invokeExact(Void.class);
+            });
+            // Incorrect return type
+            check{#if[String]?CCE:WMTE}(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, $type$.class)).
+                    invokeExact($value1$);
+            });
+            checkWMTE(() -> { // primitive class
+                $wrong_primitive_type$ x = ($wrong_primitive_type$) hs.get(am, methodType($wrong_primitive_type$.class, $type$.class)).
+                    invokeExact($value1$);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                $type$ x = ($type$) hs.get(am, methodType($type$.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, $type$.class, Class.class)).
+                    invokeExact($value1$, Void.class);
+            });
+        }
+#end[Bitwise]
     }
 
 
@@ -1602,6 +2279,35 @@
         // WeakCompareAndSet
         // Incorrect argument types
         checkNPE(() -> { // null receiver
+            boolean r = vh.weakCompareAndSetPlain(null, 0, $value1$, $value1$);
+        });
+        checkCCE(() -> { // receiver reference class
+            boolean r = vh.weakCompareAndSetPlain(Void.class, 0, $value1$, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, Void.class, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
+            boolean r = vh.weakCompareAndSetPlain(array, 0, $value1$, Void.class);
+        });
+        checkWMTE(() -> { // receiver primitive class
+            boolean r = vh.weakCompareAndSetPlain(0, 0, $value1$, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            boolean r = vh.weakCompareAndSetPlain(array, Void.class, $value1$, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            boolean r = vh.weakCompareAndSetPlain();
+        });
+        checkWMTE(() -> { // >
+            boolean r = vh.weakCompareAndSetPlain(array, 0, $value1$, $value1$, Void.class);
+        });
+
+
+        // WeakCompareAndSetVolatile
+        // Incorrect argument types
+        checkNPE(() -> { // null receiver
             boolean r = vh.weakCompareAndSet(null, 0, $value1$, $value1$);
         });
         checkCCE(() -> { // receiver reference class
@@ -1628,35 +2334,6 @@
         });
 
 
-        // WeakCompareAndSetVolatile
-        // Incorrect argument types
-        checkNPE(() -> { // null receiver
-            boolean r = vh.weakCompareAndSetVolatile(null, 0, $value1$, $value1$);
-        });
-        checkCCE(() -> { // receiver reference class
-            boolean r = vh.weakCompareAndSetVolatile(Void.class, 0, $value1$, $value1$);
-        });
-        check{#if[String]?CCE:WMTE}(() -> { // expected reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, Void.class, $value1$);
-        });
-        check{#if[String]?CCE:WMTE}(() -> { // actual reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, $value1$, Void.class);
-        });
-        checkWMTE(() -> { // receiver primitive class
-            boolean r = vh.weakCompareAndSetVolatile(0, 0, $value1$, $value1$);
-        });
-        checkWMTE(() -> { // index reference class
-            boolean r = vh.weakCompareAndSetVolatile(array, Void.class, $value1$, $value1$);
-        });
-        // Incorrect arity
-        checkWMTE(() -> { // 0
-            boolean r = vh.weakCompareAndSetVolatile();
-        });
-        checkWMTE(() -> { // >
-            boolean r = vh.weakCompareAndSetVolatile(array, 0, $value1$, $value1$, Void.class);
-        });
-
-
         // WeakCompareAndSetAcquire
         // Incorrect argument types
         checkNPE(() -> { // null receiver
@@ -1854,6 +2531,72 @@
         checkWMTE(() -> { // >
             $type$ x = ($type$) vh.getAndSet(array, 0, $value1$, Void.class);
         });
+
+
+        // GetAndSetAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndSetAcquire(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            $type$ x = ($type$) vh.getAndSetAcquire(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndSetAcquire(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetAcquire(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetAcquire(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetAcquire(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndSetRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndSetRelease(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndSetRelease(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndSetRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // reciarrayever primitive class
+            $type$ x = ($type$) vh.getAndSetRelease(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndSetRelease(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndSetRelease(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndSetRelease(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndSetRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndSetRelease(array, 0, $value1$, Void.class);
+        });
 #end[CAS]
 
 #if[AtomicAdd]
@@ -1890,38 +2633,369 @@
         });
 
 
-        // AddAndGet
+        // GetAndAddAcquire
         // Incorrect argument types
         checkNPE(() -> { // null array
-            $type$ x = ($type$) vh.addAndGet(null, 0, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(null, 0, $value1$);
         });
         checkCCE(() -> { // array reference class
-            $type$ x = ($type$) vh.addAndGet(Void.class, 0, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(Void.class, 0, $value1$);
         });
         check{#if[String]?CCE:WMTE}(() -> { // value reference class
-            $type$ x = ($type$) vh.addAndGet(array, 0, Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire(array, 0, Void.class);
         });
         checkWMTE(() -> { // array primitive class
-            $type$ x = ($type$) vh.addAndGet(0, 0, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(0, 0, $value1$);
         });
         checkWMTE(() -> { // index reference class
-            $type$ x = ($type$) vh.addAndGet(array, Void.class, $value1$);
+            $type$ x = ($type$) vh.getAndAddAcquire(array, Void.class, $value1$);
         });
         // Incorrect return type
         check{#if[String]?CCE:WMTE}(() -> { // reference class
-            Void r = (Void) vh.addAndGet(array, 0, $value1$);
+            Void r = (Void) vh.getAndAddAcquire(array, 0, $value1$);
         });
         checkWMTE(() -> { // primitive class
-            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.addAndGet(array, 0, $value1$);
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddAcquire(array, 0, $value1$);
         });
         // Incorrect arity
         checkWMTE(() -> { // 0
-            $type$ x = ($type$) vh.addAndGet();
+            $type$ x = ($type$) vh.getAndAddAcquire();
         });
         checkWMTE(() -> { // >
-            $type$ x = ($type$) vh.addAndGet(array, 0, $value1$, Void.class);
+            $type$ x = ($type$) vh.getAndAddAcquire(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndAddRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndAddRelease(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndAddRelease(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndAddRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndAddRelease(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndAddRelease(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndAddRelease(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndAddRelease(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndAddRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndAddRelease(array, 0, $value1$, Void.class);
         });
 #end[AtomicAdd]
+
+#if[Bitwise]
+        // GetAndBitwiseOr
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseOr(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOr(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseOr(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOr(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOr(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOr();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOr(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrAcquire(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOrAcquire(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOrAcquire(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseOrRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseOrRelease(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseOrRelease(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseOrRelease(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAnd
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseAnd(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseAnd(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAnd(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAnd(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAnd();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAnd(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndAcquire(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAndAcquire(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAndAcquire(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseAndRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseAndRelease(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseAndRelease(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseAndRelease(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXor
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseXor(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXor(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseXor(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXor(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXor(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXor();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXor(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorAcquire
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorAcquire(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXorAcquire(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXorAcquire(array, 0, $value1$, Void.class);
+        });
+
+
+        // GetAndBitwiseXorRelease
+        // Incorrect argument types
+        checkNPE(() -> { // null array
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(null, 0, $value1$);
+        });
+        checkCCE(() -> { // array reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(Void.class, 0, $value1$);
+        });
+        check{#if[String]?CCE:WMTE}(() -> { // value reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(array, 0, Void.class);
+        });
+        checkWMTE(() -> { // array primitive class
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(0, 0, $value1$);
+        });
+        checkWMTE(() -> { // index reference class
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(array, Void.class, $value1$);
+        });
+        // Incorrect return type
+        check{#if[String]?CCE:WMTE}(() -> { // reference class
+            Void r = (Void) vh.getAndBitwiseXorRelease(array, 0, $value1$);
+        });
+        checkWMTE(() -> { // primitive class
+            $wrong_primitive_type$ x = ($wrong_primitive_type$) vh.getAndBitwiseXorRelease(array, 0, $value1$);
+        });
+        // Incorrect arity
+        checkWMTE(() -> { // 0
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease();
+        });
+        checkWMTE(() -> { // >
+            $type$ x = ($type$) vh.getAndBitwiseXorRelease(array, 0, $value1$, Void.class);
+        });
+#end[Bitwise]
     }
 
     static void testArrayWrongMethodType(Handles hs) throws Throwable {
@@ -2168,6 +3242,50 @@
             });
         }
 #end[AtomicAdd]
+
+#if[Bitwise]
+        for (TestAccessMode am : testAccessModesOfType(TestAccessType.GET_AND_BITWISE)) {
+            // Incorrect argument types
+            checkNPE(() -> { // null array
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, $type$[].class, int.class, $type$.class)).
+                    invokeExact(($type$[]) null, 0, $value1$);
+            });
+            hs.checkWMTEOrCCE(() -> { // array reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, Class.class, int.class, $type$.class)).
+                    invokeExact(Void.class, 0, $value1$);
+            });
+            {#if[String]?hs.checkWMTEOrCCE:checkWMTE}(() -> { // value reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, $type$[].class, int.class, Class.class)).
+                    invokeExact(array, 0, Void.class);
+            });
+            checkWMTE(() -> { // array primitive class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, int.class, int.class, $type$.class)).
+                    invokeExact(0, 0, $value1$);
+            });
+            checkWMTE(() -> { // index reference class
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, $type$[].class, Class.class, $type$.class)).
+                    invokeExact(array, Void.class, $value1$);
+            });
+            // Incorrect return type
+            {#if[String]?hs.checkWMTEOrCCE:checkWMTE}(() -> { // reference class
+                Void r = (Void) hs.get(am, methodType(Void.class, $type$[].class, int.class, $type$.class)).
+                    invokeExact(array, 0, $value1$);
+            });
+            checkWMTE(() -> { // primitive class
+                $wrong_primitive_type$ x = ($wrong_primitive_type$) hs.get(am, methodType($wrong_primitive_type$.class, $type$[].class, int.class, $type$.class)).
+                    invokeExact(array, 0, $value1$);
+            });
+            // Incorrect arity
+            checkWMTE(() -> { // 0
+                $type$ x = ($type$) hs.get(am, methodType($type$.class)).
+                    invokeExact();
+            });
+            checkWMTE(() -> { // >
+                $type$ x = ($type$) hs.get(am, methodType($type$.class, $type$[].class, int.class, $type$.class, Class.class)).
+                    invokeExact(array, 0, $value1$, Void.class);
+            });
+        }
+#end[Bitwise]
     }
 }
 
diff --git a/jdk/test/java/lang/invoke/VarHandles/generate-vh-tests.sh b/jdk/test/java/lang/invoke/VarHandles/generate-vh-tests.sh
index 02ae5ae..2641f8d 100644
--- a/jdk/test/java/lang/invoke/VarHandles/generate-vh-tests.sh
+++ b/jdk/test/java/lang/invoke/VarHandles/generate-vh-tests.sh
@@ -22,6 +22,12 @@
       ;;
   esac
 
+  case $type in
+    boolean|byte|short|char|int|long)
+      args="$args -KBitwise"
+      ;;
+  esac
+
   wrong_primitive_type=boolean
 
   case $type in
@@ -109,6 +115,12 @@
       ;;
   esac
 
+  case $type in
+    int|long)
+      args="$args -KBitwise"
+      ;;
+  esac
+
   # The value of `value3` is chosen such that when added to `value1` or `value2`
   # it will result in carrying of bits over to the next byte, thereby detecting
   # possible errors in endianness conversion e.g. if say for atomic addition the
diff --git a/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java b/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java
index 190761d..a129ea2 100644
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/BogoLoader.java
@@ -19,7 +19,6 @@
  * 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.BufferedInputStream;
diff --git a/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java b/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java
index d14e7ef..fae5e46 100644
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/MethodInvoker.java
@@ -19,7 +19,6 @@
  * 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 anotherpkg.MethodSupplierOuter;
diff --git a/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java b/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java
index b83496f..96b3fb6 100644
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/Test.java
@@ -19,7 +19,6 @@
  * 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.
- *
  */
 
 /**
diff --git a/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java b/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java
index 314f8ea..cd40ed2 100644
--- a/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java
+++ b/jdk/test/java/lang/invoke/accessProtectedSuper/anotherpkg/MethodSupplierOuter.java
@@ -19,7 +19,6 @@
  * 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 anotherpkg;
diff --git a/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java b/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java
index a8bb8ba..13ae1e0 100644
--- a/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java
+++ b/jdk/test/java/lang/management/GarbageCollectorMXBean/GcInfoCompositeType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/lang/ref/CleanerTest.java b/jdk/test/java/lang/ref/CleanerTest.java
index 25c50dc..c677866 100644
--- a/jdk/test/java/lang/ref/CleanerTest.java
+++ b/jdk/test/java/lang/ref/CleanerTest.java
@@ -49,7 +49,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes /lib/testlibrary /test/lib
+ * @library /lib/testlibrary /test/lib
  * @build sun.hotspot.WhiteBox
  * @build jdk.test.lib.Utils
  * @modules java.base/jdk.internal
diff --git a/jdk/test/java/net/HttpURLConnection/HttpURLConWithProxy.java b/jdk/test/java/net/HttpURLConnection/HttpURLConWithProxy.java
new file mode 100644
index 0000000..3c2ec89
--- /dev/null
+++ b/jdk/test/java/net/HttpURLConnection/HttpURLConWithProxy.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+ /*
+ * @test
+ * @bug 8161016
+ * @summary When proxy is set HttpURLConnection should not use DIRECT connection.
+ * @run main/othervm HttpURLConWithProxy
+ */
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+import java.net.ProxySelector;
+import java.net.ServerSocket;
+import java.net.SocketAddress;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.List;
+
+public class HttpURLConWithProxy {
+
+    public static void main(String... arg) {
+        // Remove the default nonProxyHosts to use localhost for testing
+        System.setProperty("http.nonProxyHosts", "");
+
+        System.setProperty("http.proxyHost", "1.1.1.1");
+        System.setProperty("http.proxyPort", "1111");
+
+        ServerSocket ss;
+        URL url;
+        URLConnection con;
+
+        // Test1: using Proxy set by System Property:
+        try {
+            ss = new ServerSocket(0);
+            url = new URL("http://localhost:" + ss.getLocalPort());
+            con = url.openConnection();
+            con.setConnectTimeout(10 * 1000);
+            con.connect();
+            throw new RuntimeException("Shouldn't use DIRECT connection "
+                    + "when proxy is invalid/down");
+        } catch (IOException ie) {
+            System.out.println("Test1 Passed with: " + ie.getMessage());
+        }
+
+        // Test2: using custom ProxySelector implementation
+        MyProxySelector myProxySel = new MyProxySelector();
+        ProxySelector.setDefault(myProxySel);
+        try {
+            ss = new ServerSocket(0);
+            url = new URL("http://localhost:" + ss.getLocalPort());
+            con = url.openConnection();
+            con.setConnectTimeout(10 * 1000);
+            con.connect();
+            throw new RuntimeException("Shouldn't use DIRECT connection "
+                    + "when proxy is invalid/down");
+        } catch (IOException ie) {
+            System.out.println("Test2 Passed with: " + ie.getMessage());
+        }
+    }
+}
+
+
+class MyProxySelector extends ProxySelector {
+
+    List<Proxy> proxies = new ArrayList<>();
+
+    MyProxySelector() {
+        Proxy p1 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("2.2.2.2", 2222));
+        Proxy p2 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("3.3.3.3", 3333));
+        proxies.add(p1);
+        proxies.add(p2);
+    }
+
+    @Override
+    public List<Proxy> select(URI uri) {
+        return proxies;
+    }
+
+    @Override
+    public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
+        // System.out.println("MyProxySelector.connectFailed(): "+sa);
+    }
+}
diff --git a/jdk/test/java/net/Inet4Address/textToNumericFormat.java b/jdk/test/java/net/Inet4Address/textToNumericFormat.java
index 1d010d0..7d75bc9 100644
--- a/jdk/test/java/net/Inet4Address/textToNumericFormat.java
+++ b/jdk/test/java/net/Inet4Address/textToNumericFormat.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/net/ProxySelector/B8035158.java b/jdk/test/java/net/ProxySelector/B8035158.java
index 21b1e99..432e457 100644
--- a/jdk/test/java/net/ProxySelector/B8035158.java
+++ b/jdk/test/java/net/ProxySelector/B8035158.java
@@ -20,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 /*
  * @test
  * @bug 8035158 8145732
diff --git a/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java b/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java
index 0b00960..c31441d 100644
--- a/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java
+++ b/jdk/test/java/net/URLClassLoader/definePackage/SplitPackage.java
@@ -1,4 +1,4 @@
-/**
+/*
  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/jdk/test/java/net/URLPermission/nstest/LookupTest.java b/jdk/test/java/net/URLPermission/nstest/LookupTest.java
index f69522d..d5b9141 100644
--- a/jdk/test/java/net/URLPermission/nstest/LookupTest.java
+++ b/jdk/test/java/net/URLPermission/nstest/LookupTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/net/URLPermission/nstest/lookup.sh b/jdk/test/java/net/URLPermission/nstest/lookup.sh
index 8979866..798e1c1 100644
--- a/jdk/test/java/net/URLPermission/nstest/lookup.sh
+++ b/jdk/test/java/net/URLPermission/nstest/lookup.sh
@@ -27,6 +27,7 @@
 # @build jdk.testlibrary.*
 # @compile -XDignore.symbol.file=true LookupTest.java
 # @run shell/timeout=50 lookup.sh
+# @key intermittent
 #
 
 OS=`uname -s`
diff --git a/jdk/test/java/net/httpclient/BasicAuthTest.java b/jdk/test/java/net/httpclient/BasicAuthTest.java
index fb227e3..b78739e 100644
--- a/jdk/test/java/net/httpclient/BasicAuthTest.java
+++ b/jdk/test/java/net/httpclient/BasicAuthTest.java
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
diff --git a/jdk/test/java/net/httpclient/HeadersTest1.java b/jdk/test/java/net/httpclient/HeadersTest1.java
index 79f6200..e3c892e 100644
--- a/jdk/test/java/net/httpclient/HeadersTest1.java
+++ b/jdk/test/java/net/httpclient/HeadersTest1.java
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
diff --git a/jdk/test/java/net/httpclient/ImmutableHeaders.java b/jdk/test/java/net/httpclient/ImmutableHeaders.java
index 7286c2e..7773061 100644
--- a/jdk/test/java/net/httpclient/ImmutableHeaders.java
+++ b/jdk/test/java/net/httpclient/ImmutableHeaders.java
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
diff --git a/jdk/test/java/net/httpclient/security/Driver.java b/jdk/test/java/net/httpclient/security/Driver.java
index 078be5f..3253fe2 100644
--- a/jdk/test/java/net/httpclient/security/Driver.java
+++ b/jdk/test/java/net/httpclient/security/Driver.java
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
diff --git a/jdk/test/java/net/httpclient/security/Security.java b/jdk/test/java/net/httpclient/security/Security.java
index 2108c9f..5c282be 100644
--- a/jdk/test/java/net/httpclient/security/Security.java
+++ b/jdk/test/java/net/httpclient/security/Security.java
@@ -20,6 +20,7 @@
  *
  * 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.
  */
 
 /**
diff --git a/jdk/test/java/nio/channels/Selector/SelectTimeout.java b/jdk/test/java/nio/channels/Selector/SelectTimeout.java
new file mode 100644
index 0000000..aaeff36
--- /dev/null
+++ b/jdk/test/java/nio/channels/Selector/SelectTimeout.java
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* This code is free software; you can redistribute it and/or modify it
+* under the terms of the GNU General Public License version 2 only, as
+* published by the Free Software Foundation.
+*
+* This code is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+* version 2 for more details (a copy is included in the LICENSE file that
+* accompanied this code).
+*
+* You should have received a copy of the GNU General Public License version
+* 2 along with this work; if not, write to the Free Software Foundation,
+* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+* or visit www.oracle.com if you need additional information or have any
+* questions.
+*/
+
+/*
+ * @test
+ * @bug 8165000
+ * @summary Verify no IOException on OS X for large timeout value in select().
+ * @requires (os.family == "mac")
+ */
+import java.io.IOException;
+import java.nio.channels.Selector;
+
+public class SelectTimeout {
+    private static final long HUGE_TIMEOUT = 100000001000L;
+    private static final long SLEEP_MILLIS = 10000;
+
+    private static Exception theException;
+
+    public static void main(String[] args)
+        throws IOException, InterruptedException {
+        int failures = 0;
+        long[] timeouts =
+            new long[] {0, HUGE_TIMEOUT/2, HUGE_TIMEOUT - 1, HUGE_TIMEOUT};
+        for (long t : timeouts) {
+            if (!test(t)) {
+                failures++;
+            }
+        }
+        if (failures > 0) {
+            throw new RuntimeException("Test failed!");
+        } else {
+            System.out.println("Test succeeded");
+        }
+    }
+
+    private static boolean test(final long timeout)
+        throws InterruptedException, IOException {
+        theException = null;
+
+        Selector selector = Selector.open();
+
+        Thread t = new Thread(() -> {
+            try {
+                selector.select(timeout);
+            } catch (IOException ioe) {
+                theException = ioe;
+            }
+        });
+        t.start();
+
+        Thread.currentThread().sleep(SLEEP_MILLIS);
+        t.interrupt();
+
+        if (theException == null) {
+            System.out.printf("Test succeeded with timeout %d%n", timeout);
+            return true;
+        } else {
+            System.err.printf("Test failed with timeout %d%n", timeout);
+            theException.printStackTrace();
+            return false;
+        }
+    }
+}
diff --git a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
index 07ada99..f633576 100644
--- a/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
+++ b/jdk/test/java/security/SecureRandom/DrbgParametersSpec.java
@@ -24,7 +24,7 @@
 /* @test
  * @bug 8051408 8158534
  * @summary Make sure DrbgParameters coded as specified
- * @library /test/lib/share/classes
+ * @library /test/lib
  */
 
 import jdk.test.lib.Asserts;
diff --git a/jdk/test/java/text/Bidi/BidiConformance.java b/jdk/test/java/text/Bidi/BidiConformance.java
index 7368965..45e49cb 100644
--- a/jdk/test/java/text/Bidi/BidiConformance.java
+++ b/jdk/test/java/text/Bidi/BidiConformance.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 6850113 8032446
  * @summary confirm the behavior of new Bidi implementation. (Backward compatibility)
+ * @modules java.desktop
  */
 
 import java.awt.font.NumericShaper;
diff --git a/jdk/test/java/text/Bidi/BidiEmbeddingTest.java b/jdk/test/java/text/Bidi/BidiEmbeddingTest.java
index 86578f4..fb4d5f7 100644
--- a/jdk/test/java/text/Bidi/BidiEmbeddingTest.java
+++ b/jdk/test/java/text/Bidi/BidiEmbeddingTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
  * indicate overrides, rather than using bit 7.  Also tests Bidi without loading awt classes to
  * confirm that Bidi can be used without awt. Verify that embedding level 0 is properly mapped
  * to the base embedding level.
+ * @modules java.desktop
  */
 
 import java.awt.Color;
diff --git a/jdk/test/java/text/Bidi/Bug7042148.java b/jdk/test/java/text/Bidi/Bug7042148.java
index 92c3001..d905a49 100644
--- a/jdk/test/java/text/Bidi/Bug7042148.java
+++ b/jdk/test/java/text/Bidi/Bug7042148.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 7042148
  * @summary verify that Bidi.baseIsLeftToRight() returns the correct value even if an incorrect position is set in the given AttributedCharacterIterator.
+ * @modules java.desktop
  */
 import java.awt.font.*;
 import java.text.*;
diff --git a/jdk/test/java/text/Bidi/Bug7051769.java b/jdk/test/java/text/Bidi/Bug7051769.java
index 9b13260..a0737ec 100644
--- a/jdk/test/java/text/Bidi/Bug7051769.java
+++ b/jdk/test/java/text/Bidi/Bug7051769.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 7051769 8038092
  * @summary verify that Bidi.toString() returns the corect result.
  *     The second run is intended to test lazy SharedSectets init for 8038092
+ * @modules java.desktop
  * @run main Bug7051769
  * @run main/othervm -DpreloadBidi=true Bug7051769
  */
diff --git a/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java b/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java
index 467cbc5..4e114d7 100644
--- a/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java
+++ b/jdk/test/java/text/BreakIterator/NewVSOld_th_TH.java
@@ -22,9 +22,10 @@
  */
 
 /*
-    @test
-    @summary test Comparison of New Collators against Old Collators in the en_US locale
-*/
+ * @test
+ * @summary test Comparison of New Collators against Old Collators in the en_US locale
+ * @modules jdk.localedata
+ */
 
 import java.io.*;
 import java.util.Enumeration;
diff --git a/jdk/test/java/text/Collator/APITest.java b/jdk/test/java/text/Collator/APITest.java
index f2b0a01..43782c5 100644
--- a/jdk/test/java/text/Collator/APITest.java
+++ b/jdk/test/java/text/Collator/APITest.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Collation API
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/CollationKeyTest.java b/jdk/test/java/text/Collator/CollationKeyTest.java
index 9146bf9..901a634 100644
--- a/jdk/test/java/text/Collator/CollationKeyTest.java
+++ b/jdk/test/java/text/Collator/CollationKeyTest.java
@@ -29,6 +29,7 @@
  *          RuleBasedCollationKey. This test basically tests on the two features:
  *          1. Existing code using CollationKey works (backward compatiblility)
  *          2. CollationKey can be extended by its subclass.
+ * @modules jdk.localedata
  */
 
 
diff --git a/jdk/test/java/text/Collator/DanishTest.java b/jdk/test/java/text/Collator/DanishTest.java
index b5194a8..0c35d22 100644
--- a/jdk/test/java/text/Collator/DanishTest.java
+++ b/jdk/test/java/text/Collator/DanishTest.java
@@ -26,6 +26,7 @@
  * @bug 4930708 4174436 5008498
  * @library /java/text/testlib
  * @summary test Danish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/FinnishTest.java b/jdk/test/java/text/Collator/FinnishTest.java
index 6df18ef..9efc3cd 100644
--- a/jdk/test/java/text/Collator/FinnishTest.java
+++ b/jdk/test/java/text/Collator/FinnishTest.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Finnish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/FrenchTest.java b/jdk/test/java/text/Collator/FrenchTest.java
index 939ef32..38492db 100644
--- a/jdk/test/java/text/Collator/FrenchTest.java
+++ b/jdk/test/java/text/Collator/FrenchTest.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test French Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/G7Test.java b/jdk/test/java/text/Collator/G7Test.java
index 0b41566..f7bdfa4 100644
--- a/jdk/test/java/text/Collator/G7Test.java
+++ b/jdk/test/java/text/Collator/G7Test.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test G7 Collation
+ * @modules jdk.localedata
  */
 /*
  *
diff --git a/jdk/test/java/text/Collator/JapaneseTest.java b/jdk/test/java/text/Collator/JapaneseTest.java
index 2bd5f6d..7333da34 100644
--- a/jdk/test/java/text/Collator/JapaneseTest.java
+++ b/jdk/test/java/text/Collator/JapaneseTest.java
@@ -25,6 +25,7 @@
  * @test 1.1 02/09/11
  * @bug 4176141 4655819
  * @summary Regression tests for Japanese Collation
+ * @modules jdk.localedata
  */
 
 import java.text.*;
diff --git a/jdk/test/java/text/Collator/KoreanTest.java b/jdk/test/java/text/Collator/KoreanTest.java
index fd314ee..fb3c5ea 100644
--- a/jdk/test/java/text/Collator/KoreanTest.java
+++ b/jdk/test/java/text/Collator/KoreanTest.java
@@ -25,6 +25,7 @@
  * @test 1.1 02/09/12
  * @bug 4176141 4655819
  * @summary Regression tests for Korean Collation
+ * @modules jdk.localedata
  */
 
 import java.text.*;
diff --git a/jdk/test/java/text/Collator/Regression.java b/jdk/test/java/text/Collator/Regression.java
index 958ce29..212ab39 100644
--- a/jdk/test/java/text/Collator/Regression.java
+++ b/jdk/test/java/text/Collator/Regression.java
@@ -29,6 +29,7 @@
  *      4133509 4139572 4141640 4179126 4179686 4244884 4663220
  * @library /java/text/testlib
  * @summary Regression tests for Collation and associated classes
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/ThaiTest.java b/jdk/test/java/text/Collator/ThaiTest.java
index 7d64344..7a961ed 100644
--- a/jdk/test/java/text/Collator/ThaiTest.java
+++ b/jdk/test/java/text/Collator/ThaiTest.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Thai Collation
+ * @modules jdk.localedata
  */
 /*
  * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
diff --git a/jdk/test/java/text/Collator/TurkishTest.java b/jdk/test/java/text/Collator/TurkishTest.java
index f83ef22..d8c078a 100644
--- a/jdk/test/java/text/Collator/TurkishTest.java
+++ b/jdk/test/java/text/Collator/TurkishTest.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test Turkish Collation
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
diff --git a/jdk/test/java/text/Collator/VietnameseTest.java b/jdk/test/java/text/Collator/VietnameseTest.java
index faa4921..6708622 100644
--- a/jdk/test/java/text/Collator/VietnameseTest.java
+++ b/jdk/test/java/text/Collator/VietnameseTest.java
@@ -26,6 +26,7 @@
  * @bug 4932968 5015215
  * @library /java/text/testlib
  * @summary test Vietnamese Collation
+ * @modules jdk.localedata
  */
 
 /*
diff --git a/jdk/test/java/text/Format/DateFormat/Bug4823811.java b/jdk/test/java/text/Format/DateFormat/Bug4823811.java
index 524f790..c2d35e9 100644
--- a/jdk/test/java/text/Format/DateFormat/Bug4823811.java
+++ b/jdk/test/java/text/Format/DateFormat/Bug4823811.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 4823811 8008577
  * @summary Confirm that text which includes numbers with a trailing minus sign is parsed correctly.
+ * @modules jdk.localedata
  * @run main/othervm -Duser.timezone=GMT+09:00 -Djava.locale.providers=JRE,SPI Bug4823811
  */
 
diff --git a/jdk/test/java/text/Format/DateFormat/Bug6683975.java b/jdk/test/java/text/Format/DateFormat/Bug6683975.java
index e0c8cd7..1f40105 100644
--- a/jdk/test/java/text/Format/DateFormat/Bug6683975.java
+++ b/jdk/test/java/text/Format/DateFormat/Bug6683975.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 6683975 8008577
  * @summary Make sure that date is formatted correctlyin th locale.
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI Bug6683975
  */
 import java.text.*;
diff --git a/jdk/test/java/text/Format/DateFormat/Bug8139572.java b/jdk/test/java/text/Format/DateFormat/Bug8139572.java
index d55196b..13154c8 100644
--- a/jdk/test/java/text/Format/DateFormat/Bug8139572.java
+++ b/jdk/test/java/text/Format/DateFormat/Bug8139572.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
  * @bug 8139572
  * @summary SimpleDateFormat parse month stand-alone format bug
  * @compile -encoding utf-8 Bug8139572.java
+ * @modules jdk.localedata
  * @run main Bug8139572
  */
 import java.text.ParseException;
diff --git a/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java b/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java
index 6f38bfb..60632b0 100644
--- a/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java
+++ b/jdk/test/java/text/Format/DateFormat/ContextMonthNamesTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 7079560 8008577
  * @summary Unit test for context-sensitive month names
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI ContextMonthNamesTest
  */
 
diff --git a/jdk/test/java/text/Format/DateFormat/DateFormatTest.java b/jdk/test/java/text/Format/DateFormat/DateFormatTest.java
index c4f148f..7384a82 100644
--- a/jdk/test/java/text/Format/DateFormat/DateFormatTest.java
+++ b/jdk/test/java/text/Format/DateFormat/DateFormatTest.java
@@ -26,6 +26,7 @@
  * @bug 4052223 4089987 4469904 4326988 4486735 8008577 8045998 8140571
  * @summary test DateFormat and SimpleDateFormat.
  * @library /java/text/testlib
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI DateFormatTest
  */
 
diff --git a/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java b/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java
index bff177f..9241e59 100644
--- a/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java
+++ b/jdk/test/java/text/Format/DateFormat/LocaleDateFormats.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 8080774
+ * @modules jdk.localedata
  * @run testng/othervm -Djava.locale.providers=JRE,CLDR LocaleDateFormats
  * @summary This file contains tests for JRE locales date formats
  */
diff --git a/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java b/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java
index 69808d4..b811900 100644
--- a/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java
+++ b/jdk/test/java/text/Format/DateFormat/NonGregorianFormatTest.java
@@ -25,6 +25,7 @@
  * @test
  * @bug 4833268 6253991 8008577
  * @summary Test formatting and parsing with non-Gregorian calendars
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NonGregorianFormatTest
  */
 
diff --git a/jdk/test/java/text/Format/DateFormat/bug4117335.java b/jdk/test/java/text/Format/DateFormat/bug4117335.java
index 6c9af2a..d9b59ed 100644
--- a/jdk/test/java/text/Format/DateFormat/bug4117335.java
+++ b/jdk/test/java/text/Format/DateFormat/bug4117335.java
@@ -25,6 +25,7 @@
  * @test
  *
  * @bug 4117335 4432617
+ * @modules jdk.localedata
  */
 
 import java.text.DateFormatSymbols ;
diff --git a/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java b/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java
index 1a4ca1d..55c9869 100644
--- a/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java
+++ b/jdk/test/java/text/Format/MessageFormat/LargeMessageFormat.java
@@ -25,6 +25,7 @@
  * @test
  * @bug 4112090 8008577
  * @summary verify that MessageFormat can handle large numbers of arguments
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI LargeMessageFormat
  */
 
diff --git a/jdk/test/java/text/Format/NumberFormat/Bug8132125.java b/jdk/test/java/text/Format/NumberFormat/Bug8132125.java
index e19b2cd..9f71332 100644
--- a/jdk/test/java/text/Format/NumberFormat/Bug8132125.java
+++ b/jdk/test/java/text/Format/NumberFormat/Bug8132125.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
  * @test
  * @bug 8132125
  * @summary Checks Swiss' number elements
+ * @modules jdk.localedata
  */
 
 import java.text.*;
diff --git a/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java b/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java
index 96fa397..44b53d2 100644
--- a/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java
+++ b/jdk/test/java/text/Format/NumberFormat/CurrencyFormat.java
@@ -25,6 +25,7 @@
  * @test
  * @bug 4290801 4942982 5102005 8008577 8021121
  * @summary Basic tests for currency formatting.
+ * @modules jdk.localedata
  * @run main/othervm -Djava.locale.providers=JRE,SPI CurrencyFormat
  */
 
diff --git a/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java b/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java
index ab1069b..011db2b 100644
--- a/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java
+++ b/jdk/test/java/text/Format/NumberFormat/IntlTestNumberFormatAPI.java
@@ -25,6 +25,7 @@
  * @test
  * @library /java/text/testlib
  * @summary test International Number Format API
+ * @modules jdk.localedata
  */
 /*
 (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
diff --git a/jdk/test/java/text/Format/NumberFormat/NumberRegression.java b/jdk/test/java/text/Format/NumberFormat/NumberRegression.java
index 0edaa11..b194d27 100644
--- a/jdk/test/java/text/Format/NumberFormat/NumberRegression.java
+++ b/jdk/test/java/text/Format/NumberFormat/NumberRegression.java
@@ -34,6 +34,7 @@
  * @library /java/text/testlib
  * @build IntlTest HexDumpReader TestUtils
  * @modules java.base/sun.util.resources
+ *          jdk.localedata
  * @compile -XDignore.symbol.file NumberRegression.java
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NumberRegression
  */
diff --git a/jdk/test/java/text/Format/NumberFormat/NumberTest.java b/jdk/test/java/text/Format/NumberFormat/NumberTest.java
index ca519bb..cf64a43 100644
--- a/jdk/test/java/text/Format/NumberFormat/NumberTest.java
+++ b/jdk/test/java/text/Format/NumberFormat/NumberTest.java
@@ -27,6 +27,7 @@
  * @summary test NumberFormat
  * @library /java/text/testlib
  * @modules java.base/sun.util.resources
+ *          jdk.localedata
  * @compile -XDignore.symbol.file NumberTest.java
  * @run main/othervm -Djava.locale.providers=COMPAT,SPI NumberTest
  */
diff --git a/jdk/test/java/util/Arrays/Correct.java b/jdk/test/java/util/Arrays/Correct.java
index e9ddc7e..f69ea91 100644
--- a/jdk/test/java/util/Arrays/Correct.java
+++ b/jdk/test/java/util/Arrays/Correct.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/util/Base64/TestBase64.java b/jdk/test/java/util/Base64/TestBase64.java
index 0c5e27f..d28f0d0 100644
--- a/jdk/test/java/util/Base64/TestBase64.java
+++ b/jdk/test/java/util/Base64/TestBase64.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,8 +23,11 @@
 
 /**
  * @test 4235519 8004212 8005394 8007298 8006295 8006315 8006530 8007379 8008925
- *       8014217 8025003 8026330 8028397 8129544
+ *       8014217 8025003 8026330 8028397 8129544 8165243
  * @summary tests java.util.Base64
+ * @library /lib/testlibrary
+ * @build jdk.testlibrary.*
+ * @run main TestBase64
  * @key randomness
  */
 
@@ -35,11 +38,17 @@
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.Base64;
+import java.util.List;
 import java.util.Random;
 
+import jdk.testlibrary.RandomFactory;
+
 public class TestBase64 {
 
+    private static final Random rnd = RandomFactory.getRandom();
+
     public static void main(String args[]) throws Throwable {
         int numRuns  = 10;
         int numBytes = 200;
@@ -52,7 +61,6 @@
         test(Base64.getUrlEncoder(), Base64.getUrlDecoder(), numRuns, numBytes);
         test(Base64.getMimeEncoder(), Base64.getMimeDecoder(), numRuns, numBytes);
 
-        Random rnd = new java.util.Random();
         byte[] nl_1 = new byte[] {'\n'};
         byte[] nl_2 = new byte[] {'\n', '\r'};
         byte[] nl_3 = new byte[] {'\n', '\r', '\n'};
@@ -76,7 +84,7 @@
         testNull(Base64.getDecoder());
         testNull(Base64.getUrlDecoder());
         testNull(Base64.getMimeDecoder());
-        checkNull(new Runnable() { public void run() { Base64.getMimeEncoder(10, null); }});
+        checkNull(() -> Base64.getMimeEncoder(10, null));
 
         testIOE(Base64.getEncoder());
         testIOE(Base64.getUrlEncoder());
@@ -84,26 +92,23 @@
         testIOE(Base64.getMimeEncoder(10, new byte[]{'\n'}));
 
         byte[] src = new byte[1024];
-        new Random().nextBytes(src);
+        rnd.nextBytes(src);
         final byte[] decoded = Base64.getEncoder().encode(src);
         testIOE(Base64.getDecoder(), decoded);
         testIOE(Base64.getMimeDecoder(), decoded);
         testIOE(Base64.getUrlDecoder(), Base64.getUrlEncoder().encode(src));
 
         // illegal line separator
-        checkIAE(new Runnable() { public void run() { Base64.getMimeEncoder(10, new byte[]{'\r', 'N'}); }});
+        checkIAE(() -> Base64.getMimeEncoder(10, new byte[]{'\r', 'N'}));
 
         // malformed padding/ending
         testMalformedPadding();
 
         // illegal base64 character
         decoded[2] = (byte)0xe0;
-        checkIAE(new Runnable() {
-            public void run() { Base64.getDecoder().decode(decoded); }});
-        checkIAE(new Runnable() {
-            public void run() { Base64.getDecoder().decode(decoded, new byte[1024]); }});
-        checkIAE(new Runnable() { public void run() {
-            Base64.getDecoder().decode(ByteBuffer.wrap(decoded)); }});
+        checkIAE(() -> Base64.getDecoder().decode(decoded));
+        checkIAE(() -> Base64.getDecoder().decode(decoded, new byte[1024]));
+        checkIAE(() -> Base64.getDecoder().decode(ByteBuffer.wrap(decoded)));
 
         // test single-non-base64 character for mime decoding
         testSingleNonBase64MimeDec();
@@ -113,12 +118,20 @@
 
         // test mime decoding with ignored character after padding
         testDecodeIgnoredAfterPadding();
+
+        // given invalid args, encoder should not produce output
+        testEncoderKeepsSilence(Base64.getEncoder());
+        testEncoderKeepsSilence(Base64.getUrlEncoder());
+        testEncoderKeepsSilence(Base64.getMimeEncoder());
+
+        // given invalid args, decoder should not consume input
+        testDecoderKeepsAbstinence(Base64.getDecoder());
+        testDecoderKeepsAbstinence(Base64.getUrlDecoder());
+        testDecoderKeepsAbstinence(Base64.getMimeDecoder());
     }
 
     private static void test(Base64.Encoder enc, Base64.Decoder dec,
                              int numRuns, int numBytes) throws Throwable {
-        Random rnd = new java.util.Random();
-
         enc.encode(new byte[0]);
         dec.decode(new byte[0]);
 
@@ -258,48 +271,49 @@
     private static final String str_null = null;
     private static final ByteBuffer bb_null = null;
 
-    private static void testNull(final Base64.Encoder enc) {
-        checkNull(new Runnable() { public void run() { enc.encode(ba_null); }});
-        checkNull(new Runnable() { public void run() { enc.encodeToString(ba_null); }});
-        checkNull(new Runnable() { public void run() { enc.encode(ba_null, new byte[10]); }});
-        checkNull(new Runnable() { public void run() { enc.encode(new byte[10], ba_null); }});
-        checkNull(new Runnable() { public void run() { enc.encode(bb_null); }});
-        checkNull(new Runnable() { public void run() { enc.wrap((OutputStream)null); }});
+    private static void testNull(Base64.Encoder enc) {
+        checkNull(() -> enc.encode(ba_null));
+        checkNull(() -> enc.encodeToString(ba_null));
+        checkNull(() -> enc.encode(ba_null, new byte[10]));
+        checkNull(() -> enc.encode(new byte[10], ba_null));
+        checkNull(() -> enc.encode(bb_null));
+        checkNull(() -> enc.wrap((OutputStream)null));
     }
 
-    private static void testNull(final Base64.Decoder dec) {
-        checkNull(new Runnable() { public void run() { dec.decode(ba_null); }});
-        checkNull(new Runnable() { public void run() { dec.decode(str_null); }});
-        checkNull(new Runnable() { public void run() { dec.decode(ba_null, new byte[10]); }});
-        checkNull(new Runnable() { public void run() { dec.decode(new byte[10], ba_null); }});
-        checkNull(new Runnable() { public void run() { dec.decode(bb_null); }});
-        checkNull(new Runnable() { public void run() { dec.wrap((InputStream)null); }});
+    private static void testNull(Base64.Decoder dec) {
+        checkNull(() -> dec.decode(ba_null));
+        checkNull(() -> dec.decode(str_null));
+        checkNull(() -> dec.decode(ba_null, new byte[10]));
+        checkNull(() -> dec.decode(new byte[10], ba_null));
+        checkNull(() -> dec.decode(bb_null));
+        checkNull(() -> dec.wrap((InputStream)null));
     }
 
+    @FunctionalInterface
     private static interface Testable {
         public void test() throws Throwable;
     }
 
-    private static void testIOE(final Base64.Encoder enc) throws Throwable {
+    private static void testIOE(Base64.Encoder enc) throws Throwable {
         ByteArrayOutputStream baos = new ByteArrayOutputStream(8192);
-        final OutputStream os = enc.wrap(baos);
+        OutputStream os = enc.wrap(baos);
         os.write(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9});
         os.close();
-        checkIOE(new Testable() { public void test() throws Throwable { os.write(10); }});
-        checkIOE(new Testable() { public void test() throws Throwable { os.write(new byte[] {10}); }});
-        checkIOE(new Testable() { public void test() throws Throwable { os.write(new byte[] {10}, 1, 4); }});
+        checkIOE(() -> os.write(10));
+        checkIOE(() -> os.write(new byte[] {10}));
+        checkIOE(() -> os.write(new byte[] {10}, 1, 4));
     }
 
-    private static void testIOE(final Base64.Decoder dec, byte[] decoded) throws Throwable {
+    private static void testIOE(Base64.Decoder dec, byte[] decoded) throws Throwable {
         ByteArrayInputStream bais = new ByteArrayInputStream(decoded);
-        final InputStream is = dec.wrap(bais);
+        InputStream is = dec.wrap(bais);
         is.read(new byte[10]);
         is.close();
-        checkIOE(new Testable() { public void test() throws Throwable { is.read(); }});
-        checkIOE(new Testable() { public void test() throws Throwable { is.read(new byte[] {10}); }});
-        checkIOE(new Testable() { public void test() throws Throwable { is.read(new byte[] {10}, 1, 4); }});
-        checkIOE(new Testable() { public void test() throws Throwable { is.available(); }});
-        checkIOE(new Testable() { public void test() throws Throwable { is.skip(20); }});
+        checkIOE(() -> is.read());
+        checkIOE(() -> is.read(new byte[] {10}));
+        checkIOE(() -> is.read(new byte[] {10}, 1, 4));
+        checkIOE(() -> is.available());
+        checkIOE(() -> is.skip(20));
     }
 
     private static final void checkNull(Runnable r) {
@@ -391,13 +405,13 @@
                 int pos = (Integer)data[i + 2];
 
                 // decode(byte[])
-                checkIAE(new Runnable() { public void run() { dec.decode(srcBytes); }});
+                checkIAE(() -> dec.decode(srcBytes));
 
                 // decode(String)
-                checkIAE(new Runnable() { public void run() { dec.decode(srcStr); }});
+                checkIAE(() -> dec.decode(srcStr));
 
                 // decode(ByteBuffer)
-                checkIAE(new Runnable() { public void run() { dec.decode(srcBB); }});
+                checkIAE(() -> dec.decode(srcBB));
 
                 // wrap stream
                 checkIOE(new Testable() {
@@ -412,10 +426,8 @@
         // anything left after padding is "invalid"/IAE, if
         // not MIME. In case of MIME, non-base64 character(s)
         // is ignored.
-        checkIAE(new Runnable() { public void run() {
-            Base64.getDecoder().decode("AA==\u00D2"); }});
-        checkIAE(new Runnable() { public void run() {
-            Base64.getUrlDecoder().decode("AA==\u00D2"); }});
+        checkIAE(() -> Base64.getDecoder().decode("AA==\u00D2"));
+        checkIAE(() -> Base64.getUrlDecoder().decode("AA==\u00D2"));
         Base64.getMimeDecoder().decode("AA==\u00D2");
      }
 
@@ -516,4 +528,67 @@
         }
         return ret;
     }
+
+    private static void testEncoderKeepsSilence(Base64.Encoder enc)
+            throws Throwable {
+        List<Integer> vals = new ArrayList<>(List.of(Integer.MIN_VALUE,
+                Integer.MIN_VALUE + 1, -1111, -2, -1, 0, 1, 2, 3, 1111,
+                Integer.MAX_VALUE - 1, Integer.MAX_VALUE));
+        vals.addAll(List.of(rnd.nextInt(), rnd.nextInt(), rnd.nextInt(),
+                rnd.nextInt()));
+        byte[] buf = new byte[] {1, 0, 91};
+        for (int off : vals) {
+            for (int len : vals) {
+                if (off >= 0 && len >= 0 && off <= buf.length - len) {
+                    // valid args, skip them
+                    continue;
+                }
+                // invalid args, test them
+                System.out.println("testing off=" + off + ", len=" + len);
+
+                ByteArrayOutputStream baos = new ByteArrayOutputStream(100);
+                try (OutputStream os = enc.wrap(baos)) {
+                    os.write(buf, off, len);
+                    throw new RuntimeException("Expected IOOBEx was not thrown");
+                } catch (IndexOutOfBoundsException expected) {
+                }
+                if (baos.size() > 0)
+                    throw new RuntimeException("No output was expected, but got "
+                            + baos.size() + " bytes");
+            }
+        }
+    }
+
+    private static void testDecoderKeepsAbstinence(Base64.Decoder dec)
+            throws Throwable {
+        List<Integer> vals = new ArrayList<>(List.of(Integer.MIN_VALUE,
+                Integer.MIN_VALUE + 1, -1111, -2, -1, 0, 1, 2, 3, 1111,
+                Integer.MAX_VALUE - 1, Integer.MAX_VALUE));
+        vals.addAll(List.of(rnd.nextInt(), rnd.nextInt(), rnd.nextInt(),
+                rnd.nextInt()));
+        byte[] buf = new byte[3];
+        for (int off : vals) {
+            for (int len : vals) {
+                if (off >= 0 && len >= 0 && off <= buf.length - len) {
+                    // valid args, skip them
+                    continue;
+                }
+                // invalid args, test them
+                System.out.println("testing off=" + off + ", len=" + len);
+
+                String input = "AAAAAAAAAAAAAAAAAAAAAA";
+                ByteArrayInputStream bais =
+                        new ByteArrayInputStream(input.getBytes("Latin1"));
+                try (InputStream is = dec.wrap(bais)) {
+                    is.read(buf, off, len);
+                    throw new RuntimeException("Expected IOOBEx was not thrown");
+                } catch (IndexOutOfBoundsException expected) {
+                }
+                if (bais.available() != input.length())
+                    throw new RuntimeException("No input should be consumed, "
+                            + "but consumed " + (input.length() - bais.available())
+                            + " bytes");
+            }
+        }
+    }
 }
diff --git a/jdk/test/java/util/Map/FunctionalCMEs.java b/jdk/test/java/util/Map/FunctionalCMEs.java
index 6f92b01..4d83d24 100644
--- a/jdk/test/java/util/Map/FunctionalCMEs.java
+++ b/jdk/test/java/util/Map/FunctionalCMEs.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.util.Arrays;
 import java.util.ConcurrentModificationException;
 import java.util.HashMap;
diff --git a/jdk/test/java/util/Objects/CheckIndex.java b/jdk/test/java/util/Objects/CheckIndex.java
index bcfa1d5..594e806 100644
--- a/jdk/test/java/util/Objects/CheckIndex.java
+++ b/jdk/test/java/util/Objects/CheckIndex.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java b/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java
index f2e18f6..37cf435 100644
--- a/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java
+++ b/jdk/test/java/util/concurrent/FutureTask/NegativeTimeout.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java b/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java
index d63e619..d9b4947 100644
--- a/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java
+++ b/jdk/test/java/util/logging/Logger/entering/LoggerEnteringWithParams.java
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/jdk/test/java/util/logging/XMLFormatterDate.java b/jdk/test/java/util/logging/XMLFormatterDate.java
index ee0eeb9..3b0d702 100644
--- a/jdk/test/java/util/logging/XMLFormatterDate.java
+++ b/jdk/test/java/util/logging/XMLFormatterDate.java
@@ -1,4 +1,3 @@
-
 /*
  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -21,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
diff --git a/jdk/test/java/util/regex/PatternStreamTest.java b/jdk/test/java/util/regex/PatternStreamTest.java
index 1f02e41..9809ea2 100644
--- a/jdk/test/java/util/regex/PatternStreamTest.java
+++ b/jdk/test/java/util/regex/PatternStreamTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/jdk/test/java/util/zip/TestCRC32.java b/jdk/test/java/util/zip/TestCRC32.java
index 68c15ae..15d919d 100644
--- a/jdk/test/java/util/zip/TestCRC32.java
+++ b/jdk/test/java/util/zip/TestCRC32.java
@@ -1,6 +1,3 @@
-
-import java.util.zip.CRC32;
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +21,8 @@
  * questions.
  */
 
+import java.util.zip.CRC32;
+
 /**
  * @test @summary Check that CRC-32 returns the expected CRC value for the
  * string 123456789
diff --git a/jdk/test/java/util/zip/TestCRC32C.java b/jdk/test/java/util/zip/TestCRC32C.java
index bb5ea04..6adf260 100644
--- a/jdk/test/java/util/zip/TestCRC32C.java
+++ b/jdk/test/java/util/zip/TestCRC32C.java
@@ -1,6 +1,3 @@
-
-import java.util.zip.CRC32C;
-
 /*
  * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -24,6 +21,8 @@
  * questions.
  */
 
+import java.util.zip.CRC32C;
+
 /**
  * @test @summary Check that CRC-32C returns the expected CRC value for the
  * string 123456789
diff --git a/jdk/test/java/util/zip/ZipFile/TestZipFile.java b/jdk/test/java/util/zip/ZipFile/TestZipFile.java
index 515ed35..25b87ff 100644
--- a/jdk/test/java/util/zip/ZipFile/TestZipFile.java
+++ b/jdk/test/java/util/zip/ZipFile/TestZipFile.java
@@ -8,7 +8,7 @@
  *
  * 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
+ * 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).
  *
diff --git a/jdk/test/javax/imageio/GetReaderWriterInfoNullTest.java b/jdk/test/javax/imageio/GetReaderWriterInfoNullTest.java
new file mode 100644
index 0000000..5e9679c
--- /dev/null
+++ b/jdk/test/javax/imageio/GetReaderWriterInfoNullTest.java
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     8163258
+ * @summary Test verifies that when we create our own ImageReaderSpi
+ *          implementaion with MIMEType or FileSuffix as null, it should
+ *          not throw NullPointerException when we call
+ *          ImageIO.getReaderMIMETypes() or ImageIO.getReaderFileSuffixes().
+ * @run     main GetReaderWriterInfoNullTest
+ */
+
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Locale;
+import javax.imageio.IIOException;
+import javax.imageio.ImageReadParam;
+import javax.imageio.ImageReader;
+import javax.imageio.ImageTypeSpecifier;
+import javax.imageio.metadata.IIOMetadata;
+import javax.imageio.spi.ImageReaderSpi;
+import javax.imageio.stream.ImageInputStream;
+import javax.imageio.ImageIO;
+import javax.imageio.spi.IIORegistry;
+
+class TestImageReaderSpi extends ImageReaderSpi {
+
+    public TestImageReaderSpi(String[] FORMATNAMES, String[] SUFFIXES,
+                              String[] MIMETYPES) {
+        super("J Duke",          // vendor
+              "1.0",             // version
+              FORMATNAMES,       // format names
+              SUFFIXES,          // file suffixes
+              MIMETYPES,         // mimetypes
+              "readTest.TestImageReader",    // reader class name
+              new Class<?>[] { ImageInputStream.class }, // input types
+              null,              // writer class names.
+              true,              // supports native metadata,
+              null,              // [no] native stream metadata format
+              null,              // [no] native stream metadata class
+              null,              // [no] native extra stream metadata format
+              null,              // [no] native extra stream metadata class
+              true,              // supports standard metadata,
+              null,              // metadata format name,
+              null,              // metadata format class name
+              null,              // [no] extra image metadata format
+              null               // [no] extra image metadata format class
+         );
+    }
+
+    @Override
+    public boolean canDecodeInput(Object source) throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getDescription(Locale locale) {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ImageReader createReaderInstance(Object extension)
+            throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+}
+
+class TestImageReader extends ImageReader {
+
+    public TestImageReader(ImageReaderSpi originatingProvider) {
+        super(originatingProvider);
+    }
+
+    @Override
+    public int getNumImages(boolean allowSearch) throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getWidth(int imageIndex) throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getHeight(int imageIndex) throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex)
+            throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public IIOMetadata getStreamMetadata() throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public IIOMetadata getImageMetadata(int imageIndex) throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public BufferedImage read(int imageIndex, ImageReadParam param)
+            throws IOException {
+        throw new UnsupportedOperationException("Not supported yet.");
+    }
+}
+public class GetReaderWriterInfoNullTest {
+    static final String[] FORMATNAMES = {"readTest"};
+    static final String[] SUFFIXES = {"readTest"};
+    static final String[] MIMETYPES = {"readTest"};
+    public static void main (String[] args) throws IIOException {
+        // Verify getReaderMIMETypes() behavior by keeping MIMEType as null.
+        TestImageReaderSpi mimeNullReadSpi =
+                new TestImageReaderSpi(FORMATNAMES, SUFFIXES, null);
+        IIORegistry.getDefaultInstance().
+                registerServiceProvider(mimeNullReadSpi);
+        ImageIO.getReaderMIMETypes();
+        IIORegistry.getDefaultInstance().
+                deregisterServiceProvider(mimeNullReadSpi);
+
+        /*
+         * Verify getReaderFileSuffixes() behavior by keeping
+         * file suffix as null.
+         */
+        TestImageReaderSpi suffixNullReadSpi =
+                new TestImageReaderSpi(FORMATNAMES, null, MIMETYPES);
+        IIORegistry.getDefaultInstance().
+                registerServiceProvider(suffixNullReadSpi);
+        ImageIO.getReaderFileSuffixes();
+        IIORegistry.getDefaultInstance().
+                deregisterServiceProvider(suffixNullReadSpi);
+    }
+}
+
diff --git a/jdk/test/javax/imageio/plugins/tiff/TIFFFieldTest.java b/jdk/test/javax/imageio/plugins/tiff/TIFFFieldTest.java
index a50929e..936a5e3 100644
--- a/jdk/test/javax/imageio/plugins/tiff/TIFFFieldTest.java
+++ b/jdk/test/javax/imageio/plugins/tiff/TIFFFieldTest.java
@@ -23,7 +23,7 @@
 
 /**
  * @test
- * @bug     8152183
+ * @bug     8152183 8149562
  * @author  a.stepanov
  * @summary Some checks for TIFFField methods
  * @run     main TIFFFieldTest
@@ -455,8 +455,17 @@
         TIFFTagSet ts = new TIFFTagSet(tags);
 
         boolean ok = false;
-        try { TIFFField.createFromMetadataNode(ts, null); }
-        catch (NullPointerException e) { ok = true; }
+        try {
+            TIFFField.createFromMetadataNode(ts, null);
+        } catch (IllegalArgumentException e) {
+            // createFromMetadataNode() formerly threw a NullPointerException
+            // if its Node parameter was null, but the specification has been
+            // modified to allow only IllegalArgumentExceptions, perhaps with
+            // a cause set. In the present invocation the cause would be set
+            // to a NullPointerException but this is not explicitly specified
+            // hence not verified here.
+            ok = true;
+        }
         check(ok, "can create TIFFField from a null node");
 
         TIFFField f = new TIFFField(tag, v);
diff --git a/jdk/test/javax/management/remote/mandatory/connection/ObjectInputStreamWithLoaderNullCheckTest.java b/jdk/test/javax/management/remote/mandatory/connection/ObjectInputStreamWithLoaderNullCheckTest.java
new file mode 100644
index 0000000..44a5911
--- /dev/null
+++ b/jdk/test/javax/management/remote/mandatory/connection/ObjectInputStreamWithLoaderNullCheckTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8009560
+ * @summary Test RMIConnector.ObjectInputStreamWithLoader constructor with
+ *          null Class loader. The test expects a IllegalArgumentException
+ *          thrown when constructor is invoked with null class loader as
+ *          an argument.
+ * @author Amit Sapre
+ * @modules java.management
+ * @run clean ObjectInputStreamWithLoaderNullCheckTest
+ * @run build ObjectInputStreamWithLoaderNullCheckTest
+ * @run main ObjectInputStreamWithLoaderNullCheckTest
+ */
+
+import java.lang.reflect.*;
+import javax.management.remote.*;
+import javax.management.remote.rmi.*;
+import java.io.*;
+
+public class ObjectInputStreamWithLoaderNullCheckTest {
+
+    private static Class<?> innerClass;
+
+    public static void main(String[] args) throws Exception {
+
+       System.out.println(">> == ObjectInputStreamWithLoaderNullCheckTest started...");
+
+       try {
+           innerClass = Class.forName("javax.management.remote.rmi.RMIConnector$ObjectInputStreamWithLoader");
+           Constructor<?> ctor = innerClass.getDeclaredConstructor(InputStream.class,ClassLoader.class);
+           ctor.setAccessible(true);
+
+           ByteArrayOutputStream baos = new ByteArrayOutputStream();
+           ObjectOutput objOut =  new ObjectOutputStream(baos);
+           objOut.writeObject(new String("Serialize"));
+           objOut.close();
+           baos.close();
+           ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+
+           System.out.println(">> == Testing constructor with null class loader.");
+           Object obj = ctor.newInstance(bais,null);
+
+           System.out.println(">> == Test case failed. No error occured");
+           System.exit(1);
+       } catch (InvocationTargetException ex) {
+           Throwable cause = ex.getCause();
+           System.out.println(">> == InvocationTargetException Cause message : " + cause.toString());
+           if (cause instanceof IllegalArgumentException) {
+              System.out.println(">> == Test case Passed.");
+           } else {
+              System.out.println(">> == Test case Failed.");
+              ex.printStackTrace();
+              System.exit(1);
+           }
+       } catch (Exception ex) {
+           System.out.println(">>> == Test case failed with error " + ex.getCause().getMessage());
+           ex.printStackTrace();
+           System.exit(1);
+       }
+    }
+}
diff --git a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java
index 3f91fc3..50777b0 100644
--- a/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java
+++ b/jdk/test/javax/management/remote/mandatory/notif/DeadListenerTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -115,9 +115,8 @@
         mbean.sendNotification(notif);
 
         // Make sure notifs are working normally.
-        long deadline = System.currentTimeMillis() + 2000;
-        while ((count1Val.get() != 1 || count2Val.get() != 1) && System.currentTimeMillis() < deadline) {
-            Thread.sleep(10);
+        while ((count1Val.get() != 1 || count2Val.get() != 1) ) {
+            Thread.sleep(20);
         }
         assertTrue("New value of count1 == 1", count1Val.get() == 1);
         assertTrue("Initial value of count2 == 1", count2Val.get() == 1);
diff --git a/jdk/test/javax/print/attribute/ServiceDialogValidateTest.java b/jdk/test/javax/print/attribute/ServiceDialogValidateTest.java
index 4216da6..929f768 100644
--- a/jdk/test/javax/print/attribute/ServiceDialogValidateTest.java
+++ b/jdk/test/javax/print/attribute/ServiceDialogValidateTest.java
@@ -22,7 +22,7 @@
  */
 /*
  * @test
- * @bug 5049012
+ * @bug 5049012 8163922
  * @summary Verify if PrintToFile option is disabled for flavors that do not
  *          support Destination
  * @requires (os.family == "linux")
@@ -30,6 +30,8 @@
  */
 import java.awt.BorderLayout;
 import java.awt.FlowLayout;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
 import java.io.File;
 import javax.print.DocFlavor;
 import javax.print.PrintService;
@@ -72,6 +74,9 @@
         defService = ServiceUI.printDialog(null, 100, 100, service, defService,
                 flavor, prSet);
 
+        ServiceUI.printDialog(null, 100, 100, service, defService,
+                DocFlavor.SERVICE_FORMATTED.PAGEABLE,
+                new HashPrintRequestAttributeSet());
     }
 
     /**
@@ -87,7 +92,8 @@
         } catch (InterruptedException e) {
             if (!testPassed && testGeneratedInterrupt) {
                 throw new RuntimeException("PrintToFile option is not disabled "
-                        + "for flavors that do not support destination");
+                        + "for flavors that do not support destination and/or"
+                        + " disabled for flavors that supports destination");
             }
         }
         if (!testGeneratedInterrupt) {
@@ -110,10 +116,15 @@
     private static void doTest(Runnable action) {
         String description
                 = " Visual inspection of print dialog is required.\n"
-                + " A print dialog will be shown.\n "
-                + " Please verify Print-To-File option is disabled.\n"
+                + " 2 print dialog will be shown.\n "
+                + " Please verify Print-To-File option is disabled "
+                + " in the 1st print dialog.\n"
                 + " Press Cancel to close the print dialog.\n"
-                + " If Print-To-File option is disabled, press PASS else press FAIL";
+                + " Please verify Print-To-File option is enabled "
+                + " in 2nd print dialog\n"
+                + " Press Cancel to close the print dialog.\n"
+                + " If the print dialog's Print-to-File behaves as mentioned, "
+                + " press PASS else press FAIL";
 
         final JDialog dialog = new JDialog();
         dialog.setTitle("printSelectionTest");
@@ -148,6 +159,14 @@
         dialog.add(mainPanel);
         dialog.pack();
         dialog.setVisible(true);
+        dialog.addWindowListener(new WindowAdapter() {
+            @Override
+            public void windowClosing(WindowEvent e) {
+                System.out.println("main dialog closing");
+                testGeneratedInterrupt = false;
+                mainThread.interrupt();
+            }
+        });
     }
 }
 
diff --git a/jdk/test/javax/print/attribute/ServiceDlgPageRangeTest.java b/jdk/test/javax/print/attribute/ServiceDlgPageRangeTest.java
index b35d687..ab17680 100644
--- a/jdk/test/javax/print/attribute/ServiceDlgPageRangeTest.java
+++ b/jdk/test/javax/print/attribute/ServiceDlgPageRangeTest.java
@@ -22,13 +22,15 @@
  */
 /*
  * @test
- * @bug 5080098
+ * @bug 5080098 8164205
  * @summary Verify if PageRanges option is disabled for Non service-formatted
  *          flavors.
  * @run main/manual ServiceDlgPageRangeTest
  */
 import java.awt.BorderLayout;
 import java.awt.FlowLayout;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
 import javax.print.DocFlavor;
 import javax.print.PrintService;
 import javax.print.PrintServiceLookup;
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetInputStream.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetInputStream.java
index e1a39d3..72a19c9 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetInputStream.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetInputStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -54,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
@@ -76,7 +78,9 @@
                     buff = new ModelByteBuffer(test_byte_array);
 
                 byte[] b = new byte[test_byte_array.length];
-                buff.getInputStream().read(b);
+                try (InputStream is = buff.getInputStream()) {
+                    is.read(b);
+                }
                 for (int j = 0; j < b.length; j++)
                     if(b[i] != test_byte_array[i])
                          throw new RuntimeException("Byte array compare fails!");
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetRoot.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetRoot.java
index b992825..829900f 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetRoot.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/GetRoot.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Load.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Load.java
index 734ed37..b589048 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Load.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Load.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -54,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/LoadAll.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/LoadAll.java
index e912ee9..5549393 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/LoadAll.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/LoadAll.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -56,13 +57,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArray.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArray.java
index edcef87..801926a 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArray.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArray.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArrayIntInt.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArrayIntInt.java
index 3d1ad72..4c193b9 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArrayIntInt.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferByteArrayIntInt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFile.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFile.java
index 5a20004..90b4be5 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFile.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFile.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFileLongLong.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFileLongLong.java
index d55466ae..85f93bd 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFileLongLong.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/NewModelByteBufferFileLongLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java
index c4da3ad..659f33c 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Available.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java
index 2bfd589..4785d40 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Close.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java
index bcd8584..f8a3570 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkReset.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java
index e505d0b..41ed42e 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/MarkSupported.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java
index e8fb281..523adf4 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Read.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java
index a847b56..ceb33fb 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByte.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java
index c8c0a0f..1570df0 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/ReadByteIntInt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java
index 96ce0fe..d80a1c6 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/RandomFileInputStream/Skip.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,8 +28,9 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +56,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLong.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLong.java
index 14eba08..ad4dc48 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLong.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLong.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLong.java
index d6f9cd8..75b7bbc 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLong.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLongBoolean.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLongBoolean.java
index d59349c..df84eaf 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLongBoolean.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/SubbufferLongLongBoolean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -53,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Unload.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Unload.java
index 1c15fa3..8d8895f 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Unload.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/Unload.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,8 @@
 
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -54,13 +55,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/WriteTo.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/WriteTo.java
index 61ebd22..2f0b196 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/WriteTo.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBuffer/WriteTo.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,9 @@
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
-import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -55,13 +57,13 @@
         test_byte_array = new byte[testarray.length*2];
         AudioFloatConverter.getConverter(format).toByteArray(testarray, test_byte_array);
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(test_byte_array);
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(test_byte_array);
+        }
     }
 
     static void tearDown() throws Exception {
-        if(!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void main(String[] args) throws Exception {
diff --git a/jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/OpenStream.java b/jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/OpenStream.java
index 01e3b7a..7e659d4 100644
--- a/jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/OpenStream.java
+++ b/jdk/test/javax/sound/midi/Gervill/ModelByteBufferWavetable/OpenStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,8 @@
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import javax.sound.sampled.*;
 
@@ -99,16 +101,15 @@
         buffer_wave = new ModelByteBuffer(baos.toByteArray());
 
         test_file = File.createTempFile("test", ".raw");
-        FileOutputStream fos = new FileOutputStream(test_file);
-        fos.write(baos.toByteArray());
-        fos.close();
+        try (FileOutputStream fos = new FileOutputStream(test_file)) {
+            fos.write(baos.toByteArray());
+        }
         buffer_wave_ondisk = new ModelByteBuffer(test_file);
 
     }
 
     static void tearDown() throws Exception {
-        if (!test_file.delete())
-            test_file.deleteOnExit();
+        Files.delete(Paths.get(test_file.getAbsolutePath()));
     }
 
     public static void testOpenStream(ModelByteBufferWavetable wavetable)
diff --git a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java
index e32e772..f61126b 100644
--- a/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java
+++ b/jdk/test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java
@@ -26,6 +26,8 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -162,7 +164,7 @@
             ais = AudioSystem.getAudioInputStream(temp);
             final long frameLength = ais.getFrameLength();
             ais.close();
-            temp.delete();
+            Files.delete(Paths.get(temp.getAbsolutePath()));
             validate(frameLength);
         } catch (IllegalArgumentException | UnsupportedAudioFileException
                 | IOException ignored) {
diff --git a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriteUnsupportedAudioFormat.java b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriteUnsupportedAudioFormat.java
index 8932059..8b0d899 100644
--- a/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriteUnsupportedAudioFormat.java
+++ b/jdk/test/javax/sound/sampled/spi/AudioFileWriter/WriteUnsupportedAudioFormat.java
@@ -27,6 +27,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.file.Files;
+import java.nio.file.Paths;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -91,7 +93,6 @@
         } catch (final IOException e) {
             throw new RuntimeException(e);
         }
-        FILE.deleteOnExit();
 
         for (final Boolean end : new boolean[]{false, true}) {
             for (final int sampleSize : sampleBits) {
@@ -134,6 +135,7 @@
                 }
             }
         }
+        Files.delete(Paths.get(FILE.getAbsolutePath()));
     }
 
     /**
diff --git a/jdk/test/javax/swing/JButton/8151303/PressedIconTest.java b/jdk/test/javax/swing/JButton/8151303/PressedIconTest.java
new file mode 100644
index 0000000..9bf4065
--- /dev/null
+++ b/jdk/test/javax/swing/JButton/8151303/PressedIconTest.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.awt.Robot;
+import java.awt.event.InputEvent;
+import java.awt.image.BaseMultiResolutionImage;
+import java.awt.image.BufferedImage;
+import javax.swing.Icon;
+import javax.swing.ImageIcon;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JToggleButton;
+import javax.swing.SwingUtilities;
+
+/**
+ * @test
+ * @bug 8151303
+ * @summary [macosx] [hidpi] JButton's low-res. icon is visible when clicking on it
+ * @run main/othervm  PressedIconTest
+ * @run main/othervm -Dsun.java2d.uiScale=2 PressedIconTest
+ */
+public class PressedIconTest {
+
+    private final static int IMAGE_SIZE = 300;
+
+    private final static Color COLOR_1X = Color.RED;
+    private final static Color COLOR_2X = Color.BLUE;
+    private static JFrame frame;
+    private static volatile double scale = -1;
+    private static volatile int centerX;
+    private static volatile int centerY;
+
+    public static void main(String[] args) throws Exception {
+        Robot robot = new Robot();
+        robot.setAutoDelay(50);
+
+        SwingUtilities.invokeAndWait(() -> createAndShowGUI());
+        robot.waitForIdle();
+
+        SwingUtilities.invokeAndWait(() -> {
+            scale = frame.getGraphicsConfiguration().getDefaultTransform()
+                    .getScaleX();
+            Point location = frame.getLocation();
+            Dimension size = frame.getSize();
+            centerX = location.x + size.width / 2;
+            centerY = location.y + size.height / 2;
+        });
+        robot.waitForIdle();
+
+        robot.mouseMove(centerX, centerY);
+        robot.mousePress(InputEvent.BUTTON1_MASK);
+        robot.waitForIdle();
+        Thread.sleep(100);
+        Color color = robot.getPixelColor(centerX, centerY);
+        robot.mouseRelease(InputEvent.BUTTON1_MASK);
+
+        SwingUtilities.invokeAndWait(() -> frame.dispose());
+
+        if ((scale == 1 && !similar(color, COLOR_1X))
+                || (scale == 2 && !similar(color, COLOR_2X))) {
+            throw new RuntimeException("Colors are different!");
+        }
+    }
+
+    private static void createAndShowGUI() {
+        frame = new JFrame();
+        frame.setSize(IMAGE_SIZE, IMAGE_SIZE);
+        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+
+        JPanel panel = new JPanel(new BorderLayout());
+
+        BufferedImage img1x = generateImage(1, COLOR_1X);
+
+        BufferedImage img2x = generateImage(2, COLOR_2X);
+        BaseMultiResolutionImage mri = new BaseMultiResolutionImage(
+                new BufferedImage[]{img1x, img2x});
+        Icon mrIcon = new ImageIcon(mri);
+
+        JToggleButton button = new JToggleButton();
+        button.setIcon(mrIcon);
+        panel.add(button, BorderLayout.CENTER);
+
+        frame.getContentPane().add(panel);
+        frame.setVisible(true);
+    }
+
+    private static boolean similar(Color c1, Color c2) {
+        return similar(c1.getRed(), c2.getRed())
+                && similar(c1.getGreen(), c2.getGreen())
+                && similar(c1.getBlue(), c2.getBlue());
+    }
+
+    private static boolean similar(int n, int m) {
+        return Math.abs(n - m) <= 50;
+    }
+
+    private static BufferedImage generateImage(int scale, Color c) {
+
+        int size = IMAGE_SIZE * scale;
+        BufferedImage img = new BufferedImage(size, size, BufferedImage.TYPE_INT_RGB);
+        Graphics g = img.createGraphics();
+        g.setColor(c);
+        g.fillRect(0, 0, size, size);
+        g.dispose();
+        return img;
+    }
+}
diff --git a/jdk/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java b/jdk/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java
index f714631..4c773c0 100644
--- a/jdk/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java
+++ b/jdk/test/javax/swing/JRadioButton/FocusTraversal/FocusTraversal.java
@@ -23,7 +23,7 @@
 
 /* @test
  * @key headful
- * @bug 8129940 8132770 8161470
+ * @bug 8129940 8132770 8161470 8163169
  * @summary JRadioButton should run custom FocusTraversalKeys for all LaFs
  * @run main FocusTraversal
  */
@@ -61,6 +61,7 @@
     public static void main(String[] args) throws Exception {
 
         robot = new Robot();
+        robot.setAutoDelay(100);
         robot.waitForIdle();
         UIManager.LookAndFeelInfo[] lookAndFeelArray
                 = UIManager.getInstalledLookAndFeels();
diff --git a/jdk/test/javax/swing/plaf/nimbus/8057791/bug8057791.java b/jdk/test/javax/swing/plaf/nimbus/8057791/bug8057791.java
index d8146b6..3731bed 100644
--- a/jdk/test/javax/swing/plaf/nimbus/8057791/bug8057791.java
+++ b/jdk/test/javax/swing/plaf/nimbus/8057791/bug8057791.java
@@ -22,9 +22,10 @@
  */
 
  /* @test
-   @bug 8057791 8160438
-   @summary Selection in JList is drawn with wrong colors in Nimbus L&F
-   @run main bug8057791
+    @key headful
+    @bug 8057791 8160438 8163161
+    @summary Selection in JList is drawn with wrong colors in Nimbus L&F
+    @run main/timeout=500 bug8057791
  */
 import java.awt.Color;
 import java.awt.Font;
diff --git a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
index f3308c4..aff9217 100644
--- a/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
+++ b/jdk/test/jdk/internal/ref/Cleaner/ExitOnThrow.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 4954921 8009259
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.ref
  *          java.base/jdk.internal.misc
  * @build jdk.test.lib.*
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java b/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java
index 594b12e..621885a 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Asserts.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -44,7 +44,7 @@
  * </pre>
  *
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class Asserts {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java
index c481522..7b16a60 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolFinder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public final class JDKToolFinder {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java
index 777e8cf..cd3b7ce 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/JDKToolLauncher.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@
  * }
  * </pre>
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class JDKToolLauncher {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java
index 839c322..1a641ef 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputAnalyzer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
  * Utility class for verifying output and exit value from a {@code Process}.
  *
  * @deprecated  This class is deprecated. Use the one from
- *              {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *              {@code <root>/test/lib/jdk/test/lib/process}
  *
  */
 @Deprecated
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java
index c8a5d7a..9759f22 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/OutputBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 class OutputBuffer {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java b/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java
index 635f37f..59b6d7c 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java
@@ -29,7 +29,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public class Platform {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
index e2c2f11..224ab0e 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/ProcessTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 public final class ProcessTools {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java b/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java
index 2f3c205..1107563 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/StreamPumper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,7 +36,7 @@
 
 /**
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
+ *             {@code <root>/test/lib/jdk/test/lib/process}
  */
 @Deprecated
 public final class StreamPumper implements Runnable {
diff --git a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java
index c763391..31008f5 100644
--- a/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java
+++ b/jdk/test/lib/testlibrary/jdk/testlibrary/Utils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
  * Common library for various test helper functions.
  *
  * @deprecated This class is deprecated. Use the one from
- *             {@code <root>/test/lib/share/classes/jdk/test/lib}
+ *             {@code <root>/test/lib/jdk/test/lib}
  */
 @Deprecated
 public final class Utils {
diff --git a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java
index 826edfb..3d521ad 100644
--- a/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java
+++ b/jdk/test/sun/jvmstat/monitor/MonitoredVm/TestPollingInterval.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@
  * @summary setInterval() for local MonitoredHost and local MonitoredVm
  * @modules jdk.jvmstat/sun.jvmstat.monitor
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
  * @run main TestPollingInterval
diff --git a/jdk/test/sun/misc/SunMiscSignalTest.java b/jdk/test/sun/misc/SunMiscSignalTest.java
index 2e998ba..33d4d3a 100644
--- a/jdk/test/sun/misc/SunMiscSignalTest.java
+++ b/jdk/test/sun/misc/SunMiscSignalTest.java
@@ -43,7 +43,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules jdk.unsupported
  *          java.base/jdk.internal.misc
  * @build jdk.test.lib.Platform jdk.test.lib.Utils
diff --git a/jdk/test/sun/security/krb5/auto/Unreachable.java b/jdk/test/sun/security/krb5/auto/Unreachable.java
index b010b54..fdc1aa2 100644
--- a/jdk/test/sun/security/krb5/auto/Unreachable.java
+++ b/jdk/test/sun/security/krb5/auto/Unreachable.java
@@ -23,31 +23,108 @@
 
 /*
  * @test
- * @bug 7162687
+ * @bug 7162687 8015595
  * @key intermittent
  * @summary enhance KDC server availability detection
  * @compile -XDignore.symbol.file Unreachable.java
- * @run main/othervm/timeout=10 Unreachable
+ * @run main/othervm Unreachable
  */
-
-import java.io.File;
+import java.net.PortUnreachableException;
+import java.net.SocketTimeoutException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.Executors;
 import javax.security.auth.login.LoginException;
 import sun.security.krb5.Config;
 
 public class Unreachable {
 
-    public static void main(String[] args) throws Exception {
-        File f = new File(
-                System.getProperty("test.src", "."), "unreachable.krb5.conf");
-        System.setProperty("java.security.krb5.conf", f.getPath());
-        Config.refresh();
+    // Wait for 20 second until unreachable KDC throws PortUnreachableException.
+    private static final int TIMEOUT = 20;
+    private static final String REALM = "RABBIT.HOLE";
+    private static final String HOST = "127.0.0.1";
+    private static final int PORT = 13434;
+    private static final String KRB_CONF = "unreachable.krb5.conf";
 
-        // If PortUnreachableException is not received, the login will consume
-        // about 3*3*30 seconds and the test will timeout.
-        try {
-            Context.fromUserPass("name", "pass".toCharArray(), true);
-        } catch (LoginException le) {
-            // This is OK
+    public static void main(String[] args) throws Exception {
+
+        // - Only PortUnreachableException will allow to continue execution.
+        // - SocketTimeoutException may occur on Mac because it will not throw
+        // PortUnreachableException for unreachable port in which case the Test
+        // execution will be skipped.
+        // - For Reachable port, the Test execution will get skipped.
+        // - Any other Exception will be treated as Test failure.
+        if (!findPortUnreachableExc()) {
+            System.out.println(String.format("WARNING: Either a reachable "
+                    + "connection found to %s:%s or SocketTimeoutException "
+                    + "occured which means PortUnreachableException not thrown"
+                    + " by the platform.", HOST, PORT));
+            return;
         }
+        KDC kdc = KDC.existing(REALM, HOST, PORT);
+        KDC.saveConfig(KRB_CONF, kdc);
+        ExecutorService executor = Executors.newSingleThreadExecutor();
+        Future<Exception> future = executor.submit(new Callable<Exception>() {
+            @Override
+            public Exception call() {
+                System.setProperty("java.security.krb5.conf", KRB_CONF);
+                try {
+                    Config.refresh();
+                    // If PortUnreachableException is not received, the login
+                    // will consume about 3*3*30 seconds and the test will
+                    // timeout.
+                    try {
+                        Context.fromUserPass("name", "pass".toCharArray(), true);
+                    } catch (LoginException le) {
+                        // This is OK
+                    }
+                    System.out.println("Execution successful.");
+                } catch (Exception e) {
+                    return e;
+                }
+                return null;
+            }
+        });
+        try {
+            Exception ex = null;
+            if ((ex = future.get(TIMEOUT, TimeUnit.SECONDS)) != null) {
+                throw new RuntimeException(ex);
+            }
+        } catch (TimeoutException e) {
+            future.cancel(true);
+            throw new RuntimeException("PortUnreachableException not thrown.");
+        } finally {
+            executor.shutdownNow();
+        }
+    }
+
+    /**
+     * If the remote destination to which the socket is connected does not
+     * exist, or is otherwise unreachable, and if an ICMP destination unreachable
+     * packet has been received for that address, then a subsequent call to
+     * send or receive may throw a PortUnreachableException. Note, there is no
+     * guarantee that the exception will be thrown.
+     */
+    private static boolean findPortUnreachableExc() throws Exception {
+        try {
+            InetSocketAddress iaddr = new InetSocketAddress(HOST, PORT);
+            DatagramSocket dgSocket = new DatagramSocket();
+            dgSocket.setSoTimeout(5000);
+            dgSocket.connect(iaddr);
+            byte[] data = new byte[]{};
+            dgSocket.send(new DatagramPacket(data, data.length, iaddr));
+            dgSocket.receive(new DatagramPacket(data, data.length));
+        } catch (PortUnreachableException e) {
+            return true;
+        } catch (SocketTimeoutException e) {
+            return false;
+        }
+        return false;
     }
 }
diff --git a/jdk/test/sun/security/krb5/auto/unreachable.krb5.conf b/jdk/test/sun/security/krb5/auto/unreachable.krb5.conf
deleted file mode 100644
index 8ff4cc1..0000000
--- a/jdk/test/sun/security/krb5/auto/unreachable.krb5.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-[libdefaults]
-   default_realm = RABBIT.HOLE
-[realms]
-
-RABBIT.HOLE = {
-   kdc = 127.0.0.1:13434
-   kdc = 127.0.0.1:13435
-   kdc = 127.0.0.1:13436
-}
diff --git a/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java b/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java
index 48361f2..0cdce17 100644
--- a/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java
+++ b/jdk/test/sun/security/provider/SecureRandom/AutoReseed.java
@@ -20,6 +20,7 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
+
 import java.security.SecureRandom;
 import java.security.Security;
 
@@ -27,15 +28,15 @@
  * @test
  * @bug 8051408
  * @summary make sure nextBytes etc can be called before setSeed
+ * @run main/othervm -Djava.security.egd=file:/dev/urandom AutoReseed
  */
 public class AutoReseed {
 
     public static void main(String[] args) throws Exception {
         SecureRandom sr;
-        String old = Security.getProperty("securerandom.drbg.config");
-        try {
-            for (String mech :
-                    new String[]{"Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
+        boolean pass = true;
+        for (String mech : new String[]{"Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
+            try {
                 System.out.println("Testing " + mech + "...");
                 Security.setProperty("securerandom.drbg.config", mech);
 
@@ -46,9 +47,13 @@
                 sr.reseed();
                 sr = SecureRandom.getInstance("DRBG");
                 sr.generateSeed(10);
+            } catch (Exception e) {
+                pass = false;
+                e.printStackTrace(System.out);
             }
-        } finally {
-            Security.setProperty("securerandom.drbg.config", old);
+        }
+        if (!pass) {
+            throw new RuntimeException("At least one test case failed");
         }
     }
 }
diff --git a/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java b/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java
index b812ba5..b10431b 100644
--- a/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java
+++ b/jdk/test/sun/security/ssl/SSLContextImpl/TrustTrustedCert.java
@@ -30,12 +30,13 @@
 
 /*
  * @test
- * @bug 7113275
+ * @bug 7113275 8164846
  * @summary compatibility issue with MD2 trust anchor and old X509TrustManager
- * @run main/othervm TrustTrustedCert PKIX TLSv1.1
- * @run main/othervm TrustTrustedCert SunX509 TLSv1.1
- * @run main/othervm TrustTrustedCert PKIX TLSv1.2
- * @run main/othervm TrustTrustedCert SunX509 TLSv1.2
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.1 true
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.1 false
+ * @run main/othervm TrustTrustedCert SunX509 TLSv1.1 false
+ * @run main/othervm TrustTrustedCert PKIX TLSv1.2 false
+ * @run main/othervm TrustTrustedCert SunX509 TLSv1.2 false
  */
 
 import java.net.*;
@@ -181,23 +182,32 @@
             Thread.sleep(50);
         }
 
-        SSLContext context = generateSSLContext();
-        SSLSocketFactory sslsf = context.getSocketFactory();
+        SSLSocket sslSocket = null;
+        try {
+            SSLContext context = generateSSLContext();
+            SSLSocketFactory sslsf = context.getSocketFactory();
 
-        SSLSocket sslSocket =
-            (SSLSocket)sslsf.createSocket("localhost", serverPort);
+            sslSocket = (SSLSocket)sslsf.createSocket("localhost", serverPort);
 
-        // enable the specified TLS protocol
-        sslSocket.setEnabledProtocols(new String[] {tlsProtocol});
+            // enable the specified TLS protocol
+            sslSocket.setEnabledProtocols(new String[] {tlsProtocol});
 
-        InputStream sslIS = sslSocket.getInputStream();
-        OutputStream sslOS = sslSocket.getOutputStream();
-
-        sslOS.write('B');
-        sslOS.flush();
-        sslIS.read();
-
-        sslSocket.close();
+            InputStream sslIS = sslSocket.getInputStream();
+            OutputStream sslOS = sslSocket.getOutputStream();
+            sslOS.write('B');
+            sslOS.flush();
+            sslIS.read();
+        } catch (SSLHandshakeException e) {
+            // focus in on the CertPathValidatorException
+            Throwable t = e.getCause().getCause();
+            if ((t == null) || (expectFail &&
+                !t.toString().contains("MD5withRSA"))) {
+                throw new RuntimeException(
+                    "Expected to see MD5withRSA in exception output " + t);
+            }
+        } finally {
+            if (sslSocket != null) sslSocket.close();
+        }
     }
 
     /*
@@ -206,10 +216,13 @@
      */
     private static String tmAlgorithm;        // trust manager
     private static String tlsProtocol;        // trust manager
+    // set this flag to test context of CertificateException
+    private static boolean expectFail;
 
     private static void parseArguments(String[] args) {
         tmAlgorithm = args[0];
         tlsProtocol = args[1];
+        expectFail = Boolean.parseBoolean(args[2]);
     }
 
     private static SSLContext generateSSLContext() throws Exception {
@@ -232,7 +245,7 @@
 
         // generate the private key.
         PKCS8EncodedKeySpec priKeySpec = new PKCS8EncodedKeySpec(
-                                Base64.getMimeDecoder().decode(targetPrivateKey));
+                            Base64.getMimeDecoder().decode(targetPrivateKey));
         KeyFactory kf = KeyFactory.getInstance("RSA");
         RSAPrivateKey priKey =
                 (RSAPrivateKey)kf.generatePrivate(priKeySpec);
@@ -338,9 +351,19 @@
     volatile Exception clientException = null;
 
     public static void main(String[] args) throws Exception {
-        // MD5 is used in this test case, don't disable MD5 algorithm.
-        Security.setProperty("jdk.certpath.disabledAlgorithms",
+        /*
+         * Get the customized arguments.
+         */
+        parseArguments(args);
+
+        /*
+         * MD5 is used in this test case, don't disable MD5 algorithm.
+         * if expectFail is set, we're testing exception message
+         */
+        if (!expectFail) {
+            Security.setProperty("jdk.certpath.disabledAlgorithms",
                 "MD2, RSA keySize < 1024");
+        }
         Security.setProperty("jdk.tls.disabledAlgorithms",
                 "SSLv3, RC4, DH keySize < 768");
 
@@ -348,11 +371,6 @@
             System.setProperty("javax.net.debug", "all");
 
         /*
-         * Get the customized arguments.
-         */
-        parseArguments(args);
-
-        /*
          * Start the tests.
          */
         new TrustTrustedCert();
@@ -376,7 +394,8 @@
                 startServer(false);
             }
         } catch (Exception e) {
-            // swallow for now.  Show later
+            System.out.println("Unexpected exception: ");
+            e.printStackTrace();
         }
 
         /*
@@ -440,7 +459,11 @@
                          */
                         System.err.println("Server died...");
                         serverReady = true;
-                        serverException = e;
+                        if (!expectFail) {
+                            // only record if we weren't expecting.
+                            // client side will record exception
+                            serverException = e;
+                        }
                     }
                 }
             };
@@ -449,7 +472,11 @@
             try {
                 doServerSide();
             } catch (Exception e) {
-                serverException = e;
+                // only record if we weren't expecting.
+                // client side will record exception
+                if (!expectFail) {
+                    serverException = e;
+                }
             } finally {
                 serverReady = true;
             }
diff --git a/jdk/test/sun/security/tools/jarsigner/AltProvider.java b/jdk/test/sun/security/tools/jarsigner/AltProvider.java
index b934556..2717ef9 100644
--- a/jdk/test/sun/security/tools/jarsigner/AltProvider.java
+++ b/jdk/test/sun/security/tools/jarsigner/AltProvider.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 4906940 8130302
  * @summary -providerPath, -providerClass, -addprovider, and -providerArg
- * @library /lib/testlibrary /test/lib/share/classes
+ * @library /lib/testlibrary /test/lib
  * @modules java.base/jdk.internal.misc
  */
 
diff --git a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java
index e18b5c7..3138471 100644
--- a/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java
+++ b/jdk/test/sun/tools/jhsdb/BasicLauncherTest.java
@@ -24,7 +24,7 @@
 /*
  * @test
  * @summary Basic test for jhsdb launcher
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
diff --git a/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java b/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java
index c768dd6..1f88fd3 100644
--- a/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java
+++ b/jdk/test/sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
  * @bug 8042397
  * @summary Unit test for jmap utility test heap configuration reader
  * @modules jdk.hotspot.agent/sun.jvm.hotspot
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
diff --git a/jdk/test/sun/tools/jinfo/JInfoTest.java b/jdk/test/sun/tools/jinfo/JInfoTest.java
index 4710cfb..720874b 100644
--- a/jdk/test/sun/tools/jinfo/JInfoTest.java
+++ b/jdk/test/sun/tools/jinfo/JInfoTest.java
@@ -37,7 +37,7 @@
  * @test
  * @summary Unit test for jinfo utility
  * @modules java.base/jdk.internal.misc
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.test.lib.*
  * @build jdk.test.lib.apps.*
  * @build jdk.test.lib.process.*
diff --git a/jdk/test/sun/tools/jmap/BasicJMapTest.java b/jdk/test/sun/tools/jmap/BasicJMapTest.java
index fa333cd..c0432de 100644
--- a/jdk/test/sun/tools/jmap/BasicJMapTest.java
+++ b/jdk/test/sun/tools/jmap/BasicJMapTest.java
@@ -37,7 +37,7 @@
  * @summary Unit test for jmap utility
  * @key intermittent
  * @library /lib/testlibrary
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.hprof.*
  * @build jdk.test.lib.hprof.model.*
diff --git a/jdk/test/sun/tools/jps/TestJpsSanity.java b/jdk/test/sun/tools/jps/TestJpsSanity.java
index 457a667..47d1563 100644
--- a/jdk/test/sun/tools/jps/TestJpsSanity.java
+++ b/jdk/test/sun/tools/jps/TestJpsSanity.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,7 @@
  * @test
  * @summary This test verifies jps usage and checks that appropriate error message is shown
  *          when running jps with illegal arguments.
- * @library /lib/testlibrary /test/lib/share/classes
+ * @library /lib/testlibrary /test/lib
  * @modules jdk.jartool/sun.tools.jar
  *          java.management
  *          java.base/jdk.internal.misc
diff --git a/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java b/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java
index 771fd12..c51e402 100644
--- a/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java
+++ b/jdk/test/sun/tools/jstack/DeadlockDetectionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,7 +37,7 @@
 /*
  * @test
  * @summary Test deadlock detection
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @library /lib/testlibrary
  * @build jdk.testlibrary.*
  * @build jdk.test.lib.apps.*
diff --git a/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java b/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java
index 9d124ff..0c1d765 100644
--- a/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java
+++ b/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java
@@ -22,11 +22,15 @@
  */
 
 /*
- *@test
- *@bug 8007572 8008161
- *@summary Test whether the TimeZone generated from JSR310 tzdb is the same
- *as the one from the tz data from javazic
+ * @test
+ * @bug 8007572 8008161 8157792
+ * @summary Test whether the TimeZone generated from JSR310 tzdb is the same
+ * as the one from the tz data from javazic
  * @modules java.base/sun.util.calendar
+ * @build BackEnd Checksum DayOfWeek Gen GenDoc Main Mappings Month
+ *        Rule RuleDay RuleRec Simple TestZoneInfo310 Time Timezone
+ *        TzIDOldMapping Zone ZoneInfoFile ZoneInfoOld ZoneRec Zoneinfo
+ * @run main TestZoneInfo310
  */
 
 import java.io.File;
@@ -164,10 +168,6 @@
         }
 
         for (String zid : zids_new) {
-            if (zid.equals("Asia/Oral") || zid.equals("Asia/Qyzylorda")) {
-                // JDK-8157792 tracking this issue
-                continue;
-            }
             ZoneInfoOld zi = toZoneInfoOld(TimeZone.getTimeZone(zid));
             ZoneInfoOld ziOLD = (ZoneInfoOld)ZoneInfoOld.getTimeZone(zid);
             if (! zi.equalsTo(ziOLD)) {
diff --git a/jdk/test/sun/util/calendar/zi/Zoneinfo.java b/jdk/test/sun/util/calendar/zi/Zoneinfo.java
index 9e48655..e58fd18 100644
--- a/jdk/test/sun/util/calendar/zi/Zoneinfo.java
+++ b/jdk/test/sun/util/calendar/zi/Zoneinfo.java
@@ -373,6 +373,7 @@
         tz.getOffsetIndex(zrec.getGmtOffset());
 
         int lastGmtOffsetValue = -1;
+        ZoneRec prevzrec = null;
         int currentSave = 0;
         boolean usedZone;
         for (int zindex = 0; zindex < zone.size(); zindex++) {
@@ -441,6 +442,15 @@
                                                                      currentSave);
                             if (zrec.hasUntil()) {
                                 if (transition >= zrec.getUntilTime(currentSave)) {
+                                    // If the GMT offset changed from the previous one,
+                                    // record fromTime as a transition.
+                                    if (!fromTimeUsed && prevzrec != null
+                                        && gmtOffset != prevzrec.getGmtOffset()) {
+                                        tz.addTransition(fromTime,
+                                                         tz.getOffsetIndex(gmtOffset+currentSave),
+                                                         tz.getDstOffsetIndex(currentSave));
+                                        fromTimeUsed = true; // for consistency
+                                    }
                                     break year_loop;
                                 }
                             }
@@ -452,8 +462,6 @@
                                     if (fromTime != minTime) {
                                         int prevsave;
 
-                                        ZoneRec prevzrec = zone.get(zindex - 1);
-
                                         // See if until time in the previous
                                         // ZoneRec is the same thing as the
                                         // local time in the next rule.
@@ -555,6 +563,7 @@
                 fromYear = zrec.getUntilYear();
                 year = zrec.getUntilYear();
             }
+            prevzrec = zrec;
         }
 
         if (tz.getDSTType() == Timezone.UNDEF_DST) {
diff --git a/jdk/test/tools/jar/multiRelease/Basic.java b/jdk/test/tools/jar/multiRelease/Basic.java
index 589615a..9f76b36 100644
--- a/jdk/test/tools/jar/multiRelease/Basic.java
+++ b/jdk/test/tools/jar/multiRelease/Basic.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @library /test/lib/share/classes
+ * @library /test/lib
  * @modules java.base/jdk.internal.misc
  * @build jdk.test.lib.JDKToolFinder jdk.test.lib.Platform
  * @run testng Basic
diff --git a/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java b/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
index ae2d3ec..d1510af 100644
--- a/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
+++ b/jdk/test/tools/jlink/plugins/GenerateJLIClassesPluginTest.java
@@ -22,6 +22,7 @@
  */
 
 import java.nio.file.Path;
+import java.util.Collection;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -75,7 +76,7 @@
 
     }
 
-    private static List<String> classFilesForSpecies(List<String> species) {
+    private static List<String> classFilesForSpecies(Collection<String> species) {
         return species.stream()
                 .map(s -> "/java.base/java/lang/invoke/BoundMethodHandle$Species_" + s + ".class")
                 .collect(Collectors.toList());
diff --git a/langtools/.hgtags b/langtools/.hgtags
index 4fdf92e..f4500a8 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -376,3 +376,4 @@
 aebfafc43714d5a27d5064d8a0011eaccde633cf jdk-9+131
 2c17b65a37a8d7afdb9f96d5f11b28a3f21c78f2 jdk-9+132
 7efa4b3477b2b93edbdb4abf827b74c6391f056e jdk-9+133
+f08683786207a48b652266b3b7b908e6c863c3fc jdk-9+134
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java
index d928ee1..7cccabe 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/ClassFinder.java
@@ -119,10 +119,6 @@
      */
     final Name completionFailureName;
 
-    /** Module specified with -Xmodule:
-     */
-    final Name moduleOverride;
-
     /** Access to files
      */
     private final JavaFileManager fileManager;
@@ -210,9 +206,6 @@
             ? names.fromString(options.get("failcomplete"))
             : null;
 
-        moduleOverride = options.isSet(Option.XMODULE) ? names.fromString(options.get(Option.XMODULE))
-                                                : null;
-
         // Temporary, until more info is available from the module system.
         boolean useCtProps;
         JavaFileManager fm = context.get(JavaFileManager.class);
@@ -527,16 +520,15 @@
         if (msym == syms.noModule) {
             preferCurrent = false;
             if (userPathsFirst) {
-                scanUserPaths(p);
+                scanUserPaths(p, true);
                 preferCurrent = true;
                 scanPlatformPath(p);
             } else {
                 scanPlatformPath(p);
-                scanUserPaths(p);
+                scanUserPaths(p, true);
             }
         } else if (msym.classLocation == StandardLocation.CLASS_PATH) {
-            // assert p.modle.sourceLocation == StandardLocation.SOURCE_PATH);
-            scanUserPaths(p);
+            scanUserPaths(p, msym.sourceLocation == StandardLocation.SOURCE_PATH);
         } else {
             scanModulePaths(p, msym);
         }
@@ -561,23 +553,6 @@
 
         String packageName = p.fullname.toString();
 
-        if (msym.name == moduleOverride) {
-            if (wantClassFiles) {
-                fillIn(p, CLASS_PATH,
-                       fileManager.list(CLASS_PATH,
-                                        packageName,
-                                        classKinds,
-                                        false));
-            }
-            if (wantSourceFiles && fileManager.hasLocation(SOURCE_PATH)) {
-                fillIn(p, SOURCE_PATH,
-                        fileManager.list(SOURCE_PATH,
-                                        packageName,
-                                        sourceKinds,
-                                        false));
-            }
-        }
-
         Location classLocn = msym.classLocation;
         Location sourceLocn = msym.sourceLocation;
 
@@ -600,7 +575,7 @@
     /**
      * Scans class path and source path for files in given package.
      */
-    private void scanUserPaths(PackageSymbol p) throws IOException {
+    private void scanUserPaths(PackageSymbol p, boolean includeSourcePath) throws IOException {
         Set<JavaFileObject.Kind> kinds = getPackageFileKinds();
 
         Set<JavaFileObject.Kind> classKinds = EnumSet.copyOf(kinds);
@@ -611,7 +586,7 @@
         sourceKinds.remove(JavaFileObject.Kind.CLASS);
         boolean wantSourceFiles = !sourceKinds.isEmpty();
 
-        boolean haveSourcePath = fileManager.hasLocation(SOURCE_PATH);
+        boolean haveSourcePath = includeSourcePath && fileManager.hasLocation(SOURCE_PATH);
 
         if (verbose && verbosePath) {
             if (fileManager instanceof StandardJavaFileManager) {
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
index d548081..ddd61d6 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Lint.java
@@ -166,6 +166,11 @@
         EMPTY("empty"),
 
         /**
+         * Warn about issues regarding module exports.
+         */
+        EXPORTS("exports"),
+
+        /**
          * Warn about falling through from one case of a switch statement to the next.
          */
         FALLTHROUGH("fallthrough"),
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
index 959d3ac..d99fbee 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java
@@ -359,6 +359,19 @@
         return (flags_field & DEPRECATED) != 0;
     }
 
+    public boolean isDeprecatableViaAnnotation() {
+        switch (getKind()) {
+            case LOCAL_VARIABLE:
+            case PACKAGE:
+            case PARAMETER:
+            case RESOURCE_VARIABLE:
+            case EXCEPTION_PARAMETER:
+                return false;
+            default:
+                return true;
+        }
+    }
+
     public boolean isStatic() {
         return
             (flags() & STATIC) != 0 ||
@@ -915,11 +928,6 @@
             return msym;
         }
 
-        public ModuleSymbol() {
-            super(MDL, 0, null, null, null);
-            this.type = new ModuleType(this);
-        }
-
         public ModuleSymbol(Name name, Symbol owner) {
             super(MDL, 0, name, null, owner);
             this.type = new ModuleType(this);
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
index 034ffda0..339fe48 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
@@ -27,6 +27,7 @@
 
 import java.util.Collection;
 import java.util.Collections;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -363,6 +364,17 @@
 
         // create the basic builtin symbols
         unnamedModule = new ModuleSymbol(names.empty, null) {
+                {
+                    directives = List.nil();
+                    exports = List.nil();
+                    provides = List.nil();
+                    uses = List.nil();
+                    ModuleSymbol java_base = enterModule(names.java_base);
+                    com.sun.tools.javac.code.Directive.RequiresDirective d =
+                            new com.sun.tools.javac.code.Directive.RequiresDirective(java_base,
+                                    EnumSet.of(com.sun.tools.javac.code.Directive.RequiresFlag.MANDATED));
+                    requires = List.of(d);
+                }
                 @Override
                 public String toString() {
                     return messages.getLocalizedString("compiler.misc.unnamed.module");
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
index 7e2f823..5767f9c 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java
@@ -3192,7 +3192,7 @@
     }
 
     void checkDeprecatedAnnotation(DiagnosticPosition pos, Symbol s) {
-        if (lint.isEnabled(LintCategory.DEP_ANN) &&
+        if (lint.isEnabled(LintCategory.DEP_ANN) && s.isDeprecatableViaAnnotation() &&
             (s.flags() & DEPRECATED) != 0 &&
             !syms.deprecatedType.isErroneous() &&
             s.attribute(syms.deprecatedType.tsym) == null) {
@@ -3200,18 +3200,10 @@
                     pos, "missing.deprecated.annotation");
         }
         // Note: @Deprecated has no effect on local variables, parameters and package decls.
-        if (lint.isEnabled(LintCategory.DEPRECATION)) {
+        if (lint.isEnabled(LintCategory.DEPRECATION) && !s.isDeprecatableViaAnnotation()) {
             if (!syms.deprecatedType.isErroneous() && s.attribute(syms.deprecatedType.tsym) != null) {
-                switch (s.getKind()) {
-                    case LOCAL_VARIABLE:
-                    case PACKAGE:
-                    case PARAMETER:
-                    case RESOURCE_VARIABLE:
-                    case EXCEPTION_PARAMETER:
-                        log.warning(LintCategory.DEPRECATION, pos,
-                                "deprecated.annotation.has.no.effect", Kinds.kindName(s));
-                        break;
-                }
+                log.warning(LintCategory.DEPRECATION, pos,
+                        "deprecated.annotation.has.no.effect", Kinds.kindName(s));
             }
         }
     }
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
index d24b795..8b8a037 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java
@@ -392,6 +392,7 @@
                             if (moduleOverride != null) {
                                 checkNoAllModulePath();
                                 defaultModule = moduleFinder.findModule(names.fromString(moduleOverride));
+                                defaultModule.sourceLocation = StandardLocation.SOURCE_PATH;
                             } else {
                                 // Question: why not do findAllModules and initVisiblePackages here?
                                 // i.e. body of unnamedModuleCompleter
@@ -432,7 +433,9 @@
 
             if (defaultModule != syms.unnamedModule) {
                 syms.unnamedModule.completer = getUnnamedModuleCompleter();
-                syms.unnamedModule.sourceLocation = StandardLocation.SOURCE_PATH;
+                if (moduleOverride == null) {
+                    syms.unnamedModule.sourceLocation = StandardLocation.SOURCE_PATH;
+                }
                 syms.unnamedModule.classLocation = StandardLocation.CLASS_PATH;
             }
 
@@ -1090,7 +1093,7 @@
         Set<ModuleSymbol> requiresPublic = requiresPublicCache.get(msym);
 
         if (requiresPublic == null) {
-            //the module graph may contain cycles involving automatic modules or -XaddReads edges
+            //the module graph may contain cycles involving automatic modules or --add-reads edges
             requiresPublic = new HashSet<>();
 
             Set<ModuleSymbol> seen = new HashSet<>();
@@ -1192,7 +1195,7 @@
             }
 
             // Terminology comes from
-            //  -XaddExports:module/package=target,...
+            //  --add-exports module/package=target,...
             // Compare to
             //  module module { exports package to target, ... }
             String moduleName = em.group(1);
@@ -1245,7 +1248,7 @@
             }
 
             // Terminology comes from
-            //  -XaddReads:target-module=source-module,...
+            //  --add-reads target-module=source-module,...
             // Compare to
             //  module target-module { requires source-module; ... }
             String targetName = rm.group(1);
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
index ef7f1ce..422f72f 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/Locations.java
@@ -810,7 +810,7 @@
      * SYSTEM_MODULES and MODULE_PATH.
      *
      * The Location can be specified to accept overriding classes from the
-     * {@code -Xpatch:<module>=<path> } parameter.
+     * {@code --patch-module <module>=<path> } parameter.
      */
     private class ModuleLocationHandler extends LocationHandler implements Location {
         protected final String name;
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java
index f20ff05..6d39408 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/main/Option.java
@@ -183,15 +183,15 @@
 
     SOURCE_PATH("--source-path -sourcepath", "opt.arg.path", "opt.sourcepath", STANDARD, FILEMANAGER),
 
-    MODULE_SOURCE_PATH("--module-source-path -modulesourcepath", "opt.arg.mspath", "opt.modulesourcepath", STANDARD, FILEMANAGER),
+    MODULE_SOURCE_PATH("--module-source-path", "opt.arg.mspath", "opt.modulesourcepath", STANDARD, FILEMANAGER),
 
-    MODULE_PATH("--module-path -p -modulepath -mp", "opt.arg.path", "opt.modulepath", STANDARD, FILEMANAGER),
+    MODULE_PATH("--module-path -p", "opt.arg.path", "opt.modulepath", STANDARD, FILEMANAGER),
 
-    UPGRADE_MODULE_PATH("--upgrade-module-path -upgrademodulepath", "opt.arg.path", "opt.upgrademodulepath", STANDARD, FILEMANAGER),
+    UPGRADE_MODULE_PATH("--upgrade-module-path", "opt.arg.path", "opt.upgrademodulepath", STANDARD, FILEMANAGER),
 
-    SYSTEM("--system -system", "opt.arg.jdk", "opt.system", STANDARD, FILEMANAGER),
+    SYSTEM("--system", "opt.arg.jdk", "opt.system", STANDARD, FILEMANAGER),
 
-    PATCH_MODULE("--patch-module -Xpatch:", "opt.arg.patch", "opt.patch", EXTENDED, FILEMANAGER) {
+    PATCH_MODULE("--patch-module", "opt.arg.patch", "opt.patch", EXTENDED, FILEMANAGER) {
         // The deferred filemanager diagnostics mechanism assumes a single value per option,
         // but --patch-module can be used multiple times, once per module. Therefore we compose
         // a value for the option containing the last value specified for each module, and separate
@@ -273,7 +273,7 @@
 
     PROCESSOR_PATH("--processor-path -processorpath", "opt.arg.path", "opt.processorpath", STANDARD, FILEMANAGER),
 
-    PROCESSOR_MODULE_PATH("--processor-module-path -processormodulepath", "opt.arg.path", "opt.processormodulepath", STANDARD, FILEMANAGER),
+    PROCESSOR_MODULE_PATH("--processor-module-path", "opt.arg.path", "opt.processormodulepath", STANDARD, FILEMANAGER),
 
     PARAMETERS("-parameters","opt.parameters", STANDARD, BASIC),
 
@@ -311,7 +311,7 @@
         }
     },
 
-    RELEASE("--release -release", "opt.arg.release", "opt.release", STANDARD, BASIC) {
+    RELEASE("--release", "opt.arg.release", "opt.release", STANDARD, BASIC) {
         @Override
         protected void help(Log log) {
             Iterable<PlatformProvider> providers =
@@ -566,7 +566,7 @@
         }
     },
 
-    ADD_EXPORTS("--add-exports -XaddExports:", "opt.arg.addExports", "opt.addExports", EXTENDED, BASIC) {
+    ADD_EXPORTS("--add-exports", "opt.arg.addExports", "opt.addExports", EXTENDED, BASIC) {
         @Override
         public boolean process(OptionHelper helper, String option, String arg) {
             String prev = helper.get(ADD_EXPORTS);
@@ -575,7 +575,7 @@
         }
     },
 
-    ADD_READS("--add-reads -XaddReads:", "opt.arg.addReads", "opt.addReads", EXTENDED, BASIC) {
+    ADD_READS("--add-reads", "opt.arg.addReads", "opt.addReads", EXTENDED, BASIC) {
         @Override
         public boolean process(OptionHelper helper, String option, String arg) {
             String prev = helper.get(ADD_READS);
@@ -598,9 +598,9 @@
 
     MODULE("--module -m", "opt.arg.m", "opt.m", STANDARD, BASIC),
 
-    ADD_MODULES("--add-modules -addmods", "opt.arg.addmods", "opt.addmods", STANDARD, BASIC),
+    ADD_MODULES("--add-modules", "opt.arg.addmods", "opt.addmods", STANDARD, BASIC),
 
-    LIMIT_MODULES("--limit-modules -limitmods", "opt.arg.limitmods", "opt.limitmods", STANDARD, BASIC),
+    LIMIT_MODULES("--limit-modules", "opt.arg.limitmods", "opt.limitmods", STANDARD, BASIC),
 
     // This option exists only for the purpose of documenting itself.
     // It's actually implemented by the CommandLine class.
@@ -645,7 +645,7 @@
         }
     },
 
-    MULTIRELEASE("--multi-release -multi-release", "opt.arg.multi-release", "opt.multi-release", HIDDEN, FILEMANAGER),
+    MULTIRELEASE("--multi-release", "opt.arg.multi-release", "opt.multi-release", HIDDEN, FILEMANAGER),
 
     INHERIT_RUNTIME_ENVIRONMENT("--inherit-runtime-environment", "opt.inherit_runtime_environment",
             EXTENDED, BASIC) {
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformDescription.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformDescription.java
index fa1fab0..4db3712 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformDescription.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformDescription.java
@@ -36,7 +36,7 @@
 
 import com.sun.source.util.Plugin;
 
-/**A description of settings needed for a particular {@code -release name} option.
+/**A description of settings needed for a particular {@code --release name} option.
  *
  *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformProvider.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformProvider.java
index db273a4..b552c6a 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformProvider.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/PlatformProvider.java
@@ -25,7 +25,7 @@
 
 package com.sun.tools.javac.platform;
 
-/** A collection of platform descriptions that can be selected using {@code -release name}
+/** A collection of platform descriptions that can be selected using {@code --release name}
  *  command line option.
  *  Register in {@code META-INF/services/com.sun.tools.javac.platform.PlatformProvider}.
  *
@@ -36,7 +36,7 @@
  */
 public interface PlatformProvider {
 
-    /**Names of platforms supported by this provider. Each returned name can be used as the key for -release.
+    /**Names of platforms supported by this provider. Each returned name can be used as the key for --release.
      *
      * @return the platform keys
      */
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/package-info.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/package-info.java
index f843a8a..d236ea1 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/package-info.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/platform/package-info.java
@@ -24,7 +24,7 @@
  */
 
 /**
- *  An internal API for plugging in -release implementations.
+ *  An internal API for plugging in --release implementations.
  *
  *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own risk.
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
index dcb7b2e..f46d344 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -2780,10 +2780,10 @@
     illegal combination of -Xmodule and module-info on classpath
 
 compiler.err.xmodule.no.module.sourcepath=\
-    illegal combination of -Xmodule and -modulesourcepath
+    illegal combination of -Xmodule and --module-source-path
 
 compiler.err.processorpath.no.processormodulepath=\
-    illegal combination of -processorpath and -processormodulepath
+    illegal combination of -processorpath and --processor-module-path
 
 # 0: symbol
 compiler.err.package.in.other.module=\
@@ -2817,22 +2817,22 @@
 
 # 0:  string
 compiler.err.xaddexports.malformed.entry=\
-    bad value for -XaddExports: {0}
+    bad value for --add-exports {0}
 
 # 0: string
 compiler.err.xaddexports.too.many=\
-    multiple -XaddExports options for {0}
+    multiple --add-exports options for {0}
 
 # 0:  string
 compiler.err.xaddreads.malformed.entry=\
-    bad value for -XaddReads: {0}
+    bad value for --add-reads {0}
 
 # 0: string
 compiler.err.xaddreads.too.many=\
-    multiple -XaddReads options for {0}
+    multiple --add-reads options for {0}
 
 compiler.err.addmods.all.module.path.invalid=\
-    -addmods ALL-MODULE-PATH can only be used when compiling the unnamed module
+    --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module
 
 compiler.misc.locn.module_source_path=\
     module source path
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
index 6d17bc7..44634e7 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
@@ -192,6 +192,9 @@
 javac.opt.Xlint.desc.empty=\
     Warn about empty statement after if.
 
+javac.opt.Xlint.desc.exports=\
+    Warn about issues regarding module exports.
+
 javac.opt.Xlint.desc.fallthrough=\
     Warn about falling through from one case of a switch statement to the next.
 
@@ -390,10 +393,10 @@
 javac.fullVersion={0} full version "{1}"
 
 javac.err.release.bootclasspath.conflict=\
-    option {0} cannot be used together with -release
+    option {0} cannot be used together with --release
 
 javac.err.unsupported.release.version=\
     release version {0} not supported
 
 javac.err.release.not.standard.file.manager=\
-    -release option specified, but the provided JavaFileManager is not a StandardJavaFileManager.
+    --release option specified, but the provided JavaFileManager is not a StandardJavaFileManager.
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java
index 6cdb8fc..1548134 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java
@@ -26,6 +26,8 @@
 package com.sun.tools.javac.util;
 
 import java.util.*;
+
+import com.sun.tools.javac.code.Source;
 import com.sun.tools.javac.main.Option;
 import static com.sun.tools.javac.main.Option.*;
 
@@ -176,7 +178,17 @@
         // disabled
         return
             isSet(XLINT_CUSTOM, s) ||
-            (isSet(XLINT) || isSet(XLINT_CUSTOM, "all")) &&
+            (isSet(XLINT) || isSet(XLINT_CUSTOM, "all") || (s.equals("dep-ann") && depAnnOnByDefault())) &&
                 isUnset(XLINT_CUSTOM, "-" + s);
     }
+        // where
+        private boolean depAnnOnByDefault() {
+            String sourceName = get(Option.SOURCE);
+            Source source = null;
+            if (sourceName != null)
+                source = Source.lookup(sourceName);
+            if (source == null)
+                source = Source.DEFAULT;
+            return source.compareTo(Source.JDK1_9) >= 0;
+        }
 }
diff --git a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Option.java b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Option.java
index fb07a4f..13df6ef 100644
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Option.java
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/options/Option.java
@@ -85,13 +85,7 @@
                 helper.modulepath(paths);
         }
     },
-    MODULEPATH("-modulepath", "An alias for -modulepath") {
-        @Override
-        protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
-            MODULE_PATH.processMatching(iter, helper);
-        }
-    },
-    P("-p", "An alias for -modulepath") {
+    P("-p", "An alias for --module-path") {
         @Override
         protected void processMatching(ArgumentIterator iter, OptionHelper helper) {
             MODULE_PATH.processMatching(iter, helper);
diff --git a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java
index 0838966..d3d7073 100644
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/main/ToolOption.java
@@ -104,13 +104,6 @@
         }
     },
 
-    MODULESOURCEPATH("-modulesourcepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.MODULE_SOURCE_PATH, arg);
-        }
-    },
-
     MODULE_SOURCE_PATH("--module-source-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -118,13 +111,6 @@
         }
     },
 
-    UPGRADEMODULEPATH("-upgrademodulepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.UPGRADE_MODULE_PATH, arg);
-        }
-    },
-
     UPGRADE_MODULE_PATH("--upgrade-module-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -132,13 +118,6 @@
         }
     },
 
-    SYSTEM("-system", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.SYSTEM, arg);
-        }
-    },
-
     SYSTEM_("--system", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -146,13 +125,6 @@
         }
     },
 
-    MODULEPATH("-modulepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.MODULE_PATH, arg);
-        }
-    },
-
     MODULE_PATH("--module-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -167,13 +139,6 @@
         }
     },
 
-    ADDMODS("-addmods", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setCompilerOpt(opt, arg);
-        }
-    },
-
     ADD_MODULES("--add-modules", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -181,13 +146,6 @@
         }
     },
 
-    LIMITMODS("-limitmods", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setCompilerOpt(opt, arg);
-        }
-    },
-
     LIMIT_MODULES("--limit-modules", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -210,13 +168,6 @@
         }
     },
 
-    RELEASE_OLD("-release", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setCompilerOpt("--release", arg);
-        }
-    },
-
     SOURCE("-source", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -238,13 +189,6 @@
         }
     },
 
-    XADDREADS("-XaddReads:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.ADD_READS.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     ADD_READS("--add-reads", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -252,13 +196,6 @@
         }
     },
 
-    ADDEXPORTS("-XaddExports:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.ADD_EXPORTS.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     ADD_EXPORTS("--add-exports", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -273,13 +210,6 @@
         }
     },
 
-    XPATCH("-Xpatch:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.XMODULE.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     PATCH_MODULE("--patch-module", true) {
         @Override
         public void process(Helper helper, String arg) {
diff --git a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java
index fd07699..0f5cf65 100644
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java
@@ -106,13 +106,6 @@
         }
     },
 
-    MODULESOURCEPATH("-modulesourcepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.MODULE_SOURCE_PATH, arg);
-        }
-    },
-
     MODULE_SOURCE_PATH("--module-source-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -120,13 +113,6 @@
         }
     },
 
-    UPGRADEMODULEPATH("-upgrademodulepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.UPGRADE_MODULE_PATH, arg);
-        }
-    },
-
     UPGRADE_MODULE_PATH("--upgrade-module-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -134,27 +120,13 @@
         }
     },
 
-    SYSTEM("-system", true) {
+    SYSTEM("--system", true) {
         @Override
         public void process(Helper helper, String arg) {
             helper.setFileManagerOpt(Option.SYSTEM, arg);
         }
     },
 
-    SYSTEM_("--system", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.SYSTEM, arg);
-        }
-    },
-
-    MODULEPATH("-modulepath", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            helper.setFileManagerOpt(Option.MODULE_PATH, arg);
-        }
-    },
-
     MODULE_PATH("--module-path", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -169,13 +141,6 @@
         }
     },
 
-    ADDMODS("-addmods", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.ADD_MODULES.process(helper.getOptionHelper(), opt, arg);
-        }
-    },
-
     ADD_MODULES("--add-modules", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -183,13 +148,6 @@
         }
     },
 
-    LIMITMODS("-limitmods", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.LIMIT_MODULES.process(helper.getOptionHelper(), opt, arg);
-        }
-    },
-
     LIMIT_MODULES("--limit-modules", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -218,13 +176,6 @@
         }
     },
 
-    RELEASE_OLD("-release", true) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.RELEASE.process(helper.getOptionHelper(), opt, arg);
-        }
-    },
-
     SOURCE("-source", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -246,13 +197,6 @@
         }
     },
 
-    XADDREADS("-XaddReads:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.ADD_READS.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     ADD_READS("--add-reads", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -260,13 +204,6 @@
         }
     },
 
-    ADDEXPORTS("-XaddExports:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.ADD_EXPORTS.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     ADD_EXPORTS("--add-exports", true) {
         @Override
         public void process(Helper helper, String arg) {
@@ -281,13 +218,6 @@
         }
     },
 
-    XPATCH("-Xpatch:", false) {
-        @Override
-        public void process(Helper helper, String arg) {
-            Option.XMODULE.process(helper.getOptionHelper(), arg);
-        }
-    },
-
     PATCH_MODULE("--patch-module", true) {
         @Override
         public void process(Helper helper, String arg) {
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
index 28d4b33..3a02498 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java
@@ -81,7 +81,7 @@
  *  - more rigorous GNU style option parsing; use joptsimple?
  *
  * FUTURES:
- *  - add module support: -addmods, -modulepath, module arg
+ *  - add module support: --add-modules, --module-path, module arg
  *  - load deprecation declarations from a designated class library instead
  *    of the JDK
  *  - load deprecation declarations from a module
@@ -181,7 +181,7 @@
                      .filter(name -> !name.endsWith("package-info.class"))
                      .filter(name -> !name.endsWith("module-info.class"))
                      .map(s -> s.replaceAll("\\.class$", ""))
-                     .map(s -> s.replace('/', '.'))
+                     .map(s -> s.replace(File.separatorChar, '.'))
                      .collect(toList()));
     }
 
@@ -331,7 +331,7 @@
      * @throws IOException if an I/O error occurs
      */
     boolean processSelf(Collection<String> classes) throws IOException {
-        options.add("-addmods");
+        options.add("--add-modules");
         options.add("java.se.ee,jdk.xml.bind"); // TODO why jdk.xml.bind?
 
         if (classes.isEmpty()) {
@@ -360,7 +360,7 @@
      * @return success value
      */
     boolean processRelease(String release, Collection<String> classes) throws IOException {
-        options.addAll(List.of("-release", release));
+        options.addAll(List.of("--release", release));
 
         if (release.equals("9")) {
             List<String> rootMods = List.of("java.se", "java.se.ee");
@@ -368,7 +368,7 @@
             JavaCompiler.CompilationTask task =
                 compiler.getTask(null, fm, this,
                                  // options
-                                 List.of("-addmods", String.join(",", rootMods)),
+                                 List.of("--add-modules", String.join(",", rootMods)),
                                  // classes
                                  List.of("java.lang.Object"),
                                  null);
@@ -377,7 +377,7 @@
                 return false;
             }
             Map<PackageElement, List<TypeElement>> types = proc.getPublicTypes();
-            options.add("-addmods");
+            options.add("--add-modules");
             options.add(String.join(",", rootMods));
             return doClassNames(
                 types.values().stream()
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/DepsAnalyzer.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/DepsAnalyzer.java
index 128e2ea..2975813 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/DepsAnalyzer.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/DepsAnalyzer.java
@@ -56,7 +56,7 @@
  * 1. archives specified in the command line arguments
  * 2. observable modules matching the source filter
  * 3. classpath archives matching the source filter or target filter
- * 4. -addmods and -m root modules
+ * 4. --add-modules and -m root modules
  */
 public class DepsAnalyzer {
     final JdepsConfiguration configuration;
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java
index 2975651e..3c4632a 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsConfiguration.java
@@ -127,7 +127,7 @@
             }
         }
 
-        // all roots specified in -addmods or -m are included
+        // all roots specified in --add-modules or -m are included
         // as the initial set for analysis.
         roots.stream()
              .map(nameToModule::get)
@@ -342,7 +342,7 @@
 
         SystemModuleFinder(String javaHome) throws IOException {
             if (javaHome == null) {
-                // -system none
+                // --system none
                 this.fileSystem = null;
                 this.root = null;
                 this.systemModules = Collections.emptyMap();
diff --git a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java
index 2cdca8b..38e1d08 100644
--- a/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java
+++ b/langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/JdepsTask.java
@@ -313,7 +313,7 @@
             }
         },
 
-        // Another alternative to list modules in -addmods option
+        // Another alternative to list modules in --add-modules option
         new HiddenOption(true, "--include-system-modules") {
             void process(JdepsTask task, String opt, String arg) throws BadArgs {
                 task.options.includeSystemModulePattern = Pattern.compile(arg);
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
index ca47511..b4df8ef 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java
@@ -57,6 +57,8 @@
 import jdk.internal.jline.console.KeyMap;
 import jdk.internal.jline.console.UserInterruptException;
 import jdk.internal.jline.console.completer.Completer;
+import jdk.internal.jline.console.history.History;
+import jdk.internal.jline.console.history.MemoryHistory;
 import jdk.internal.jline.extra.EditingHistory;
 import jdk.internal.jshell.tool.StopDetectingInputStream.State;
 
@@ -68,6 +70,7 @@
     final StopDetectingInputStream input;
     final ConsoleReader in;
     final EditingHistory history;
+    final MemoryHistory userInputHistory = new MemoryHistory();
 
     String prefix = "";
 
@@ -299,6 +302,9 @@
     }
 
     public void beforeUserCode() {
+        synchronized (this) {
+            inputBytes = null;
+        }
         input.setState(State.BUFFER);
     }
 
@@ -380,6 +386,36 @@
         }
     }
 
+    private byte[] inputBytes;
+    private int inputBytesPointer;
+
+    @Override
+    public synchronized int readUserInput() {
+        while (inputBytes == null || inputBytes.length <= inputBytesPointer) {
+            boolean prevHandleUserInterrupt = in.getHandleUserInterrupt();
+            History prevHistory = in.getHistory();
+
+            try {
+                input.setState(State.WAIT);
+                in.setHandleUserInterrupt(true);
+                in.setHistory(userInputHistory);
+                inputBytes = (in.readLine("") + System.getProperty("line.separator")).getBytes();
+                inputBytesPointer = 0;
+            } catch (IOException ex) {
+                ex.printStackTrace();
+                return -1;
+            } catch (UserInterruptException ex) {
+                repl.state.stop();
+                return -1;
+            } finally {
+                in.setHistory(prevHistory);
+                in.setHandleUserInterrupt(prevHandleUserInterrupt);
+                input.setState(State.BUFFER);
+            }
+        }
+        return inputBytes[inputBytesPointer++];
+    }
+
     /**
      * A possible action which the user can choose to perform.
      */
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ContinuousCompletionProvider.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ContinuousCompletionProvider.java
new file mode 100644
index 0000000..0fc6f6c
--- /dev/null
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ContinuousCompletionProvider.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.internal.jshell.tool;
+
+import java.util.List;
+import static java.util.Comparator.comparing;
+import java.util.Map;
+import java.util.function.BiPredicate;
+import java.util.function.Supplier;
+import static java.util.stream.Collectors.toList;
+import java.util.stream.Stream;
+import jdk.internal.jshell.tool.JShellTool.CompletionProvider;
+import jdk.jshell.SourceCodeAnalysis;
+import jdk.jshell.SourceCodeAnalysis.Suggestion;
+
+class ContinuousCompletionProvider implements CompletionProvider {
+
+    static final BiPredicate<String, String> STARTSWITH_MATCHER =
+            (word, input) -> word.startsWith(input);
+    static final BiPredicate<String, String> PERFECT_MATCHER =
+            (word, input) -> word.equals(input);
+
+    private final Supplier<Map<String, CompletionProvider>> wordCompletionProviderSupplier;
+    private final BiPredicate<String, String> matcher;
+
+    ContinuousCompletionProvider(
+            Map<String, CompletionProvider> wordCompletionProvider,
+            BiPredicate<String, String> matcher) {
+        this(() -> wordCompletionProvider, matcher);
+    }
+
+    ContinuousCompletionProvider(
+            Supplier<Map<String, CompletionProvider>> wordCompletionProviderSupplier,
+            BiPredicate<String, String> matcher) {
+        this.wordCompletionProviderSupplier = wordCompletionProviderSupplier;
+        this.matcher = matcher;
+    }
+
+    @Override
+    public List<Suggestion> completionSuggestions(String input, int cursor, int[] anchor) {
+        String prefix = input.substring(0, cursor);
+        int space = prefix.indexOf(' ');
+
+        Stream<SourceCodeAnalysis.Suggestion> result;
+
+        Map<String, CompletionProvider> wordCompletionProvider = wordCompletionProviderSupplier.get();
+
+        if (space == (-1)) {
+            result = wordCompletionProvider.keySet().stream()
+                    .distinct()
+                    .filter(key -> key.startsWith(prefix))
+                    .map(key -> new JShellTool.ArgSuggestion(key + " "));
+            anchor[0] = 0;
+        } else {
+            String rest = prefix.substring(space + 1);
+            String word = prefix.substring(0, space);
+
+            List<CompletionProvider> candidates = wordCompletionProvider.entrySet().stream()
+                    .filter(e -> matcher.test(e.getKey(), word))
+                    .map(Map.Entry::getValue)
+                    .collect(toList());
+            if (candidates.size() == 1) {
+                result = candidates.get(0).completionSuggestions(rest, cursor - space - 1, anchor).stream();
+            } else {
+                result = Stream.empty();
+            }
+            anchor[0] += space + 1;
+        }
+
+        return result.sorted(comparing(Suggestion::continuation))
+                     .collect(toList());
+    }
+
+}
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java
index 7f78c2f..b6d97b3 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java
@@ -35,9 +35,14 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toMap;
+import static jdk.internal.jshell.tool.ContinuousCompletionProvider.PERFECT_MATCHER;
+import jdk.internal.jshell.tool.JShellTool.CompletionProvider;
+import static jdk.internal.jshell.tool.JShellTool.EMPTY_COMPLETION_PROVIDER;
 
 /**
  * Feedback customization support
@@ -146,6 +151,17 @@
                 .forEach(m -> m.readOnly = true);
     }
 
+    JShellTool.CompletionProvider modeCompletions() {
+        return modeCompletions(EMPTY_COMPLETION_PROVIDER);
+    }
+
+    JShellTool.CompletionProvider modeCompletions(CompletionProvider successor) {
+        return new ContinuousCompletionProvider(
+                () -> modeMap.keySet().stream()
+                        .collect(toMap(Function.identity(), m -> successor)),
+                PERFECT_MATCHER);
+    }
+
     {
         for (FormatCase e : FormatCase.all)
             selectorMap.put(e.name().toLowerCase(Locale.US), e);
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java
index 8f8606f..4f4a51a4 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/IOContext.java
@@ -54,6 +54,8 @@
 
     public abstract void replaceLastHistoryEntry(String source);
 
+    public abstract int readUserInput();
+
     class InputInterruptedException extends Exception {
         private static final long serialVersionUID = 1L;
     }
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
index fa83c0f..2031324 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
@@ -26,7 +26,6 @@
 package jdk.internal.jshell.tool;
 
 import java.io.BufferedWriter;
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
@@ -112,6 +111,7 @@
 import static jdk.internal.jshell.debug.InternalDebugControl.DBG_EVNT;
 import static jdk.internal.jshell.debug.InternalDebugControl.DBG_FMGR;
 import static jdk.internal.jshell.debug.InternalDebugControl.DBG_GEN;
+import static jdk.internal.jshell.tool.ContinuousCompletionProvider.STARTSWITH_MATCHER;
 
 /**
  * Command line REPL tool for Java using the JShell API.
@@ -141,11 +141,30 @@
     /**
      * The constructor for the tool (used by tool launch via main and by test
      * harnesses to capture ins and outs.
+     * @param in command line input -- snippets, commands and user input
+     * @param cmdout command line output, feedback including errors
+     * @param cmderr start-up errors and debugging info
+     * @param console console control interaction
+     * @param userout code execution output  -- System.out.printf("hi")
+     * @param usererr code execution error stream  -- System.err.printf("Oops")
+     * @param prefs preferences to use
+     * @param locale locale to use
+     */
+    public JShellTool(InputStream in, PrintStream cmdout, PrintStream cmderr,
+            PrintStream console,
+            PrintStream userout, PrintStream usererr,
+            Preferences prefs, Locale locale) {
+        this(in, cmdout, cmderr, console, null, userout, usererr, prefs, locale);
+    }
+
+    /**
+     * The constructor for the tool (used by tool launch via main and by test
+     * harnesses to capture ins and outs.
      * @param cmdin command line input -- snippets and commands
      * @param cmdout command line output, feedback including errors
      * @param cmderr start-up errors and debugging info
      * @param console console control interaction
-     * @param userin code execution input (not yet functional)
+     * @param userin code execution input, or null to use IOContext
      * @param userout code execution output  -- System.out.printf("hi")
      * @param usererr code execution error stream  -- System.err.printf("Oops")
      * @param prefs preferences to use
@@ -159,7 +178,12 @@
         this.cmdout = cmdout;
         this.cmderr = cmderr;
         this.console = console;
-        this.userin = userin;
+        this.userin = userin != null ? userin : new InputStream() {
+            @Override
+            public int read() throws IOException {
+                return input.readUserInput();
+            }
+        };
         this.userout = userout;
         this.usererr = usererr;
         this.prefs = prefs;
@@ -451,7 +475,7 @@
      */
     public static void main(String[] args) throws Exception {
         new JShellTool(System.in, System.out, System.err, System.out,
-                 new ByteArrayInputStream(new byte[0]), System.out, System.err,
+                 System.out, System.err,
                  Preferences.userRoot().node("tool/JShell"),
                  Locale.getDefault())
                 .start(args);
@@ -909,6 +933,7 @@
 
     interface CompletionProvider {
         List<Suggestion> completionSuggestions(String input, int cursor, int[] anchor);
+
     }
 
     enum CommandKind {
@@ -953,14 +978,31 @@
 
     }
 
-    private static final CompletionProvider EMPTY_COMPLETION_PROVIDER = new FixedCompletionProvider();
+    static final CompletionProvider EMPTY_COMPLETION_PROVIDER = new FixedCompletionProvider();
     private static final CompletionProvider KEYWORD_COMPLETION_PROVIDER = new FixedCompletionProvider("-all ", "-start ", "-history ");
     private static final CompletionProvider RELOAD_OPTIONS_COMPLETION_PROVIDER = new FixedCompletionProvider("-restore", "-quiet");
+    private static final CompletionProvider SET_MODE_OPTIONS_COMPLETION_PROVIDER = new FixedCompletionProvider("-command", "-quiet", "-delete");
     private static final CompletionProvider FILE_COMPLETION_PROVIDER = fileCompletions(p -> true);
     private final Map<String, Command> commands = new LinkedHashMap<>();
     private void registerCommand(Command cmd) {
         commands.put(cmd.command, cmd);
     }
+
+    private static CompletionProvider skipWordThenCompletion(CompletionProvider completionProvider) {
+        return (input, cursor, anchor) -> {
+            List<Suggestion> result = Collections.emptyList();
+
+            int space = input.indexOf(' ');
+            if (space != -1) {
+                String rest = input.substring(space + 1);
+                result = completionProvider.completionSuggestions(rest, cursor - space - 1, anchor);
+                anchor[0] += space + 1;
+            }
+
+            return result;
+        };
+    }
+
     private static CompletionProvider fileCompletions(Predicate<Path> accept) {
         return (code, cursor, anchor) -> {
             int lastSlash = code.lastIndexOf('/');
@@ -1037,6 +1079,31 @@
         };
     }
 
+    private static CompletionProvider orMostSpecificCompletion(
+            CompletionProvider left, CompletionProvider right) {
+        return (code, cursor, anchor) -> {
+            int[] leftAnchor = {-1};
+            int[] rightAnchor = {-1};
+
+            List<Suggestion> leftSuggestions = left.completionSuggestions(code, cursor, leftAnchor);
+            List<Suggestion> rightSuggestions = right.completionSuggestions(code, cursor, rightAnchor);
+
+            List<Suggestion> suggestions = new ArrayList<>();
+
+            if (leftAnchor[0] >= rightAnchor[0]) {
+                anchor[0] = leftAnchor[0];
+                suggestions.addAll(leftSuggestions);
+            }
+
+            if (leftAnchor[0] <= rightAnchor[0]) {
+                anchor[0] = rightAnchor[0];
+                suggestions.addAll(rightSuggestions);
+            }
+
+            return suggestions;
+        };
+    }
+
     // Snippet lists
 
     Stream<Snippet> allSnippets() {
@@ -1123,10 +1190,26 @@
                 EMPTY_COMPLETION_PROVIDER));
         registerCommand(new Command("/set",
                 arg -> cmdSet(arg),
-                new FixedCompletionProvider(SET_SUBCOMMANDS)));
+                new ContinuousCompletionProvider(Map.of(
+                        // need more completion for format for usability
+                        "format", feedback.modeCompletions(),
+                        "truncation", feedback.modeCompletions(),
+                        "feedback", feedback.modeCompletions(),
+                        "mode", skipWordThenCompletion(orMostSpecificCompletion(
+                                feedback.modeCompletions(SET_MODE_OPTIONS_COMPLETION_PROVIDER),
+                                SET_MODE_OPTIONS_COMPLETION_PROVIDER)),
+                        "prompt", feedback.modeCompletions(),
+                        "editor", fileCompletions(Files::isExecutable),
+                        "start", FILE_COMPLETION_PROVIDER),
+                        STARTSWITH_MATCHER)));
         registerCommand(new Command("/retain",
                 arg -> cmdRetain(arg),
-                new FixedCompletionProvider(RETAIN_SUBCOMMANDS)));
+                new ContinuousCompletionProvider(Map.of(
+                        "feedback", feedback.modeCompletions(),
+                        "mode", feedback.modeCompletions(),
+                        "editor", fileCompletions(Files::isExecutable),
+                        "start", FILE_COMPLETION_PROVIDER),
+                        STARTSWITH_MATCHER)));
         registerCommand(new Command("/?",
                 "help.quest",
                 arg -> cmdHelp(arg),
@@ -1151,36 +1234,18 @@
         registerCommand(new Command("shortcuts",
                 "help.shortcuts",
                 CommandKind.HELP_SUBJECT));
+
+        commandCompletions = new ContinuousCompletionProvider(
+                commands.values().stream()
+                        .filter(c -> c.kind.shouldSuggestCompletions)
+                        .collect(toMap(c -> c.command, c -> c.completions)),
+                STARTSWITH_MATCHER);
     }
 
+    private ContinuousCompletionProvider commandCompletions;
+
     public List<Suggestion> commandCompletionSuggestions(String code, int cursor, int[] anchor) {
-        String prefix = code.substring(0, cursor);
-        int space = prefix.indexOf(' ');
-        Stream<Suggestion> result;
-
-        if (space == (-1)) {
-            result = commands.values()
-                             .stream()
-                             .distinct()
-                             .filter(cmd -> cmd.kind.shouldSuggestCompletions)
-                             .map(cmd -> cmd.command)
-                             .filter(key -> key.startsWith(prefix))
-                             .map(key -> new ArgSuggestion(key + " "));
-            anchor[0] = 0;
-        } else {
-            String arg = prefix.substring(space + 1);
-            String cmd = prefix.substring(0, space);
-            Command[] candidates = findCommand(cmd, c -> true);
-            if (candidates.length == 1) {
-                result = candidates[0].completions.completionSuggestions(arg, cursor - space, anchor).stream();
-                anchor[0] += space + 1;
-            } else {
-                result = Stream.empty();
-            }
-        }
-
-        return result.sorted((s1, s2) -> s1.continuation().compareTo(s2.continuation()))
-                     .collect(Collectors.toList());
+        return commandCompletions.completionSuggestions(code, cursor, anchor);
     }
 
     public String commandDocumentation(String code, int cursor) {
@@ -2484,7 +2549,7 @@
         }
     }
 
-    private static class ArgSuggestion implements Suggestion {
+    static class ArgSuggestion implements Suggestion {
 
         private final String continuation;
 
@@ -2579,6 +2644,11 @@
     public void close() {
         scannerIn.close();
     }
+
+    @Override
+    public int readUserInput() {
+        return -1;
+    }
 }
 
 class FileScannerIOContext extends ScannerIOContext {
@@ -2617,4 +2687,9 @@
     @Override
     public void close() {
     }
+
+    @Override
+    public int readUserInput() {
+        return -1;
+    }
 }
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java
index 10a0069..c652b45 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/CompletenessAnalyzer.java
@@ -46,6 +46,8 @@
 import static jdk.jshell.CompletenessAnalyzer.TK.*;
 import jdk.jshell.TaskFactory.ParseTask;
 import java.util.List;
+import java.util.function.Function;
+import java.util.function.Supplier;
 
 /**
  * Low level scanner to determine completeness of input.
@@ -81,13 +83,13 @@
 
     CaInfo scan(String s) {
         try {
-            Scanner scanner = scannerFactory.newScanner(s, false);
-            Matched in = new Matched(scanner);
-            Parser parser = new Parser(in, proc, s);
+            Parser parser = new Parser(
+                    () -> new Matched(scannerFactory.newScanner(s, false)),
+                    () -> proc.taskFactory.new ParseTask(s));
             Completeness stat = parser.parseUnit();
             int endPos = stat == Completeness.UNKNOWN
                     ? s.length()
-                    : in.prevCT.endPos;
+                    : parser.endPos();
             return new CaInfo(stat, endPos);
         } catch (SyntaxException ex) {
             return new CaInfo(error(), s.length());
@@ -188,7 +190,7 @@
         ERROR(TokenKind.ERROR, XERRO),  //
         IDENTIFIER(TokenKind.IDENTIFIER, XEXPR1|XDECL1|XTERM),  //
         UNDERSCORE(TokenKind.UNDERSCORE, XERRO),  //  _
-        CLASS(TokenKind.CLASS, XEXPR|XDECL1|XTERM),  //  class decl and .class
+        CLASS(TokenKind.CLASS, XEXPR|XDECL1),  //  class decl (MAPPED: DOTCLASS)
         MONKEYS_AT(TokenKind.MONKEYS_AT, XEXPR|XDECL1),  //  @
         IMPORT(TokenKind.IMPORT, XDECL1|XSTART),  //  import -- consider declaration
         SEMI(TokenKind.SEMI, XSTMT1|XTERM|XSTART),  //  ;
@@ -206,15 +208,15 @@
         THROWS(TokenKind.THROWS, XDECL),  //  throws
 
         // Primarive type names
-        BOOLEAN(TokenKind.BOOLEAN, XEXPR|XDECL1),  //  boolean
-        BYTE(TokenKind.BYTE, XEXPR|XDECL1),  //  byte
-        CHAR(TokenKind.CHAR, XEXPR|XDECL1),  //  char
-        DOUBLE(TokenKind.DOUBLE, XEXPR|XDECL1),  //  double
-        FLOAT(TokenKind.FLOAT, XEXPR|XDECL1),  //  float
-        INT(TokenKind.INT, XEXPR|XDECL1),  //  int
-        LONG(TokenKind.LONG, XEXPR|XDECL1),  //  long
-        SHORT(TokenKind.SHORT, XEXPR|XDECL1),  //  short
-        VOID(TokenKind.VOID, XEXPR|XDECL1),  //  void
+        BOOLEAN(TokenKind.BOOLEAN, XEXPR1|XDECL1),  //  boolean
+        BYTE(TokenKind.BYTE, XEXPR1|XDECL1),  //  byte
+        CHAR(TokenKind.CHAR, XEXPR1|XDECL1),  //  char
+        DOUBLE(TokenKind.DOUBLE, XEXPR1|XDECL1),  //  double
+        FLOAT(TokenKind.FLOAT, XEXPR1|XDECL1),  //  float
+        INT(TokenKind.INT, XEXPR1|XDECL1),  //  int
+        LONG(TokenKind.LONG, XEXPR1|XDECL1),  //  long
+        SHORT(TokenKind.SHORT, XEXPR1|XDECL1),  //  short
+        VOID(TokenKind.VOID, XEXPR1|XDECL1),  //  void
 
         // Modifiers keywords
         ABSTRACT(TokenKind.ABSTRACT, XDECL1),  //  abstract
@@ -230,7 +232,7 @@
 
         // Declarations and type parameters (thus expressions)
         EXTENDS(TokenKind.EXTENDS, XEXPR|XDECL),  //  extends
-        COMMA(TokenKind.COMMA, XEXPR|XDECL),  //  ,
+        COMMA(TokenKind.COMMA, XEXPR|XDECL|XTERM),  //  ,
         AMP(TokenKind.AMP, XEXPR|XDECL),  //  &
         GT(TokenKind.GT, XEXPR|XDECL),  //  >
         LT(TokenKind.LT, XEXPR|XDECL1),  //  <
@@ -239,7 +241,7 @@
         GTGTGT(TokenKind.GTGTGT, XEXPR|XDECL),  //  >>>
         QUES(TokenKind.QUES, XEXPR|XDECL),  //  ?
         DOT(TokenKind.DOT, XEXPR|XDECL),  //  .
-        STAR(TokenKind.STAR, XEXPR|XDECL|XTERM),  //  * -- import foo.* //TODO handle these case separately, XTERM
+        STAR(TokenKind.STAR, XEXPR),  //  * (MAPPED: DOTSTAR)
 
         // Statement keywords
         ASSERT(TokenKind.ASSERT, XSTMT1|XSTART),  //  assert
@@ -280,7 +282,7 @@
 
         // Expressions cannot terminate
         INSTANCEOF(TokenKind.INSTANCEOF, XEXPR),  //  instanceof
-        NEW(TokenKind.NEW, XEXPR1),  //  new
+        NEW(TokenKind.NEW, XEXPR1),  //  new (MAPPED: COLCOLNEW)
         SUPER(TokenKind.SUPER, XEXPR1|XDECL),  //  super -- shouldn't see as rec. But in type parameters
         ARROW(TokenKind.ARROW, XEXPR),  //  ->
         COLCOL(TokenKind.COLCOL, XEXPR),  //  ::
@@ -323,24 +325,29 @@
         UNMATCHED(XERRO),
         PARENS(XEXPR1|XDECL|XSTMT|XTERM),
         BRACKETS(XEXPR|XDECL|XTERM),
-        BRACES(XSTMT1|XEXPR|XTERM);
+        BRACES(XSTMT1|XEXPR|XTERM),
+        DOTSTAR(XDECL|XTERM),  // import foo.*
+        COLCOLNEW(XEXPR|XTERM),  //  :: new
+        DOTCLASS(XEXPR|XTERM),  //  class decl and .class
+        ;
 
         static final EnumMap<TokenKind,TK> tokenKindToTKMap = new EnumMap<>(TokenKind.class);
 
         final TokenKind tokenKind;
         final int belongs;
+        Function<TK,TK> mapping;
 
         TK(int b) {
-            this.tokenKind = null;
-            this.belongs = b;
+            this(null, b);
         }
 
         TK(TokenKind tokenKind, int b) {
             this.tokenKind = tokenKind;
             this.belongs = b;
+            this.mapping = null;
         }
 
-        private static TK tokenKindToTK(TokenKind kind) {
+        private static TK tokenKindToTK(TK prev, TokenKind kind) {
             TK tk = tokenKindToTKMap.get(kind);
             if (tk == null) {
                 System.err.printf("No corresponding %s for %s: %s\n",
@@ -349,7 +356,9 @@
                         kind);
                 throw new InternalError("No corresponding TK for TokenKind: " + kind);
             }
-            return tk;
+            return tk.mapping != null
+                    ? tk.mapping.apply(prev)
+                    : tk;
         }
 
         boolean isOkToTerminate() {
@@ -383,8 +392,12 @@
                 }
             }
             for (TokenKind kind : TokenKind.values()) {
-                tokenKindToTK(kind); // assure they can be retrieved without error
+                tokenKindToTK(null, kind); // assure they can be retrieved without error
             }
+            // Mappings of disambiguated contexts
+            STAR.mapping  = prev -> prev == DOT ? DOTSTAR : STAR;
+            NEW.mapping   = prev -> prev == COLCOL ? COLCOLNEW : NEW;
+            CLASS.mapping = prev -> prev == DOT ? DOTCLASS : CLASS;
         }
     }
 
@@ -520,7 +533,7 @@
                         ct = match(BRACKETS, TokenKind.LBRACKET);
                         break;
                     default:
-                        ct = new CT(TK.tokenKindToTK(current.kind), advance());
+                        ct = new CT(TK.tokenKindToTK(prevTK, current.kind), advance());
                         break;
                 }
                 if (ct.kind.isStart() && !prevTK.isOkToTerminate()) {
@@ -539,21 +552,21 @@
      */
     private static class Parser {
 
-        final Matched in;
-        CT token;
-        Completeness checkResult;
+        private final Supplier<Matched> matchedFactory;
+        private final Supplier<ParseTask> parseFactory;
+        private Matched in;
+        private CT token;
+        private Completeness checkResult;
 
-        final JShell proc;
-        final String scannedInput;
+        Parser(Supplier<Matched> matchedFactory, Supplier<ParseTask> parseFactory) {
+            this.matchedFactory = matchedFactory;
+            this.parseFactory = parseFactory;
+            resetInput();
+        }
 
-
-
-        Parser(Matched in, JShell proc, String scannedInput) {
-            this.in = in;
+        final void resetInput() {
+            this.in = matchedFactory.get();
             nextToken();
-
-            this.proc = proc;
-            this.scannedInput = scannedInput;
         }
 
         final void nextToken() {
@@ -598,6 +611,10 @@
             return flags != Completeness.COMPLETE;
         }
 
+        public int endPos() {
+            return in.prevCT.endPos;
+        }
+
         public Completeness parseUnit() {
             //System.err.printf("%s:  belongs %o  XANY1 %o\n", token.kind, token.kind.belongs, token.kind.belongs & XANY1);
             switch (token.kind.belongs & XANY1) {
@@ -651,11 +668,11 @@
                         case IDENTIFIER:
                         case BRACKETS:
                             return Completeness.COMPLETE_WITH_SEMI;
-                        case STAR:
+                        case DOTSTAR:
                             if (isImport) {
                                 return Completeness.COMPLETE_WITH_SEMI;
                             } else {
-                                return Completeness.DEFINITELY_INCOMPLETE;
+                                return Completeness.UNKNOWN;
                             }
                         default:
                             return Completeness.DEFINITELY_INCOMPLETE;
@@ -667,7 +684,7 @@
 
         public Completeness disambiguateDeclarationVsExpression() {
             // String folding messes up position information.
-            ParseTask pt = proc.taskFactory.new ParseTask(scannedInput);
+            ParseTask pt = parseFactory.get();
             List<? extends Tree> units = pt.units();
             if (units.isEmpty()) {
                 return error();
@@ -679,7 +696,7 @@
                 case LABELED_STATEMENT:
                     if (shouldAbort(IDENTIFIER))  return checkResult;
                     if (shouldAbort(COLON))  return checkResult;
-                    return parseStatement();
+                return parseStatement();
                 case VARIABLE:
                 case IMPORT:
                 case CLASS:
@@ -693,51 +710,6 @@
             }
         }
 
-//        public Status parseExpressionOrDeclaration() {
-//            if (token.kind == IDENTIFIER) {
-//                nextToken();
-//                switch (token.kind) {
-//                    case IDENTIFIER:
-//                        return parseDeclaration();
-//                }
-//            }
-//            while (token.kind.isExpressionOrDeclaration()) {
-//                if (!token.kind.isExpression()) {
-//                    return parseDeclaration();
-//                }
-//                if (!token.kind.isDeclaration()) {
-//                    // Expression not declaration
-//                    if (token.kind == EQ) {
-//                        // Check for array initializer
-//                        nextToken();
-//                        if (token.kind == BRACES) {
-//                            nextToken();
-//                            return lastly(SEMI);
-//                        }
-//                    }
-//                    return parseExpressionStatement();
-//                }
-//                nextToken();
-//            }
-//            switch (token.kind) {
-//                case BRACES:
-//                case SEMI:
-//                    nextToken();
-//                    return Status.COMPLETE;
-//                case UNMATCHED:
-//                    nextToken();
-//                    return Status.DEFINITELY_INCOMPLETE;
-//                case EOF:
-//                    if (in.prevCT.kind.isOkToTerminate()) {
-//                        return Status.COMPLETE_WITH_SEMI;
-//                    } else {
-//                        return Status.DEFINITELY_INCOMPLETE;
-//                    }
-//                default:
-//                    return error();
-//            }
-//        }
-
         public Completeness parseExpressionStatement() {
             if (shouldAbort(parseExpression()))  return checkResult;
             return lastly(SEMI);
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java
index 87f8d5a..79b8b22 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/Eval.java
@@ -555,9 +555,11 @@
                             : "";
                 } catch (ResolutionException ex) {
                     DeclarationSnippet sn = (DeclarationSnippet) state.maps.getSnippetDeadOrAlive(ex.id());
-                    exception = new UnresolvedReferenceException(sn, ex.getStackTrace());
+                    exception = new UnresolvedReferenceException(sn, translateExceptionStack(ex));
                 } catch (UserException ex) {
-                    exception = translateExecutionException(ex);
+                    exception = new EvalException(translateExceptionMessage(ex),
+                            ex.causeExceptionClass(),
+                            translateExceptionStack(ex));
                 } catch (RunException ex) {
                     // StopException - no-op
                 } catch (InternalException ex) {
@@ -732,7 +734,7 @@
         }
     }
 
-    private EvalException translateExecutionException(UserException ex) {
+    private StackTraceElement[] translateExceptionStack(Exception ex) {
         StackTraceElement[] raw = ex.getStackTrace();
         int last = raw.length;
         do {
@@ -759,11 +761,14 @@
                 elems[i] = r;
             }
         }
+        return elems;
+    }
+
+    private String translateExceptionMessage(Exception ex) {
         String msg = ex.getMessage();
-        if (msg.equals("<none>")) {
-            msg = null;
-        }
-        return new EvalException(msg, ex.causeExceptionClass(), elems);
+        return msg.equals("<none>")
+                ? null
+                : msg;
     }
 
     private boolean isWrap(StackTraceElement ste) {
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java
index a0ec79e..fd97832 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/JShell.java
@@ -51,8 +51,6 @@
 import jdk.jshell.spi.ExecutionControl.ExecutionControlException;
 import jdk.jshell.spi.ExecutionEnv;
 import static jdk.jshell.execution.Util.failOverExecutionControlGenerator;
-import static java.util.stream.Collectors.collectingAndThen;
-import static java.util.stream.Collectors.toList;
 import static jdk.jshell.Util.expunge;
 
 /**
@@ -120,7 +118,8 @@
         this.executionControlGenerator = b.executionControlGenerator==null
                 ? failOverExecutionControlGenerator(
                         JDIDefaultExecutionControl.launch(),
-                        JDIDefaultExecutionControl.listen())
+                        JDIDefaultExecutionControl.listen("localhost"),
+                        JDIDefaultExecutionControl.listen(null))
                 : b.executionControlGenerator;
 
         this.maps = new SnippetMaps(this);
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java
index ca400d5..0991280 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/DemultiplexInput.java
@@ -40,15 +40,14 @@
 class DemultiplexInput extends Thread {
 
     private final DataInputStream delegate;
-    private final PipeInputStream command;
     private final Map<String, OutputStream> io;
+    private final Iterable<OutputStream> closeList;
 
-    DemultiplexInput(InputStream input, PipeInputStream command,
-            Map<String, OutputStream> io) {
+    DemultiplexInput(InputStream input, Map<String, OutputStream> io, Iterable<OutputStream> closeList) {
         super("output reader");
         this.delegate = new DataInputStream(input);
-        this.command = command;
         this.io = io;
+        this.closeList = closeList;
     }
 
     @Override
@@ -65,23 +64,23 @@
                 byte[] data = new byte[dataLen];
                 DemultiplexInput.this.delegate.readFully(data);
                 String chan = new String(name, "UTF-8");
-                if (chan.equals("command")) {
-                    for (byte b : data) {
-                        command.write(Byte.toUnsignedInt(b));
-                    }
+                OutputStream out = io.get(chan);
+                if (out == null) {
+                    debug("Unexpected channel name: %s", chan);
                 } else {
-                    OutputStream out = io.get(chan);
-                    if (out == null) {
-                        debug("Unexpected channel name: %s", chan);
-                    } else {
-                        out.write(data);
-                    }
+                    out.write(data);
                 }
             }
         } catch (IOException ex) {
             debug(ex, "Failed reading output");
         } finally {
-            command.close();
+            for (OutputStream out : closeList) {
+                try {
+                    out.close();
+                } catch (IOException ex) {
+                    debug(ex, "Failed reading output");
+                }
+            }
         }
     }
 
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIDefaultExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIDefaultExecutionControl.java
index 75f644e..18f8282 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIDefaultExecutionControl.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIDefaultExecutionControl.java
@@ -25,9 +25,9 @@
 package jdk.jshell.execution;
 
 import java.io.IOException;
+import java.io.InputStream;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
 import java.io.OutputStream;
 import java.net.ServerSocket;
 import java.net.Socket;
@@ -48,7 +48,7 @@
 import com.sun.jdi.VirtualMachine;
 import jdk.jshell.spi.ExecutionControl;
 import jdk.jshell.spi.ExecutionEnv;
-import static jdk.jshell.execution.Util.remoteInput;
+import static jdk.jshell.execution.Util.remoteInputOutput;
 
 /**
  * The implementation of {@link jdk.jshell.spi.ExecutionControl} that the
@@ -77,17 +77,19 @@
      * @return the generator
      */
     public static ExecutionControl.Generator launch() {
-        return env -> create(env, true);
+        return env -> create(env, true, null);
     }
 
     /**
      * Creates an ExecutionControl instance based on a JDI
      * {@code ListeningConnector}.
      *
+     * @param host explicit hostname to use, if null use discovered
+     * hostname, applies to listening only (!isLaunch)
      * @return the generator
      */
-    public static ExecutionControl.Generator listen() {
-        return env -> create(env, false);
+    public static ExecutionControl.Generator listen(String host) {
+        return env -> create(env, false, host);
     }
 
     /**
@@ -100,10 +102,15 @@
      *
      * @param env the context passed by
      * {@link jdk.jshell.spi.ExecutionControl#start(jdk.jshell.spi.ExecutionEnv) }
+     * @param isLaunch does JDI do the launch? That is, LaunchingConnector,
+     * otherwise we start explicitly and use ListeningConnector
+     * @param host explicit hostname to use, if null use discovered
+     * hostname, applies to listening only (!isLaunch)
      * @return the channel
      * @throws IOException if there are errors in set-up
      */
-    private static JDIDefaultExecutionControl create(ExecutionEnv env, boolean isLaunch) throws IOException {
+    private static ExecutionControl create(ExecutionEnv env,
+            boolean isLaunch, String host) throws IOException {
         try (final ServerSocket listener = new ServerSocket(0)) {
             // timeout after 60 seconds
             listener.setSoTimeout(60000);
@@ -111,14 +118,10 @@
 
             // Set-up the JDI connection
             JDIInitiator jdii = new JDIInitiator(port,
-                    env.extraRemoteVMOptions(), REMOTE_AGENT, isLaunch);
+                    env.extraRemoteVMOptions(), REMOTE_AGENT, isLaunch, host);
             VirtualMachine vm = jdii.vm();
             Process process = jdii.process();
 
-            // Forward input to the remote agent
-            Util.forwardInputToRemote(env.userIn(), process.getOutputStream(),
-                    ex -> debug(ex, "input forwarding failure"));
-
             List<Consumer<String>> deathListeners = new ArrayList<>();
             deathListeners.add(s -> env.closeDown());
             Util.detectJDIExitEvent(vm, s -> {
@@ -131,12 +134,13 @@
             // output.
             Socket socket = listener.accept();
             // out before in -- match remote creation so we don't hang
-            ObjectOutput cmdout = new ObjectOutputStream(socket.getOutputStream());
-            Map<String, OutputStream> io = new HashMap<>();
-            io.put("out", env.userOut());
-            io.put("err", env.userErr());
-            ObjectInput cmdin = remoteInput(socket.getInputStream(), io);
-            return new JDIDefaultExecutionControl(cmdout, cmdin, vm, process, deathListeners);
+            OutputStream out = socket.getOutputStream();
+            Map<String, OutputStream> outputs = new HashMap<>();
+            outputs.put("out", env.userOut());
+            outputs.put("err", env.userErr());
+            Map<String, InputStream> input = new HashMap<>();
+            input.put("in", env.userIn());
+            return remoteInputOutput(socket.getInputStream(), out, outputs, input, (objIn, objOut) -> new JDIDefaultExecutionControl(objOut, objIn, vm, process, deathListeners));
         }
     }
 
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIInitiator.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIInitiator.java
index 2c7b8d0..37d51db 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIInitiator.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/JDIInitiator.java
@@ -56,9 +56,11 @@
      * @param remoteAgent full class name of remote agent to launch
      * @param isLaunch does JDI do the launch? That is, LaunchingConnector,
      * otherwise we start explicitly and use ListeningConnector
+     * @param host explicit hostname to use, if null use discovered
+     * hostname, applies to listening only (!isLaunch)
      */
-    public JDIInitiator(int port, List<String> remoteVMOptions,
-            String remoteAgent, boolean isLaunch) {
+    public JDIInitiator(int port, List<String> remoteVMOptions, String remoteAgent,
+            boolean isLaunch, String host) {
         this.remoteAgent = remoteAgent;
         String connectorName
                 = isLaunch
@@ -72,6 +74,9 @@
                 = isLaunch
                         ? launchArgs(port, String.join(" ", remoteVMOptions))
                         : new HashMap<>();
+        if (host != null && !isLaunch) {
+            argumentName2Value.put("localAddress", host);
+        }
         this.connectorArgs = mergeConnectorArgs(connector, argumentName2Value);
         this.vm = isLaunch
                 ? launchTarget()
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/MultiplexingOutputStream.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/MultiplexingOutputStream.java
index 43e3bc5..4cc13d8 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/MultiplexingOutputStream.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/MultiplexingOutputStream.java
@@ -50,13 +50,7 @@
 
     @Override
     public void write(int b) throws IOException {
-        synchronized (delegate) {
-            delegate.write(name.length); //assuming the len is small enough to fit into byte
-            delegate.write(name);
-            delegate.write(1);
-            delegate.write(b);
-            delegate.flush();
-        }
+        write(new byte[] {(byte) b});
     }
 
     @Override
@@ -65,10 +59,12 @@
             int i = 0;
             while (len > 0) {
                 int size = Math.min(PACKET_SIZE, len);
-                delegate.write(name.length); //assuming the len is small enough to fit into byte
-                delegate.write(name);
-                delegate.write(size);
-                delegate.write(b, off + i, size);
+                byte[] data = new byte[name.length + 1 + size + 1];
+                data[0] = (byte) name.length; //assuming the len is small enough to fit into byte
+                System.arraycopy(name, 0, data, 1, name.length);
+                data[name.length + 1] = (byte) size;
+                System.arraycopy(b, off + i, data, name.length + 2, size);
+                delegate.write(data);
                 i += size;
                 len -= size;
             }
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/PipeInputStream.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/PipeInputStream.java
index 1470827..1b582fa 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/PipeInputStream.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/PipeInputStream.java
@@ -24,7 +24,9 @@
  */
 package jdk.jshell.execution;
 
+import java.io.IOException;
 import java.io.InputStream;
+import java.io.OutputStream;
 
 /**
  *
@@ -39,7 +41,10 @@
     private boolean closed;
 
     @Override
-    public synchronized int read() {
+    public synchronized int read() throws IOException {
+        if (start == end) {
+            inputNeeded();
+        }
         while (start == end) {
             if (closed) {
                 return -1;
@@ -57,7 +62,9 @@
         }
     }
 
-    public synchronized void write(int b) {
+    protected void inputNeeded() throws IOException {}
+
+    private synchronized void write(int b) {
         if (closed) {
             throw new IllegalStateException("Already closed.");
         }
@@ -85,4 +92,22 @@
         notifyAll();
     }
 
+    public OutputStream createOutput() {
+        return new OutputStream() {
+            @Override public void write(int b) throws IOException {
+                PipeInputStream.this.write(b);
+            }
+            @Override
+            public void write(byte[] b, int off, int len) throws IOException {
+                for (int i = 0 ; i < len ; i++) {
+                    write(Byte.toUnsignedInt(b[off + i]));
+                }
+            }
+            @Override
+            public void close() throws IOException {
+                PipeInputStream.this.close();
+            }
+        };
+    }
+
 }
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java
index 9ea549c..8a13142 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/RemoteExecutionControl.java
@@ -61,10 +61,12 @@
         Socket socket = new Socket(loopBack, Integer.parseInt(args[0]));
         InputStream inStream = socket.getInputStream();
         OutputStream outStream = socket.getOutputStream();
-        Map<String, Consumer<OutputStream>> chans = new HashMap<>();
-        chans.put("out", st -> System.setOut(new PrintStream(st, true)));
-        chans.put("err", st -> System.setErr(new PrintStream(st, true)));
-        forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, chans);
+        Map<String, Consumer<OutputStream>> outputs = new HashMap<>();
+        outputs.put("out", st -> System.setOut(new PrintStream(st, true)));
+        outputs.put("err", st -> System.setErr(new PrintStream(st, true)));
+        Map<String, Consumer<InputStream>> input = new HashMap<>();
+        input.put("in", st -> System.setIn(st));
+        forwardExecutionControlAndIO(new RemoteExecutionControl(), inStream, outStream, outputs, input);
     }
 
     // These three variables are used by the main JShell process in interrupting
diff --git a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java
index 9f15215..da8deca 100644
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/execution/Util.java
@@ -25,6 +25,7 @@
 package jdk.jshell.execution;
 
 import jdk.jshell.spi.ExecutionEnv;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ObjectInput;
@@ -32,9 +33,13 @@
 import java.io.ObjectOutput;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.function.BiFunction;
 import java.util.function.Consumer;
+
 import com.sun.jdi.VirtualMachine;
 import jdk.jshell.spi.ExecutionControl;
 
@@ -99,21 +104,40 @@
      * instance, then responses back on the output.
      * @param ec the direct instance of {@link ExecutionControl} to process commands
      * @param inStream the stream from which to create the command input
-     * @param outStream the stream that will carry {@code System.out},
-     * {@code System.err}, any specified auxiliary channels, and the
-     * command response output.
-     * @param streamMap a map between names of additional streams to carry and setters
-     * for the stream
+     * @param outStream the stream that will carry any specified auxiliary channels (like
+     *                  {@code System.out} and {@code System.err}), and the command response output.
+     * @param outputStreamMap a map between names of additional streams to carry and setters
+     *                        for the stream. Names starting with '$' are reserved for internal use.
+     * @param inputStreamMap a map between names of additional streams to carry and setters
+     *                       for the stream. Names starting with '$' are reserved for internal use.
      * @throws IOException if there are errors using the passed streams
      */
     public static void forwardExecutionControlAndIO(ExecutionControl ec,
             InputStream inStream, OutputStream outStream,
-            Map<String, Consumer<OutputStream>> streamMap) throws IOException {
-        ObjectInputStream cmdIn = new ObjectInputStream(inStream);
-        for (Entry<String, Consumer<OutputStream>> e : streamMap.entrySet()) {
+            Map<String, Consumer<OutputStream>> outputStreamMap,
+            Map<String, Consumer<InputStream>> inputStreamMap) throws IOException {
+        for (Entry<String, Consumer<OutputStream>> e : outputStreamMap.entrySet()) {
             e.getValue().accept(multiplexingOutputStream(e.getKey(), outStream));
         }
-        ObjectOutputStream cmdOut = new ObjectOutputStream(multiplexingOutputStream("command", outStream));
+
+        ObjectOutputStream cmdOut = new ObjectOutputStream(multiplexingOutputStream("$command", outStream));
+        PipeInputStream cmdInPipe = new PipeInputStream();
+        Map<String, OutputStream> inputs = new HashMap<>();
+        inputs.put("$command", cmdInPipe.createOutput());
+        for (Entry<String, Consumer<InputStream>> e : inputStreamMap.entrySet()) {
+            OutputStream inputSignal = multiplexingOutputStream("$" + e.getKey() + "-input-requested", outStream);
+            PipeInputStream inputPipe = new PipeInputStream() {
+                @Override protected void inputNeeded() throws IOException {
+                    inputSignal.write('1');
+                    inputSignal.flush();
+                }
+            };
+            inputs.put(e.getKey(), inputPipe.createOutput());
+            e.getValue().accept(inputPipe);
+        }
+        new DemultiplexInput(inStream, inputs, inputs.values()).start();
+        ObjectInputStream cmdIn = new ObjectInputStream(cmdInPipe);
+
         forwardExecutionControl(ec, cmdIn, cmdOut);
     }
 
@@ -122,18 +146,41 @@
     }
 
     /**
-     * Reads from an InputStream which has been packetized and write its contents
-     * to the out and err OutputStreams; Copies the command stream.
+     * Creates an ExecutionControl for given packetized input and output. The given InputStream
+     * is de-packetized, and content forwarded to ObjectInput and given OutputStreams. The ObjectOutput
+     * and values read from the given InputStream are packetized and sent to the given OutputStream.
+     *
      * @param input the packetized input stream
-     * @param streamMap a map between stream names and the output streams to forward
-     * @return the command stream
+     * @param output the packetized output stream
+     * @param outputStreamMap a map between stream names and the output streams to forward.
+     *                        Names starting with '$' are reserved for internal use.
+     * @param inputStreamMap a map between stream names and the input streams to forward.
+     *                       Names starting with '$' are reserved for internal use.
+     * @param factory to create the ExecutionControl from ObjectInput and ObjectOutput.
+     * @return the created ExecutionControl
      * @throws IOException if setting up the streams raised an exception
      */
-    public static ObjectInput remoteInput(InputStream input,
-            Map<String, OutputStream> streamMap) throws IOException {
+    public static ExecutionControl remoteInputOutput(InputStream input, OutputStream output,
+            Map<String, OutputStream> outputStreamMap, Map<String, InputStream> inputStreamMap,
+            BiFunction<ObjectInput, ObjectOutput, ExecutionControl> factory) throws IOException {
+        Map<String, OutputStream> augmentedStreamMap = new HashMap<>(outputStreamMap);
+        ObjectOutput commandOut = new ObjectOutputStream(Util.multiplexingOutputStream("$command", output));
+        for (Entry<String, InputStream> e : inputStreamMap.entrySet()) {
+            InputStream  in = e.getValue();
+            OutputStream inTarget = Util.multiplexingOutputStream(e.getKey(), output);
+            augmentedStreamMap.put("$" + e.getKey() + "-input-requested", new OutputStream() {
+                @Override
+                public void write(int b) throws IOException {
+                    //value ignored, just a trigger to read from the input
+                    inTarget.write(in.read());
+                }
+            });
+        }
         PipeInputStream commandIn = new PipeInputStream();
-        new DemultiplexInput(input, commandIn, streamMap).start();
-        return new ObjectInputStream(commandIn);
+        OutputStream commandInTarget = commandIn.createOutput();
+        augmentedStreamMap.put("$command", commandInTarget);
+        new DemultiplexInput(input, augmentedStreamMap, Arrays.asList(commandInTarget)).start();
+        return factory.apply(new ObjectInputStream(commandIn), commandOut);
     }
 
     /**
@@ -151,32 +198,4 @@
         }
     }
 
-    /**
-     * Creates a Thread that will ship all input to the remote agent.
-     *
-     * @param inputStream the user input
-     * @param outStream the input to the remote agent
-     * @param handler a failure handler
-     */
-    public static void forwardInputToRemote(final InputStream inputStream,
-            final OutputStream outStream, final Consumer<Exception> handler) {
-        Thread thr = new Thread("input reader") {
-            @Override
-            public void run() {
-                try {
-                    byte[] buf = new byte[256];
-                    int cnt;
-                    while ((cnt = inputStream.read(buf)) != -1) {
-                        outStream.write(buf, 0, cnt);
-                        outStream.flush();
-                    }
-                } catch (Exception ex) {
-                    handler.accept(ex);
-                }
-            }
-        };
-        thr.setPriority(Thread.MAX_PRIORITY - 1);
-        thr.start();
-    }
-
 }
diff --git a/langtools/test/ProblemList.txt b/langtools/test/ProblemList.txt
index a90395e..8ed5359 100644
--- a/langtools/test/ProblemList.txt
+++ b/langtools/test/ProblemList.txt
@@ -77,10 +77,3 @@
 ###########################################################################
 #
 # jdeps 
-
-###########################################################################
-#
-# jdeprscan
-
-tools/jdeprscan/tests/jdk/jdeprscan/TestLoad.java                               8164837    windows-all    probably line breaks or encoding
-tools/jdeprscan/tests/jdk/jdeprscan/TestScan.java                               8164837    windows-all    probably line breaks or encoding
diff --git a/langtools/test/jdk/javadoc/tool/ReleaseOption.java b/langtools/test/jdk/javadoc/tool/ReleaseOption.java
index 9761af3..774b10e 100644
--- a/langtools/test/jdk/javadoc/tool/ReleaseOption.java
+++ b/langtools/test/jdk/javadoc/tool/ReleaseOption.java
@@ -33,7 +33,7 @@
 /**
  * @test
  * @bug 8086737
- * @summary Test -release option in javadoc
+ * @summary Test --release option in javadoc
  * @run main ReleaseOption
  * @modules jdk.javadoc/jdk.javadoc.internal.tool
  */
@@ -43,10 +43,10 @@
     }
 
     void run() {
-        doRunTest(0, out -> out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "7");
-        doRunTest(0, out -> !out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "8");
-        doRunTest(1, out -> true, "-release", "7", "-source", "7");
-        doRunTest(1, out -> true, "-release", "7", "-bootclasspath", "any");
+        doRunTest(0, out -> out.contains("compiler.err.doesnt.exist: java.util.stream"), "--release", "7");
+        doRunTest(0, out -> !out.contains("compiler.err.doesnt.exist: java.util.stream"), "--release", "8");
+        doRunTest(1, out -> true, "--release", "7", "-source", "7");
+        doRunTest(1, out -> true, "--release", "7", "-bootclasspath", "any");
     }
 
     void doRunTest(int expectedResult, Predicate<String> validate, String... args) {
diff --git a/langtools/test/jdk/jshell/CommandCompletionTest.java b/langtools/test/jdk/jshell/CommandCompletionTest.java
index 6544084..ad01de4 100644
--- a/langtools/test/jdk/jshell/CommandCompletionTest.java
+++ b/langtools/test/jdk/jshell/CommandCompletionTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8144095
+ * @bug 8144095 8164825
  * @summary Test Command Completion
  * @modules jdk.compiler/com.sun.tools.javac.api
  *          jdk.compiler/com.sun.tools.javac.main
@@ -40,6 +40,7 @@
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Predicate;
@@ -148,6 +149,80 @@
         assertCompletion("/classpath ~/|", false, completions.toArray(new String[completions.size()]));
     }
 
+    public void testSet() throws IOException {
+        List<String> p1 = listFiles(Paths.get(""));
+        FileSystems.getDefault().getRootDirectories().forEach(s -> p1.add(s.toString()));
+        Collections.sort(p1);
+
+        String[] modes = {"concise ", "normal ", "silent ", "verbose "};
+        String[] options = {"-command", "-delete", "-quiet"};
+        String[] modesWithOptions = Stream.concat(Arrays.stream(options), Arrays.stream(modes)).sorted().toArray(String[]::new);
+        test(false, new String[] {"--no-startup"},
+                a -> assertCompletion(a, "/se|", false, "/set "),
+                a -> assertCompletion(a, "/set |", false, "editor ", "feedback ", "format ", "mode ", "prompt ", "start ", "truncation "),
+
+                // /set editor
+                a -> assertCompletion(a, "/set e|", false, "editor "),
+                a -> assertCompletion(a, "/set editor |", false, p1.toArray(new String[p1.size()])),
+
+                // /set feedback
+                a -> assertCompletion(a, "/set fe|", false, "feedback "),
+                a -> assertCompletion(a, "/set fe |", false, modes),
+
+                // /set format
+                a -> assertCompletion(a, "/set fo|", false, "format "),
+                a -> assertCompletion(a, "/set fo |", false, modes),
+
+                // /set mode
+                a -> assertCompletion(a, "/set mo|", false, "mode "),
+                a -> assertCompletion(a, "/set mo |", false),
+                a -> assertCompletion(a, "/set mo newmode |", false, modesWithOptions),
+                a -> assertCompletion(a, "/set mo newmode -|", false, options),
+                a -> assertCompletion(a, "/set mo newmode -command |", false),
+                a -> assertCompletion(a, "/set mo newmode normal |", false, options),
+
+                // /set prompt
+                a -> assertCompletion(a, "/set pro|", false, "prompt "),
+                a -> assertCompletion(a, "/set pro |", false, modes),
+
+                // /set start
+                a -> assertCompletion(a, "/set st|", false, "start "),
+                a -> assertCompletion(a, "/set st |", false, p1.toArray(new String[p1.size()])),
+
+                // /set truncation
+                a -> assertCompletion(a, "/set tr|", false, "truncation "),
+                a -> assertCompletion(a, "/set tr |", false, modes)
+        );
+    }
+
+    public void testRetain() throws IOException {
+        List<String> p1 = listFiles(Paths.get(""));
+        FileSystems.getDefault().getRootDirectories().forEach(s -> p1.add(s.toString()));
+        Collections.sort(p1);
+
+        String[] modes = {"concise ", "normal ", "silent ", "verbose "};
+        test(false, new String[] {"--no-startup"},
+                a -> assertCompletion(a, "/ret|", false, "/retain "),
+                a -> assertCompletion(a, "/retain |", false, "editor ", "feedback ", "mode ", "start "),
+
+                // /retain editor
+                a -> assertCompletion(a, "/retain e|", false, "editor "),
+                a -> assertCompletion(a, "/retain editor |", false, p1.toArray(new String[p1.size()])),
+
+                // /retain feedback
+                a -> assertCompletion(a, "/retain fe|", false, "feedback "),
+                a -> assertCompletion(a, "/retain fe |", false, modes),
+
+                // /retain mode
+                a -> assertCompletion(a, "/retain mo|", false, "mode "),
+                a -> assertCompletion(a, "/retain mo |", false, modes),
+
+                // /retain start
+                a -> assertCompletion(a, "/retain st|", false, "start "),
+                a -> assertCompletion(a, "/retain st |", false, p1.toArray(new String[p1.size()]))
+        );
+    }
+
     private void createIfNeeded(Path file) throws IOException {
         if (!Files.exists(file))
             Files.createFile(file);
diff --git a/langtools/test/jdk/jshell/CompletenessTest.java b/langtools/test/jdk/jshell/CompletenessTest.java
index bf95b51..b0e5a78 100644
--- a/langtools/test/jdk/jshell/CompletenessTest.java
+++ b/langtools/test/jdk/jshell/CompletenessTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8149524 8131024
+ * @bug 8149524 8131024 8165211 8080071 8130454
  * @summary Test SourceCodeAnalysis
  * @build KullaTesting TestingInputStream
  * @run testng CompletenessTest
@@ -63,6 +63,7 @@
         "foo: while (true) { printf(\"Innn\"); break foo; }",
         "class Case<E1 extends Enum<E1>, E2 extends Enum<E2>, E3 extends Enum<E3>> {}",
         ";",
+        "enum Tt { FOO, BAR, BAZ,; }"
     };
 
     static final String[] expression = new String[] {
@@ -77,6 +78,8 @@
         "new int[] {1, 2,3}",
         "new Foo() {}",
         "i >= 0 && Character.isWhitespace(s.charAt(i))",
+        "int.class",
+        "String.class",
     };
 
     static final String[] complete_with_semi = new String[] {
@@ -113,6 +116,7 @@
         "BufferedReader br = new BufferedReader(new FileReader(path))",
         "bar: g()",
         "baz: while (true) if (t()) printf('-'); else break baz",
+        "java.util.function.IntFunction<int[]> ggg = int[]::new",
     };
 
     static final String[] considered_incomplete = new String[] {
@@ -141,6 +145,8 @@
         "if (match.kind == BRACES && (prevCT.kind == ARROW || prevCT.kind == NEW_MIDDLE)) {",
         "if (match.kind == BRACES && (prevCT.kind == ARROW || prevCT.kind == NEW_MIDDLE)) { new CT(UNMATCHED, current, \"Unmatched \" + unmatched);",
         "x +",
+        "x *",
+        "3 *",
         "int",
         "for (int i = 0; i < lines.length(); ++i) {",
         "new",
@@ -156,6 +162,7 @@
         "enum TK { EOF(TokenKind.EOF, 0),",
         "enum TK { EOF(TokenKind.EOF, 0), NEW_MIDDLE(XEXPR1|XTERM)",
         "enum TK { EOF(TokenKind.EOF, 0), NEW_MIDDLE(XEXPR1|XTERM); ",
+        "enum Tt { FOO, BAR, BAZ,;"
     };
 
     static final String[] unknown = new String[] {
diff --git a/langtools/test/jdk/jshell/CompletionSuggestionTest.java b/langtools/test/jdk/jshell/CompletionSuggestionTest.java
index 9376716..8c2c723 100644
--- a/langtools/test/jdk/jshell/CompletionSuggestionTest.java
+++ b/langtools/test/jdk/jshell/CompletionSuggestionTest.java
@@ -419,9 +419,9 @@
     public void testUncompletedDeclaration() {
         assertCompletion("class Clazz { Claz|", "Clazz");
         assertCompletion("class Clazz { class A extends Claz|", "Clazz");
-        assertCompletion("class Clazz { Clazz clazz; Object o = cla|", "clazz");
-        assertCompletion("class Clazz { static Clazz clazz; Object o = cla|", "clazz");
-        assertCompletion("class Clazz { Clazz clazz; static Object o = cla|", true);
+        assertCompletion("class Clazz { Clazz clazz; Object o = claz|", "clazz");
+        assertCompletion("class Clazz { static Clazz clazz; Object o = claz|", "clazz");
+        assertCompletion("class Clazz { Clazz clazz; static Object o = claz|", true);
         assertCompletion("class Clazz { void method(Claz|", "Clazz");
         assertCompletion("class A { int method() { return 0; } int a = meth|", "method()");
         assertCompletion("class A { int field = 0; int method() { return fiel|", "field");
diff --git a/langtools/test/jdk/jshell/IdGeneratorTest.java b/langtools/test/jdk/jshell/IdGeneratorTest.java
index 1a3f167..38ccc1b 100644
--- a/langtools/test/jdk/jshell/IdGeneratorTest.java
+++ b/langtools/test/jdk/jshell/IdGeneratorTest.java
@@ -99,19 +99,18 @@
         }
     }
 
-    @Test(enabled = false) // TODO 8133507
     public void testIdInException() {
         JShell.Builder builder = getBuilder().idGenerator(((snippet, id) -> "custom" + id));
         try (JShell jShell = builder.build()) {
             EvalException evalException = (EvalException) jShell.eval("throw new Error();").get(0).exception();
             for (StackTraceElement ste : evalException.getStackTrace()) {
-                assertTrue(ste.getFileName().startsWith("custom"), "Not started with \"custom\": "
+                assertTrue(ste.getFileName().startsWith("#custom"), "Not started with \"#custom\": "
                         + ste.getFileName());
             }
             jShell.eval("void f() { g(); }");
             UnresolvedReferenceException unresolvedException = (UnresolvedReferenceException) jShell.eval("f();").get(0).exception();
             for (StackTraceElement ste : unresolvedException.getStackTrace()) {
-                assertTrue(ste.getFileName().startsWith("custom"), "Not started with \"custom\": "
+                assertTrue(ste.getFileName().startsWith("#custom"), "Not started with \"#custom\": "
                         + ste.getFileName());
             }
         }
diff --git a/langtools/test/jdk/jshell/JDILaunchingExecutionControlTest.java b/langtools/test/jdk/jshell/JDILaunchingExecutionControlTest.java
new file mode 100644
index 0000000..3baa5378
--- /dev/null
+++ b/langtools/test/jdk/jshell/JDILaunchingExecutionControlTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8164518
+ * @summary Tests for standard JDI connector (without failover) -- launching
+ * @modules jdk.jshell/jdk.jshell.execution
+ * @build KullaTesting ExecutionControlTestBase
+ * @run testng JDILaunchingExecutionControlTest
+ */
+
+
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import jdk.jshell.execution.JDIDefaultExecutionControl;
+
+@Test
+public class JDILaunchingExecutionControlTest extends ExecutionControlTestBase {
+
+    @BeforeMethod
+    @Override
+    public void setUp() {
+        setUp(builder -> builder.executionEngine(JDIDefaultExecutionControl.launch()));
+    }
+}
diff --git a/langtools/test/jdk/jshell/JDIListeningExecutionControlTest.java b/langtools/test/jdk/jshell/JDIListeningExecutionControlTest.java
index dda377f..2540b90 100644
--- a/langtools/test/jdk/jshell/JDIListeningExecutionControlTest.java
+++ b/langtools/test/jdk/jshell/JDIListeningExecutionControlTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8131029 8159935 8160127
+ * @bug 8131029 8159935 8160127 8164518
  * @summary Tests for alternate JDI connector -- listening
  * @modules jdk.jshell/jdk.jshell.execution
  * @build KullaTesting ExecutionControlTestBase
@@ -41,6 +41,6 @@
     @BeforeMethod
     @Override
     public void setUp() {
-        setUp(builder -> builder.executionEngine(JDIDefaultExecutionControl.listen()));
+        setUp(builder -> builder.executionEngine(JDIDefaultExecutionControl.listen(null)));
     }
 }
diff --git a/langtools/test/jdk/jshell/JDIListeningLocalhostExecutionControlTest.java b/langtools/test/jdk/jshell/JDIListeningLocalhostExecutionControlTest.java
new file mode 100644
index 0000000..52a4487
--- /dev/null
+++ b/langtools/test/jdk/jshell/JDIListeningLocalhostExecutionControlTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8164518
+ * @summary Tests for alternate JDI connector -- listening to "localhost"
+ * @modules jdk.jshell/jdk.jshell.execution
+ * @build KullaTesting ExecutionControlTestBase
+ * @run testng JDIListeningLocalhostExecutionControlTest
+ */
+
+
+import org.testng.annotations.Test;
+import org.testng.annotations.BeforeMethod;
+import jdk.jshell.execution.JDIDefaultExecutionControl;
+
+@Test
+public class JDIListeningLocalhostExecutionControlTest extends ExecutionControlTestBase {
+
+    @BeforeMethod
+    @Override
+    public void setUp() {
+        setUp(builder -> builder.executionEngine(JDIDefaultExecutionControl.listen("localhost")));
+    }
+}
diff --git a/langtools/test/jdk/jshell/ReplToolTesting.java b/langtools/test/jdk/jshell/ReplToolTesting.java
index a2e80a7..23c70af 100644
--- a/langtools/test/jdk/jshell/ReplToolTesting.java
+++ b/langtools/test/jdk/jshell/ReplToolTesting.java
@@ -247,7 +247,6 @@
                 new PrintStream(cmdout),
                 new PrintStream(cmderr),
                 new PrintStream(console),
-                userin,
                 new PrintStream(userout),
                 new PrintStream(usererr),
                 prefs,
@@ -463,7 +462,7 @@
 
     private List<String> computeCompletions(String code, boolean isSmart) {
         JShellTool js = this.repl != null ? this.repl
-                                      : new JShellTool(null, null, null, null, null, null, null, prefs, Locale.ROOT);
+                                      : new JShellTool(null, null, null, null, null, null, prefs, Locale.ROOT);
         int cursor =  code.indexOf('|');
         code = code.replace("|", "");
         assertTrue(cursor > -1, "'|' not found: " + code);
diff --git a/langtools/test/jdk/jshell/StartOptionTest.java b/langtools/test/jdk/jshell/StartOptionTest.java
index 5ca4885..dbbbf09 100644
--- a/langtools/test/jdk/jshell/StartOptionTest.java
+++ b/langtools/test/jdk/jshell/StartOptionTest.java
@@ -63,7 +63,6 @@
                 new PrintStream(cmdout),
                 new PrintStream(cmderr),
                 new PrintStream(console),
-                new TestingInputStream(),
                 new PrintStream(userout),
                 new PrintStream(usererr),
                 new ReplToolTesting.MemoryPreferences(),
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java b/langtools/test/jdk/jshell/UserInputTest.java
similarity index 66%
copy from hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
copy to langtools/test/jdk/jshell/UserInputTest.java
index 8737e56..5289ab7 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
+++ b/langtools/test/jdk/jshell/UserInputTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,16 +21,24 @@
  * questions.
  */
 
-package jdk.test.lib.dcmd;
-
-/**
- * CommandExecutorException encapsulates exceptions thrown (on the "calling side") from the execution of Diagnostic
- * Commands
+/*
+ * @test
+ * @bug 8131023
+ * @summary Verify that the user's code can read System.in
+ * @build KullaTesting TestingInputStream
+ * @run testng UserInputTest
  */
-public class CommandExecutorException extends RuntimeException {
-    private static final long serialVersionUID = -7039597746579144280L;
 
-    public CommandExecutorException(String message, Throwable e) {
-        super(message, e);
+import org.testng.annotations.Test;
+
+@Test
+public class UserInputTest extends KullaTesting {
+
+    public void testReadInput() {
+        setInput("AB\n");
+        assertEval("System.in.read()", "65");
+        setInput("BC\n");
+        assertEval("System.in.read()", "66");
     }
+
 }
diff --git a/langtools/test/jdk/jshell/UserJDIUserRemoteTest.java b/langtools/test/jdk/jshell/UserJDIUserRemoteTest.java
index e1e658a..bfd04a1 100644
--- a/langtools/test/jdk/jshell/UserJDIUserRemoteTest.java
+++ b/langtools/test/jdk/jshell/UserJDIUserRemoteTest.java
@@ -37,7 +37,6 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
 import java.net.ServerSocket;
 import java.util.ArrayList;
 import java.util.List;
@@ -62,7 +61,7 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.fail;
 import static jdk.jshell.execution.Util.forwardExecutionControlAndIO;
-import static jdk.jshell.execution.Util.remoteInput;
+import static jdk.jshell.execution.Util.remoteInputOutput;
 
 @Test
 public class UserJDIUserRemoteTest extends ExecutionControlTestBase {
@@ -146,7 +145,7 @@
      * @return the channel
      * @throws IOException if there are errors in set-up
      */
-    static MyExecutionControl make(ExecutionEnv env, UserJDIUserRemoteTest test) throws IOException {
+    static ExecutionControl make(ExecutionEnv env, UserJDIUserRemoteTest test) throws IOException {
         try (final ServerSocket listener = new ServerSocket(0)) {
             // timeout after 60 seconds
             listener.setSoTimeout(60000);
@@ -159,7 +158,7 @@
                     + System.getProperty("path.separator")
                     + System.getProperty("user.dir"));
             JDIInitiator jdii = new JDIInitiator(port,
-                    opts, REMOTE_AGENT, true);
+                    opts, REMOTE_AGENT, true, null);
             VirtualMachine vm = jdii.vm();
             Process process = jdii.process();
 
@@ -175,13 +174,14 @@
             // output.
             Socket socket = listener.accept();
             // out before in -- match remote creation so we don't hang
-            ObjectOutput cmdout = new ObjectOutputStream(socket.getOutputStream());
-            Map<String, OutputStream> io = new HashMap<>();
-            io.put("out", env.userOut());
-            io.put("err", env.userErr());
-            io.put("aux", test.auxStream);
-            ObjectInput cmdin = remoteInput(socket.getInputStream(), io);
-            MyExecutionControl myec = new MyExecutionControl(cmdout, cmdin, vm, process, deathListeners);
+            OutputStream out = socket.getOutputStream();
+            Map<String, OutputStream> outputs = new HashMap<>();
+            outputs.put("out", env.userOut());
+            outputs.put("err", env.userErr());
+            outputs.put("aux", test.auxStream);
+            Map<String, InputStream> input = new HashMap<>();
+            input.put("in", env.userIn());
+            ExecutionControl myec = remoteInputOutput(socket.getInputStream(), out, outputs, input, (objIn, objOut) -> new MyExecutionControl(objOut, objIn, vm, process, deathListeners));
             test.currentEC = myec;
             return myec;
         }
@@ -255,11 +255,13 @@
             Socket socket = new Socket(loopBack, Integer.parseInt(args[0]));
             InputStream inStream = socket.getInputStream();
             OutputStream outStream = socket.getOutputStream();
-            Map<String, Consumer<OutputStream>> chans = new HashMap<>();
-            chans.put("out", st -> System.setOut(new PrintStream(st, true)));
-            chans.put("err", st -> System.setErr(new PrintStream(st, true)));
-            chans.put("aux", st -> { auxPrint = new PrintStream(st, true); });
-            forwardExecutionControlAndIO(new MyRemoteExecutionControl(), inStream, outStream, chans);
+            Map<String, Consumer<OutputStream>> outputs = new HashMap<>();
+            outputs.put("out", st -> System.setOut(new PrintStream(st, true)));
+            outputs.put("err", st -> System.setErr(new PrintStream(st, true)));
+            outputs.put("aux", st -> { auxPrint = new PrintStream(st, true); });
+            Map<String, Consumer<InputStream>> input = new HashMap<>();
+            input.put("in", st -> System.setIn(st));
+            forwardExecutionControlAndIO(new MyRemoteExecutionControl(), inStream, outStream, outputs, input);
         } catch (Throwable ex) {
             throw ex;
         }
diff --git a/langtools/test/tools/javac/T4994049/DeprecatedYES.out b/langtools/test/tools/javac/T4994049/DeprecatedYES.out
index 0750441..3925e16 100644
--- a/langtools/test/tools/javac/T4994049/DeprecatedYES.out
+++ b/langtools/test/tools/javac/T4994049/DeprecatedYES.out
@@ -1,4 +1,5 @@
-DeprecatedYES.java:18:10: compiler.warn.has.been.deprecated: foo(), A
+DeprecatedYES.java:12:10: compiler.warn.missing.deprecated.annotation
 - compiler.err.warnings.and.werror
+DeprecatedYES.java:18:10: compiler.warn.has.been.deprecated: foo(), A
 1 error
-1 warning
+2 warnings
diff --git a/langtools/test/tools/javac/T8139474/DashRelease7DashVerboseTest.java b/langtools/test/tools/javac/T8139474/DashRelease7DashVerboseTest.java
index 5e0c19c..38f9f58 100644
--- a/langtools/test/tools/javac/T8139474/DashRelease7DashVerboseTest.java
+++ b/langtools/test/tools/javac/T8139474/DashRelease7DashVerboseTest.java
@@ -24,8 +24,8 @@
 /*
  * @test
  * bug 8139474
- * @summary -release 7 -verbose causes Javac exception
- * @compile -release 7 -verbose DashRelease7DashVerboseTest.java
+ * @summary --release 7 -verbose causes Javac exception
+ * @compile --release 7 -verbose DashRelease7DashVerboseTest.java
 */
 
 public class DashRelease7DashVerboseTest {}
diff --git a/langtools/test/tools/javac/danglingDep/DepX.out b/langtools/test/tools/javac/danglingDep/DepX.out
index 7260f4c..433e187 100644
--- a/langtools/test/tools/javac/danglingDep/DepX.out
+++ b/langtools/test/tools/javac/danglingDep/DepX.out
@@ -1,2 +1,4 @@
+DepX.java:38:1: compiler.warn.missing.deprecated.annotation
 - compiler.note.deprecated.filename: RefX.java
 - compiler.note.deprecated.recompile
+1 warning
diff --git a/hotspot/test/testlibrary/jdk/test/lib/ExitCode.java b/langtools/test/tools/javac/depDocComment/SuppressDepAnnWithSwitchTest.java
similarity index 75%
copy from hotspot/test/testlibrary/jdk/test/lib/ExitCode.java
copy to langtools/test/tools/javac/depDocComment/SuppressDepAnnWithSwitchTest.java
index 859346d..dbfc6b5 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/ExitCode.java
+++ b/langtools/test/tools/javac/depDocComment/SuppressDepAnnWithSwitchTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,20 +21,14 @@
  * questions.
  */
 
-package jdk.test.lib;
-
-/**
- * Exit code values that could be returned by the JVM.
+/*
+ * @test
+ * @bug 8164073
+ * @summary Verify that -Xlint:-dep-ann suppresses warnings.
+ * @compile -Xlint:-dep-ann -Werror SuppressDepAnnWithSwitchTest.java
  */
-public enum ExitCode {
-    OK(0),
-    FAIL(1),
-    CRASH(134);
 
-    public final int value;
-
-    ExitCode(int value) {
-        this.value = value;
-    }
+public class SuppressDepAnnWithSwitchTest {
+    /** @deprecated */
+    int f;
 }
-
diff --git a/langtools/test/tools/javac/depDocComment/SuppressDeprecation.java b/langtools/test/tools/javac/depDocComment/SuppressDeprecation.java
index 4d8849c..7968487 100644
--- a/langtools/test/tools/javac/depDocComment/SuppressDeprecation.java
+++ b/langtools/test/tools/javac/depDocComment/SuppressDeprecation.java
@@ -1,10 +1,11 @@
 /**
  * @test  /nodynamiccopyright/
- * @bug 4216683 4346296 4656556 4785453
+ * @bug 4216683 4346296 4656556 4785453 8164073
  * @summary New rules for when deprecation messages are suppressed
  * @author gafter
  *
  * @compile/ref=SuppressDeprecation.out -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java
+ * @compile/ref=SuppressDeprecation8.out -source 8 -Xlint:deprecation -XDrawDiagnostics SuppressDeprecation.java
  */
 
 /* Test for the contexts in which deprecations warnings should
diff --git a/langtools/test/tools/javac/depDocComment/SuppressDeprecation.out b/langtools/test/tools/javac/depDocComment/SuppressDeprecation.out
index 4a8b15f3..ff1bc12 100644
--- a/langtools/test/tools/javac/depDocComment/SuppressDeprecation.out
+++ b/langtools/test/tools/javac/depDocComment/SuppressDeprecation.out
@@ -1,8 +1,20 @@
-SuppressDeprecation.java:82:10: compiler.warn.has.been.deprecated: g(), T
-SuppressDeprecation.java:83:14: compiler.warn.has.been.deprecated: g(), T
-SuppressDeprecation.java:84:9: compiler.warn.has.been.deprecated: var, T
-SuppressDeprecation.java:87:9: compiler.warn.has.been.deprecated: T(), T
-SuppressDeprecation.java:90:9: compiler.warn.has.been.deprecated: T(int), T
-SuppressDeprecation.java:98:1: compiler.warn.has.been.deprecated: T(), T
-SuppressDeprecation.java:130:17: compiler.warn.has.been.deprecated: X, compiler.misc.unnamed.package
-7 warnings
+SuppressDeprecation.java:29:9: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:33:10: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:38:10: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:48:5: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:53:5: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:67:10: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:74:9: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:80:10: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:83:10: compiler.warn.has.been.deprecated: g(), T
+SuppressDeprecation.java:84:14: compiler.warn.has.been.deprecated: g(), T
+SuppressDeprecation.java:85:9: compiler.warn.has.been.deprecated: var, T
+SuppressDeprecation.java:88:9: compiler.warn.has.been.deprecated: T(), T
+SuppressDeprecation.java:91:9: compiler.warn.has.been.deprecated: T(int), T
+SuppressDeprecation.java:99:1: compiler.warn.has.been.deprecated: T(), T
+SuppressDeprecation.java:124:9: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:103:1: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:129:1: compiler.warn.missing.deprecated.annotation
+SuppressDeprecation.java:131:17: compiler.warn.has.been.deprecated: X, compiler.misc.unnamed.package
+SuppressDeprecation.java:135:1: compiler.warn.missing.deprecated.annotation
+19 warnings
diff --git a/langtools/test/tools/javac/depDocComment/SuppressDeprecation8.out b/langtools/test/tools/javac/depDocComment/SuppressDeprecation8.out
new file mode 100644
index 0000000..7a12c45
--- /dev/null
+++ b/langtools/test/tools/javac/depDocComment/SuppressDeprecation8.out
@@ -0,0 +1,9 @@
+- compiler.warn.source.no.bootclasspath: 1.8
+SuppressDeprecation.java:83:10: compiler.warn.has.been.deprecated: g(), T
+SuppressDeprecation.java:84:14: compiler.warn.has.been.deprecated: g(), T
+SuppressDeprecation.java:85:9: compiler.warn.has.been.deprecated: var, T
+SuppressDeprecation.java:88:9: compiler.warn.has.been.deprecated: T(), T
+SuppressDeprecation.java:91:9: compiler.warn.has.been.deprecated: T(int), T
+SuppressDeprecation.java:99:1: compiler.warn.has.been.deprecated: T(), T
+SuppressDeprecation.java:131:17: compiler.warn.has.been.deprecated: X, compiler.misc.unnamed.package
+8 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1.java b/langtools/test/tools/javac/depOverrides/doccomment/Test1.java
index 563492d..571f1ce 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test1.java
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,11 +26,11 @@
  * @bug 5086088
  * @summary check warnings generated when overriding deprecated methods
  *
- * @compile/ref=empty    -XDrawDiagnostics -Xlint:deprecation I.java
+ * @compile/ref=Test1I.out   -XDrawDiagnostics -Xlint:deprecation I.java
  * @compile/ref=Test1A.out  -XDrawDiagnostics -Xlint:deprecation A.java
  * @compile/ref=Test1B.out  -XDrawDiagnostics -Xlint:deprecation B.java
  * @compile/ref=Test1B2.out -XDrawDiagnostics -Xlint:deprecation B2.java
- * @compile/ref=empty    -XDrawDiagnostics -Xlint:deprecation B3.java
+ * @compile/ref=Test1B3.out    -XDrawDiagnostics -Xlint:deprecation B3.java
  * @compile/ref=empty    -XDrawDiagnostics -Xlint:deprecation Test1.java
  */
 
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1A.out b/langtools/test/tools/javac/depOverrides/doccomment/Test1A.out
index 0cbe50c..ef47794 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test1A.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1A.out
@@ -1,4 +1,10 @@
 A.java:13:36: compiler.warn.has.been.deprecated: iDep_aUnd_bInh(), I
 A.java:12:36: compiler.warn.has.been.deprecated: iDep_aUnd_bUnd(), I
 A.java:11:36: compiler.warn.has.been.deprecated: iDep_aUnd_bDep(), I
-3 warnings
+A.java:8:36: compiler.warn.missing.deprecated.annotation
+A.java:9:36: compiler.warn.missing.deprecated.annotation
+A.java:10:36: compiler.warn.missing.deprecated.annotation
+A.java:17:36: compiler.warn.missing.deprecated.annotation
+A.java:18:36: compiler.warn.missing.deprecated.annotation
+A.java:19:36: compiler.warn.missing.deprecated.annotation
+9 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1B.out b/langtools/test/tools/javac/depOverrides/doccomment/Test1B.out
index a2681b9..d59496b 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test1B.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1B.out
@@ -1,4 +1,10 @@
 B.java:15:36: compiler.warn.has.been.deprecated: iDep_aInh_bUnd(), I
+B.java:8:36: compiler.warn.missing.deprecated.annotation
 B.java:9:36: compiler.warn.has.been.deprecated: iDep_aDep_bUnd(), A
+B.java:11:36: compiler.warn.missing.deprecated.annotation
+B.java:14:36: compiler.warn.missing.deprecated.annotation
+B.java:17:36: compiler.warn.missing.deprecated.annotation
 B.java:18:36: compiler.warn.has.been.deprecated: iUnd_aDep_bUnd(), A
-3 warnings
+B.java:20:36: compiler.warn.missing.deprecated.annotation
+B.java:23:36: compiler.warn.missing.deprecated.annotation
+9 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1B2.out b/langtools/test/tools/javac/depOverrides/doccomment/Test1B2.out
index 12c5146..17efd64 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test1B2.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1B2.out
@@ -2,6 +2,12 @@
 B2.java:7:10: compiler.warn.has.been.deprecated: iDep_aUnd_bInh(), I
 B2.java:12:36: compiler.warn.has.been.deprecated: iDep_aUnd_bUnd(), I
 B2.java:9:36: compiler.warn.has.been.deprecated: iDep_aDep_bUnd(), I
+B2.java:8:36: compiler.warn.missing.deprecated.annotation
 B2.java:9:36: compiler.warn.has.been.deprecated: iDep_aDep_bUnd(), A
+B2.java:11:36: compiler.warn.missing.deprecated.annotation
+B2.java:14:36: compiler.warn.missing.deprecated.annotation
+B2.java:17:36: compiler.warn.missing.deprecated.annotation
 B2.java:18:36: compiler.warn.has.been.deprecated: iUnd_aDep_bUnd(), A
-6 warnings
+B2.java:20:36: compiler.warn.missing.deprecated.annotation
+B2.java:23:36: compiler.warn.missing.deprecated.annotation
+12 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1B3.out b/langtools/test/tools/javac/depOverrides/doccomment/Test1B3.out
new file mode 100644
index 0000000..c1bb872
--- /dev/null
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1B3.out
@@ -0,0 +1,8 @@
+B3.java:32:36: compiler.warn.missing.deprecated.annotation
+B3.java:35:36: compiler.warn.missing.deprecated.annotation
+B3.java:38:36: compiler.warn.missing.deprecated.annotation
+B3.java:41:36: compiler.warn.missing.deprecated.annotation
+B3.java:44:36: compiler.warn.missing.deprecated.annotation
+B3.java:47:36: compiler.warn.missing.deprecated.annotation
+B3.java:31:10: compiler.warn.missing.deprecated.annotation
+7 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test1I.out b/langtools/test/tools/javac/depOverrides/doccomment/Test1I.out
new file mode 100644
index 0000000..67e135c
--- /dev/null
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test1I.out
@@ -0,0 +1,9 @@
+I.java:30:36: compiler.warn.missing.deprecated.annotation
+I.java:31:36: compiler.warn.missing.deprecated.annotation
+I.java:32:36: compiler.warn.missing.deprecated.annotation
+I.java:33:36: compiler.warn.missing.deprecated.annotation
+I.java:34:36: compiler.warn.missing.deprecated.annotation
+I.java:35:36: compiler.warn.missing.deprecated.annotation
+I.java:36:36: compiler.warn.missing.deprecated.annotation
+I.java:37:36: compiler.warn.missing.deprecated.annotation
+8 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test2.java b/langtools/test/tools/javac/depOverrides/doccomment/Test2.java
index 6595ca2..b4fb656 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test2.java
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test2.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
  * @bug 5086088
  * @summary check warnings generated when overriding deprecated methods
  *
- * @compile/ref=empty   -XDrawDiagnostics -Xlint:deprecation P.java
+ * @compile/ref=Test2P.out -XDrawDiagnostics -Xlint:deprecation P.java
  * @compile/ref=Test2Q.out -XDrawDiagnostics -Xlint:deprecation Q.java
  * @compile/ref=Test2R.out -XDrawDiagnostics -Xlint:deprecation R.java
  * @compile/ref=empty   -XDrawDiagnostics -Xlint:deprecation Test2.java
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test2P.out b/langtools/test/tools/javac/depOverrides/doccomment/Test2P.out
new file mode 100644
index 0000000..89147214
--- /dev/null
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test2P.out
@@ -0,0 +1,10 @@
+P.java:30:36: compiler.warn.missing.deprecated.annotation
+P.java:31:36: compiler.warn.missing.deprecated.annotation
+P.java:32:36: compiler.warn.missing.deprecated.annotation
+P.java:33:36: compiler.warn.missing.deprecated.annotation
+P.java:34:36: compiler.warn.missing.deprecated.annotation
+P.java:35:36: compiler.warn.missing.deprecated.annotation
+P.java:36:36: compiler.warn.missing.deprecated.annotation
+P.java:37:36: compiler.warn.missing.deprecated.annotation
+P.java:38:36: compiler.warn.missing.deprecated.annotation
+9 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test2Q.out b/langtools/test/tools/javac/depOverrides/doccomment/Test2Q.out
index 3b6f8c4..f092f2f 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test2Q.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test2Q.out
@@ -1,4 +1,10 @@
+Q.java:8:36: compiler.warn.missing.deprecated.annotation
+Q.java:9:36: compiler.warn.missing.deprecated.annotation
+Q.java:10:36: compiler.warn.missing.deprecated.annotation
 Q.java:11:36: compiler.warn.has.been.deprecated: pDep_qUnd_rDep(), P
 Q.java:12:36: compiler.warn.has.been.deprecated: pDep_qUnd_rUnd(), P
 Q.java:13:36: compiler.warn.has.been.deprecated: pDep_qUnd_rInh(), P
-3 warnings
+Q.java:17:36: compiler.warn.missing.deprecated.annotation
+Q.java:18:36: compiler.warn.missing.deprecated.annotation
+Q.java:19:36: compiler.warn.missing.deprecated.annotation
+9 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test2R.out b/langtools/test/tools/javac/depOverrides/doccomment/Test2R.out
index 181c583..d3f3072 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test2R.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test2R.out
@@ -1,4 +1,10 @@
+R.java:8:36: compiler.warn.missing.deprecated.annotation
 R.java:9:36: compiler.warn.has.been.deprecated: pDep_qDep_rUnd(), Q
+R.java:11:36: compiler.warn.missing.deprecated.annotation
+R.java:14:36: compiler.warn.missing.deprecated.annotation
 R.java:15:36: compiler.warn.has.been.deprecated: pDep_qInh_rUnd(), P
+R.java:17:36: compiler.warn.missing.deprecated.annotation
 R.java:18:36: compiler.warn.has.been.deprecated: pUnd_qDep_rUnd(), Q
-3 warnings
+R.java:20:36: compiler.warn.missing.deprecated.annotation
+R.java:23:36: compiler.warn.missing.deprecated.annotation
+9 warnings
diff --git a/langtools/test/tools/javac/depOverrides/doccomment/Test3.out b/langtools/test/tools/javac/depOverrides/doccomment/Test3.out
index 6d93971..491828e 100644
--- a/langtools/test/tools/javac/depOverrides/doccomment/Test3.out
+++ b/langtools/test/tools/javac/depOverrides/doccomment/Test3.out
@@ -1,2 +1,3 @@
+Test3.java:11:14: compiler.warn.missing.deprecated.annotation
 Test3.java:18:1: compiler.warn.has.been.deprecated: m(), LibInterface
-1 warning
+2 warnings
diff --git a/langtools/test/tools/javac/diags/examples/ProcessorPathNoProcessorModulePath/ProcessorPathNoProcessorModulePath.java b/langtools/test/tools/javac/diags/examples/ProcessorPathNoProcessorModulePath/ProcessorPathNoProcessorModulePath.java
index 2e5d323..11c404c 100644
--- a/langtools/test/tools/javac/diags/examples/ProcessorPathNoProcessorModulePath/ProcessorPathNoProcessorModulePath.java
+++ b/langtools/test/tools/javac/diags/examples/ProcessorPathNoProcessorModulePath/ProcessorPathNoProcessorModulePath.java
@@ -22,6 +22,6 @@
  */
 
 // key: compiler.err.processorpath.no.processormodulepath
-// options: -processormodulepath mods -processorpath mods
+// options: --processor-module-path mods -processorpath mods
 
 class ProcessorPathNoProcessorModulePath {}
diff --git a/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarAwareSJFM.java b/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarAwareSJFM.java
index ae83a78..d89b16c 100644
--- a/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarAwareSJFM.java
+++ b/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarAwareSJFM.java
@@ -174,7 +174,7 @@
         jfm.setLocation(jloc, List.of(new File("multi-release.jar")));
 
         if (version.length() > 0) {
-            jfm.handleOption("-multi-release", List.of(version).iterator());
+            jfm.handleOption("--multi-release", List.of(version).iterator());
         }
 
         CustomClassLoader cldr = new CustomClassLoader(jfm);
diff --git a/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarTest.java b/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarTest.java
index 39e14ab..ce2ce45 100644
--- a/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarTest.java
+++ b/langtools/test/tools/javac/file/MultiReleaseJar/MultiReleaseJarTest.java
@@ -135,12 +135,12 @@
     }
 
     @Test(dataProvider="modes")
-    // javac -d classes -release 8 -cp multi-release.jar Main.java -> succeeds
+    // javac -d classes --release 8 -cp multi-release.jar Main.java -> succeeds
     public void main1Release8(Task.Mode mode) throws Exception {
         tb.writeFile("Main.java", main1);
         Task.Result result = new JavacTask(tb, mode)
                 .outdir("classes")
-                .options("-release", "8")
+                .options("--release", "8")
                 .classpath("multi-release.jar")
                 .files("Main.java")
                 .run();
@@ -149,12 +149,12 @@
     }
 
     @Test(dataProvider="modes")
-    // javac -d classes -release 9 -cp multi-release.jar Main.java -> fails
+    // javac -d classes --release 9 -cp multi-release.jar Main.java -> fails
     public void main1Release9(Task.Mode mode) throws Exception {
         tb.writeFile("Main.java", main1);
         Task.Result result = new JavacTask(tb, mode)
                 .outdir("classes")
-                .options("-release", "9")
+                .options("--release", "9")
                 .classpath("multi-release.jar")
                 .files("Main.java")
                 .run(Task.Expect.FAIL, 1);
@@ -177,12 +177,12 @@
     }
 
     @Test(dataProvider="modes")
-    // javac -d classes -release 8 -cp multi-release.jar Main.java -> fails
+    // javac -d classes --release 8 -cp multi-release.jar Main.java -> fails
     public void main2Release8(Task.Mode mode) throws Exception {
         tb.writeFile("Main.java", main2);
         Task.Result result = new JavacTask(tb, mode)
                 .outdir("classes")
-                .options("-release", "8")
+                .options("--release", "8")
                 .classpath("multi-release.jar")
                 .files("Main.java")
                 .run(Task.Expect.FAIL, 1);
@@ -191,12 +191,12 @@
     }
 
     @Test(dataProvider="modes")
-    // javac -d classes -release 9 -cp multi-release.jar Main.java -> succeeds
+    // javac -d classes --release 9 -cp multi-release.jar Main.java -> succeeds
     public void main2Release9(Task.Mode mode) throws Exception {
         tb.writeFile("Main.java", main2);
         Task.Result result = new JavacTask(tb, mode)
                 .outdir("classes")
-                .options("-release", "9")
+                .options("--release", "9")
                 .classpath("multi-release.jar")
                 .files("Main.java")
                 .run();
diff --git a/langtools/test/tools/javac/lint/Deprecation.out b/langtools/test/tools/javac/lint/Deprecation.out
index c16983b..9ddc2da 100644
--- a/langtools/test/tools/javac/lint/Deprecation.out
+++ b/langtools/test/tools/javac/lint/Deprecation.out
@@ -1,4 +1,5 @@
-Deprecation.java:14:17: compiler.warn.has.been.deprecated: A, compiler.misc.unnamed.package
+Deprecation.java:11:1: compiler.warn.missing.deprecated.annotation
 - compiler.err.warnings.and.werror
+Deprecation.java:14:17: compiler.warn.has.been.deprecated: A, compiler.misc.unnamed.package
 1 error
-1 warning
+2 warnings
diff --git a/langtools/test/tools/javac/modules/AnachronisticModuleInfo/AnachronisticModuleInfoTest.java b/langtools/test/tools/javac/modules/AnachronisticModuleInfo/AnachronisticModuleInfoTest.java
index 0ac82ec..5553983 100644
--- a/langtools/test/tools/javac/modules/AnachronisticModuleInfo/AnachronisticModuleInfoTest.java
+++ b/langtools/test/tools/javac/modules/AnachronisticModuleInfo/AnachronisticModuleInfoTest.java
@@ -78,7 +78,7 @@
 
         String log = new JavacTask(tb, Task.Mode.CMDLINE)
                 .options("-XDrawDiagnostics",
-                        "-upgrademodulepath", modulePath)
+                        "--upgrade-module-path", modulePath)
                 .files(findJavaFiles(src))
                 .run(Task.Expect.FAIL)
                 .writeAll()
diff --git a/langtools/test/tools/javac/modules/T8160454/NPEGetDirectivesTest.java b/langtools/test/tools/javac/modules/T8160454/NPEGetDirectivesTest.java
new file mode 100644
index 0000000..a253883
--- /dev/null
+++ b/langtools/test/tools/javac/modules/T8160454/NPEGetDirectivesTest.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8160454
+ * @summary JSR269 jigsaw update: javax.lang.model.element.ModuleElement.getDirectives() causes NPE on unnamed modules
+ * @modules
+ *      jdk.compiler/com.sun.tools.javac.code
+ *      jdk.compiler/com.sun.tools.javac.util
+ * @compile NPEGetDirectivesTest.java
+ * @compile -processor NPEGetDirectivesTest NPEGetDirectivesTest.java
+ */
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.*;
+
+import java.util.Set;
+
+import com.sun.tools.javac.code.Directive.RequiresDirective;
+import com.sun.tools.javac.code.Symbol.ModuleSymbol;
+import com.sun.tools.javac.util.Assert;
+
+import static com.sun.tools.javac.code.Directive.RequiresFlag.MANDATED;
+
+@SupportedAnnotationTypes("*")
+public class NPEGetDirectivesTest extends AbstractProcessor {
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        for (Element e: roundEnv.getRootElements()) {
+            Element m = e.getEnclosingElement();
+            while (!(m instanceof ModuleElement)) {
+                m = m.getEnclosingElement();
+            }
+            ((ModuleSymbol)m).getDirectives();
+            RequiresDirective requiresDirective = ((ModuleSymbol)m).requires.head;
+            Assert.check(requiresDirective.getDependency().getQualifiedName().toString().equals("java.base"));
+            Assert.check(requiresDirective.flags.contains(MANDATED));
+        }
+        return false;
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
diff --git a/langtools/test/tools/javac/modules/UpgradeModulePathTest.java b/langtools/test/tools/javac/modules/UpgradeModulePathTest.java
index cd83ef4..1a923e9 100644
--- a/langtools/test/tools/javac/modules/UpgradeModulePathTest.java
+++ b/langtools/test/tools/javac/modules/UpgradeModulePathTest.java
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @summary tests for -upgrademodulepath
+ * @summary tests for --upgrade-module-path
  * @library /tools/lib
  * @modules
  *      jdk.compiler/com.sun.tools.javac.api
diff --git a/langtools/test/tools/javac/modules/XModuleTest.java b/langtools/test/tools/javac/modules/XModuleTest.java
index b4f49f6..5dc5d8f 100644
--- a/langtools/test/tools/javac/modules/XModuleTest.java
+++ b/langtools/test/tools/javac/modules/XModuleTest.java
@@ -27,7 +27,9 @@
  * @library /tools/lib
  * @modules
  *      jdk.compiler/com.sun.tools.javac.api
+ *      jdk.compiler/com.sun.tools.javac.code
  *      jdk.compiler/com.sun.tools.javac.main
+ *      jdk.compiler/com.sun.tools.javac.processing
  * @build toolbox.ToolBox toolbox.JavacTask toolbox.ModuleBuilder ModuleTestBase
  * @run main XModuleTest
  */
@@ -35,12 +37,22 @@
 import java.nio.file.Path;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Set;
 
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.ModuleElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.processing.JavacProcessingEnvironment;
 import toolbox.JavacTask;
 import toolbox.ModuleBuilder;
 import toolbox.Task;
-import toolbox.TestRunner;
-import toolbox.ToolBox;
+import toolbox.Task.Expect;
 
 public class XModuleTest extends ModuleTestBase {
 
@@ -111,15 +123,22 @@
         Path classes = base.resolve("classes");
         tb.createDirectories(classes);
 
-        String log = new JavacTask(tb)
-                .options("-Xmodule:java.compiler", "--class-path", cpClasses.toString())
+        List<String> log = new JavacTask(tb)
+                .options("-Xmodule:java.compiler",
+                         "--class-path", cpClasses.toString(),
+                         "-XDrawDiagnostics")
                 .outdir(classes)
                 .files(src.resolve("javax/lang/model/element/Extra.java"))
-                .run()
+                .run(Expect.FAIL)
                 .writeAll()
-                .getOutput(Task.OutputKind.DIRECT);
+                .getOutputLines(Task.OutputKind.DIRECT);
 
-        if (!log.isEmpty())
+        List<String> expectedOut = Arrays.asList(
+                "Extra.java:1:76: compiler.err.doesnt.exist: p",
+                "1 error"
+        );
+
+        if (!expectedOut.equals(log))
             throw new Exception("expected output not found: " + log);
     }
 
@@ -302,4 +321,103 @@
                 .run()
                 .writeAll();
     }
+
+    @Test
+    public void testUnnamedIsolation(Path base) throws Exception {
+        //note: avoiding use of java.base, as that gets special handling on some places:
+        Path sourcePath = base.resolve("source-path");
+        tb.writeJavaFiles(sourcePath, "package src; public class Src {}");
+
+        Path classPathSrc = base.resolve("class-path-src");
+        tb.writeJavaFiles(classPathSrc, "package cp; public class CP { }");
+        Path classPath = base.resolve("classPath");
+        tb.createDirectories(classPath);
+
+        String cpLog = new JavacTask(tb)
+                .outdir(classPath)
+                .files(findJavaFiles(classPathSrc))
+                .run()
+                .writeAll()
+                .getOutput(Task.OutputKind.DIRECT);
+
+        if (!cpLog.isEmpty())
+            throw new Exception("expected output not found: " + cpLog);
+
+        Path modulePathSrc = base.resolve("module-path-src");
+        tb.writeJavaFiles(modulePathSrc,
+                          "module m {}",
+                          "package m; public class M {}");
+        Path modulePath = base.resolve("modulePath");
+        tb.createDirectories(modulePath.resolve("m"));
+
+        String modLog = new JavacTask(tb)
+                .outdir(modulePath.resolve("m"))
+                .files(findJavaFiles(modulePathSrc))
+                .run()
+                .writeAll()
+                .getOutput(Task.OutputKind.DIRECT);
+
+        if (!modLog.isEmpty())
+            throw new Exception("expected output not found: " + modLog);
+
+        Path src = base.resolve("src");
+        tb.writeJavaFiles(src, "package m; public class Extra { }");
+        Path classes = base.resolve("classes");
+        tb.createDirectories(classes);
+
+        String log = new JavacTask(tb)
+                .options("-Xmodule:m",
+                         "--class-path", classPath.toString(),
+                         "--source-path", sourcePath.toString(),
+                         "--module-path", modulePath.toString(),
+                         "--processor-path", System.getProperty("test.classes"),
+                         "-XDaccessInternalAPI=true",
+                         "-processor", CheckModuleContentProcessing.class.getName())
+                .outdir(classes)
+                .files(findJavaFiles(sourcePath))
+                .run()
+                .writeAll()
+                .getOutput(Task.OutputKind.DIRECT);
+
+        if (!log.isEmpty())
+            throw new Exception("expected output not found: " + log);
+    }
+
+    @SupportedAnnotationTypes("*")
+    public static final class CheckModuleContentProcessing extends AbstractProcessor {
+
+        @Override
+        public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+            Symtab syms = Symtab.instance(((JavacProcessingEnvironment) processingEnv).getContext());
+            Elements elements = processingEnv.getElementUtils();
+            ModuleElement unnamedModule = syms.unnamedModule;
+            ModuleElement mModule = elements.getModuleElement("m");
+
+            assertNonNull("mModule found", mModule);
+            assertNonNull("src.Src from m", elements.getTypeElement(mModule, "src.Src"));
+            assertNull("cp.CP not from m", elements.getTypeElement(mModule, "cp.CP"));
+            assertNull("src.Src not from unnamed", elements.getTypeElement(unnamedModule, "src.Src"));
+            assertNonNull("cp.CP from unnamed", elements.getTypeElement(unnamedModule, "cp.CP"));
+
+            return false;
+        }
+
+        @Override
+        public SourceVersion getSupportedSourceVersion() {
+            return SourceVersion.latest();
+        }
+
+        private static void assertNonNull(String msg, Object val) {
+            if (val == null) {
+                throw new AssertionError(msg);
+            }
+        }
+
+        private static void assertNull(String msg, Object val) {
+            if (val != null) {
+                throw new AssertionError(msg);
+            }
+        }
+    }
+
 }
diff --git a/langtools/test/tools/javac/options/release/ReleaseOption.java b/langtools/test/tools/javac/options/release/ReleaseOption.java
index 58f3a1d..2a7566a 100644
--- a/langtools/test/tools/javac/options/release/ReleaseOption.java
+++ b/langtools/test/tools/javac/options/release/ReleaseOption.java
@@ -1,9 +1,9 @@
 /**
  * @test /nodynamiccopyright/
  * @bug 8072480
- * @summary Verify that javac rejects Java 8 program with -release 7
+ * @summary Verify that javac rejects Java 8 program with --release 7
  * @compile ReleaseOption.java
- * @compile/fail/ref=ReleaseOption-release7.out -XDrawDiagnostics -release 7 ReleaseOption.java
+ * @compile/fail/ref=ReleaseOption-release7.out -XDrawDiagnostics --release 7 ReleaseOption.java
  */
 
 interface ReleaseOption extends java.util.stream.Stream {
diff --git a/langtools/test/tools/javac/options/release/ReleaseOptionClashes.java b/langtools/test/tools/javac/options/release/ReleaseOptionClashes.java
index f16e508..80c8f6c 100644
--- a/langtools/test/tools/javac/options/release/ReleaseOptionClashes.java
+++ b/langtools/test/tools/javac/options/release/ReleaseOptionClashes.java
@@ -24,7 +24,7 @@
 /**
  * @test
  * @bug 8072480
- * @summary Verify option clash between -release and -source is reported correctly.
+ * @summary Verify option clash between --release and -source is reported correctly.
  * @modules jdk.compiler/com.sun.tools.javac.util
  */
 
@@ -62,7 +62,7 @@
         useRawMessages.setBoolean(null, true);
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         List<String> options = new ArrayList<>();
-        options.addAll(Arrays.asList("-release", "7"));
+        options.addAll(Arrays.asList("--release", "7"));
         options.addAll(Arrays.asList(args));
         options.add(System.getProperty("test.src") + File.separator + "ReleaseOptionClashes.java");
         compiler.run(null, null, out, options.toArray(new String[0]));
diff --git a/langtools/test/tools/javac/options/release/ReleaseOptionThroughAPI.java b/langtools/test/tools/javac/options/release/ReleaseOptionThroughAPI.java
index 705b395..3196e8c 100644
--- a/langtools/test/tools/javac/options/release/ReleaseOptionThroughAPI.java
+++ b/langtools/test/tools/javac/options/release/ReleaseOptionThroughAPI.java
@@ -24,7 +24,7 @@
 /**
  * @test
  * @bug 8072480
- * @summary Verify that javac can handle -release when invoked using the Compiler API
+ * @summary Verify that javac can handle --release when invoked using the Compiler API
  */
 
 import java.io.IOException;
@@ -50,7 +50,7 @@
              PrintWriter outWriter = new PrintWriter(out)) {
             Iterable<? extends JavaFileObject> input =
                     fm.getJavaFileObjects(System.getProperty("test.src") + "/ReleaseOption.java");
-            List<String> options = Arrays.asList("-release", "7", "-XDrawDiagnostics");
+            List<String> options = Arrays.asList("--release", "7", "-XDrawDiagnostics");
 
             compiler.getTask(outWriter, fm, null, options, null, input).call();
             String expected =
diff --git a/langtools/test/tools/javac/platform/PlatformProviderTest.java b/langtools/test/tools/javac/platform/PlatformProviderTest.java
index 52cb7e3..2481d02 100644
--- a/langtools/test/tools/javac/platform/PlatformProviderTest.java
+++ b/langtools/test/tools/javac/platform/PlatformProviderTest.java
@@ -101,7 +101,7 @@
                            "-J--add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED",
                            "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
                            "-XDrawDiagnostics",
-                           "-release",
+                           "--release",
                            platformSpec,
                            System.getProperty("test.src") + "/PlatformProviderTestSource.java")
                   .run();
@@ -135,7 +135,7 @@
                   .options("-J--class-path=" + System.getProperty("test.classes"),
                            "-J--add-exports=jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED",
                            "-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
-                           "-release",
+                           "--release",
                            "fail",
                            System.getProperty("test.src") + "/PlatformProviderTestSource.java")
                   .run(Task.Expect.FAIL);
diff --git a/langtools/test/tools/javac/sym/ElementStructureTest.java b/langtools/test/tools/javac/sym/ElementStructureTest.java
index 55bc75d..7a85c82 100644
--- a/langtools/test/tools/javac/sym/ElementStructureTest.java
+++ b/langtools/test/tools/javac/sym/ElementStructureTest.java
@@ -255,7 +255,7 @@
     }
 
     void run(Writer output, String version) throws Exception {
-        List<String> options = Arrays.asList("-release", version, "-classpath", "");
+        List<String> options = Arrays.asList("--release", version, "-classpath", "");
         List<ToolBox.JavaSource> files = Arrays.asList(new ToolBox.JavaSource("Test", ""));
         JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
         JavacTaskImpl task = (JavacTaskImpl) compiler.getTask(null, null, null, options, null, files);
diff --git a/langtools/test/tools/javac/synthesize/Main.java b/langtools/test/tools/javac/synthesize/Main.java
index 5817142..d92cff2 100644
--- a/langtools/test/tools/javac/synthesize/Main.java
+++ b/langtools/test/tools/javac/synthesize/Main.java
@@ -99,7 +99,7 @@
         if (stdBootClassPath) {
             args.add("-Xmodule:java.base");
         } else {
-            args.add("-system");
+            args.add("--system");
             args.add("none");
             files.add("module-info.java");
         }
diff --git a/langtools/test/tools/javac/tree/JavacTreeScannerTest.java b/langtools/test/tools/javac/tree/JavacTreeScannerTest.java
index e2b7676..24519b4 100644
--- a/langtools/test/tools/javac/tree/JavacTreeScannerTest.java
+++ b/langtools/test/tools/javac/tree/JavacTreeScannerTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@
  *          jdk.compiler/com.sun.tools.javac.tree
  *          jdk.compiler/com.sun.tools.javac.util
  * @build AbstractTreeScannerTest JavacTreeScannerTest
- * @run main JavacTreeScannerTest -q -r .
+ * @run main/othervm JavacTreeScannerTest -q -r .
  */
 
 import java.io.*;
diff --git a/langtools/test/tools/javac/tree/SourceTreeScannerTest.java b/langtools/test/tools/javac/tree/SourceTreeScannerTest.java
index 5882037..1d1bc2c 100644
--- a/langtools/test/tools/javac/tree/SourceTreeScannerTest.java
+++ b/langtools/test/tools/javac/tree/SourceTreeScannerTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,7 +41,7 @@
  *          jdk.compiler/com.sun.tools.javac.tree
  *          jdk.compiler/com.sun.tools.javac.util
  * @build AbstractTreeScannerTest SourceTreeScannerTest
- * @run main SourceTreeScannerTest -q -r .
+ * @run main/othervm SourceTreeScannerTest -q -r .
  */
 
 import java.io.*;
diff --git a/langtools/test/tools/javadoc/ReleaseOption.java b/langtools/test/tools/javadoc/ReleaseOption.java
index d786e36..54e505c 100644
--- a/langtools/test/tools/javadoc/ReleaseOption.java
+++ b/langtools/test/tools/javadoc/ReleaseOption.java
@@ -34,7 +34,7 @@
 /**
  * @test
  * @bug 8086737
- * @summary Test -release option in javadoc
+ * @summary Test --release option in javadoc
  * @run main ReleaseOption
  */
 public class ReleaseOption {
@@ -43,10 +43,10 @@
     }
 
     void run() {
-        doRunTest(0, out -> out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "7");
-        doRunTest(0, out -> !out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "8");
-        doRunTest(1, out -> true, "-release", "7", "-source", "7");
-        doRunTest(1, out -> true, "-release", "7", "-bootclasspath", "any");
+        doRunTest(0, out -> out.contains("compiler.err.doesnt.exist: java.util.stream"), "--release", "7");
+        doRunTest(0, out -> !out.contains("compiler.err.doesnt.exist: java.util.stream"), "--release", "8");
+        doRunTest(1, out -> true, "--release", "7", "-source", "7");
+        doRunTest(1, out -> true, "--release", "7", "-bootclasspath", "any");
     }
 
     void doRunTest(int expectedResult, Predicate<String> validate, String... args) {
diff --git a/langtools/test/tools/lib/toolbox/ModuleBuilder.java b/langtools/test/tools/lib/toolbox/ModuleBuilder.java
index fc2b044..8c73902 100644
--- a/langtools/test/tools/lib/toolbox/ModuleBuilder.java
+++ b/langtools/test/tools/lib/toolbox/ModuleBuilder.java
@@ -205,7 +205,7 @@
                 .collect(Collectors.joining(File.pathSeparator));
         new JavacTask(tb)
                 .outdir(Files.createDirectories(modules.resolve(name)))
-                .options("-mp", mp)
+                .options("--module-path", mp)
                 .files(tb.findJavaFiles(moduleSrc))
                 .run()
                 .writeAll();
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
index 65e4393..9023aba 100644
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -504,7 +504,7 @@
         $($(MODULE)_ADD_JAVAC_FLAGS) \
         --module-source-path $(MODULESOURCEPATH) \
         --module-path $(MODULEPATH) \
-        -system none, \
+        --system none, \
 ))
 
 TARGETS += $($(MODULE)) $($(MODULE)_COPY_EXTRA)
diff --git a/make/Images.gmk b/make/Images.gmk
index c7df894..75a8cb5 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -116,8 +116,10 @@
 JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
 
 JLINK_ORDER_RESOURCES := **module-info.class
+JLINK_JLI_CLASSES :=
 ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
   JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/classlist/classlist
+  JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/classlist/jli_trace.out
 endif
 JLINK_ORDER_RESOURCES += \
     /java.base/java/** \
@@ -131,6 +133,7 @@
     --endian $(OPENJDK_BUILD_CPU_ENDIAN) \
     --release-info $(BASE_RELEASE_FILE) \
     --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
+    $(JLINK_JLI_CLASSES) \
     #
 
 ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
diff --git a/make/Init.gmk b/make/Init.gmk
index 6ed612b..15ae487 100644
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -314,6 +314,9 @@
         endif
 
     on-failure:
+	$(call CleanupSmartJavac)
+	$(call StopGlobalTimer)
+	$(call ReportBuildTimes)
 	$(call PrintFailureReports)
 	$(call PrintBuildLogFailures)
 	$(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n"
diff --git a/make/common/SetupJavaCompilers.gmk b/make/common/SetupJavaCompilers.gmk
index 52b2cc3..65fc170 100644
--- a/make/common/SetupJavaCompilers.gmk
+++ b/make/common/SetupJavaCompilers.gmk
@@ -88,7 +88,7 @@
 $(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
     JVM := $(JAVA_SMALL), \
     JAVAC := $(NEW_JAVAC), \
-    FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules -system none $(DISABLE_WARNINGS), \
+    FLAGS := --upgrade-module-path $(JDK_OUTPUTDIR)/modules --system none $(DISABLE_WARNINGS), \
     SERVER_DIR := $(SJAVAC_SERVER_DIR), \
     SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
 
diff --git a/make/common/TestFilesCompilation.gmk b/make/common/TestFilesCompilation.gmk
index 1dd40a0..74414a9 100644
--- a/make/common/TestFilesCompilation.gmk
+++ b/make/common/TestFilesCompilation.gmk
@@ -86,6 +86,7 @@
         LANG := C, \
         CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$($1_PREFIX)$$(name)), \
         LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$($1_PREFIX)$$(name)), \
+        LIBS := $$($1_LIBS_$$($1_PREFIX)$$(name)), \
         OPTIMIZATION := LOW, \
     )) \
     $$(eval $1 += $$(BUILD_TEST_$$(name)) )  \
diff --git a/make/test/BuildTestLib.gmk b/make/test/BuildTestLib.gmk
index 382341a..7593ac7 100644
--- a/make/test/BuildTestLib.gmk
+++ b/make/test/BuildTestLib.gmk
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@
 # test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
 $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
     SETUP := GENERATE_USINGJDKBYTECODE, \
-    SRC := $(TEST_LIB_SOURCE_DIR)/share/classes/jdk/test/lib/hprof, \
+    SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/lib/hprof, \
     BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
     JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
 ))
diff --git a/nashorn/.hgtags b/nashorn/.hgtags
index f68987a..344e197 100644
--- a/nashorn/.hgtags
+++ b/nashorn/.hgtags
@@ -367,3 +367,4 @@
 ee77c6b3713ab293e027ac3ea1cc16f86dac535f jdk-9+131
 55a75af751dfe44039baef2b762ee7347021025b jdk-9+132
 3a924b820d02b108cf57b51e145b5150d1eedcca jdk-9+133
+e05400ba935753c77697af936db24657eb811022 jdk-9+134
diff --git a/hotspot/test/testlibrary/ClassFileInstaller.java b/test/lib/ClassFileInstaller.java
similarity index 100%
rename from hotspot/test/testlibrary/ClassFileInstaller.java
rename to test/lib/ClassFileInstaller.java
diff --git a/hotspot/test/testlibrary/RedefineClassHelper.java b/test/lib/RedefineClassHelper.java
similarity index 96%
rename from hotspot/test/testlibrary/RedefineClassHelper.java
rename to test/lib/RedefineClassHelper.java
index 6baddd8..7576809 100644
--- a/hotspot/test/testlibrary/RedefineClassHelper.java
+++ b/test/lib/RedefineClassHelper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 import java.io.PrintWriter;
 import java.lang.instrument.*;
-import jdk.test.lib.*;
+import jdk.test.lib.InMemoryJavaCompiler;
 
 /*
  * Helper class to write tests that redefine classes.
diff --git a/test/lib/share/classes/jdk/test/lib/Asserts.java b/test/lib/jdk/test/lib/Asserts.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/Asserts.java
rename to test/lib/jdk/test/lib/Asserts.java
index f0be92e..8aa0105d 100644
--- a/test/lib/share/classes/jdk/test/lib/Asserts.java
+++ b/test/lib/jdk/test/lib/Asserts.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/BuildHelper.java b/test/lib/jdk/test/lib/BuildHelper.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/BuildHelper.java
rename to test/lib/jdk/test/lib/BuildHelper.java
index e9f3cae..1e9d697b 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/BuildHelper.java
+++ b/test/lib/jdk/test/lib/BuildHelper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/ByteCodeLoader.java b/test/lib/jdk/test/lib/ByteCodeLoader.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/ByteCodeLoader.java
rename to test/lib/jdk/test/lib/ByteCodeLoader.java
index 9e5fa32..14f98f8 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/ByteCodeLoader.java
+++ b/test/lib/jdk/test/lib/ByteCodeLoader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/DynamicVMOption.java b/test/lib/jdk/test/lib/DynamicVMOption.java
similarity index 98%
rename from hotspot/test/testlibrary/jdk/test/lib/DynamicVMOption.java
rename to test/lib/jdk/test/lib/DynamicVMOption.java
index 5d0f100..17f545e 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/DynamicVMOption.java
+++ b/test/lib/jdk/test/lib/DynamicVMOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java b/test/lib/jdk/test/lib/FileInstaller.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java
rename to test/lib/jdk/test/lib/FileInstaller.java
index 7a8e3b8..1247dee 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java
+++ b/test/lib/jdk/test/lib/FileInstaller.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/InMemoryJavaCompiler.java b/test/lib/jdk/test/lib/InMemoryJavaCompiler.java
similarity index 98%
rename from hotspot/test/testlibrary/jdk/test/lib/InMemoryJavaCompiler.java
rename to test/lib/jdk/test/lib/InMemoryJavaCompiler.java
index 8384b28..5fb78e4 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/InMemoryJavaCompiler.java
+++ b/test/lib/jdk/test/lib/InMemoryJavaCompiler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/JDKToolFinder.java b/test/lib/jdk/test/lib/JDKToolFinder.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/JDKToolFinder.java
rename to test/lib/jdk/test/lib/JDKToolFinder.java
index 3ad008e..a9a3598 100644
--- a/test/lib/share/classes/jdk/test/lib/JDKToolFinder.java
+++ b/test/lib/jdk/test/lib/JDKToolFinder.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/JDKToolLauncher.java b/test/lib/jdk/test/lib/JDKToolLauncher.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/JDKToolLauncher.java
rename to test/lib/jdk/test/lib/JDKToolLauncher.java
index 3948d47..38e7b45 100644
--- a/test/lib/share/classes/jdk/test/lib/JDKToolLauncher.java
+++ b/test/lib/jdk/test/lib/JDKToolLauncher.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
-import jdk.test.lib.process.*;
+import jdk.test.lib.process.ProcessTools;
 
 /**
  * A utility for constructing command lines for starting JDK tool processes.
diff --git a/test/lib/share/classes/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/Platform.java
rename to test/lib/jdk/test/lib/Platform.java
index 8c55f09..ec4fa8b 100644
--- a/test/lib/share/classes/jdk/test/lib/Platform.java
+++ b/test/lib/jdk/test/lib/Platform.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
     private static final String osName      = System.getProperty("os.name");
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
     private static final String vmVersion   = System.getProperty("java.vm.version");
-    private static final String javaVersion = System.getProperty("java.version");
+    private static final String jdkDebug    = System.getProperty("jdk.debug");
     private static final String osArch      = System.getProperty("os.arch");
     private static final String userName    = System.getProperty("user.name");
     private static final String compiler    = System.getProperty("sun.management.compiler");
@@ -113,8 +113,7 @@
     }
 
     public static boolean isDebugBuild() {
-        return (vmVersion.toLowerCase().contains("debug") ||
-                javaVersion.toLowerCase().contains("debug"));
+        return (jdkDebug.toLowerCase().contains("debug"));
     }
 
     public static String getVMVersion() {
diff --git a/test/lib/share/classes/jdk/test/lib/Utils.java b/test/lib/jdk/test/lib/Utils.java
similarity index 91%
rename from test/lib/share/classes/jdk/test/lib/Utils.java
rename to test/lib/jdk/test/lib/Utils.java
index 95e2bbab..aececb0 100644
--- a/test/lib/share/classes/jdk/test/lib/Utils.java
+++ b/test/lib/jdk/test/lib/Utils.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,10 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Objects;
 import java.util.Random;
 import java.util.function.BooleanSupplier;
 import java.util.concurrent.TimeUnit;
@@ -50,8 +53,9 @@
 import java.util.regex.Pattern;
 import jdk.internal.misc.Unsafe;
 
-import jdk.test.lib.process.*;
 import static jdk.test.lib.Asserts.assertTrue;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /**
  * Common library for various test helper functions.
@@ -447,6 +451,23 @@
     }
 
     /**
+     * Returns random element of non empty array
+     *
+     * @param <T> a type of array element
+     * @param array array of elements
+     * @return random element of array
+     * @throws IllegalArgumentException if array is empty
+     */
+    public static <T> T getRandomElement(T[] array)
+            throws IllegalArgumentException {
+        if (array == null || array.length == 0) {
+            throw new IllegalArgumentException("Empty or null array");
+        }
+        Random random = getRandomInstance();
+        return array[random.nextInt(array.length)];
+    }
+
+    /**
      * Wait for condition to be true
      *
      * @param condition, a condition to wait for
@@ -636,5 +657,38 @@
         }
         return result;
     }
+
+    public static Object[] getNullValues(Class<?>... types) {
+        Object[] result = new Object[types.length];
+        int i = 0;
+        for (Class<?> type : types) {
+            result[i++] = NULL_VALUES.get(type);
+        }
+        return result;
+    }
+    private static Map<Class<?>, Object> NULL_VALUES = new HashMap<>();
+    static {
+        NULL_VALUES.put(boolean.class, false);
+        NULL_VALUES.put(byte.class, (byte) 0);
+        NULL_VALUES.put(short.class, (short) 0);
+        NULL_VALUES.put(char.class, '\0');
+        NULL_VALUES.put(int.class, 0);
+        NULL_VALUES.put(long.class, 0L);
+        NULL_VALUES.put(float.class, 0.0f);
+        NULL_VALUES.put(double.class, 0.0d);
+    }
+
+    /**
+     * Returns mandatory property value
+     * @param propName is a name of property to request
+     * @return a String with requested property value
+     */
+    public static String getMandatoryProperty(String propName) {
+        Objects.requireNonNull(propName, "Requested null property");
+        String prop = System.getProperty(propName);
+        Objects.requireNonNull(prop,
+                String.format("A mandatory property '%s' isn't set", propName));
+        return prop;
+    }
 }
 
diff --git a/test/lib/share/classes/jdk/test/lib/apps/LingeredApp.java b/test/lib/jdk/test/lib/apps/LingeredApp.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/apps/LingeredApp.java
rename to test/lib/jdk/test/lib/apps/LingeredApp.java
index d5675a3..ac375b6 100644
--- a/test/lib/share/classes/jdk/test/lib/apps/LingeredApp.java
+++ b/test/lib/jdk/test/lib/apps/LingeredApp.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/apps/LingeredAppWithDeadlock.java b/test/lib/jdk/test/lib/apps/LingeredAppWithDeadlock.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/apps/LingeredAppWithDeadlock.java
rename to test/lib/jdk/test/lib/apps/LingeredAppWithDeadlock.java
index 85d96f2..2b52c15 100644
--- a/test/lib/share/classes/jdk/test/lib/apps/LingeredAppWithDeadlock.java
+++ b/test/lib/jdk/test/lib/apps/LingeredAppWithDeadlock.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java b/test/lib/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java
rename to test/lib/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java
index 328d91f..121d81d 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java
+++ b/test/lib/jdk/test/lib/cli/CPUSpecificCommandLineOptionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java
similarity index 98%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java
rename to test/lib/jdk/test/lib/cli/CommandLineOptionTest.java
index 5fd3326..f794ef3 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/CommandLineOptionTest.java
+++ b/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,11 @@
 import java.util.Collections;
 import java.util.function.BooleanSupplier;
 
-import jdk.test.lib.*;
+import jdk.test.lib.process.ExitCode;
+import jdk.test.lib.process.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.Platform;
+import jdk.test.lib.Utils;
 
 /**
  * Base class for command line option tests.
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/AndPredicate.java b/test/lib/jdk/test/lib/cli/predicate/AndPredicate.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/predicate/AndPredicate.java
rename to test/lib/jdk/test/lib/cli/predicate/AndPredicate.java
index 5081c32..1e70abc 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/AndPredicate.java
+++ b/test/lib/jdk/test/lib/cli/predicate/AndPredicate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java b/test/lib/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java
rename to test/lib/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java
index 228c027..69f753f 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java
+++ b/test/lib/jdk/test/lib/cli/predicate/CPUSpecificPredicate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/NotPredicate.java b/test/lib/jdk/test/lib/cli/predicate/NotPredicate.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/predicate/NotPredicate.java
rename to test/lib/jdk/test/lib/cli/predicate/NotPredicate.java
index 846ee0a..481f878 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/NotPredicate.java
+++ b/test/lib/jdk/test/lib/cli/predicate/NotPredicate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/OrPredicate.java b/test/lib/jdk/test/lib/cli/predicate/OrPredicate.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/cli/predicate/OrPredicate.java
rename to test/lib/jdk/test/lib/cli/predicate/OrPredicate.java
index 134eaa6..35f5e97 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/cli/predicate/OrPredicate.java
+++ b/test/lib/jdk/test/lib/cli/predicate/OrPredicate.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutor.java b/test/lib/jdk/test/lib/dcmd/CommandExecutor.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutor.java
rename to test/lib/jdk/test/lib/dcmd/CommandExecutor.java
index dfae041..e8c5791 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/CommandExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.dcmd;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 /**
  * Abstract base class for Diagnostic Command executors
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java b/test/lib/jdk/test/lib/dcmd/CommandExecutorException.java
similarity index 94%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
rename to test/lib/jdk/test/lib/dcmd/CommandExecutorException.java
index 8737e56..89aa1b3 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/CommandExecutorException.java
+++ b/test/lib/jdk/test/lib/dcmd/CommandExecutorException.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/FileJcmdExecutor.java b/test/lib/jdk/test/lib/dcmd/FileJcmdExecutor.java
similarity index 96%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/FileJcmdExecutor.java
rename to test/lib/jdk/test/lib/dcmd/FileJcmdExecutor.java
index 17ffd91..563b65f 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/FileJcmdExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/FileJcmdExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/JMXExecutor.java b/test/lib/jdk/test/lib/dcmd/JMXExecutor.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/JMXExecutor.java
rename to test/lib/jdk/test/lib/dcmd/JMXExecutor.java
index f0a8d3f..677b5db 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/JMXExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/JMXExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.dcmd;
 
-import jdk.test.lib.OutputAnalyzer;
+import jdk.test.lib.process.OutputAnalyzer;
 
 import javax.management.*;
 import javax.management.remote.JMXConnector;
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/JcmdExecutor.java b/test/lib/jdk/test/lib/dcmd/JcmdExecutor.java
similarity index 92%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/JcmdExecutor.java
rename to test/lib/jdk/test/lib/dcmd/JcmdExecutor.java
index ad59364..6bf940c 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/JcmdExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/JcmdExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,8 @@
 package jdk.test.lib.dcmd;
 
 import jdk.test.lib.JDKToolFinder;
-import jdk.test.lib.OutputAnalyzer;
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.OutputAnalyzer;
+import jdk.test.lib.process.ProcessTools;
 
 import java.util.List;
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/MainClassJcmdExecutor.java b/test/lib/jdk/test/lib/dcmd/MainClassJcmdExecutor.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/MainClassJcmdExecutor.java
rename to test/lib/jdk/test/lib/dcmd/MainClassJcmdExecutor.java
index d651b60..84608c1 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/MainClassJcmdExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/MainClassJcmdExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/dcmd/PidJcmdExecutor.java b/test/lib/jdk/test/lib/dcmd/PidJcmdExecutor.java
similarity index 93%
rename from hotspot/test/testlibrary/jdk/test/lib/dcmd/PidJcmdExecutor.java
rename to test/lib/jdk/test/lib/dcmd/PidJcmdExecutor.java
index f1caddb..25b3f53 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/dcmd/PidJcmdExecutor.java
+++ b/test/lib/jdk/test/lib/dcmd/PidJcmdExecutor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 package jdk.test.lib.dcmd;
 
-import jdk.test.lib.ProcessTools;
+import jdk.test.lib.process.ProcessTools;
 
 import java.util.Arrays;
 import java.util.List;
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/HprofParser.java b/test/lib/jdk/test/lib/hprof/HprofParser.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/HprofParser.java
rename to test/lib/jdk/test/lib/hprof/HprofParser.java
index cb39c0d..88841f9 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/HprofParser.java
+++ b/test/lib/jdk/test/lib/hprof/HprofParser.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/README b/test/lib/jdk/test/lib/hprof/README
similarity index 100%
rename from test/lib/share/classes/jdk/test/lib/hprof/README
rename to test/lib/jdk/test/lib/hprof/README
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java b/test/lib/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java
rename to test/lib/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java
index dcaf362..4624347 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java
+++ b/test/lib/jdk/test/lib/hprof/model/AbstractJavaHeapObjectVisitor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/ArrayTypeCodes.java b/test/lib/jdk/test/lib/hprof/model/ArrayTypeCodes.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/ArrayTypeCodes.java
rename to test/lib/jdk/test/lib/hprof/model/ArrayTypeCodes.java
index d3c9a9e..c6ac3ac 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/ArrayTypeCodes.java
+++ b/test/lib/jdk/test/lib/hprof/model/ArrayTypeCodes.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/HackJavaValue.java b/test/lib/jdk/test/lib/hprof/model/HackJavaValue.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/HackJavaValue.java
rename to test/lib/jdk/test/lib/hprof/model/HackJavaValue.java
index fda40a9..6da7b2d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/HackJavaValue.java
+++ b/test/lib/jdk/test/lib/hprof/model/HackJavaValue.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaBoolean.java b/test/lib/jdk/test/lib/hprof/model/JavaBoolean.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaBoolean.java
rename to test/lib/jdk/test/lib/hprof/model/JavaBoolean.java
index 3c29845..e96766d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaBoolean.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaBoolean.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaByte.java b/test/lib/jdk/test/lib/hprof/model/JavaByte.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaByte.java
rename to test/lib/jdk/test/lib/hprof/model/JavaByte.java
index aa32ca5..e4a1d33 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaByte.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaByte.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaChar.java b/test/lib/jdk/test/lib/hprof/model/JavaChar.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaChar.java
rename to test/lib/jdk/test/lib/hprof/model/JavaChar.java
index 629af171..7c04f50 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaChar.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaChar.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaClass.java b/test/lib/jdk/test/lib/hprof/model/JavaClass.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaClass.java
rename to test/lib/jdk/test/lib/hprof/model/JavaClass.java
index c25e8ad..c2a9563 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaClass.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaClass.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaDouble.java b/test/lib/jdk/test/lib/hprof/model/JavaDouble.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaDouble.java
rename to test/lib/jdk/test/lib/hprof/model/JavaDouble.java
index 347fd4f..3b64302 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaDouble.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaDouble.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaField.java b/test/lib/jdk/test/lib/hprof/model/JavaField.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaField.java
rename to test/lib/jdk/test/lib/hprof/model/JavaField.java
index 87dc48e..d343f91 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaField.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaField.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaFloat.java b/test/lib/jdk/test/lib/hprof/model/JavaFloat.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaFloat.java
rename to test/lib/jdk/test/lib/hprof/model/JavaFloat.java
index 838b72b..4469212 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaFloat.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaFloat.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObject.java b/test/lib/jdk/test/lib/hprof/model/JavaHeapObject.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObject.java
rename to test/lib/jdk/test/lib/hprof/model/JavaHeapObject.java
index 6ab1242..dbe54f0 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObject.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaHeapObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java b/test/lib/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java
rename to test/lib/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java
index d31d382..7760765 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaHeapObjectVisitor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java b/test/lib/jdk/test/lib/hprof/model/JavaInt.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java
rename to test/lib/jdk/test/lib/hprof/model/JavaInt.java
index 4b2e7d2..9360f85 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaInt.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaInt.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLazyReadObject.java b/test/lib/jdk/test/lib/hprof/model/JavaLazyReadObject.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaLazyReadObject.java
rename to test/lib/jdk/test/lib/hprof/model/JavaLazyReadObject.java
index 3baaf3c..5428a2b 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLazyReadObject.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaLazyReadObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLong.java b/test/lib/jdk/test/lib/hprof/model/JavaLong.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaLong.java
rename to test/lib/jdk/test/lib/hprof/model/JavaLong.java
index d86dc50..28aca95 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaLong.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaLong.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObject.java b/test/lib/jdk/test/lib/hprof/model/JavaObject.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaObject.java
rename to test/lib/jdk/test/lib/hprof/model/JavaObject.java
index a419348..74bdb0d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObject.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaObject.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectArray.java b/test/lib/jdk/test/lib/hprof/model/JavaObjectArray.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectArray.java
rename to test/lib/jdk/test/lib/hprof/model/JavaObjectArray.java
index 4ed0afe..98ae116 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectArray.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaObjectArray.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectRef.java b/test/lib/jdk/test/lib/hprof/model/JavaObjectRef.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectRef.java
rename to test/lib/jdk/test/lib/hprof/model/JavaObjectRef.java
index 009c03b..f0958f7 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaObjectRef.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaObjectRef.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaShort.java b/test/lib/jdk/test/lib/hprof/model/JavaShort.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaShort.java
rename to test/lib/jdk/test/lib/hprof/model/JavaShort.java
index d3bf759..7c4e46a 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaShort.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaShort.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaStatic.java b/test/lib/jdk/test/lib/hprof/model/JavaStatic.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaStatic.java
rename to test/lib/jdk/test/lib/hprof/model/JavaStatic.java
index b9dc399..79a5b0d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaStatic.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaStatic.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaThing.java b/test/lib/jdk/test/lib/hprof/model/JavaThing.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaThing.java
rename to test/lib/jdk/test/lib/hprof/model/JavaThing.java
index 5b14eb6..2a663ab 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaThing.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaThing.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValue.java b/test/lib/jdk/test/lib/hprof/model/JavaValue.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaValue.java
rename to test/lib/jdk/test/lib/hprof/model/JavaValue.java
index 30ac665..e7cad68 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValue.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaValue.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValueArray.java b/test/lib/jdk/test/lib/hprof/model/JavaValueArray.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/JavaValueArray.java
rename to test/lib/jdk/test/lib/hprof/model/JavaValueArray.java
index 7c0c2c6..d65780d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/JavaValueArray.java
+++ b/test/lib/jdk/test/lib/hprof/model/JavaValueArray.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludes.java b/test/lib/jdk/test/lib/hprof/model/ReachableExcludes.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludes.java
rename to test/lib/jdk/test/lib/hprof/model/ReachableExcludes.java
index 6133e53..b951832 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludes.java
+++ b/test/lib/jdk/test/lib/hprof/model/ReachableExcludes.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludesImpl.java b/test/lib/jdk/test/lib/hprof/model/ReachableExcludesImpl.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludesImpl.java
rename to test/lib/jdk/test/lib/hprof/model/ReachableExcludesImpl.java
index 8a15e63..5038f71 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableExcludesImpl.java
+++ b/test/lib/jdk/test/lib/hprof/model/ReachableExcludesImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableObjects.java b/test/lib/jdk/test/lib/hprof/model/ReachableObjects.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/ReachableObjects.java
rename to test/lib/jdk/test/lib/hprof/model/ReachableObjects.java
index da7a4a1..c3fcd75 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/ReachableObjects.java
+++ b/test/lib/jdk/test/lib/hprof/model/ReachableObjects.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/ReferenceChain.java b/test/lib/jdk/test/lib/hprof/model/ReferenceChain.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/ReferenceChain.java
rename to test/lib/jdk/test/lib/hprof/model/ReferenceChain.java
index b21ed0b..3b21751 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/ReferenceChain.java
+++ b/test/lib/jdk/test/lib/hprof/model/ReferenceChain.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/Root.java b/test/lib/jdk/test/lib/hprof/model/Root.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/Root.java
rename to test/lib/jdk/test/lib/hprof/model/Root.java
index 54a893b..ae7c08b 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/Root.java
+++ b/test/lib/jdk/test/lib/hprof/model/Root.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java b/test/lib/jdk/test/lib/hprof/model/Snapshot.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java
rename to test/lib/jdk/test/lib/hprof/model/Snapshot.java
index 6150543..fcef29a 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/Snapshot.java
+++ b/test/lib/jdk/test/lib/hprof/model/Snapshot.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/StackFrame.java b/test/lib/jdk/test/lib/hprof/model/StackFrame.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/StackFrame.java
rename to test/lib/jdk/test/lib/hprof/model/StackFrame.java
index f6e2996..723cf64 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/StackFrame.java
+++ b/test/lib/jdk/test/lib/hprof/model/StackFrame.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/model/StackTrace.java b/test/lib/jdk/test/lib/hprof/model/StackTrace.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/model/StackTrace.java
rename to test/lib/jdk/test/lib/hprof/model/StackTrace.java
index d581257..75c92fc 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/model/StackTrace.java
+++ b/test/lib/jdk/test/lib/hprof/model/StackTrace.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/FileReadBuffer.java b/test/lib/jdk/test/lib/hprof/parser/FileReadBuffer.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/FileReadBuffer.java
rename to test/lib/jdk/test/lib/hprof/parser/FileReadBuffer.java
index 716b946..7beb2e7 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/FileReadBuffer.java
+++ b/test/lib/jdk/test/lib/hprof/parser/FileReadBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/HprofReader.java b/test/lib/jdk/test/lib/hprof/parser/HprofReader.java
similarity index 99%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/HprofReader.java
rename to test/lib/jdk/test/lib/hprof/parser/HprofReader.java
index 15bd6af..693bec6 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/HprofReader.java
+++ b/test/lib/jdk/test/lib/hprof/parser/HprofReader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/MappedReadBuffer.java b/test/lib/jdk/test/lib/hprof/parser/MappedReadBuffer.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/MappedReadBuffer.java
rename to test/lib/jdk/test/lib/hprof/parser/MappedReadBuffer.java
index b3657e6..c7247fa 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/MappedReadBuffer.java
+++ b/test/lib/jdk/test/lib/hprof/parser/MappedReadBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionDataInputStream.java b/test/lib/jdk/test/lib/hprof/parser/PositionDataInputStream.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/PositionDataInputStream.java
rename to test/lib/jdk/test/lib/hprof/parser/PositionDataInputStream.java
index b27e1dc..8435dd1 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionDataInputStream.java
+++ b/test/lib/jdk/test/lib/hprof/parser/PositionDataInputStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionInputStream.java b/test/lib/jdk/test/lib/hprof/parser/PositionInputStream.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/PositionInputStream.java
rename to test/lib/jdk/test/lib/hprof/parser/PositionInputStream.java
index aecc726..0c0e43d 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/PositionInputStream.java
+++ b/test/lib/jdk/test/lib/hprof/parser/PositionInputStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/ReadBuffer.java b/test/lib/jdk/test/lib/hprof/parser/ReadBuffer.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/ReadBuffer.java
rename to test/lib/jdk/test/lib/hprof/parser/ReadBuffer.java
index 99c15e5..fe548a7 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/ReadBuffer.java
+++ b/test/lib/jdk/test/lib/hprof/parser/ReadBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/parser/Reader.java b/test/lib/jdk/test/lib/hprof/parser/Reader.java
similarity index 97%
rename from test/lib/share/classes/jdk/test/lib/hprof/parser/Reader.java
rename to test/lib/jdk/test/lib/hprof/parser/Reader.java
index 19ddad5..5263035 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/parser/Reader.java
+++ b/test/lib/jdk/test/lib/hprof/parser/Reader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/util/ArraySorter.java b/test/lib/jdk/test/lib/hprof/util/ArraySorter.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/util/ArraySorter.java
rename to test/lib/jdk/test/lib/hprof/util/ArraySorter.java
index 4101529..04dbad7 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/util/ArraySorter.java
+++ b/test/lib/jdk/test/lib/hprof/util/ArraySorter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/util/Comparer.java b/test/lib/jdk/test/lib/hprof/util/Comparer.java
similarity index 95%
rename from test/lib/share/classes/jdk/test/lib/hprof/util/Comparer.java
rename to test/lib/jdk/test/lib/hprof/util/Comparer.java
index b6ae503..182f37e 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/util/Comparer.java
+++ b/test/lib/jdk/test/lib/hprof/util/Comparer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/util/CompositeEnumeration.java b/test/lib/jdk/test/lib/hprof/util/CompositeEnumeration.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/hprof/util/CompositeEnumeration.java
rename to test/lib/jdk/test/lib/hprof/util/CompositeEnumeration.java
index 2c49fad..ddebd0f 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/util/CompositeEnumeration.java
+++ b/test/lib/jdk/test/lib/hprof/util/CompositeEnumeration.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/util/Misc.java b/test/lib/jdk/test/lib/hprof/util/Misc.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/util/Misc.java
rename to test/lib/jdk/test/lib/hprof/util/Misc.java
index 98592f6..e654d71 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/util/Misc.java
+++ b/test/lib/jdk/test/lib/hprof/util/Misc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/hprof/util/VectorSorter.java b/test/lib/jdk/test/lib/hprof/util/VectorSorter.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/hprof/util/VectorSorter.java
rename to test/lib/jdk/test/lib/hprof/util/VectorSorter.java
index 112d909..fb2ac13 100644
--- a/test/lib/share/classes/jdk/test/lib/hprof/util/VectorSorter.java
+++ b/test/lib/jdk/test/lib/hprof/util/VectorSorter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/ExitCode.java b/test/lib/jdk/test/lib/process/ExitCode.java
similarity index 92%
rename from hotspot/test/testlibrary/jdk/test/lib/ExitCode.java
rename to test/lib/jdk/test/lib/process/ExitCode.java
index 859346d..bb66da1 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/ExitCode.java
+++ b/test/lib/jdk/test/lib/process/ExitCode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.process;
 
 /**
  * Exit code values that could be returned by the JVM.
diff --git a/hotspot/test/testlibrary/jdk/test/lib/OutputAnalyzer.java b/test/lib/jdk/test/lib/process/OutputAnalyzer.java
similarity index 97%
rename from hotspot/test/testlibrary/jdk/test/lib/OutputAnalyzer.java
rename to test/lib/jdk/test/lib/process/OutputAnalyzer.java
index 15f6f53..97d9ae0 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/OutputAnalyzer.java
+++ b/test/lib/jdk/test/lib/process/OutputAnalyzer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.process;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -41,11 +41,7 @@
    *
    * @param process Process to analyze
    * @throws IOException If an I/O error occurs.
-   *
-   * @deprecated This class is deprecated. Use the one from
-   *             {@code <root>/test/lib/share/classes/jdk/test/lib/process}
    */
-  @Deprecated
   public OutputAnalyzer(Process process) throws IOException {
     OutputBuffer output = ProcessTools.getOutput(process);
     exitValue = process.exitValue();
diff --git a/test/lib/share/classes/jdk/test/lib/process/OutputBuffer.java b/test/lib/jdk/test/lib/process/OutputBuffer.java
similarity index 96%
rename from test/lib/share/classes/jdk/test/lib/process/OutputBuffer.java
rename to test/lib/jdk/test/lib/process/OutputBuffer.java
index 23976d8..a41e843 100644
--- a/test/lib/share/classes/jdk/test/lib/process/OutputBuffer.java
+++ b/test/lib/jdk/test/lib/process/OutputBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/test/lib/share/classes/jdk/test/lib/process/ProcessTools.java b/test/lib/jdk/test/lib/process/ProcessTools.java
similarity index 92%
rename from test/lib/share/classes/jdk/test/lib/process/ProcessTools.java
rename to test/lib/jdk/test/lib/process/ProcessTools.java
index 3189a0f..3f4bbb7 100644
--- a/test/lib/share/classes/jdk/test/lib/process/ProcessTools.java
+++ b/test/lib/jdk/test/lib/process/ProcessTools.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,10 +28,13 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.concurrent.CountDownLatch;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
@@ -301,6 +304,16 @@
     public static long getProcessId() throws Exception {
         return ProcessHandle.current().getPid();
     }
+    /**
+     * Gets the array of strings containing input arguments passed to the VM
+     *
+     * @return arguments
+     */
+    public static String[] getVmInputArgs() {
+        RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
+        List<String> args = runtime.getInputArguments();
+        return args.toArray(new String[args.size()]);
+    }
 
     /**
      * Get platform specific VM arguments (e.g. -d64 on 64bit Solaris)
@@ -342,16 +355,10 @@
         args.add(javapath);
         Collections.addAll(args, getPlatformSpecificVMArgs());
 
+        args.add("-cp");
+        args.add(System.getProperty("java.class.path"));
+
         if (addTestVmAndJavaOptions) {
-            // -cp is needed to make sure the same classpath is used whether the test is
-            // run in AgentVM mode or OtherVM mode. It was added to the hotspot version
-            // of this API as part of 8077608. However, for the jdk version it is only
-            // added when addTestVmAndJavaOptions is true in order to minimize
-            // disruption to existing JDK tests, which have yet to be tested with -cp
-            // being added. At some point -cp should always be added to be consistent
-            // with what the hotspot version does.
-            args.add("-cp");
-            args.add(System.getProperty("java.class.path"));
             Collections.addAll(args, Utils.getTestJavaOpts());
         }
 
@@ -379,6 +386,26 @@
 
     /**
      * Executes a test jvm process, waits for it to finish and returns the process output.
+     * The default jvm options from the test's run command, jtreg, test.vm.opts and test.java.opts, are added.
+     * The java from the test.jdk is used to execute the command.
+     *
+     * The command line will be like:
+     * {test.jdk}/bin/java {test.fromRun.opts} {test.vm.opts} {test.java.opts} cmds
+     *
+     * @param cmds User specifed arguments.
+     * @return The output from the process.
+     */
+    public static OutputAnalyzer executeTestJvmAllArgs(String... cmds) throws Throwable {
+        List<String> argsList = new ArrayList<>();
+        String[] testArgs = getVmInputArgs();
+        Collections.addAll(argsList, testArgs);
+        Collections.addAll(argsList, Utils.addTestJavaOpts(cmds));
+        ProcessBuilder pb = createJavaProcessBuilder(argsList.toArray(new String[argsList.size()]));
+        return executeProcess(pb);
+    }
+
+    /**
+     * Executes a test jvm process, waits for it to finish and returns the process output.
      * The default jvm options from jtreg, test.vm.opts and test.java.opts, are added.
      * The java from the test.jdk is used to execute the command.
      *
diff --git a/test/lib/share/classes/jdk/test/lib/process/StreamPumper.java b/test/lib/jdk/test/lib/process/StreamPumper.java
similarity index 98%
rename from test/lib/share/classes/jdk/test/lib/process/StreamPumper.java
rename to test/lib/jdk/test/lib/process/StreamPumper.java
index b1780c4..8dd7f0c 100644
--- a/test/lib/share/classes/jdk/test/lib/process/StreamPumper.java
+++ b/test/lib/jdk/test/lib/process/StreamPumper.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/testlibrary/jdk/test/lib/Pair.java b/test/lib/jdk/test/lib/util/Pair.java
similarity index 94%
rename from hotspot/test/testlibrary/jdk/test/lib/Pair.java
rename to test/lib/jdk/test/lib/util/Pair.java
index 3e2a3c0..ca29586 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/Pair.java
+++ b/test/lib/jdk/test/lib/util/Pair.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.util;
 
 import java.util.Objects;
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/Triple.java b/test/lib/jdk/test/lib/util/Triple.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/Triple.java
rename to test/lib/jdk/test/lib/util/Triple.java
index d459aa0..fbc8253 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/Triple.java
+++ b/test/lib/jdk/test/lib/util/Triple.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.util;
 
 import java.util.Objects;
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/InfiniteLoop.java b/test/lib/jdk/test/lib/wrappers/InfiniteLoop.java
similarity index 95%
rename from hotspot/test/testlibrary/jdk/test/lib/InfiniteLoop.java
rename to test/lib/jdk/test/lib/wrappers/InfiniteLoop.java
index 2c1d1a9..dbee901 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/InfiniteLoop.java
+++ b/test/lib/jdk/test/lib/wrappers/InfiniteLoop.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.wrappers;
 
 import java.util.Objects;
 
diff --git a/hotspot/test/testlibrary/jdk/test/lib/TimeLimitedRunner.java b/test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java
similarity index 96%
rename from hotspot/test/testlibrary/jdk/test/lib/TimeLimitedRunner.java
rename to test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java
index 4d014fe..73d53b4 100644
--- a/hotspot/test/testlibrary/jdk/test/lib/TimeLimitedRunner.java
+++ b/test/lib/jdk/test/lib/wrappers/TimeLimitedRunner.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,7 +21,7 @@
  * questions.
  */
 
-package jdk.test.lib;
+package jdk.test.lib.wrappers;
 
 import java.util.Objects;
 import java.util.concurrent.Callable;
diff --git a/test/lib/share/classes/jdk/test/lib/process/OutputAnalyzer.java b/test/lib/share/classes/jdk/test/lib/process/OutputAnalyzer.java
deleted file mode 100644
index fc3a4de..0000000
--- a/test/lib/share/classes/jdk/test/lib/process/OutputAnalyzer.java
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package jdk.test.lib.process;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public final class OutputAnalyzer {
-
-  private final String stdout;
-  private final String stderr;
-  private final int exitValue;
-
-  /**
-   * Create an OutputAnalyzer, a utility class for verifying output and exit
-   * value from a Process
-   *
-   * @param process Process to analyze
-   * @throws IOException If an I/O error occurs.
-   */
-  public OutputAnalyzer(Process process) throws IOException {
-    OutputBuffer output = ProcessTools.getOutput(process);
-    exitValue = process.exitValue();
-    this.stdout = output.getStdout();
-    this.stderr = output.getStderr();
-  }
-
-  /**
-   * Create an OutputAnalyzer, a utility class for verifying output
-   *
-   * @param buf String buffer to analyze
-   */
-  public OutputAnalyzer(String buf) {
-    this(buf, buf);
-  }
-
-  /**
-   * Create an OutputAnalyzer, a utility class for verifying output
-   *
-   * @param stdout stdout buffer to analyze
-   * @param stderr stderr buffer to analyze
-   */
-  public OutputAnalyzer(String stdout, String stderr) {
-    this.stdout = stdout;
-    this.stderr = stderr;
-    exitValue = -1;
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer is empty
-   *
-   * @throws RuntimeException
-   *             If stdout was not empty
-   */
-  public void stdoutShouldBeEmpty() {
-    if (!getStdout().isEmpty()) {
-      reportDiagnosticSummary();
-      throw new RuntimeException("stdout was not empty");
-    }
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer is empty
-   *
-   * @throws RuntimeException
-   *             If stderr was not empty
-   */
-  public void stderrShouldBeEmpty() {
-    if (!getStderr().isEmpty()) {
-      reportDiagnosticSummary();
-      throw new RuntimeException("stderr was not empty");
-    }
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer is not empty
-   *
-   * @throws RuntimeException
-   *             If stdout was empty
-   */
-  public void stdoutShouldNotBeEmpty() {
-    if (getStdout().isEmpty()) {
-      reportDiagnosticSummary();
-      throw new RuntimeException("stdout was empty");
-    }
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer is not empty
-   *
-   * @throws RuntimeException
-   *             If stderr was empty
-   */
-  public void stderrShouldNotBeEmpty() {
-    if (getStderr().isEmpty()) {
-      reportDiagnosticSummary();
-      throw new RuntimeException("stderr was empty");
-    }
-  }
-
-    /**
-   * Verify that the stdout and stderr contents of output buffer contains the string
-   *
-   * @param expectedString String that buffer should contain
-   * @throws RuntimeException If the string was not found
-   */
-  public OutputAnalyzer shouldContain(String expectedString) {
-    if (!stdout.contains(expectedString) && !stderr.contains(expectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + expectedString + "' missing from stdout/stderr \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer contains the string
-   *
-   * @param expectedString String that buffer should contain
-   * @throws RuntimeException If the string was not found
-   */
-  public OutputAnalyzer stdoutShouldContain(String expectedString) {
-    if (!stdout.contains(expectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + expectedString + "' missing from stdout \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer contains the string
-   *
-   * @param expectedString String that buffer should contain
-   * @throws RuntimeException If the string was not found
-   */
-  public OutputAnalyzer stderrShouldContain(String expectedString) {
-    if (!stderr.contains(expectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + expectedString + "' missing from stderr \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stdout and stderr contents of output buffer does not contain the string
-   *
-   * @param expectedString String that the buffer should not contain
-   * @throws RuntimeException If the string was found
-   */
-  public OutputAnalyzer shouldNotContain(String notExpectedString) {
-    if (stdout.contains(notExpectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + notExpectedString + "' found in stdout \n");
-    }
-    if (stderr.contains(notExpectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + notExpectedString + "' found in stderr \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer does not contain the string
-   *
-   * @param expectedString String that the buffer should not contain
-   * @throws RuntimeException If the string was found
-   */
-  public OutputAnalyzer stdoutShouldNotContain(String notExpectedString) {
-    if (stdout.contains(notExpectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + notExpectedString + "' found in stdout \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer does not contain the string
-   *
-   * @param expectedString String that the buffer should not contain
-   * @throws RuntimeException If the string was found
-   */
-  public OutputAnalyzer stderrShouldNotContain(String notExpectedString) {
-    if (stderr.contains(notExpectedString)) {
-        reportDiagnosticSummary();
-        throw new RuntimeException("'" + notExpectedString + "' found in stderr \n");
-    }
-    return this;
-  }
-
-  /**
-   * Verify that the stdout and stderr contents of output buffer matches
-   * the pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was not found
-   */
-  public OutputAnalyzer shouldMatch(String pattern) {
-      Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-      Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
-      if (!stdoutMatcher.find() && !stderrMatcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                + "' missing from stdout/stderr \n");
-      }
-      return this;
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer matches the
-   * pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was not found
-   */
-  public OutputAnalyzer stdoutShouldMatch(String pattern) {
-      Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-      if (!matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                + "' missing from stdout \n");
-      }
-      return this;
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer matches the
-   * pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was not found
-   */
-  public OutputAnalyzer stderrShouldMatch(String pattern) {
-      Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
-      if (!matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                + "' missing from stderr \n");
-      }
-      return this;
-  }
-
-  /**
-   * Verify that the stdout and stderr contents of output buffer does not
-   * match the pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was found
-   */
-  public OutputAnalyzer shouldNotMatch(String pattern) {
-      Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-      if (matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                  + "' found in stdout: '" + matcher.group() + "' \n");
-      }
-      matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
-      if (matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                  + "' found in stderr: '" + matcher.group() + "' \n");
-      }
-      return this;
-  }
-
-  /**
-   * Verify that the stdout contents of output buffer does not match the
-   * pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was found
-   */
-  public OutputAnalyzer stdoutShouldNotMatch(String pattern) {
-      Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-      if (matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                  + "' found in stdout \n");
-      }
-      return this;
-  }
-
-  /**
-   * Verify that the stderr contents of output buffer does not match the
-   * pattern
-   *
-   * @param pattern
-   * @throws RuntimeException If the pattern was found
-   */
-  public OutputAnalyzer stderrShouldNotMatch(String pattern) {
-      Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
-      if (matcher.find()) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("'" + pattern
-                  + "' found in stderr \n");
-      }
-      return this;
-  }
-
-  /**
-   * Get the captured group of the first string matching the pattern.
-   * stderr is searched before stdout.
-   *
-   * @param pattern The multi-line pattern to match
-   * @param group The group to capture
-   * @return The matched string or null if no match was found
-   */
-  public String firstMatch(String pattern, int group) {
-    Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr);
-    Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout);
-    if (stderrMatcher.find()) {
-      return stderrMatcher.group(group);
-    }
-    if (stdoutMatcher.find()) {
-      return stdoutMatcher.group(group);
-    }
-    return null;
-  }
-
-  /**
-   * Get the first string matching the pattern.
-   * stderr is searched before stdout.
-   *
-   * @param pattern The multi-line pattern to match
-   * @return The matched string or null if no match was found
-   */
-  public String firstMatch(String pattern) {
-    return firstMatch(pattern, 0);
-  }
-
-  /**
-   * Verify the exit value of the process
-   *
-   * @param expectedExitValue Expected exit value from process
-   * @throws RuntimeException If the exit value from the process did not match the expected value
-   */
-  public OutputAnalyzer shouldHaveExitValue(int expectedExitValue) {
-      if (getExitValue() != expectedExitValue) {
-          reportDiagnosticSummary();
-          throw new RuntimeException("Expected to get exit value of ["
-                  + expectedExitValue + "]\n");
-      }
-      return this;
-  }
-
-
-  /**
-   * Report summary that will help to diagnose the problem
-   * Currently includes:
-   *  - standard input produced by the process under test
-   *  - standard output
-   *  - exit code
-   *  Note: the command line is printed by the ProcessTools
-   */
-    private void reportDiagnosticSummary() {
-        String msg =
-            " stdout: [" + stdout + "];\n" +
-            " stderr: [" + stderr + "]\n" +
-            " exitValue = " + getExitValue() + "\n";
-
-        System.err.println(msg);
-    }
-
-
-  /**
-   * Get the contents of the output buffer (stdout and stderr)
-   *
-   * @return Content of the output buffer
-   */
-  public String getOutput() {
-    return stdout + stderr;
-  }
-
-  /**
-   * Get the contents of the stdout buffer
-   *
-   * @return Content of the stdout buffer
-   */
-  public String getStdout() {
-    return stdout;
-  }
-
-  /**
-   * Get the contents of the stderr buffer
-   *
-   * @return Content of the stderr buffer
-   */
-  public String getStderr() {
-    return stderr;
-  }
-
-  /**
-   * Get the process exit value
-   *
-   * @return Process exit value
-   */
-  public int getExitValue() {
-    return exitValue;
-  }
-
-  /**
-   * Get the contents of the output buffer (stdout and stderr) as list of strings.
-   * Output will be split by newlines.
-   *
-   * @return Contents of the output buffer as list of strings
-   */
-  public List<String> asLines() {
-    return asLines(getOutput());
-  }
-
-  private List<String> asLines(String buffer) {
-    return Arrays.asList(buffer.split("(\\r\\n|\\n|\\r)"));
-  }
-}